require_once './include/common.inc.php';
require_once './include/userinfo.inc.php';
$seccodecheck = substr(sprintf('%05b', $seccodestatus), -2, 1);
$newthreads = round(($timestamp - $lastvisit + 600) / 1000) * 1000;
//新貼//
$hack_cut_str = 36; //修改標題顯示字數
$new_post_threadlist = array();
$nthread = array();
$colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid ORDER BY t.dateline DESC LIMIT 0, 10");
while($nthread = $db->fetch_array($query)) {
$nthread['forumname'] = $nthread['name'];
$nthread['view_subject'] = cutstr($nthread['subject'],$hack_cut_str);
$nthread['date']= gmdate("$dateformat $timeformat", $nthread['dateline'] + $timeoffset * 3600);
$nthread['lastreplytime']= gmdate("$dateformat $timeformat", $nthread[lastpost] + ($timeoffset * 3600));
if($nthread['highlight']) {
$string = sprintf('%02d', $nthread['highlight']);
$stylestr = sprintf('%03b', $string[0]);
$nthread['highlight'] = 'style="';
$nthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
$nthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
$nthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
$nthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
$nthread['highlight'] .= '"';
} else {
$nthread['highlight'] = '';
}
$new_post_threadlist[] = $nthread;
}
//新貼//
//新回覆
$hack_cut_str = 36; //修改標題顯示字數
$new_reply_threadlist = array();
$rthread = array();
$colorarray = array('', 'red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple', 'gray');
$query = $db->query("SELECT t.*, f.name FROM {$tablepre}threads t, {$tablepre}forums f WHERE t.fid<>'$fid' AND f.fid=t.fid AND t.closed NOT LIKE 'moved|%' AND t.replies !=0 ORDER BY t.lastpost DESC LIMIT 0, 10");
while($rthread = $db->fetch_array($query)) {
$rthread['forumname'] = $rthread['name'];
$rthread['view_subject'] = cutstr($rthread['subject'],$hack_cut_str);
$rthread['date']= gmdate("$dateformat $timeformat", $rthread['dateline'] + $timeoffset * 3600);
$rthread['lastreplytime']= gmdate("$dateformat $timeformat", $rthread[lastpost] + ($timeoffset * 3600));
if($rthread['highlight']) {
$string = sprintf('%02d', $rthread['highlight']);
$stylestr = sprintf('%03b', $string[0]);
$rthread['highlight'] = 'style="';
$rthread['highlight'] .= $stylestr[0] ? 'font-weight: bold;' : '';
$rthread['highlight'] .= $stylestr[1] ? 'font-style: italic;' : '';
$rthread['highlight'] .= $stylestr[2] ? 'text-decoration: underline;' : '';
$rthread['highlight'] .= $string[1] ? 'color: '.$colorarray[$string[1]] : '';
$rthread['highlight'] .= '"';
} else {
$rthread['highlight'] = '';
}
$new_reply_threadlist[] = $rthread;
}
//回覆//
$today = mktime (0,0,0,date("m") ,date("d"),date("Y"));
$build_date = mktime (0,0,0,11,20,2005);//請修改後面的三個數字,分別代表你論壇運行第一天的月,日,年。$build_days = (int)(($today-$build_date)/(24*3600));
'forumlinks', 'birthdays', 'supe_updateusers'
<div id="foruminfo">
<div id="userinfo">
<div id="nav">
<!--{if $supe['status']}--><a href="$supe[siteurl]" target="_blank">$supe['sitename']</a> - <!--{/if}-->
<!--{if $gid || !$discuz_uid}--><a href="$indexname">$bbname</a> <!--{else}--><a href="space.php?action=viewpro&uid=$discuz_uid" class="dropmenu" id="creditlist" onmouseover="showMenu(this.id)">$discuz_user</a> <!--{/if}-->
<!--{if $discuz_uid}-->
<!--{if $supe['status'] && $xspacestatus}-->
- <a href="$supe[siteurl]/?uid/$discuz_uid" target="_blank">{lang space}</a>
<!--{elseif $spacestatus}-->
- <a href="space.php?uid=$discuz_uid" target="_blank">{lang space}</a>
<!--{/if}-->
<!--{if $supe['status'] && !$xspacestatus}-->
- <a href="$supe[siteurl]/?uid/$discuz_uid" target="_blank">{lang space_upgrade_space}</a>
<!--{/if}-->
<!--{/if}-->
</div>
<p>
<!--{if $discuz_uid}-->
<!--{if $allowinvisible}-->{lang online_status}:
<span id="loginstatus"><!--{if !empty($invisible)}--><a href="member.php?action=switchstatus" onclick="ajaxget(this.href, 'loginstatus');doane(event);">{lang login_invisible_mode}</a><!--{else}--><a href="member.php?action=switchstatus" title="{lang login_switch_invisible_mode}" onclick="ajaxget(this.href, 'loginstatus');doane(event);">{lang login_normal_mode}</a><!--{/if}--></span>,
<!--{/if}-->
{lang your_lastvisit}: <em>$lastvisittime</em>,
<a href="search.php?srchfrom=$newthreads&searchsubmit=yes">{lang show_newthreads}</a> | <a href="member.php?action=markread" id="ajax_markread" onclick="ajaxmenu(event, this.id)">{lang mark_read}</a>
<!--{else}-->
<form id="loginform" method="post" name="login" action="logging.php?action=login&loginsubmit=true">
<input type="hidden" name="formhash" value="{FORMHASH}" />
<input type="hidden" name="cookietime" value="2592000" />
<input type="text" id="username" name="username" size="15" maxlength="40" tabindex="1" value="{lang username}/{lang uid}" onclick="this.value = ''" />
<input type="password" id="password" name="password" size="10" tabindex="2" onkeypress="if((event.keyCode ? event.keyCode : event.charCode) == 13) $('loginform').submit()" />
<button name="userlogin" type="submit" value="true">{lang login}</button>
</form>
<!--{/if}-->
</p>
</div>
<div id="forumstats">
<p>
{lang index_today}: <em>$todayposts</em> , {lang index_yesterday}: <em>$postdata[0]</em> , {lang index_maxday}: <em>$postdata[1]</em> |
<a href="digest.php">{lang digest}</a>
<!--{if $rssstatus}--><a href="rss.php?auth=$rssauth" title="{lang rss_subscribe_all}" target="_blank"><img src="images/common/xml.gif" alt="{lang rss_subscribe_all}" /></a><!--{/if}-->
</p>
<p>{lang index_threads}: <em>$threads</em>, {lang index_posts}: <em>$posts</em>, {lang index_members}: <em>$totalmembers</em>, {lang welcome_newmember} <cite><a href="space.php?username=$memberenc">$lastmember</a></cite></p>
</div>
</div>
<!--{if empty($gid) && $announcements}-->
<div id="announcement" onmouseover="if(!anncount) {clearTimeout(annst);annst = 0}" onmouseout="if(!annst) annst = setTimeout('announcementScroll()', anndelay);">
<div id="announcementbody"><ul>$announcements</ul></div>
</div>
<script type="text/javascript">
var anndelay = 3000;
var anncount = 0;var annheight = 36;var annst = 0;
function announcementScroll() {
if(!annst) {
$('announcementbody').innerHTML += '<br style="clear: both"/>' + $('announcementbody').innerHTML;$('announcementbody').scrollTop = 0;
if($('announcementbody').scrollHeight > annheight * 2) {
annst = setTimeout('announcementScroll()', anndelay);
} else {
$('announcement').onmouseover = $('announcement').onmouseout = null;
}
return;
}
if(anncount == annheight) {
if($('announcementbody').scrollHeight - annheight <= $('announcementbody').scrollTop) {
$('announcementbody').scrollTop = $('announcementbody').scrollHeight / 2 - annheight;
}
anncount = 0;annst = setTimeout('announcementScroll()', anndelay);
} else {
$('announcementbody').scrollTop++;anncount++;annst = setTimeout('announcementScroll()', 10);
}
}
announcementScroll();
</script>
<!--{/if}-->
<br>
<div style="clear: both; margin-top: 5px">
{template hot_topics}
</div>
<!--{if !empty($newpmexists) || $announcepm}-->
<div style="clear: both; margin-top: 5px" id="pmprompt">
{template pmprompt}
</div>
<!--{/if}-->