Ejemplo n.º 1
0
<?php

/**
 * 户外广告 列表文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	outdoor_ad
 */
require_once 'config/config.inc.php';
require_once "class/outdoor_ad.class.php";
$objWebInit = new outdoor_ad();
//数据库连接参数
$objWebInit->setDBG($arrGPdoDB);
$objWebInit->db();
//图像参数
$objWebInit->arrGPic = $arrGPic;
//smarty参数
if ($arrGWeb['URL_static']) {
    $arrGSmarty['caching'] = false;
} else {
    $arrGSmarty['cache_lifetime'] = 3600;
}
$objWebInit->arrGSmarty = $arrGSmarty;
if ($_GET['id'] === null) {
    exit;
}
$intID = intval($_GET['id']);
$arrInfo = $objWebInit->getInfo($intID);
Ejemplo n.º 2
0
/**
 * 相关新闻 列表文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	outdoor_ad
 */
if (is_object($objWebInit)) {
    if (!isset($objoutdoor_ad)) {
        include_once __WEB_ROOT . "/outdoor_ad/class/outdoor_ad.class.php";
        include_once __WEB_ROOT . "/outdoor_ad/config/var.inc.php";
        $objoutdoor_ad = new outdoor_ad();
        $objoutdoor_ad->setDBG($arrGPdoDB);
        if (is_object($objWebInit->db)) {
            $objoutdoor_ad->db = $objWebInit->db;
        } else {
            $objoutdoor_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);