* @copyright (c) 2006 by bizeway.com * @version $Id$ * @package ArthurXF * @subpackage Community_ad */ require_once '../config/config.inc.php'; require_once "../class/Community_ad.class.php"; require_once '../..' . __WEBADMIN_ROOT . '/checklogin.php'; $objWebInit = new Community_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); } //还原图片数组 $_POST['photo'] = array(); if (!empty($_POST['savephoto'])) { foreach ($_POST['savephoto'] as $key => $val) { $arrTemp = array();
* @author Arthur(ArthurXF@gmail.com) * @copyright (c) 2006 by bizeway.com * @version $Id$ * @package ArthurXF * @subpackage Community_ad */ if (is_object($objWebInit)) { if (!isset($objCommunity_ad)) { include_once __WEB_ROOT . "/Community_ad/class/Community_ad.class.php"; include_once __WEB_ROOT . "/Community_ad/config/var.inc.php"; $objCommunity_ad = new Community_ad(); $objCommunity_ad->setDBG($arrGPdoDB); if (is_object($objWebInit->db)) { $objCommunity_ad->db = $objWebInit->db; } else { $objCommunity_ad->db(); } } $arrTopCommunity_ad1 = array(); $arrTopCommunity_ad1[0] = $objCommunity_ad->getInfoList("where type_id=1 and pass=1", " ORDER BY recommendflag DESC,submit_date DESC", 0, 1); unset($arrTopCommunity_ad1[0]['COUNT_ROWS']); $arrTopCommunity_ad1[1] = $objCommunity_ad->getInfoList("where type_id=2 and pass=1", " ORDER BY recommendflag DESC,submit_date DESC", 0, 10); unset($arrTopCommunity_ad1[1]['COUNT_ROWS']); $arrTopCommunity_ad1[2] = $objCommunity_ad->getInfoList("where type_id=3 and pass=1", " ORDER BY recommendflag DESC,submit_date DESC", 0, 10); unset($arrTopCommunity_ad1[2]['COUNT_ROWS']); $arrTopCommunity_ad1[3] = $objCommunity_ad->getInfoList("where type_id=4 and pass=1", " ORDER BY recommendflag DESC,submit_date DESC", 0, 10); unset($arrTopCommunity_ad1[3]['COUNT_ROWS']); $arrTopCommunity_ad1['FileCallPath'] = $arrGPic['FileCallPath']; //print_r($arrTopCommunity_ad1); // 输出到模板 $arrMOutput["smarty_assign"]['arrTopCommunity_ad1'] = $arrTopCommunity_ad1;