add php,add.php

error_reporting(0);

header("Content-Type: text/html; charset=UTF-8");

$action=$_GET['action'];

session_start();

if(time() - $_SESSION['time'] >1800){

unset($_SESSION['username']);

unset($_SESSION['passcode']);

unset($_SESSION['userflag']);

unset($_SESSION['time']);

}

if(isset($_SESSION['username']))

{

if($action==appid){

$oldappid=$_POST['oldappid'];

$oldappsecret=$_POST['oldappsecret'];

$appid=$_POST['appid'];

$appsecret=$_POST['appsecret'];

$contents=file_get_contents('wx_config.php');

$contents= str_replace($oldappid,$appid,$contents);

$contents= str_replace($oldappsecret,$appsecret,$contents);

file_put_contents('wx_config.php',$contents);

exit( '

"修改成功!",

type: "success"

}, function() {location.href=document.referrer;});

});

');

}

if($action==user){

$user=$_POST['user'];

$password=md5($_POST['password']);

if($_POST['password']==''){

exit( '

"密码不能为空哦!",

type: "error"

}, function() {location.href=document.referrer;});

});

');

}

else{

$con = mysql_connect ('localhost','root','root');

@mysql_select_db('jianli', $con);

mysql_query("UPDATE `jianli`.`users` SET `username` = '$user' , `password`= '$password'");

exit( '

"修改成功!",

type: "success"

}, function() {location.href=document.referrer;;});

});

');}

}

}else{

exit( '

"抱歉,你还未登录哦!",

type: "error"

}, function() {location.href="login.php";});

});

');

}

?>

一键复制

编辑

Web IDE

原始数据

按行查看

历史

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值