Example #1
0
     header('Content-type: text/plain');
     header('Content-Disposition: attachment; filename="svinfo.php"');
     readfile(__FILE__);
 } else {
     error_reporting(0);
     header('Content-type: text/html;charset=utf-8');
     header("Cache-Control: no-cache,no-store , must-revalidate");
     header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
     $disFunc = get_cfg_var("disable_functions");
     if (($disFunc || !preg_match('/phpinfo/i', $disFunc)) && !file_exists(dirname(__FILE__) . "/../config/config.php")) {
         $phpinfo = '<a href="?phpinfo=true" target="_blank">查看phpinfo</a>&nbsp;|&nbsp;';
     } else {
         $phpinfo = null;
     }
     $version = '$Rev: ecstore $';
     $tester = new mdl_serverinfo();
     if (isset($_GET['db_host'])) {
         if ($_GET['db_host'] == 'config') {
             include '../config/config.php';
         } else {
             $tester->allow_change_db = true;
             define('DB_HOST', $_GET['db_host']);
         }
     } else {
         $tester->allow_change_db = true;
     }
     $result = $tester->run($allow_install);
     $txtline = '<div style="display:none">================================================================</div>';
     foreach ($result['data'] as $group => $items) {
         $body .= "<tbody><tr class=\"title\"><td colspan=\"3\"><div style=\"display:none\">&nbsp;</div>{$txtline}{$group}{$txtline}</td></tr><tbody>";
         $i = 0;
Example #2
0
 function step_ready()
 {
     $this->step_setdb();
     if ($this->loadConfig()) {
         include 'svinfo.php';
         $tester = new mdl_serverinfo();
         $this->pagedata['svinfo'] = $tester->run();
         $this->pagedata['status'] = 0;
         $this->db =& $this->database();
         if (!$this->db->rwInstance(true)) {
             echo 'error: can\'t connect MySql Server! ' . mysql_error();
             exit;
         }
         if (!defined('DB_PREFIX')) {
             define('DB_PREFIX', '');
         }
         $this->pagedata['db_pre'] = DB_PREFIX;
         $this->set_timezone(SERVER_TIMEZONE);
         $tz = timezone_list();
         $timelist = array();
         foreach ($tz as $z => $t) {
             $timelist[$z] = date('H:i', time() + ($z - SERVER_TIMEZONE) * 3600) . '-' . $t;
         }
         $this->pagedata['defaultHour'] = SERVER_TIMEZONE;
         $this->pagedata['timelist'] =& $timelist;
         $this->pagedata['stimezone'] = $tz[SERVER_TIMEZONE];
         $this->output('step_ready.html');
     } else {
         header('Location: index.php?step=1');
     }
 }