Dida 代码库 dida.core

Compare Revisions

Ignore whitespace Rev 459 → Rev 460

/trunk/includes/database/database.mysql.inc
303,6 → 303,18
}
 
/**
* @Implement of db_get_uptime()
*/
function db_mysql_get_uptime($target) {
global $db;
if ($smt = $db[$target]->query("show global status like 'uptime'")) {
foreach ($smt->fetchAll() as $o) {
return $o['Value'];
}
}
}
 
/**
* @Implement of db_is_table
*/
function db_mysql_is_table($table, $target) {
/trunk/includes/database.inc
268,6 → 268,17
}
 
/**
* 获取数据库运行时间
*/
function db_get_uptime($target = 'default') {
global $dbc;
 
if (empty($dbc[$target])) db_connect($target);
return call_user_func('db_' . $dbc[$target]['driver'] . '_get_uptime', $target);
}
 
/**
* 检查属性中是否有连接信息,及连接是否可用
*/
function db_default_options(array $opt = array()) {
/trunk/modules/system/system.admin.inc
202,10 → 202,10
global $conf;
$item[] = dd_get_strong(t('system', '网站名称')). $conf['site_global']['name'] . l(t('system', '修改'), 'admin/settings/global');
$item[] .= dd_get_strong(t('system', '程序版本')). DIDA_VERSION.l(t('system', '检查更新'), 'admin/status/update', dd_redirect());
$item[] = dd_get_strong(t('system', '程序版本')). DIDA_VERSION.l(t('system', '检查更新'), 'admin/status/update', dd_redirect());
$item[] .= dd_get_strong(t('system', '站长邮箱')). $conf['site_global']['mail'] . l(t('system', '修改'), 'admin/settings/global');
$item[] .= dd_get_strong(t('system', '创建时间')). format_date($conf['site_created']);
$item[] = dd_get_strong(t('system', '站长邮箱')). $conf['site_global']['mail'] . l(t('system', '修改'), 'admin/settings/global');
$item[] = dd_get_strong(t('system', '创建时间')). format_date($conf['site_created']);
if ($conf['cron_last_time']) {
$cron = format_date($conf['cron_last_time']);
220,13 → 220,14
$cron .= l(t('system', '立即执行'), $cron_url, array('attributes' => array('target' => '_blank')));
$item[] .= dd_get_strong(t('system', '上次 CRON')) . $cron;
$item[] = dd_get_strong(t('system', '上次 CRON')) . $cron;
$item[] .= dd_get_strong(t('system', 'PHP 版本')) . PHP_VERSION. l(t('system', '查看'), 'admin/status/php');
$item[] = dd_get_strong(t('system', 'PHP 版本')) . PHP_VERSION. l(t('system', '查看'), 'admin/status/php');
$item[] .= dd_get_strong(t('system', '数据库')) . $GLOBALS['database']['default']['driver'] .' - '. db_get_version();
$item[] .= dd_get_strong(t('system', '服务器')). PHP_OS .' - ' .$_SERVER['SERVER_SOFTWARE'];
$item[] = dd_get_strong(t('system', '数据库')) . $GLOBALS['database']['default']['driver'] . ' - '. db_get_version()
. ' - ' . format_interval(db_get_uptime());
$item[] = dd_get_strong(t('system', '服务器')). PHP_OS .' - ' .$_SERVER['SERVER_SOFTWARE'] . ' - ' . exec('uptime');
 
$content = array(
'#title' => t('system', '系统信息'),
'#content' => theme('item_list', $item)