コード例 #1
0
ファイル: modifyinfo.php プロジェクト: TiMoChao/lc_ad_first
<?php

/**
 * 公司风采后台管理栏目修改文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	Planning_production
 */
require_once '../config/config.inc.php';
require_once "../class/Planning_production.class.php";
require_once '../..' . __WEBADMIN_ROOT . '/checklogin.php';
$objWebInit = new Planning_production();
//数据库连接参数
$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);
コード例 #2
0
ファイル: install.php プロジェクト: TiMoChao/lc_ad_first
<?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/Planning_production.class.php';
$objWebInit = new Planning_production();
//数据库连接参数
$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'];
コード例 #3
0
ファイル: relative.php プロジェクト: TiMoChao/lc_ad_first
<?php

/**
 * 相关新闻 列表文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	Planning_production
 */
if (is_object($objWebInit)) {
    if (!isset($objPlanning_production)) {
        include_once __WEB_ROOT . "/Planning_production/class/Planning_production.class.php";
        include_once __WEB_ROOT . "/Planning_production/config/var.inc.php";
        $objPlanning_production = new Planning_production();
        $objPlanning_production->setDBG($arrGPdoDB);
        if (is_object($objWebInit->db)) {
            $objPlanning_production->db = $objWebInit->db;
        } else {
            $objPlanning_production->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);
コード例 #4
0
ファイル: index.php プロジェクト: TiMoChao/lc_ad_first
<?php

/**
 * 策划制作后台管理栏目首页文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	Planning_production
 */
require_once '../config/config.inc.php';
require_once "../class/Planning_production.class.php";
require_once '../..' . __WEBADMIN_ROOT . '/checklogin.php';
$objWebInit = new Planning_production();
//数据库连接参数
$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'])) {
コード例 #5
0
ファイル: index.inc.php プロジェクト: TiMoChao/lc_ad_first
<?php

/**
 * 策划制作 列表文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	Planning_production
 */
require_once 'config/config.inc.php';
require_once "class/Planning_production.class.php";
$objWebInit = new Planning_production();
//数据库连接参数
$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) {
    $arrTopPlanning_production[$k] = array();
    if (is_array($v)) {
        $arrTopPlanning_production[$k]['type_title'] = $v['type_title'];
        $arrTopPlanning_production[$k]['type_id'] = $v['type_id'];
    } else {
コード例 #6
0
ファイル: category.php プロジェクト: TiMoChao/lc_ad_first
<?php

/**
 * 策划制作后台分类管理文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	Planning_production
 */
require_once '../config/config.inc.php';
require_once "../class/Planning_production.class.php";
require_once '../..' . __WEBADMIN_ROOT . '/checklogin.php';
$objWebInit = new Planning_production();
//数据库连接参数
$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':
コード例 #7
0
ファイル: newest.php プロジェクト: TiMoChao/lc_ad_first
<?php

/**
 * 最新新闻 列表文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	Planning_production
 */
if (is_object($objWebInit)) {
    if (!isset($objPlanning_production)) {
        include_once __WEB_ROOT . "/Planning_production/class/Planning_production.class.php";
        include_once __WEB_ROOT . "/Planning_production/config/var.inc.php";
        $objPlanning_production = new Planning_production();
        $objPlanning_production->setDBG($arrGPdoDB);
        if (is_object($objWebInit->db)) {
            $objPlanning_production->db = $objWebInit->db;
        } else {
            $objPlanning_production->db();
        }
    }
    $arrNewest = array();
    $arrNewest = $objPlanning_production->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;
}
コード例 #8
0
ファイル: list.inc.php プロジェクト: TiMoChao/lc_ad_first
<?php

/**
 * 策划制作 列表文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	Planning_production
 */
require_once 'config/config.inc.php';
require_once "class/Planning_production.class.php";
$objWebInit = new Planning_production();
//数据库连接参数
$objWebInit->setDBG($arrGPdoDB);
//smarty参数
$objWebInit->arrGSmarty = $arrGSmarty;
//翻页参数
$objWebInit->arrGPage = $arrGPage;
$objWebInit->db();
if (empty($_GET['page'])) {
    $intPage = 1;
} else {
    $intPage = intval($_GET['page']);
}
$arrWhere = array();
$arrLink = array();
$arrWhere[] = "pass='******'";
if (!empty($_GET['type_id'])) {
    $intTypeID = intval($_GET['type_id']);
コード例 #9
0
ファイル: detail.inc.php プロジェクト: TiMoChao/lc_ad_first
<?php

/**
 * 策划制作 列表文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	Planning_production
 */
require_once 'config/config.inc.php';
require_once "class/Planning_production.class.php";
$objWebInit = new Planning_production();
//数据库连接参数
$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);
コード例 #10
0
<?php

/**
 * 促销产品大block文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	Planning_production
 */
if (is_object($objWebInit)) {
    if (!isset($objPlanning_production)) {
        include_once __WEB_ROOT . "/Planning_production/class/Planning_production.class.php";
        include_once __WEB_ROOT . "/Planning_production/config/var.inc.php";
        $objPlanning_production = new Planning_production();
        $objPlanning_production->setDBG($arrGPdoDB);
        if (is_object($objWebInit->db)) {
            $objPlanning_production->db = $objWebInit->db;
        } else {
            $objPlanning_production->db();
        }
    }
    $arrCommendPlanning_production = array();
    $intMax = $objPlanning_production->getRecordsG($objPlanning_production->tablename2, 'where pass=1 and recommendflag = 1');
    if ($intMax < 1) {
        $intMax = $objPlanning_production->getRecordsG($objPlanning_production->tablename2, 'where pass=1 and recommendflag = 0');
        if ($intMax > 10) {
            $intMax -= 10;
        }
        $arrCommendPlanning_production = $objPlanning_production->getInfoList('where pass=1 and recommendflag = 0', ' order by submit_date desc', rand(0, $intMax), 10);
コード例 #11
0
ファイル: top_index.php プロジェクト: TiMoChao/lc_ad_first
<?php

/**
 * 最新策划制作文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	Planning_production
 */
if (is_object($objWebInit)) {
    if (!isset($objPlanning_production)) {
        include_once __WEB_ROOT . "/Planning_production/class/Planning_production.class.php";
        include_once __WEB_ROOT . "/Planning_production/config/var.inc.php";
        $objPlanning_production = new Planning_production();
        $objPlanning_production->setDBG($arrGPdoDB);
        if (is_object($objWebInit->db)) {
            $objPlanning_production->db = $objWebInit->db;
        } else {
            $objPlanning_production->db();
        }
    }
    $arrTopPlanning_production1 = array();
    $arrTopPlanning_production1[0] = $objPlanning_production->getInfoList("where type_id=1 and pass=1", "  ORDER BY recommendflag DESC,submit_date DESC", 0, 1);
    unset($arrTopPlanning_production1[0]['COUNT_ROWS']);
    $arrTopPlanning_production1[1] = $objPlanning_production->getInfoList("where type_id=2 and pass=1", "  ORDER BY recommendflag DESC,submit_date DESC", 0, 10);
    unset($arrTopPlanning_production1[1]['COUNT_ROWS']);
    $arrTopPlanning_production1[2] = $objPlanning_production->getInfoList("where type_id=3 and pass=1", "  ORDER BY recommendflag DESC,submit_date DESC", 0, 10);
    unset($arrTopPlanning_production1[2]['COUNT_ROWS']);
    $arrTopPlanning_production1[3] = $objPlanning_production->getInfoList("where type_id=4 and pass=1", "  ORDER BY recommendflag DESC,submit_date DESC", 0, 10);
コード例 #12
0
ファイル: modifyinfo.php プロジェクト: TiMoChao/lc_ad_first
<?php

/**
 * 策划制作后台管理栏目修改文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	Planning_production
 */
require_once '../config/config.inc.php';
require_once "../class/Planning_production.class.php";
require_once '../../useradmin/checklogin.php';
$objWebInit = new Planning_production();
//数据库连接参数
$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);
    }