📄 wread.php
字号:
<?php
function content($content)
{
$content = preg_replace("/\[code\](.+?)\[\/code\]/eis" , "", $content);
$content = preg_replace("/\[quote\](.+?)\[\/quote\]/eis", "", $content);
$content = str_replace("[u]", "", $content);
$content = str_replace("[/u]", "", $content);
$content = str_replace("[b]", "", $content);
$content = str_replace("[/b]", "", $content);
$content = str_replace("[i]", "", $content);
$content = str_replace("[/i]", "", $content);
$content = str_replace("[list]", "", $content);
$content = str_replace("[list=1]", "", $content);
$content = str_replace("[list=a]", "" , $content);
$content = str_replace("[list=A]", "", $content);
$content = str_replace("[*]", "", $content);
$content = str_replace("[/list]", "", $content);
$content = str_replace("[page]", "", $content);
$content = str_replace("[vid]", "", $content);
$content = str_replace("[/vid]", "", $content);
$content = preg_replace("/\[img\](.+?)\[\/img\]/eis", "", $content);
$content = preg_replace("/\[color=([^\[]*)\](.+?)\[\/color\]/eis", "'\\2'", $content);
$content = preg_replace("/\[url=([^\[]*)\](.+?)\[\/url\]/eis", "'\\2'", $content);
$content = preg_replace("/\[url\]([^\[]*)\[\/url\]/eis", "'\\1'", $content);
$content = preg_replace("/\[em([0-9]+)\]/eis", '', $content);
$content = preg_replace("/\[txt-([0-9]+)\]/eis", '', $content);
$content = preg_replace("/\[file-([0-9]+)\]/eis", '', $content);
$content = preg_replace("/\[url-([0-9]+)\]/eis", '', $content);
$content = preg_replace("/\[poll-([0-9]+)\]/eis", '', $content);
return $content;
}
function wreadpage()
{
global $wid, $treadnum, $numpage, $wtitlenum;
$numpage = @ceil($wtitlenum / $treadnum);
$_GET['page'] > $numpage?$_GET['page'] = $numpage: null;
$_GET['page'] < 1?$_GET['page'] = 1: null;
if (($numpage - $_GET['page']) >= 5) {
$b = $_GET['page']-5;
$c = $_GET['page'] + 5;
if (abs($b) != $b || $b == 0) {
$b = 1;
$c = 10;
}
$numpage <= 10?$c = $numpage: null;
} else {
$c = $numpage;
$b = $numpage-9;
if (abs($b) != $b || $b == 0) {
$b = 1;
}
}
for(;$b <= $c;$b++) {
$pagelist .= '<div class="page-'.($b == $_GET['page']?2:1).'"><div class="b"><div class="c"><a href="'.(REWRIT_E?'wread-'.$wid.'-'.$b.'.html':'wread.php?wid=' . $wid . '&page=' . $b).'">' . $b . '</a></div></div></div>';
}
if ($numpage > 10 && $numpage - $_GET['page'] > 5) {
$pagelist .= '<div class="page-1"><div class="b"><div class="c">鈥
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -