Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[原创]一楼和二楼之间插入论坛公告

[复制链接]
猪宝贝2004 发表于 2005-9-23 14:11:03 | 显示全部楼层
<?php

/*
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [DISCUZ!]  Crossday Discuz! Board                                    ::
:: (c) 2001-2005 Comsenz Technology Ltd (www.discuz.com)                ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Author:  Crossday (tech@discuz.com) Cnteacher (cnteacher@discuz.com) ::
:: Version: 2.5F   2004/10/01 05:15                                     ::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
*/
//fix:  BY pk0909
/*
1 发帖数衡量级别
2 转入最新帖
*/

define('CURRSCRIPT',  'viewthread');

require_once './include/common.php';
require_once DISCUZ_ROOT.'./include/forum.php';
require_once DISCUZ_ROOT.'./include/discuzcode.php';
require("./lib/add_function.php");

$discuz_action = 3;
function attachpost($attachinfo,$pid){
  global $attachimgcheck;
  if(!isset($attachinfo) || empty($pid) || !is_numeric($pid)){
    return '';
  }else{
    if(strstr($attachinfo,',')){
      list($pos,$align) = explode(',',strval($attachinfo));
    }else{
      $pos = $attachinfo;
    }
    if(!is_numeric($pos)) return '';
    if($GLOBALS['count'] <= $pos || strstr($GLOBALS['attached'][$pid],','.$pos.',')){
      return '';
    }else{
      $GLOBALS['attached'][$pid] .= ','.$pos.',';
      $extension = strtolower(fileext($GLOBALS['attachelist'][$pid][$pos]['filename']));
      if(in_array($extension, array('jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp'))) {
       $surfix = '';
       switch($align){
        case 'left':
            $prefix = "<img style=\"float:left;\" ";
            break;
        case 'right':
            $prefix = "<img style=\"float:right;\" ";
            break;
        case 'center':
            $prefix = "<div align=\"center\" style=\"clear:both;\"><img ";
            $surfix = "</div>";
            break;
         default:
            $prefix = "<img style=\"float:left;\" ";
            break;
       }
       if(!$attachimgcheck){
         $src = $GLOBALS['attachurl'].'/'.$GLOBALS['attachelist'][$pid][$pos]['attachment'];
         $ret = "$prefix src=\"$src\" border=\"0\" onload=\"if(this.width>screen.width*0.5){this.resized = true;this.width=screen.width*0.6;this.alt='点击打开新窗口';}\" onmouseover=\"if(this.resized)this.style.cursor='hand;' \" onclick=\"if(this.resized) window.open(this.src);\" />$surfix";
       }else{
         $href = "attachment.php?aid=".$GLOBALS['attachelist'][$pid][$pos]['aid']."&checkid=".$GLOBALS['attachelist'][$pid][$pos]['checkid'];
         $ret = "<a href=\"$href\" target=\"_blank\">$prefix src=\"$href\" border=\"0\" onload=\"if(this.width>screen.width*0.5){this.resized = true;this.width=screen.width*0.6;this.alt='点击打开新窗口';}\" onmouseover=\"if(this.resized)this.style.cursor='hand;'\" \" onclick=\"if(this.resized) window.open(this.src);\" />$surfix</a>";
       }

      }else{
       $align = in_array($align,array('left','right','center')) ? $align : 'left';
       $ret = "<div align=\"$align\">".$GLOBALS['attachelist'][$pid][$pos]['attachicon']."<a href=\"attachment.php?aid=".$GLOBALS['attachelist'][$pid][$pos][aid]."&checkid=".$GLOBALS['attachelist'][$pid][$pos][checkid]."&download=1\" target=\"_blank\">".$GLOBALS['attachelist'][$pid][$pos]['filename']."</a> (".$GLOBALS['attachelist'][$pid][$pos]['dateline'].",&nbsp;".$GLOBALS['attachelist'][$pid][$pos]['attachsize'];
       $ret .= $GLOBALS['attachelist'][$pid][$pos]['creditsrequire'] ? ", 下载此附件需要积分".$GLOBALS['attachelist'][$pid][$pos]['creditsrequire'] : NULL;
       $ret .= $GLOBALS['attachelist'][$pid][$pos]['downloads'] ? "下载:".$GLOBALS['attachelist'][$pid][$pos]['downloads']." )" : ')';
       $ret .= "</div>";
      }
      unset($GLOBALS['attachelist'][$pid][$pos]);
      return $ret;
    }
  }
}

if ($tid && $forum){
        $thread = $forum;
}elseif($fid && defined('ViewLastPost')) {
        $followforum = '';
        foreach($_DCACHE['forums'] as $ffid => $fforum) {
                if($fforum['fup'] == $fid && $fforum['type'] == 'sub') {
                        $followforum .= ','.$ffid;
                }
        }
        $followforumadd = $followforum ? "fid in ($fid{$followforum})" : "fid=$fid";
        $query = $db->query("SELECT * FROM $table_threads WHERE $followforumadd ORDER BY lastpost DESC LIMIT 1");
        if(!$thread = $db->fetch_array($query)) {
                showmessage('thread_nonexistence');
        }
        header("Location: {$boardurl}viewthread.php?tid=$thread[tid]&sid=$sid");
        exit();
} else {
        showmessage('thread_nonexistence');
}

if (defined('ViewLastPost')) {
                $page = @ceil(($thread['replies'] + 1) / $ppp);
}

