* @package ArthurXF * @subpackage news_law */ require_once '../config/config.inc.php'; require_once "../class/news_law.class.php"; require_once '../..' . __WEBADMIN_ROOT . '/checklogin.php'; $objWebInit = new news_law(); //数据库连接参数 $objWebInit->setDBG($arrGPdoDB); //smarty参数 $objWebInit->arrGSmarty = $arrGSmarty; //翻页参数 $objWebInit->arrGPage = $arrGPage; //图片上传参数 $objWebInit->arrGPic = $arrGPic; $objWebInit->db(); //访问权限检查 if (!$objWebInit->checkPopedomG($_SESSION['user_id'])) { check::AlertExit('对不起,您没有权限访问此页', -1); } $arrWhere = array(); $arrLink = array(); if (isset($_GET['action'])) { if ($_GET['action'] == 'search') { // 构造搜索条件和翻页参数 $arrLink[] = 'action=search'; if ($_GET['pass'] == '1' || $_GET['pass'] == '0') { $arrWhere[] = "pass='******'pass'] . "'"; $arrLink[] = 'pass='******'pass']; } if (!empty($_GET['type_id'])) {
<?php /** * 最新新闻 列表文件 * * @author Arthur(ArthurXF@gmail.com) * @copyright (c) 2006 by bizeway.com * @version $Id$ * @package ArthurXF * @subpackage news_law */ if (is_object($objWebInit)) { if (!isset($objnews_law)) { include_once __WEB_ROOT . "/news_law/class/news_law.class.php"; include_once __WEB_ROOT . "/news_law/config/var.inc.php"; $objnews_law = new news_law(); $objnews_law->setDBG($arrGPdoDB); if (is_object($objWebInit->db)) { $objnews_law->db = $objWebInit->db; } else { $objnews_law->db(); } } $arrNewest = array(); $arrNewest = $objnews_law->getInfoList("where pass=1", " ORDER BY clicktimes DESC,submit_date DESC,recommendflag DESC,clicktimes DESC", 0, 5, true); unset($arrNewest['COUNT_ROWS']); //print_r($arrNewest); // 输出到模板 $arrMOutput["smarty_assign"]['arrNewest'] = $arrNewest; }