Example #1
0
/**
 * 首页滑动图片后台管理栏目新增文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	bulletin
 */
require_once '../config/config.inc.php';
require_once "../class/xingfu_pic.class.php";
require_once '../..' . __WEBADMIN_ROOT . '/checklogin.php';
$objWebInit = new xingfu_pic();
$objWebInit->db();
//访问权限检查
if (!$objWebInit->checkPopedomG($_SESSION['user_id'], 'r')) {
    check::AlertExit('对不起,您没有读权限', -1);
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if (empty($_POST['type_id']) || empty($_POST['title']) || empty($_POST['intro'])) {
        check::AlertExit("错误:有必填选项没填!", -1);
    }
    if ($_POST['title'] != '') {
        $_POST['title_md5'] = md5($_POST['title']);
    }
    //判断是否发布重复信息
    $arrTemp = $objWebInit->getInfoList("where title_md5='{$_POST['title_md5']}' and user_id = '{$_SESSION['user_id']}' and type_id='{$_POST['type_id']}'", "", 0, 1);
    if ($arrTemp['COUNT_ROWS'] != 0) {
        check::AlertExit("错误:相同的信息请不要重复发布!需要刷新排列的话,请使用列表下方“提前”选项!", -1);
    }
    //新图上传