Example #1
0
/**
 * 公司风采后台管理栏目修改文件
 *
 * @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);
    }
Example #2
0
/**
 * 相关新闻 列表文件
 *
 * @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);
        $strWhere = implode(" || ", $where);