source: extensions/PWG_Stuffs/trunk/modules/MostVisited/config.inc.php @ 9737

Last change on this file since 9737 was 9737, checked in by patdenice, 13 years ago

Compatible 2.2

File size: 1.0 KB
Line 
1<?php
2
3if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
4if (!isset($datas))
5{
6  $datas = array(
7    'nb_images'     => 5,
8    'cat_display'   => 'all',
9    'cat_selection' => array(),
10  );
11}
12
13// Enregistrement de la configuration
14if (isset($_POST['submit']))
15{
16  $datas = array(
17    'nb_images' => intval($_POST['nb_images']),
18    'cat_display' => $_POST['cat_display'],
19    'cat_selection' => @$_POST['cat_selection'],
20    );
21  unset($_POST['on_picture']);
22}
23
24// Parametrage du template
25$query = 'SELECT id,name,uppercats,global_rank FROM '.CATEGORIES_TABLE.';';
26display_select_cat_wrapper($query,array(),'category_selection');
27
28$template->assign(array(
29  'NB_IMAGES' => $datas['nb_images'],
30  'cat_display' => $datas['cat_display'],
31  'category_selected' => $datas['cat_selection'],
32  )
33);
34
35$display_options = & $template->get_template_vars('display_options');
36$display_options['on_picture'] = false;
37
38$template->set_filenames(array('module_options' => dirname(__FILE__) . '/config.tpl'));
39$template->assign_var_from_handle('MODULE_OPTIONS', 'module_options');
40
41?>
Note: See TracBrowser for help on using the repository browser.