[9641] | 1 | <?php |
---|
| 2 | if(!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 3 | |
---|
| 4 | load_language('plugin.lang', COA_PATH); |
---|
| 5 | $conf['comments_on_albums'] = unserialize($conf['comments_on_albums']); |
---|
| 6 | |
---|
| 7 | // +-----------------------------------------------------------------------+ |
---|
[11267] | 8 | // Save configuration | |
---|
[9641] | 9 | // +-----------------------------------------------------------------------+ |
---|
[11267] | 10 | if (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 | ); |
---|
[10984] | 16 | |
---|
[11267] | 17 | conf_update_param('comments_on_albums', serialize($conf['comments_on_albums'])); |
---|
| 18 | array_push($page['infos'], l10n('Information data registered in database')); |
---|
| 19 | } |
---|
[9641] | 20 | |
---|
[11267] | 21 | |
---|
[9641] | 22 | // +-----------------------------------------------------------------------+ |
---|
[11267] | 23 | // Template | |
---|
[9641] | 24 | // +-----------------------------------------------------------------------+ |
---|
| 25 | |
---|
[11267] | 26 | // available icons |
---|
| 27 | $dh = opendir(COA_PATH . 'template/s26'); |
---|
| 28 | while (($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 | } |
---|
| 35 | closedir($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 | |
---|
[9641] | 48 | ?> |
---|