當前位置: 首頁>>代碼示例>>PHP>>正文


PHP GWF_Session::getSessSID方法代碼示例

本文整理匯總了PHP中GWF_Session::getSessSID方法的典型用法代碼示例。如果您正苦於以下問題:PHP GWF_Session::getSessSID方法的具體用法?PHP GWF_Session::getSessSID怎麽用?PHP GWF_Session::getSessSID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在GWF_Session的用法示例。


在下文中一共展示了GWF_Session::getSessSID方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getOnlineSessions

 public static function getOnlineSessions()
 {
     // 		var_dump('getSess', self::$SESSION);
     $cut = time() - GWF_ONLINE_TIMEOUT;
     $sid = self::$SESSION->getSessSID();
     // 		return array_merge(array(self::$SESSION), self::table(__CLASS__)->selectObjects('*, COUNT(*) as num_online', "sess_time>{$cut} AND sess_sid!='{$sid}'", 'user_name ASC', -1, -1, 'sess_user'));
     $sessions = self::table(__CLASS__)->selectObjects('*, COUNT(1) as sessioncount', "sess_time>{$cut} OR sess_id={$sid}", 'user_name ASC', -1, -1, 'sess_user');
     if (!self::haveCookies()) {
         $sessions = array_merge(array(self::$SESSION), $sessions);
     }
     return $sessions;
 }
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:12,代碼來源:GWF_Session.php

示例2: ttr2_request

function ttr2_request(WC_Challenge $chall, GWF_Form $form)
{
    if (false !== ($errors = $form->validate($chall))) {
        return $errors;
    }
    # Generate reset token
    $sid = GWF_Session::getSessSID();
    $email = $form->getVar('email');
    $token = ttr2_random(16);
    if (!TTR2_Tokens::insertToken($sid, $email, $token)) {
        return GWF_HTML::err('ERR_DATABASE', array(__FILE__, __LINE__));
    }
    # If it's your own real mail, even send it for the lulz :)
    if ($email === GWF_User::getStaticOrGuest()->getValidMail()) {
        ttr2_mail_me($chall, $email, $token);
    }
    return GWF_HTML::message($chall->lang('title'), $chall->lang('msg_mail_sent'));
}
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:18,代碼來源:reset.php

示例3: ttr2_submit

function ttr2_submit(WC_Challenge $chall)
{
    if ('' === ($answer = Common::getPostString('answer', ''))) {
        return;
    }
    $sessid = GWF_Session::getSessSID();
    # First check all "custom" solutions
    $solutions = TTR2_Tokens::getSolutions($sessid);
    foreach ($solutions as $solution) {
        if ($solution['ttr_token'] === $answer) {
            echo GWF_HTML::message($chall->lang('title'), $chall->lang('msg_reset_own', array(htmlspecialchars($solution['ttr_email']))));
            return;
        }
    }
    # Now lets check "THE" solution
    $solution = TTR2_Tokens::getSolution($sessid);
    $chall->setSolution($solution['ttr_token']);
    $chall->onSolve(GWF_User::getStaticOrGuest(), $answer);
}
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:19,代碼來源:index.php

示例4: blightGetHash

/**
 * Get the correct solution.
 * This counts as one attemp.
 * @return string|false
 */
function blightGetHash()
{
    blightCountUp();
    # 1 attemp
    $db = blightDB();
    $sessid = GWF_Session::getSessSID();
    $query = "SELECT password FROM blight WHERE sessid={$sessid}";
    if (false === ($result = $db->queryFirst($query))) {
        return false;
    }
    return $result['password'];
}
開發者ID:sinfocol,項目名稱:gwf3,代碼行數:17,代碼來源:vuln.php


注:本文中的GWF_Session::getSessSID方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。