Exemplo n.º 1
0
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	weixin_news
 */
require_once 'config/config.inc.php';
require_once "class/weixin_news.class.php";
$objWebInit = new weixin_news();
$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'];
Exemplo n.º 2
0
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	weixin_news
 */
require_once '../config/config.inc.php';
require_once "../class/weixin_news.class.php";
require_once '../..' . __WEBADMIN_ROOT . '/checklogin.php';
$objWebInit = new weixin_news();
//访问权限检查
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'] != '') {
        $_POST['title_md5'] = md5($_POST['title']);
    }
    //还原图片数组
    $_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];