Exemple #1
0
<?php

/**
 * 报纸杂志 列表文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	Newspapers_magazines
 */
require_once 'config/config.inc.php';
require_once "class/Newspapers_magazines.class.php";
$objWebInit = new Newspapers_magazines();
//数据库连接参数
$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) {
    $arrTopNewspapers_magazines[$k] = array();
    if (is_array($v)) {
        $arrTopNewspapers_magazines[$k]['type_title'] = $v['type_title'];
        $arrTopNewspapers_magazines[$k]['type_id'] = $v['type_id'];
    } else {
Exemple #2
0
<?php

/**
 * 相关新闻 列表文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	Newspapers_magazines
 */
if (is_object($objWebInit)) {
    if (!isset($objNewspapers_magazines)) {
        include_once __WEB_ROOT . "/Newspapers_magazines/class/Newspapers_magazines.class.php";
        include_once __WEB_ROOT . "/Newspapers_magazines/config/var.inc.php";
        $objNewspapers_magazines = new Newspapers_magazines();
        $objNewspapers_magazines->setDBG($arrGPdoDB);
        if (is_object($objWebInit->db)) {
            $objNewspapers_magazines->db = $objWebInit->db;
        } else {
            $objNewspapers_magazines->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);
Exemple #3
0
<?php

/**
 * 公司风采后台管理栏目新增文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	Newspapers_magazines
 */
require_once '../config/config.inc.php';
require_once "../class/Newspapers_magazines.class.php";
require_once '../..' . __WEBADMIN_ROOT . '/checklogin.php';
$objWebInit = new Newspapers_magazines();
//数据库连接参数
$objWebInit->setDBG($arrGPdoDB);
//smarty参数
$objWebInit->arrGSmarty = $arrGSmarty;
//图片上传参数
$objWebInit->arrGPic = $arrGPic;
$objWebInit->db();
//访问权限检查
if (!$objWebInit->checkPopedomG($_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

/**
 * 促销产品大block文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	Newspapers_magazines
 */
if (is_object($objWebInit)) {
    if (!isset($objNewspapers_magazines)) {
        include_once __WEB_ROOT . "/Newspapers_magazines/class/Newspapers_magazines.class.php";
        include_once __WEB_ROOT . "/Newspapers_magazines/config/var.inc.php";
        $objNewspapers_magazines = new Newspapers_magazines();
        $objNewspapers_magazines->setDBG($arrGPdoDB);
        if (is_object($objWebInit->db)) {
            $objNewspapers_magazines->db = $objWebInit->db;
        } else {
            $objNewspapers_magazines->db();
        }
    }
    $arrCommendNewspapers_magazines = array();
    $intMax = $objNewspapers_magazines->getRecordsG($objNewspapers_magazines->tablename2, 'where pass=1 and recommendflag = 1');
    if ($intMax < 1) {
        $intMax = $objNewspapers_magazines->getRecordsG($objNewspapers_magazines->tablename2, 'where pass=1 and recommendflag = 0');
        if ($intMax > 10) {
            $intMax -= 10;
        }
        $arrCommendNewspapers_magazines = $objNewspapers_magazines->getInfoList('where pass=1 and recommendflag = 0', ' order by submit_date desc', rand(0, $intMax), 10);
Exemple #5
0
<?php

/**
 * 最新新闻 列表文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	Newspapers_magazines
 */
if (is_object($objWebInit)) {
    if (!isset($objNewspapers_magazines)) {
        include_once __WEB_ROOT . "/Newspapers_magazines/class/Newspapers_magazines.class.php";
        include_once __WEB_ROOT . "/Newspapers_magazines/config/var.inc.php";
        $objNewspapers_magazines = new Newspapers_magazines();
        $objNewspapers_magazines->setDBG($arrGPdoDB);
        if (is_object($objWebInit->db)) {
            $objNewspapers_magazines->db = $objWebInit->db;
        } else {
            $objNewspapers_magazines->db();
        }
    }
    $arrNewest = array();
    $arrNewest = $objNewspapers_magazines->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;
}
Exemple #6
0
<?php

/**
 * 最新报纸杂志文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	Newspapers_magazines
 */
if (is_object($objWebInit)) {
    if (!isset($objNewspapers_magazines)) {
        include_once __WEB_ROOT . "/Newspapers_magazines/class/Newspapers_magazines.class.php";
        include_once __WEB_ROOT . "/Newspapers_magazines/config/var.inc.php";
        $objNewspapers_magazines = new Newspapers_magazines();
        $objNewspapers_magazines->setDBG($arrGPdoDB);
        if (is_object($objWebInit->db)) {
            $objNewspapers_magazines->db = $objWebInit->db;
        } else {
            $objNewspapers_magazines->db();
        }
    }
    $arrTopNewspapers_magazines1 = array();
    $arrTopNewspapers_magazines1[0] = $objNewspapers_magazines->getInfoList("where type_id=1 and pass=1", "  ORDER BY recommendflag DESC,submit_date DESC", 0, 1);
    unset($arrTopNewspapers_magazines1[0]['COUNT_ROWS']);
    $arrTopNewspapers_magazines1[1] = $objNewspapers_magazines->getInfoList("where type_id=2 and pass=1", "  ORDER BY recommendflag DESC,submit_date DESC", 0, 10);
    unset($arrTopNewspapers_magazines1[1]['COUNT_ROWS']);
    $arrTopNewspapers_magazines1[2] = $objNewspapers_magazines->getInfoList("where type_id=3 and pass=1", "  ORDER BY recommendflag DESC,submit_date DESC", 0, 10);
    unset($arrTopNewspapers_magazines1[2]['COUNT_ROWS']);
    $arrTopNewspapers_magazines1[3] = $objNewspapers_magazines->getInfoList("where type_id=4 and pass=1", "  ORDER BY recommendflag DESC,submit_date DESC", 0, 10);
Exemple #7
0
<?php

/**
 * 报纸杂志后台管理栏目首页文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	Newspapers_magazines
 */
require_once '../config/config.inc.php';
require_once "../class/Newspapers_magazines.class.php";
require_once '../..' . __WEBADMIN_ROOT . '/checklogin.php';
$objWebInit = new Newspapers_magazines();
//数据库连接参数
$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'])) {
Exemple #8
0
<?php

/**
 * 报纸杂志 列表文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	Newspapers_magazines
 */
require_once 'config/config.inc.php';
require_once "class/Newspapers_magazines.class.php";
$objWebInit = new Newspapers_magazines();
//数据库连接参数
$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);
Exemple #9
0
<?php

/**
 * 报纸杂志 列表文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	Newspapers_magazines
 */
require_once 'config/config.inc.php';
require_once "class/Newspapers_magazines.class.php";
$objWebInit = new Newspapers_magazines();
//数据库连接参数
$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']);
Exemple #10
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/Newspapers_magazines.class.php';
$objWebInit = new Newspapers_magazines();
//数据库连接参数
$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'];
Exemple #11
0
<?php

/**
 * 报纸杂志后台管理栏目修改文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	Newspapers_magazines
 */
require_once '../config/config.inc.php';
require_once "../class/Newspapers_magazines.class.php";
require_once '../../useradmin/checklogin.php';
$objWebInit = new Newspapers_magazines();
//数据库连接参数
$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);
    }
Exemple #12
0
<?php

/**
 * 报纸杂志后台分类管理文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	Newspapers_magazines
 */
require_once '../config/config.inc.php';
require_once "../class/Newspapers_magazines.class.php";
require_once '../..' . __WEBADMIN_ROOT . '/checklogin.php';
$objWebInit = new Newspapers_magazines();
//数据库连接参数
$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':