hypweb.net
XOOPSマニア  最新情報のRSS(サイト全体)
[ 自宅サーバーWebRing |ID=54 前後5表示乱移動サイト一覧 ]

TOP » UsersWiki » nao-pon » blog » 2004-10-25 の変更点
2: 2004-10-28 (木) 13:51:21 nao-pon ソース 現: 2004-10-28 (木) 13:51:21 nao-pon ソース
Line 70: Line 70:
  // Project: The XOOPS Project                                                //   // Project: The XOOPS Project                                                //
  // ------------------------------------------------------------------------- //   // ------------------------------------------------------------------------- //
 + 
+ if(!empty($_SERVER["PATH_INFO"]) && preg_match("/^\/(.*)\/$/",$_SERVER["PATH_INFO"],$match)) + if(!empty($_SERVER["PATH_INFO"]) && preg_match("/^\/(.*)\/$/",$_SERVER["PATH_INFO"],$match))
+ { + {
Line 91: Line 91:
  // Project: The XOOPS Project                                                //   // Project: The XOOPS Project                                                //
  // ------------------------------------------------------------------------- //   // ------------------------------------------------------------------------- //
 + 
  include "header.php";   include "header.php";
 + 
  $forum = intval($HTTP_GET_VARS['forum']);   $forum = intval($HTTP_GET_VARS['forum']);
  if ( $forum < 1 ) {   if ( $forum < 1 ) {
Line 112: Line 112:
  // Project: The XOOPS Project                                                //   // Project: The XOOPS Project                                                //
  // ------------------------------------------------------------------------- //   // ------------------------------------------------------------------------- //
 + 
+ if(!empty($_SERVER["PATH_INFO"]) && preg_match("/^\/(.*)\/$/",$_SERVER["PATH_INFO"],$match)) + if(!empty($_SERVER["PATH_INFO"]) && preg_match("/^\/(.*)\/$/",$_SERVER["PATH_INFO"],$match))
+ { + {
Line 124: Line 124:
+ +
  include "header.php";   include "header.php";
 + 
  $forum = intval($HTTP_GET_VARS['forum']);   $forum = intval($HTTP_GET_VARS['forum']);
  if ( $forum < 1 ) {   if ( $forum < 1 ) {
Line 168: Line 168:
! $xoopsTpl->assign('forum_name', $myts->makeTboxData4Show($forumdata['forum_name'])); ! $xoopsTpl->assign('forum_name', $myts->makeTboxData4Show($forumdata['forum_name']));
  $xoopsTpl->assign('lang_moderatedby', _MD_MODERATEDBY);   $xoopsTpl->assign('lang_moderatedby', _MD_MODERATEDBY);
 + 
  $forum_moderators = "";   $forum_moderators = "";
--- 122,132 ---- --- 122,132 ----
Line 180: Line 180:
! //$xoopsTpl->assign('forum_name', $myts->makeTboxData4Show($forumdata['forum_name'])); ! //$xoopsTpl->assign('forum_name', $myts->makeTboxData4Show($forumdata['forum_name']));
  $xoopsTpl->assign('lang_moderatedby', _MD_MODERATEDBY);   $xoopsTpl->assign('lang_moderatedby', _MD_MODERATEDBY);
 + 
  $forum_moderators = "";   $forum_moderators = "";
*************** ***************
Line 186: Line 186:
  // assign to template   // assign to template
  $xoopsTpl->assign('forum_selection_order', $forum_selection_order);   $xoopsTpl->assign('forum_selection_order', $forum_selection_order);
 + 
! $sortsince = !empty($HTTP_GET_VARS['sortsince']) ? intval($HTTP_GET_VARS['sortsince']) : 100; ! $sortsince = !empty($HTTP_GET_VARS['sortsince']) ? intval($HTTP_GET_VARS['sortsince']) : 100;
  $sel_since_array = array(1, 2, 5, 10, 20, 30, 40, 60, 75, 100);   $sel_since_array = array(1, 2, 5, 10, 20, 30, 40, 60, 75, 100);
Line 194: Line 194:
  // assign to template   // assign to template
  $xoopsTpl->assign('forum_selection_order', $forum_selection_order);   $xoopsTpl->assign('forum_selection_order', $forum_selection_order);
 + 
! //nao-pon ! //nao-pon
! $sortsince = !empty($HTTP_GET_VARS['sortsince']) ? intval($HTTP_GET_VARS['sortsince']) : 1000; ! $sortsince = !empty($HTTP_GET_VARS['sortsince']) ? intval($HTTP_GET_VARS['sortsince']) : 1000;
Line 205: Line 205:
  $xoopsTpl->assign('h_date_link', "viewforum.php?forum=$forum&sortname=p.post_time&sortsince=$sortsince&sortorder=". (($sortname == "p.post_time" && $sortorder == "DESC") ? "ASC" : "DESC"));   $xoopsTpl->assign('h_date_link', "viewforum.php?forum=$forum&sortname=p.post_time&sortsince=$sortsince&sortorder=". (($sortname == "p.post_time" && $sortorder == "DESC") ? "ASC" : "DESC"));
  $xoopsTpl->assign('lang_date', _MD_DATE);   $xoopsTpl->assign('lang_date', _MD_DATE);
 + 
! $startdate = time() - (86400* $sortsince); ! $startdate = time() - (86400* $sortsince);
  $start = !empty($HTTP_GET_VARS['start']) ? intval($HTTP_GET_VARS['start']) : 0;   $start = !empty($HTTP_GET_VARS['start']) ? intval($HTTP_GET_VARS['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;   $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) ) {   if ( !$result = $xoopsDB->query($sql,$forumdata['topics_per_page'],$start) ) {
Line 214: Line 214:
  exit();   exit();
  }   }
 + 
--- 202,216 ---- --- 202,216 ----
  $xoopsTpl->assign('h_date_link', "viewforum.php?forum=$forum&sortname=p.post_time&sortsince=$sortsince&sortorder=". (($sortname == "p.post_time" && $sortorder == "DESC") ? "ASC" : "DESC"));   $xoopsTpl->assign('h_date_link', "viewforum.php?forum=$forum&sortname=p.post_time&sortsince=$sortsince&sortorder=". (($sortname == "p.post_time" && $sortorder == "DESC") ? "ASC" : "DESC"));
  $xoopsTpl->assign('lang_date', _MD_DATE);   $xoopsTpl->assign('lang_date', _MD_DATE);
 + 
! //nao-pon ! //nao-pon
! $startdate = ($sortsince == 1000)? 0 : time() - (86400* $sortsince); ! $startdate = ($sortsince == 1000)? 0 : time() - (86400* $sortsince);
! //$startdate = time() - (86400* $sortsince); ! //$startdate = time() - (86400* $sortsince);
  $start = !empty($HTTP_GET_VARS['start']) ? intval($HTTP_GET_VARS['start']) : 0;   $start = !empty($HTTP_GET_VARS['start']) ? intval($HTTP_GET_VARS['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;   $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) ) {   if ( !$result = $xoopsDB->query($sql,$forumdata['topics_per_page'],$start) ) {
Line 230: Line 230:
  exit();   exit();
  }   }
 + 
*************** ***************
*** 219,225 **** *** 219,225 ****
Line 276: Line 276:
  // Project: The XOOPS Project                                                //   // Project: The XOOPS Project                                                //
  // ------------------------------------------------------------------------- //   // ------------------------------------------------------------------------- //
 + 
  include 'header.php';   include 'header.php';
  $forum = isset($HTTP_GET_VARS['forum']) ? intval($HTTP_GET_VARS['forum']) : 0;   $forum = isset($HTTP_GET_VARS['forum']) ? intval($HTTP_GET_VARS['forum']) : 0;
Line 291: Line 291:
  // Project: The XOOPS Project                                                //   // Project: The XOOPS Project                                                //
  // ------------------------------------------------------------------------- //   // ------------------------------------------------------------------------- //
 + 
+ if(!empty($_SERVER["PATH_INFO"]) && preg_match("/^\/(.*)\/$/",$_SERVER["PATH_INFO"],$match)) + if(!empty($_SERVER["PATH_INFO"]) && preg_match("/^\/(.*)\/$/",$_SERVER["PATH_INFO"],$match))
+ { + {
Line 316: Line 316:
*** 82,93 **** *** 82,93 ****
  }   }
 + 
  if ( !$result = $xoopsDB->query($sql) ) {   if ( !$result = $xoopsDB->query($sql) ) {
! redirect_header('viewforum.php?forum='.$forum,2,_MD_ERROROCCURED); ! redirect_header('viewforum.php?forum='.$forum,2,_MD_ERROROCCURED);
  exit();   exit();
  }   }
 + 
  if ( !$forumdata = $xoopsDB->fetchArray($result) ) {   if ( !$forumdata = $xoopsDB->fetchArray($result) ) {
! redirect_header('viewforum.php?forum='.$forum,2,_MD_FORUMNOEXIST); ! redirect_header('viewforum.php?forum='.$forum,2,_MD_FORUMNOEXIST);
Line 329: Line 329:
--- 92,103 ---- --- 92,103 ----
  }   }
 + 
  if ( !$result = $xoopsDB->query($sql) ) {   if ( !$result = $xoopsDB->query($sql) ) {
! redirect_header($bbUrl['root'].'viewforum/forum/'.$forum,2,_MD_ERROROCCURED); ! redirect_header($bbUrl['root'].'viewforum/forum/'.$forum,2,_MD_ERROROCCURED);
  exit();   exit();
  }   }
 + 
  if ( !$forumdata = $xoopsDB->fetchArray($result) ) {   if ( !$forumdata = $xoopsDB->fetchArray($result) ) {
! redirect_header($bbUrl['root'].'viewforum/forum/'.$forum.'/',2,_MD_FORUMNOEXIST); ! redirect_header($bbUrl['root'].'viewforum/forum/'.$forum.'/',2,_MD_FORUMNOEXIST);
Line 363: Line 363:
  $forumdata['topic_title'] = $myts->makeTboxData4Show($forumdata['topic_title']);$forumdata['forum_name'] = $myts->makeTboxData4Show($forumdata['forum_name']);   $forumdata['topic_title'] = $myts->makeTboxData4Show($forumdata['topic_title']);$forumdata['forum_name'] = $myts->makeTboxData4Show($forumdata['forum_name']);
! $xoopsTpl->assign(array('topic_title' => '<a href="'.$bbUrl['root'].'viewtopic.php?viewmode='.$viewmode.'&topic_id='.$topic_id.'&forum='.$forum.'">'.$forumdata['topic_title'].'</a>', 'forum_name' => $forumdata['forum_name'], 'topic_time' => $forumdata['topic_time'], 'lang_nexttopic' => _MD_NEXTTOPIC, 'lang_prevtopic' => _MD_PREVTOPIC)); ! $xoopsTpl->assign(array('topic_title' => '<a href="'.$bbUrl['root'].'viewtopic.php?viewmode='.$viewmode.'&topic_id='.$topic_id.'&forum='.$forum.'">'.$forumdata['topic_title'].'</a>', 'forum_name' => $forumdata['forum_name'], 'topic_time' => $forumdata['topic_time'], 'lang_nexttopic' => _MD_NEXTTOPIC, 'lang_prevtopic' => _MD_PREVTOPIC));
 + 
  // add image links to admin page if the user viewing this page is a forum admin   // add image links to admin page if the user viewing this page is a forum admin
  if ( $xoopsUser ) {   if ( $xoopsUser ) {
Line 374: Line 374:
! //nao-pon ! //nao-pon
! $xoopsTpl->assign("xoops_pagetitle",$forumdata['topic_title']."-".$forumdata['forum_name']."-"._MD_FORUM); ! $xoopsTpl->assign("xoops_pagetitle",$forumdata['topic_title']."-".$forumdata['forum_name']."-"._MD_FORUM);
 + 
  // add image links to admin page if the user viewing this page is a forum admin   // add image links to admin page if the user viewing this page is a forum admin
  if ( $xoopsUser ) {   if ( $xoopsUser ) {
Line 398: Line 398:
*** 242,248 **** *** 242,248 ****
  }   }
 + 
  if ( $can_post == 1 ) {   if ( $can_post == 1 ) {
! $xoopsTpl->assign(array('viewer_can_post' => true, 'forum_post_or_register' => "<a href=\"newtopic.php?forum=".$forum."\"><img src=\"".$bbImage['post']."\" alt=\""._MD_POSTNEW."\" /></a>")); ! $xoopsTpl->assign(array('viewer_can_post' => true, 'forum_post_or_register' => "<a href=\"newtopic.php?forum=".$forum."\"><img src=\"".$bbImage['post']."\" alt=\""._MD_POSTNEW."\" /></a>"));
Line 406: Line 406:
--- 256,262 ---- --- 256,262 ----
  }   }
 + 
  if ( $can_post == 1 ) {   if ( $can_post == 1 ) {
! $xoopsTpl->assign(array('viewer_can_post' => true, 'forum_post_or_register' => "<a href=\"{$bbUrl['root']}newtopic.php?forum=".$forum."\"><img src=\"".$bbImage['post']."\" alt=\""._MD_POSTNEW."\" /></a>")); ! $xoopsTpl->assign(array('viewer_can_post' => true, 'forum_post_or_register' => "<a href=\"{$bbUrl['root']}newtopic.php?forum=".$forum."\"><img src=\"".$bbImage['post']."\" alt=\""._MD_POSTNEW."\" /></a>"));
Line 426: Line 426:
#comment(btn:つっこみ) #comment(btn:つっこみ)
-#ping(http://www.blogpeople.net/servlet/weblogUpdates) 


トップ   差分 バックアップ 複製 名前変更 リロード印刷に適した表示   ページ新規作成 全ページ一覧 単語検索 最新ページの一覧   ヘルプ   最新ページのRSS 1.0 最新ページのRSS 2.0 最新ページのRSS Atom Powered by xpWiki
Counter: 519, today: 1, yesterday: 0
このページのTopへ
メインメニュー
ログイン

ユーザー名:


パスワード:





パスワード紛失  |新規登録
最近の更新
オンライン状況
381 人のユーザが現在オンラインです。 (9 人のユーザが UsersWiki を参照しています。)

登録ユーザ: 0
ゲスト: 381

もっと...
サイト情報