Ejemplo n.º 1
0
     $where = " classid = '" . $classid . "' and isplay = 1 ";
 }
 if (isset($filename) && !empty($filename)) {
     $where = $where . " and `classid` = '" . $info['id'] . "' ";
 }
 $pageListNum = 12;
 //每页显示
 //20120715
 if (intval($info['listnum']) > 0) {
     $pageListNum = $info['listnum'];
 }
 $totalPage = 0;
 //总页数
 $page = isset($page) ? (int) $page : 1;
 $start = ($page - 1) * $pageListNum;
 $List = $articles->GetList(array('id', 'classid', 'title', 'filename', 'addtime', 'thumb', 'intro', 'titlecolor', 'author', 'clicks', 'istop'), $start, $pageListNum, $where, 'istop desc,addtime desc,id desc');
 include WEB_INC . "page.class.php";
 $sqlNum = "select id from {tablepre}articles where " . $where;
 $db->Execute($sqlNum);
 $pageNum = $db->GetRsNum();
 $totalPage = ceil($pageNum / $pageListNum);
 //总页数
 $pages = new PageClass($page, $totalPage);
 $showpage = $pages->showPage();
 $templatefile = 'articles_list.tpl.php';
 if ($config['customtemplatemode'] == 1) {
     //==========个性化模版检测20111208===============
     $custom_templates = '';
     $custom_templates = $c . '_' . $a . '_classid_' . $info['id'] . '.tpl.php';
     if (is_file(WEB_TPL . 'custom_templates/' . $custom_templates)) {
         $templatefile = 'custom_templates/' . $custom_templates;
Ejemplo n.º 2
0
//功能部分
include WEB_MOD . 'articles.class.php';
include WEB_MOD . 'articles_class.class.php';
$articles = new Articles();
$articles_class = new Articles_class();
require_once WEB_INC . 'uclass.class.php';
$CL = new Uclass();
//
$perSiteMpasNum = 500;
$sitemapsTop = '';
$sitempasEnd = '';
$sitemapsBody = '';
$sitemapsContent = '';
$sitemapsFilename = '';
switch ($a) {
    case 'step0':
    default:
        //list
        $templatefile = 'sitemaps_step0.php';
        break;
    case 'step1':
        //
        //正式生成
        //数据初始化
        $listArticle = $articles->GetList(array('id', 'classid', 'title', 'addtime'), 0, $perSiteMpasNum, '', 'id desc');
        $sitemapsTop = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n";
        $sitemapsTop = $sitemapsTop . "<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\r\n";
        $sitemapsEnd = "</urlset>\r\n";
        $templatefile = 'sitemaps_step1.php';
        break;
}
Ejemplo n.º 3
0
* @time 20111004
*/
//初始化
$pagetitle = '首页';
$topTitle = '';
$where = '';
//功能部分
include WEB_MOD . 'articles.class.php';
include WEB_MOD . 'articles_class.class.php';
$articles = new Articles();
$articles_class = new Articles_class();
include WEB_MODULE . 'downloads/model/downloads.class.php';
include WEB_MODULE . 'downloads/model/downloads_class.class.php';
$downloads = new Downloads();
$downloads_class = new Downloads_class();
include WEB_MODULE . 'products/model/products.class.php';
include WEB_MODULE . 'products/model/products_class.class.php';
$products = new Products();
$products_class = new Products_class();
include WEB_MOD . 'ads.class.php';
include WEB_MOD . 'adflash.class.php';
$ads = new Ads();
$adflash = new Adflash();
include WEB_MOD . 'links.class.php';
$links = new Links();
//调用
$newList = $articles->GetList(array('id', 'classid', 'title', 'filename', 'addtime', 'titlecolor'), '0', '7', ' isplay = 1 ', 'addtime desc,id desc');
$hotList = $articles->GetList(array('id', 'classid', 'title', 'filename', 'addtime', 'titlecolor'), '0', '5', ' isplay = 1 and ishot = 1 ', 'id desc');
$topList = $articles->GetList(array('id', 'classid', 'title', 'filename', 'addtime', 'titlecolor'), '0', '5', ' isplay = 1 and istop = 1 ', 'id desc');
$goodList = $articles->GetList(array('id', 'classid', 'title', 'filename', 'intro', 'thumb', 'titlecolor'), '0', '5', ' isplay = 1 and isgood = 1 ', 'id desc');
$templatefile = 'index.tpl.php';
Ejemplo n.º 4
0
 case 'list':
 default:
     //list
     //列表
     if (empty($classid)) {
         $where = ' 1 = 1 ';
     } else {
         $where = " classid = '" . $classid . "' ";
     }
     $pageListNum = 12;
     //每页显示
     $totalPage = 0;
     //总页数
     $page = isset($page) ? (int) $page : 1;
     $start = ($page - 1) * $pageListNum;
     $List = $articles->GetList(array('id', 'classid', 'title', 'addtime'), $start, $pageListNum, $where, 'id desc');
     include WEB_INC . "page.class.php";
     $sqlNum = "select id from {tablepre}articles where " . $where;
     $db->Execute($sqlNum);
     $pageNum = $db->GetRsNum();
     $totalPage = ceil($pageNum / $pageListNum);
     //总页数
     $pages = new PageClass($page, $totalPage);
     $showpage = $pages->showPage();
     $templatefile = 'articles_list.tpl.php';
     break;
 case 'edit':
     //
     if (isset($submit)) {
         $info = array();
         $time = time();