Dotclear

source: plugins/gallery/trunk/index.php @ 2264

Revision 2264, 1.6 KB checked in by bruno, 14 years ago (diff)

DC 2.1.7 support

  • Property svn:executable set to *
Line 
1<?php
2# -- BEGIN LICENSE BLOCK ----------------------------------
3#
4# This file is part of Dotclear 2 Gallery plugin.
5#
6# Copyright (c) 2004-2008 Bruno Hondelatte, and contributors.
7# Many, many thanks to Olivier Meunier and the Dotclear Team.
8# Licensed under the GPL version 2.0 license.
9# See LICENSE file or
10# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
11#
12# -- END LICENSE BLOCK ------------------------------------
13
14if (!defined('DC_CONTEXT_ADMIN')) { exit; }
15
16# Settings compatibility test
17if (!version_compare(DC_VERSION,'2.2alpha','>=')) {
18     $s =& $core->blog->settings->gallery;
19} else {
20     $s =& $core->blog->gallery;
21}
22
23if (is_null($s->gallery_enabled) || !$s->gallery_enabled) {
24     require dirname(__FILE__).'/options.php';
25}elseif (!empty($_REQUEST['m'])) {
26     switch ($_REQUEST['m']) {
27          case 'gal' :
28               require dirname(__FILE__).'/gal.php';
29               break;
30          case 'galthumb' :
31               require dirname(__FILE__).'/galthumbnail.php';
32               break;
33          case 'newitems' :
34               require dirname(__FILE__).'/newitems.php';
35               break;
36          case 'galsactions':
37               require dirname(__FILE__).'/gals_actions.php';
38               break;
39          case 'items':
40               if ($s->gallery_adv_items)
41                    require dirname(__FILE__).'/items_adv.php';
42               else
43                    require dirname(__FILE__).'/items.php';
44               break;
45          case 'itemsactions':
46               require dirname(__FILE__).'/items_actions.php';
47               break;
48          case 'item':
49               require dirname(__FILE__).'/item.php';
50               break;
51          case 'options':
52               require dirname(__FILE__).'/options.php';
53               break;
54          case 'maintenance':
55               require dirname(__FILE__).'/maintenance.php';
56               break;
57     }
58} else {
59     require dirname(__FILE__).'/gals.php';
60}
61?>
Note: See TracBrowser for help on using the repository browser.

Sites map