source: extensions/Comments_on_Albums/admin.php @ 12982

Last change on this file since 12982 was 11267, checked in by mistic100, 13 years ago

big code cleaning

File size: 1.7 KB
Line 
1<?php
2if(!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3
4load_language('plugin.lang', COA_PATH);
5$conf['comments_on_albums'] = unserialize($conf['comments_on_albums']);
6
7// +-----------------------------------------------------------------------+
8//                         Save configuration                              |
9// +-----------------------------------------------------------------------+
10if (isset($_POST['config_submit'])) 
11{
12  $conf['comments_on_albums'] = array(
13    'icon_color' => $_POST['icon_color'],
14    'icon_color_over' => $_POST['icon_color_over'],
15    );
16 
17  conf_update_param('comments_on_albums', serialize($conf['comments_on_albums']));
18  array_push($page['infos'], l10n('Information data registered in database'));
19} 
20
21
22// +-----------------------------------------------------------------------+
23//                               Template                                  |
24// +-----------------------------------------------------------------------+
25
26// available icons
27$dh = opendir(COA_PATH . 'template/s26');
28while (($file = readdir($dh)) !== false ) 
29{
30  if ($file !== '.' AND $file !== '..' AND in_array(strtolower(get_extension($file)), array('jpg', 'png', 'gif'))) 
31  {
32    $template->append('COLORS', $file);
33  }
34}
35closedir($dh);
36 
37$template->assign(
38  array(
39    'COA_PATH' => COA_PATH,
40    'ICON_COLOR' => $conf['comments_on_albums']['icon_color'],
41    'ICON_COLOR_OVER' => $conf['comments_on_albums']['icon_color_over'],
42    )
43  );
44
45$template->set_filenames(array('plugin_admin_content' => dirname(__FILE__).'/template/config.tpl'));
46$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
47
48?>
Note: See TracBrowser for help on using the repository browser.