| 831 | 
           florian | 
           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'){
  | 
        
        
            | 
            | 
           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 without markread in url
  | 
        
        
            | 
            | 
           38 | 
               $dest_url = phorum_get_url(PHORUM_INDEX_URL);
  | 
        
        
            | 
            | 
           39 | 
               phorum_redirect_by_url($dest_url);
  | 
        
        
            | 
            | 
           40 | 
               exit();
  | 
        
        
            | 
            | 
           41 | 
              | 
        
        
            | 
            | 
           42 | 
           }
  | 
        
        
            | 
            | 
           43 | 
              | 
        
        
            | 
            | 
           44 | 
           // somehow we got to a forum in index.php
  | 
        
        
            | 
            | 
           45 | 
           if(!empty($PHORUM["forum_id"]) && $PHORUM["folder_flag"]==0){
  | 
        
        
            | 
            | 
           46 | 
               $dest_url = phorum_get_url(PHORUM_LIST_URL);
  | 
        
        
            | 
            | 
           47 | 
               phorum_redirect_by_url($dest_url);
  | 
        
        
            | 
            | 
           48 | 
               exit();
  | 
        
        
            | 
            | 
           49 | 
           }
  | 
        
        
            | 
            | 
           50 | 
              | 
        
        
            | 
            | 
           51 | 
           if ( isset( $PHORUM["forum_id"] ) ) {
  | 
        
        
            | 
            | 
           52 | 
               $parent_id = (int)$PHORUM["forum_id"];
  | 
        
        
            | 
            | 
           53 | 
           } else {
  | 
        
        
            | 
            | 
           54 | 
               $parent_id = 0;
  | 
        
        
            | 
            | 
           55 | 
           }
  | 
        
        
            | 
            | 
           56 | 
              | 
        
        
            | 
            | 
           57 | 
              | 
        
        
            | 
            | 
           58 | 
           if($PHORUM["use_new_folder_style"]){
  | 
        
        
            | 
            | 
           59 | 
               include_once "./include/index_new.php";
  | 
        
        
            | 
            | 
           60 | 
           } else {
  | 
        
        
            | 
            | 
           61 | 
               include_once "./include/index_classic.php";
  | 
        
        
            | 
            | 
           62 | 
           }
  | 
        
        
            | 
            | 
           63 | 
              | 
        
        
            | 
            | 
           64 | 
           ?>
  |