Example #1
0
function s_check_logincheck()
{
    if (option::xget("s_check", "login_check") != 0) {
        $geetest = new GeetestLib();
        $geetest->set_privatekey("2d5be5ba4207f11d33f7ae5e14a1c33e");
        if (isset($_POST['geetest_challenge']) && isset($_POST['geetest_validate']) && isset($_POST['geetest_seccode'])) {
            $result = $geetest->validate($_POST['geetest_challenge'], $_POST['geetest_validate'], $_POST['geetest_seccode']);
        }
        if ($result == TRUE) {
        } else {
            if ($result == FALSE) {
                ReDirect("index.php?mod=login&error_msg=" . urlencode('登陆失败,请拖动滑块完成验证'));
                die;
            } else {
                ReDirect("index.php?mod=login&error_msg=" . urlencode('登陆失败,请拖动滑块完成验证'));
                die;
            }
        }
    }
}
Example #2
0
     } else {
         $firstcount = ($page - 1) * $pageSize;
         // $lastcount = $page * $pageSize;
         $query = C::t("#smart_vote#smart_vote")->fetch_all($firstcount, $pageSize);
         pageft($count, $pageSize, 1, 0, 0, 3);
     }
     // pageft($count,10);
     include template("smart_vote:index");
 } else {
     if ("value" == $_GET['model']) {
         $openid = $_COOKIE["openid"];
         //openid
         $today = time();
         $exitdate = strtotime(date('Y-m-d 23:59:59'));
         $geetest = new GeetestLib();
         $geetest->set_privatekey("465719ad89db5cbe489cc051ff81a38e");
         $voteid = $_POST['voteid'];
         if (isset($_POST['geetest_challenge']) && isset($_POST['geetest_validate']) && isset($_POST['geetest_seccode'])) {
             $result = $geetest->validate($_POST['geetest_challenge'], $_POST['geetest_validate'], $_POST['geetest_seccode']);
             if ($result == TRUE) {
                 //投票限制
                 if ($openid == "") {
                     echo "feifa";
                     //非法提交
                     exit;
                 }
                 //----------------------
                 //             $urlsub = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=$subtoken&openid=$openid";
                 // $chsub = curl_init();
                 // curl_setopt($chsub, CURLOPT_URL, $urlsub);
                 // curl_setopt($chsub, CURLOPT_SSL_VERIFYPEER, FALSE);