$tid = $thread['tid'];
$codecount = 0;
$oldtopics = $_COOKIE['oldtopics'] ? $_COOKIE['oldtopics'] : "\t";
if(!strstr($oldtopics, "\t$tid\t")) {
        $oldtopics .= "$tid\t";
        setcookie('oldtopics', $oldtopics, $timestamp + 900, $cookiepath, $cookiedomain);
}

if($forum['type'] == 'forum') {
        $navigation .= "&raquo; <a href=\"forumdisplay.php?fid=$fid&page=$fpage\"> $forum[name]</a> &raquo; $thread[subject]";
        $navtitle .= ' - '.strip_tags($forum['name']).' - '.$thread['subject'];
} else {
        $query = $db->query("SELECT fid, name, moderator FROM $table_forums WHERE fid='$forum[fup]'");
        $fup = $db->fetch_array($query);
        $navigation .= "&raquo; <a href=\"forumdisplay.php?fid=$fup[fid]\">$fup[name]</a> &raquo; <a href=\"forumdisplay.php?fid=$fid&page=$fpage\"> $forum[name]</a> &raquo; $thread[subject]";
        $navtitle .= ' - '.strip_tags($fup['name']).' - '.strip_tags($forum['name']).' - '.$thread['subject'];
}

$ismoderator = modcheck($discuz_user);

if(!$forum['allowview']) {
        if(!$forum['viewperm'] && !$allowview) {
                showmessage('group_nopermission', NULL, 'HALTED');
        } elseif($forum['viewperm'] && !strstr($forum['viewperm'], "\t$groupid\t")) {
                showmessage('forum_nopermission', NULL, 'HALTED');
        }
}

if($thread['creditsrequire'] && $thread['creditsrequire'] > $credit && !$ismoderator && ($thread['authorid'] !=$discuz_uid)) {
        showmessage('thread_nopermission', NULL, 'HALTED');
}

if($forum['password'] && $forum['password'] != $_COOKIE["fidpw$fid"]) {
        header("Location: {$boardurl}forumdisplay.php?fid=$fid&sid=$sid");
        exit();
}

