= 10. https://www.drupal.org/node/365615. */ if(stripos($clientLang, 'hans')) $clientLang = 'zh-cn'; if(stripos($clientLang, 'hant')) $clientLang = 'zh-tw'; } if(!empty($clientLang)) { $clientLang = strtolower($clientLang); if(!isset($config->langs[$clientLang])) $clientLang = $config->default->lang; } else { $clientLang = $config->default->lang; } ?> webRoot; $themeRoot = $webRoot . "theme/"; $type = !isset($_GET['type']) ? 'check' : $_GET['type']; if($type != 'check' and $type != 'repair') die(); if(!isset($_SESSION['checkFileName'])) { $checkFileName = dirname(__FILE__) . DS . uniqid('repair_') . '.txt'; $_SESSION['checkFileName'] = $checkFileName; } $checkFileName = $_SESSION['checkFileName']; $status = ''; if(!file_exists($checkFileName) or (time() - filemtime($checkFileName)) > 60 * 10) $status = 'createFile'; $lang = new stdclass(); $lang->misc = new stdclass(); $lang->storyCommon = ''; $lang->productCommon = ''; $lang->executionCommon = ''; $lang->URCommon = ''; $lang->SRCommon = ''; $lang->productURCommon = ''; $lang->productSRCommon = ''; $lang->projectSRCommon = ''; $lang->projectURCommon = ''; include "../module/common/lang/{$clientLang}.php"; include "../module/misc/lang/{$clientLang}.php"; if($status == 'createFile') { $lang->user = new stdclass(); include "../module/user/lang/{$clientLang}.php"; } else { $error = ''; try { $dsn = "mysql:host={$config->db->host}; port={$config->db->port}; dbname={$config->db->name}"; $dbh = new PDO($dsn, $config->db->user, $config->db->password, array(PDO::ATTR_PERSISTENT => $config->db->persistant)); $dbh->exec("SET NAMES {$config->db->encoding}"); $dbh->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ); $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $tables = array(); $stmt = $dbh->query("show full tables"); while($table = $stmt->fetch(PDO::FETCH_ASSOC)) { $tableName = $table["Tables_in_{$config->db->name}"]; $tableType = strtolower($table['Table_type']); if($tableType == 'base table') { $tableStatus = $dbh->query("$type table $tableName")->fetch(); $tables[$tableName] = strtolower($tableStatus->Msg_text); } } $status = 'check'; } catch(PDOException $exception) { $error = sprintf($lang->misc->connectFail, $exception->getMessage()); } } ?> ' type='text/css' media='screen' />
misc->repairTable;?>
misc->noticeRepair, $checkFileName); ?>

' class='btn btn-sm'> refresh;?>

$tableStatus):?>
misc->tableName?> misc->tableStatus?>
'> misc->repairFail, $tableName)?>
' class='btn btn-primary'>misc->needRepair?>