當前位置: 首頁>>代碼示例>>PHP>>正文


PHP convert::computeLapse方法代碼示例

本文整理匯總了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();
開發者ID:notzen,項目名稱:e107,代碼行數:31,代碼來源:forum_stats.php

示例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']);
     }
 }
開發者ID:notzen,項目名稱:e107,代碼行數:15,代碼來源:pm_shortcodes.php


注:本文中的convert::computeLapse方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。