if(!$action && $tid) {

        if($discuz_uid && $newpm) {
                require DISCUZ_ROOT.'./include/pmprompt.php';
        }

        $highlightstatus = str_replace('+', '', $highlight) ? 1 : 0;
        $karmaoptions = '';
        if($allowkarma && $maxkarmarate) {
                $offset = ceil($maxkarmarate / 6);
                for($vote = - $maxkarmarate + $offset; $vote <= $maxkarmarate; $vote += $offset) {
                        $votenum = $vote > 0 ? '+'.$vote : $vote;
                        $karmaoptions .= $vote ? "<option value=\"$vote\">$votenum</option>\n" : NULL;
                }
        }
        unset($vote, $votenum, $offset);
       
        $pageMax = ceil(($thread['replies']+1) / $ppp);
        $page = intval($page) ? intval($page) : 1;
        $page = $page > $pageMax ? $pageMax : $page;
        $start_limit = ($page - 1) * $ppp;



        $fpage = intval($fpage);
        $multipage = multi($thread['replies'] + 1, $ppp, $page, "viewthread.php?tid=$tid&fpage=$fpage&highlight=".rawurlencode($highlight));

        $thread[subject] = cutstr($thread[subject],77);
        $polloptions = array();
        if($thread['poll']) {
                $query = $db->query("SELECT pollopts FROM $table_polls WHERE tid='$tid'");
                $pollopts = unserialize($db->result($query, 0));
                if (is_array($pollopts) && count($pollopts)){
                        foreach($pollopts['options'] as $option) {
                                $polloptions[] = array(       
                                        'option'        => dhtmlspecialchars(stripslashes($option[0])),
                                        'votes'                => $option[1],
                                        'width'                => @round($option[1] * 300 / $pollopts['max']) + 2,
                                        'percent'        => @sprintf ("%01.2f", $option[1] * 100 / $pollopts['total'])
                                );
                        }
                        $allowvote = $allowvote && $discuz_uid && (empty($thread['closed']) || $alloweditpoll) && !in_array($discuz_user, $pollopts['voters']);
                        $optiontype = $pollopts['multiple'] ? 'checkbox' : 'radio';
                }else{
                        unset ($pollopts);
                }
        }

        $altbg1 = ALTBG1;
        $altbg2 = ALTBG2;
        $postlist = $attachelist = array();
        $newpostanchor = $topiccount = $have_attachment = 0;
        $postcount = $start_limit;
        $post_phpcodecount = -1;
        $post_user_info_sql = 'm.username, m.gender, m.groupid, m.regdate, m.lastactivity, m.postnum, m.credit, m.email, m.site, m.icq, m.oicq, m.yahoo, m.msn, m.location, m.avatar, m.avatarwidth, m.avatarheight, m.signature, m.customstatus, m.showemail, m.medals';

        $query = $db->query("
                                        SELECT p.*, $post_user_info_sql
                                        FROM $table_posts p
                                        LEFT JOIN $table_members m ON m.uid=p.authorid
                                        WHERE p.tid='$tid' ORDER BY dateline LIMIT $start_limit, $ppp");
$ii=0;
        while($post = $db->fetch_array($query)) {

                if(!$newpostanchor && $post['dateline'] > $lastvisit) {
                        $post['newpostanchor'] = '<a name="newpost"></a>';
                        $newpostanchor = 1;
                } else {
                        $post['newpostanchor'] = '';
                }
                $topiccount ++;
                $post['postcount'] = $postcount+1;
                $post['thisbg'] = ${'altbg'.($postcount++ % 2 + 1)};
                $post['dateline'] = gmdate("$dateformat $timeformat", $post['dateline'] + $timeoffset * 3600);
                                     //mp_hp_exp hack begin
                                                       $daysreg = ($timestamp - $post['regdate']) / (24*3600);
                                                       $ppd = $post['postnum'] / $daysreg;//平均每日發貼
                                                       $post['exp_mp_hp'] = exp_mp_hp($post['postnum'],$ppd,$daysreg);
                                                      //end here
                $post['uid'] = sprintf("%07d", $post['uid']);

                if($post['username']) {
                       
                        if($userstatusby > 0 ){
                                if($userstatusby == 2 && $post['adminid'] == 0) {
                                        foreach($_DCACHE['ranks'] as $rank) {
                                                if($post['postnum'] > $rank['postshigher']) {
                                                        $post['authortitle'] = $rank['ranktitle'];
                                                        $post['stars'] = $rank['stars'];
                                                        break;
                                                }
                                        }
                                }else{
                                        $post['authortitle'] = $_DCACHE['usergroups'][$post['groupid']]['grouptitle'];
                                        $post['stars'] = $_DCACHE['usergroups'][$post['groupid']]['stars'];
                                }
                        }

                        $post['regdate'] = gmdate($dateformat, $post['regdate'] + $timeoffset * 3600);

                        if($_DCACHE['usergroups'][$post['groupid']]['groupavatar']) {
                                $post['avatar'] = '<img src="'.$_DCACHE['usergroups'][$post['groupid']]['groupavatar'].'" border="0">';
                        } elseif($_DCACHE['usergroups'][$post['groupid']]['allowavatar'] && $post['avatar']) {
                                $post['avatar'] = '<img src="'.$post['avatar'].'" width="'.$post['avatarwidth'].'" height="'.$post['avatarheight'].'" border="0">';
                        } else {
                                $post['avatar'] = '';
                        }
                } else {
                        if(!$post['authorid']) {
                                $post['useip'] = substr($post['useip'], 0, strrpos($post['useip'], '.')).'.x';
                        }
                        $post['postnum'] = $post['credit'] = $post['regdate'] = 'N/A';
                }

                $post['karma'] = '';
                if($post['rate'] && $post['ratetimes']) {
                        $rateimg = $post['rate'] > 0 ? 'agree.gif' : 'disagree.gif';
                        for($i = 0; $i < round(abs($post['rate']) / $post['ratetimes']); $i++) {
                                $post['karma'] .= '<img src="'.IMGDIR.'/'.$rateimg.'" align="right">';
                        }
                }

                $post['subject'] = $post['subject'] ? $post['subject'] : NULL;
                $post['message'] = postify($post['message'], $post['smileyoff'], $post['bbcodeoff'], $forum['allowsmilies'], $forum['allowhtml'], $forum['allowbbcode'], $forum['allowimgcode']);
                $post['signature'] = $post['usesig'] && $post['signature'] ? postify($post['signature'], 1, 0, 0, 0, $_DCACHE['usergroups'][$post['groupid']]['allowsigbbcode'], $_DCACHE['usergroups'][$post['groupid']]['allowsigimgcode']) : NULL;

                if(!$have_attachment && $post['aid']) $have_attachment = 1 ;

    /////////勋章s///////
                if($post['medals']){
                        require_once("./forumdata/medals.php");
                        $medalid = strtok($post['medals'],",");
                        while($medalid){
                                $tempmedal .= "<img src={$medalurls[$medalid]} alt={$medals[$medalid]}> ";
                                $medalid = strtok(",");}
                        $post['medals'] = $tempmedal.'<br>';
                        unset($tempmedal);
                }
    /////////勋章e///////
                $postlist[] = $post;
$postpids[$post['pid']] = $ii;
$ii++;
               
        }
       
        if (empty($postlist)) {
                showmessage('undefined_action', NULL, 'HALTED');
        }

        if ($have_attachment) {
                require_once DISCUZ_ROOT.'./include/attachment.php';
                $query = $db->query("select * from $table_attachments where tid='$tid' ORDER BY aid");
                while($attach = $db->fetch_array($query)) {
                        $attach[checkid] = substr(md5($attach['filesize']),0,5);
                        $extension = strtolower(fileext($attach['filename']));
                        $attach['attachicon'] = attachtype($extension."\t".$attach['filetype']);
                        if($attachimgpost && in_array($extension, array('jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp'))) {
                                $attach['attachimg'] = 1;
                        } else {
                                $attach['attachimg'] = 0;
                        }
                        $attach['attachsize'] = sizecount($attach['filesize']);
                        $attach['dateline'] = $attach['dateline']?gmdate("$dateformat $timeformat", $attach['dateline'] + $timeoffset * 3600): '';
                        $attachelist["$attach[pid]"][] = $attach;
                }
        }
foreach($attachelist as $key => $val){
  $attached[$key] = $attached[$key] ? $attached[$key] : ',';
  $processed .= ','.$key.',';
  //上行为处理无附件的贴子中的attach标签用
  $count = count($attachelist[$key]);
  if(strstr($postlist[$postpids[$key]]['message'],'[attach=')){
    $postlist[$postpids[$key]]['message'] = preg_replace("/\[attach=(\d{1,2}(,\w{4,6}|))\]/ies","attachpost('\\1',$key)",$postlist[$postpids[$key]]['message']);
  }
}
//以下为处理无附件的贴子中的attach标签用
foreach($postpids as $key => $val){
  if(!strstr($processed,','.$val.',')){
     if(strstr($postlist[$val]['message'],'[attach=')){
        $postlist[$val]['message'] = preg_replace("/\[attach=(\d{1,2}(,\w{4,6}|))\]/is",'',$postlist[$val]['message']);
     }
  }
}
        $forumselect = $forumjump ? forumselect() : NULL;

        $usesigcheck = $signature ? 'checked' : NULL;
        $allowpost = (!$forum['postperm'] && $allowpost) || ($forum['postperm'] && strstr($forum['postperm'], "\t$groupid\t")) || $forum['allowpost'];
        $allowpostreply = (!$thread['closed'] || $ismoderator) && (!$delayreply || ($delayreply && (($timestamp - $thread[dateline] ) < $delayreply * 86400)) || $ismoderator) && ((!$forum['replyperm'] && $allowpost) || ($forum['replyperm'] && strstr($forum['replyperm'], "\t$groupid\t")) || $forum['allowreply']);


        if($delayviewcount) {
                $logfile = DISCUZ_ROOT.'./forumdata/viewcount.log';
                if(substr($timestamp, -2) == '00') {
                        require DISCUZ_ROOT.'./include/misc.php';
                        updateviews();
                }

                if(@$fp = fopen($logfile, 'a')) {
                        fwrite($fp, "$tid\n");
                        fclose($fp);
                }elseif($adminid == 1) {
                        showmessage('view_log_invalid');
                }
        } else {
                $db->query("UPDATE LOW_PRIORITY $table_threads SET views=views+1 WHERE tid='$tid'", 'UNBUFFERED');
        }

        include template('viewthread');//==============每页的一.二楼的之间的公告 start by lu5266========
        $announcements = '';
        if($_DCACHE['announcements']) {
                $space = '';
                foreach($_DCACHE['announcements'] as $announcement) {
                        if($timestamp >= $announcement['starttime'] && ($timestamp <= $announcement['endtime'] || !$announcement['endtime'])) {
                                if ($announcement['posturl']){
                                        $announcements .= $space.'<img src="images/dog.gif"><a href="'.$announcement['posturl'].'" target="_blank"><span class="bold">'.$announcement['subject'].'</span> '.
                                        '('.gmdate($dateformat, $announcement['starttime'] + $timeoffset * 3600).')</a>';
                                }else{
                                        $announcements .=$space.'<img src="images/dog.gif"><a href="announcement.php?id='.$announcement['id'].'#'.$announcement['id'].'" target="_blank"><span class="bold">'.$announcement['subject'].'</span> '.
                                        '('.gmdate($dateformat, $announcement['starttime'] + $timeoffset * 3600).')</a>';
                                }
                                $space = '&nbsp; &nbsp; &nbsp; &nbsp;';
                        }
                }
        }
        unset($_DCACHE['announcements']);
//===========每页的一.二楼的之间的公告 end by www.5466.ik8.com====


} elseif($action == 'printable' && $tid) {

        require DISCUZ_ROOT.'./include/printable.php';

}

?>
回复

使用道具 举报

猪宝贝2004 发表于 2005-9-23 14:11:37 | 显示全部楼层
{template header}
<table cellspacing="0" cellpadding="0" border="0" width="{TABLEWIDTH}" align="center" style="table-layout: fixed">
<tr><td class="nav" width="90%" align="left" nowrap>&nbsp;<a href="index.php">$bbname</a> $navigation</td>
<td align="right" width="10%"><a href="rss.php?fid=$fid" target="_blank"><img src="images/common/xml.gif" border="0" alt="RSS订阅当前论坛" align="absmiddle"></a>&nbsp;<a href="#bottom"><img src="{IMGDIR}/arrow_dw.gif" border="0" align="absmiddle"></a></td>
</tr></table><br>

<!--{if $polloptions}-->
        {template viewthread_poll}
<!--{/if}-->

<!--{if $newpmexists}-->
        {template pmprompt}
<!--{/if}-->

<form name="delpost" method="post" action="topicadmin.php?action=delpost&fid=$fid&tid=$tid&page=$page">
<input type="hidden" name="formhash" value="{FORMHASH}">
<input type="hidden" name="fpage" value="$fpage">
<table width="{TABLEWIDTH}" cellspacing="0" cellpadding="0" align="center">
<tr><td class="multi">$multipage
<!--{if $thread['creditsrequire']}--> &nbsp; {lang creditsrequire_view} {lang credit_title} <span class=\"bold\">$thread[creditsrequire]</span> {lang credit_unit}<!--{/if}-->
</td><td align="right">
<!--{if $allowpost}--><a href="post.php?action=newthread&fid=$fid"><img src="{IMGDIR}/newtopic.gif" border="0"></a><!--{/if}-->
<!--{if $allowpostpoll}--><a href="post.php?action=newthread&fid=$fid&poll=yes"><img src="{IMGDIR}/poll.gif" border="0"></a><!--{/if}-->
<!--{if $allowpostreply}--><a href="post.php?action=reply&fid=$fid&tid=$tid"><img src="{IMGDIR}/reply.gif" border="0"></a><!--{/if}-->
<!--精华贴打标记--><!--{if $thread['digest']}--><div id="jinghua" style="right: 100px; WIDTH: 0px; POSITION: absolute; TOP: 200px; HEIGHT: 0px"><img border="0" src="{IMGDIR}/thread_jh.gif" width="123" height="104" border="0"></div><!--{/if}-->

</td></tr></table>

<table cellspacing="0" cellpadding="0" border="0" width="{TABLEWIDTH}" align="center" class="tableborder">
<tr><td bgcolor="{BORDERCOLOR}">

<table border="0" cellspacing="{BORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%">
<tr class="header"><td width="21%">{lang author}:</td>

<td><table cellspacing="0" cellpadding="0" border="0" width="100%"  style="table-layout: fixed; word-wrap: break-word">
<tr style="color: {HEADERTEXT}"><td class="bold">{lang subject}: $thread[subject]</td>
<td align="right" width="200" nowrap>
<!--{if $highlightstatus}--><a href="viewthread.php?tid=$tid&page=$page" style="color: {HEADERTEXT};font-weight: normal">{lang disable_highlight}</a> | <!--{/if}-->
<a href="redirect.php?fid=$fid&tid=$tid&goto=nextoldset" style="color: {HEADERTEXT};font-weight: normal">{lang last_thread}</a> |
<a href="redirect.php?fid=$fid&tid=$tid&goto=nextnewset" style="color: {HEADERTEXT};font-weight: normal">{lang next_thread}</a></td>
</tr>
</table></td>
</tr>
<!--{loop $postlist $postkey $post}-->
        <!--{eval $postpid=$post[pid]}-->
        <tr class="category"><td colspan="2" align="center" class="bold">$post[newpostanchor] <!--{if $allowflinkoff}-->$post[word]<!--{/if}--></tr></td>
        <tr bgcolor="$post[thisbg]">
<td valign="top" width="21%"><a name="pid$post[pid]"></a>
<table width="95%" border="0" cellspacing="0" cellpadding="0" style="table-layout: fixed">
<tr><td align="center">$post[avatar]<br>
<!--{if $post['authorid']}--><a href="viewpro.php?uid=$post[authorid]" target="_blank" class="bold">$post[author]</a><!--{if $post[customstatus]}-->($post[customstatus])<!--{/if}-->
<!--{else}-->{lang guest}</span> <span class="smalltxt">$post[useip]<!--{/if}--></span>
</td></tr>
</table><br>
<table width="155" border="0" align="center" cellpadding="0" cellspacing="0">

<tr><td background="images/public/kuan03.gif">
<table cellSpacing=0 cellPadding=0 border=0>
<tr><td width=8></td>
<td background="images/public/kuan04.gif">
<span class="smalltxt"><IMG src="images/public/rb01.gif" width="1">

<!--{if $post['username']}-->
$post[authortitle]<!--{else}-->{lang member_deleted}<!--{/if}-->
<!-----银行------&nbsp;<img src="./images/common/money$post[bankstatus].gif" border="0" align=absmiddle <!--{if $isadmin}-->alt="瑞士银行存款post[bankmimi]"<!--{/if}-->>
------银行------->
</span></td></tr></table></td></tr>
<tr>
<td background="images/public/kuan02.gif" bgColor="#f8f8f8" align="middle"><table cellSpacing="0" cellPadding="0" border="0" width="85%" align="center"><tr><td>
<br>
<img src="images/public/icon_1.gif" border="0">{eval showstars($post['stars']);}
</td><td><!--{if $ismoderator && $allowviewip}--><a href="topicadmin.php?action=getip&fid=$fid&tid=$tid&pid=$post[pid]"><img src="{IMGDIR}/ip.gif" border="0" align="right" alt="{lang admin_getip}"></a><!--{/if}--></td></tr><tr><td colspan="2">
<img src="images/public/icon_1.gif" border="0"> &nbsp;UID: $post[authorid] <br>
<!---------精华
<img src="images/public/icon_2.gif" border="0"> {lang thread_digest}: <font color="#9B21E8">$post[userdigests]</font><br>
----------->
$post[medals]
<img src="images/public/icon_1.gif" border="0">$post[exp_mp_hp] {lang credit_title}: <font color="#FD289B">$post[credit]</font><br>
<!-------------威望
<img src="images/public/icon_2.gif" border="0"> {lang glory_title}: $post[glory]<br>
--------------->
<img src="images/public/icon_1.gif" border="0"> {lang postnum}: <font color="#5D8D12">$post[postnum]</font><br>
<!------------银行
<img src="images/public/icon_2.gif" border="0"> 现金: <font color="#CC3333">$post[money]</font><br>
<img src="images/public/icon_1.gif" border="0"> 存款: <font color="#33CC33">$post[bank]</font><br>
-------------->
<img src="images/public/icon_2.gif" border="0"> {lang regtime}: <font color="#6699CC">$post[regdate]</font>
<!--{if $post['location']}--><br>
<img src="images/public/icon_1.gif" border="0"> {lang location}: <font color="#990033">$post[location]</font><!--{/if}--><br>
<img src="images/public/icon_2.gif" border="0"> <!--{if $timestamp - $post['lastactivity'] <= 10800}-->
{lang online_status}: <img src="images/admincp/online.gif"><!--{else}-->
{lang online_status}: <img src="images/admincp/offline.gif"><!--{/if}-->

</td></tr></table></td></tr><tr><td><IMG height="4" src="images/public/kuan01.gif" width="155"></td></tr></table>
        </td>
        <td width="79%" height="100%" valign="top">
        <table height="100%" width="100%" border="0" cellspacing="0" cellpadding="0" style="table-layout: fixed; word-wrap: break-word">
        <tr><td valign="top">
        <!--{if $postkey == $topiccount-1}--><a name="#lastpost"></a><!--{/if}-->
    <span class="bold"><span class="smalltxt">$post[karma]</span>&nbsp;$post[subject]</span><br>
    <br>
        <SPAN id=text{$post[postcount]} style="FONT-SIZE:12px">$post[message]</span>
        <br><br>
            
<!--{if $attachelist[$post[pid]]}-->
        <!--{eval $attacount = 0; }-->
        <blockquote><!--{loop $attachelist[$post[pid]] $vkey $attach}-->
                        {lang attachment} <!--{echo ++$attacount }--> : $attach[attachicon] <a href="attachment.php?aid=$attach[aid]&checkid=$attach[checkid]&download=1" target="_blank">$attach[filename]</a> ($attach['dateline'],&nbsp;$attach[attachsize]
                        <!--{if $attach[creditsrequire]}-->, {lang creditsrequire_attach}{lang credit_title} $attach[creditsrequire] {lang credit_unit}<!--{/if}-->
                        <!--{if $attach[downloads]}-->,{lang downloads}: $attach[downloads]<!--{/if}--> )
                <!--{if $attach['attachimg']}-->
                        <br><br><!--{if !$attachimgcheck}-->
                                <img src="$attachurl/$attach[attachment]" border="0" onload="if(this.width>screen.width*0.5) {this.resized=true; this.width=screen.width*0.6; this.alt='{lang click_open_newwindow}';}" onmouseover="if(this.resized) this.style.cursor='hand';" onclick="if(this.resized) window.open(this.src);">
                        <!--{else}-->
                                <a href="attachment.php?aid=$attach[aid]&checkid=$attach[checkid]" target="_blank"><img src="attachment.php?aid=$attach[aid]&checkid=$attach[checkid]" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.6; this.alt='{lang click_open_newwindow}';}" onmouseover="if(this.resized) this.style.cursor='hand';"></a>

                        <!--{/if}-->
                <!--{/if}-->
        <br><!--{/loop}--></blockquote>
