Пример #1
0
 } 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;
     if ($items['type'] == 'require') {
         foreach ($items['items'] as $key => $value) {
             $rowOpt = $i % 2 ? '' : ' style="background:#E0EAF2"';
             $body .= "<tr{$rowOpt}><th width=\"60%\">{$key}</th><td>" . $value['value'] . "</td><td width=\"50px\">" . ($value['result'] ? '<img src="?img=yes.gif" title="pass" height="16px" width="16px">' : '<img src="?img=no.gif" title="failed" height="16px" width="16px">') . "</td></tr>";
             $i++;
         }
     } else {
         foreach ($items['items'] as $key => $value) {
             $rowOpt = $i % 2 ? '' : ' style="background:#E0EAF2"';
             $body .= "<tr{$rowOpt}><th>{$key}</th><td colspan=\"2\">{$value}</td></tr>";
             $i++;
Пример #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');
     }
 }