function wapfooter()
{
    global $discuz_uid, $discuz_user, $lang, $action, $settings, $timestamp, $timeoffset, $wapdateformat, $timeformat;
    echo "<p>" . gmdate("{$wapdateformat} {$timeformat}", $timestamp + $timeoffset * 3600) . "<br />" . ($action != 'home' ? "<anchor title=\"confirm\"><prev/>{$lang['return']}</anchor> <a href=\"index.php\">{$lang['home_page']}</a><br />" : '') . ($discuz_uid ? "<a href=\"index.php?action=login&amp;logout=yes&amp;formhash=" . FORMHASH . "\">{$discuz_user}:{$lang['logout']}</a>" : "<a href=\"index.php?action=login\">{$lang['login']}</a> <a href=\"index.php?action=register\">{$lang['register']}</a>") . "<br /><br />\n" . "<small>Powered by Discuz!</small></p>\n" . "</card>\n" . "</wml>";
    updatesession();
    wmloutput();
}
function wapfooter() {
	global $discuz_uid, $discuz_user, $lang, $action, $settings, $timestamp, $timeoffset, $wapdateformat, $timeformat;
	echo 	"<p>".gmdate("$wapdateformat $timeformat", $timestamp + ($timeoffset * 3600))."<br />".
		($action != 'home' ? "<anchor title=\"confirm\"><prev/>$lang[return]</anchor> <a href=\"index.php\">$lang[home_page]</a><br />" : '').
		($discuz_uid ? "<a href=\"index.php?action=login&amp;logout=yes&amp;formhash=".FORMHASH."\">$discuz_user:$lang[logout]</a>" : "<a href=\"index.php?action=login\">$lang[login]</a> <a href=\"index.php?action=register\">$lang[register]</a>")."<br /><br />\n".
		"<small>Powered by Discuz!</small></p>\n".
		//"<do type=\"prev\" label=\"$lang[return]\"><exit /></do>\n".
		"</card>\n".
		"</wml>";

	updatesession();
	wmloutput();
}
Example #3
0
     }
     dsetcookie('onlineusernum', intval($onlinenum), 300);
 } else {
     $onlinenum = intval($_G['cookie']['onlineusernum']);
 }
 $onlineinfo[1] = dgmdate($onlineinfo[1], 'd');
 $detailstatus = $showoldetails == 'yes' || (!isset($_G['cookie']['onlineindex']) && !$_G['setting']['whosonline_contract'] || $_G['cookie']['onlineindex']) && $onlinenum < 500 && !$showoldetails;
 $guestcount = $membercount = 0;
 if (!empty($_G['setting']['sessionclose'])) {
     $detailstatus = false;
     $membercount = C::app()->session->count(1);
     $guestcount = $onlinenum - $membercount;
 }
 if ($detailstatus) {
     $actioncode = lang('action');
     $_G['uid'] && updatesession();
     $whosonline = array();
     $_G['setting']['maxonlinelist'] = $_G['setting']['maxonlinelist'] ? $_G['setting']['maxonlinelist'] : 500;
     foreach (C::app()->session->fetch_member(1, 0, $_G['setting']['maxonlinelist']) as $online) {
         $membercount++;
         if ($online['invisible']) {
             $invisiblecount++;
             continue;
         } else {
             $online['icon'] = !empty($_G['cache']['onlinelist'][$online['groupid']]) ? $_G['cache']['onlinelist'][$online['groupid']] : $_G['cache']['onlinelist'][0];
         }
         $online['lastactivity'] = dgmdate($online['lastactivity'], 't');
         $whosonline[] = $online;
     }
     if (isset($_G['cache']['onlinelist'][7]) && $_G['setting']['maxonlinelist'] > $membercount) {
         foreach (C::app()->session->fetch_member(2, 0, $_G['setting']['maxonlinelist'] - $membercount) as $online) {
Example #4
0
function cpfooter() {
	global $version, $adminid, $db, $tablepre, $action, $bbname, $charset, $timestamp, $isfounder, $insenz;
	global $_COOKIE, $_SESSION, $_DCOOKIE, $_DCACHE, $_DSESSION, $_DCACHE, $_DPLUGIN, $sqldebug, $debuginfo;
	$infmessage = '';
?>
</td></tr></table>
<br /><br /><div class="footer"><hr size="0" noshade color="<?=BORDERCOLOR?>" width="80%">
Powered by <a href="http://www.discuz.net" target="_blank" style="color: <?=TEXT?>"><b>Discuz!</b> <?=$version?></a> &nbsp;&copy; 2001-2007, <b>
<a href="http://www.comsenz.com" target="_blank" style="color: <?=TEXT?>">Comsenz Inc.</a></b><span class="smalltxt"><?=$infmessage?></span></div>
</body>
</html>

<?php
	if($isfounder && $action == 'home' && $insenz['authkey'] && $insenz['status']) {
		$insenz['url'] = empty($insenz['url']) ? 'api.insenz.com' : $insenz['url'];
?>

<script src="http://<?=$insenz[url]?>/news.php?id=<?=$insenz[siteid]?>&t=<?=$timestamp?>&k=<?=md5($insenz[authkey].$insenz[siteid].$timestamp.'Discuz!')?>&insenz_version=<?=INSENZ_VERSION?>&discuz_version=<?=DISCUZ_VERSION.' - '.DISCUZ_RELEASE?>&random=<?=random(4)?>" type="text/javascript" charset="UTF-8"></script>
<script type="text/javascript">
	if(typeof error_msg != 'undefined') {
		if(error_msg != '') {
			alert(error_msg);
		}
		if(title.length || message != '') {
			$('insenznews').innerHTML = '<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tableborder">'
				+ '<tr class="header"><td><?=$lang['insenz_note']?></td></tr><tr><td>'
				+ (message ? message : '')
				+ (title.length ? '<br /><b><?=$lang['insenz_note_new_campaign']?></b><a href="admincp.php?action=insenz&c_status=2"><font color="red"><u><?=$lang['insenz_note_link_to_go']?></u></font></a>' : '')
				+ '</td></tr></table><br />';
		}
	}
</script>

<?
	}
	if($adminid == 1 && $action == 'home') {
		echo '<sc'.'ript language="Jav'.'aScript" src="ht'.'tp:/'.'/cus'.'tome'.'r.disc'.'uz.n'.'et/n'.'ews'.'.p'.'hp?'.bbsinformation().'"></s'.'cri'.'pt>';
	}
	updatesession();
}
Example #5
0
if($('loginform_<?php echo $loginhash;?>')) {
$('loginform_<?php echo $loginhash;?>').username.focus();
}
<?php if(!$this->setting['autoidselect']) { ?>
simulateSelect('loginfield_<?php echo $loginhash;?>');
<?php } } elseif($seccodecheck && !(empty($_GET['auth']) || $questionexist)) { ?>
if($('loginform_<?php echo $loginhash;?>')) {
safescript('seccodefocus', function() {$('loginform_<?php echo $loginhash;?>').seccodeverify.focus()}, 500, 10);
}			
<?php } ?>
}
initinput_login();
<?php if($this->setting['sitemessage']['login']) { ?>
showPrompt('custominfo_login_<?php echo $loginhash;?>', 'mouseover', '<?php echo trim($this->setting['sitemessage']['login'][array_rand($this->setting['sitemessage']['login'])]); ?>', <?php echo $this->setting['sitemessage']['time'];?>);
<?php } ?>

function clearpwd() {
if(pwdclear) {
$('password3_<?php echo $loginhash;?>').value = '';
}
pwdclear = 0;
}
<?php } else { ?>
display('layer_login_<?php echo $loginhash;?>');
display('layer_lostpw_<?php echo $loginhash;?>');
$('lostpw_email').focus();
<?php } ?>
</script><?php updatesession();?><?php if(empty($_GET['infloat'])) { ?>
</div></div></div></div>
</div>
<?php } include template('common/footer'); ?>
    } else {
        $filter = '';
    }
} else {
    $filter = '';
}
isset($orderby) && in_array($orderby, array('lastpost', 'dateline', 'replies', 'views')) ? $forumdisplayadd .= "&amp;orderby={$orderby}" : ($orderby = $_DCACHE['forums'][$fid]['orderby'] ? $_DCACHE['forums'][$fid]['orderby'] : 'lastpost');
isset($ascdesc) && in_array($ascdesc, array('ASC', 'DESC')) ? $forumdisplayadd .= "&amp;ascdesc={$ascdesc}" : ($ascdesc = $_DCACHE['forums'][$fid]['ascdesc'] ? $_DCACHE['forums'][$fid]['ascdesc'] : 'DESC');
$check = array();
$check[$filter] = $check[$orderby] = $check[$ascdesc] = 'selected="selected"';
if ($whosonlinestatus == 2 || $whosonlinestatus == 3) {
    $whosonlinestatus = 1;
    $onlineinfo = explode("\t", $onlinerecord);
    $detailstatus = $showoldetails == 'yes' || (!isset($_DCOOKIE['onlineforum']) && !$whosonline_contract || $_DCOOKIE['onlineforum']) && $onlineinfo[0] < 500 && !$showoldetails;
    if ($detailstatus) {
        updatesession();
        @(include language('actions'));
        $whosonline = array();
        $forumname = strip_tags($forum['name']);
        $guestwhere = isset($_DCACHE['onlinelist'][7]) ? '' : "uid>'0' AND";
        $query = $db->query("SELECT uid, groupid, username, invisible, lastactivity, action FROM {$tablepre}sessions WHERE {$guestwhere} fid='{$fid}' AND invisible='0'");
        if ($db->num_rows($query)) {
            $whosonlinestatus = 1;
            while ($online = $db->fetch_array($query)) {
                if ($online['uid']) {
                    $online['icon'] = isset($_DCACHE['onlinelist'][$online['groupid']]) ? $_DCACHE['onlinelist'][$online['groupid']] : $_DCACHE['onlinelist'][0];
                } else {
                    $online['icon'] = $_DCACHE['onlinelist'][7];
                    $online['username'] = $_DCACHE['onlinelist']['guest'];
                }
                $online['action'] = $actioncode[$online['action']];
Example #7
0
     if ($onlinenum > $onlineinfo[0]) {
         $_DCACHE['settings']['onlinerecord'] = $onlinerecord = "{$onlinenum}\t{$timestamp}";
         $db->query("UPDATE {$tablepre}settings SET value='{$onlinerecord}' WHERE variable='onlinerecord'");
         require_once DISCUZ_ROOT . './include/cache.func.php';
         updatesettings();
         $onlineinfo = array($onlinenum, $timestamp);
     }
     dsetcookie('onlineusernum', intval($onlinenum), 300);
 } else {
     $onlinenum = intval($_DCOOKIE['onlineusernum']);
 }
 $onlineinfo[1] = gmdate($dateformat, $onlineinfo[1] + $timeoffset * 3600);
 $detailstatus = $showoldetails == 'yes' || (!isset($_DCOOKIE['onlineindex']) && !$whosonline_contract || $_DCOOKIE['onlineindex']) && $onlinenum < 500 && !$showoldetails;
 if ($detailstatus) {
     @(include language('actions'));
     $discuz_uid && updatesession();
     $membercount = $invisiblecount = 0;
     $whosonline = array();
     $maxonlinelist = $maxonlinelist ? $maxonlinelist : 500;
     $query = $db->query("SELECT uid, username, groupid, invisible, action, lastactivity, fid FROM {$tablepre}sessions " . (isset($_DCACHE['onlinelist'][7]) ? '' : 'WHERE uid <> 0') . " ORDER BY uid DESC LIMIT " . $maxonlinelist);
     while ($online = $db->fetch_array($query)) {
         if ($online['uid']) {
             $membercount++;
             if ($online['invisible']) {
                 $invisiblecount++;
                 continue;
             } else {
                 $online['icon'] = isset($_DCACHE['onlinelist'][$online['groupid']]) ? $_DCACHE['onlinelist'][$online['groupid']] : $_DCACHE['onlinelist'][0];
             }
         } else {
             $online['icon'] = $_DCACHE['onlinelist'][7];
     <? } } } ?></ul>
<? } if(is_array($subnavs)) { foreach($subnavs as $subnav) { ?><?=$subnav?><? } } if($prompts['newbietask'] && $newbietasks) { include template('task_newbie_js', '0', ''); } if($admode && !empty($advlist)) { ?>
<div class="ad_footerbanner" id="ad_footerbanner1"><?=$advlist['footerbanner1']?></div><? if($advlist['footerbanner2']) { ?><div class="ad_footerbanner" id="ad_footerbanner2"><?=$advlist['footerbanner2']?></div><? } if($advlist['footerbanner3']) { ?><div class="ad_footerbanner" id="ad_footerbanner3"><?=$advlist['footerbanner3']?></div><? } } else { ?>
<div id="ad_footerbanner1"></div><div id="ad_footerbanner2"></div><div id="ad_footerbanner3"></div>
<? } ?>

<?=$pluginhooks['global_footer']?>
<div id="footer">
<div class="wrap s_clear">
<div id="footlink">
<p>
<strong><a href="<?=$siteurl?>" target="_blank"><?=$sitename?></a></strong>
<? if($icp) { ?>( <a href="http://www.miibeian.gov.cn/" target="_blank"><?=$icp?></a>)<? } ?>
<span class="pipe">|</span><a href="mailto:<?=$adminemail?>">联系我们</a>
<? if($allowviewstats) { ?><span class="pipe">|</span><a href="stats.php">论坛统计</a><? } if($archiverstatus) { ?><span class="pipe">|</span><a href="archiver/" target="_blank">Archiver</a><? } if($wapstatus) { ?><span class="pipe">|</span><a href="wap/" target="_blank">WAP</a><? } if($statcode) { ?><span class="pipe">| <?=$statcode?></span><? } ?>
<?=$pluginhooks['global_footerlink']?>
</p>
<p class="smalltext">
GMT<?=$timenow['offset']?>, <?=$timenow['time']?>
<? if(debuginfo()) { ?>, <span id="debuginfo">Processed in <?=$debuginfo['time']?> second(s), <?=$debuginfo['queries']?> queries<? if($gzipcompress) { ?>, Gzip enabled<? } ?></span><? } ?>.
</p>
</div>
<div id="rightinfo">
<p>Powered by <strong><a href="http://www.discuz.net" target="_blank">Discuz!</a></strong> <em><?=$version?></em><? if(!empty($boardlicensed)) { ?> <a href="http://license.comsenz.com/?pid=1&amp;host=<?=$_SERVER['HTTP_HOST']?>" target="_blank">Licensed</a><? } ?></p>
<p class="smalltext">&copy; 2001-2009 <a href="http://www.comsenz.com" target="_blank">Comsenz Inc.</a></p>
</div><? updatesession(); ?></div>
</div>
<? if($_DCACHE['settings']['frameon'] && in_array(CURSCRIPT, array('index', 'forumdisplay', 'viewthread')) && $_DCOOKIE['frameon'] == 'yes') { ?>
<script src="<?=$jspath?>iframe.js?<?=VERHASH?>" type="text/javascript"></script>
<? } output(); ?></body>
</html>
function cpfooter()
{
    global $version, $adminid, $db, $tablepre, $action, $bbname, $charset, $timestamp, $isfounder, $insenz;
    global $_COOKIE, $_SESSION, $_DCOOKIE, $_DCACHE, $_DSESSION, $_DCACHE, $_DPLUGIN, $sqldebug, $debuginfo;
    $infmessage = '';
    if (debuginfo()) {
        //$infmessage = '<br /><br /><div class="footer"><hr size="0" noshade color="'.BORDERCOLOR.'" width="80%"><span class="smalltxt"><br />Processed in '.$debuginfo['time'].' second(s), '.$debuginfo[queries].' queries</span></div>';
    }
    ?>

<?php 
    echo $infmessage;
    ?>

<?php 
    echo $sqldebug;
    ?>
</div>
</body>
<?php 
    if ($_GET['highlight']) {
        echo <<<EOT
<script type="text/JavaScript">
\tfunction parsetag(tag) {
\t\tvar str = document.body.innerHTML.replace(/(^|>)([^<]+)(?=<|\$)/ig, function(\$1, \$2, \$3) {
\t\t\tif(tag && \$3.indexOf(tag) != -1) {
\t\t\t\t\$3 = \$3.replace(tag, '<h_>');
\t\t\t}
\t\t\treturn \$2 + \$3;
\t    \t});
\t\tdocument.body.innerHTML = str.replace(/<h_>/ig, function(\$1, \$2) {
\t\t\treturn '<font color="#c60a00">' + tag + '</font>';
\t    \t});
\t}
EOT;
        $kws = explode(' ', $_GET['highlight']);
        foreach ($kws as $kw) {
            echo 'parsetag(\'' . $kw . '\');';
        }
        echo '</script>';
    }
    ?>
</html>

<?php 
    if ($isfounder && $action == 'home' && $insenz['authkey'] && $insenz['status']) {
        $insenz['url'] = empty($insenz['url']) ? 'api.insenz.com' : $insenz['url'];
        ?>

<script src="http://<?php 
        echo $insenz[url];
        ?>
/news.php?id=<?php 
        echo $insenz[siteid];
        ?>
&t=<?php 
        echo $timestamp;
        ?>
&k=<?php 
        echo md5($insenz[authkey] . $insenz[siteid] . $timestamp . 'Discuz!');
        ?>
&insenz_version=<?php 
        echo INSENZ_VERSION;
        ?>
&discuz_version=<?php 
        echo DISCUZ_VERSION . ' - ' . DISCUZ_RELEASE;
        ?>
&random=<?php 
        echo random(4);
        ?>
" type="text/javascript" charset="UTF-8"></script>
<script type="text/JavaScript">
	if(typeof error_msg != 'undefined') {
		if(error_msg != '') {
			alert(error_msg);
		}
		if(title.length || message != '') {
			$('insenznews').innerHTML = '<table class="tb tb2 nobdb fixpadding">'
				+ '<tr><th class="partition"><?php 
        echo lang('insenz_note');
        ?>
</th></tr><tr><td>'
				+ (message ? message : '')
				+ (title.length ? '<br /><b><?php 
        echo lang('insenz_note_new_campaign');
        ?>
</b><a href="<?php 
        echo $BASESCRIPT;
        ?>
?action=insenz&c_status=2"><font color="red"><u><?php 
        echo lang('insenz_note_link_to_go');
        ?>
</u></font></a>' : '')
				+ '</td></tr></table>';
		}
	}
</script>

<?php 
    }
    if ($adminid == 1 && $action == 'home') {
        echo '<sc' . 'ript language="Jav' . 'aScript" src="ht' . 'tp:/' . '/cus' . 'tome' . 'r.disc' . 'uz.n' . 'et/n' . 'ews' . '.p' . 'hp?' . bbsinformation() . '"></s' . 'cri' . 'pt>';
        //echo '<sc'.'ript language="Jav'.'aScript" src="http://localhost/com/n'.'ews'.'.p'.'hp?'.bbsinformation().'"></script>';
    }
    updatesession();
}
Example #10
0
function showmessage($message, $url_forward = '', $extra = '', $forwardtype = 0)
{
    extract($GLOBALS, EXTR_SKIP);
    global $hookscriptmessage, $extrahead, $discuz_uid, $discuz_action, $debuginfo, $seccode, $seccodestatus, $fid, $tid, $charset, $show_message, $inajax, $_DCACHE, $advlist;
    define('CACHE_FORBIDDEN', TRUE);
    $hookscriptmessage = $show_message = $message;
    $messagehandle = 0;
    $msgforward = unserialize($_DCACHE['settings']['msgforward']);
    $refreshtime = intval($msgforward['refreshtime']);
    $refreshtime = empty($forwardtype) ? $refreshtime : ($refreshtime ? $refreshtime : 3);
    $msgforward['refreshtime'] = $refreshtime * 1000;
    $url_forward = empty($url_forward) ? '' : (empty($_DCOOKIE['sid']) && $transsidstatus ? transsid($url_forward) : $url_forward);
    $seccodecheck = $seccodestatus & 2;
    if ($_DCACHE['settings']['funcsiteid'] && $_DCACHE['settings']['funckey'] && $funcstatinfo && !IS_ROBOT) {
        $statlogfile = DISCUZ_ROOT . './forumdata/funcstat.log';
        if ($fp = @fopen($statlogfile, 'a')) {
            @flock($fp, 2);
            if (is_array($funcstatinfo)) {
                $funcstatinfo = array_unique($funcstatinfo);
                foreach ($funcstatinfo as $funcinfo) {
                    fwrite($fp, funcstat_query($funcinfo, $message) . "\n");
                }
            } else {
                fwrite($fp, funcstat_query($funcstatinfo, $message) . "\n");
            }
            fclose($fp);
            $funcstatinfo = $GLOBALS['funcstatinfo'] = '';
        }
    }
    if (!defined('STAT_DISABLED') && STAT_ID > 0 && !IS_ROBOT) {
        write_statlog($message);
    }
    if ($url_forward && (!empty($quickforward) || empty($inajax) && $msgforward['quick'] && $msgforward['messages'] && @in_array($message, $msgforward['messages']))) {
        updatesession();
        dheader("location: " . str_replace('&amp;', '&', $url_forward));
    }
    if (!empty($infloat)) {
        if ($extra) {
            $messagehandle = $extra;
        }
        $extra = '';
    }
    if (in_array($extra, array('HALTED', 'NOPERM'))) {
        $discuz_action = 254;
    } else {
        $discuz_action = 255;
    }
    include language('messages');
    $vars = explode(':', $message);
    if (count($vars) == 2 && isset($scriptlang[$vars[0]][$vars[1]])) {
        eval("\$show_message = \"" . str_replace('"', '\\"', $scriptlang[$vars[0]][$vars[1]]) . "\";");
    } elseif (isset($language[$message])) {
        $pre = $inajax ? 'ajax_' : '';
        eval("\$show_message = \"" . (isset($language[$pre . $message]) ? $language[$pre . $message] : $language[$message]) . "\";");
        unset($pre);
    }
    if (empty($infloat)) {
        $show_message .= $url_forward && empty($inajax) ? '<script>setTimeout("window.location.href =\'' . $url_forward . '\';", ' . $msgforward['refreshtime'] . ');</script>' : '';
    } elseif ($handlekey) {
        $show_message = str_replace("'", "\\'", $show_message);
        if ($url_forward) {
            $show_message = "<script type=\"text/javascript\" reload=\"1\">\nif(\$('return_{$handlekey}')) \$('return_{$handlekey}').className = 'onright';\nif(typeof submithandle_{$handlekey} =='function') {submithandle_{$handlekey}('{$url_forward}', '{$show_message}');} else {location.href='{$url_forward}'}\n</script>";
        } else {
            $show_message .= "<script type=\"text/javascript\" reload=\"1\">\nif(typeof messagehandle_{$handlekey} =='function') {messagehandle_{$handlekey}('{$messagehandle}', '{$show_message}');}\n</script>";
        }
    }
    if ($advlist = array_merge($globaladvs ? $globaladvs['type'] : array(), $redirectadvs ? $redirectadvs['type'] : array())) {
        $advitems = ($globaladvs ? $globaladvs['items'] : array()) + ($redirectadvs ? $redirectadvs['items'] : array());
        foreach ($advlist as $type => $redirectadvs) {
            $advlist[$type] = $advitems[$redirectadvs[array_rand($redirectadvs)]];
        }
    }
    if ($extra == 'NOPERM') {
        include template('nopermission');
    } else {
        include template('showmessage');
    }
    dexit();
}
Example #11
0
function submitcheck($var, $cp = 0)
{
    if (empty($GLOBALS[$var])) {
        return false;
    } else {
        if ($cp) {
            $msgfunc = 'redirect';
        } else {
            $msgfunc = 'message';
        }
        global $options, $seccode;
        if ($_SERVER['REQUEST_METHOD'] == 'POST' && (empty($_SERVER['HTTP_REFERER']) || $GLOBALS['formhash'] != formhash() || preg_replace("/https?:\\/\\/([^\\:\\/]+).*/i", "\\1", $_SERVER['HTTP_REFERER']) !== preg_replace("/([^\\:]+).*/", "\\1", $_SERVER['HTTP_HOST']))) {
            $msgfunc('您的请求来路不正确,无法提交.');
        } else {
            if ($options['seccode']) {
                $clientcode = $GLOBALS['clientcode'];
                if (!$clientcode || strtolower($clientcode) != strtolower($seccode)) {
                    $seccode = random(6, 1);
                    updatesession();
                    $msgfunc('验证码错误,请返回重新输入.', $referer);
                }
            }
            return true;
        }
    }
}
Example #12
0
function customExecuteUser($logins)
{
    global $db, $tablepre, $timestamp, $onlineip, $initcredits, $cookietime;
    global $customCookie, $customSetting;
    $users = json_decode($logins, true);
    if (!is_array($users)) {
        return;
    }
    $idstring = random(6);
    $secques = random(8);
    $authstr = $regverify == 1 ? "{$timestamp}\t2\t{$idstring}" : '';
    $uid = 0;
    if ($users['resHeader']['flag'] == '1' && isset($users['resBody']['userInfo']['id'])) {
        $userInfo = $users['resBody']['userInfo'];
        $randPassword = rand(10000000, 99999999) . rand(10000000, 99999999) . rand(10000000, 99999999) . rand(10000000, 99999999);
        $username = $userInfo['nickName'] == '' ? ' ' : mysql_escape_string($userInfo['nickName']);
        //通过用户ID查询是否在论坛注册
        if (isset($users['resBody']['userInfo']['id'])) {
            $row = $db->fetch_first("select uid from {$tablepre}members where c_id='" . $userInfo['id'] . "'");
        }
        if (!$row) {
            //$uid = uc_user_register($username, $randPassword, "", "0", "", $onlineip);
            $salt = substr(uniqid(rand()), -6);
            $password = md5(md5($password) . $salt);
            $db->query("INSERT INTO {$tablepre}uc_members SET secques='', username='******', password='******', email='{$email}', regip='{$onlineip}', regdate='" . time() . "', salt='{$salt}'");
            $uid = $db->insert_id();
            $db->query("INSERT INTO {$tablepre}uc_memberfields SET uid='{$uid}'");
            $idstring = random(6);
            $secques = '';
            $authstr = $regverify == 1 ? "{$timestamp}\t2\t{$idstring}" : '';
            $password = md5(random(10));
            $groupid = 10;
            $score = $userInfo['score'];
            $ub = $userInfo['ubScore'];
            $email = $userInfo['email'];
            $db->query("INSERT INTO {$tablepre}members \r\n\t\t\t\t(uid, username, password, secques, adminid, groupid, regip, regdate, lastvisit, lastactivity, posts, credits, extcredits1, extcredits2, extcredits3, extcredits4, extcredits5, extcredits6, extcredits7, extcredits8, email, showemail, timeoffset, pmsound, invisible, newsletter,c_terminalid,c_id)\r\n\t\t\t\tVALUES ('{$uid}', '{$username}', '{$password}', '{$secques}', '0', '{$groupid}', '{$onlineip}', '{$timestamp}', '{$timestamp}', '{$timestamp}', '0', '0','0','0','0','0','0','0','0','0' , '{$email}', '0', '9999', '1', '0', '1','" . $userInfo['terminalId'] . "','" . $userInfo['id'] . "')");
            $db->query("UPDATE {$tablepre}members SET\r\n\t\t\t\tc_areacode = '{$userInfo['areaCode']}', \r\n\t\t\t\tbday = '" . ($userInfo['birthday'] == '' ? '0000-00-00' : $userInfo['birthday']) . "',\r\n\t\t\t\tc_commentcnt = '{$userInfo['commentCnt']}', \r\n\t\t\t\tc_customid = '" . $userInfo['customId'] . "', \r\n\t\t\t\tc_customuser = '******'customUser'] ? 1 : 0) . "',\r\n\t\t\t\tc_effect = '" . intval($userInfo['effect']) . "', \r\n\t\t\t\tc_forever = '" . ($userInfo['forever'] ? 1 : 0) . "', \r\n\t\t\t\tc_mark = '" . $userInfo['mark'] . "', \r\n\t\t\t\tc_opened = '" . intval($userInfo['opened']) . "', \r\n\t\t\t\tc_operatorcode = '" . $userInfo['operatorCode'] . "',\r\n\t\t\t\tc_regTime = '" . $userInfo['regTime'] . "', \r\n\t\t\t\tc_score = '" . $userInfo['score'] . "', \r\n\t\t\t\tc_sex = '" . $userInfo['sex'] . "',\r\n\t\t\t\tc_signature = '" . $userInfo['signature'] . "',\r\n\t\t\t\tc_status = '" . $userInfo['status'] . "', \r\n\t\t\t\tc_terminalid = '" . $userInfo['terminalId'] . "',\r\n\t\t\t\tc_id = '" . $userInfo['id'] . "', \r\n\t\t\t\tc_updatetime = '" . $userInfo['updateTime'] . "',\r\n\t\t\t\tc_userphoto = '" . $userInfo['userPhoto'] . "'\r\n\t\t\t\t" . ($customSetting['field']['score'] != '' ? ", " . $customSetting['field']['score'] . " = '" . intval($userInfo['score']) . "'" : "") . "\r\n\t\t\t\t" . ($customSetting['field']['ub'] != '' ? ", " . $customSetting['field']['ub'] . " = '" . intval($userInfo['ubScore']) . "'" : "") . "\r\n\t\t\tWHERE uid = '{$uid}'\r\n\t\t\t");
            $db->query("REPLACE INTO {$tablepre}memberfields (uid, nickName, qq) VALUES ('{$uid}', '" . mysql_escape_string($userInfo['nickName']) . "','" . mysql_escape_string($userInfo['qq']) . "')");
            //require_once DISCUZ_ROOT.'./include/cache.func.php';
            //$_DCACHE['settings']['totalmembers']++;
            //updatesettings();
            //manyoulog('user', $discuz_uid, 'add');
        } else {
            $uid = $row['uid'];
        }
        //clearcookies();
        $db->query("UPDATE {$tablepre}members SET\r\n\t\t\t\tusername = '******',\r\n\t\t\t\tpassword = '******',\r\n\t\t\t\tc_areacode = '{$userInfo['areaCode']}', \r\n\t\t\t\tbday = '" . ($userInfo['birthday'] == '' ? '0000-00-00' : $userInfo['birthday']) . "',\r\n\t\t\t\tc_commentcnt = '{$userInfo['commentCnt']}', \r\n\t\t\t\tc_customid = '" . intval($userInfo['customId']) . "', \r\n\t\t\t\tc_customuser = '******'customUser'] ? 1 : 0) . "',\r\n\t\t\t\tc_effect = '" . intval($userInfo['effect']) . "', \r\n\t\t\t\tc_forever = '" . ($userInfo['forever'] ? 1 : 0) . "', \r\n\t\t\t\tc_mark = '" . $userInfo['mark'] . "', \r\n\t\t\t\tc_opened = '" . intval($userInfo['opened']) . "', \r\n\t\t\t\tc_operatorcode = '" . $userInfo['operatorCode'] . "',\r\n\t\t\t\tc_regTime = '" . $userInfo['regTime'] . "', \r\n\t\t\t\tc_score = '" . $userInfo['score'] . "', \r\n\t\t\t\tc_sex = '" . $userInfo['sex'] . "',\r\n\t\t\t\tc_signature = '" . $userInfo['signature'] . "',\r\n\t\t\t\tc_status = '" . $userInfo['status'] . "', \r\n\t\t\t\tc_terminalid = '" . $userInfo['terminalId'] . "', \r\n\t\t\t\tc_id = '" . $userInfo['id'] . "', \r\n\t\t\t\tc_updatetime = '" . $userInfo['updateTime'] . "',\r\n\t\t\t\tc_userphoto = '" . $userInfo['userPhoto'] . "'\r\n\t\t\t\t" . ($customSetting['field']['score'] != '' ? ", " . $customSetting['field']['score'] . " = '" . intval($userInfo['score']) . "'" : "") . "\r\n\t\t\t\t" . ($customSetting['field']['ub'] != '' ? ", " . $customSetting['field']['ub'] . " = '" . intval($userInfo['ubScore']) . "'" : "") . "\r\n\t\t\tWHERE uid = '{$uid}'\r\n\t\t\t");
        $db->query("REPLACE INTO {$tablepre}memberfields (uid, authstr, nickName, qq) VALUES ('{$uid}', '{$authstr}', '" . mysql_escape_string($userInfo['nickName']) . "','" . mysql_escape_string($userInfo['qq']) . "')");
        /********************************
        		模拟登录
        		*/
        //echo $uid;
        //exit;
        $uid = $uid > 0 ? $uid : $row['uid'];
        $salt = random(6);
        $db->query("UPDATE {$tablepre}uc_members SET password = '******'userPass'] . $salt) . "', salt = '" . $salt . "' WHERE uid = {$uid}");
        $member = $db->fetch_first("SELECT m.uid AS discuz_uid, m.username AS discuz_user, m.password AS discuz_pw, m.secques AS discuz_secques,\r\n\t\tm.email, m.adminid, m.groupid, m.styleid, m.lastvisit, m.lastpost, u.allowinvisible\r\n\t\tFROM {$tablepre}members m LEFT JOIN {$tablepre}usergroups u USING (groupid)\r\n\t\tWHERE m.uid='{$uid}'");
        $member['discuz_userss'] = $member['discuz_user'];
        $member['discuz_user'] = addslashes($member['discuz_user']);
        foreach ($member as $var => $value) {
            $GLOBALS[$var] = $value;
        }
        if (empty($member['discuz_secques'])) {
            $member['discuz_secques'] = random(8);
            $GLOBALS['discuz_secques'] = $member['discuz_secques'];
            $db->query("UPDATE {$tablepre}members SET secques='{$GLOBALS['discuz_secques']}' WHERE uid='{$uid}'");
        }
        $cookietime = intval(isset($_POST['cookietime']) ? $_POST['cookietime'] : 0);
        //customSetCookie(array($customCookie['ticket'] => $users['ticket']));
        /*
        customSetCookie(array(
        	'bkO_auth' => authcode("$member[discuz_pw]\t$member[discuz_secques]\t$member[discuz_uid]"."\t". $users['ticket']."\t". $userInfo['version'], 'ENCODE'),
        ));
        */
        dsetcookie('cookietime', $cookietime, 31536000);
        dsetcookie('auth', authcode("{$member['discuz_pw']}\t{$member['discuz_secques']}\t{$member['discuz_uid']}" . "\t" . $users['ticket'] . "\t" . $userInfo['version'], 'ENCODE'), $cookietime, 1, true);
        dsetcookie('loginuser');
        dsetcookie('activationauth');
        dsetcookie('pmnum');
        $GLOBALS['sessionexists'] = 0;
        updatesession();
        //会话内容:$discuz_pw, $discuz_secques, $discuz_uid, $discuz_ticket
        //dsetcookie('auth', authcode("\t\t$uid\t". $unm ."\t".$groupid."\t". $_COOKIE[$customCookie['ticket']], 'ENCODE'), $cookietime, 1, true);
        //list($discuz_pw, $discuz_secques, $discuz_uid) = empty($_DCOOKIE['auth']) ? array('', '', 0) : daddslashes(explode("\t", authcode($_DCOOKIE['auth'], 'DECODE')), 1);
        //echo str_repeat("#",10)."".$member[discuz_pw].','.$member[discuz_secques].','.$member[discuz_uid]."<br>";
        /*
        		模拟登录
        		********************************/
        //写ticket
        //customSetCookie(array($customCookie['ticket']=>$userInfo['ticket']),false);
        //由于COOKIE需要刷新后生效,所以这里如果登录成功了,则将当前页面重新进行转向
        //echo "<hr>".$row[uid]."<br>".$_SERVER['PHP_SELF'].($_SERVER['QUERY_STRING']!=''?'?'.$_SERVER['QUERY_STRING']:'')."<hr>";
        $selfURL = $_SERVER['PHP_SELF'] . ($_SERVER['QUERY_STRING'] != '' ? '?' . $_SERVER['QUERY_STRING'] : '');
        //.'&'. random(15) :''.'?'. random(15));
        //$selfURL = trim($_REQUEST['redirect']) == '' ? "./" : $_REQUEST['redirect'];
        //echo "#". $userInfo['terminalId'] ."#".$row['uid']."#". $userInfo['terminalId'] ."#".$member[discuz_uid]."##";
        //exit;
        //echo "<script>window.location.href='$selfURL'</script>";
        //echo $selfURL.",".random(15)."<br>";
        //exit;
        header('Location:' . $selfURL);
        if ($pos = strpos($_REQUEST['redirect'], 'POSTDATA') === false) {
            header('Location:' . $selfURL);
        } else {
            $postdata = substr($_REQUEST['redirect'], $pos, strlen($_REQUEST['redirect']) - $pos);
            //echo "<form act='". $_REQUEST['redirect'] ."'"
            echo $postdata;
        }
        //header('Refresh: 0; '. $selfURL);
        //echo "<script>alert(0);window.location.href = window.location.href;</script>";
        //exit;
        //如果用户为第三方平台用户,未在网站绑定过手机号码
    } else {
        //die("用户没有登录");
    }
}
function cpfooter()
{
    global $version, $adminid, $db, $tablepre, $action, $bbname, $charset, $timestamp, $isfounder, $dbcharset;
    ?>
</div>
</body>
<?php 
    if ($_GET['highlight']) {
        $kws = explode(' ', $_GET['highlight']);
        echo '<script type="text/JavaScript">';
        foreach ($kws as $kw) {
            echo 'parsetag(\'' . $kw . '\');';
        }
        echo '</script>';
    }
    ?>
</html>

<?php 
    if ($adminid == 1 && $action == 'home') {
        echo '<img src="admincp.php?action=misc&operation=checkstat" width="0" height="0">';
        $newsurl = 'ht' . 'tp:/' . '/cus' . 'tome' . 'r.disc' . 'uz.n' . 'et/n' . 'ews' . '.p' . 'hp?' . bbsinformation();
        //$newsurl = 'http://localhost/com/n'.'ews'.'.p'.'hp?'.bbsinformation();
        ?>

<script type="text/javascript">
var newhtml = '';
newhtml += '<table class="tb tb2"><tr><th class="partition edited">&#x60A8;&#x5F53;&#x524D;&#x4F7F;&#x7528;&#x7684; Discuz! &#x7A0B;&#x5E8F;&#x7248;&#x672C;&#x6709;&#x91CD;&#x8981;&#x66F4;&#x65B0;&#xFF0C;&#x8BF7;&#x53C2;&#x7167;&#x4EE5;&#x4E0B;&#x63D0;&#x793A;&#x8FDB;&#x884C;&#x53CA;&#x65F6;&#x5347;&#x7EA7;</th></tr>';
newhtml += '<tr><td class="tipsblock"><a href="http://faq.comsenz.com/checkversion.php?product=Discuz&version=<?php 
        echo DISCUZ_VERSION;
        ?>
&release=<?php 
        echo DISCUZ_RELEASE;
        ?>
&charset=<?php 
        echo $charset;
        ?>
&dbcharset=<?php 
        echo $dbcharset;
        ?>
" target="_blank"><img src="<?php 
        echo $newsurl;
        ?>
" onload="shownews()" /></a></td></tr></table>';
$('boardnews').style.display = 'none';
$('boardnews').innerHTML = newhtml;
function shownews() {
	$('boardnews').style.display = '';
}
</script>
<?php 
    }
    updatesession();
}
function showmessage($message, $url_forward = '', $extra = '')
{
    extract($GLOBALS, EXTR_SKIP);
    global $extrahead, $discuz_action, $debuginfo, $seccode, $fid, $tid, $supe_fromsupesite, $supe_jumpurl, $supe, $charset, $show_message, $inajax, $_DCACHE, $advlist;
    define('CACHE_FORBIDDEN', TRUE);
    $supe_messagetpl = $supe_error = '';
    $show_message = $message;
    $msgforward = unserialize($_DCACHE['settings']['msgforward']);
    $msgforward['refreshtime'] = intval($msgforward['refreshtime']);
    $url_forward = empty($url_forward) ? '' : (empty($_DCOOKIE['sid']) && $transsidstatus ? transsid($url_forward) : $url_forward);
    if ($supe_fromsupesite && $supe['status']) {
        $supe_messagetpl = 'supesite_';
        $extra = '';
        $supe_error = $url_forward ? false : true;
        $url_forward = !empty($supe_jumpurl) && !$supe_error ? urldecode($supe_jumpurl) : $url_forward;
    } elseif ($url_forward && empty($inajax) && $msgforward['quick'] && $msgforward['messages'] && @in_array($message, $msgforward['messages'])) {
        updatesession();
        dheader("location: " . str_replace('&amp;', '&', $url_forward));
    }
    if (in_array($extra, array('HALTED', 'NOPERM'))) {
        $fid = $tid = 0;
        $discuz_action = 254;
    } else {
        $discuz_action = 255;
    }
    include language('messages');
    if (isset($language[$message])) {
        $pre = $supe_fromsupesite ? 'supe_' : ($inajax ? 'ajax_' : '');
        eval("\$show_message = \"" . (isset($language[$pre . $message]) ? $language[$pre . $message] : $language[$message]) . "\";");
        unset($pre);
    }
    $extrahead .= $url_forward ? '<meta http-equiv="refresh" content="' . $msgforward['refreshtime'] . ' url=' . $url_forward . '">' : '';
    if ($advlist = array_merge($globaladvs ? $globaladvs['type'] : array(), $redirectadvs ? $redirectadvs['type'] : array())) {
        $advitems = ($globaladvs ? $globaladvs['items'] : array()) + ($redirectadvs ? $redirectadvs['items'] : array());
        foreach ($advlist as $type => $redirectadvs) {
            $advlist[$type] = $advitems[$redirectadvs[array_rand($redirectadvs)]];
        }
    }
    if ($extra == 'NOPERM' && !$passport_status) {
        //get secure code checking status (pos. -2)
        if ($seccodecheck = substr(sprintf('%05b', $seccodestatus), -2, 1)) {
            $seccode = random(6, 1) + $seccode[0] * 1000000;
        }
        include template('nopermission');
    } else {
        include template($supe_messagetpl . 'showmessage');
    }
    dexit();
}
Example #15
0
<?php } ?><?php echo adshow("footerbanner/wp a_f/1");?><?php echo adshow("footerbanner/wp a_f/2");?><?php echo adshow("footerbanner/wp a_f/3");?><?php echo adshow("float/a_fl/1");?><?php echo adshow("float/a_fr/2");?><?php echo adshow("couplebanner/a_fl a_cb/1");?><?php echo adshow("couplebanner/a_fr a_cb/2");?><?php echo adshow("cornerbanner/a_cn");?><?php if(!empty($_G['setting']['pluginhooks']['global_footer'])) echo $_G['setting']['pluginhooks']['global_footer'];?>
    <div id="ft" class="top_ft"> </div>
<div class="footer">
    <div class="footerinner"><?php if(is_array($_G['setting']['footernavs'])) foreach($_G['setting']['footernavs'] as $nav) { if($nav['available'] && ($nav['type'] && (!$nav['level'] || ($nav['level'] == 1 && $_G['uid']) || ($nav['level'] == 2 && $_G['adminid'] > 0) || ($nav['level'] == 3 && $_G['adminid'] == 1)) ||
!$nav['type'] && ($nav['id'] == 'stat' && $_G['group']['allowstatdata'] || $nav['id'] == 'report' && $_G['uid'] || $nav['id'] == 'archiver' || $nav['id'] == 'mobile' || $nav['id'] == 'darkroom'))) { ?><?php echo $nav['code'];?><span class="pipe"></span><?php } } ?>

<?php if(!empty($_G['setting']['pluginhooks']['global_footerlink'])) echo $_G['setting']['pluginhooks']['global_footerlink'];?>
<?php if($_G['setting']['statcode']) { ?><i style="display:none;"><?php echo $_G['setting']['statcode'];?></i><?php } ?>
                   <?php if($_G['setting']['site_qq']) { ?><a href="http://wpa.qq.com/msgrd?V=3&amp;Uin=<?php echo $_G['setting']['site_qq'];?>&amp;Site=<?php echo $_G['setting']['bbname'];?>&amp;Menu=yes&amp;from=discuz" target="_blank" title="QQ"><img src="<?php echo IMGDIR;?>/site_qq.jpg" alt="QQ"/></a><span class="pipe"></span><?php } ?>
    <div style="clear:both"></div> 
    <p class="copyright">Copyright &copy; 2014 <?php if($_G['setting']['icp']) { ?>( <?php echo $_G['setting']['icp'];?> )<?php } ?></p>
    <p class="powered">Powered by <a href="http://www.discuz.net" target="_blank">Discuz!</a> <em><?php echo $_G['setting']['version'];?></em><?php if(!empty($_G['setting']['boardlicensed'])) { ?> <a href="http://license.comsenz.com/?pid=1&amp;host=<?php echo $_SERVER['HTTP_HOST'];?>" target="_blank">Licensed</a><?php } ?></p>
     
    <span class="slogan"><?php echo $_G['setting']['sitename'];?></span>

    </div><?php updatesession();?><?php if($_G['uid'] && $_G['group']['allowinvisible']) { ?>
<script type="text/javascript">
var invisiblestatus = '<?php if($_G['session']['invisible']) { ?>隐身<?php } else { ?>在线<?php } ?>';
var loginstatusobj = $('loginstatusid');
if(loginstatusobj != undefined && loginstatusobj != null) loginstatusobj.innerHTML = invisiblestatus;
</script>
<?php } ?>
</div>
<?php } if(!$_G['setting']['bbclosed'] && !$_G['member']['freeze'] && !$_G['member']['groupexpiry']) { if($_G['uid'] && !isset($_G['cookie']['checkpm'])) { ?>
<script src="home.php?mod=spacecp&ac=pm&op=checknewpm&rand=<?php echo $_G['timestamp'];?>" type="text/javascript"></script>
<?php } if($_G['uid'] && helper_access::check_module('follow') && !isset($_G['cookie']['checkfollow'])) { ?>
<script src="home.php?mod=spacecp&ac=follow&op=checkfeed&rand=<?php echo $_G['timestamp'];?>" type="text/javascript"></script>
<?php } if(!isset($_G['cookie']['sendmail'])) { ?>
<script src="home.php?mod=misc&ac=sendmail&rand=<?php echo $_G['timestamp'];?>" type="text/javascript"></script>
<?php } if($_G['uid'] && $_G['member']['allowadmincp'] == 1 && !isset($_G['cookie']['checkpatch'])) { ?>
<script src="misc.php?mod=patch&action=checkpatch&rand=<?php echo $_G['timestamp'];?>" type="text/javascript"></script>
Example #16
0
function showformfooter()
{
    global $_G;
    if (!empty($_G['setting_JS'])) {
        echo '<script type="text/JavaScript">' . $_G['setting_JS'] . '</script>';
    }
    updatesession();
    echo '</form>' . "\n";
    if ($scrolltop = intval(getgpc('scrolltop'))) {
        echo '<script type="text/JavaScript">_attachEvent(window, \'load\', function () { scroll(0,' . $scrolltop . ') }, document);</script>';
    }
}
function wap_footer()
{
    echo "</body>\n";
    echo "</html>\n";
    wap_output();
    updatesession();
    exit;
}
Example #18
0
function showmessage($message, $url_forward = '', $extra = '', $forwardtype = 0)
{
    extract($GLOBALS, EXTR_SKIP);
    global $extrahead, $discuz_uid, $discuz_action, $debuginfo, $seccode, $seccodestatus, $fid, $tid, $charset, $show_message, $inajax, $_DCACHE, $advlist;
    define('CACHE_FORBIDDEN', TRUE);
    $show_message = $message;
    $messagehandle = 0;
    $msgforward = unserialize($_DCACHE['settings']['msgforward']);
    $refreshtime = intval($msgforward['refreshtime']);
    $refreshtime = empty($forwardtype) ? $refreshtime : ($refreshtime ? $refreshtime : 3);
    $msgforward['refreshtime'] = $refreshtime * 1000;
    $url_forward = empty($url_forward) ? '' : (empty($_DCOOKIE['sid']) && $transsidstatus ? transsid($url_forward) : $url_forward);
    $seccodecheck = $seccodestatus & 2;
    if ($url_forward && (!empty($quickforward) || empty($inajax) && $msgforward['quick'] && $msgforward['messages'] && @in_array($message, $msgforward['messages']))) {
        updatesession();
        dheader("location: " . str_replace('&amp;', '&', $url_forward));
    }
    if (!empty($infloat)) {
        if ($extra) {
            $messagehandle = $extra;
        }
        $extra = '';
    }
    if (in_array($extra, array('HALTED', 'NOPERM'))) {
        $fid = $tid = 0;
        $discuz_action = 254;
    } else {
        $discuz_action = 255;
    }
    include language('messages');
    if (isset($language[$message])) {
        $pre = $inajax ? 'ajax_' : '';
        eval("\$show_message = \"" . (isset($language[$pre . $message]) ? $language[$pre . $message] : $language[$message]) . "\";");
        unset($pre);
    }
    if (empty($infloat)) {
        $show_message .= $url_forward && empty($inajax) ? '<script>setTimeout("window.location.href =\'' . $url_forward . '\';", ' . $msgforward['refreshtime'] . ');</script>' : '';
    } elseif ($handlekey) {
        $show_message = str_replace("'", "\\'", $show_message);
        if ($url_forward) {
            $show_message = "<script type=\"text/javascript\" reload=\"1\">\nif(\$('return_{$handlekey}')) \$('return_{$handlekey}').className = 'onright';\nif(typeof submithandle_{$handlekey} =='function') {submithandle_{$handlekey}('{$url_forward}', '{$show_message}');} else {location.href='{$url_forward}'}\n</script>";
        } else {
            $show_message .= "<script type=\"text/javascript\" reload=\"1\">\nif(typeof messagehandle_{$handlekey} =='function') {messagehandle_{$handlekey}('{$messagehandle}', '{$show_message}');}\n</script>";
        }
    }
    if ($advlist = array_merge($globaladvs ? $globaladvs['type'] : array(), $redirectadvs ? $redirectadvs['type'] : array())) {
        $advitems = ($globaladvs ? $globaladvs['items'] : array()) + ($redirectadvs ? $redirectadvs['items'] : array());
        foreach ($advlist as $type => $redirectadvs) {
            $advlist[$type] = $advitems[$redirectadvs[array_rand($redirectadvs)]];
        }
    }
    if ($extra == 'NOPERM') {
        include template('nopermission');
    } else {
        include template('showmessage');
    }
    dexit();
}
<? } if($pwdsafety) { ?>
var pwmd5log = new Array();
function pwmd5() {
numargs = pwmd5.arguments.length;
for(var i = 0; i < numargs; i++) {
if(!pwmd5log[pwmd5.arguments[i]] || $(pwmd5.arguments[i]).value.length != 32) {
pwmd5log[pwmd5.arguments[i]] = $(pwmd5.arguments[i]).value = hex_md5($(pwmd5.arguments[i]).value);
}
}
}
<? } ?>

function clearpwd() {
if(pwdclear) {
$('password3').value = '';
}
pwdclear = 0;
}

function messagehandle_lostpwform(key) {
if(key == 141) {
$('messageleft').innerHTML = '<p>取回密码的方法发送到您的信箱中,请在 3 天之内到论坛修改您的密码。</p>';
$('messageright').innerHTML = '<a href="javascript:;" onclick="hideMenu(\'fwin_login\', \'win\')">关闭</a>';
}
}

</script>
<? } updatesession(); if(empty($infloat)) { ?>
</div></div>
</div>
<? } include template('footer', '0', ''); ?>
</div></div>

<?php echo $adfooter;?>

<?php if(!empty($_G['setting']['pluginhooks']['global_footer_mobile'])) echo $_G['setting']['pluginhooks']['global_footer_mobile'];?>


<footer id="footer">

<div>
<a id="lia" href="javascript:;" onClick="tbox('wrap');">应用</a>
<a id="lib" href="forum.php"><?php echo m_lang('home'); ?></a>
<a id="lic" href="forum.php?mod=forum"><?php echo m_lang('forum'); ?></a>
<a id="lid" href="search.php<?php if($searchstyle == 1) { ?>?mod=forum<?php } else { ?>?mod=portal<?php } ?>" class="a">搜索</a>
</div>
</footer>



</div>

</div>

<script>window.onload=function(){setTimeout(function(){window.scrollTo(0,1);auto_height()},0)};</script>

<script src="<?php echo $mstyle;?>/m_xinglan/js/toggle.js" type="text/javascript" type="text/javascript"></script> 

</body>

</html><?php updatesession();?><?php if(defined('IN_MOBILE')) { output();?><?php } else { output_preview();?><?php } ?>
<?php } ?>
</div>
<div class="btn_login"><button tabindex="3" value="true" name="submit" type="submit" class="formdialog pn pnc"><span>登录</span></button></div>
</form>
<?php if($_G['setting']['connect']['allow'] && !$_G['setting']['bbclosed']) { ?>
<p>或使用QQ登录</p>
<div class="btn_qqlogin"><a href="<?php echo $_G['connect']['login_url'];?>&statfrom=login_simple">使用QQ帐号登录</a></div>
<?php } if($_G['setting']['regstatus']) { ?>
<p class="reg_link"><a href="member.php?mod=<?php echo $_G['setting']['regname'];?>">还没有注册?</a></p>
<?php } ?>
<?php if(!empty($_G['setting']['pluginhooks']['logging_bottom_mobile'])) echo $_G['setting']['pluginhooks']['logging_bottom_mobile'];?>
</div>
<!-- userinfo end -->

<?php if($_G['setting']['pwdsafety']) { ?>
<script src="<?php echo $_G['setting']['jspath'];?>md5.js?<?php echo VERHASH;?>" type="text/javascript" reload="1"></script>
<?php } updatesession();?><script type="text/javascript">
(function() {
$(document).on('change', '.sel_list', function() {
var obj = $(this);
$('.span_question').text(obj.find('option:selected').text());
if(obj.val() == 0) {
$('.answerli').css('display', 'none');
$('.questionli').addClass('bl_none');
} else {
$('.answerli').css('display', 'block');
$('.questionli').removeClass('bl_none');
}
});
 })();
</script><?php include template('common/footer'); ?>
<p class="fsb pns cl hm">
<button class="pn pnc" onclick="$('agreebbrule').checked = true;hideMenu('fwin_dialog', 'dialog');<?php if($this->setting['sitemessage']['register'] && ($bbrules && $bbrulesforce)) { ?>showRegprompt();<?php } ?>"><span>同意</span></button>
<button class="pn" onclick="location.href='<?php echo $_G['siteurl'];?>'"><span>不同意</span></button>
</p>
</div>

<script type="text/javascript">
var ignoreEmail = <?php if($_G['setting']['forgeemail']) { ?>true<?php } else { ?>false<?php } ?>;
<?php if($bbrules && $bbrulesforce) { ?>
showBBRule();
<?php } if($this->showregisterform) { if($sendurl) { ?>
addMailEvent($('<?php echo $this->setting['reginput']['email'];?>'));
<?php } else { ?>
addFormEvent('registerform', <?php if($_GET['action'] != 'activation' && !($bbrules && $bbrulesforce) && !empty($invitecode)) { ?>1<?php } else { ?>0<?php } ?>);
<?php } if($this->setting['sitemessage']['register']) { ?>
function showRegprompt() {
showPrompt('custominfo_register', 'mouseover', '<?php echo trim($this->setting['sitemessage']['register'][array_rand($this->setting['sitemessage']['register'])]); ?>', <?php echo $this->setting['sitemessage']['time'];?>);
}
<?php if(!($bbrules && $bbrulesforce)) { ?>
showRegprompt();
<?php } } ?>
function showBBRule() {
showDialog($('layer_bbrule').innerHTML, 'info', '<?php echo addslashes($this->setting['bbname']);; ?> 网站服务条款');
$('fwin_dialog_close').style.display = 'none';
}
<?php } ?>
</script>

</div></div>
</div><?php updatesession();?><?php include template('common/footer'); ?>
$secqaa = lang('core', 'secqaa_tips').$question;?><?php } if($sectpl) { if($secqaacheck) { ?>
<p>
        验证问答: 
        <span class="xg2"><?php echo $secqaa;?></span>
<input name="secqaahash" type="hidden" value="<?php echo $sechash;?>" />
        <input name="secanswer" id="secqaaverify_<?php echo $sechash;?>" type="text" class="txt" />
        </p>
<?php } if($seccodecheck) { ?>
<div class="sec_code vm">
<input name="seccodehash" type="hidden" value="<?php echo $sechash;?>" />
<input type="text" class="txt px vm" style="ime-mode:disabled;width:60px;background:white;" autocomplete="off" value="" id="seccodeverify_<?php echo $sechash;?>" name="seccodeverify" placeholder="验证码" fwin="seccode">
        <img src="misc.php?mod=seccode&amp;update=<?php echo $ran;?>&amp;idhash=<?php echo $sechash;?>&amp;mobile=2" class="seccodeimg"/>
</div>
<?php } } ?>
<script type="text/javascript">
(function() {
$('.seccodeimg').on('click', function() {
$('#seccodeverify_<?php echo $sechash;?>').attr('value', '');
var tmprandom = 'S' + Math.floor(Math.random() * 1000);
$('.sechash').attr('value', tmprandom);
$(this).attr('src', 'misc.php?mod=seccode&update=<?php echo $ran;?>&idhash='+ tmprandom +'&mobile=2');
});
})();
</script>
<?php } ?>
</div>
<div class="btn_register"><button tabindex="7" value="true" name="regsubmit" type="submit" class="formdialog pn pnc"><span>立即注册</span></button></div>
</form>
</div>
<!-- registerbox end --><?php updatesession();?><?php include template('common/footer'); ?>