<!--{/if}-->

        <!--{if $post['signature']}--><br></td></tr><tr>
                  <td align="left" valign="bottom"><img src="images/common/sigline.gif"><br>
                    $post[signature]<!--{/if}-->
        </td></tr></table>
        </td></tr>
        <tr bgcolor="$post[thisbg]"><td valign="middle" class="smalltxt">
          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><!--{if $ismoderator && $allowdelpost && $post['postcount'] > 1}--><input type="checkbox" name="delete[]" value="$post[pid]"><!--{/if}-->
        $post[dateline]</td>
          <td width="15" align="right"><span class="bold">#$post['postcount']</span></td>
        </tr>
      </table></td><td valign="middle">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr class="smalltxt"><td align="left">
        <!--{if $post['username']}-->
                <a href="viewpro.php?uid=$post[authorid]"><img src="{IMGDIR}/profile.gif" border="0" alt="{lang view_profile}"></a>&nbsp;
                <!--{if $post['showemail']}--><a href="mailtopost[email]"><img src="{IMGDIR}/email.gif" border="0" alt="{lang send_mail}"></a>&nbsp;<!--{/if}-->
                <!--{if $post['site']}--><a href="$post[site]" target="_blank"><img src="{IMGDIR}/site.gif" border="0" alt="{lang visit_home}"></a>&nbsp;<!--{/if}-->
                <a href="pm.php?action=send&uid=$post[authorid]" target="_blank"><img src="{IMGDIR}/pm.gif" border="0" alt="{lang send_pm}"></a>&nbsp;
                <!--{if $post['oicq']}--><a href="http://search.tencent.com/cgi-bin/friend/user_show_info?ln=$post[oicq]" target="_blank"><img src="{IMGDIR}/oicq.gif" alt="QQ" border="0"></a>&nbsp;<!--{/if}-->
                <!--{/if}-->
        </td><td align="right">
        &nbsp;<a href="post.php?action=edit&fid=$fid&tid=$tid&pid=$post[pid]&page=$page"><img src="{IMGDIR}/edit.gif" border="0" alt="{lang edit_post}"></a>
        <!--{if !$thread['closed'] || $ismoderator}-->&nbsp;<a href="post.php?action=reply&fid=$fid&tid=$tid&repquote=$post[pid]"><img src="{IMGDIR}/quote.gif" border="0" alt="{lang reply_quote}"></a><!--{/if}-->
        <!--{if $discuz_uid && $reportpost}-->&nbsp;<a href="misc.php?action=report&fid=$fid&tid=$tid&pid=$post[pid]&page=$page"><img src="{IMGDIR}/report.gif" border="0" alt="{lang report_to_moderator}"></a><!--{/if}-->
        <!--{if $allowkarma && $maxkarmarate}-->
                &nbsp;<select name="fid" onchange="if(this.options[this.selectedIndex].value != '') {
                window.location=('misc.php?action=karma&tid=$tid&pid=$post[pid]&score='+this.options[this.selectedIndex].value+'&sid=$sid') }" align="absmiddle">
                <option value="">{lang rate}</option>
                <option value="">----</option>
                $karmaoptions
                </select>
        <!--{/if}-->

        </td></tr></table>
        </td></tr>
        <!--{if $post['postcount']==1 || $post['postcount']==($ppp*($page-1)+1)}-->

