<?php /** * 公司风采后台管理栏目修改文件 * * @author Arthur(ArthurXF@gmail.com) * @copyright (c) 2006 by bizeway.com * @version $Id$ * @package ArthurXF * @subpackage shelter_ad */ require_once '../config/config.inc.php'; require_once "../class/shelter_ad.class.php"; require_once '../..' . __WEBADMIN_ROOT . '/checklogin.php'; $objWebInit = new shelter_ad(); //数据库连接参数 $objWebInit->setDBG($arrGPdoDB); //smarty参数 $objWebInit->arrGSmarty = $arrGSmarty; //图片上传参数 $objWebInit->arrGPic = $arrGPic; $objWebInit->db(); //访问权限检查 if (!$objWebInit->checkPopedomG($_SESSION['user_id'])) { check::AlertExit('对不起,您没有权限访问此页', -1); } // 取得文章信息 $arrInfo = $objWebInit->getInfo($_REQUEST['id']); if ($_SERVER["REQUEST_METHOD"] == "POST") { if (empty($_POST['type_id']) || empty($_POST['title']) || empty($_POST['intro'])) { check::AlertExit("错误:有必填选项没填!", -1);
<?php /** * 相关新闻 列表文件 * * @author Arthur(ArthurXF@gmail.com) * @copyright (c) 2006 by bizeway.com * @version $Id$ * @package ArthurXF * @subpackage shelter_ad */ if (is_object($objWebInit)) { if (!isset($objshelter_ad)) { include_once __WEB_ROOT . "/shelter_ad/class/shelter_ad.class.php"; include_once __WEB_ROOT . "/shelter_ad/config/var.inc.php"; $objshelter_ad = new shelter_ad(); $objshelter_ad->setDBG($arrGPdoDB); if (is_object($objWebInit->db)) { $objshelter_ad->db = $objWebInit->db; } else { $objshelter_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);
<?php /** * 促销产品大block文件 * * @author Arthur(ArthurXF@gmail.com) * @copyright (c) 2006 by bizeway.com * @version $Id$ * @package ArthurXF * @subpackage shelter_ad */ if (is_object($objWebInit)) { if (!isset($objshelter_ad)) { include_once __WEB_ROOT . "/shelter_ad/class/shelter_ad.class.php"; include_once __WEB_ROOT . "/shelter_ad/config/var.inc.php"; $objshelter_ad = new shelter_ad(); $objshelter_ad->setDBG($arrGPdoDB); if (is_object($objWebInit->db)) { $objshelter_ad->db = $objWebInit->db; } else { $objshelter_ad->db(); } } $arrCommendshelter_ad = array(); $intMax = $objshelter_ad->getRecordsG($objshelter_ad->tablename2, 'where pass=1 and recommendflag = 1'); if ($intMax < 1) { $intMax = $objshelter_ad->getRecordsG($objshelter_ad->tablename2, 'where pass=1 and recommendflag = 0'); if ($intMax > 10) { $intMax -= 10; } $arrCommendshelter_ad = $objshelter_ad->getInfoList('where pass=1 and recommendflag = 0', ' order by submit_date desc', rand(0, $intMax), 10);
<?php /** * 候车亭广告后台管理栏目修改文件 * * @author Arthur(ArthurXF@gmail.com) * @copyright (c) 2006 by bizeway.com * @version $Id$ * @package ArthurXF * @subpackage shelter_ad */ require_once '../config/config.inc.php'; require_once "../class/shelter_ad.class.php"; require_once '../../useradmin/checklogin.php'; $objWebInit = new shelter_ad(); //数据库连接参数 $objWebInit->setDBG($arrGPdoDB); //smarty参数 $objWebInit->arrGSmarty = $arrGSmarty; //图片上传参数 $objWebInit->arrGPic = $arrGPic; $objWebInit->db(); // 取得文章信息 $arrInfo = $objWebInit->getInfo($_GET['id']); if ($arrInfo['user_id'] != $_SESSION['user_id']) { check::AlertExit("错误:此信息不是您发布的,您无权修改!", -1); } if ($_SERVER["REQUEST_METHOD"] == "POST") { if (empty($_POST['type_id']) || empty($_POST['title']) || empty($_POST['intro'])) { check::AlertExit("错误:有必填选项没填!", -1); }
<?php /* * 候车亭广告数据库安装文件 * * @author Arthur(ArthurXF@gmail.com) * @copyright (c) 2006 by bizeway.com * @version $Id$ * modified 2009-1-3 */ include_once dirname(__FILE__) . '/config/config.inc.php'; include_once dirname(__FILE__) . '/class/shelter_ad.class.php'; $objWebInit = new shelter_ad(); //数据库连接参数 $objWebInit->setDBG($arrGPdoDB); //smarty参数 $objWebInit->arrGSmarty = $arrGSmarty; $objWebInit->db(); if (empty($charset)) { $charset = str_replace('-', '', $arrGWeb['charset']); } if (empty($charset)) { $extend = $objWebInit->db->getAttribute(PDO::ATTR_SERVER_VERSION) > '4.1' ? " DEFAULT CHARSET={$charset} " : ""; } $intDbSummaryLen = $arrGWeb['db_summary_len']; //写入频道数组 if (empty($strWEB_ROOT_pre)) { $strWEB_ROOT_pre = $arrGWeb['WEB_ROOT_pre']; } if (empty($strWEBADMIN_ROOT)) { $strWEBADMIN_ROOT = $arrGWeb['WEBADMIN_ROOT'];
<?php /** * 候车亭广告 列表文件 * * @author Arthur(ArthurXF@gmail.com) * @copyright (c) 2006 by bizeway.com * @version $Id$ * @package ArthurXF * @subpackage shelter_ad */ require_once 'config/config.inc.php'; require_once "class/shelter_ad.class.php"; $objWebInit = new shelter_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);
<?php /** * 候车亭广告 列表文件 * * @author Arthur(ArthurXF@gmail.com) * @copyright (c) 2006 by bizeway.com * @version $Id$ * @package ArthurXF * @subpackage shelter_ad */ require_once 'config/config.inc.php'; require_once "class/shelter_ad.class.php"; $objWebInit = new shelter_ad(); //数据库连接参数 $objWebInit->setDBG($arrGPdoDB); //smarty参数 $arrGSmarty['caching'] = false; $objWebInit->arrGSmarty = $arrGSmarty; //翻页参数 $objWebInit->arrGPage = $arrGPage; $objWebInit->db(); $arrWhere = array(); $arrLink = array(); $arrWhere[] = "pass='******'"; $strLink = ''; $isGo = false; if (empty($_GET['page'])) { $isGo = true; $intPage = 1; } else {
<?php /** * 候车亭广告 列表文件 * * @author Arthur(ArthurXF@gmail.com) * @copyright (c) 2006 by bizeway.com * @version $Id$ * @package ArthurXF * @subpackage shelter_ad */ require_once 'config/config.inc.php'; require_once "class/shelter_ad.class.php"; $objWebInit = new shelter_ad(); //数据库连接参数 $objWebInit->setDBG($arrGPdoDB); //smarty参数 $objWebInit->arrGSmarty = $arrGSmarty; //翻页参数 $objWebInit->arrGPage = $arrGPage; $objWebInit->db(); if (!is_array($arrMType) || empty($arrMType)) { $arrMType = $objWebInit->getTypeList(); $arrMType = $objWebInit->formatTypeList(0, $arrMType); } foreach ($arrMType as $k => $v) { $arrTopshelter_ad[$k] = array(); if (is_array($v)) { $arrTopshelter_ad[$k]['type_title'] = $v['type_title']; $arrTopshelter_ad[$k]['type_id'] = $v['type_id']; } else {
<?php /** * 最新候车亭广告文件 * * @author Arthur(ArthurXF@gmail.com) * @copyright (c) 2006 by bizeway.com * @version $Id$ * @package ArthurXF * @subpackage shelter_ad */ if (is_object($objWebInit)) { if (!isset($objshelter_ad)) { include_once __WEB_ROOT . "/shelter_ad/class/shelter_ad.class.php"; include_once __WEB_ROOT . "/shelter_ad/config/var.inc.php"; $objshelter_ad = new shelter_ad(); $objshelter_ad->setDBG($arrGPdoDB); if (is_object($objWebInit->db)) { $objshelter_ad->db = $objWebInit->db; } else { $objshelter_ad->db(); } } $arrTopshelter_ad1 = array(); $arrTopshelter_ad1[0] = $objshelter_ad->getInfoList("where type_id=1 and pass=1", " ORDER BY recommendflag DESC,submit_date DESC", 0, 1); unset($arrTopshelter_ad1[0]['COUNT_ROWS']); $arrTopshelter_ad1[1] = $objshelter_ad->getInfoList("where type_id=2 and pass=1", " ORDER BY recommendflag DESC,submit_date DESC", 0, 10); unset($arrTopshelter_ad1[1]['COUNT_ROWS']); $arrTopshelter_ad1[2] = $objshelter_ad->getInfoList("where type_id=3 and pass=1", " ORDER BY recommendflag DESC,submit_date DESC", 0, 10); unset($arrTopshelter_ad1[2]['COUNT_ROWS']); $arrTopshelter_ad1[3] = $objshelter_ad->getInfoList("where type_id=4 and pass=1", " ORDER BY recommendflag DESC,submit_date DESC", 0, 10);
<?php /** * 候车亭广告后台分类管理文件 * * @author Arthur(ArthurXF@gmail.com) * @copyright (c) 2006 by bizeway.com * @version $Id$ * @package ArthurXF * @subpackage shelter_ad */ require_once '../config/config.inc.php'; require_once "../class/shelter_ad.class.php"; require_once '../..' . __WEBADMIN_ROOT . '/checklogin.php'; $objWebInit = new shelter_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':
<?php /** * 最新新闻 列表文件 * * @author Arthur(ArthurXF@gmail.com) * @copyright (c) 2006 by bizeway.com * @version $Id$ * @package ArthurXF * @subpackage shelter_ad */ if (is_object($objWebInit)) { if (!isset($objshelter_ad)) { include_once __WEB_ROOT . "/shelter_ad/class/shelter_ad.class.php"; include_once __WEB_ROOT . "/shelter_ad/config/var.inc.php"; $objshelter_ad = new shelter_ad(); $objshelter_ad->setDBG($arrGPdoDB); if (is_object($objWebInit->db)) { $objshelter_ad->db = $objWebInit->db; } else { $objshelter_ad->db(); } } $arrNewest = array(); $arrNewest = $objshelter_ad->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; }
<?php /** * 候车亭广告后台管理栏目首页文件 * * @author Arthur(ArthurXF@gmail.com) * @copyright (c) 2006 by bizeway.com * @version $Id$ * @package ArthurXF * @subpackage shelter_ad */ require_once '../config/config.inc.php'; require_once "../class/shelter_ad.class.php"; require_once '../..' . __WEBADMIN_ROOT . '/checklogin.php'; $objWebInit = new shelter_ad(); //数据库连接参数 $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'])) {