<?php
session_start();

include('includes/ajax_check_login.php');

if( !isset($_POST['banner_id']) || ( $static_uint_banner_id = (int)$_POST['banner_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_banner_active($static_uint_banner_id, 0) )
	exit(json_encode(array('ErrCode'=>0, 'ErrMessage'=>'設定隱藏失敗！', 'RedirectURL'=>'')));
else
	exit(json_encode(array('ErrCode'=>1, 'ErrMessage'=>'設定隱藏成功', 'RedirectURL'=>'')));
?>