<tr ><td align="center"><font style="filter: glow(color=#ff0055,strength=2); height:20px; color: #ffffff">$bbname ★{lang index_announcements}★</font></td><td  align="center"  bgcolor="{ALTBG1}">
        <!--{if empty($announcements)}-->
                {lang index_noannouncement}
        <!--{else}-->
                <marquee direction="left" scrollamount="3" onMouseOver="this.stop();" onMouseOut="this.start();">
                $announcements
                </marquee>
        <!--{/if}-->
</td></tr>
         <!--{/if}-->
<!--{/loop}-->
</table></td></tr></table>

<table width="{TABLEWIDTH}" cellspacing="0" cellpadding="0" align="center">
<tr>
<td class="multi" valign="top">$multipage</td><td align="right"><br>
<!--{if $allowpost}--><a href="post.php?action=newthread&fid=$fid"><img src="{IMGDIR}/newtopic.gif" border="0"></a><!--{/if}-->
<!--{if $allowpostpoll}--><a href="post.php?action=newthread&fid=$fid&poll=yes"><img src="{IMGDIR}/poll.gif" border="0"></a><!--{/if}-->
<!--{if $allowpostreply}--><a href="post.php?action=reply&fid=$fid&tid=$tid"><img src="{IMGDIR}/reply.gif" border="0"></a><!--{/if}-->
</td></tr></table></form>

