Esempio n. 1
0
<?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/Community_ad.class.php';
$objWebInit = new Community_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'];
Esempio n. 2
0
<?php

/**
 * 公司风采后台管理栏目修改文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @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);
Esempio n. 3
0
<?php

/**
 * 小区广告 列表文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @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";
$objWebInit = new Community_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) {
    $arrTopCommunity_ad[$k] = array();
    if (is_array($v)) {
        $arrTopCommunity_ad[$k]['type_title'] = $v['type_title'];
        $arrTopCommunity_ad[$k]['type_id'] = $v['type_id'];
    } else {
Esempio n. 4
0
<?php

/**
 * 小区广告后台管理栏目首页文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @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->arrGPage = $arrGPage;
//图片上传参数
$objWebInit->arrGPic = $arrGPic;
$objWebInit->db();
//访问权限检查
if (!$objWebInit->checkPopedomG($_SESSION['user_id'])) {
    check::AlertExit('对不起,您没有权限访问此页', -1);
}
$arrWhere = array();
$arrLink = array();
if (isset($_GET['action'])) {
Esempio n. 5
0
<?php

/**
 * 小区广告 列表文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @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";
$objWebInit = new Community_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 {
Esempio n. 6
0
<?php

/**
 * 最新小区广告文件
 *
 * @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);
Esempio n. 7
0
<?php

/**
 * 小区广告 列表文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @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";
$objWebInit = new Community_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);
Esempio n. 8
0
<?php

/**
 * 最新新闻 列表文件
 *
 * @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();
        }
    }
    $arrNewest = array();
    $arrNewest = $objCommunity_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;
}
Esempio n. 9
0
<?php

/**
 * 小区广告后台分类管理文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @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参数
$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':
Esempio n. 10
0
<?php

/**
 * 小区广告后台管理栏目新增文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @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 '../../useradmin/checklogin.php';
$objWebInit = new Community_ad();
//数据库连接参数
$objWebInit->setDBG($arrGPdoDB);
//smarty参数
$objWebInit->arrGSmarty = $arrGSmarty;
//图片上传参数
$objWebInit->arrGPic = $arrGPic;
$objWebInit->db();
//print_r($_POST);exit;
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if (empty($_POST['submitpass']) || $_POST['submitpass'] != $_SESSION['submitpasskey']) {
        exit;
    }
    if (empty($_POST['type_id']) || empty($_POST['title']) || empty($_POST['intro'])) {
        check::AlertExit("错误:有必填选项没填!", -1);
    }
    $arrTemp = explode('|', $_POST['type_id']);
Esempio n. 11
0
<?php

/**
 * 促销产品大block文件
 *
 * @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();
        }
    }
    $arrCommendCommunity_ad = array();
    $intMax = $objCommunity_ad->getRecordsG($objCommunity_ad->tablename2, 'where pass=1 and recommendflag = 1');
    if ($intMax < 1) {
        $intMax = $objCommunity_ad->getRecordsG($objCommunity_ad->tablename2, 'where pass=1 and recommendflag = 0');
        if ($intMax > 10) {
            $intMax -= 10;
        }
        $arrCommendCommunity_ad = $objCommunity_ad->getInfoList('where pass=1 and recommendflag = 0', ' order by submit_date desc', rand(0, $intMax), 10);