[3970] | 1 | <?php |
---|
[3960] | 2 | // +-----------------------------------------------------------------------+ |
---|
| 3 | // | Plugin Name : Event Cats | |
---|
| 4 | // | Plugin Version : 1.0 | |
---|
| 5 | // | File Version : 1.0 | |
---|
| 6 | // | Plugin Version author : LucMorizur | |
---|
| 7 | // | Plugin description : (plugin for Piwigo, http://piwigo.org ) | |
---|
| 8 | // | This plugin allows an account to be automatically logged in ; and to | |
---|
| 9 | // | let users duplicate the account they are logged with, to get benefits | |
---|
| 10 | // | of the groups of the previous account, immediately on their new acc. | |
---|
| 11 | // | Ce plugin permet d'identifier automatiquement un compte ; et permet à | |
---|
| 12 | // | un utilisateur de dupliquer un compte, pour que le nouveau compte | |
---|
| 13 | // | bénéficie immédiatement de l'affectation aux groupes de l'ancien cpte | |
---|
| 14 | // +-----------------------------------------------------------------------+ |
---|
| 15 | |
---|
| 16 | // +-----------------------------------------------------------------------+ |
---|
| 17 | // | Piwigo - a PHP based picture gallery | |
---|
| 18 | // +-----------------------------------------------------------------------+ |
---|
| 19 | // | Copyright(C) 2008-2009 Piwigo Team http://piwigo.org | |
---|
| 20 | // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | |
---|
| 21 | // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | |
---|
| 22 | // +-----------------------------------------------------------------------+ |
---|
| 23 | // | This program is free software; you can redistribute it and/or modify | |
---|
| 24 | // | it under the terms of the GNU General Public License as published by | |
---|
| 25 | // | the Free Software Foundation | |
---|
| 26 | // | | |
---|
| 27 | // | This program is distributed in the hope that it will be useful, but | |
---|
| 28 | // | WITHOUT ANY WARRANTY; without even the implied warranty of | |
---|
| 29 | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
---|
| 30 | // | General Public License for more details. | |
---|
| 31 | // | | |
---|
| 32 | // | You should have received a copy of the GNU General Public License | |
---|
| 33 | // | along with this program; if not, write to the Free Software | |
---|
| 34 | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
---|
| 35 | // | USA. | |
---|
| 36 | // +-----------------------------------------------------------------------+ |
---|
| 37 | |
---|
[4421] | 38 | // Keeps file coded in UTF-8 without BOM : é |
---|
| 39 | |
---|
[3960] | 40 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 41 | |
---|
[4329] | 42 | global $template, $conf, $lang, $prefixeTable, |
---|
| 43 | $ec_conf, $page, $ec_debug, $ec_lists; |
---|
[3960] | 44 | |
---|
| 45 | load_language('plugin.lang', EVNTCATS_PATH); |
---|
| 46 | |
---|
| 47 | include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); |
---|
[4247] | 48 | include_once(PHPWG_ROOT_PATH.'include/functions.inc.php'); |
---|
[3960] | 49 | include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php'); |
---|
| 50 | include_once(PHPWG_ROOT_PATH.'include/functions_url.inc.php'); |
---|
[4169] | 51 | include_once(EVNTCATS_PATH.'include/evntcats_main_funcs.inc.php'); |
---|
| 52 | include_once(EVNTCATS_PATH.'include/evntcats_admin_funcs.inc.php'); |
---|
[3960] | 53 | $my_base_url = get_admin_plugin_menu_link(__FILE__); |
---|
| 54 | |
---|
[3999] | 55 | $template->assign('EVNTCATS_VERSION', EVNTCATS_INFO_VERSION); |
---|
[3960] | 56 | $me = get_plugin_data($plugin_id); |
---|
| 57 | $template->clear_assign('ec_infos'); |
---|
| 58 | $template->append('head_elements', |
---|
| 59 | '<link rel="stylesheet" type="text/css" href="'. |
---|
| 60 | EVNTCATS_PATH.'admin/evntcats_theme.css">' |
---|
| 61 | ); |
---|
[4239] | 62 | if (!isset($ec_debug)) $ec_debug = array(); |
---|
[3960] | 63 | |
---|
[4276] | 64 | // +-----------------------------------------------------------------------+ |
---|
| 65 | // | $_POST analysis, to determine which tab to display (tabsheet prep.) |
---|
| 66 | // +-----------------------------------------------------------------------+ |
---|
| 67 | |
---|
| 68 | // If needed, stores in the DB the new value of the number of digits of |
---|
| 69 | // automatically created codes |
---|
[4027] | 70 | if ( |
---|
| 71 | isset($_POST['ec_in_up_auto_code_length']) and |
---|
| 72 | $_POST['ec_in_up_auto_code_length'] != read_ec_conf('auto_code_dg_nb') |
---|
| 73 | ) change_ec_conf('auto_code_dg_nb', $_POST['ec_in_up_auto_code_length']); |
---|
| 74 | |
---|
[4276] | 75 | |
---|
| 76 | // If needed, stores in the DB that acknowledgement message has been displayed |
---|
[4239] | 77 | if ($ec_howto = (read_ec_conf('howto') == '0')) change_ec_conf('howto', '1'); |
---|
[4092] | 78 | |
---|
[4437] | 79 | // If needed, stores in the DB whether help banner must be displayed or not |
---|
| 80 | if ( |
---|
[4443] | 81 | isset($_POST['ec_help_banner_onoff2']) and |
---|
| 82 | $_POST['ec_help_banner_onoff2'] != read_ec_conf('in_help_display') |
---|
| 83 | ) change_ec_conf('in_help_display', $_POST['ec_help_banner_onoff2']); |
---|
[4437] | 84 | |
---|
[4169] | 85 | build_ec_lists(); // in evntcats_main_funcs.php |
---|
[4115] | 86 | |
---|
[4333] | 87 | $dup_types_exist = false; |
---|
| 88 | $dup_entries_exist = false; |
---|
| 89 | $ec_exist_entries = false; |
---|
| 90 | function check_DB() { |
---|
| 91 | global $dup_types_exist, $dup_entries_exist, $ec_exist_entries, $ec_lists; |
---|
| 92 | |
---|
| 93 | $dup_types_exist = build_dup_groups(); // build_dup_groups() returns |
---|
| 94 | // true if an entry exists for duplication management for types |
---|
| 95 | |
---|
| 96 | // both arrays below are built when executing build_dup_groups() function |
---|
| 97 | $dup_entries_exist = ( |
---|
| 98 | $dup_types_exist or |
---|
| 99 | count($ec_lists['groups_granted_ids']) > 0 or |
---|
| 100 | count($ec_lists['users_granted_direct_ids']) > 0 |
---|
| 101 | ); |
---|
| 102 | |
---|
| 103 | $ec_exist_entries = (mysql_num_rows(pwg_query(" |
---|
| 104 | SELECT * FROM `".EVNTCATS_TABLE."` |
---|
| 105 | WHERE `code` IS NOT NULL ; |
---|
| 106 | ")) != 0); |
---|
| 107 | } |
---|
| 108 | |
---|
| 109 | check_DB(); |
---|
| 110 | |
---|
[4329] | 111 | // If no entry exist, default tab is 'autolog_new'. |
---|
[4333] | 112 | $page['tab'] = (!$ec_exist_entries) ? 'autolog_new' : 'autolog_entries'; |
---|
[4058] | 113 | |
---|
[4333] | 114 | // If no entry exist, but some duplication management entries exist, and |
---|
| 115 | // duplication setting is "managed per groups", default tab is 'duplication' |
---|
| 116 | if ( |
---|
| 117 | !$ec_exist_entries and |
---|
| 118 | read_ec_conf('dup_allow') == '2' and |
---|
| 119 | $dup_entries_exist |
---|
| 120 | ) $page['tab'] = 'duplication'; |
---|
[4058] | 121 | |
---|
[4329] | 122 | // If a modification of duplication management has been posted, default tab |
---|
| 123 | // is 'duplication'. |
---|
| 124 | if ( |
---|
| 125 | count($_POST) > 0 and |
---|
| 126 | count(array_intersect(array( |
---|
| 127 | 'ec_duplic_conf_submit', |
---|
| 128 | 'deny_groups_submit', |
---|
| 129 | 'grant_groups_submit', |
---|
| 130 | 'deny_types_submit', |
---|
| 131 | 'grant_types_submit', |
---|
| 132 | 'deny_users_submit', |
---|
| 133 | 'grant_users_submit', |
---|
| 134 | ), |
---|
| 135 | array_keys($_POST))) > 0 |
---|
| 136 | ) $page['tab'] = 'duplication'; |
---|
[4276] | 137 | |
---|
[4329] | 138 | if (isset($_POST['ec_conf_submit'])) { |
---|
| 139 | if (isset($_POST['ec_dup_conf'])) |
---|
| 140 | if (!change_ec_conf('dup_allow', $_POST['ec_dup_conf'])) |
---|
| 141 | ec_end2(7); |
---|
| 142 | if (isset($_POST['ec_dup_disp'])) |
---|
| 143 | if (!change_ec_conf('duplic_display', $_POST['ec_dup_disp'])) |
---|
| 144 | ec_end2(8); |
---|
| 145 | if (isset($_POST['ec_unknown'])) |
---|
| 146 | if (!change_ec_conf('unknown_code', $_POST['ec_unknown'])) |
---|
| 147 | ec_end2(9); |
---|
| 148 | if (isset($_POST['ec_in_up_aps'])) |
---|
| 149 | if (!change_ec_conf('unknown_code_ap_id', $_POST['ec_in_up_aps'])) |
---|
| 150 | ec_end2(10); |
---|
[4418] | 151 | if (isset($_POST['ec_comments'])) |
---|
| 152 | if (!change_ec_conf('comment_display', $_POST['ec_comments'])) |
---|
| 153 | ec_end2(11); |
---|
[4329] | 154 | $page['tab'] = 'config'; |
---|
| 155 | $page['infos'][] = l10n('ec_config_saved'); |
---|
[4276] | 156 | } |
---|
[4329] | 157 | elseif (isset($_POST['ec_duplic_conf_submit'])) { |
---|
| 158 | if (isset($_POST['ec_dup_conf'])) { |
---|
| 159 | if ( |
---|
| 160 | read_ec_conf('dup_allow') == '2' and |
---|
| 161 | $_POST['ec_dup_conf'] != '2' |
---|
| 162 | ) $page['tab'] = 'config'; |
---|
| 163 | if (!change_ec_conf('dup_allow', $_POST['ec_dup_conf'])) |
---|
| 164 | ec_end2(5); |
---|
| 165 | } |
---|
| 166 | if (isset($_POST['ec_dup_disp'])) |
---|
| 167 | if (!change_ec_conf('duplic_display', $_POST['ec_dup_disp'])) |
---|
| 168 | ec_end2(6); |
---|
| 169 | $page['infos'][] = l10n('ec_config_saved'); |
---|
[4276] | 170 | } |
---|
[4329] | 171 | elseif ( |
---|
| 172 | isset($_POST['deny_groups_submit']) and |
---|
| 173 | isset($_POST['deny_groups']) and |
---|
| 174 | count($_POST['deny_groups']) > 0 |
---|
| 175 | ) { |
---|
| 176 | if (pwg_query(" |
---|
| 177 | DELETE |
---|
| 178 | FROM `".EVNTCATS_TABLE."` |
---|
| 179 | WHERE `arg1` = 1 |
---|
| 180 | AND `arg2` IN (".implode(',', $_POST['deny_groups'])."); |
---|
| 181 | ") === false) ec_end2(1); |
---|
| 182 | else $page['infos'][] = l10n('ec_config_saved'); |
---|
[4276] | 183 | } |
---|
[4329] | 184 | elseif ( |
---|
| 185 | isset($_POST['grant_groups_submit']) and |
---|
| 186 | isset($_POST['grant_groups']) and |
---|
| 187 | count($_POST['grant_groups']) > 0 |
---|
| 188 | ) { |
---|
| 189 | $inserts = array(); |
---|
| 190 | foreach ($_POST['grant_groups'] as $v) $inserts[] = array( |
---|
| 191 | 'arg1' => 1, |
---|
| 192 | 'arg2' => intval($v) |
---|
| 193 | ); |
---|
| 194 | mass_inserts(EVNTCATS_TABLE, array('arg1', 'arg2'), $inserts); |
---|
| 195 | $page['infos'][] = l10n('ec_config_saved'); |
---|
[4276] | 196 | } |
---|
[4329] | 197 | elseif ( |
---|
| 198 | isset($_POST['deny_types_submit']) and ( |
---|
| 199 | isset($_POST['deny_types']) and |
---|
| 200 | count($_POST['deny_types']) > 0 or |
---|
| 201 | isset($_POST['deny_generic']) |
---|
| 202 | ) |
---|
| 203 | ) { |
---|
[4333] | 204 | $c = $ec_lists['types_granted']; |
---|
[4329] | 205 | if (isset($_POST['deny_types'])) |
---|
| 206 | foreach ($_POST['deny_types'] as $v) $c = $c & ~$v; |
---|
| 207 | if (isset($_POST['deny_generic'])) $c = $c & 7; |
---|
[4333] | 208 | $q = ($dup_types_exist) ? " |
---|
[4329] | 209 | UPDATE `".EVNTCATS_TABLE."` |
---|
| 210 | SET `arg2` = $c |
---|
| 211 | WHERE `arg1` = 3 |
---|
| 212 | LIMIT 1 ; |
---|
[4333] | 213 | " : " |
---|
| 214 | INSERT INTO `".EVNTCATS_TABLE."` |
---|
| 215 | (`arg1`, `arg2`) |
---|
| 216 | VALUES (3, $c); |
---|
[4329] | 217 | "; |
---|
| 218 | if (pwg_query($q) === false) ec_end2(3); |
---|
| 219 | else $page['infos'][] = l10n('ec_config_saved'); |
---|
[4276] | 220 | } |
---|
[4329] | 221 | elseif ( |
---|
| 222 | isset($_POST['grant_types_submit']) and ( |
---|
| 223 | isset($_POST['grant_types']) and |
---|
| 224 | count($_POST['grant_types']) > 0 or |
---|
| 225 | isset($_POST['grant_generic']) |
---|
| 226 | ) |
---|
| 227 | ) { |
---|
[4333] | 228 | $c = $ec_lists['types_granted']; |
---|
[4329] | 229 | if (isset($_POST['grant_types'])) |
---|
| 230 | foreach ($_POST['grant_types'] as $v) $c = $c | $v; |
---|
| 231 | if (isset($_POST['grant_generic'])) $c = $c | 8; |
---|
[4333] | 232 | $q = ($dup_types_exist) ? " |
---|
[4329] | 233 | UPDATE `".EVNTCATS_TABLE."` |
---|
| 234 | SET `arg2` = $c |
---|
| 235 | WHERE `arg1` = 3 |
---|
| 236 | LIMIT 1 ; |
---|
[4333] | 237 | " : " |
---|
| 238 | INSERT INTO `".EVNTCATS_TABLE."` |
---|
| 239 | (`arg1`, `arg2`) |
---|
| 240 | VALUES (3, $c); |
---|
[4329] | 241 | "; |
---|
| 242 | if (pwg_query($q) === false) ec_end2(4); |
---|
| 243 | else $page['infos'][] = l10n('ec_config_saved'); |
---|
[4276] | 244 | } |
---|
[4329] | 245 | elseif ( |
---|
| 246 | isset($_POST['deny_users_submit']) and |
---|
| 247 | isset($_POST['deny_users']) and |
---|
| 248 | count($_POST['deny_users']) > 0 |
---|
| 249 | ) { |
---|
| 250 | if (pwg_query(" |
---|
| 251 | DELETE |
---|
| 252 | FROM `".EVNTCATS_TABLE."` |
---|
| 253 | WHERE `arg1` = 2 |
---|
| 254 | AND `arg2` IN (".implode(',', $_POST['deny_users'])."); |
---|
| 255 | ") === false) ec_end2(2); |
---|
| 256 | else $page['infos'][] = l10n('ec_config_saved'); |
---|
[4276] | 257 | } |
---|
[4329] | 258 | elseif ( |
---|
| 259 | isset($_POST['grant_users_submit']) and |
---|
| 260 | isset($_POST['grant_users']) and |
---|
| 261 | count($_POST['grant_users']) > 0 |
---|
| 262 | ) { |
---|
| 263 | $inserts = array(); |
---|
| 264 | foreach ($_POST['grant_users'] as $v) $inserts[] = array( |
---|
| 265 | 'arg1' => 2, |
---|
| 266 | 'arg2' => intval($v) |
---|
| 267 | ); |
---|
| 268 | mass_inserts(EVNTCATS_TABLE, array('arg1', 'arg2'), $inserts); |
---|
| 269 | $page['infos'][] = l10n('ec_config_saved'); |
---|
[4276] | 270 | } |
---|
[4329] | 271 | elseif (isset($_POST['ec_act1'])) { |
---|
[4092] | 272 | if ( |
---|
[4157] | 273 | $_POST['ec_act1'] == 'disable' and |
---|
| 274 | count($ec_lists['add_pages']) == 0 |
---|
| 275 | ) { |
---|
| 276 | $_POST['ec_act1'] = 'modify_entry_submit'; |
---|
| 277 | $_POST['ec_input_action'] = 'refused'; |
---|
| 278 | } |
---|
| 279 | if ( |
---|
[4058] | 280 | $_POST['ec_act1'] == 'duplicate_entry_ask' or |
---|
[4157] | 281 | $_POST['ec_act1'] == 'create_ask' |
---|
| 282 | ) |
---|
| 283 | $page['tab'] = 'autolog_new'; |
---|
| 284 | elseif ( |
---|
[4058] | 285 | $_POST['ec_act1'] == 'disable' or |
---|
| 286 | $_POST['ec_act1'] == 'modify_entry_ask' |
---|
[4019] | 287 | ) |
---|
[4157] | 288 | $page['tab'] = 'autolog_modif'; |
---|
[4026] | 289 | elseif ($_POST['ec_act1'] == 'create') |
---|
[4218] | 290 | $page['tab'] = (ec_create_modify_entry_OK()) ? |
---|
| 291 | 'autolog_entries' : 'autolog_new'; |
---|
| 292 | elseif ( |
---|
| 293 | isset($_POST['ec_entry_sel']) and |
---|
| 294 | is_numeric($_POST['ec_entry_sel']) |
---|
| 295 | ) { |
---|
[4219] | 296 | if ($_POST['ec_act1'] == 'duplicate_entry_submit') $page['tab'] = |
---|
| 297 | (ec_create_modify_entry_OK()) ? 'autolog_entries' : 'autolog_new'; |
---|
| 298 | elseif ($_POST['ec_act1'] == 'modify_entry_submit') $page['tab'] = |
---|
| 299 | (ec_create_modify_entry_OK()) ? 'autolog_entries' : 'autolog_modif'; |
---|
[4115] | 300 | else { |
---|
| 301 | $page['tab'] = 'autolog_entries'; |
---|
[4218] | 302 | if ($_POST['ec_act1'] == 'delete') { |
---|
| 303 | if (isset($_POST['ec_entry_sel'])) { |
---|
| 304 | ec_delete_entry_OK($_POST['ec_entry_sel']); |
---|
| 305 | build_ec_table(); |
---|
| 306 | } |
---|
[4329] | 307 | else ec_end1('ec_entry_sel', 'Bad argument : '); |
---|
[4218] | 308 | } |
---|
[4219] | 309 | else if ($_POST['ec_act1'] == 'toggle_forced') |
---|
| 310 | ec_create_modify_entry_OK(); |
---|
[4115] | 311 | } |
---|
[4058] | 312 | } |
---|
[4019] | 313 | } |
---|
[4115] | 314 | else { |
---|
| 315 | if (isset($_GET['tab'])) switch ($_GET['tab']) { |
---|
[4157] | 316 | case 'autolog_modif': |
---|
[4276] | 317 | if ($ec_exist_entries) $page['tab'] = $_GET['tab']; |
---|
| 318 | break; |
---|
| 319 | case 'duplication': |
---|
[4329] | 320 | if (read_ec_conf('dup_allow') == '2') $page['tab'] = $_GET['tab']; |
---|
[4276] | 321 | break; |
---|
[4115] | 322 | case 'autolog_new': |
---|
| 323 | case 'config': |
---|
[4157] | 324 | $page['tab'] = $_GET['tab']; |
---|
| 325 | break; |
---|
[4115] | 326 | } |
---|
[3999] | 327 | } |
---|
[3960] | 328 | |
---|
[4276] | 329 | // +-----------------------------------------------------------------------+ |
---|
| 330 | // | Tabsheet |
---|
| 331 | // +-----------------------------------------------------------------------+ |
---|
| 332 | |
---|
[4436] | 333 | check_DB(); $ec_debug['ec_exist_entries'] = $ec_exist_entries; |
---|
[4333] | 334 | |
---|
[4329] | 335 | if ( |
---|
| 336 | $page['tab'] == 'duplication' and |
---|
| 337 | read_ec_conf('dup_allow') != '2' |
---|
| 338 | ) $page['tab'] = 'config'; |
---|
[4276] | 339 | |
---|
[4436] | 340 | if (!$ec_exist_entries and $page['tab'] == 'autolog_entries') $page['tab'] = |
---|
| 341 | (read_ec_conf('dup_allow') == '2' and $dup_entries_exist) ? |
---|
| 342 | 'duplication' : 'autolog_new'; |
---|
| 343 | |
---|
[3960] | 344 | $tabsheet = new tabsheet(); |
---|
[4157] | 345 | if ($ec_exist_entries) { |
---|
| 346 | $tabsheet->add('autolog_entries', |
---|
| 347 | l10n('ec_tab_autoid_entries'), |
---|
| 348 | $my_base_url.'&tab=autolog_entries'); |
---|
| 349 | $tabsheet->add('autolog_modif', |
---|
| 350 | l10n('ec_tab_autoid_modif'), |
---|
| 351 | $my_base_url.'&tab=autolog_modif'); |
---|
| 352 | } |
---|
| 353 | $tabsheet->add('autolog_new', |
---|
| 354 | l10n('ec_tab_autoid_new'), |
---|
[3999] | 355 | $my_base_url.'&tab=autolog_new'); |
---|
[4329] | 356 | if (read_ec_conf('dup_allow') == '2') $tabsheet->add('duplication', |
---|
[3999] | 357 | l10n('ec_tab_duplication'), |
---|
| 358 | $my_base_url.'&tab=duplication'); |
---|
[3960] | 359 | $tabsheet->add('config', |
---|
| 360 | l10n('ec_tab_config'), |
---|
| 361 | $my_base_url.'&tab=config'); |
---|
| 362 | |
---|
[4157] | 363 | $template->assign('EVNTCATS_URLS', array( |
---|
[3960] | 364 | 'ROOT' => EVNTCATS_PATH, |
---|
| 365 | )); |
---|
| 366 | |
---|
| 367 | /****************************************************************************/ |
---|
| 368 | |
---|
[4157] | 369 | $ec_file = ($page['tab'] == 'autolog_modif') ? 'autolog_new' : $page['tab']; |
---|
[3960] | 370 | |
---|
[4157] | 371 | include(EVNTCATS_PATH.'admin/'.$ec_file.'.inc.php'); |
---|
| 372 | |
---|
[4011] | 373 | $tabsheet->select($page['tab']); |
---|
| 374 | $tabsheet->assign(); |
---|
| 375 | |
---|
[3960] | 376 | /* |
---|
| 377 | print '<pre>'; |
---|
| 378 | //print_r('ROOT_URL : '.ROOT_URL.'<br>EVNTCATS_PATH : '.EVNTCATS_PATH); |
---|
| 379 | print('ROOT_URL : '.ROOT_URL.'<br>EVNTCATS_PATH : '.EVNTCATS_PATH); |
---|
| 380 | print '</pre>'; |
---|
| 381 | */ |
---|
| 382 | |
---|
[4092] | 383 | $template->assign('ec_howto', |
---|
| 384 | ($ec_howto and (count($page['errors']) ==0 and count($page['infos']) == 0))); |
---|
[3960] | 385 | |
---|
[4437] | 386 | $template->assign('ec_help_banner_OK', (read_ec_conf('in_help_display') == '1')); |
---|
| 387 | |
---|
[3960] | 388 | $template->assign('EVNTCATS_PATH',EVNTCATS_PATH); |
---|
| 389 | $template->assign('RACINE_URL',ROOT_URL); |
---|
[4375] | 390 | $template->assign('U_HELP', get_root_url().'popuphelp.php?page=help'); |
---|
[3960] | 391 | |
---|
[4048] | 392 | if (isset($conf['ec_debug1'])) $template->assign('ec_debug1', array( |
---|
[4219] | 393 | 'POST' => str_from_var($_POST), |
---|
| 394 | 'ec_debug' => (isset($ec_debug)) ? str_from_var($ec_debug) : '(unset)', |
---|
[4048] | 395 | 'GET' => str_from_var($_GET), |
---|
| 396 | 'page' => str_from_var($page), |
---|
[4171] | 397 | 'ec_conf' => str_from_var($ec_conf), |
---|
[4048] | 398 | 'ec_lists' => (isset($ec_lists)) ? str_from_var($ec_lists) : '(unset)', |
---|
| 399 | 'code_list' => (isset($code_list)) ? str_from_var($code_list) : '(unset)', |
---|
| 400 | )); |
---|
[3960] | 401 | |
---|
[4157] | 402 | $template->set_filenames(array( |
---|
| 403 | 'evntcats_admin_content' => dirname(__FILE__).'/template/'.$ec_file.'.tpl' |
---|
| 404 | )); |
---|
[3960] | 405 | $template->assign_var_from_handle('ADMIN_CONTENT','evntcats_admin_content'); |
---|
| 406 | ?> |
---|