source: trunk/plugins/LocalFilesEditor/show_default.php @ 2297

Last change on this file since 2297 was 2297, checked in by plg, 16 years ago

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
File size: 4.4 KB
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) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
26// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
27// +-----------------------------------------------------------------------+
28// | file          : $Id: show_default.php 2297 2008-04-04 22:57:23Z plg $
29// | last update   : $Date: 2008-04-04 22:57:23 +0000 (Fri, 04 Apr 2008) $
30// | last modifier : $Author: plg $
31// | revision      : $Revision: 2297 $
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
48define('PHPWG_ROOT_PATH', '../../');
49include_once(PHPWG_ROOT_PATH . 'include/common.inc.php');
50include_once(LOCALEDIT_PATH.'functions.inc.php');
51check_status(ACCESS_ADMINISTRATOR);
52
53if (isset($_GET['file']))
54{
55  $path = $_GET['file'];
56  if (!is_admin() or (!substr_count($path, 'config_default.inc.php') and !substr_count($path, '.lang.php')))
57  {
58        die('Hacking attempt!');
59  }
60   
61  $template->set_filename('show_default', dirname(__FILE__) . '/show_default.tpl');
62 
63  // Editarea
64  if (!isset($conf['editarea_options']) or $conf['editarea_options'] !== false)
65  {
66    $editarea = array(
67      'syntax' => 'php',
68      'start_highlight' => true,
69      'is_editable' => false,
70      'language' => substr($user['language'], 0, 2));
71
72    $template->assign('editarea', array(
73      'URL' => LOCALEDIT_PATH . 'editarea/edit_area_full.js',
74      'OPTIONS' => $editarea));
75  }
76
77  $file = file_get_contents(PHPWG_ROOT_PATH . $path);
78
79  $template->assign(array('DEFAULT_CONTENT' => $file));
80
81  $title = $path;
82  $page['page_banner'] = '<h1>'.str_replace('/', ' / ', $path).'</h1>';
83  $page['body_id'] = 'thePopuphelpPage';
84
85  include(PHPWG_ROOT_PATH.'include/page_header.php');
86
87  $template->pparse('show_default');
88
89  include(PHPWG_ROOT_PATH.'include/page_tail.php');
90}
91
92?>
Note: See TracBrowser for help on using the repository browser.