[7880] | 1 | <?php |
---|
| 2 | // +-----------------------------------------------------------------------+ |
---|
| 3 | // | Piwigo - a PHP based picture gallery | |
---|
| 4 | // +-----------------------------------------------------------------------+ |
---|
| 5 | // | Copyright(C) 2008-2009 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 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 25 | |
---|
| 26 | if (!defined('CONFLIT_PATH')) |
---|
| 27 | define( |
---|
| 28 | 'CONFLIT_PATH', |
---|
| 29 | PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/' |
---|
| 30 | ); |
---|
[8942] | 31 | $CONFLIT_PATH_ABS=str_replace('\\','/',dirname(__FILE__) ); |
---|
[8925] | 32 | if (!defined('CONFLIT_PATH_ABS')) |
---|
[8942] | 33 | define( |
---|
| 34 | 'CONFLIT_PATH_ABS', $CONFLIT_PATH_ABS."/" |
---|
| 35 | ); |
---|
| 36 | |
---|
[7880] | 37 | // +-----------------------------------------------------------------------+ |
---|
| 38 | // | Check Access and exit when user status is not ok | |
---|
| 39 | // +-----------------------------------------------------------------------+ |
---|
| 40 | //check_status(ACCESS_ADMINISTRATOR); |
---|
| 41 | include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); |
---|
| 42 | include_once (PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); |
---|
| 43 | |
---|
| 44 | $my_base_url = get_admin_plugin_menu_link(__FILE__); |
---|
| 45 | |
---|
| 46 | |
---|
| 47 | |
---|
| 48 | $tabsheet = new tabsheet(); |
---|
| 49 | $tabsheet->add( 'cl_conflit_admin', |
---|
| 50 | l10n('admin'), |
---|
| 51 | $my_base_url.'&tab=cl_conflit_admin' |
---|
| 52 | ); |
---|
| 53 | /* |
---|
| 54 | $tabsheet->add( 'cl_conflit_content', |
---|
| 55 | l10n('content'), |
---|
| 56 | $my_base_url.'&tab=cl_conflit_content' |
---|
| 57 | ); |
---|
| 58 | */ |
---|
| 59 | |
---|
| 60 | |
---|
| 61 | if (!isset($_GET['tab'])) |
---|
| 62 | $page['tab'] = 'cl_conflit_admin'; |
---|
| 63 | else |
---|
| 64 | $page['tab'] = $_GET['tab']; |
---|
| 65 | |
---|
| 66 | |
---|
| 67 | $tabsheet->select($page['tab']); |
---|
| 68 | $tabsheet->assign(); |
---|
| 69 | |
---|
| 70 | $page['global'] = array(); |
---|
| 71 | $error = array(); |
---|
| 72 | |
---|
| 73 | global $user, $conf, $errors ; |
---|
| 74 | global $args, $cl_conflits_message,$erreur_message ; |
---|
| 75 | |
---|
| 76 | include_once (CONFLIT_PATH.'include/constants.php'); |
---|
| 77 | |
---|
| 78 | $aff_nb=true; |
---|
| 79 | |
---|
| 80 | ; |
---|
| 81 | include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); |
---|
| 82 | include_once (PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); |
---|
| 83 | |
---|
| 84 | |
---|
| 85 | $my_base_url = get_admin_plugin_menu_link(__FILE__); |
---|
| 86 | load_language('lang', CONFLIT_PATH ); |
---|
| 87 | // ************************************************************************* |
---|
| 88 | // | Sélection de l'onglet | |
---|
| 89 | // ************************************************************************* |
---|
| 90 | $cl_conflits_message =""; |
---|
| 91 | $erreur_message=""; |
---|
| 92 | global $conf; |
---|
| 93 | global $cl_conflit_parametres; |
---|
| 94 | global $template,$page,$conf ; |
---|
| 95 | global $picture; |
---|
| 96 | |
---|
| 97 | $visible=true; |
---|
| 98 | |
---|
| 99 | |
---|
| 100 | |
---|
[7905] | 101 | $cl_conflit_parametres = cl_conflit_Get_Options(); |
---|
[7880] | 102 | if (isset($_POST['submit'])) { |
---|
| 103 | if ($_POST['submit'] == l10n('cl_conflit_save')) { |
---|
| 104 | cl_conflit_sauve_options_inf() ; |
---|
| 105 | unset($_POST); |
---|
| 106 | } |
---|
| 107 | } |
---|
| 108 | //========================================= |
---|
| 109 | if (isset($_POST['img_start'])) { |
---|
| 110 | unset($_POST); |
---|
| 111 | } |
---|
| 112 | include (CONFLIT_PATH."include/affiche.php"); |
---|
| 113 | //================================================================================ |
---|
[8925] | 114 | $template->assign( |
---|
| 115 | array( |
---|
| 116 | 'CONFLIT_PATH' => CONFLIT_PATH, |
---|
[8942] | 117 | 'CONFLIT_PATH_ABS' => CONFLIT_PATH_ABS , |
---|
| 118 | 'Infos' => conflit_memo_var($cl_plugin ) , |
---|
| 119 | 'cl_version' =>$cl_plugin['version'] |
---|
[8925] | 120 | ) ); |
---|
| 121 | |
---|
[7880] | 122 | $base_url = get_root_url().'admin_cl_conflit.php'; |
---|
| 123 | switch ($page['tab']) |
---|
| 124 | { |
---|
| 125 | case 'cl_conflit_admin': |
---|
[8942] | 126 | |
---|
[7880] | 127 | $template->set_filenames(array('plugin_admin_content' => realpath(CONFLIT_PATH . 'admin/template/admin.tpl'))); |
---|
[8925] | 128 | |
---|
[7880] | 129 | $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); |
---|
| 130 | break; |
---|
| 131 | |
---|
| 132 | case 'cl_conflit_content': |
---|
| 133 | |
---|
| 134 | |
---|
| 135 | $template->set_filenames(array( 'plugin_admin_content' => realpath(CONFLIT_PATH . 'template/picture.tpl' ))); |
---|
[8925] | 136 | |
---|
[7880] | 137 | $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); |
---|
| 138 | break; |
---|
| 139 | } |
---|
| 140 | if (!isset($cl_conflits_message)){ |
---|
| 141 | $cl_conflits_message = ""; |
---|
| 142 | } |
---|
| 143 | |
---|
| 144 | |
---|
| 145 | |
---|
| 146 | if ($cl_conflits_message != "") { |
---|
| 147 | array_push($page['cl_conflits'], $cl_conflits_message); |
---|
| 148 | $cl_conflits_message=""; |
---|
| 149 | } |
---|
| 150 | if (!isset($erreur_message)){ |
---|
| 151 | $erreur_message = ""; |
---|
| 152 | } |
---|
| 153 | if ($erreur_message != "") { |
---|
| 154 | |
---|
| 155 | array_push($page['errors'], $erreur_message); |
---|
| 156 | $erreur_message=""; |
---|
| 157 | |
---|
| 158 | |
---|
| 159 | } |
---|
| 160 | |
---|
| 161 | //================================================================ |
---|
| 162 | |
---|
| 163 | |
---|
| 164 | ?> |
---|