⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wapipbscript_v1_95.php

📁 WAP IPB Script for Mobilizing IPB for WML
💻 PHP
📖 第 1 页 / 共 5 页
字号:
                $display_output = $display_output . "</p>";
        }
        
        If ($action=="logout") {
                $display_output = $display_output . "<p align=\"center\"><b>{$strLogout}</b><br/><br/>";
                mysql_query("REPLACE INTO " . $tableprefix . $sessionstable . " SET id='" . $REMOTE_ADDR . "', $ip_address_column='" . $REMOTE_ADDR . "', $running_time_column='" . time() . "'");
                $display_output = $display_output . "{$strLogoutComplete}<br/><br/><a href=\"" . $PHP_SELF . "\">{$strHome}</a>";
                $display_output = $display_output . "</p>";
        }
}

If (!substr($pid, 0 , 1)=="f") {
$disstr = <<<EOF
</card>
<card id="viewcategory" title="{$boardtitle}">
<p align="center">
EOF;
$display_output = $display_output . $disstr;
}

if (!$id==Null) {
        $t1_1 = microtime();
        $result = mysql_query("SELECT `$name_column`, state FROM `" . $tableprefix . $categoriestable . "` WHERE `id`=" . $id);
        $row = mysql_fetch_array($result);
        If ((!$row['state']==0 && $cat_vis==1) || $cat_vis==0) {
                $display_output = $display_output . "<b>" . wmlspecialchars(html_entity_decode2($row[$name_column])) . "</b><br/><br/>";
                If ($forumviewnavmode == 1) {
                        $display_output = $display_output . "<select name=\"fid\" value=\"0\">";
                }
                $result = mysql_query("SELECT `$name_column`, `id` FROM `" . $tableprefix . $forumstable . "` WHERE `$category_column`=" . $id . " ORDER BY `$position_column`");
                while ($row = mysql_fetch_array($result)) {
                        If (getperm($row['id'], "read")) {
                                If ($forumviewnavmode == 1) {
                                        $display_output = $display_output . "<option><onevent type=\"onpick\"><go href=\"" . $PHP_SELF . "#viewforum\" method=\"post\"><postfield name=\"fid\" value=\"" . $row['id'] . "\"/></go></onevent>" . wmlspecialchars(html_entity_decode2($row[$name_column])) . "</option>";
                                } else {
                                        $display_output = $display_output . "<a href=\"" . $PHP_SELF . "?fid=" . $row['id'] . "#viewforum\">" . wmlspecialchars(html_entity_decode2($row[$name_column])) . "</a><br/>";
                                }
                        }
                }
                If ($forumviewnavmode == 1) {
                        $display_output = $display_output . "</select>";
                }
                $display_output = $display_output . "<br/><a href=\"" . $PHP_SELF . "\">{$strHome}</a></p>";
                $t2_1 = microtime();
                if ($pagecreation==1) {
                        $display_output = $display_output . "<p align=\"center\"><br/>{$strCardCreated1}<br/>" . substr(($t2_1 - $t1_1), 0, 8) . " Sec.";
                }
        } else {
                $display_output = $display_output . "<p>{$strNoPermCategory}" . $login_out . "<br/><a href=\"" . $PHP_SELF . "\">Home</a></p>";
        }
}

If (!substr($pid, 0 , 1)=="f") {
$disstr = <<<EOF
</p>
</card>
<card id="viewforum" title="{$boardtitle}">
EOF;
$display_output = $display_output . $disstr;
}

