[ PHPXref.com ] [ Generated: Sun Jul 20 18:53:27 2008 ] [ myPHPNuke 1.8.8_8 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> article.php (source)

   1  <?php
   2  
   3  if ( ! @include_once ( './mainfile.php' ) ) { exit( '!! INCLUDE ERROR. ACCESS DENIED !!' ); }
   4  error_reporting( _E_VALUE );
   5  
   6  
   7  /* vim: set expandtab tabstop=4 shiftwidth=4: */
   8  // +----------------------------------------------------------------------+
   9  // | myPHPNuke Version 188_8 RC2                                          |
  10  // +----------------------------------------------------------------------+
  11  // | License: GNU/GPL - http://www.gnu.org/copyleft/gpl.html              |
  12  // +----------------------------------------------------------------------+
  13  // | Support: http://myphpnuke.com/                                       |
  14  // +----------------------------------------------------------------------+
  15  // | Author: myPHPNuke Dev Team                                           |
  16  // +----------------------------------------------------------------------+
  17  // | Copyright:  2001-2004 myPHPNuke Dev Team                            |
  18  // +----------------------------------------------------------------------+
  19  // $Id: article.php,v 1.26.2.4 2004/08/01 17:04:16 kirilt Exp $
  20  
  21  
  22  
  23  
  24  /************************************************************************/
  25  /* PHP-NUKE: Web Portal System                                          */
  26  /* ===========================                                          */
  27  /*                                                                      */
  28  /* Copyright (c) 2001 by Francisco Burzi (fburzi@ncc.org.ve)            */
  29  /* http://phpnuke.org                                                   */
  30  /*                                                                      */
  31  /* This program is free software. You can redistribute it and/or modify */
  32  /* it under the terms of the GNU General Public License as published by */
  33  /* the Free Software Foundation; either version 2 of the License.       */
  34  /************************************************************************/
  35  
  36  $extStyle = 1;
  37  
  38  if ( ! isset( $sid ) && ! isset( $tid ) ) { goBack( translate( 'Invalid Request' ) ); }
  39  
  40  if ( isset( $op ) && $op == 'Reply' )
  41  {
  42      $_SERVER['F_LIB'] -> redirectRequest( 'comments.php?op=Reply&pid=0&sid=' . $sid );
  43  }
  44  
  45  @mysql_query( "UPDATE ".$mpnTables['stories']." SET counter=counter+1 where sid='$sid'" );
  46  
  47  $result = mysql_query( "SELECT catid, aid, time, title, hometext, bodytext, topic, informant, notes, counter FROM ".$mpnTables['stories']." WHERE sid='$sid'" );
  48  
  49  list( $catid, $aid, $time, $title, $hometext, $bodytext, $topic, $informant, $notes, $counter ) = mysql_fetch_row( $result );
  50  
  51  mysql_free_result( $result );
  52  
  53  $counter++;
  54  
  55  // Kiril: New Sanitizer
  56  
  57  $sanity_ary = compact( 'title', 'time', 'hometext', 'bodytext', 'notes' );
  58  $_SERVER['SAN'] -> slashIT( $sanity_ary );
  59  extract( $sanity_ary );
  60  
  61  // Adjust Formatting
  62  
  63  if ( $_SERVER['F_LIB'] -> checkPostDate( $time ) )
  64  {
  65      $slice_ary = array_slice( $sanity_ary, 2, 3 );
  66      $_SERVER['SAN'] -> sanitizeLegacyContent( $slice_ary );
  67  }
  68  else
  69  {
  70      $slice_ary = array_slice( $sanity_ary, 2, 3 );
  71      $_SERVER['SAN'] -> adjustFormat( $slice_ary, 3, 10 );
  72  }
  73  
  74  extract( $slice_ary );
  75  unset( $slice_ary, $sanity_ary );
  76  
  77  // End New Sanitizer
  78  
  79  $datetime = formatTimestamp( $time );
  80  
  81  //$datetime = strftime( translate( 'emaildatestring' ) , strtotime( $time ) );
  82  
  83  if ( $bodytext == '' )
  84  {
  85      $bodytext = $hometext . '<br /><br />' . $notes;
  86  }
  87  else
  88  {
  89      $bodytext = $hometext . '<br /><br />' . $bodytext . '<br /><br />' . $notes;
  90  }
  91  
  92  if ( $informant ==  '' ) { $informant = $anonymous; }
  93  
  94  getTopics( $sid );
  95  
  96  if ( $catid != 0 )
  97  {
  98      $result = mysql_query( "SELECT title FROM ".$mpnTables['stories_cat']." WHERE catid = '$catid'" );
  99  
 100      list( $title1 ) = mysql_fetch_row( $result );
 101  
 102      mysql_free_result( $result );
 103  
 104      $title = "<a href=\"categories.$phpEx?op=newindex&amp;catid=$catid\">$title1</a>: $title";
 105  }
 106  
 107  include  './header.php';
 108  
 109  echo "<div id='article'>\n\n";
 110  
 111      echo "<table width='100%' summary=''><tr><td class='top'>";
 112  
 113          themearticle( $aid, $informant, $datetime, $title, $bodytext, $topic, $topicname, $topicimage, $topictext );
 114  
 115      echo "</td><td class='art-sideblk'>";
 116  
 117          $boxtitle = $topictext;
 118          $boxstuff = '';
 119  
 120          $result = mysql_query( "SELECT name, url FROM " . $mpnTables['related'] . " WHERE tid = '$topic'" );
 121  
 122          if ( mysql_num_rows( $result ) > 0 )
 123          {
 124              $boxstuff .= "<br /><div class='blocksubtitle'>" . translate("Related Links") . "</div>";
 125  
 126              $boxstuff .= "<hr /><br />\n";
 127  
 128              while( list( $name, $url ) = mysql_fetch_row( $result ) )
 129              {
 130                  if ($url != '')
 131                  {
 132                      $boxstuff .= "<ul><li><a href='$url'>$name</a></li></ul>";
 133                  }
 134              }
 135  
 136              mysql_free_result( $result );
 137          }
 138  
 139          if ( $topictext != '' )
 140          {
 141              $boxstuff .= "<br /><br /><div class='blocksubtitle'>" . translate("Most read story about") . " $topictext:</div>";
 142  
 143              $boxstuff .= "<hr /><br />\n";
 144  
 145              $result = mysql_query( "SELECT sid, title FROM ".$mpnTables['stories']." WHERE topic = $topic ORDER BY counter DESC LIMIT 0,1" );
 146  
 147              list( $topstory, $ttitle ) = mysql_fetch_row( $result );
 148  
 149              mysql_free_result( $result );
 150  
 151              $ttitle = stripslashes( $ttitle );
 152  
 153              $boxstuff .= "<a href='article.php?sid=$topstory'>$ttitle</a>";
 154  
 155              $boxstuff .= "<br /><br /><div class='blocksubtitle'>" . translate("Recent News About") . " $topictext:</div>";
 156  
 157              $boxstuff .= "<hr /><br />\n";
 158  
 159              $result = mysql_query( "SELECT sid, title FROM " . $mpnTables['stories'] . " WHERE topic = '$topic' && title != '" . addslashes( $title ) . "' ORDER BY time DESC LIMIT 0,5" );
 160  
 161              while( list( $sid1, $title1 ) = mysql_fetch_row( $result ) )
 162              {
 163                  $title1 = stripslashes( $title1 );
 164  
 165                  $boxstuff .= "<ul><li><a href=\"article.$phpEx?sid=$sid1\">$title1</a></li></ul>\n";
 166              }
 167  
 168              mysql_free_result( $result );
 169  
 170              $boxstuff .= "<br /><br /><div class='blocksubtitle'>" . translate("Misc") . "</div><hr /><br />";
 171  
 172              $boxstuff .= "<ul>\n";
 173  
 174              $boxstuff .= "<li><a href='search.$phpEx?topic=$topic'>" . translate("More about") . "<br />$topictext</a></li>";
 175  
 176              $boxstuff .= "<li><a href='search.$phpEx?author=$aid'>" . translate("News by") . "<br />$aid</a></li>";
 177  
 178              $boxstuff .= "</ul>\n";
 179  
 180              $boxstuff .= "<br /><hr /><br />";
 181  
 182          }
 183  
 184          $boxstuff .= "<div class='center'>";
 185  
 186              if ( $anonpost == 1 || _MPN_USER || _MPN_ADMIN )
 187              {
 188                  $boxstuff .= "<a class='bare' href='./comments.$phpEx&#063;op&#061;Reply&amp;pid&#061;0&amp;sid&#061;$sid'>\n";
 189  
 190                      $boxstuff .= "<span class='button'>\n";
 191  
 192                           $boxstuff .= translate( 'Post A Comment' );
 193  
 194                      $boxstuff .= "</span>\n";
 195  
 196                  $boxstuff .= "</a><br /><br />\n";
 197              }
 198  
 199              $boxstuff .= "<a href='./print.php&#063;sid&#061;$sid'>\n";
 200  
 201                  $boxstuff .= "<img src='./images/print.gif' alt='" . translate( 'Printer Friendly Page' ) . "' width='15' height='11' " . _T_NN4_BORDER . " />\n";
 202  
 203              $boxstuff .= "</a>&nbsp;&nbsp;\n";
 204  
 205              $boxstuff .= "<a href='./friend.php&#063;op&#061;FriendSend&amp;sid&#061;$sid'>\n";
 206  
 207                  $boxstuff .= "<img src='./images/friend.gif' alt='" . translate( 'Send this Story to a Friend' ) . "' width='15' height='11' " . _T_NN4_BORDER . " />\n";
 208  
 209              $boxstuff .= "</a>\n";
 210  
 211          $boxstuff .= "</div>\n";
 212  
 213          $boxstuff .= "<br />";
 214  
 215          themesidebox( $boxtitle, $boxstuff );
 216  
 217      echo "</td></tr></table>";
 218  
 219      echo "<br /><br />\n";
 220  
 221      $cookie = cookiedecode();
 222  
 223      if (!isset( $cookie[4] ) || (isset( $cookie[4] ) && $cookie[4] != 'nocomments' ))
 224      {
 225          echo "<div id='comments'>\n";
 226  
 227              echo "<h2>" . translate( 'Comments' ) . "</h2>\n";
 228              echo "<br />\n";
 229  
 230              include  './comments.php';
 231  
 232          echo "</div>\n";
 233      }
 234  
 235  
 236  echo "</div>\n";
 237  
 238  include ("footer.$phpEx");
 239  
 240  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]