You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.3 KiB
49 lines
1.3 KiB
<?php
|
|
$param = $_GET['v'];
|
|
$param = urldecode($param);
|
|
if(empty($param)){
|
|
exit('fail');
|
|
}
|
|
$arr_user_info = explode('zch8u9h3b', $param);
|
|
|
|
$user = $arr_user_info[0];
|
|
$passwd = $arr_user_info[1];
|
|
$tenant = $arr_user_info[2];
|
|
|
|
$need_login_file = __DIR__ . '/../cookie_file/needlogin_'.$user.'.txt'; // 需要登录的账号文件
|
|
$done_login_file = __DIR__ . '/../cookie_file/'.$user.'.txt'; // 已登录的账号文件
|
|
$ban_file = __DIR__ . '/../cookie_file/ban_'.$user.'.txt'; // 被禁用的账号文件
|
|
$fail_login_file = __DIR__ . '/../cookie_file/fail_'.$user.'.txt'; // 错误登录的账号文件
|
|
$ban_server_file = __DIR__ . '/../cookie_file/server_ban.txt'; // 被禁用服务器的账号文件
|
|
|
|
// 检测是否被禁用
|
|
if(file_exists($ban_file)){
|
|
exit('ban');
|
|
}
|
|
|
|
// 检测是否被禁用服务器
|
|
if(file_exists($ban_server_file)){
|
|
exit('server_ban');
|
|
}
|
|
|
|
// 检测是否错误登录超过15次
|
|
if(file_exists($fail_login_file)){
|
|
$fail_login_times = file_get_contents($fail_login_file);
|
|
if($fail_login_times+0 >= 15){
|
|
exit('fail');
|
|
}
|
|
}
|
|
// 检测是否已经登录
|
|
if(file_exists($need_login_file)){
|
|
exit('exist');
|
|
}
|
|
// 检测是否已经登录
|
|
if(file_exists($done_login_file)){
|
|
exit('done');
|
|
}
|
|
|
|
|
|
|
|
// 写入需要登录的账号文件
|
|
file_put_contents($need_login_file, str_replace('zch8u9h3b', "\n", $param));
|
|
exit('ok');
|
|
|