onokazu
onoka****@users*****
2005年 9月 5日 (月) 05:46:10 JST
Index: xoops2jp/html/modules/newbb/config.php diff -u xoops2jp/html/modules/newbb/config.php:1.2 xoops2jp/html/modules/newbb/config.php:1.3 --- xoops2jp/html/modules/newbb/config.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/newbb/config.php Mon Sep 5 05:46:10 2005 @@ -1,5 +1,5 @@ <?php -// $Id: config.php,v 1.2 2005/03/18 12:52:25 onokazu Exp $ +// $Id: config.php,v 1.3 2005/09/04 20:46:10 onokazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // @@ -41,9 +41,8 @@ $bbCookie['domain'] = ""; // It should be safe to leave these alone as well. -$bbCookie['path'] = str_replace(basename($HTTP_SERVER_VARS['PHP_SELF']),"",$HTTP_SERVER_VARS['PHP_SELF']); +$bbCookie['path'] = htmlspecialchars(str_replace(basename($_SERVER['PHP_SELF']),"",$_SERVER['PHP_SELF']),ENT_QUOTES); $bbCookie['secure'] = false; - /* -- You shouldn't have to change anything after this point */ /* -- Images -- */ $bbImage['post'] = $bbUrl['images']."/post.gif"; @@ -74,15 +73,15 @@ // set LastVisitTemp cookie, which only gets the time from the LastVisit // cookie if it does not exist yet // otherwise, it gets the time from the LastVisitTemp cookie -if (!isset($HTTP_COOKIE_VARS["NewBBLastVisitTemp"])) { - if(isset($HTTP_COOKIE_VARS["NewBBLastVisit"])){ - $temptime = $HTTP_COOKIE_VARS["NewBBLastVisit"]; +if (!isset($_COOKIE["NewBBLastVisitTemp"])) { + if(isset($_COOKIE["NewBBLastVisit"])){ + $temptime = $_COOKIE["NewBBLastVisit"]; }else{ $temptime = time(); } } else { - $temptime = $HTTP_COOKIE_VARS["NewBBLastVisitTemp"]; + $temptime = $_COOKIE["NewBBLastVisitTemp"]; } // set cookie. Index: xoops2jp/html/modules/newbb/edit.php diff -u xoops2jp/html/modules/newbb/edit.php:1.3 xoops2jp/html/modules/newbb/edit.php:1.4 --- xoops2jp/html/modules/newbb/edit.php:1.3 Wed Aug 3 21:39:14 2005 +++ xoops2jp/html/modules/newbb/edit.php Mon Sep 5 05:46:10 2005 @@ -1,5 +1,5 @@ <?php -// $Id: edit.php,v 1.3 2005/08/03 12:39:14 onokazu Exp $ +// $Id: edit.php,v 1.4 2005/09/04 20:46:10 onokazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // @@ -30,9 +30,9 @@ // ------------------------------------------------------------------------- // include 'header.php'; foreach (array('forum', 'topic_id', 'post_id', 'order', 'pid') as $getint) { - ${$getint} = isset($HTTP_GET_VARS[$getint]) ? intval($HTTP_GET_VARS[$getint]) : 0; + ${$getint} = isset($_GET[$getint]) ? intval($_GET[$getint]) : 0; } -$viewmode = (isset($HTTP_GET_VARS['viewmode']) && $HTTP_GET_VARS['viewmode'] != 'flat') ? 'thread' : 'flat'; +$viewmode = (isset($_GET['viewmode']) && $_GET['viewmode'] != 'flat') ? 'thread' : 'flat'; if ( empty($forum) ) { redirect_header("index.php", 2, _MD_ERRORFORUM); exit(); Index: xoops2jp/html/modules/newbb/index.php diff -u xoops2jp/html/modules/newbb/index.php:1.4 xoops2jp/html/modules/newbb/index.php:1.5 --- xoops2jp/html/modules/newbb/index.php:1.4 Wed Aug 3 21:39:14 2005 +++ xoops2jp/html/modules/newbb/index.php Mon Sep 5 05:46:10 2005 @@ -1,5 +1,5 @@ <?php -// $Id: index.php,v 1.4 2005/08/03 12:39:14 onokazu Exp $ +// $Id: index.php,v 1.5 2005/09/04 20:46:10 onokazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // @@ -45,7 +45,7 @@ $xoopsTpl->assign(array("lang_welcomemsg" => sprintf(_MD_WELCOME,htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)), "lang_tostart" => _MD_TOSTART, "lang_totaltopics" => _MD_TOTALTOPICSC, "lang_totalposts" => _MD_TOTALPOSTSC, "total_topics" => get_total_topics(), "total_posts" => get_total_posts(0, 'all'), "lang_lastvisit" => sprintf(_MD_LASTVISIT,formatTimestamp($last_visit)), "lang_currenttime" => sprintf(_MD_TIMENOW,formatTimestamp(time(),"m")), "lang_forum" => _MD_FORUM, "lang_topics" => _MD_TOPICS, "lang_posts" => _MD_POSTS, "lang_lastpost" => _MD_LASTPOST, "lang_moderators" => _MD_MODERATOR)); -$viewcat = (!empty($HTTP_GET_VARS['cat'])) ? intval($HTTP_GET_VARS['cat']) : 0; +$viewcat = (!empty($_GET['cat'])) ? intval($_GET['cat']) : 0; $categories = array(); while ( $cat_row = $xoopsDB->fetchArray($result) ) { $categories[] = $cat_row; Index: xoops2jp/html/modules/newbb/newtopic.php diff -u xoops2jp/html/modules/newbb/newtopic.php:1.3 xoops2jp/html/modules/newbb/newtopic.php:1.4 --- xoops2jp/html/modules/newbb/newtopic.php:1.3 Wed Aug 3 21:39:14 2005 +++ xoops2jp/html/modules/newbb/newtopic.php Mon Sep 5 05:46:10 2005 @@ -1,5 +1,5 @@ <?php -// $Id: newtopic.php,v 1.3 2005/08/03 12:39:14 onokazu Exp $ +// $Id: newtopic.php,v 1.4 2005/09/04 20:46:10 onokazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // @@ -31,9 +31,9 @@ include 'header.php'; foreach (array('forum', 'order') as $getint) { - ${$getint} = isset($HTTP_GET_VARS[$getint]) ? intval($HTTP_GET_VARS[$getint]) : 0; + ${$getint} = isset($_GET[$getint]) ? intval($_GET[$getint]) : 0; } -$viewmode = (isset($HTTP_GET_VARS['viewmode']) && $HTTP_GET_VARS['viewmode'] != 'flat') ? 'thread' : 'flat'; +$viewmode = (isset($_GET['viewmode']) && $_GET['viewmode'] != 'flat') ? 'thread' : 'flat'; if ( empty($forum) ) { redirect_header("index.php", 2, _MD_ERRORFORUM); exit(); Index: xoops2jp/html/modules/newbb/post.php diff -u xoops2jp/html/modules/newbb/post.php:1.4 xoops2jp/html/modules/newbb/post.php:1.5 --- xoops2jp/html/modules/newbb/post.php:1.4 Wed Aug 3 21:39:14 2005 +++ xoops2jp/html/modules/newbb/post.php Mon Sep 5 05:46:10 2005 @@ -1,5 +1,5 @@ <?php -// $Id: post.php,v 1.4 2005/08/03 12:39:14 onokazu Exp $ +// $Id: post.php,v 1.5 2005/09/04 20:46:10 onokazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // @@ -31,9 +31,9 @@ include 'header.php'; foreach (array('forum', 'topic_id', 'post_id', 'order', 'pid') as $getint) { - ${$getint} = isset($HTTP_POST_VARS[$getint]) ? intval($HTTP_POST_VARS[$getint]) : 0; + ${$getint} = isset($_POST[$getint]) ? intval($_POST[$getint]) : 0; } -$viewmode = (isset($HTTP_POST_VARS['viewmode']) && $HTTP_POST_VARS['viewmode'] != 'flat') ? 'thread' : 'flat'; +$viewmode = (isset($_POST['viewmode']) && $_POST['viewmode'] != 'flat') ? 'thread' : 'flat'; if ( empty($forum) ) { redirect_header("index.php", 2, _MD_ERRORFORUM); exit(); @@ -49,7 +49,7 @@ } $forumdata = $xoopsDB->fetchArray($result); if (empty($forumdata['allow_html'])) { - $HTTP_POST_VARS['nohtml'] = 1; + $_POST['nohtml'] = 1; } if ( $forumdata['forum_type'] == 1 ) { // To get here, we have a logged-in user. So, check whether that user is allowed to view @@ -57,7 +57,7 @@ $accesserror = 0; if ( $xoopsUser ) { if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { - if ( !check_priv_forum_auth($xoopsUser->uid(), $HTTP_POST_VARS['forum'], true) ) { + if ( !check_priv_forum_auth($xoopsUser->uid(), $_POST['forum'], true) ) { $accesserror = 1; } } @@ -89,22 +89,22 @@ exit(); } } - if ( !empty($HTTP_POST_VARS['contents_preview']) ) { + if ( !empty($_POST['contents_preview']) ) { include XOOPS_ROOT_PATH."/header.php"; echo"<table width='100%' border='0' cellspacing='1' class='outer'><tr><td>"; $myts =& MyTextSanitizer::getInstance(); - $p_subject = $myts->makeTboxData4Preview($HTTP_POST_VARS['subject']); - $dosmiley = empty($HTTP_POST_VARS['nosmiley']) ? 1 : 0; - $dohtml = empty($HTTP_POST_VARS['nohtml']) ? 1 : 0; - $p_message = $myts->makeTareaData4Preview($HTTP_POST_VARS['message'], $dohtml, $dosmiley, 1); + $p_subject = $myts->makeTboxData4Preview($_POST['subject']); + $dosmiley = empty($_POST['nosmiley']) ? 1 : 0; + $dohtml = empty($_POST['nohtml']) ? 1 : 0; + $p_message = $myts->makeTareaData4Preview($_POST['message'], $dohtml, $dosmiley, 1); themecenterposts($p_subject,$p_message); echo "<br />"; - $subject = $myts->makeTboxData4PreviewInForm($HTTP_POST_VARS['subject']); - $message = $myts->makeTareaData4PreviewInForm($HTTP_POST_VARS['message']); - $hidden = $myts->makeTboxData4PreviewInForm($HTTP_POST_VARS['hidden']); - $notify = !empty($HTTP_POST_VARS['notify']) ? 1 : 0; - $attachsig = !empty($HTTP_POST_VARS['attachsig']) ? 1 : 0; + $subject = $myts->makeTboxData4PreviewInForm($_POST['subject']); + $message = $myts->makeTareaData4PreviewInForm($_POST['message']); + $hidden = $myts->makeTboxData4PreviewInForm($_POST['hidden']); + $notify = !empty($_POST['notify']) ? 1 : 0; + $attachsig = !empty($_POST['attachsig']) ? 1 : 0; include 'include/forumform.inc.php'; echo"</td></tr></table>"; } else { @@ -131,7 +131,7 @@ } else { $isreply = 0; $isnew = 1; - if ( $xoopsUser && empty($HTTP_POST_VARS['noname']) ) { + if ( $xoopsUser && empty($_POST['noname']) ) { $uid = $xoopsUser->getVar("uid"); } else { if ( $forumdata['forum_access'] == 2 ) { @@ -154,17 +154,17 @@ $forumpost->setTopicId($topic_id); $isreply = 1; } - $forumpost->setIp($HTTP_SERVER_VARS['REMOTE_ADDR']); + $forumpost->setIp($_SERVER['REMOTE_ADDR']); $forumpost->setUid($uid); } - $subject = xoops_trim($HTTP_POST_VARS['subject']); + $subject = xoops_trim($_POST['subject']); $subject = ($subject == '') ? _NOTITLE : $subject; $forumpost->setSubject($subject); - $forumpost->setText($HTTP_POST_VARS['message']); - $forumpost->setNohtml($HTTP_POST_VARS['nohtml']); - $forumpost->setNosmiley($HTTP_POST_VARS['nosmiley']); - $forumpost->setIcon($HTTP_POST_VARS['icon']); - $forumpost->setAttachsig($HTTP_POST_VARS['attachsig']); + $forumpost->setText($_POST['message']); + $forumpost->setNohtml($_POST['nohtml']); + $forumpost->setNosmiley($_POST['nosmiley']); + $forumpost->setIcon($_POST['icon']); + $forumpost->setAttachsig($_POST['attachsig']); if (!$postid = $forumpost->store()) { include_once(XOOPS_ROOT_PATH.'/header.php'); xoops_error('Could not insert forum post'); @@ -177,7 +177,7 @@ // RMV-NOTIFY // Define tags for notification message $tags = array(); - $tags['THREAD_NAME'] = $HTTP_POST_VARS['subject']; + $tags['THREAD_NAME'] = $_POST['subject']; $tags['THREAD_URL'] = XOOPS_URL . '/modules/' . $xoopsModule->dirname() . '/viewtopic.php?forum=' . $forum . '&post_id='.$postid.'&topic_id=' . $forumpost->topic(); $tags['POST_URL'] = $tags['THREAD_URL'] . '#forumpost' . $postid; include_once 'include/notification.inc.php'; @@ -196,8 +196,8 @@ $notification_handler->triggerEvent('global', 0, 'new_post', $tags); $notification_handler->triggerEvent('forum', $forum, 'new_post', $tags); $myts =& MyTextSanitizer::getInstance(); - $tags['POST_CONTENT'] = $myts->stripSlashesGPC($HTTP_POST_VARS['message']); - $tags['POST_NAME'] = $myts->stripSlashesGPC($HTTP_POST_VARS['subject']); + $tags['POST_CONTENT'] = $myts->stripSlashesGPC($_POST['message']); + $tags['POST_NAME'] = $myts->stripSlashesGPC($_POST['subject']); $notification_handler->triggerEvent('global', 0, 'new_fullpost', $tags); } @@ -205,14 +205,14 @@ // appropriate event; if unchecked, then unsubscribe if (!empty($xoopsUser) && !empty($xoopsModuleConfig['notification_enabled'])) { - if (!empty($HTTP_POST_VARS['notify'])) { + if (!empty($_POST['notify'])) { $notification_handler->subscribe('thread', $forumpost->getTopicId(), 'new_post'); } else { $notification_handler->unsubscribe('thread', $forumpost->getTopicId(), 'new_post'); } } - if ( $HTTP_POST_VARS['viewmode'] == "flat" ) { + if ( $_POST['viewmode'] == "flat" ) { redirect_header("viewtopic.php?topic_id=".$forumpost->topic()."&post_id=".$postid."&order=".$order."&viewmode=flat&pid=".$pid."&forum=".$forum."#forumpost".$postid."",2,_MD_THANKSSUBMIT); exit(); } else { Index: xoops2jp/html/modules/newbb/reply.php diff -u xoops2jp/html/modules/newbb/reply.php:1.3 xoops2jp/html/modules/newbb/reply.php:1.4 --- xoops2jp/html/modules/newbb/reply.php:1.3 Wed Aug 3 21:39:14 2005 +++ xoops2jp/html/modules/newbb/reply.php Mon Sep 5 05:46:10 2005 @@ -1,5 +1,5 @@ <?php -// $Id: reply.php,v 1.3 2005/08/03 12:39:14 onokazu Exp $ +// $Id: reply.php,v 1.4 2005/09/04 20:46:10 onokazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // @@ -30,9 +30,9 @@ // ------------------------------------------------------------------------- // include 'header.php'; foreach (array('forum', 'topic_id', 'post_id', 'order', 'pid') as $getint) { - ${$getint} = isset($HTTP_GET_VARS[$getint]) ? intval($HTTP_GET_VARS[$getint]) : 0; + ${$getint} = isset($_GET[$getint]) ? intval($_GET[$getint]) : 0; } -$viewmode = (isset($HTTP_GET_VARS['viewmode']) && $HTTP_GET_VARS['viewmode'] != 'flat') ? 'thread' : 'flat'; +$viewmode = (isset($_GET['viewmode']) && $_GET['viewmode'] != 'flat') ? 'thread' : 'flat'; if ( empty($forum) ) { redirect_header("index.php", 2, _MD_ERRORFORUM); exit(); Index: xoops2jp/html/modules/newbb/search.php diff -u xoops2jp/html/modules/newbb/search.php:1.2 xoops2jp/html/modules/newbb/search.php:1.3 --- xoops2jp/html/modules/newbb/search.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/newbb/search.php Mon Sep 5 05:46:10 2005 @@ -1,5 +1,5 @@ <?php -// $Id: search.php,v 1.2 2005/03/18 12:52:25 onokazu Exp $ +// $Id: search.php,v 1.3 2005/09/04 20:46:10 onokazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // @@ -31,7 +31,7 @@ include 'header.php'; -if ( !isset($HTTP_POST_VARS['submit']) ) { +if ( !isset($_POST['submit']) ) { $xoopsOption['template_main']= 'newbb_search.html'; include XOOPS_ROOT_PATH.'/header.php'; $xoopsTpl->assign("lang_keywords", _MD_KEYWORDS); @@ -63,7 +63,7 @@ } else { $xoopsOption['template_main']= 'newbb_searchresults.html'; include XOOPS_ROOT_PATH."/header.php"; - $forum = (isset($HTTP_POST_VARS['forum']) && $HTTP_POST_VARS['forum'] != 'all') ? intval($HTTP_POST_VARS['forum']) : 'all'; + $forum = (isset($_POST['forum']) && $_POST['forum'] != 'all') ? intval($_POST['forum']) : 'all'; $xoopsTpl->assign("lang_keywords", _MD_KEYWORDS); $xoopsTpl->assign("lang_searchany", _MD_SEARCHANY); $xoopsTpl->assign("lang_searchall", _MD_SEARCHALL); @@ -71,14 +71,14 @@ $subquery = ''; $query = 'SELECT u.uid,f.forum_id, p.topic_id, u.uname, p.post_time,t.topic_title,t.topic_views,t.topic_replies,f.forum_name FROM '.$xoopsDB->prefix('bb_posts').' p, '.$xoopsDB->prefix('bb_posts_text').' pt, '.$xoopsDB->prefix('users').' u, '.$xoopsDB->prefix('bb_forums').' f,'.$xoopsDB->prefix('bb_topics').' t'; $myts = MyTextSanitizer::getInstance(); - if ( isset($HTTP_POST_VARS['term']) && trim($HTTP_POST_VARS['term']) != "" ) { - $terms = split(' ', $myts->oopsAddSlashes($HTTP_POST_VARS['term'])); // Get all the words into an array + if ( isset($_POST['term']) && trim($_POST['term']) != "" ) { + $terms = split(' ', $myts->oopsAddSlashes($_POST['term'])); // Get all the words into an array if ( strlen($terms[0]) < 4 ) { } $addquery .= "(pt.post_text LIKE '%$terms[0]%'"; $subquery .= "(t.topic_title LIKE '%$terms[0]%'"; - if ( $HTTP_POST_VARS['addterms'] == "any" ) { // AND/OR relates to the ANY or ALL on Search Page + if ( $_POST['addterms'] == "any" ) { // AND/OR relates to the ANY or ALL on Search Page $andor = 'OR'; } else { $andor = 'AND'; @@ -99,12 +99,12 @@ $addquery .= ' AND '; $subquery .= ' AND '; } - $forum = intval($HTTP_POST_VARS['forum']); + $forum = intval($_POST['forum']); $addquery .= ' p.forum_id='.$forum; $subquery .= ' p.forum_id='.$forum; } - if ( isset($HTTP_POST_VARS['search_username']) && trim($HTTP_POST_VARS['search_username']) != "" ) { - $search_username = $myts->oopsAddSlashes(trim($HTTP_POST_VARS['search_username'])); + if ( isset($_POST['search_username']) && trim($_POST['search_username']) != "" ) { + $search_username = $myts->oopsAddSlashes(trim($_POST['search_username'])); if ( !$result = $xoopsDB->query("SELECT uid FROM ".$xoopsDB->prefix("users")." WHERE uname='$search_username'") ) { redirect_header('search.php',1,_MD_ERROROCCURED); exit(); @@ -123,7 +123,7 @@ } } if ( isset($addquery) ) { - switch ( $HTTP_POST_VARS['searchboth'] ) { + switch ( $_POST['searchboth'] ) { case 'both': $query .= " WHERE ( ($subquery) OR ($addquery) ) AND "; break; @@ -140,7 +140,7 @@ } $query .= ' p.post_id = pt.post_id AND p.topic_id = t.topic_id AND p.forum_id = f.forum_id AND p.uid = u.uid AND f.forum_type != 1'; $allowed = array("t.topic_title", "t.topic_views", "t.topic_replies", "f.forum_name", "u.uname"); - $sortby = (!in_array($HTTP_POST_VARS['sortby'], $allowed)) ? "u.uid" : $HTTP_POST_VARS['sortby']; + $sortby = (!in_array($_POST['sortby'], $allowed)) ? "u.uid" : $_POST['sortby']; $query .= ' ORDER BY '.$sortby; if ( !$result = $xoopsDB->query($query,100,0) ) { exit("<big>"._MD_ERROROCCURED."</big><hr />"._MD_COULDNOTQUERY); Index: xoops2jp/html/modules/newbb/topicmanager.php diff -u xoops2jp/html/modules/newbb/topicmanager.php:1.2 xoops2jp/html/modules/newbb/topicmanager.php:1.3 --- xoops2jp/html/modules/newbb/topicmanager.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/newbb/topicmanager.php Mon Sep 5 05:46:10 2005 @@ -6,7 +6,7 @@ copyright : (C) 2001 The phpBB Group email : suppo****@phpbb***** - $Id: topicmanager.php,v 1.2 2005/03/18 12:52:25 onokazu Exp $ + $Id: topicmanager.php,v 1.3 2005/09/04 20:46:10 onokazu Exp $ ***************************************************************************/ @@ -19,13 +19,13 @@ * ***************************************************************************/ include "header.php"; -if ( $HTTP_POST_VARS['submit'] ) { +if ( $_POST['submit'] ) { foreach (array('forum', 'topic_id', 'newforum') as $getint) { - ${$getint} = isset($HTTP_POST_VARS[$getint]) ? intval($HTTP_POST_VARS[$getint]) : 0; + ${$getint} = isset($_POST[$getint]) ? intval($_POST[$getint]) : 0; } } else { foreach (array('forum', 'topic_id') as $getint) { - ${$getint} = isset($HTTP_GET_VARS[$getint]) ? intval($HTTP_GET_VARS[$getint]) : 0; + ${$getint} = isset($_GET[$getint]) ? intval($_GET[$getint]) : 0; } } $accesserror = 0; @@ -45,8 +45,8 @@ include XOOPS_ROOT_PATH.'/header.php'; OpenTable(); -if ( $HTTP_POST_VARS['submit'] ) { - switch ($HTTP_POST_VARS['mode']) { +if ( $_POST['submit'] ) { + switch ($_POST['mode']) { case 'del': // Update the users's post count, this might be slow on big topics but it makes other parts of the // forum faster so we win out in the long run. @@ -141,8 +141,8 @@ break; } } else { // No submit - $mode = $HTTP_GET_VARS['mode']; - echo "<form action='".$HTTP_SERVER_VARS['PHP_SELF']."' method='post'> + $mode = $_GET['mode']; + echo "<form action='".xoops_getenv('PHP_SELF')."' method='post'> <table border='0' cellpadding='1' cellspacing='0' align='center' width='95%'><tr><td class='bg2'> <table border='0' cellpadding='1' cellspacing='1' width='100%'> <tr class='bg3' align='left'>"; Index: xoops2jp/html/modules/newbb/viewforum.php diff -u xoops2jp/html/modules/newbb/viewforum.php:1.3 xoops2jp/html/modules/newbb/viewforum.php:1.4 --- xoops2jp/html/modules/newbb/viewforum.php:1.3 Wed Aug 3 21:39:14 2005 +++ xoops2jp/html/modules/newbb/viewforum.php Mon Sep 5 05:46:10 2005 @@ -1,5 +1,5 @@ <?php -// $Id: viewforum.php,v 1.3 2005/08/03 12:39:14 onokazu Exp $ +// $Id: viewforum.php,v 1.4 2005/09/04 20:46:10 onokazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // @@ -31,7 +31,7 @@ include "header.php"; -$forum = intval($HTTP_GET_VARS['forum']); +$forum = intval($_GET['forum']); if ( $forum < 1 ) { redirect_header("index.php", 2, _MD_ERRORFORUM); exit(); @@ -127,10 +127,10 @@ $sel_sort_array = array("t.topic_title"=>_MD_TOPICTITLE, "t.topic_replies"=>_MD_NUMBERREPLIES, "u.uname"=>_MD_TOPICPOSTER, "t.topic_views"=>_MD_VIEWS, "p.post_time"=>_MD_LASTPOSTTIME); -if ( !isset($HTTP_GET_VARS['sortname']) || !in_array($HTTP_GET_VARS['sortname'], array_keys($sel_sort_array)) ) { +if ( !isset($_GET['sortname']) || !in_array($_GET['sortname'], array_keys($sel_sort_array)) ) { $sortname = "p.post_time"; } else { - $sortname = $HTTP_GET_VARS['sortname']; + $sortname = $_GET['sortname']; } $xoopsTpl->assign('lang_sortby', _MD_SORTEDBY); @@ -144,7 +144,7 @@ // assign to template $xoopsTpl->assign('forum_selection_sort', $forum_selection_sort); -$sortorder = (!isset($HTTP_GET_VARS['sortorder']) || $HTTP_GET_VARS['sortorder'] != "ASC") ? "DESC" : "ASC"; +$sortorder = (!isset($_GET['sortorder']) || $_GET['sortorder'] != "ASC") ? "DESC" : "ASC"; $forum_selection_order = '<select name="sortorder">'; $forum_selection_order .= '<option value="ASC"'.(($sortorder == "ASC") ? ' selected="selected"' : '').'>'._MD_ASCENDING.'</option>'; $forum_selection_order .= '<option value="DESC"'.(($sortorder == "DESC") ? ' selected="selected"' : '').'>'._MD_DESCENDING.'</option>'; @@ -153,7 +153,7 @@ // assign to template $xoopsTpl->assign('forum_selection_order', $forum_selection_order); -$sortsince = !empty($HTTP_GET_VARS['sortsince']) ? intval($HTTP_GET_VARS['sortsince']) : 100; +$sortsince = !empty($_GET['sortsince']) ? intval($_GET['sortsince']) : 100; $sel_since_array = array(1, 2, 5, 10, 20, 30, 40, 60, 75, 100); $forum_selection_since = '<select name="sortsince">'; foreach ($sel_since_array as $sort_since_v) { @@ -183,7 +183,7 @@ $xoopsTpl->assign('lang_date', _MD_DATE); $startdate = time() - (86400* $sortsince); -$start = !empty($HTTP_GET_VARS['start']) ? intval($HTTP_GET_VARS['start']) : 0; +$start = !empty($_GET['start']) ? intval($_GET['start']) : 0; $sql = 'SELECT t.*, u.uname, u2.uname as last_poster, p.post_time as last_post_time, p.icon FROM '.$xoopsDB->prefix("bb_topics").' t LEFT JOIN '.$xoopsDB->prefix('users').' u ON u.uid = t.topic_poster LEFT JOIN '.$xoopsDB->prefix('bb_posts').' p ON p.post_id = t.topic_last_post_id LEFT JOIN '.$xoopsDB->prefix('users').' u2 ON u2.uid = p.uid WHERE t.forum_id = '.$forum.' AND (p.post_time > '.$startdate.' OR t.topic_sticky=1) ORDER BY topic_sticky DESC, '.$sortname.' '.$sortorder; if ( !$result = $xoopsDB->query($sql,$forumdata['topics_per_page'],$start) ) { Index: xoops2jp/html/modules/newbb/viewtopic.php diff -u xoops2jp/html/modules/newbb/viewtopic.php:1.2 xoops2jp/html/modules/newbb/viewtopic.php:1.3 --- xoops2jp/html/modules/newbb/viewtopic.php:1.2 Fri Mar 18 21:52:25 2005 +++ xoops2jp/html/modules/newbb/viewtopic.php Mon Sep 5 05:46:10 2005 @@ -1,5 +1,5 @@ <?php -// $Id: viewtopic.php,v 1.2 2005/03/18 12:52:25 onokazu Exp $ +// $Id: viewtopic.php,v 1.3 2005/09/04 20:46:10 onokazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // @@ -30,8 +30,8 @@ // ------------------------------------------------------------------------- // include 'header.php'; -$forum = isset($HTTP_GET_VARS['forum']) ? intval($HTTP_GET_VARS['forum']) : 0; -$topic_id = isset($HTTP_GET_VARS['topic_id']) ? intval($HTTP_GET_VARS['topic_id']) : 0; +$forum = isset($_GET['forum']) ? intval($_GET['forum']) : 0; +$topic_id = isset($_GET['topic_id']) ? intval($_GET['topic_id']) : 0; if ( empty($forum) ) { redirect_header('index.php',2,_MD_ERRORFORUM); exit(); @@ -39,8 +39,8 @@ redirect_header('viewforum.php?forum='.$forum,2,_MD_ERRORTOPIC); exit(); } -$topic_time = (isset($HTTP_GET_VARS['topic_time'])) ? intval($HTTP_GET_VARS['topic_time']) : 0; -$post_id = !empty($HTTP_GET_VARS['post_id']) ? intval($HTTP_GET_VARS['post_id']) : 0; +$topic_time = (isset($_GET['topic_time'])) ? intval($_GET['topic_time']) : 0; +$post_id = !empty($_GET['post_id']) ? intval($_GET['post_id']) : 0; //use users preferences if (is_object($xoopsUser)) { @@ -57,11 +57,11 @@ } // override mode/order if any requested -if (isset($HTTP_GET_VARS['viewmode']) && ($HTTP_GET_VARS['viewmode'] == 'flat' || $HTTP_GET_VARS['viewmode'] == 'thread')) { - $viewmode = $HTTP_GET_VARS['viewmode']; +if (isset($_GET['viewmode']) && ($_GET['viewmode'] == 'flat' || $_GET['viewmode'] == 'thread')) { + $viewmode = $_GET['viewmode']; } -if (isset($HTTP_GET_VARS['order']) && ($HTTP_GET_VARS['order'] == 'ASC' || $HTTP_GET_VARS['order'] == 'DESC')) { - $order = $HTTP_GET_VARS['order']; +if (isset($_GET['order']) && ($_GET['order'] == 'ASC' || $_GET['order'] == 'DESC')) { + $order = $_GET['order']; } if ($viewmode != 'flat') { @@ -73,9 +73,9 @@ include XOOPS_ROOT_PATH.'/header.php'; include_once 'class/class.forumposts.php'; -if ( isset($HTTP_GET_VARS['move']) && 'next' == $HTTP_GET_VARS['move'] ) { +if ( isset($_GET['move']) && 'next' == $_GET['move'] ) { $sql = 'SELECT t.topic_id, t.topic_title, t.topic_time, t.topic_status, t.topic_sticky, t.topic_last_post_id, f.forum_id, f.forum_name, f.forum_access, f.forum_type, f.allow_html, f.allow_sig, f.posts_per_page, f.hot_threshold, f.topics_per_page FROM '.$xoopsDB->prefix('bb_topics').' t LEFT JOIN '.$xoopsDB->prefix('bb_forums').' f ON f.forum_id = t.forum_id WHERE t.topic_time > '.$topic_time.' AND t.forum_id = '.$forum.' ORDER BY t.topic_time ASC LIMIT 1'; -} elseif ( isset($HTTP_GET_VARS['move']) && 'prev' == $HTTP_GET_VARS['move']) { +} elseif ( isset($_GET['move']) && 'prev' == $_GET['move']) { $sql = 'SELECT t.topic_id, t.topic_title, t.topic_time, t.topic_status, t.topic_sticky, t.topic_last_post_id, f.forum_id, f.forum_name, f.forum_access, f.forum_type, f.allow_html, f.allow_sig, f.posts_per_page, f.hot_threshold, f.topics_per_page FROM '.$xoopsDB->prefix('bb_topics').' t LEFT JOIN '.$xoopsDB->prefix('bb_forums').' f ON f.forum_id = t.forum_id WHERE t.topic_time < '.$topic_time.' AND t.forum_id = '.$forum.' ORDER BY t.topic_time DESC LIMIT 1'; } else { $sql = 'SELECT t.topic_id, t.topic_title, t.topic_time, t.topic_status, t.topic_sticky, t.topic_last_post_id, f.forum_id, f.forum_name, f.forum_access, f.forum_type, f.allow_html, f.allow_sig, f.posts_per_page, f.hot_threshold, f.topics_per_page FROM '.$xoopsDB->prefix('bb_topics').' t LEFT JOIN '.$xoopsDB->prefix('bb_forums').' f ON f.forum_id = t.forum_id WHERE t.topic_id = '.$topic_id.' AND t.forum_id = '.$forum; @@ -229,7 +229,7 @@ } // initialize the start number of select query -$start = !empty($HTTP_GET_VARS['start']) ? intval($HTTP_GET_VARS['start']) : 0; +$start = !empty($_GET['start']) ? intval($_GET['start']) : 0; $total_posts = get_total_posts($topic_id, 'topic'); if ($total_posts > 50) {