?? index.php
字號(hào):
<?php
/********************************************************************************/
/* Wap-2-Go Mobile Phone Nuke-Addon */
/* bringing the Advanced Content Management System to Mobile Format */
/* =========================================================================== */
/* powered by Nuke SQL Database */
/* */
/* Copyright (c) 2007 by Philip Marsh - http://www.wap2go.co.uk */
/* */
/* Forum Module for Wap-2-Go */
/* */
/* Powered By phpBB - www.php.com - phpBB Group */
/* As Ported to PHP-Nuke by nukemods.com */
/* */
/* FILE DETAILS and EXPLANATION: */
/* functions.php - Specific Functions for Module */
/********************************************************************************/
// Include the Module's Functions
include_once "modules/Forums/functions.php";
// Fetch Configuration
$board_config = array();
$sql = "SELECT * FROM $prefix"._bbconfig."";
if(!($result = $db->sql_query($sql)) )
{ message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql); }
while ($row = $db->sql_fetchrow($result))
{ $board_config[$row['config_name']] = $row['config_value']; }
// Fetch Query Strings
$t = htmlentities($_GET['t']);
$f = htmlentities($_GET['f']);
$c = htmlentities($_GET['c']);
// Set Forum Menu
$forum_menu = "";
$forum_menu = char_dec($forum_menu);
// doOverallHeader($forum_menu);
// Topic
if ($t!="")
{
$increment = 2;
$limit = 2;
/* $sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid
FROM $prefix"._bbposts." p, $prefix"._users." u, $prefix"._bbposts_text." pt
WHERE p.topic_id = '$t' $limit_posts_time AND pt.post_id = p.post_id AND u.user_id = p.poster_id ORDER BY p.post_time $post_time_order LIMIT $start, $increment";
// if ( !($result = $db->sql_query($sql)) )
// { message_die(GENERAL_ERROR, "Could not obtain post/user information.", '', __LINE__, __FILE__, $sql); }
$postrow = array();
if ($row = $db->sql_fetchrow($result))
{ do { $postrow[] = $row; } while ($row = $db->sql_fetchrow($result));
$db->sql_freeresult($result);
$total_posts = count($postrow);
} else {
// include("includes/functions_admin.php");
// sync('topic', $t);
// message_die(GENERAL_MESSAGE, $lang['No_posts_topic']);
}
*/
// Display Topic
$dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
$query = "select * from $prefix"._bbposts." WHERE topic_id = '$t' ORDER BY post_id ASC";
$totalresults = $db->sql_numrows($db->sql_query($query));
$query .= " LIMIT $start,$increment";
$result = $db->sql_query($query);
$row = $db->sql_fetchrow($result);
OpenTable();
do {
// Fetch Post and its text where post_id matchs those in Thread Above
$posts = $row["post_id"];
$result1 = $db->sql_query("select post_id, post_subject, post_text, bbcode_uid from $prefix"._bbposts_text." WHERE post_id = '$posts'");
$data1 = $db->sql_fetchrow($result1);
// Correct Text
$title = strip_tags($data1["post_subject"]);
$text = $data1["post_text"];
// Fetch Username
$uid = $row["poster_id"];
$bbcode_uid = $data1["bbcode_uid"];
$result2 = $db->sql_query("select * from $prefix"._users." WHERE user_id = '$uid'");
$data2 = $db->sql_fetchrow($result2);
$posted_by = $data2["username"];
$user_sig = $data2["user_sig"];
$user_allowhtml = $data2["user_allowhtml"];
$user_sig_bbcode_uid = $data2["user_sig_bbcode_uid"];
$message = $text;
if ( !$board_config['allow_html'] ) {
if ($user_sig != '' && $user_allowhtml)
{ $user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $user_sig); }
if ( $row['enable_html'] )
{ $message = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $message); }
}
if ($board_config['allow_bbcode']) {
if ( $user_sig != '' && $user_sig_bbcode_uid != '' )
{ $user_sig = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $user_sig);}
if ( $bbcode_uid != '' )
{ $message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($message, $bbcode_uid) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $message); }
}
if ( $user_sig != '' ) { $user_sig = make_clickable($user_sig); }
$message = make_clickable($message);
if ($board_config['allow_smilies']) {
if ( $row['user_allowsmile'] && $user_sig != '' )
{ $user_sig = smilies_pass($user_sig); }
if ( $row['enable_smilies'] )
{ $message = smilies_pass($message); }
}
$message = str_replace("\n", "\n<br />\n", $message);
$text = wordwrap($message,25,"\n",1);
$title = char_dec($title);
$text = char_dec($text);
doForumPost($title, $text, $posted_by, $user_sig);
} while ($row = $db->sql_fetchrow($result));
$query = "&t=".$t."";
doPageNavigation($start,$increment,$totalresults,$query);
CloseTable();
}
// Topics
else if ($f!="")
{
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -