[ Index ]
 

Code source de Phorum 5.1.25

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/ -> index.php (source)

   1  <?php
   2  
   3  ///////////////////////////////////////////////////////////////////////////////
   4  //                                                                           //
   5  // Copyright (C) 2006  Phorum Development Team                               //
   6  // http://www.phorum.org                                                     //
   7  //                                                                           //
   8  // This program is free software. You can redistribute it and/or modify      //
   9  // it under the terms of either the current Phorum License (viewable at      //
  10  // phorum.org) or the Phorum License that was distributed with this file     //
  11  //                                                                           //
  12  // This program is distributed in the hope that it will be useful,           //
  13  // but WITHOUT ANY WARRANTY, without even the implied warranty of            //
  14  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                      //
  15  //                                                                           //
  16  // You should have received a copy of the Phorum License                     //
  17  // along with this program.                                                  //
  18  ///////////////////////////////////////////////////////////////////////////////
  19  define('phorum_page','index');
  20  
  21  include_once ( "./common.php" );
  22  
  23  include_once ( "./include/format_functions.php" );
  24  
  25  if(!phorum_check_read_common()) {
  26    return;
  27  }
  28  
  29  // check for markread
  30  if (!empty($PHORUM["args"][1]) && $PHORUM["args"][1] == 'markread' && $PHORUM["DATA"]["LOGGEDIN"]){
  31      // setting all posts read
  32      if(isset($PHORUM["forum_id"])){
  33          unset($PHORUM['user']['newinfo']);
  34          phorum_db_newflag_allread($PHORUM["forum_id"]);
  35      }
  36  
  37      // redirect to a fresh list of the current folder without markread in url
  38      if(isset($PHORUM["args"][2]) && !empty($PHORUM["args"][2])) {
  39          $folder_id = (int)$PHORUM["args"][2];
  40          $dest_url = phorum_get_url(PHORUM_INDEX_URL,$folder_id);
  41      } else {
  42          $dest_url = phorum_get_url(PHORUM_INDEX_URL);
  43      }
  44      phorum_redirect_by_url($dest_url);
  45      exit();
  46  
  47  }
  48  
  49  // somehow we got to a forum in index.php
  50  if(!empty($PHORUM["forum_id"]) && $PHORUM["folder_flag"]==0){
  51      $dest_url = phorum_get_url(PHORUM_LIST_URL);
  52      phorum_redirect_by_url($dest_url);
  53      exit();
  54  }
  55  
  56  if ( isset( $PHORUM["forum_id"] ) ) {
  57      $parent_id = (int)$PHORUM["forum_id"];
  58  } else {
  59      $parent_id = 0;
  60  }
  61  
  62  
  63  if($PHORUM["use_new_folder_style"]){
  64      include_once  "./include/index_new.php";
  65  } else {
  66      include_once  "./include/index_classic.php";
  67  }
  68  
  69  ?>


Généré le : Thu Nov 29 12:22:27 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics