$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;
}
//回覆//
'forumlinks', 'birthdays', 'supe_updateusers'
<br>
{lang credits}: <span class="bold smalltxt">$credits</span> <span id="creditlist" >{lang credits_detail}</span> / {lang index_status}:
<!--{if $validdays}-->
<a href="member.php?action=groupexpiry"><span class="bold">$grouptitle</span>($validdays)</a>
<!--{else}-->
<span class="bold">$grouptitle</span>
<!--{/if}-->
<!--{if $allowinvisible && $discuz_uid}-->{lang online_status}:
<!--{if !empty($invisible)}-->
<a href="member.php?action=switchstatus" title="{lang login_switch_normal_mode}" id="ajax_switchstatus" >{lang login_invisible_mode}</a>
<!--{else}-->
<a href="member.php?action=switchstatus" title="{lang login_switch_invisible_mode}" id="ajax_switchstatus" >{lang login_normal_mode}</a>
<!--{/if}-->
<!--{/if}--><br>
{lang your_lastvisit} <span class="smalltxt">$lastvisittime</span><br>
</div>
<div class="right" style="line-height: 18px;">
<a href="search.php?srchfrom=$newthreads&searchsubmit=yes">{lang show_newthreads}</a> |
<a href="digest.php">{lang digest}</a> |
<a href="member.php?action=markread" id="ajax_markread" >{lang mark_read}</a>
<!--{if $rssstatus}--><a href="rss.php?auth=$rssauth" target="_blank"><img src="images/common/xml.gif" border="0" class="absmiddle" alt="{lang rss_subscribe_all}" /></a><!--{/if}-->
<br>
{lang total} <span class="smalltxt">$threads</span> {lang index_threads} / <span class="smalltxt">$posts</span> {lang index_posts} / {lang index_today} <span class="smalltxt">$todayposts</span> {lang index_posts}<br>
{lang total} <span class="smalltxt">$totalmembers</span> {lang index_members} / {lang welcome_newmember} <a href="space.php?username=$memberenc"><span class="bold">$lastmember</span></a>
</div>
</div><br>
<!--{if empty($gid)}-->
<!--{if !empty($announcements)}-->
<div id="announcement">$announcements</div><script type="text/javascript">announcement();</script>
<!--{/if}-->
</div>
<div class="right" style="line-height: 18px;">
<!--{if !empty($stylejumpstatus)}-->
<select onchange="if(this.options[this.selectedIndex].value != '') {
<!--{if $rewritestatus && in_array(CURSCRIPT, array('forumdisplay', 'viewthread', 'viewpro'))}-->
<!--{echo "var thisurl = '".substr($_SERVER[SCRIPT_FILENAME], strrpos($_SERVER[SCRIPT_FILENAME], '/')+1).'?'.$_SERVER[QUERY_STRING]."'";}-->
<!--{else}-->
var thisurl = document.URL.replace(/[&?]styleid=.+?&sid=.+?$/i, '');
<!--{/if}-->
window.location=(thisurl.replace(/\#.+$/, '')+(thisurl.match(/\?/) ? '&' : '?')+'styleid='+this.options[this.selectedIndex].value+'&sid=$sid') }">
<option value="">{lang style}</option>
<option value="">----------</option>
<!--{loop $stylejump $id $name}-->
<option value="$id">$name</option>
<!--{/loop}-->
</select>
<!--{/if}-->
<!--{if $rssstatus}--> <a href="rss.php?auth=$rssauth" target="_blank"><img src="images/common/xml.gif" border="0" class="absmiddle" alt="{lang rss_subscribe_all}" /></a><!--{/if}-->
</div>
</div>
<!--{if empty($gid)}-->
{template tonyfour}<br>
<!--{/if}-->
<!--{if empty($gid)}-->
3.