示例#1
0
文件: index.php 项目: hun-tun/CAPUBBS
		</div>
		</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 '&nbsp;<a href="javascript:insertlzlreply(' . $i . ',\'' . $author . '\');" class="lzlreplybt">回复</a>';
            }
            if ($right >= 1 || $author == $currentuser) {
                echo '&nbsp;<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 '
示例#2
0
        if ($count == 1) {
            echo '<tr><td align="center">暂无私信消息往来</td></tr></table>';
            exit;
        }
        for ($i = 1; $i < $count; $i++) {
            $one = $data[$i];
            $userinfo = mainfunc(array("view" => $one['username']));
            $userinfo = @$userinfo[0];
            $icon = translateicon($userinfo['icon']);
            $author = $one['username'];
            $text = $one['text'];
            $time = date("Y-m-d H:i:s", $one['time']);
            $number = intval($one['number']);
            echo '<tr><td class="lzltd"><div class="lzlicon">';
            echo '<img src="' . $icon . '" class="lzlicon"></div>' . "\n";
            echo '<div class="lzlcontent" style="margin-top:-7px">' . userhref($author);
            if ($number > 0) {
                echo '&nbsp;&nbsp;<span class="badge">' . $number . '</span>';
            }
            echo '<span class="lzltime">' . $time . "</span>";
            echo "<br><span onclick='window.location=\"message.php?type=chat&to={$author}\"' style='cursor:pointer'>{$text}&nbsp;<span style='float:right'><a href='message.php?type=chat&to={$author}' class='lzlreplybt'>查看全部</a>&nbsp;(" . $one['totalnum'] . ")</span></span></span>";
            echo '</div></td></tr>';
        }
        echo '</table>';
    } else {
        if ($type == "new") {
            ?>
<div style="margin-top:90px;text-align:center">
	<span>发送新消息给:&nbsp;<input id="msg_to" placeholder="收件人id" style="width:100px"></span><br><br>
	<textarea id="msg_ta" style="width:400px;height:200px;font-size:13px;padding:5px;"></textarea><br><br>
	<button onclick="sendto()" id="msg_sendbt">发送</button>
示例#3
0
文件: index.php 项目: hun-tun/CAPUBBS
        $decoratorstr = "";
        foreach ($decorator as $item) {
            $decoratorstr = $decoratorstr . "<img src='{$item}' class='decorator'>&nbsp;";
        }
        $title = $info['title'];
        $author = $info['author'];
        $postdate = $info['postdate'];
        $reply = $info['reply'];
        $click = $info['click'];
        $replyer = $info['replyer'];
        $prestr = "&nbsp;<img src='icon.png' class='decorator'>";
        echo "<tr class='content " . ($counter % 2 == 0 ? "even" : "odd") . "'>\n";
        echo "<td style='text-align:left;'>&nbsp;{$prestr}&nbsp;<a href='../content?bid={$bid}&tid={$tid}&p=1'>{$title}</a>&nbsp;{$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") {
示例#4
0
文件: index.php 项目: hun-tun/CAPUBBS
	<div class="left">
		<div class="title">
			<img src="tlbk.png" width="150">
		</div>
		<?php 
$blocks = mainfunc(array("ask" => "bbsinfo"));
for ($i = 0; $i < count($blocks); $i++) {
    $block = $blocks[$i];
    if ($block['hide'] == "1") {
        continue;
    }
    echo "<div class='block raised' onclick='window.location.assign(\"../main?bid=" . $block['bid'] . "\")'>";
    echo "<img src='b" . $block['bid'] . ".jpeg' width='150' height='110'><br>";
    echo "<span class='title'>" . $block['bbstitle'] . "</span><br>";
    echo "<span class='desc'>" . @$block['desc'] . "</span><br>";
    $banzhus = userhref($block['m1']) . " " . userhref($block['m2']) . " " . userhref($block['m3']) . " " . userhref($block['m4']);
    echo "<span class='banzhu'>版主:" . $banzhus . "</span>";
    echo "</div>";
}
?>
		<div style="float:left;margin-bottom:70px">
			<a href="javascript:showall()" id="showothers">显示所有版面↓</a>
			<div id="others" style="float:left;margin-top:20px;display:none">
			<?php 
for ($i = 0; $i < count($blocks); $i++) {
    $block = $blocks[$i];
    if ($block['hide'] == "0") {
        continue;
    }
    echo "<a href='../main?bid=" . $block['bid'] . "'  style='margin-top:20px;margin-right:10px;'>" . $block['bbstitle'] . '</a>';
}
示例#5
0
function translate($raw, $ishtml, $space = true)
{
    $html = $raw;
    if (!$ishtml) {
        $html = htmlspecialchars_decode($html);
    }
    $html = str_replace(chr(10) . "<br>", "<br>", $html);
    $html = str_replace(chr(10), "<br>", $html);
    $html = str_replace(chr(13), "<br>", $html);
    if (!$space) {
        $html = str_replace(" ", "&nbsp;", $html);
    }
    $html = preg_replace("#(\\[img])(.+?)(\\[/img])#", "<img src='\$2'>", $html);
    $quoteend = "<div class='quotel'><div class='quoter'>引用自 " . userhref("\$2") . " :<br>\$4<br></div><br></div>";
    $html = preg_replace("#(\\[quote=)(.+?)(])([\\s\\S]+?)(\\[/quote])#", $quoteend, $html);
    $html = preg_replace("#(\\[size=)(.+?)(])([\\s\\S]+?)(\\[/size])#", "<font size='\$2'>\$4</font>", $html);
    $html = preg_replace("#(\\[font=)(.+?)(])([\\s\\S]+?)(\\[/font])#", "<font face='\$2'>\$4</font>", $html);
    $html = preg_replace("#(\\[color=)(.+?)(])([\\s\\S]+?)(\\[/color])#", "<font color='\$2'>\$4</font>", $html);
    $html = preg_replace("#(\\[color=)(.+?)(])([\\s\\S]+?)#", "<font color='\$2'>\$4</font>", $html);
    $html = preg_replace("#(\\[at])(.+?)(\\[/at])#", athref("\$2"), $html);
    $html = preg_replace("#(\\[url])(.+?)(\\[/url])#", href("\$2", "\$2"), $html);
    $html = preg_replace("#(\\[url=)(.+?)(])([\\s\\S]+?)(\\[/url])#", href("\$2", "\$4"), $html);
    $html = preg_replace("#(\\[b])(.+?)(\\[/b])#", "<b>\$2</b>", $html);
    $html = preg_replace("#(\\[i])(.+?)(\\[/i])#", "<i>\$2</i>", $html);
    return $html;
}