if (!$fid==Null) {
        $t1_2 = microtime();
        $result = mysql_query("SELECT `$name_column` FROM `" . $tableprefix . $forumstable . "` WHERE `id`=" . $fid);
        $row = mysql_fetch_array($result);
        $display_output = $display_output . "<p align=\"center\"><b>" . wmlspecialchars(html_entity_decode2($row['name'])) . "</b><br/><br/>";
        If (getperm($fid, "read")) {
                If ($page==0) {
                        $result = mysql_query("SELECT * FROM `" . $tableprefix . $topicstable . "` WHERE `$forum_id_column`=" . $fid . " AND `$pinned_column`=1 ORDER BY `$last_post_column` DESC");
                }
                If ($showpinned==1) {
                        while ($row = mysql_fetch_array($result)) {
                                $topic = wmlspecialchars(html_entity_decode2($row[$title_column]));
                                $display_output = $display_output . "<i>{$strPinned} </i><a href=\"" . $PHP_SELF . "?tid_page=" . $row['tid'] . "_0#viewtopic\">" . $topic . "</a><br/>";
                        }
                }
                $display_output = $display_output . "<br/></p>";

                $result = mysql_query("SELECT * FROM `" . $tableprefix . $topicstable . "` WHERE `$forum_id_column`=" . $fid . " ORDER BY `$last_post_column` DESC LIMIT " . ($page * $forumpostsperpage) . "," . $forumpostsperpage);
                If (getperm($fid, "read")) {
                        while ($row = mysql_fetch_array($result)) {
                                $result2 = mysql_query("SELECT * FROM `" . $tableprefix . $poststable . "` WHERE `$topic_id_column`=" . $row['tid'] . " ORDER BY '$post_date_column' DESC LIMIT 0,1");
                                $row2 = mysql_fetch_array($result2);
                               $topic = wmlspecialchars(html_entity_decode2($row[$title_column]));
                                $boardcode = docharlimit(html2wml($row2[$post_column]));
                                if ($viewdetails == 1) {
                                        $display_output = $display_output . "<p><b>{$strTopic} </b><a href=\"" . $PHP_SELF . "?tid_page=" . $row2[$topic_id_column] . "_0#viewtopic\">" . $topic . "</a> (" . $row[$posts_column] . ", " . $row[$views_column] . ")<br/><b>{$strLastPost}</b><br/><i>{$strUser}</i> " . $row2[$author_name_column] . "<br/><i>{$strPost}</i> " . $boardcode . "<br/><br/></p>";
                                } else {
                                        $display_output = $display_output . "<p><a href=\"" . $PHP_SELF . "?tid_page=" . $row2[$topic_id_column] . "_0#viewtopic\">" . $topic . "</a> (" . $row[$posts_column] . ", " . $row[$views_column] . ")<br/></p>";
                                }
                        }
                }
                $display_output = $display_output . "<p align=\"center\">";
                $p2 = $page + 1;
                $p3 = $page - 1;
                If ($allownewtopics==1 && $allowpost==1 && getperm($fid, "start")) {
                        If (post_time()) {
                                $display_output = $display_output . "<a href=\"$PHP_SELF?fid=" . $fid . "#newtopic\">{$strNewThread}</a><br/>";
                        } else {
                                $display_output = $display_output . "{$strFloodControl}<br/>";
                        }
                } else {
                        $display_output = $display_output . "{$strNewThread}<br/>";
                }
                if (!$page==0) {
                        $display_output = $display_output . "<a href=\"" . $PHP_SELF . "?fid_page=" . $fid . "_" . $p3 . "#viewforum\">{$strPrev}</a> ";
                }
                $result = mysql_query("SELECT tid FROM `" . $tableprefix . $topicstable . "` WHERE forum_id='$fid' ORDER BY '$last_post_column' DESC LIMIT " . ($p2 * $forumpostsperpage) . "," . $forumpostsperpage);
                if ($result&&$row = mysql_fetch_array($result)) {
                        $display_output = $display_output . "<a href=\"" . $PHP_SELF . "?fid_page=" . $fid . "_" . $p2 . "#viewforum\">{$strNext}</a>";
                }
                $display_output = $display_output . "<br/><a href=\"" . $PHP_SELF . "\">{$strHome}</a></p>";
                $t2 = microtime();
                if ($pagecreation==1) {
                        $display_output = $display_output . "<p align=\"center\"><br/>{$strCardCreated1}<br/>" . substr(($t2 - $t1), 0, 8) . "{$strCardCreated2}</p>";
                }
        } else {
                $display_output = $display_output . "<p>{$strNoPermForum}" . $login_out . "<br/><a href=\"" . $PHP_SELF . "\">{$strHome}</a></p>";
        }
}

If (!substr($pid, 0 , 1)=="f") {
$disstr = <<<EOF
</card>
<card id="viewtopic" title="{$boardtitle}">
EOF;
$display_output = $display_output . $disstr;
}

