Esempio n. 1
0
    $info[25] = array("图形处理 GD Library", getfun("imageline"));
    $info[26] = array("IMAP电子邮件系统", getfun("imap_close"));
    $info[27] = array("MySQL数据库", getfun("mysql_close"));
    $info[28] = array("SyBase数据库", getfun("sybase_close"));
    $info[29] = array("Oracle数据库", getfun("ora_close"));
    $info[30] = array("Oracle 8 数据库", getfun("OCILogOff"));
    $info[31] = array("PREL相容语法 PCRE", getfun("preg_match"));
    $info[32] = array("PDF文档支持", getfun("pdf_close"));
    $info[33] = array("Postgre SQL数据库", getfun("pg_close"));
    $info[34] = array("SNMP网络管理协议", getfun("snmpget"));
    $info[35] = array("压缩文件支持(Zlib)", getfun("gzclose"));
    $info[36] = array("XML解析", getfun("xml_set_object"));
    $info[37] = array("FTP", getfun("ftp_login"));
    $info[38] = array("ODBC数据库连接", getfun("odbc_close"));
    $info[39] = array("Session支持", getfun("session_start"));
    $info[40] = array("Socket支持", getfun("fsockopen"));
    ?>
<table width="760" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#ffffff">
 <form action="?action=phpenv" method="POST">
  <tr class="firstalt">
    <td style="padding-left: 5px;"><b>查看PHP配置参数状况</b></td>
  </tr>
  <tr class="secondalt">
    <td style="padding-left: 5px;">请输入配置参数(如:magic_quotes_gpc):<input name="phpvarname" type="text" class="input" size="40"> <input type="submit" value="查看" class="input"><input name="action" type="hidden" value="viewphpvar"></td>
  </tr>
 </form>