<!--{if $fastpost && $allowpostreply}-->
        <script language="JavaScript">
        var postminchars = $minpostsize;
        var postmaxchars = $maxpostsize;
        var disablepostctrl = $disablepostctrl;
        function validate(theform) {
                if (theform.message.value == "" && theform.subject.value == "") {
                        alert("{lang post_subject_and_message_isnull}");
                        return false;
                }
                if (!disablepostctrl && ((postminchars != 0 && theform.message.value.length < postminchars) || (postmaxchars != 0 && theform.message.value.length > postmaxchars))) {
                        alert("{lang post_message_length_invalid}\n\n{lang post_currlength}: "+theform.message.value.length+" {lang bytes}\n{lang board_allowed}: "+postminchars+" {lang to} "+postmaxchars+" {lang bytes}");
                        return false;
                }                       
                theform.replysubmit.disabled = true;
                return true;
        }
        </script>
        <form method="post" name="input" action="post.php?action=reply&fid=$fid&tid=$tid&replysubmit=yes" onSubmit="return validate(this)">
        <input type="hidden" name="formhash" value="{FORMHASH}">
        <table cellspacing="0" cellpadding="0" border="0" width="{TABLEWIDTH}" align="center" bgcolor="{BORDERCOLOR}" class="tableborder"><tr><td>
        <table border="0" cellspacing="{BORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%">
        <tr><td colspan="2" class="header">{lang post_fastreply}</td></tr>
        <tr>
        <td width="18%" bgcolor="{ALTBG1}">{lang subject}:</td>
        <td width="82%" bgcolor="{ALTBG2}" class="smalltxt"><input type="text" name="subject" size="80" value="" tabindex="1">
              &nbsp; [{lang optional}]</td>
        </tr>
        <tr>
        <td width="18%" bgcolor="{ALTBG1}" valign="top">{lang options}:<br><span class="smalltxt">
        <input type="checkbox" name="parseurloff" value="1">&nbsp;{lang disable} {lang post_parseurl}<br>
        <input type="checkbox" name="smileyoff" value="1">&nbsp;{lang disable} <a href="faq.php?page=messages#6" target="_blank">{lang post_smilies}</a><br>
        <input type="checkbox" name="bbcodeoff" value="1">&nbsp;{lang disable} <a href="faq.php?page=misc#1" target="_blank">{lang post_discuzcode}</a><br>
        <input type="checkbox" name="usesig" value="1" $usesigcheck>&nbsp;{lang post_show_sig}<br>
        <input type="checkbox" name="emailnotify" value="1">&nbsp;{lang post_email_notify}</span>
        </td>
        <td width="82%" bgcolor="{ALTBG2}" class="smalltxt"><textarea rows="7" cols="90" name="message" onKeyDown="javascript: ctlent();" tabindex="2"></textarea><br>
        <input type="submit" name="replysubmit" value="{lang post_topicsubmit}" tabindex="3">&nbsp;&nbsp;&nbsp;
        <input type="submit" name="previewpost" value="{lang post_previewpost}" tabindex="4">&nbsp;&nbsp;&nbsp;
        <input type="reset" name="topicsreset" value="{lang post_topicreset}" tabindex="5">&nbsp; &nbsp;{lang post_submit_hotkey}</td>
        </tr></table></td></tr></table></form>
