source: trunk/category.php @ 2297

Revision 2297, 4.0 KB checked in by plg, 12 years ago (diff)

Modification: new header on PHP files, PhpWebGallery renamed Piwigo.

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
Line 
1<?php
2// +-----------------------------------------------------------------------+
3// | Piwigo - a PHP based picture gallery                                  |
4// +-----------------------------------------------------------------------+
5// | Copyright(C) 2008      Piwigo Team                  http://piwigo.org |
6// | Copyright(C) 2003-2008 PhpWebGallery Team    http://phpwebgallery.net |
7// | Copyright(C) 2002-2003 Pierrick LE GALL   http://le-gall.net/pierrick |
8// +-----------------------------------------------------------------------+
9// | This program is free software; you can redistribute it and/or modify  |
10// | it under the terms of the GNU General Public License as published by  |
11// | the Free Software Foundation                                          |
12// |                                                                       |
13// | This program is distributed in the hope that it will be useful, but   |
14// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
15// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
16// | General Public License for more details.                              |
17// |                                                                       |
18// | You should have received a copy of the GNU General Public License     |
19// | along with this program; if not, write to the Free Software           |
20// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
21// | USA.                                                                  |
22// +-----------------------------------------------------------------------+
23// +-----------------------------------------------------------------------+
24// | PhpWebGallery - a PHP based picture gallery                           |
25// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
26// +-----------------------------------------------------------------------+
27// | branch        : BSF (Best So Far)
28// | file          : $Id$
29// | last update   : $Date$
30// | last modifier : $Author$
31// | revision      : $Revision$
32// +-----------------------------------------------------------------------+
33// | This program is free software; you can redistribute it and/or modify  |
34// | it under the terms of the GNU General Public License as published by  |
35// | the Free Software Foundation                                          |
36// |                                                                       |
37// | This program is distributed in the hope that it will be useful, but   |
38// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
39// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
40// | General Public License for more details.                              |
41// |                                                                       |
42// | You should have received a copy of the GNU General Public License     |
43// | along with this program; if not, write to the Free Software           |
44// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
45// | USA.                                                                  |
46// +-----------------------------------------------------------------------+
47
48/*
49This file contains now only code to ensure backward url compatibility with
50versions before 1.6
51*/
52
53define('PHPWG_ROOT_PATH','./');
54include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
55
56$url_params=array();
57if ( isset($_GET['cat']) )
58{
59  if ( is_numeric($_GET['cat']) )
60  {
61    $url_params['section'] = 'categories';
62    $result = get_cat_info( $_GET['cat'] );
63    if ( !empty($result) )
64    {
65      $url_params['category'] = $result;
66    }
67  }
68  elseif ( in_array($_GET['cat'],
69              array('best_rated','most_visited','recent_pics','recent_cats')
70                  )
71         )
72  {
73    $url_params['section'] = $_GET['cat'];
74  }
75  else
76  {
77    page_not_found('');
78  }
79}
80
81$url = make_index_url($url_params);
82if (!headers_sent())
83{
84  set_status_header(301);
85  redirect_http( $url );
86}
87redirect ( $url );
88
89?>
Note: See TracBrowser for help on using the repository browser.