diff --git a/extends/jinyouapi/Jinyou.php b/extends/jinyouapi/Jinyou.php new file mode 100644 index 0000000..93f4b39 --- /dev/null +++ b/extends/jinyouapi/Jinyou.php @@ -0,0 +1,353 @@ +$type, + ); + $res=self::send_post('Get_Dynamic_Line',$post_data); + return json_decode($res); + } + + /** + * * 获取动态用户列表 + * @param $page *当前分页 + * @param $page_count *分页条目数 1-100 + * @param $t_id @接入方客户唯一值UID用于查询客户账号列表、0或缺省则查询当前应用下全部客户账号,非必填字段 + * @param $user @根据账号名称查询账号信息,非必填字段 + * @return @json + */ + public static function getDynamicAccount($page,$page_count,$t_id=0,$user="") + { + $post_data = array( + 't_id'=>$t_id, + 'user'=>$user, + 'page'=>$page, + 'page_count'=>$page_count, + ); + $res=self::send_post('Get_Dynamic_Account', $post_data); + return json_decode($res); + } + + /** + * * 创建动态账号 + * @param $width *订购带宽 1-20 单位 Mbps + * @param $meal *订购套餐 1-5 分别为 天卡、周卡、月卡、季卡、年卡,31为2小时测试卡,每个用户只允许开通一次 + * @param $account *拨号账号 6-20位字符串。 + * @param $password *拨号密码 6-20位字符串 + * @param $conn_max *连接数(同账号可以在不同服务器中同时在线的数量)1-100 + * @param $t_id *接入方平台注册用户的唯一值,用于绑定客户账号 + * @return @json + */ + public static function createDynamic($width,$meal,$account,$password,$conn_max,$t_id) + { + $post_data = array( + 'width'=>$width, + 'combos'=>$meal, + 'account'=>$account, + 'password'=>$password, + 'conn_max'=>$conn_max, + 't_id'=>$t_id, + ); + $res=self::send_post('Create_Dynamic', $post_data); + return json_decode($res); + } + /** + * * 创建平台第三方接入账号 + * @param $phone *接入方平台用户注册手机号 同应用下手机号码不可重复 + * @param $cn_name *用户实名认证后的真实姓名 + * @param $cn_id *用户实名认证后的身份证号码 + * @param $t_id *接入方平台中客户唯一的身份标识,整型 数字范围1-999999999 + * @return @json + */ + public static function createUsers($phone,$cn_name,$cn_id,$t_id) + { + $post_data = array( + 'phone'=>$phone, + 'cn_name'=>$cn_name, + 'cn_id'=>$cn_id, + 't_id'=>$t_id, + ); + $res=self::send_post('Create_Users', $post_data); + return json_decode($res); + } + + /** + * * 获取代理商基础定价 + * @param $width *订购带宽 1-20 单位 Mbps + * @param $meal *订购套餐 1-5 分别为 天卡、周卡、月卡、季卡、年卡 + * @param $conn_max *连接数(同账号可以在不同服务器中同时在线的数量)1-100 + * @return @json + */ + public static function getDynamicPoint($width,$meal,$conn_max) + { + $post_data = array( + 'width'=>$width, + 'combos'=>$meal, + 'conn_max'=>$conn_max, + ); + $res=self::send_post('Get_Dynamic_Point', $post_data); + return json_decode($res); + } + /** + * * 续费动态账号 + * @param $account *拨号账号 6-20位字符串。 + * @param $meal *订购套餐 1-5 分别为 天卡、周卡、月卡、季卡、年卡 + * @return @json + */ + public static function reNewDynamic($account,$meal) + { + $post_data = array( + 'account'=>$account, + 'combos'=>$meal, + ); + $res=self::send_post('Renew_Dynamic', $post_data); + return json_decode($res); + } + /** + * * 修改动态账户密码 + * @param $account *拨号账号 6-20位字符串。 + * @param $password *新密码 6-20位字符串 + * @return @json + */ + public static function reSetDynamicPassword($account,$password) + { + $post_data = array( + 'account'=>$account, + 'password'=>$password, + ); + $res=self::send_post('Reset_Password_Dynamic', $post_data); + return json_decode($res); + } + /** + * * 获取动态服务器完整列表 + * @param $page *当前分页 + * @param $page_count *分页条目数 1-100 + * @param $account *拨号账号 6-20位字符串。 + * @return @json + */ + public static function getDynamicOnline($account,$page,$page_count) + { + $post_data = array( + 'account'=>$account, + 'page'=>$page, + 'page_count'=>$page_count, + ); + $res=self::send_post('Get_Dynamic_Online', $post_data); + return json_decode($res); + } + /** + * * 针对动态在线用户踢出下线 + * @param $sid *sid参数即为{getDynamicOnline}函数锁返回的在线ID,应为32位字符串。 + * @return @json + */ + public static function kickOffDynamicLine($sid) + { + $post_data = array( + 'sid'=>$sid, + ); + $res=self::send_post('Kick_Off_Dynamic_Line', $post_data); + return json_decode($res); + } + /** + * * 设置动态账号防火墙状态 + * @param $account *拨号账号 6-20位字符串。 + * @param $status *防火墙状态:0关闭、1开启。 + * @return @json + */ + public static function setDynamicFirewallStatus($account,$status) + { + $post_data = array( + 'account'=>$account, + 'status'=>$status, + ); + $res=self::send_post('Set_Dynamic_Firewall_Status', $post_data); + return json_decode($res); + } + /** + * * 上传用户手持身份证照片 + * @param $t_id *接入方平台中客户唯一的身份标识,整型 数字范围1-999999999 + * @param $upload_img *上传图片文件,格式要求jpg格式,文件小于1MB。 + * @return @json + */ + public static function uploadExamine($t_id,$upload_img) + { + $post_data = array( + 't_id'=>$t_id, + 'upload_img'=>new \CURLFile($upload_img->getRealPath(),$upload_img->getOriginalMime(),$upload_img->getOriginalName()), + ); + $res=self::send_post('Upload_Examine', $post_data); + return json_decode($res); + } + /** + * * 上传用户手持身份证照片 + * @param $t_id *接入方平台中客户唯一的身份标识,整型 数字范围1-999999999 + * @param $upload_imgurl *本地图片URL,格式要求jpg格式,文件小于1MB。 + * @return @json + */ + public static function uploadExamineFile($t_id,$upload_imgurl) + { + $post_data = array( + 't_id'=>$t_id, + 'upload_img'=>new \CURLFile($upload_imgurl,mime_content_type($upload_imgurl),basename($upload_imgurl)), + ); + $res=self::send_post('Upload_Examine', $post_data); + return json_decode($res); + } + public static function uploadExaminePrepare($t_id,$upload_imgurl) + { + $post_data = array( + 't_id'=>$t_id, + 'upload_img'=>new \CURLFile($upload_imgurl,mime_content_type($upload_imgurl),basename($upload_imgurl)), + ); + $res=self::send_post('Upload_Examine_Prepare', $post_data); + return json_decode($res); + } + /** + * * 查询第三方接入用户状态 + * @param $t_id *接入方平台中客户唯一的身份标识,整型 数字范围1-999999999 + * @return @json + */ + public static function examineStatus($t_id) + { + $post_data = array( + 't_id'=>$t_id, + ); + $res=self::send_post('Examine_Status', $post_data); + return json_decode($res); + } + /** + * * 查询第三方接入用户状态 + * @param $account *拨号账号 6-20位字符串。 + * @return @json + */ + public static function dynamicAccountExists($account) + { + $post_data = array( + 'account'=>$account, + ); + $res=self::send_post('Dynamic_Account_Exists', $post_data); + return json_decode($res); + } + /** + * * 变更静态账户出口指向 + * @param $account *拨号账号 6-20位字符串。 + * @param $ename *出口服务器名 1-20位字符串。 + * @param $pool *出口线路名 1-20位字符串。 + * @return @json + */ + public static function editStaticOut($account,$ename,$pool) + { + $post_data = array( + 'account'=>$account, + 'ename'=>$ename, + 'pool'=>$pool, + ); + $res=self::send_post('Edit_Static_Out', $post_data); + return json_decode($res); + } + /** + * * 获取指定城市的静态出口列表 + * @param $city *城市ID + * @return @json + */ + public static function getStaticOut($city) + { + $post_data = array( + 'city'=>$city, + ); + $res=self::send_post('Get_Static_Out', $post_data); + return json_decode($res); + } + /** + * * 获取独立定价账户下的产品列表 + * @return @json + */ + public static function getDynamicProduct() + { + $res=self::send_post('Get_Dynamic_Product', []); + return json_decode($res); + } + /** + * * 获取独立定价账户下的产品列表所对应的带宽套餐 + * @return @json + */ + public static function getDynamicProductWidth($meal) + { + $post_data = array( + 'meal'=>$meal, + ); + $res=self::send_post('Get_Dynamic_Product_Width', $post_data); + return json_decode($res); + } + public static function getaccount($meal) + { + $post_data = array( + 'account'=>$meal, + ); + $res=self::send_post('Dynamic_Account_Exists', $post_data); + return json_decode($res); + } + +} \ No newline at end of file diff --git a/script/linedata/auto_format.php b/script/linedata/auto_format.php index 0a43cd2..586bae4 100644 --- a/script/linedata/auto_format.php +++ b/script/linedata/auto_format.php @@ -1,7 +1,7 @@ province_name; + $province_record[] = $val['info']->province_name; + + $key = $record['city']; + $list1[$key][] = $record; + + $record['city'] = $val['info']->province_name.'混拨'; + $record['supply'] = ''; + $record['ip'] = ''; + $record['daikuan'] = ''; + $record['onlineuser'] = ''; + $record['maxuser'] = ''; + $record['online'] = '正常'; + $record['status'] = ''; + $record['nasname'] = $val['info']->province_domain; + $list1[$key][] = $record; + + foreach($val['line'] as $city_info) { + $city_info = (array)$city_info; + + $record['city'] = $city_info['city_name']; + $record['supply'] = $city_info['isp']; + + $record['ip'] = ''; + $record['daikuan'] = ''; + $record['onlineuser'] = ''; + $record['maxuser'] = ''; + $record['online'] = $city_info['status'] ? '正常' : '故障'; + $record['status'] = ''; + $record['nasname'] = $city_info['domain']; + $list1[$key][] = $record; + + if (!in_array($record['nasname'], $exit) && !in_array($record['nasname'], $dnx_has_exit)) { + fputcsv($dnx_exit, [$record['name'], explode('.',$record['nasname'])[0], $record['nasname'], date('Y-m-d H:i:s')]); + } + + } + + + } + + + foreach ($list1 as $val) { + foreach ($val as $net_data) { + + fputcsv($file, $net_data); + fputcsv($all, $net_data); + } + } + +} + function laoying_getList($list, &$file, &$all, $exit) { global $dnx_exit, $dnx_has_exit; diff --git a/script/linedata/search.php b/script/linedata/search.php index f9aed2d..ab0cbf1 100755 --- a/script/linedata/search.php +++ b/script/linedata/search.php @@ -5,7 +5,7 @@ * @Author: kangkang * @Date: 2020-11-07 11:13:08 * @LastEditors: “wanyongkang” “937888580@qq.com” - * @LastEditTime: 2023-05-14 17:33:46 + * @LastEditTime: 2024-01-12 10:45:00 */ header('Access-Control-Allow-Origin: *'); header("Access-Control-Allow-Methods: *"); @@ -75,6 +75,9 @@ if($_GET['type'] == 1){ case 26: search_product(__DIR__ . '/data/download/liebao.csv','lbip.cc'); break; + case 27: + search_product(__DIR__ . '/data/download/qilin.csv','qlip.cc'); + break; } } @@ -154,6 +157,9 @@ function search_all_product($file_path,$search){ case '猎豹': $dns = 'lbip.cc'; break; + case '麒麟': + $dns = 'qlip.cc'; + break; } $data['city'] = $info[1];