Ejemplo n.º 1
0
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	xingfu_Introduction
 */
require_once '../config/config.inc.php';
require_once "../class/xingfu_Introduction.class.php";
require_once '../..' . __WEBADMIN_ROOT . '/checklogin.php';
$objWebInit = new xingfu_Introduction();
//访问权限检查
if (!$objWebInit->checkPopedomG($_SESSION['user_id'], 'w')) {
    check::AlertExit('对不起,您没有读权限', -1);
}
$objWebInit->db();
// 取得文章信息
$arrInfo = $objWebInit->getInfo($_REQUEST['id']);
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if (empty($_POST['type_id']) || empty($_POST['title']) || empty($_POST['intro'])) {
        check::AlertExit("错误:有必填选项没填!", -1);
    }
    if ($_POST['title'] != '兴甫简介') {
        check::AlertExit("错误:标题必须为兴甫简介!", -1);
    }
    if ($_POST['title'] != '') {
        $_POST['title_md5'] = md5($_POST['title']);
    }
    //还原图片数组
    $_POST['photo'] = array();
    if (!empty($_POST['savephoto'])) {
        foreach ($_POST['savephoto'] as $key => $val) {
            $arrTemp = array();
Ejemplo n.º 2
0
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	xingfu_Introduction
 */
require_once 'config/config.inc.php';
require_once "class/xingfu_Introduction.class.php";
$objWebInit = new xingfu_Introduction();
$objWebInit->db();
if ($_GET['id'] === null) {
    exit;
}
$intID = intval($_GET['id']);
$arrInfo = $objWebInit->getInfo($intID);
if (!empty($arrInfo['linkurl'])) {
    header("Location:" . $arrInfo['linkurl'] . "");
}
if ($arrInfo['id'] == '' || $arrInfo['pass'] == 0) {
    echo "<script language=JavaScript>\n\t\t\talert('该页面已经删除!');\n\t\t\tparent.location='/';\n\t\t  </script>";
}
if (!empty($arrInfo['meta_Title'])) {
    $strTitle = $arrInfo['meta_Title'];
} else {
    $strTitle = $arrInfo['title'];
}
if (!empty($arrInfo['meta_Description'])) {
    $strDescription = $arrInfo['meta_Description'];
} else {
    $strDescription = $strTitle . ',' . $arrInfo['summary'];