source: extensions/ConcoursPhoto/admin/params.php @ 3905

Last change on this file since 3905 was 3905, checked in by tiico, 15 years ago

Initial submit for plugin ConcoursPhoto (Possibility to add a competition on category with selected criterias and generation of the competition's result).
Functionnal version. Admin pages must be checked for informations/errors notifications

File size: 1.3 KB
Line 
1<?php
2
3if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
4include_once(CONCOURS_PATH . 'admin/functions.inc.php');
5
6global $template;
7
8// General parameters for the concours
9$concours = new Concours();
10
11if (isset($_POST['submit'])) { 
12  $concours->my_config['active_menubar'] = isset($_POST['active_menubar']);
13  $concours->my_config['nbconcours_menubar'] = $_POST['nbconcours_menubar'];
14
15  $concours->save_config();
16  array_push($page['infos'], l10n('concours_saveOK'));
17}
18
19for($jj=0; $jj < 10; $jj++)
20{
21        $template->append('NBCONCOURS',array('ID' => $jj,'NAME' => $jj,'SELECTED' => ($concours->my_config['nbconcours_menubar'] == $jj ? 'selected' : '')));
22        $i++;   
23}
24
25$template->assign(array(
26        'SHOW_MENUBAR'                  => ($concours->my_config['active_menubar'] ? 'checked="checked"' : '')
27                        ));
28
29$result = array();
30$result = get_csvfile_result();         
31$o=0;
32foreach($result as $file)
33{
34        $template->append('FILE',array('NAME' => $file['name'],
35                                                                   'LINK' => $file['link'],
36                                                                   'CONC_ID' => $file['conc_id'],
37                                                                   'CONC_NAME' => $file['conc_name'],
38                                                                   'CONC_DESCR' => $file['conc_descr']
39                                        ));
40}
41
42$template->set_filename('plugin_admin_content', dirname(__FILE__) . '/template/params.tpl');
43$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
44
45?>
Note: See TracBrowser for help on using the repository browser.