<?php
session_start();
include_once '../../common.php';
include_once '../../conn.php';
if($dailiid == "admin"){echo  $dailiid="";}	
if(!isset($_SESSION['username'])){echo "<script>alert('身份已失效请重新登录!')</script><script>location.href='index.php'</script>";exit;}
$username=ubo($_SESSION['username']);
$type="WHERE ID='1'";
$peizhi=queryall(jinkepay,$type);
if($_POST){
$shanghu=ubo(iconv("UTF-8","GB2312",$_POST["shanghu"]));
$miyao=ubo(iconv("UTF-8","GB2312",$_POST["miyao"]));
$bili=ubo(iconv("UTF-8","GB2312",$_POST["bili"]));
$notifyurl=ubo(iconv("UTF-8","GB2312",$_POST["notifyurl"]));
$callbackurl=ubo(iconv("UTF-8","GB2312",$_POST["callbackurl"]));
//保存到数据库
$type="user='$shanghu',miyao='$miyao',bili='$bili',notifyurl='$notifyurl',callbackurl='$callbackurl'  where ID='1'";
upalldt(jinkepay,$type);
$json_data = array ('status'=>"true");   
echo json_encode($json_data);
}else{
$tip=iconv("GB2312","UTF-8","参数错误");
$json_data = array ('status'=>"false",'msg'=>$tip);   
echo json_encode($json_data);
}
?>
