source: extensions/PWG_Stuffs/modules/Recent/config.inc.php @ 3609

Last change on this file since 3609 was 3609, checked in by patdenice, 15 years ago

Convert all php and tpl files in Unix format for my plugins.

File size: 978 bytes
Line 
1<?php
2
3if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
4if (!isset($datas))
5{
6  $datas = array(
7    'nb_images'     => 10,
8    'cat_display'   => 'all',
9    'cat_selection' => array(),
10  );
11}
12
13// Enregistrement de la configuration
14if (isset($_POST['submit']) and !is_adviser())
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$template->set_filenames(array('module_options' => dirname(__FILE__) . '/config.tpl'));
35$template->assign_var_from_handle('MODULE_OPTIONS', 'module_options');
36
37?>
Note: See TracBrowser for help on using the repository browser.