<!--{/if}-->

<br><table width="310" cellspacing="0" cellpadding="0" align="center"  class="tableborder">
<td align="center" width="30%">
<table width="100%" border="0" cellpadding="4" cellspacing="1">
<tr><td bgcolor="{ALTBG2}" align="center" class="smalltxt" nowrap>
<a href="viewthread.php?fid=$fid&tid=$tid&action=printable" target="_blank">{lang thread_printable}</a> |
<a href="misc.php?action=emailfriend&tid=$tid">{lang thread_email_friend}</a> |
<a href="memcp.php?action=subscriptions&subadd=$tid">{lang thread_subscribe}</a> |
<a href="memcp.php?action=favorites&favadd=$tid">{lang thread_favorite}</a>
</td></tr></table></td></tr></table><br>

<br><br><table width="{TABLEWIDTH}" cellspacing="0" cellpadding="0" align="center">
<tr class="mediumtxt"><td align="left" class="smalltxt">

<!--{if $forumjump}-->
        <span class="bold">{lang forum_jump}:</span>
        <select onchange="if(this.options[this.selectedIndex].value != '') {
        window.location=('forumdisplay.php?fid='+this.options[this.selectedIndex].value+'&sid=$sid') }">
        $forumselect
        </select>
<!--{/if}-->

&nbsp;</td><td align="right" class="smalltxt">

