1 | <?php |
---|
2 | |
---|
3 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
4 | include_once(CONCOURS_PATH . 'admin/functions.inc.php'); |
---|
5 | |
---|
6 | global $template; |
---|
7 | |
---|
8 | // General parameters for the concours |
---|
9 | $concours = new Concours(); |
---|
10 | |
---|
11 | if (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->my_config['mask_author'] = isset($_POST['mask_author']); |
---|
16 | $concours->my_config['thumb_note'] = isset($_POST['thumb_note']); |
---|
17 | |
---|
18 | $concours->my_config['check_exaequo'] = isset($_POST['check_exaequo']); |
---|
19 | |
---|
20 | $concours->my_config['author_vote_available'] = isset($_POST['author_vote_available']); |
---|
21 | $concours->my_config['concours_change_score'] = isset($_POST['concours_change_score']); |
---|
22 | |
---|
23 | $concours->save_config(); |
---|
24 | array_push($page['infos'], l10n('concours_saveOK')); |
---|
25 | } |
---|
26 | |
---|
27 | for($jj=0; $jj < 10; $jj++) |
---|
28 | { |
---|
29 | $template->append('NBCONCOURS',array('ID' => $jj,'NAME' => $jj,'SELECTED' => ($concours->my_config['nbconcours_menubar'] == $jj ? 'selected' : ''))); |
---|
30 | $i++; |
---|
31 | } |
---|
32 | |
---|
33 | $template->assign(array( |
---|
34 | 'SHOW_MENUBAR' => ($concours->my_config['active_menubar'] ? 'checked="checked"' : ''), |
---|
35 | 'MASK_AUTHOR' => ($concours->my_config['mask_author'] ? 'checked="checked"' : ''), |
---|
36 | 'THUMB_NOTE' => ($concours->my_config['thumb_note'] ? 'checked="checked"' : ''), |
---|
37 | 'CHECK_EXAEQUO' => ($concours->my_config['check_exaequo'] ? 'checked="checked"' : ''), |
---|
38 | 'AUTHOR_VOTE_AVAILABLE' => ($concours->my_config['author_vote_available'] ? 'checked="checked"' : ''), |
---|
39 | 'CHANGE_SCORE' => ($concours->my_config['concours_change_score'] ? 'checked="checked"' : ''), |
---|
40 | |
---|
41 | )); |
---|
42 | |
---|
43 | $result = array(); |
---|
44 | $result = get_csvfile_result(); |
---|
45 | $o=0; |
---|
46 | foreach($result as $file) |
---|
47 | { |
---|
48 | $template->append('FILE',array('NAME' => $file['name'], |
---|
49 | 'LINK' => $file['link'], |
---|
50 | 'CONC_ID' => $file['conc_id'], |
---|
51 | 'CONC_NAME' => $file['conc_name'], |
---|
52 | 'CONC_DESCR' => $file['conc_descr'] |
---|
53 | )); |
---|
54 | } |
---|
55 | |
---|
56 | $template->set_filename('plugin_admin_content', dirname(__FILE__) . '/template/params.tpl'); |
---|
57 | $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); |
---|
58 | |
---|
59 | ?> |
---|