[ Index ]
 

Code source de e107 0.7.8

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/ -> content.php (source)

   1  <?php
   2  /*
   3  + ----------------------------------------------------------------------------+
   4  |     e107 website system
   5  |
   6  |     ©Steve Dunstan 2001-2002
   7  |     http://e107.org
   8  |     jalist@e107.org
   9  |
  10  |     Released under the terms and conditions of the
  11  |     GNU General Public License (http://gnu.org).
  12  |
  13  |     $Source: /cvsroot/e107/e107_0.7/content.php,v $
  14  |     $Revision: 1.19 $
  15  |     $Date: 2005/12/24 22:53:38 $
  16  |     $Author: sweetas $
  17  +----------------------------------------------------------------------------+
  18  */
  19      
  20  require_once ("class2.php");
  21  
  22  //##### REDIRECTION MANAGEMENT -----------------------------------------------------------------------------
  23  if($content_install = $sql -> db_Select("plugin", "*", "plugin_path = 'content' AND plugin_installflag = '1' ")){
  24      //require_once($plugindir."handlers/content_class.php");
  25      //$aa = new content;
  26      
  27      $tmp = explode(".", e_QUERY);
  28      if($tmp[0]){
  29          //get type_id from the row with heading content, article or review
  30          //this will only work if the three main parents are not renamed !
  31          if(!$sql -> db_Select("pcontent", "content_id", "content_heading='".$tp -> toDB($tmp[0])."'")){
  32              header("location:".e_PLUGIN."content/content.php");
  33          }else{
  34              $row = $sql -> db_Fetch();
  35          }
  36      }
  37      if ($tmp[0] == "content") {
  38          if (is_numeric($tmp[1])) {                        //content view
  39              
  40              $tmp[1] = intval($tmp[1]);
  41              header("location:".e_PLUGIN."content/content.php?content.".$tmp[1]);
  42  
  43          }else{                                            //content recent page
  44              header("location:".e_PLUGIN."content/content.php?recent.".$row['content_id']);
  45          }
  46  
  47      }elseif ($tmp[0] == "article" || $tmp[0] == "review") {
  48  
  49          if (is_numeric($tmp[1])) {                        //item view
  50              $tmp[1] = intval($tmp[1]);
  51              header("location:".e_PLUGIN."content/content.php?content.".$tmp[1]);
  52          
  53          }elseif($tmp[1] == "cat" ) {                    //category page
  54              
  55              if(!$tmp[2] || $tmp[2] == "0") {            //all categories
  56                  //$mainparent = $aa -> getMainParent($tmp[2]);
  57                  //header("location:".e_PLUGIN."content/content.php?cat.list.".$mainparent."");
  58                  header("location:".e_PLUGIN."content/content.php");
  59              
  60              }else{                                        //view category
  61                  header("location:".e_PLUGIN."content/content.php?cat.".$tmp[2]);
  62              }
  63          
  64          } else {                                        //recent page
  65              header("location:".e_PLUGIN."content/content.php?recent.".$row['content_id']);
  66          }
  67      }else{                                                //redirect to new content main page
  68          header("location:".e_PLUGIN."content/content.php");
  69      }
  70  }
  71  //##### END REDIRECTION MANAGEMENT -------------------------------------------------------------------------
  72  
  73  ?>


Généré le : Sun Apr 1 01:23:32 2007 par Balluche grâce à PHPXref 0.7