<!--{if $ismoderator}-->
        <span class="bold">{lang admin_modoptions}:</span>
        <select name="action" id="action" onchange="if(this.options[this.selectedIndex].value != '') { if(this.options[this.selectedIndex].value != 'delpost') {
        window.location=('topicadmin.php?tid=$tid&fid=$fid&action='+this.options[this.selectedIndex].value+'&fpage=$fpage&page=$page&sid=$sid');
        } else { this.document.delpost.submit(); } }">
        <option value="" selected>{lang admin_modoptions}</option>
        <!--{if $allowdelpost}-->
        <option value="delpost">{lang admin_delpost}</option>
        <option value="delete">{lang admin_delthread}</option>
        <!--{/if}-->
        <!--{if $allowclose}-->
        <option value="close"><!--{if $thread['closed']}-->{lang admin_open}<!--{else}-->{lang admin_close}<!--{/if}--></option>
        <!--{/if}-->
        <!--{if $allowmove}-->
        <option value="move">{lang admin_move}</option>
        <!--{/if}-->
        <!--{if $allowhighlight}-->
        <option value="highlight">{lang admin_highlight}</option>
        <!--{/if}-->
        <!--{if $allowdigest}-->
        <option value="digest"><!--{if $thread['digest']}-->{lang admin_digest_remove}<!--{else}-->{lang admin_digest_add}<!--{/if}--></option>
        <!--{/if}-->
        <!--{if $allowtop}-->
        <option value="top"><!--{if $thread['displayorder']}-->{lang admin_unstick}<!--{else}-->{lang admin_stick}<!--{/if}--></option>
        <!--{/if}-->
        <!--{if $allowsplit}-->
        <option value="split">{lang admin_split}</option>
        <!--{/if}-->
        <!--{if $allowmerge}-->
        <option value="merge">{lang admin_merge}</option>
        <!--{/if}-->
        <option value="bump">{lang admin_bump}</option>

        <option value="recount">{lang admin_recount}</option>
        </select>
<!--{/if}-->

</td>
</tr></table><br><br>
{template footer}
回复

使用道具 举报

猪宝贝2004 发表于 2005-9-23 14:13:11 | 显示全部楼层
拜托瞅瞅~
回复

使用道具 举报

 楼主| lu5266 发表于 2005-9-23 14:26:45 | 显示全部楼层
原帖由 猪宝贝2004 于 2005-9-23 14:11 发表
<?php

/*
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [DISCUZ!]  Crossday Discuz! Board                                    ::
:: (c) 2001-2005 Comsenz T ...



应该在

  1. include template('viewthread');
复制代码


上面加上的

你加在下面了
回复

使用道具 举报

oytktk 发表于 2005-9-23 14:27:34 | 显示全部楼层
你把:



  1. //==============每页的一.二楼的之间的公告 start by lu5266========
  2.         $announcements = '';
  3.         if($_DCACHE['announcements']) {
  4.                 $space = '';
  5.                 foreach($_DCACHE['announcements'] as $announcement) {
  6.                         if($timestamp >= $announcement['starttime'] && ($timestamp <= $announcement['endtime'] || !$announcement['endtime'])) {
  7.                                 if ($announcement['posturl']){
  8.                                         $announcements .= $space.'<img src="images/dog.gif"><a href="'.$announcement['posturl'].'" target="_blank"><span class="bold">'.$announcement['subject'].'</span> '.
  9.                                         '('.gmdate($dateformat, $announcement['starttime'] + $timeoffset * 3600).')</a>';
  10.                                 }else{
  11.                                         $announcements .=$space.'<img src="images/dog.gif"><a href="announcement.php?id='.$announcement['id'].'#'.$announcement['id'].'" target="_blank"><span class="bold">'.$announcement['subject'].'</span> '.
  12.                                         '('.gmdate($dateformat, $announcement['starttime'] + $timeoffset * 3600).')</a>';
  13.                                 }
  14.                                 $space = '&nbsp; &nbsp; &nbsp; &nbsp;';
  15.                         }
  16.                 }
  17.         }
  18.         unset($_DCACHE['announcements']);
  19. //===========每页的一.二楼的之间的公告 end by [url]www.5466.ik8.com====[/url]

复制代码


加在上面一点试试~
回复

使用道具 举报

oytktk 发表于 2005-9-23 14:28:36 | 显示全部楼层
原帖由 lu5266 于 2005-9-23 14:26 发表



应该在

  1. include template('viewthread');
复制代码


上面加上的

你加在下面了



慢你一步..
回复

使用道具 举报

 楼主| lu5266 发表于 2005-9-23 14:28:50 | 显示全部楼层
原帖由 oytktk 于 2005-9-23 14:27 发表
你把:

[code]

//==============每页的一.二楼的之间的公告 start by lu5266========
        $announcements = '';
        if($_DCACHE['announcements']) {
                $space = '';
           ...


呵呵

谢谢老兄咯
回复

使用道具 举报

 楼主| lu5266 发表于 2005-9-23 14:29:09 | 显示全部楼层
原帖由 oytktk 于 2005-9-23 14:28 发表



慢你一步..


哈哈
回复

使用道具 举报

oytktk 发表于 2005-9-23 14:29:13 | 显示全部楼层
原帖由 lu5266 于 2005-9-23 14:28 发表


呵呵

谢谢老兄咯



日...客气
回复

使用道具 举报

 楼主| lu5266 发表于 2005-9-23 14:37:27 | 显示全部楼层
原帖由 oytktk 于 2005-9-23 14:29 发表



日...客气

日你得了吧
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-12-23 01:24 , Processed in 0.029355 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表