<?php 
    for ($a = 0; $a < 3; $a++) {
        if ($a == 0) {
            $hp = array("server", "服务器特性");
        } elseif ($a == 1) {
Esempio n. 2
0
	</form>';
}
if (isset($p['me']) && $p['me'] === 'info') {
    if (@sValid($p['phpvarname'])) {
        $sBuff .= sDialog($p['phpvarname'] . ': ' . getcfg($p['phpvarname']));
    }
    $sBuff .= '<form> 
        <h2>Variables del servidor</h2> 
        <p>Ingrese los parametros PHP de configuracion (ej: magic_quotes_gpc)
        <input name="phpvarname" id="phpvarname" value="" type="text" size="100" /> <input name="submit" id="submit" type="submit" value="Submit"></p> 
        </form>';
    //principal resume
    $dis_func = get_cfg_var('disable_functions');
    !$dis_func && ($dis_func = 'No');
    $sBuff .= "<p class='boxtitle touch' onclick=\"toggle('info');\" style='margin-bottom:8px;'>Resume</p>" . "<div id='info' style='margin-bottom:8px;display:none;'><table class='dataView'>";
    $info = array('Server Time' => date('Y/m/d h:i:s', time()), 'Server Domain' => $_SERVER['SERVER_NAME'], 'Server IP' => gethostbyname($_SERVER['SERVER_NAME']), 'Server OS' => PHP_OS, 'Server OS Charset' => $_SERVER['HTTP_ACCEPT_LANGUAGE'], 'Server Software' => $_SERVER['SERVER_SOFTWARE'], 'Server Web Port' => $_SERVER['SERVER_PORT'], 'PHP run mode' => php_sapi_name(), 'This file path' => __FILE__, 'PHP Version' => PHP_VERSION, 'PHP Info' => function_exists('phpinfo') && @(!in_array('phpinfo', $dis_func)) ? '<b>Yes</b>' : 'No', 'Safe Mode' => getcfg('safe_mode'), 'Administrator' => isset($_SERVER['SERVER_ADMIN']) ? $_SERVER['SERVER_ADMIN'] : getcfg('sendmail_from'), 'allow_url_fopen' => getcfg('allow_url_fopen'), 'enable_dl' => getcfg('enable_dl'), 'display_errors' => getcfg('display_errors'), 'register_globals' => getcfg('register_globals'), 'magic_quotes_gpc' => getcfg('magic_quotes_gpc'), 'memory_limit' => getcfg('memory_limit'), 'post_max_size' => getcfg('post_max_size'), 'upload_max_filesize' => getcfg('file_uploads') ? getcfg('upload_max_filesize') : 'Not allowed', 'max_execution_time' => getcfg('max_execution_time') . ' second(s)', 'disable_functions' => $dis_func, 'MySQL' => getfun('mysql_connect'), 'MSSQL' => getfun('mssql_connect'), 'PostgreSQL' => getfun('pg_connect'), 'Oracle' => getfun('ocilogon'), 'Curl' => getfun('curl_version'), 'gzcompress' => getfun('gzcompress'), 'gzencode' => getfun('gzencode'), 'bzcompress' => getfun('bzcompress'));
    foreach ($info as $v => $k) {
        $sBuff .= "<tr><td>{$v}</td><td>{$k}</td></tr>";
    }
    $sBuff .= "</table></div>";
    //based on b374k work
    //server misc info
    $sBuff .= "<p class='boxtitle touch' onclick=\"toggle('info_server');\" style='margin-bottom:8px;'>Server Info</p>" . "<div id='info_server' style='margin-bottom:8px;display:none;'><table class='dataView'>";
    if ($isWIN) {
        foreach (range("A", "Z") as $letter) {
            if (is_readable($letter . ":\\")) {
                $drive = $letter . ":";
                $sBuff .= "<tr><td>drive {$drive}</td><td>" . sizecount(@disk_free_space($drive)) . " free of " . sizecount(@disk_total_space($drive)) . "</td></tr>";
            }
        }
    } else {
        $tb->makehidden('do', 'backupmysql');
        $tb->formfooter('0', '30');
    }
    $tb->tablefooter();
    @mysql_close();
} elseif ($_GET['action'] == "phpenv") {
    $upsize = get_cfg_var("file_uploads") ? get_cfg_var("upload_max_filesize") : "²»OE??EI´«";
    $adminmail = isset($_SERVER['SERVER_ADMIN']) ? "<a href=\"mailto:" . $_SERVER['SERVER_ADMIN'] . "\">" . $_SERVER['SERVER_ADMIN'] . "</a>" : "<a href=\"mailto:" . get_cfg_var("sendmail_from") . "\">" . get_cfg_var("sendmail_from") . "</a>";
    if ($dis_func == "") {
        $dis_func = "No";
    } else {
        $dis_func = str_replace(" ", "<br>", $dis_func);
        $dis_func = str_replace(",", "<br>", $dis_func);
    }
    $phpinfo = !eregi("phpinfo", $dis_func) ? "Yes" : "No";
    $info = array(0 => array("??E ??OC? C??????", date("Y?êmOAdE? h:i:s", time())), 1 => array("??? C??????", "<a href=\"http://" . $_SERVER['SERVER_NAME'] . "\" target=\"_blank\">" . $_SERVER['SERVER_NAME'] . "</a>"), 2 => array("??? C??? E? ???????", gethostbyname($_SERVER['SERVER_NAME'])), 3 => array("C????", PHP_OS), 5 => array("C??UE", $_SERVER['HTTP_ACCEPT_LANGUAGE']), 6 => array("?UC? C??????", $_SERVER['SERVER_SOFTWARE']), 7 => array("???? C??????", $_SERVER['SERVER_PORT']), 8 => array("??? C??UC?", strtoupper(php_sapi_name())), 9 => array("??IC? C??UC?", PHP_VERSION), 10 => array("C???? C?A??", getphpcfg("safemode")), 11 => array("????? C??I??", $adminmail), 12 => array("???C? C?O?", __FILE__), 13 => array("allow url fopen", getphpcfg("allow_url_fopen")), 14 => array("enable dl", getphpcfg("enable_dl")), 15 => array("display errors", getphpcfg("display_errors")), 16 => array("register globals", getphpcfg("register_globals")), 17 => array("magic quotes gpc", getphpcfg("magic_quotes_gpc")), 18 => array("memory limit", getphpcfg("memory_limit")), 19 => array("post max size", getphpcfg("post_max_size")), 20 => array("upload max filesize", $upsize), 21 => array("max execution time", getphpcfg("max_execution_time") . "?ë"), 22 => array("disable functions", $dis_func), 23 => array("phpinfo()", $phpinfo), 24 => array("diskfreespace", intval(diskfreespace(".") / (1024 * 1024)) . 'Mb'), 25 => array("GD Library", getfun("imageline")), 26 => array("IMAP", getfun("imap_close")), 27 => array("MySQL", getfun("mysql_close")), 28 => array("SyBase", getfun("sybase_close")), 29 => array("Oracle", getfun("ora_close")), 30 => array("Oracle 8 ", getfun("OCILo???ff")), 31 => array("PREL", getfun("preg_match")), 32 => array("PDF", getfun("pdf_close")), 33 => array("Postgre SQL", getfun("pg_close")), 34 => array("SNMP", getfun("snmpget")), 35 => array("(Zlib)", getfun("gzclose")), 36 => array("XML", getfun("xml_set_object")), 37 => array("FTP", getfun("ftp_login")), 38 => array("ODBC", getfun("odbc_close")), 39 => array("Session", getfun("session_start")), 40 => array("Socket", getfun("fsockopen")));
    $tb->tableheader();
    echo "<form action=\"?action=phpenv\" method=\"POST\">\n";
    $tb->tdbody('<b></b>', 'left', '1', '30', 'style="padding-left: 5px;"');
    $tb->tdbody('C:magic_quotes_gpc): ' . $tb->makeinput('phpvarname', '', '', 'text', '40') . ' ' . $tb->makeinput('', '???', '', 'submit'), 'left', '2', '30', 'style="padding-left: 5px;"');
    $tb->makehidden('do', 'viewphpvar');
    echo "</form>\n";
    $hp = array(0 => '·?I??÷???O', 1 => '?????CE ?? C??????', 2 => '');
    for ($a = 0; $a < 3; $a++) {
        $tb->tdbody('<b>' . $hp[1] . '</b>', 'left', '1', '30', 'style="padding-left: 5px;"');
        ?>
  <tr class="secondalt">
    <td>
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
<?php 
        if ($a == 0) {
Esempio n. 4
0
        $tb->makehidden('do', 'backupmysql');
        $tb->formfooter('0', '30');
    }
    $tb->tablefooter();
    @mysql_close();
} elseif ($_GET['action'] == "phpenv") {
    $upsize = get_cfg_var("file_uploads") ? get_cfg_var("upload_max_filesize") : "不允许上传";
    $adminmail = isset($_SERVER['SERVER_ADMIN']) ? "<a href=\"mailto:" . $_SERVER['SERVER_ADMIN'] . "\">" . $_SERVER['SERVER_ADMIN'] . "</a>" : "<a href=\"mailto:" . get_cfg_var("sendmail_from") . "\">" . get_cfg_var("sendmail_from") . "</a>";
    if ($dis_func == "") {
        $dis_func = "No";
    } else {
        $dis_func = str_replace(" ", "<br>", $dis_func);
        $dis_func = str_replace(",", "<br>", $dis_func);
    }
    $phpinfo = !eregi("phpinfo", $dis_func) ? "Yes" : "No";
    $info = array(0 => array("服务器时间", date("Y年m月d日 h:i:s", time())), 1 => array("服务器域名", "<a href=\"http://" . $_SERVER['SERVER_NAME'] . "\" target=\"_blank\">" . $_SERVER['SERVER_NAME'] . "</a>"), 2 => array("服务器IP地址", gethostbyname($_SERVER['SERVER_NAME'])), 3 => array("服务器操作系统", PHP_OS), 5 => array("服务器操作系统文字编码", $_SERVER['HTTP_ACCEPT_LANGUAGE']), 6 => array("服务器解译引擎", $_SERVER['SERVER_SOFTWARE']), 7 => array("Web服务端口", $_SERVER['SERVER_PORT']), 8 => array("PHP运行方式", strtoupper(php_sapi_name())), 9 => array("PHP版本", PHP_VERSION), 10 => array("运行于安全模式", getphpcfg("safemode")), 11 => array("服务器管理员", $adminmail), 12 => array("本文件路径", __FILE__), 13 => array("允许使用 URL 打开文件 allow_url_fopen", getphpcfg("allow_url_fopen")), 14 => array("允许动态加载链接库 enable_dl", getphpcfg("enable_dl")), 15 => array("显示错误信息 display_errors", getphpcfg("display_errors")), 16 => array("自动定义全局变量 register_globals", getphpcfg("register_globals")), 17 => array("magic_quotes_gpc", getphpcfg("magic_quotes_gpc")), 18 => array("程序最多允许使用内存量 memory_limit", getphpcfg("memory_limit")), 19 => array("POST最大字节数 post_max_size", getphpcfg("post_max_size")), 20 => array("允许最大上传文件 upload_max_filesize", $upsize), 21 => array("程序最长运行时间 max_execution_time", getphpcfg("max_execution_time") . "秒"), 22 => array("被禁用的函数 disable_functions", $dis_func), 23 => array("phpinfo()", $phpinfo), 24 => array("目前还有空余空间diskfreespace", intval(diskfreespace(".") / (1024 * 1024)) . 'Mb'), 25 => array("图形处理 GD Library", getfun("imageline")), 26 => array("IMAP电子邮件系统", getfun("imap_close")), 27 => array("MySQL数据库", getfun("mysql_close")), 28 => array("SyBase数据库", getfun("sybase_close")), 29 => array("Oracle数据库", getfun("ora_close")), 30 => array("Oracle 8 数据库", getfun("OCILogOff")), 31 => array("PREL相容语法 PCRE", getfun("preg_match")), 32 => array("PDF文档支持", getfun("pdf_close")), 33 => array("Postgre SQL数据库", getfun("pg_close")), 34 => array("SNMP网络管理协议", getfun("snmpget")), 35 => array("压缩文件支持(Zlib)", getfun("gzclose")), 36 => array("XML解析", getfun("xml_set_object")), 37 => array("FTP", getfun("ftp_login")), 38 => array("ODBC数据库连接", getfun("odbc_close")), 39 => array("Session支持", getfun("session_start")), 40 => array("Socket支持", getfun("fsockopen")));
    $tb->tableheader();
    echo "<form action=\"?action=phpenv\" method=\"POST\">\n";
    $tb->tdbody('<b>查看PHP配置参数状况</b>', 'left', '1', '30', 'style="padding-left: 5px;"');
    $tb->tdbody('请输入配置参数(如:magic_quotes_gpc): ' . $tb->makeinput('phpvarname', '', '', 'text', '40') . ' ' . $tb->makeinput('', '查看', '', 'submit'), 'left', '2', '30', 'style="padding-left: 5px;"');
    $tb->makehidden('do', 'viewphpvar');
    echo "</form>\n";
    $hp = array(0 => '服务器特性', 1 => 'PHP基本特性', 2 => '组件支持状况');
    for ($a = 0; $a < 3; $a++) {
        $tb->tdbody('<b>' . $hp[1] . '</b>', 'left', '1', '30', 'style="padding-left: 5px;"');
        ?>
  <tr class="secondalt">
    <td>
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
<?php 
        if ($a == 0) {
Esempio n. 5
0
    if (PHP_VERSION < '4.1') {
        $PHPVERSIONCheck = 0;
        $errorInfo = 1;
    }
    if (!getphpcfg('allow_url_fopen')) {
        $allowUrlFopenCheck = 0;
        $errorInfo = 1;
    }
    if (getphpcfg2('safe_mode')) {
        $safeModeCheck = 0;
        $errorInfo = 1;
    }
    $safeMode = getphpcfg2('safe_mode', 2);
    $urlFopen = getphpcfg('allow_url_fopen', 2);
    $imgLine = getfun('imageline', 2);
    $geticonv = getfun('iconv', 2);
    $dirTmpCheck = getwriteable($dirTmpCheck);
    $dirIncCheck = getwriteable($dirIncCheck);
    $contents = getcontent(cfgFilePath . cfgSetting);
    $contents = str_replace('phpversion', PHP_VERSION, $contents);
    $contents = str_replace('safe_mode', $safeMode, $contents);
    $contents = str_replace('allow_url_fopen', $urlFopen, $contents);
    $contents = str_replace('imageline', $imgLine, $contents);
    $contents = str_replace('geticonv', $geticonv, $contents);
    $contents = str_replace('dirTmpCheck', $dirTmpCheck, $contents);
    $contents = str_replace('dirIncCheck', $dirIncCheck, $contents);
    $contents = str_replace('ERRORINFO', $errorInfo, $contents);
    showform('index.php?step=checksetting', '程序安装环境', '下面的表格给出了程序的推荐、基本和当前环境的对比。', $contents);
}
if ($_GET['step'] == 'checksetting') {
    $writeable = $version = $url_fopen = $safemode = '';