From: Andreas K. <la...@us...> - 2002-10-29 17:00:29
|
Update of /cvsroot/pn-modules/PN_phpBB_14/html/modules/phpBB_14/pnblocks In directory usw-pr-cvs1:/tmp/cvs-serv32491/PN_phpBB_14/html/modules/phpBB_14/pnblocks Modified Files: phpBB_14.php Log Message: added pnVarCensor added pnVarPrepForDisplay removed stripslashes fixed <br /> tags Index: phpBB_14.php =================================================================== RCS file: /cvsroot/pn-modules/PN_phpBB_14/html/modules/phpBB_14/pnblocks/phpBB_14.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** phpBB_14.php 28 Oct 2002 08:44:29 -0000 1.10 --- phpBB_14.php 29 Oct 2002 17:00:25 -0000 1.11 *************** *** 84,88 **** $result = $dbconn->SelectLimit($sql, $forummax); if($dbconn->ErrorNo() != 0) { ! die("Error accesing to the database " . $dbconn->ErrorNo() . ": " . $dbconn->ErrorMsg() . "<br>"); } $result_forummax = $result->PO_RecordCount(); --- 84,88 ---- $result = $dbconn->SelectLimit($sql, $forummax); if($dbconn->ErrorNo() != 0) { ! die("Error accesing to the database " . $dbconn->ErrorNo() . ": " . $dbconn->ErrorMsg() . "<br />"); } $result_forummax = $result->PO_RecordCount(); *************** *** 91,99 **** } $forummax = pnVarPrepForDisplay($forummax); ! $row['content'] .= "<br><font class=\"pn-normal\"><b>".sprintf(_PHPBB_BLOCK_ACTIVE_FORUMS,$forummax)."</b></font><br>"; while (!$result->EOF) { list($forum_id, $forum_name,$forum_topics, $forum_posts, $cat_title) = $result->fields; if (pnSecAuthAction(0, 'phpBB_14::Forum', "$forum_name::", ACCESS_READ) && pnSecAuthAction(0, 'phpBB_14::Category', "$cat_title::", ACCESS_READ)) { ! $forum_name = stripslashes($forum_name); $title_tag = $forum_name; if ($shorten == 1){ --- 91,99 ---- } $forummax = pnVarPrepForDisplay($forummax); ! $row['content'] .= "<br /><font class=\"pn-normal\"><b>".sprintf(_PHPBB_BLOCK_ACTIVE_FORUMS,$forummax)."</b></font><br />"; while (!$result->EOF) { list($forum_id, $forum_name,$forum_topics, $forum_posts, $cat_title) = $result->fields; if (pnSecAuthAction(0, 'phpBB_14::Forum', "$forum_name::", ACCESS_READ) && pnSecAuthAction(0, 'phpBB_14::Category', "$cat_title::", ACCESS_READ)) { ! $forum_name = pnVarPrepForDisplay($forum_name); $title_tag = $forum_name; if ($shorten == 1){ *************** *** 104,108 **** $row['content'] .= "<strong><big>·</big></strong> <font class=\"pn-normal\"> ! <a href=\"modules.php?op=modload&name=phpBB_14&file=index&action=viewforum&forum=$forum_id\" title=\"$title_tag\">".pnVarPrepForDisplay($forum_name)."</a> (".pnVarPrepForDisplay($forum_topics)."/".pnVarPrepForDisplay($forum_posts).")</font><br>\n"; } $result->MoveNext(); --- 104,108 ---- $row['content'] .= "<strong><big>·</big></strong> <font class=\"pn-normal\"> ! <a href=\"modules.php?op=modload&name=phpBB_14&file=index&action=viewforum&forum=$forum_id\" title=\"$title_tag\">".pnVarPrepForDisplay($forum_name)."</a> (".pnVarPrepForDisplay($forum_topics)."/".pnVarPrepForDisplay($forum_posts).")</font><br />\n"; } $result->MoveNext(); *************** *** 132,136 **** $result = $dbconn->Execute($sql); if($dbconn->ErrorNo() != 0) { ! die("Error accesing to the database " . $dbconn->ErrorNo() . ": " . $dbconn->ErrorMsg() . "<br>"); } $result_postmax = $result->PO_RecordCount(); --- 132,136 ---- $result = $dbconn->Execute($sql); if($dbconn->ErrorNo() != 0) { ! die("Error accesing to the database " . $dbconn->ErrorNo() . ": " . $dbconn->ErrorMsg() . "<br />"); } $result_postmax = $result->PO_RecordCount(); *************** *** 140,144 **** $postmax = pnVarPrepForDisplay($postmax); ! $row['content'] .= "<br><font class=\"pn-normal\"><b>".sprintf(_PHPBB_BLOCK_RECENTPOSTS,$postmax)."</b></font><br>"; $shown_results=0; while ((list($topic_id, $topic_title, $forum_id, $forum_name, $topic_replies,$topic_time,$poster_id,$cat_title) = $result->FetchRow()) --- 140,144 ---- $postmax = pnVarPrepForDisplay($postmax); ! $row['content'] .= "<br /><font class=\"pn-normal\"><b>".sprintf(_PHPBB_BLOCK_RECENTPOSTS,$postmax)."</b></font><br />"; $shown_results=0; while ((list($topic_id, $topic_title, $forum_id, $forum_name, $topic_replies,$topic_time,$poster_id,$cat_title) = $result->FetchRow()) *************** *** 147,151 **** if (pnSecAuthAction(0, 'phpBB_14::Forum', "$forum_name::", ACCESS_READ) && pnSecAuthAction(0, 'phpBB_14::Category', "$cat_title::", ACCESS_READ)) { $shown_results++; ! //$topic_title = stripslashes($topic_title); $title_tag = $topic_title; if ($shorten == 1){ --- 147,151 ---- if (pnSecAuthAction(0, 'phpBB_14::Forum', "$forum_name::", ACCESS_READ) && pnSecAuthAction(0, 'phpBB_14::Category', "$cat_title::", ACCESS_READ)) { $shown_results++; ! $topic_title = pnVarPrepForDisplay(pnVarCensor($topic_title)); $title_tag = $topic_title; if ($shorten == 1){ *************** *** 156,171 **** $row['content'] .= "<strong><big>·</big></strong> ! <font class=\"pn-normal\"><a href=\"modules.php?op=modload&name=phpBB_14&file=index&action=viewtopic&topic=$topic_id&forum=$forum_id&$topic_replies\" title=\"$title_tag\">".pnVarPrepForDisplay($topic_title)."</a>"; // guess timezone must be kept in mind... if ($option > 1) { ! $uresult= $dbconn->SelectLimit("SELECT pn_uname FROM $pntable[users] WHERE pn_uid = $poster_id", 1); ! $urow = $uresult->GetRowAssoc(false); ! $user_name = $urow['pn_uname']; ! $posted_unixtime= strtotime ($topic_time); $posted_ml = ml_ftime(_DATETIMEBRIEF, GetUserTime($posted_unixtime)); ! $row['content'] .= "<br>"; if ($option == 2) { --- 156,175 ---- $row['content'] .= "<strong><big>·</big></strong> ! <font class=\"pn-normal\"><a href=\"modules.php?op=modload&name=phpBB_14&file=index&action=viewtopic&topic=$topic_id&forum=$forum_id&$topic_replies\" title=\"$title_tag\">$topic_title</a>"; // guess timezone must be kept in mind... if ($option > 1) { ! if ($poster_id != 1) { ! $uresult= $dbconn->SelectLimit("SELECT pn_uname FROM $pntable[users] WHERE pn_uid = $poster_id", 1); ! $urow = $uresult->GetRowAssoc(false); ! $user_name = $urow['pn_uname']; ! } else { ! $user_name = pnConfigGetVar('anonymous'); ! } ! $posted_unixtime= strtotime ($topic_time); $posted_ml = ml_ftime(_DATETIMEBRIEF, GetUserTime($posted_unixtime)); ! $row['content'] .= "<br />"; if ($option == 2) { *************** *** 174,186 **** if ($option == 3) { ! $row['content'] .= "".pnVarPrepForDisplay($user_name)."<br>".pnVarPrepForDisplay($posted_ml).""; } if ($option == 4) { ! $row['content'] .= "".pnVarPrepForDisplay($user_name)."<br>".pnVarPrepForDisplay($posted_ml)."<br>".pnVarPrepForDisplay($topic_replies)." "._PHPBB_BLOCK_REPLIES; } } ! $row['content'] .= "</font><br>\n"; } } --- 178,190 ---- if ($option == 3) { ! $row['content'] .= "".pnVarPrepForDisplay($user_name)."<br />".pnVarPrepForDisplay($posted_ml).""; } if ($option == 4) { ! $row['content'] .= "".pnVarPrepForDisplay($user_name)."<br />".pnVarPrepForDisplay($posted_ml)."<br />".pnVarPrepForDisplay($topic_replies)." "._PHPBB_BLOCK_REPLIES; } } ! $row['content'] .= "</font><br />\n"; } } *************** *** 200,204 **** $result = $dbconn->SelectLimit($sql, $postermax); if($dbconn->ErrorNo() != 0) { ! die("Error accesing to the database " . $dbconn->ErrorNo() . ": " . $dbconn->ErrorMsg() . "<br>"); } $result_postermax = $result->PO_RecordCount(); --- 204,208 ---- $result = $dbconn->SelectLimit($sql, $postermax); if($dbconn->ErrorNo() != 0) { ! die("Error accesing to the database " . $dbconn->ErrorNo() . ": " . $dbconn->ErrorMsg() . "<br />"); } $result_postermax = $result->PO_RecordCount(); *************** *** 208,212 **** $postermax = pnVarPrepForDisplay($postermax); ! $row['content'] .= "<br><font class=\"pn-normal\"><b>".sprintf(_PHPBB_BLOCK_ACTIVE_POSTERS,$postermax)."</b></font><br>"; while (!$result->EOF) { list($user_id, $user_posts) = $result->fields; --- 212,216 ---- $postermax = pnVarPrepForDisplay($postermax); ! $row['content'] .= "<br /><font class=\"pn-normal\"><b>".sprintf(_PHPBB_BLOCK_ACTIVE_POSTERS,$postermax)."</b></font><br />"; while (!$result->EOF) { list($user_id, $user_posts) = $result->fields; *************** *** 218,227 **** $result1 = $dbconn->Execute($sql1); if($dbconn->ErrorNo() != 0) { ! die("Error accesing to the database " . $dbconn->ErrorNo() . ": " . $dbconn->ErrorMsg() . "<br>"); } while (!$result1->EOF) { list($user_name) = $result1->fields; $row['content'] .= "<strong><big>·</big></strong> ! <font class=\"pn-normal\"><a href=\"user.php?op=userinfo&uname=$user_name\">".pnVarPrepForDisplay($user_name)."</a><br>(".pnVarPrepForDisplay($user_posts)." "._PHPBB_BLOCK_POSTS_SMALL.")</font><br>\n"; $result1->MoveNext(); } --- 222,231 ---- $result1 = $dbconn->Execute($sql1); if($dbconn->ErrorNo() != 0) { ! die("Error accesing to the database " . $dbconn->ErrorNo() . ": " . $dbconn->ErrorMsg() . "<br />"); } while (!$result1->EOF) { list($user_name) = $result1->fields; $row['content'] .= "<strong><big>·</big></strong> ! <font class=\"pn-normal\"><a href=\"user.php?op=userinfo&uname=$user_name\">".pnVarPrepForDisplay($user_name)."</a><br />(".pnVarPrepForDisplay($user_posts)." "._PHPBB_BLOCK_POSTS_SMALL.")</font><br />\n"; $result1->MoveNext(); } *************** *** 241,245 **** $result = $dbconn->Execute($sql); if($dbconn->ErrorNo() != 0) { ! die("Error accesing to the database " . $dbconn->ErrorNo() . ": " . $dbconn->ErrorMsg() . "<br>"); } --- 245,249 ---- $result = $dbconn->Execute($sql); if($dbconn->ErrorNo() != 0) { ! die("Error accesing to the database " . $dbconn->ErrorNo() . ": " . $dbconn->ErrorMsg() . "<br />"); } *************** *** 249,262 **** $result = $dbconn->Execute($sql); if($dbconn->ErrorNo() != 0) { ! die("Error accesing to the database " . $dbconn->ErrorNo() . ": " . $dbconn->ErrorMsg() . "<br>"); } list ($total_categories) = $result->fields; ! $row['content'] .= "<br><font class=\"pn-normal\"><b>"._PHPBB_BLOCK_TOTAL.":</b></font><br>"; $row['content'] .= " ! <strong><big>·</big></strong> "._PHPBB_BLOCK_CATEGORIES.": ".pnVarPrepForDisplay($total_categories)."<br> ! <strong><big>·</big></strong> "._PHPBB_BLOCK_FORUMS.": ".pnVarPrepForDisplay($total_forums)."<br> ! <strong><big>·</big></strong> "._PHPBB_BLOCK_TOPICS.": ".pnVarPrepForDisplay($total_topics)."<br> ! <strong><big>·</big></strong> "._PHPBB_BLOCK_POSTS.": ".pnVarPrepForDisplay($total_posts)."<br> "; } --- 253,266 ---- $result = $dbconn->Execute($sql); if($dbconn->ErrorNo() != 0) { ! die("Error accesing to the database " . $dbconn->ErrorNo() . ": " . $dbconn->ErrorMsg() . "<br />"); } list ($total_categories) = $result->fields; ! $row['content'] .= "<br /><font class=\"pn-normal\"><b>"._PHPBB_BLOCK_TOTAL.":</b></font><br />"; $row['content'] .= " ! <strong><big>·</big></strong> "._PHPBB_BLOCK_CATEGORIES.": ".pnVarPrepForDisplay($total_categories)."<br /> ! <strong><big>·</big></strong> "._PHPBB_BLOCK_FORUMS.": ".pnVarPrepForDisplay($total_forums)."<br /> ! <strong><big>·</big></strong> "._PHPBB_BLOCK_TOPICS.": ".pnVarPrepForDisplay($total_topics)."<br /> ! <strong><big>·</big></strong> "._PHPBB_BLOCK_POSTS.": ".pnVarPrepForDisplay($total_posts)."<br /> "; } |