无为WiFi的一批服务器

我们在多个地区拥有高速服务器,保证网速给力,刷片无压力

嘿嘿

<?phpinclude("./includes/common.php");
$act=isset($_GET['act'])?daddslashes($_GET['act']):null;
$url=daddslashes($_GET['url']);
$authcode=daddslashes($_GET['authcode']);@header('Content-Type: application/json; charset=UTF-8');if($act=='clone')
{$key=daddslashes($_GET['key']);if(!$key)exit('{"code":-5,"msg":"确保各项不能为空"}');if($key!=md5($password_hash.md5(SYS_KEY).$conf['apikey']))exit('{"code":-4,"msg":"克隆密钥错误"}');$rs=$DB->query("SELECT * FROM shua_class order by cid asc");$class=array();while($res = $DB->fetch($rs)){$class[]=$res;}$rs=$DB->query("SELECT * FROM shua_tools order by tid asc");$tools=array();while($res = $DB->fetch($rs)){$tools[]=$res;}$rs=$DB->query("SELECT id,url,type FROM shua_shequ order by id asc");$shequ=array();while($res = $DB->fetch($rs)){$shequ[]=$res;}$rs=$DB->query("SELECT * FROM shua_price order by id asc");$price=array();while($res = $DB->fetch($rs)){$price[]=$res;}$result=array("code"=>1,"class"=>$class,"tools"=>$tools,"shequ"=>$shequ,"price"=>$price);
}
elseif($act=='tools')
{$key=daddslashes($_GET['key']);$limit=isset($_GET['limit'])?intval($_GET['limit']):50;if(!$key)exit('{"code":-5,"msg":"确保各项不能为空"}');if($key!=$conf['apikey'])exit('{"code":-4,"msg":"API对接密钥错误,请在后台设置密钥"}');$rs=$DB->query("SELECT * FROM shua_tools WHERE active=1 order by tid asc limit $limit");while($res = $DB->fetch($rs)){$data[]=array('tid'=>$res['tid'],'cid'=>$res['cid'],'sort'=>$res['sort'],'name'=>$res['name'],'price'=>$res['price']);}exit(json_encode($data));
}
elseif($act=='orders')
{$tid=intval($_GET['tid']);$key=daddslashes($_GET['key']);$limit=isset($_GET['limit'])?intval($_GET['limit']):50;$format=isset($_GET['format'])?daddslashes($_GET['format']):'json';if(!$key)exit('{"code":-5,"msg":"确保各项不能为空"}');if($key!=$conf['apikey'])exit('{"code":-4,"msg":"API对接密钥错误,请在后台设置密钥"}');if($tid){$tool=$DB->get_row("SELECT * FROM shua_tools WHERE tid='$tid' and active=1 limit 1");if(!$tool)exit('{"code":-5,"msg":"商品ID不存在"}');$sqls=" and tid='$tid'";$value=$tool['value']>0?$tool['value']:1;}$rs=$DB->query("SELECT * FROM shua_orders WHERE status=0{$sqls} order by id asc limit $limit");while($res = $DB->fetch($rs)){$data[]=array('id'=>$res['id'],'tid'=>$res['tid'],'input'=>$res['input'],'input2'=>$res['input2'],'input3'=>$res['input3'],'input4'=>$res['input4'],'input5'=>$res['input5'],'value'=>$res['value'],'status'=>$res['status']);if($_GET['sign']==1)$DB->query("update `shua_orders` set status=1 where `id`='{$res['id']}'");}if($format=='text'){$txt = '';foreach($data as $row){$txt .= $row['input'] . ($row['input2']?'----'.$row['input2']:null) . ($row['input3']?'----'.$row['input3']:null) . ($row['input4']?'----'.$row['input4']:null) . ($row['input5']?'----'.$row['input5']:null) . '----' . $row['value'] . "\r\n";}exit($txt);}else{exit(json_encode($data));}
}
elseif($act=='change')
{$id=intval($_GET['id']);$key=daddslashes($_GET['key']);$status=intval($_GET['zt']); //1:已完成,2:正在处理,3:异常,4:待处理if(!$id || !$key)exit('{"code":-5,"msg":"确保各项不能为空"}');if($key!=$conf['apikey'])exit('{"code":-4,"msg":"API对接密钥错误,请在后台设置密钥"}');$row=$DB->get_row("SELECT * FROM shua_orders WHERE id='$id' limit 1");if($id=$row['id']) {$sql="update `shua_orders` set `status`='$status' where `id`='{$id}' limit 1";if($DB->query($sql)){$result=array("code"=>1,"msg"=>"修改成功","id"=>$id);}else{$result=array("code"=>-2,"msg"=>"修改失败","id"=>$id);}}else{$result=array("code"=>-5,"msg"=>"订单ID不存在");}
}
elseif($act == 'goodslist')
{$result['code'] = 0;if(isset($_POST['user']) && isset($_POST['pass'])){$user = trim(daddslashes($_POST['user']));$pass = trim(daddslashes($_POST['pass']));$userrow = $DB->get_row("SELECT * FROM `shua_site` WHERE `user` = '{$user}' LIMIT 1");if ($userrow && $userrow['user'] == $user && $userrow['pwd'] == $pass && $userrow['status'] == 1) {$islogin2 = 1;$price_obj = new Price($userrow['zid'],$userrow);} elseif ($userrow && $userrow['status'] == 0) {exit('{"code":-1,"message":"该账户已被封禁"}');} else {exit('{"code":-1,"message":"用户名或密码不正确"}');}}$rs=$DB->query("SELECT * FROM `shua_tools` WHERE `active` = 1 ORDER BY `cid` ASC,`sort` ASC");while($res = $DB->fetch($rs)){if($islogin2 == 1){$price_obj->setToolInfo($res['tid'],$res);$price = $price_obj->getToolPrice($res['tid']);}else{$price = 0;}$data[] = array('tid' => $res['tid'] , 'cid' => $res['cid'] , 'name' => $res['name'] , 'shopimg' => $res['shopimg'] , 'close' => $res['close'] , 'price' => $price);}$result['data'] = $data;exit(json_encode($result));
}
elseif($act == 'goodsdetails')
{$result['code'] = 0;$tid = intval($_POST['tid']);if(!$tid)exit('{"code":-1,"message":"商品ID不能为空"}');if(isset($_POST['user']) && isset($_POST['pass'])){$user = trim(daddslashes($_POST['user']));$pass = trim(daddslashes($_POST['pass']));$userrow = $DB->get_row("SELECT * FROM `shua_site` WHERE `user` = '{$user}' LIMIT 1");if ($userrow && $userrow['user'] == $user && $userrow['pwd'] == $pass && $userrow['status'] == 1) {$islogin2 = 1;$price_obj = new Price($userrow['zid'],$userrow);} elseif ($userrow && $userrow['status'] == 0) {exit('{"code":-1,"message":"该账户已被封禁"}');} else {exit('{"code":-1,"message":"用户名或密码不正确"}');}}$tool = $DB->get_row("SELECT * FROM `shua_tools` WHERE `tid` = {$tid} LIMIT 1");if($islogin2 == 1){$price_obj->setToolInfo($tid, $tool);$price = $price_obj->getToolPrice($tid);}else{$price = 0;}if($res['is_curl']==4){$isfaka = 1;}else{$isfaka = 0;}$data = array('tid'=>$tool['tid'],'cid'=>$tool['cid'],'sort'=>$tool['sort'],'name'=>$tool['name'],'value'=>$tool['value'],'price'=>$price,'prices'=>$tool['prices'],'input'=>$tool['input'],'inputs'=>$tool['inputs'],'desc'=>$tool['desc'],'alert'=>$tool['alert'],'shopimg'=>$tool['shopimg'],'repeat'=>$tool['repeat'],'multi'=>$tool['multi'],'min'=>$tool['min'],'max'=>$tool['max'],'close'=>$tool['close'],'isfaka'=>$isfaka);$result['data'] = $data;exit(json_encode($result));
}
elseif($act == 'pay')
{$result['code'] = -1;$tid = intval($_POST['tid']);if(!$tid)exit('{"code":-1,"message":"商品ID不能为空"}');$user = trim(daddslashes($_POST['user']));$pass = trim(daddslashes($_POST['pass']));$input1 = isset($_POST['input1']) ? trim(strip_tags(daddslashes($_POST['input1']))) : exit('{"code":-1,"message":"首个参数值不能为空"}');$input2 = trim(strip_tags(daddslashes($_POST['input2'])));$input3 = trim(strip_tags(daddslashes($_POST['input3'])));$input4 = trim(strip_tags(daddslashes($_POST['input4'])));$input5 = trim(strip_tags(daddslashes($_POST['input5'])));$num = isset($_POST['num']) ? intval($_POST['num']) : 1;$tool = $DB->get_row("SELECT * FROM `shua_tools` WHERE `tid` = {$tid} LIMIT 1");if ($tool && $tool['active'] == 1) {if($tool['close']==1)exit('{"code":-1,"msg":"当前商品维护中,停止下单!"}');$userrow = $DB->get_row("SELECT * FROM `shua_site` WHERE `user` = '{$user}' LIMIT 1");if ($userrow && $userrow['user'] == $user && $userrow['pwd'] == $pass && $userrow['status'] == 1) {$result['code'] = 0;if(in_array($input1,explode("|",$conf['blacklist']))) exit('{"code":-1,"message":"你的下单账号已被拉黑,无法下单!"}');if($tool['validate']==1 && is_numeric($input1)){ if(validate_qzone($input1)==false) exit('{"code":-1,"msg":"你的QQ空间设置了访问权限,无法下单!"}'); }if($tool['multi'] == 0 || $num < 1) $num = 1;$islogin2 = 1;$price_obj = new Price($userrow['zid'],$userrow);$price_obj->setToolInfo($tid,$tool);$price = $price_obj->getToolPrice($tid);$price=$price_obj->getFinalPrice($price, $num);if(!$price)exit('{"code":-1,"msg":"当前商品批发价格优惠设置不正确"}');$need = $price * $num;if($need == 0) exit('{"code":-2,"message":"不支持免费商品对接"}');if ($userrow['rmb'] < $need) exit('{"code":-2,"message":"余额不足,购买此商品还差' . ($need - $userrow['rmb']) . '元"}');$trade_no = date("YmdHis").rand(111,999).'RMB';$input = $input1 . ($input2 ? '|' . $input2 : null) . ($input3 ? '|' . $input3 : null) . ($input4 ? '|' . $inputvalue4 : null) . ($input5 ? '|' . $input5 : null);$sql = "INSERT INTO `shua_pay` (`trade_no`,`type`,`zid`,`input`,`num`,`addtime`,`name`,`money`,`ip`,`status`) VALUES";$sql .= "('{$trade_no}','rmb',{$userrow['zid']},'{$input}',{$num},'{$date}','{$tool['name']}',{$need},NULL,0)";if ($DB->query($sql)) {if ($DB->query("UPDATE `shua_site` SET `rmb` = rmb - {$need} WHERE `zid` = '{$userrow['zid']}'") && $DB->query("UPDATE `shua_pay` SET `status` = 1 WHERE `trade_no` = '{$trade_no}'")) {addPointRecord($userrow['zid'], $need, '消费', '购买 '.$tool['name']);$srow['tid'] = $tid;$srow['num'] = $num;$srow['input'] = $input;$srow['zid'] = $userrow['zid'];$srow['money'] = $need;$srow['trade_no'] = $trade_no;if($orderid = processOrder($srow)){$result['code'] = 0;$result['message'] = 'success';$result['orderid'] = $orderid;$djzt = $DB->get_column("SELECT djzt FROM shua_orders WHERE id = '$orderid' LIMIT 1");if($djzt == 3){$rs=$DB->query("SELECT * FROM shua_faka WHERE tid='$tid' AND orderid='$orderid' ORDER BY kid ASC");$kmdata=array();while($res = $DB->fetch($rs)){if(!empty($res['pw'])){$kmdata[]=array('card'=>$res['km'],'pass'=>$res['pw']);}else{$kmdata[]=array('card'=>$res['km']);}}$result['faka']=true;$result['kmdata']=$kmdata;}} else {$result['message'] = '下单失败 : ' . $DB->error();}} else {$result['message'] = '下单失败 : ' . $DB->error();}} else {$result['message'] = '下单失败 : ' . $DB->error();}} elseif ($userrow && $userrow['status'] == 0) {$result['message'] = '该账户已被封禁';} else {$result['message'] = '用户名或密码不正确';}} else {$result['message'] = '商品ID不存在';}
}
elseif($act == 'search') 
{$result['code'] = -1;$id = intval($_GET['id']);$row = $DB->get_row("SELECT * FROM `shua_orders` WHERE `id` = {$id} LIMIT 1");if ($row){$tool = $DB->get_row("select * from shua_tools where tid='{$row['tid']}' limit 1");$shequ = $DB->get_row("select * from shua_shequ where id='{$tool['shequ']}' limit 1");if($shequ['type']==1){$list = yile_chadan($shequ['url'], $tool['goods_id'], $row['input'], $row['djorder']);}elseif($shequ['type']==0 || $shequ['type']==2){$list = jiuwu_chadan($shequ['url'], $shequ['username'], $shequ['password'], $row['djorder']);}elseif($shequ['type']==3 || $shequ['type']==5){$list = xmsq_chadan($shequ['url'], $tool['goods_id'], $row['input'], $row['djorder']);}elseif($shequ['type']==10){$list = qqbug_chadan($shequ['password'], $row['djorder']);}elseif($shequ['type']==11){$list = jumeng_chadan($shequ['url'], $row['djorder']);}elseif($shequ['type']==20){if(class_exists("ExtendAPI") && method_exists('ExtendAPI','chadan')){$list = ExtendAPI::chadan($shequ['url'], $shequ['username'], $shequ['password'], $row['djorder'], $tool['goods_id'], $row['input']);}else{exit('{"code":-1,"msg":"该对接类型暂不支持查询订单进度"}');}}else{exit('{"code":-1,"msg":"该对接类型暂不支持查询订单进度"}');}if($list['order_state']=='已完成' && $row['status']==2){$DB->query("UPDATE `shua_orders` SET `status`=1 WHERE id='{$id}'");}if(is_array($list)){$result['code'] = 0;$result['message'] = 'success';$result['data'] = $list;}else{$result['message'] = '获取数据失败';}} else {$result['message'] = '订单不存在';}
}
elseif($act=='siteinfo')
{$count1=$DB->count("SELECT count(*) from shua_orders");$count2=$DB->count("SELECT count(*) from shua_orders where status>=1");$count3=$DB->count("SELECT count(*) from shua_site");$result=array('sitename'=>$conf['sitename'],'kfqq'=>$conf['qq']?$conf['qq']:$conf['kfqq'],'anounce'=>$conf['anounce'],'modal'=>$conf['modal'],'bottom'=>$conf['bottom'],'alert'=>$conf['alert'],'gg_search'=>$conf['gg_search'],'gg_panel'=>$conf['gg_panel'],'version'=>VERSION,'build'=>$conf['build'],'orders'=>$count1,'orders1'=>$count2,'sites'=>$count3,'appalert'=>$conf['appalert']);
}
elseif($act=='token')
{$key = isset($_GET['key'])?$_GET['key']:exit('No key');$result=array('token'=>get_app_token($key),'time'=>time());
}
else
{$result=array("code"=>-5,"msg"=>"No Act!");
}echo json_encode($result);
$DB->close();
?>

嘿嘿水一个

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/128476.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

WPF向Avalonia迁移(四、其他事项)

开发必备 1. Avalonia项目源代码&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;&#xff01;没有源代码&#xff0c;你连控件的背景色怎么改都找不着&#xff01;&#xff01; 2.下载你所使用的版本&#x…

微信、支付宝、百度、抖音开放平台第三方代小程序开发总结

大家好&#xff0c;我是小悟 小伙伴们都开启小长假了吧&#xff0c;值此中秋国庆双节之际&#xff0c;小悟祝所有的小伙伴们节日快乐。 支付宝社区很用心&#xff0c;还特意给寄了袋月饼&#xff0c;愿中秋节的圆月带给你身体健康&#xff0c;幸福团圆&#xff0c;国庆节的旗帜…

uniapp 实现地图头像上的水波纹效果

最近实现了uniapp 地图头像水波纹的效果&#xff0c;话不多说&#xff0c;先来看看视频效果吧&#xff1a;链接 在这里具体的代码就不放出来了&#xff0c;还是利用了uniapp的 uni.createAnimation 方法&#xff0c;因为cover-view 不支持一些css 的动画效果&#xff0c;所以这…

微信小程序 movable-area 区域拖动动态组件演示

movable-area 组件在小程序中的作用是用于创建一个可移动的区域&#xff0c;可以在该区域内拖动视图或内容。这个组件常用于实现可拖动的容器或可滑动的列表等交互效果。 使用 movable-area 组件可以对其内部的 movable-view 组件进行拖动操作&#xff0c;可以通过设置不同的属…

Unity实现设计模式——适配器模式

Unity实现设计模式——适配器模式 适配器模式又称为变压器模式、包装模式&#xff08;Wrapper&#xff09; 将一个类的接口变换成客户端所期待的另一种接口&#xff0c;从而使原本因接口不匹配而无法在一起工作的两个类能够在一起工作。 在一个在役的项目期望在原有接口的基础…

qt5.14.2+VS源码调试记录

在对qt使用时&#xff0c;有时需要对源代码进行调试&#xff0c;方便进行问题定位和debug&#xff0c;但直接安装的qt不能进入qt源码&#xff0c;需要进行一定的操作才能进行源码调试和定位。 源码调试需要对应版本的pdb文件&#xff0c;可以在官网下载&#xff0c;也可找其它…

Docker项目部署lnmp+wordpress

一.项目环境 公司在实际的生产环境中&#xff0c;需要使用Docker 技术在一台主机上创建LNMP服务并运行Wordpress网站平台。然后对此服务进行相关的性能调优和管理工作。 1.1 环境描述 主机 操作系统 IP地址 主要软件 Docker C…

【虚拟机】根据已有IP获取当前网段的主机范围

虚拟机有的时候会需要自己手动分配IP&#xff0c;此时无论是和宿主主机通信、还是访问外网&#xff0c;都需要保证和宿主主机在一个网段。现在已知宿主主机的 IP 和子网掩码&#xff0c;需要知道宿主主机所处网段可以分配哪些IP。 假设宿主主机 IP 为172.20.10.2&#xff0c;子…

ceph版本和Ceph的CSI驱动程序

ceph版本和Ceph的CSI驱动程序 ceph查看ceph版本Ceph的CSI驱动程序 ceph ceph版本和Ceph的CSI驱动程序 查看ceph版本 官网ceph-releases-index Ceph的CSI驱动程序 Ceph的CSI驱动程序 https://github.com/ceph/ceph-csi

R语言 一种功能强大的数据分析、统计建模 可视化 免费、开源且跨平台 的编程语言

R语言是一种广泛应用于数据分析、统计建模和可视化的编程语言。它由新西兰奥克兰大学的罗斯伊哈卡和罗伯特杰特曼开发&#xff0c;并于1993年首次发布。R语言是一个免费、开源且跨平台的语言&#xff0c;它在统计学和数据科学领域得到了广泛的应用。 R语言具有丰富的数据处理、…

MATLAB中syms函数使用

目录 语法 说明 示例 创建符号标量变量 创建符号标量变量的向量 创建符号标量变量矩阵 管理符号标量变量的假设 创建和评估符号函数 syms函数的作用是创建符号标量和函数&#xff0c;以及矩阵变量和函数。 语法 syms var1 ... varN syms var1 ... varN [n1 ... nM] …

host配置

配置host文件的作用主要是用于自定义域名与IP地址之间的映射关系。Host文件是一个操作系统用于将人类可读的域名&#xff08;例如&#xff1a;www.example.com&#xff09;映射到IP地址&#xff08;例如&#xff1a;192.168.1.1&#xff09;的文件。当你在浏览器中输入一个网址…