⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 del_tmp.php

📁 泛微协同办公系统标准版E-office V5.5的源代码内含泛微办公系统V5.5自动注册文件。
💻 PHP
字号:
<?php

include_once( "inc/auth.php" );
include_once( "ikernel/utility.php" );
include_once( "inc/utility_all.php" );
include_once( "inc/oa_config.php" );
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\" />\r\n<title>无标题文档</title>\r\n</head>\r\n<body>\r\n";
$cache = $_REQUEST['iscache'];
$mailcache = $_REQUEST['ismailcache'];
$piccache = $_REQUEST['ispiccache'];
$Weacache = $_REQUEST['isweather'];
$tmpdir = substr( $ROOT_PATH, 0, strlen( $ROOT_PATH ) - 8 )."tmp/";
if ( $cache == "cache" )
{
	$deletedir = dir( $tmpdir );
	while ( $delfile = $deletedir->read( ) )
	{
		if ( preg_match( "/^cache.*/", $delfile ) )
		{
			$unlinkresult = unlink( $deletedir->path.$delfile );
		}
	}
}
if ( $mailcache == "eml" )
{
	$deletedir = dir( $tmpdir );
	while ( $delfile = $deletedir->read( ) )
	{
		if ( preg_match( "/^eml.*/", $delfile ) )
		{
			$unlinkresult = unlink( $deletedir->path.$delfile );
		}
	}
}
if ( $piccache == "piccache" )
{
	function deldir( $dir )
	{
		$dh = opendir( $dir );
		while ( $file = readdir( $dh ) )
		{
			if ( $file != "." && $file != ".." )
			{
				$fullpath = $dir.$file."/";
				if ( !is_dir( $fullpath ) )
				{
					unlink( $fullpath );
				}
				else
				{
					deldir( $fullpath );
				}
			}
		}
		closedir( $dh );
		if ( rmdir( $dir ) )
		{
			return true;
		}
		else
		{
			return false;
		}
	}
	deldir( CACHE_DIR );
	mkdir( CACHE_DIR );
}
if ( $Weacache == "weather" )
{
	$weathercache = ROOT_PATH."cache/rss/";
	$Wcache = dir( $weathercache );
	while ( $delfile = $Wcache->read( ) )
	{
		if ( $delfile != "." && $delfile != ".." )
		{
			unlink( $Wcache->path.$delfile );
		}
	}
}
message( "提示", "操作已完成!" );
button_back( );
echo "</body>\r\n</html>\r\n";
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -