コード例 #1
0
ファイル: relative.php プロジェクト: TiMoChao/lc_ad_first
/**
 * 相关新闻 列表文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	read_ad
 */
if (is_object($objWebInit)) {
    if (!isset($objread_ad)) {
        include_once __WEB_ROOT . "/read_ad/class/read_ad.class.php";
        include_once __WEB_ROOT . "/read_ad/config/var.inc.php";
        $objread_ad = new read_ad();
        $objread_ad->setDBG($arrGPdoDB);
        if (is_object($objWebInit->db)) {
            $objread_ad->db = $objWebInit->db;
        } else {
            $objread_ad->db();
        }
    }
    if (isset($arrInfo['tag']) && !empty($arrInfo['tag'])) {
        $arrTag = explode(',', $arrInfo['tag']);
        $where = array();
        foreach ($arrTag as $strTag) {
            $where[] = "'%" . $strTag . "%'";
        }
        //echo $arrInfo['id'];
        //print_r($where);
        $strWhere = implode(" || ", $where);
コード例 #2
0
ファイル: category.php プロジェクト: TiMoChao/lc_ad_first
/**
 * 阅报亭广告后台分类管理文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	read_ad
 */
require_once '../config/config.inc.php';
require_once "../class/read_ad.class.php";
require_once '../..' . __WEBADMIN_ROOT . '/checklogin.php';
$objWebInit = new read_ad();
//数据库连接参数
$objWebInit->setDBG($arrGPdoDB);
//smarty参数
$arrMOutput["template_file"] = "admin.html";
$objWebInit->arrGSmarty = $arrGSmarty;
$objWebInit->db();
//图形参数
$objWebInit->arrGPic = $arrGPic;
//访问权限检查
if (!$objWebInit->checkPopedomG($_SESSION['user_id'])) {
    check::AlertExit('对不起,您没有权限访问此页', -1);
}
if (isset($_GET['action'])) {
    switch ($_GET['action']) {
        // 显示新增页面
        case 'add':
            $arrTypeList = $objWebInit->getTypeList(null, ' order by type_id desc');