跳至主要內容
:::

5-3-3 加入分頁

一、安裝分頁物件

  1. 分頁功能不算難,但有點複雜,因此,建議直接用現成物件來實做即可
  2. 官網:https://github.com/yidas/php-pagination
  3. 安裝 php-pagination 物件按 Ctrl+` 開啟終端機,並貼上以下指令執行之 : :
    composer require yidas/pagination

     

二、使用分頁物件

  1. 修改 index.php,先 use 該物件,use 的目的只是可以用比較簡短的方式來呼叫物件。
    <?php
    use yidas\data\Pagination;

     

  2. 一般來說要用分頁,得知道幾個數據:
    1. $totalCount:資料總筆數,需要自己寫程式去計算(此物件需要 totalCount 參數,名稱不能改)
    2. $perPage:每頁要呈現幾筆,可直接在 config.php 加個設定(此物件需要 perPage 參數,名稱不能改)
    3. $page:現在在那一頁?此值應該會從網址傳進來,預設應為 1(此物件會自己抓設定,無須我們自行處理)

三、設定每頁要呈現幾筆

  1. 我們先修改 config.php,多一個「每頁顯示文章數」的設定,方便日後調整,暫時預設為 3 筆
    // 每頁顯示文章數
    $perPage = 3;
    

     

四、取得總筆數並產生分頁物件以取得資料

  1. 修改 index.php,在讀出文章之前,先來處理分頁的部份。首先要抓出文章總數 $total,分頁工具才能用它來計算出頁數
    <?php
    use yidas\data\Pagination;
    require_once 'header.php';
    
    // 計算總資料數
    try {
        $stmt = $pdo->prepare('SELECT count(*) FROM `news`');
        $stmt->execute();
        list($totalCount) = $stmt->fetch(PDO::FETCH_NUM);
    } catch (PDOException $e) {
        die("計算總資料數失敗:" . $e->getMessage());
    }

     

  2. 接著利用總筆數,來產生分頁物件
    // 產生分頁物件
    $pagination = new Pagination(['totalCount' => $totalCount, 'perPage' => $perPage]);

     

  3. 利用分頁物件取得起始資料數 $pagination->offset 及抓取筆數 $pagination->limit,便可利用資料庫的 LIMIT 來取得此範圍內的所有文章
    try {
        // 準備SQL語句
        $sql = "SELECT * FROM `news` ORDER BY `date` DESC LIMIT ?, ?";
    
        // 預備語句
        $stmt = $pdo->prepare($sql);
    
        // 綁定參數並執行語句
        $stmt->execute([$pagination->offset, $pagination->limit]);
        $all_news = [];
        $news = $stmt->fetchAll();
        foreach ($news as $row) {
            $media = $row['media'];
            unset($row['media']);
            $row = array_map('htmlspecialchars', $row);
            $row['files'] = json_decode($media, true);
            $all_news[] = $row;
        }
        $smarty->assign('all_news', $all_news);
    
    } catch (PDOException $e) {
        echo "資料庫連接錯誤:" . $e->getMessage();
    }

     

五、產生分頁工具列

  1. 分頁工具列需由 yidas\widgets\Pagination 的物件來產生。
  2. 我們只接用該物件的靜態方法 ::widget() 將分頁物件丟進去即可產生
    // 計算總資料數
    try {
        $stmt = $pdo->prepare('SELECT count(*) FROM `news`');
        $stmt->execute();
        list($totalCount) = $stmt->fetch(PDO::FETCH_NUM);
        // 產生分頁物件
        $pagination = new Pagination(['totalCount' => $totalCount, 'perPage' => $perPage]);
        // 產生分頁工具列
        $paginator = yidas\widgets\Pagination::widget(['pagination' => $pagination]);
        $smarty->assign('paginator', $paginator);
    } catch (PDOException $e) {
        die("計算總資料數失敗:" . $e->getMessage());
    }

    最後記得將之送至樣板

  3. 修改 index_content.tpl,在最下方加入分頁工具列:
    {foreach $all_news as $news}
        <div class="row">
            <div class="col-md-9">
                <h3><a href="index.php?op=show&id={$news.id}">{$news.title}</a></h3>
                <p>{$news.author}</p>
                <p>{$news.date} 點閱數:{$news.views}</p>
                <p>{$news.content|truncate:180:"..."}</p>
            </div>
            <div class="col-md-3">
                {if is_file(reset($news.files))}
                    <img src="{reset($news.files)}" alt="" class="img-thumbnail"
                    style="object-fit: cover; width: 100%; height: 200px;">
                {else}
                    <img src="https://picsum.photos/seed/picsum/400/400" alt="" class="img-thumbnail"
                    style="object-fit: cover; width: 100%; height: 200px;">
                {/if}
            </div>
        </div>
    {/foreach}
    {$paginator}

     

  4. 最後看起來像這樣(慘不忍睹,但有出現了):

 


:::

書籍目錄

展開 | 闔起

快速登入


https%3A%2F%2Fcampus-xoops.tn.edu.tw%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbdsn%3D1837%26tbsn%3D52

計數器

今天: 453453453
昨天: 4310431043104310
總計: 9137624913762491376249137624913762491376249137624
全部 錯誤訊息 (71) 已棄用 (0) 資料庫語法 (39) 區塊 (9) 額外資訊 (2) 計時(6)
錯誤訊息
未知: Creation of dynamic property Smarty_Internal_Extension_Handler::$assignByRef is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_extension_handler.php 列 182
未知: Creation of dynamic property Smarty_Internal_Extension_Handler::$loadPlugin is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_extension_handler.php 列 182
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Extension_Handler::$_foreach is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_extension_handler.php 列 182
未知: Creation of dynamic property Smarty_Variable::$do_else is deprecated 在檔案中的第 /www/wwwroot/campus/xoops_data/caches/smarty_compile/e5b8b7fe_logcounterx_school2022_default^82ef57587fa6739f25bec43c4a8b75b0fec1cb14_0.db.lcxblockdisplay.html.php 列 27
未知: Creation of dynamic property Smarty_Variable::$do_else is deprecated 在檔案中的第 /www/wwwroot/campus/xoops_data/caches/smarty_compile/e5b8b7fe_logcounterx_school2022_default^82ef57587fa6739f25bec43c4a8b75b0fec1cb14_0.db.lcxblockdisplay.html.php 列 42
未知: Creation of dynamic property Smarty_Variable::$do_else is deprecated 在檔案中的第 /www/wwwroot/campus/xoops_data/caches/smarty_compile/e5b8b7fe_logcounterx_school2022_default^82ef57587fa6739f25bec43c4a8b75b0fec1cb14_0.db.lcxblockdisplay.html.php 列 42
未知: Creation of dynamic property Smarty_Variable::$do_else is deprecated 在檔案中的第 /www/wwwroot/campus/xoops_data/caches/smarty_compile/e5b8b7fe_logcounterx_school2022_default^82ef57587fa6739f25bec43c4a8b75b0fec1cb14_0.db.lcxblockdisplay.html.php 列 42
未知: Creation of dynamic property XoopsModules/Tadtools/Dtree::$title_opt is deprecated 在檔案中的第 /modules/tadtools/class/Dtree.php 列 16
未知: Creation of dynamic property XoopsModules/Tadtools/Dtree::$cate_opt is deprecated 在檔案中的第 /modules/tadtools/class/Dtree.php 列 17
未知: Creation of dynamic property XoopsModules/Tadtools/Dtree::$url_opt is deprecated 在檔案中的第 /modules/tadtools/class/Dtree.php 列 18
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
警告: Undefined array key 2 在檔案中的第 /modules/tad_login/blocks/tad_login.php 列 22
警告: Undefined array key 2 在檔案中的第 /modules/tad_login/blocks/tad_login.php 列 56
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Variable::$do_else is deprecated 在檔案中的第 /www/wwwroot/campus/xoops_data/caches/smarty_compile/e5b8b7fe_tad_login_school2022_default^9a36fe6b7ef2d97043df58e0037061e72053376e_0.db.tadlogin.tpl.php 列 27
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Extension_Handler::$getTemplateVars is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_extension_handler.php 列 182
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Variable::$do_else is deprecated 在檔案中的第 /www/wwwroot/campus/xoops_data/caches/smarty_compile/e5b8b7fe_tad_book3_school2022_default^84539fe8acd40c5f378f06891603c382520ffd84_0.file.theme_css_blocks.tpl.php 列 25
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Variable::$do_else is deprecated 在檔案中的第 /www/wwwroot/campus/xoops_data/caches/smarty_compile/e5b8b7fe_tad_book3_school2022_default^8769a883ca1ac623e41162c9d54b2ce8411757a6_0.file.menu_my.tpl.php 列 25
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
警告: Undefined array key "tlogin" 在檔案中的第 /www/wwwroot/campus/xoops_data/caches/smarty_compile/e5b8b7fe_tad_book3_school2022_default^4b700abaeaf1cda7df0a719b7b2be562ca91d32a_0.file.menu_login.tpl.php 列 102
警告: Attempt to read property "value" on null 在檔案中的第 /www/wwwroot/campus/xoops_data/caches/smarty_compile/e5b8b7fe_tad_book3_school2022_default^4b700abaeaf1cda7df0a719b7b2be562ca91d32a_0.file.menu_login.tpl.php 列 102
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Variable::$do_else is deprecated 在檔案中的第 /www/wwwroot/campus/xoops_data/caches/smarty_compile/e5b8b7fe_tad_book3_school2022_default^eeb059e288a364212fc4e3c5217e3ce0a98cc7cf_0.file.leftBlock.tpl.php 列 50
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Variable::$do_else is deprecated 在檔案中的第 /www/wwwroot/campus/xoops_data/caches/smarty_compile/e5b8b7fe_tad_book3_school2022_default^595b03a20f1630ce88f70eb9ec2ebfacab28ac31_0.file.rightBlock.tpl.php 列 27
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Variable::$do_else is deprecated 在檔案中的第 /www/wwwroot/campus/xoops_data/caches/smarty_compile/e5b8b7fe_tad_book3_school2022_default^c3b372c147783809409e53366a84afc38a02d392_0.file.footerBlock.tpl.php 列 51
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
未知: Creation of dynamic property Smarty_Internal_Template::$compiled is deprecated 在檔案中的第 /class/libraries/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php 列 719
已棄用
資料庫語法
0.000055 - SET SQL_BIG_SELECTS = 1
0.000390 - SELECT * FROM config WHERE (`conf_modid` = '0' AND `conf_catid` = '1') ORDER BY conf_order ASC
0.000832 - SELECT sess_data, sess_ip FROM session WHERE sess_id = 'ajhckm1r2nf1mklbb50qftos42'
0.000513 - SELECT COUNT(*) FROM group_permission WHERE (`gperm_modid` = '1' AND (`gperm_groupid` = '3') AND `gperm_name` = 'module_read' AND `gperm_itemid` = '31')
0.000875 - SELECT * FROM config WHERE (`conf_modid` = '31') ORDER BY conf_order ASC
0.000643 - SELECT * FROM config WHERE (`conf_modid` = '0' AND `conf_catid` = '5') ORDER BY conf_order ASC
0.000383 - SELECT * FROM config WHERE (`conf_modid` = '0' AND `conf_catid` = '3') ORDER BY conf_order ASC
0.001719 - SELECT DISTINCT gperm_itemid FROM group_permission WHERE gperm_name = 'block_read' AND gperm_modid = 1 AND gperm_groupid IN (3)
0.000562 - SELECT b.* FROM newblocks b, block_module_link m WHERE m.block_id=b.bid AND b.isactive=1 AND b.visible=1 AND m.module_id IN (0,31) AND b.bid IN (1,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,179,178,98,97,150,177,78,176,99,94,175,59,96,173,67,83,84,85,86,87,170,88,154,171,90,91,93,168,95,100,104,3,102,107,111,112,113,114,115,116,117,122,130,131,139,140,141,144,174,147,148,149,151,152,153,160,161,162,163,164) ORDER BY b.weight, m.block_id
0.001259 - SELECT cfgname, cfgvalue FROM logcounterx_cfg
0.018064 - DELETE FROM logcounterx_ip WHERE acctime < 1773173427
0.007585 - SELECT accip FROM logcounterx_ip WHERE accip = '216.73.216.210'
0.000698 - UPDATE logcounterx_ip SET acctime = 1773174027 WHERE accip = '216.73.216.210'
0.000298 - SELECT f.*, s.tpl_source FROM tplfile f LEFT JOIN tplsource s ON s.tpl_id=f.tpl_id WHERE (`tpl_tplset` = 'default' AND `tpl_file` = 'system_block_dummy.tpl') ORDER BY tpl_refid
0.000279 - SELECT f.*, s.tpl_source FROM tplfile f LEFT JOIN tplsource s ON s.tpl_id=f.tpl_id WHERE (`tpl_tplset` = 'default' AND `tpl_file` = 'tadtools_qrcode_block.tpl') ORDER BY tpl_refid
0.000542 - SELECT cfgname, cfgvalue FROM logcounterx_cfg
0.000154 - SELECT cnt FROM logcounterx_count WHERE ymd = '2026-03-11'
0.000562 - SELECT cnt FROM logcounterx_count WHERE ymd = '2026-03-10'
0.000155 - SELECT cnt FROM logcounterx_count WHERE (ymd = '1111-11-11') OR (ymd = '1111/11/11')
0.000648 - SELECT f.*, s.tpl_source FROM tplfile f LEFT JOIN tplsource s ON s.tpl_id=f.tpl_id WHERE (`tpl_tplset` = 'default' AND `tpl_file` = 'lcx_block_display.html') ORDER BY tpl_refid
0.000840 - SELECT f.*, s.tpl_source FROM tplfile f LEFT JOIN tplsource s ON s.tpl_id=f.tpl_id WHERE (`tpl_tplset` = 'default' AND `tpl_file` = 'tad_book3_block_index.tpl') ORDER BY tpl_refid
0.000277 - SELECT * FROM config WHERE (`conf_modid` = '37') ORDER BY conf_order ASC
0.003721 - SELECT f.*, s.tpl_source FROM tplfile f LEFT JOIN tplsource s ON s.tpl_id=f.tpl_id WHERE (`tpl_tplset` = 'default' AND `tpl_file` = 'tad_login.tpl') ORDER BY tpl_refid
0.001283 - SELECT COUNT(*) FROM group_permission WHERE (`gperm_modid` = '33' AND (`gperm_groupid` = '3') AND `gperm_name` = 'forum_read')
0.003056 - SELECT f.*, s.tpl_source FROM tplfile f LEFT JOIN tplsource s ON s.tpl_id=f.tpl_id WHERE (`tpl_tplset` = 'default' AND `tpl_file` = 'tad_discuss_cbox.tpl') ORDER BY tpl_refid
0.001860 - SELECT f.*, s.tpl_source FROM tplfile f LEFT JOIN tplsource s ON s.tpl_id=f.tpl_id WHERE (`tpl_tplset` = 'default' AND `tpl_file` = 'system_block_search.tpl') ORDER BY tpl_refid
0.002936 - SELECT `conf_value` FROM `config` WHERE `conf_name` = 'allow_register'
0.000255 - SELECT `mid`, `name`, `dirname` FROM `modules` WHERE `isactive` = 1 AND `hasmain` = 1 AND `weight` != 0 ORDER BY `weight`
0.000656 - SELECT `conf_value` FROM `config` WHERE `conf_title` = '_MD_AM_DEBUGMODE'
0.001484 - SELECT COUNT(*) FROM `priv_msgs` WHERE `to_userid` = 0 AND `read_msg`=0 GROUP BY `to_userid`
0.000795 - SELECT `menuid`, `itemname`, `itemurl`, `target`, `icon`, `link_cate_name`, `link_cate_sn`, `read_group`, `of_level` FROM `tad_themes_menu` WHERE `status` = 1 ORDER BY `of_level`, `position`
0.000830 - desc `tad_book3_data_center` `sort`
0.003358 - select `col_sn`,`data_name`,`data_sort`, `data_value` from `tad_book3_data_center` where `mid`= '31' and `col_name`='read_tbdsn_date' and `col_sn`='1837' order by `sort` , `data_sort`
0.000288 - SELECT * FROM config WHERE (`conf_modid` = '3') ORDER BY conf_order ASC
0.001353 - desc `tad_book3_data_center` `sort`
0.003155 - select `col_sn`,`data_name`,`data_sort`, `data_value` from `tad_book3_data_center` where `mid`= '31' and `col_name`='video_tbdsn_date' and `col_sn`='1837' order by `sort` , `data_sort`
0.000538 - SELECT `groupid`,`name` FROM `groups`
0.003454 - SELECT `tt_theme`,`tt_use_bootstrap`,`tt_bootstrap_color`,`tt_theme_kind` FROM `tadtools_setup` WHERE `tt_theme` = 'school2022'
0.000404 - SELECT f.*, s.tpl_source FROM tplfile f LEFT JOIN tplsource s ON s.tpl_id=f.tpl_id WHERE (`tpl_tplset` = 'default' AND `tpl_file` = 'tadbook3_index.tpl') ORDER BY tpl_refid
總計: 39
區塊
紀錄區塊: 沒有快取
自訂區塊(HTML): 沒有快取
本頁面行動條碼: 沒有快取
自訂區塊(HTML): 沒有快取
計數器: 沒有快取
書籍目錄: 沒有快取
快速登入: 沒有快取
即時留言簿: 沒有快取
搜尋: 沒有快取
總計: 9
額外資訊
包含檔案: 261 檔案
使用記憶體: 1778752 bytes
計時
XOOPS 使用 0.246 秒來載入。
XOOPS Boot 使用 0.032 秒來載入。
Module init 使用 0.005 秒來載入。
XOOPS output init 使用 0.148 秒來載入。
Module display 使用 0.053 秒來載入。
Page rendering 使用 0.008 秒來載入。