本文整理汇总了PHP中convert::computeLapse方法的典型用法代码示例。如果您正苦于以下问题:PHP convert::computeLapse方法的具体用法?PHP convert::computeLapse怎么用?PHP convert::computeLapse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类convert
的用法示例。
在下文中一共展示了convert::computeLapse方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sum
$bar = file_exists(THEME . 'images/bar.png') ? THEME . 'images/bar.png' : e_PLUGIN . 'poll/images/bar.png';
require_once HEADERF;
$total_posts = $sql->db_Count('forum_post');
$total_topics = $sql->db_Count('forum_thread');
$total_replies = $total_posts - $total_topics;
$total_views = 0;
$query = 'SELECT sum(thread_views) AS total FROM `#forum_thread` ';
if ($sql->db_Select_gen($query)) {
$row = $sql->db_Fetch();
$total_views = $row['total'];
}
$firstpost = $sql->db_Select('forum_post', 'post_datestamp', 'post_datestamp > 0 ORDER BY post_datestamp ASC LIMIT 0,1', 'default');
$fp = $sql->db_Fetch();
$open_ds = $fp['post_datestamp'];
$open_date = $gen->convert_date($open_ds, 'long');
$open_since = $gen->computeLapse($open_ds);
$open_days = floor((time() - $open_ds) / 86400);
$postsperday = $open_days < 1 ? $total_posts : round($total_posts / $open_days);
$query = "SHOW TABLE STATUS FROM `{$mySQLdefaultdb}`";
$sql->db_Select_gen($query);
$array = $sql->db_getList();
foreach ($array as $table) {
if ($table['Name'] == MPREFIX . 'forum_post') {
$db_size = $e107->parseMemorySize($table['Data_length']);
$avg_row_len = $e107->parseMemorySize($table['Avg_row_length']);
break;
}
}
$query = "\nSELECT ft.thread_id, ft.thread_user, ft.thread_name, ft.thread_total_replies, ft.thread_datestamp, f.forum_class, u.user_name, u.user_id FROM #forum_thread as ft\nLEFT JOIN #user AS u ON ft.thread_user = u.user_id\nLEFT JOIN #forum AS f ON f.forum_id = ft.thread_forum_id\nWHERE ft.thread_active > 0\nAND f.forum_class IN (" . USERCLASS_LIST . ")\nORDER BY ft.thread_total_replies DESC LIMIT 0,10";
$sql->db_Select_gen($query);
$most_activeArray = $sql->db_getList();
示例2: sc_pm_read
public function sc_pm_read($parm = '')
{
if ($this->pmInfo['pm_read'] == 0) {
return LAN_PM_27;
}
if ($this->pmInfo['pm_read'] == 1) {
return LAN_PM_28;
}
require_once e_HANDLER . 'date_handler.php';
if ('lapse' != $parm) {
return convert::convert_date($this->pmInfo['pm_read'], $parm);
} else {
return convert::computeLapse($this->pmInfo['pm_read']);
}
}