function common() { global $_G; $seccodecheck = $secqaacheck = false; if ($_GET['type'] == 'register') { $seccodecheck = $_G['setting']['seccodestatus'] & 1; $secqaacheck = $_G['setting']['secqaa']['status'] & 1; } elseif ($_GET['type'] == 'login') { $seccodecheck = $_G['setting']['seccodestatus'] & 2; } elseif ($_GET['type'] == 'post') { $seccodecheck = $_G['setting']['seccodestatus'] & 4 && (!$_G['setting']['seccodedata']['minposts'] || getuserprofile('posts') < $_G['setting']['seccodedata']['minposts']); $secqaacheck = $_G['setting']['secqaa']['status'] & 2 && (!$_G['setting']['secqaa']['minposts'] || getuserprofile('posts') < $_G['setting']['secqaa']['minposts']); } $sechash = random(8); if ($seccodecheck || $secqaacheck) { $variable = array('sechash' => $sechash); if ($seccodecheck) { $variable['seccode'] = $_G['siteurl'] . 'api/mobile/index.php?module=seccode&sechash=' . $sechash . '&version=' . (empty($_GET['secversion']) ? '1' : $_GET['secversion']); } if ($secqaacheck) { require_once libfile('function/seccode'); $variable['secqaa'] = make_secqaa($sechash); } } mobile_core::result(mobile_core::variable($variable)); }
function common() { global $_G; list($seccodecheck, $secqaacheck) = seccheck($_GET['type']); $sechash = random(8); if ($seccodecheck || $secqaacheck) { $variable = array('sechash' => $sechash); if ($seccodecheck) { $variable['seccode'] = $_G['siteurl'] . 'api/mobile/index.php?module=seccode&sechash=' . $sechash . '&version=' . (empty($_GET['secversion']) ? '1' : $_GET['secversion']); } if ($secqaacheck) { $variable['secqaa'] = make_secqaa(); } } mobile_core::result(mobile_core::variable($variable)); }
function common() { global $_G; if (!empty($_GET['force'])) { $_G['setting']['seccodedata']['rule'][$_GET['type']]['allow'] = 1; } list($seccodecheck, $secqaacheck) = seccheck($_GET['type']); $sechash = random(8); if ($seccodecheck || $secqaacheck) { $variable = array('sechash' => $sechash); if ($seccodecheck) { $variable['seccode'] = $_G['siteurl'] . 'api/mobile/index.php?module=seccodehtml&sechash=' . $sechash . '&version=4'; } if ($secqaacheck) { $variable['secqaa'] = make_secqaa(); } } mobile_core::result(mobile_core::variable($variable)); }
<option value="1">正方</option> <option value="2">反方</option> </select> </li> <?php } ?> <li><input type="text" value="我也说一句" class="input grey" color="gray" name="message" id="fastpostmessage"></li> <li id="fastpostsubmitline" style="display:none;"><?php if ($secqaacheck || $seccodecheck) { $sechash = 'S' . random(4); $sectpl = !empty($sectpl) ? explode("<sec>", $sectpl) : array('<br />', ': ', '<br />', ''); $ran = random(5, 1); if ($secqaacheck) { $message = ''; $question = make_secqaa(); $secqaa = lang('core', 'secqaa_tips') . $question; } if ($sectpl) { if ($secqaacheck) { ?> <p> 验证问答: <span class="xg2"><?php echo $secqaa; ?> </span> <input name="secqaahash" type="hidden" value="<?php echo $sechash; ?> " />
<?php /** * [Discuz!] (C)2001-2099 Comsenz Inc. * This is NOT a freeware, use is subject to license terms * * $Id: misc_secqaa.php 10395 2010-05-11 04:48:31Z monkey $ */ if (!defined('IN_DISCUZ')) { exit('Access Denied'); } require_once libfile('function/seccode'); if ($_G['gp_action'] == 'update') { $refererhost = parse_url($_SERVER['HTTP_REFERER']); $refererhost['host'] .= !empty($refererhost['port']) ? ':' . $refererhost['port'] : ''; if ($refererhost['host'] != $_SERVER['HTTP_HOST']) { exit('Access Denied'); } $message = ''; if ($_G['setting']['secqaa']) { $question = make_secqaa($_G['gp_idhash']); } include template('common/header_ajax'); echo lang('core', 'secqaa_tips') . $question; include template('common/footer_ajax'); } elseif ($_G['gp_action'] == 'check') { include template('common/header_ajax'); echo check_secqaa($_G['gp_secverify'], $_G['gp_idhash']) ? 'succeed' : 'invalid'; include template('common/footer_ajax'); }
<?php /** * [Discuz!] (C)2001-2099 Comsenz Inc. * This is NOT a freeware, use is subject to license terms * * $Id: misc_secqaa.php 25246 2011-11-02 03:34:53Z zhangguosheng $ */ if (!defined('IN_DISCUZ')) { exit('Access Denied'); } require_once libfile('function/seccode'); if ($_GET['action'] == 'update') { $refererhost = parse_url($_SERVER['HTTP_REFERER']); $refererhost['host'] .= !empty($refererhost['port']) ? ':' . $refererhost['port'] : ''; if ($refererhost['host'] != $_SERVER['HTTP_HOST']) { exit('Access Denied'); } $message = ''; if ($_G['setting']['secqaa']) { $question = make_secqaa($_GET['idhash']); } include template('common/header_ajax'); echo lang('core', 'secqaa_tips') . $question; include template('common/footer_ajax'); } elseif ($_GET['action'] == 'check') { include template('common/header_ajax'); echo check_secqaa($_GET['secverify'], $_GET['idhash']) ? 'succeed' : 'invalid'; include template('common/footer_ajax'); }
<a style="padding: 0px 30px 30px;" href="forum.php?mod=post&action=reply&fid=<?php echo $_G['fid'];?>&tid=<?php echo $_G['tid'];?>&reppost=<?php echo $_G['forum_firstpid'];?>&page=<?php echo $page;?>"></a> </p> </div> </div> <?php if(checkperm('seccode') && ($secqaacheck || $seccodecheck)) { ?> <?php $sechash = 'S'.random(4); $sectpl = !empty($sectpl) ? explode("<sec>", $sectpl) : array('<br />',': ','<br />',''); $secshow = !isset($secshow) ? 1 : $secshow; $sectabindex = !isset($sectabindex) ? 1 : $sectabindex; $ran = random(5, 1);?><?php if($secqaacheck) { include libfile('function/seccode'); $message = ''; $question = make_secqaa($sechash); $secqaa = lang('core', 'secqaa_tips').$question;?><?php } ?><?php $seccheckhtml = <<<EOF <input name="sechash" type="hidden" value="{$sechash}" /> EOF; if($sectpl) { if($secqaacheck) { $seccheckhtml .= <<<EOF <div class="scck xg1">{$secqaa}</div> <p> <input name="secanswer" id="secqaaverify_{$sechash}" type="text" style="width:100%;" /> </p> EOF;