$translated = str_replace(">", ">", $translated); #$translated=translate($value['text'],$value['ishtml']=="YES"); if (mb_strlen($translated, 'utf-8') >= 200) { $translated = mb_substr($translated, 0, 200, 'utf-8') . "...."; } echo "<li>"; echo $title . " <a href='../content/?bid={$bid}&tid={$tid}#{$pid}' style='color:#5c7084'>查看原帖</a><br>"; echo "<p style='text-indet:2em'>" . $translated . "<br><font color='#989898'> --- {$author} 发表于 {$time}</font></p>"; } } else { foreach ($result as $value) { if (!@$value['title']) { continue; } $bid = $value['bid']; $tid = $value['tid']; $title = $value['title']; $author = $value['author']; //$time=formatstamp($value['timestamp']); $time = formatstamp($value['updatetime']); echo "<li><a href='../content/?bid={$bid}&tid={$tid}'>" . $value['title'] . "</a><font color='#989898'> ---{$author} 发表于 {$time}</font>"; } } } ?> </ul> </div> </div> </body> </html>
</td></tr> </table> <?php } else { ?> <table class="lzltable"> <?php for ($j = 0; $j < count($lzl); $j++) { $author = $lzl[$j]['author']; $authorinfo = mainfunc(array("view" => $author)); $authorinfo = $authorinfo[0]; echo '<tr><td class="lzltd">'; echo '<div class="lzlicon"><img src="' . translateicon($authorinfo['icon']) . '" class="lzlicon"></div>'; echo '<div class="lzlcontent">' . userhref($author) . ': ' . htmlspecialchars($lzl[$j]['text']) . '<br>'; echo '<span class="lzltime">' . formatstamp($lzl[$j]['time']); if ($canreply) { echo ' <a href="javascript:insertlzlreply(' . $i . ',\'' . $author . '\');" class="lzlreplybt">回复</a>'; } if ($right >= 1 || $author == $currentuser) { echo ' <a href="javascript:deletelzlreply(' . $floor['fid'] . ',' . $lzl[$j]['id'] . ');" class="lzlreplybt">删除</a>'; } echo "</span>"; echo "</div></td></tr>"; } ?> <tr><td class="lzltd"> <?php if ($canreply) { echo ' <button style="float:right" onclick="toggleslide(' . $i . ')">我也说一句</button>
</div> <div class="recents"> <br> <img src="recentreply.png" width="124px"><br> <table border="0" class="recent"> <?php $recentposts = mainfunc(array("view" => $_GET['name'], "ask" => "recentreply")); if (count($recentposts) - 1 == 0) { echo "<tr><td><span class='time'>该用户暂无回复</span></td></tr>"; } else { for ($i = 1; $i < count($recentposts); $i++) { echo "<tr>"; echo "<td width='50px'><span class='num'>" . heal($i) . "</span></td>"; $title = $recentposts[$i]['title']; $bid = $recentposts[$i]['bid']; $tid = $recentposts[$i]['tid']; $link = "../content?bid={$bid}&tid={$tid}&p=1"; echo "<td><span class='title'><a href='{$link}'>{$title}</a></span></td>"; echo "<td width='100px' align='right'><span class='time'>" . formatstamp($recentposts[$i]['updatetime']) . "</span></td>"; } } ?> </table> </div> </div> </body> </html>
} else { ?> <div class="talk"> <div class="talk_record"> <div id="jp-container" class="jp-container"> <?php $count = count($data); $touserinfo = mainfunc(array("view" => $touser)); $myuserinfo = mainfunc(array("view" => $username)); $hisicon = translateicon($touserinfo[0]['icon']); $myicon = translateicon($myuserinfo[0]['icon']); for ($i = 1; $i < $count; $i++) { $one = $data[$i]; $typed = $one['type']; $text = $one['text']; $time = formatstamp($one['time']); if ($typed == "send") { echo '<div class="talk_recordboxme">'; echo '<div class="user"><img src="' . $myicon . '" class="lzlicon"></div>'; } else { echo '<div class="talk_recordbox">'; echo '<div class="user"><img src="' . $hisicon . '" class="lzlicon"></div>'; } echo '<div class="talk_recordtextbg"> </div>'; echo '<div class="talk_recordtext"><pre>' . $text . '</pre><span class="talk_time">' . $time . '</span></div>'; echo '</div>' . "\n"; } ?> <div class="talk_word"> <textarea class="messages" id="msg_ta" placeholder="请输入你要发送的消息内容"></textarea> <br>
$decoratorstr = ""; foreach ($decorator as $item) { $decoratorstr = $decoratorstr . "<img src='{$item}' class='decorator'> "; } $title = $info['title']; $author = $info['author']; $postdate = $info['postdate']; $reply = $info['reply']; $click = $info['click']; $replyer = $info['replyer']; $prestr = " <img src='icon.png' class='decorator'>"; echo "<tr class='content " . ($counter % 2 == 0 ? "even" : "odd") . "'>\n"; echo "<td style='text-align:left;'> {$prestr} <a href='../content?bid={$bid}&tid={$tid}&p=1'>{$title}</a> {$decoratorstr}</td>\n"; echo "<td>" . userhref($author) . "<br><span class='date'>{$postdate}</span></td>\n"; echo "<td>{$reply} / {$click}</td>\n"; echo "<td>" . userhref($replyer ? $replyer : $author) . "<br><span class='date'>" . formatstamp($info['timestamp']) . "</span></td>\n</tr>\n"; } } ?> </table> <table class="bts" id="tablebts"> <tr class="head"><th>操作帖子</th></tr> <?php foreach ($infos as $info) { $tid = @$info['tid']; if (!$tid) { continue; } echo "<tr class='content'><td>"; if ($info['extr'] == "1") {
function formattime($time) { date_default_timezone_set('Asia/Shanghai'); return formatstamp(strtotime($time)); }
function trans($key, $value) { if (!$value && $value != 0) { return "不知道"; } if ($key == "regdate" || $key == "lastdate") { return formatstamp($value); } return $value; }