本文整理汇总了PHP中GWF_Session::getSession方法的典型用法代码示例。如果您正苦于以下问题:PHP GWF_Session::getSession方法的具体用法?PHP GWF_Session::getSession怎么用?PHP GWF_Session::getSession使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GWF_Session
的用法示例。
在下文中一共展示了GWF_Session::getSession方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: blightGetHash
/**
* Get the correct solution.
* This counts as one attemp.
* @return string|false
*/
function blightGetHash()
{
blightCountUp();
# 1 attemp
$db = blightDB();
$sessid = GWF_Session::getSession()->getID();
$query = "SELECT password FROM blight WHERE sessid={$sessid}";
if (false === ($result = $db->queryFirst($query))) {
return false;
}
return $result['password'];
}
示例2: getcwd
$_GET['me'] = 'Challenge';
$cwd = getcwd();
require_once 'protected/config.php';
require_once '../gwf3.class.php';
$gwf = new GWF3($cwd, array('website_init' => true, 'autoload_modules' => true, 'load_module' => true, 'get_user' => true, 'do_logging' => true, 'blocking' => false, 'no_session' => false, 'store_last_url' => true, 'ignore_user_abort' => false));
# Need noothtable!
require_once 'challenge/noother/stop_us/noothtable.php';
# Get challenge
define('GWF_PAGE_TITLE', 'Stop us');
if (false === ($chall = WC_Challenge::getByTitle(GWF_PAGE_TITLE))) {
$chall = WC_Challenge::dummyChallenge(GWF_PAGE_TITLE, 3, 'challenge/noother/stop_us/index.php', false);
}
$price = 10.0;
# Price for a domain.
$user = GWF_User::getStaticOrGuest();
$sid = GWF_Session::getSession()->getID();
noothtable::initNoothworks($sid);
# init domain stuff.
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>[WeChall] noother-Domain.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en" />
<meta name="robots" content="index, follow" />
<meta name="keywords" content="wechall, challenge, stopus, stop us, stop_us" />
<meta name="description" content="noother-domain.com is a fictional service selling .xyz domains. It is a hacking challenge on wechall." />
<link rel="shortcut icon" href="/favicon.ico" />