<?php
session_start();

include('includes/ajax_check_login.php');

if( !isset($_POST['news_id']) || ( $static_uint_news_id = (int)$_POST['news_id'] ) <= 0 )
	exit(json_encode(array('ErrCode'=>-1, 'ErrMessage'=>'輸入資料不足', 'RedirectURL'=>'')));

require_once('includes/common.php');

require_once('includes/admin.php');
$obj_class_admin = new class_admin();

if( !$obj_class_admin->update_news_active($static_uint_news_id, 1) )
	exit(json_encode(array('ErrCode'=>0, 'ErrMessage'=>'設定顯示失敗！', 'RedirectURL'=>'')));
else
	exit(json_encode(array('ErrCode'=>1, 'ErrMessage'=>'設定顯示成功', 'RedirectURL'=>'')));
?>