Example #1
0
$getSettings = new Settings($config_setting_file_path);
$cpsub = $getSettings->getSettings();
$getLib = new Lib($cpsub['filter'], $cpsub['stripslashes']);
$getTmp = new Template($config_current_version);
// set keyword
if ($getLib->checkVal($getData['keyword'])) {
    $getKeyword = $getLib->setFilter($getData['keyword']);
    $getKeywordLink = "?keyword=" . $getKeyword . "&";
} else {
    $getKeywordLink = "?";
}
// set Article
$getArticle = new Article($config_upload_folder, $config_article_file_path, $getLib);
$page = $_GET['page'];
// get article list
$getListArray = $getArticle->getAllList("display", "id", "desc", $getKeyword);
$getListSum = count($getListArray);
// set pager
$many = $cpsub['display_num'];
$display = $cpsub['display_page_num'];
$total = $getListSum;
$pagename = "index.php" . $getKeywordLink;
$getPage = new Pager($page, $many, $display, $total, $pagename);
$pageStart = intval($getPage->startVar);
$pageMany = intval($getPage->manyVar);
// current page
$website_current_page = "首頁";
// get title
$website_title = $getLib->setFilter($cpsub['title']) . "-" . $website_current_page;
?>
Example #2
0
<?php

/**
 * Model: C.P.Sub 公告系統
 * Author: Cooltey Feng
 * Lastest Update: 2014/6/9
 */
// set Article
$getArticle = new Article($config_upload_folder, $config_article_file_path, $getLib);
$page = $_GET['page'];
// get article list
$getListArray = $getArticle->getAllList("display", "id", "desc");
$getListSum = count($getListArray);
// set pager
$many = $cpsub['display_num'];
$display = $cpsub['display_page_num'];
$total = $getListSum;
$pagename = "?p=article_list&";
$getPage = new Pager($page, $many, $display, $total, $pagename);
$pageStart = intval($getPage->startVar);
$pageMany = intval($getPage->manyVar);
?>
		<div class="panel panel-default">
			<table class="table table-hover">
			  <thead>
				<tr>
					<th width="5%">編號</th>
					<th width="55%">標題</th>
					<th width="10%">觀看次數</th>
					<th width="10%">日期</th>
					<th width="10%">發佈人</th>