Exemple #1
0
require_once "../class/Personality_customization.class.php";
require_once '../..' . __WEBADMIN_ROOT . '/checklogin.php';
$objWebInit = new Personality_customization();
//数据库连接参数
$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);
    }
    //还原图片数组
    $_POST['photo'] = array();
    if (!empty($_POST['savephoto'])) {
        foreach ($_POST['savephoto'] as $key => $val) {
            $arrTemp = array();
            $arrTemp['photo'] = $val;
            if (!empty($_POST['photo_narrate' . $key])) {
                $arrTemp['photo_narrate'] = $_POST['photo_narrate' . $key];
            }
            $_POST['photo'][$key] = $arrTemp;
        }
Exemple #2
0
 * @package		ArthurXF
 * @subpackage	Personality_customization
 */
require_once '../config/config.inc.php';
require_once "../class/Personality_customization.class.php";
require_once '../../useradmin/checklogin.php';
$objWebInit = new Personality_customization();
//数据库连接参数
$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);
    }
    $arrTemp = explode('|', $_POST['type_id']);
    $_POST['type_id'] = $arrTemp[0];
    $_POST['type_roue_id'] = $arrTemp[1];
    if ($_POST['title'] != '') {
        $_POST['title_md5'] = md5($_POST['title']);
    }
    //判断文章信息
    if ($_POST['title_md5'] != $arrInfo['title_md5']) {
Exemple #3
0
$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);
if ($arrInfo['id'] == '') {
    echo "<script language=JavaScript>\r\n\t\t\talert('该页面已经删除!');\r\n\t\t\tparent.location='/';\r\n\t\t  </script>";
}
if ($arrInfo['stars'] > 0) {
    if (!empty($_SESSION['user_id'])) {
        if ($arrInfo['stars'] > $_SESSION['user_grade']) {
            check::AlertExit("你的权限不够,无法查看", -1);
        }
    } else {
        check::AlertExit("请先登陆", -1);
    }
}
if (!empty($arrInfo['meta_Title'])) {
    $strTitle = $arrInfo['meta_Title'];
} else {