if (!$tid==Null) {
        $t1_3 = microtime();
        $result = mysql_query("SELECT `$title_column`, `forum_id` FROM `" . $tableprefix . $topicstable . "` WHERE `tid`=" . $tid);
        if (!$result) {
                exit();
        }
        If ($add_views==1 && $page==0) {
                mysql_query("UPDATE " . $tableprefix . "topics SET views=views+1 WHERE tid=" . $tid);
        }
        $row = mysql_fetch_array($result);
        $topic_fid = $row["forum_id"];
        $display_output = $display_output . "<p align=\"center\"><b>Topic: " . wmlspecialchars(html_entity_decode2($row[$title_column])) . "</b><br/><br/></p>";
        $result = mysql_query("SELECT * FROM `" . $tableprefix . $poststable . "` WHERE `$topic_id_column`=" . $tid . " ORDER BY '$post_date_column' LIMIT " . ($page* $topicpostsperpage) . "," . $topicpostsperpage);
        $result2 = mysql_query("SELECT 'id' FROM `" . $tableprefix . $poststable . "` WHERE `$topic_id_column`=" . $tid . " ORDER BY '$post_date_column'");
        if (!$result) {
                exit();
        }
        If (getperm($topic_fid, "read")) {
                while ($row = mysql_fetch_array($result)) {
                        $boardcode = dosimplecharlimit(html2wml($row[$post_column]),$tid ,$row['pid'], $page);
                        if (!$row['attach_file']==null && $enattach == 1) {
                                $postfile = "<b>{$strAttached}</b> <a href=\"" . $PHP_SELF . "?pid=f" . $row['pid'] . "\">" . $row['attach_file'] . "</a><br/>";
                        } else {
                                $postfile = "";
                        }
                        $display_output = $display_output . "<p><b>{$strUser}</b> " . $row[$author_name_column] . "<br/><b>{$strPost}</b> " . $boardcode . "<br/>" . $postfile . "<br/></p>";
                }
        } else {
                $display_output = $display_output . "<p align=\"center\">{$strNoPermTopic}" . $login_out . "<br/></p>";
        }
        $display_output = $display_output . "<p align=\"center\">";
        If ($allowreply==1 && $allowpost==1 && getperm($topic_fid, "reply")) {
                If (post_time()) {
                        $display_output = $display_output . "<a href=\"$PHP_SELF?tid_fid=" . $tid . "_" . $topic_fid . "#reply\">{$strReply}</a><br/>";
                } else {
                        $display_output = $display_output . "{$strFloodControl}<br/>";
                }
        } else {
                $display_output = $display_output . "{$strReply}<br/>";
        }
        $p2 = $page + 1;
        $p3 = $page - 1;
        if (!$page==0) {
                $display_output = $display_output . "<a href=\"" . $PHP_SELF . "?tid_page=" . $tid . "_" . $p3 . "#viewtopic\">{$strPrev}</a> ";
        }
        $result = mysql_query("SELECT pid FROM `" . $tableprefix . $poststable . "` WHERE `$topic_id_column`=" . $tid . " ORDER BY '$post_date_column' LIMIT " . ($p2 * $topicpostsperpage) . "," . $topicpostsperpage);
        if ($result&&$row = mysql_fetch_array($result)) {
                $display_output = $display_output . " <a href=\"" . $PHP_SELF . "?tid_page=" . $tid . "_" . $p2 . "#viewtopic\">{$strNext}</a>";
        }
        $display_output = $display_output . "<br/>" . topicpagenav($result2, $page, $tid);
        $display_output = $display_output . "<br/><a href=\"" . $PHP_SELF . "\">{$strHome}</a>";
        $display_output = $display_output . "</p>";
        $t2_3 = microtime();
        if ($pagecreation==1) {
                $display_output = $display_output . "<p align=\"center\"><br/>{$strCardCreated1}<br/>" . substr(($t2_3 - $t1_3), 0, 8) . "{$strCardCreated2}</p>";
        }
} elseif (!$ptid==null) {
        $t1_4 = microtime();
        $result = mysql_query("SELECT * FROM `" . $tableprefix . $poststable . "` WHERE `pid`=" . $ppid);
        $display_output = $display_output . "<p align=\"center\"><b>{$strFullPostView}</b><br/></p>";
        $row = mysql_fetch_array($result);
                $boardcode = html2wml($row[$post_column]);
                if (!$row['attach_file']==null && $enattach == 1) {
                        $postfile = "<b>{$strAttached}</b> <a href=\"" . $PHP_SELF . "?pid=f" . $row['pid'] . "\">" . $row['attach_file'] . "</a><br/>";
                } else {
                        $postfile = "";
                }
                $display_output = $display_output . "<p>" . $boardcode . "<br/>" . $postfile . "<br/></p>";

        $display_output = $display_output . "<p align=\"center\">";
        $display_output = $display_output . "<br/>" . "<a href=\"" . $PHP_SELF . "?tid_page=" . $ptid . "_" . $ppage . "#viewtopic\">{$strBack}</a>";
        $display_output = $display_output . "<br/><a href=\"" . $PHP_SELF . "\">{$strHome}</a>";
        $display_output = $display_output . "</p>";
        $t2_4 = microtime();
        if ($pagecreation==1) {
                $display_output = $display_output . "<p align=\"center\"><br/>{$strCardCreated1}<br/>" . substr(($t2_4 - $t1_4), 0, 8) . "{$strCardCreated2}</p>";
        }
}

