diff --git a/weltolk_sign_qq_show.php b/weltolk_sign_qq_show.php index 4a13cf8..55dcdc9 100644 --- a/weltolk_sign_qq_show.php +++ b/weltolk_sign_qq_show.php @@ -3,7 +3,40 @@ } loadhead(); global $i, $m; +$is_open = option::uget('weltolk_sign_qq_enable', UID); +if (!$is_open) { + option::uset('weltolk_sign_qq_enable', 'on', UID); + $is_open = true; +} else { + if ($is_open == "on") { + $is_open = true; + } else if ($is_open == "off") { + $is_open = false; + } +} $page = $_GET['page']; +if ($page == 'user_settings') { + $act = $_GET['act']; + + //保存用户设置 + if ($act == 'store') { + ob_end_clean(); + $data = json_decode($_POST['info'], true); + $cache_weltolk_sign_qq_enable = ""; + if (!empty($data['weltolk_sign_qq_enable'])) { + $cache_weltolk_sign_qq_enable = addslashes(strip_tags($data['weltolk_sign_qq_enable'])); + } + if (empty($cache_weltolk_sign_qq_enable) + ) { + $return_arr = array('code' => 0, 'msg' => '无效请求!'); + } else { + option::uset('weltolk_sign_qq_enable', $cache_weltolk_sign_qq_enable, UID); + $return_arr = array('code' => 1, 'msg' => '保存成功!'); + } + echo json_encode($return_arr); + die; + } +} if ($page == 'config') { switch ($_GET['act']) { case 'ok'://成功回显 @@ -158,6 +191,18 @@ $date_cache = date('Y-m-d'); + $msg1 = $date_cache + . "\n\n" . "Tieba-Cloud-Sign插件weltolk_sign_qq测试消息" + . "\n\n" . "第1/2页"; + $msg2 = $date_cache + . "\n\n" + . '!! ' + . ' ' . '测试百度账号' + . ' 账号的 ' . '测试百度贴吧' . ' 吧: ' + . '签到失败' . '\n' + . '!!' . ' 详细信息: ' . '签到超时' + . "\n\n" . "第2/2页"; + if ($x2['client'] == 'go-cqhttp') { $access_token = $x2['access_token']; @@ -191,10 +236,7 @@ $cache_status = true; - $send["params"]["message"] = - $date_cache - . "\n\n" . "Tieba-Cloud-Sign插件weltolk_sign_qq测试消息" - . "\n\n" . "第1/2页"; + $send["params"]["message"] = $msg1; try { $send_json = json_encode($send); @@ -220,15 +262,7 @@ usleep(250000); - $send["params"]["message"] = - $date_cache - . "\n\n" - . '!! ' - . ' ' . '测试百度账号' - . ' 账号的 ' . '测试百度贴吧' . ' 吧: ' - . '签到失败' . '\n' - . '!!' . ' 详细信息: ' . '签到超时' - . "\n\n" . "第2/2页"; + $send["params"]["message"] = $msg2; try { $send_json = json_encode($send); @@ -293,10 +327,7 @@ $cache_status = true; - $send["message"] = - $date_cache - . "\n\n" . "Tieba-Cloud-Sign插件weltolk_sign_qq测试消息" - . "\n\n" . "第1/2页"; + $send["message"] = $msg1; $c = new wcurl($url, $headers); $c->setTimeOut(5000); @@ -314,15 +345,7 @@ usleep(250000); - $send["params"]["message"] = - $date_cache - . "\n\n" - . '!! ' - . ' ' . '测试百度账号' - . ' 账号的 ' . '测试百度贴吧' . ' 吧: ' - . '签到失败' . '\n' - . '!!' . ' 详细信息: ' . '签到超时' - . "\n\n" . "第2/2页"; + $send["params"]["message"] = $msg2; $c = new wcurl($url, $headers); $c->setTimeOut(5000); @@ -537,9 +560,32 @@ } ?> + +

每日签到qq推送


+ + + + + + + + +
是否开启每日签到qq推送 + >开启
+ >关闭 + +
+ + 保存设定 + +