If (!substr($pid, 0 , 1)=="f") {
$disstr = <<<EOF
</card>
<card id="reply" title="{$strReplyToTopic}">
EOF;
$display_output = $display_output . $disstr;


If (!$fid==null && !$tid==null && $allowreply==1 && post_time()) {
        $disstr = "<p><do type=\"accept\" label=\"{$strReply}\"><go href=\"$PHP_SELF?tid_fid_newreply=" . $tid . "_" . $fid . "_1#reply\" method=\"post\"><postfield name=\"reply\" value=\"$(reply)\"/></go></do>{$strReply2}<br/><input title=\"{$strReply}\" name=\"reply\"/><br/><a href=\"" . $PHP_SELF . "?tid_fid_newreply_reply=" . $tid . "_" . $fid . "_1_\$(reply)#reply\">{$strPostReply}</a><br/><br/><a href=\"" . $PHP_SELF . "?tid=" . $tid . "#viewtopic\">{$strBack}</a><br/><a href=\"$PHP_SELF\">{$strHome}</a></p>";
        If (!$reply==null) {
                if ($allowpost==1 && getperm($fid, "reply")) {
                        reply(parse_emoticons(htmlentities($reply)));
                        $disstr = "<p align=\"center\"><br/>Reply Successful<br/><br/><a href=\"" . $PHP_SELF . "?tid=" . $tid . "#viewtopic\">Back</a><br/><a href=\"" . $PHP_SELF . "\">Home</a></p>";
                } else {
                        $disstr = "<p><do type=\"accept\" label=\"{$strReply}\"><go href=\"" . $PHP_SELF . "?tid_fid_newreply=" . $tid . "_" . $fid . "_1#reply\" method=\"post\"><postfield name=\"reply\" value=\"$(reply)\"/></go></do>{$strReplyError}<br/><br/>{$strReply2}<br/><input title=\"{$strReply}\" name=\"reply\"/><br/><a href=\"" . $PHP_SELF . "?tid_fid_newreply_reply=" . $tid . "_" . $fid . "_1_\$(reply)#reply\">{$strPostReply}</a><br/><br/><a href=\"" . $PHP_SELF . "?tid=" . $tid . "#viewtopic\">{$strBack}</a><br/><a href=\"" . $PHP_SELF . "\">{$strHome}</a></p>";
                }
        }
        $display_output = $display_output . $disstr;
}
$disstr = <<<EOF
</card>
EOF;
$display_output = $display_output . $disstr;
}

If (!substr($pid, 0 , 1)=="f") {
$disstr = <<<EOF
<card id="newtopic" title="{$strNewTopic}">
EOF;
$display_output = $display_output . $disstr;


If (!$fid==null && $allownewtopics==1 && post_time()) {
        $disstr = "<p><do type=\"accept\" label=\"{$strPost2}\"><go href=\"$PHP_SELF?fid=" . $fid . "#newtopic\" method=\"post\"><postfield name=\"title\" value=\"$(title)\"/><postfield name=\"desc\" value=\"$(desc)\"/><postfield name=\"topicpost\" value=\"$(topicpost)\"/></go></do>{$strNewTopic2}<br/><br/>{$strTitle2}<br/><input title=\"{$strTitle}\" name=\"title\"/><br/>{$strDesc2}<br/><input title=\"{$strDesc}\" name=\"desc\"/><br/>{$strPost}<br/><input title=\"{$strPost2}\" name=\"topicpost\"/><br/><a href=\"" . $PHP_SELF . "?fid_title_desc_topicpost=" . $fid . "_\$(title)_\$(desc)_\$(topicpost)#newtopic\">{$strPost2}</a><br/><br/><a href=\"" . $PHP_SELF . "?fid=" . $fid . "#viewforum\">{$strBack}</a><br/><a href=\"$PHP_SELF\">{$strHome}</a></p>";
        If (!$topicpost==null) {
                if ($allowpost==1 && getperm($fid, "start")) {
                        new_topic($fid, htmlentities($title), htmlentities($desc), parse_emoticons(htmlentities($topicpost)));
                        $disstr = "<p align=\"center\"><br/>{$strPostSuccessful}<br/><br/><a href=\"" . $PHP_SELF . "?fid=" . $fid . "#viewforum\">Back</a><br/><a href=\"" . $PHP_SELF . "\">Home</a></p>";

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -