Changeset 9766 for extensions/Comments_on_Albums/admin/config.php
- Timestamp:
- Mar 19, 2011, 10:39:36 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Comments_on_Albums/admin/config.php
r9641 r9766 6 6 // +-----------------------------------------------------------------------+ 7 7 if (isset($_POST['config_submit'])) { 8 $ user_config= array(8 $conf['comments_on_albums'] = array( 9 9 'icon_color' => $_POST['icon_color'], 10 10 'icon_color_over' => $_POST['icon_color_over'], 11 11 ); 12 12 13 pwg_query("UPDATE " . CONFIG_TABLE . " SET `value` = '" . serialize($ user_config) . "' WHERE `param` = 'comments_on_albums';");14 redirect(COA_ADMIN . '-config&msg=saved');13 pwg_query("UPDATE " . CONFIG_TABLE . " SET `value` = '" . serialize($conf['comments_on_albums']) . "' WHERE `param` = 'comments_on_albums';"); 14 array_push($page['infos'], l10n('Information data registered in database')); 15 15 } 16 16 17 17 18 // +-----------------------------------------------------------------------+ 18 19 // Template 19 20 // +-----------------------------------------------------------------------+ 20 if (isset($_GET['msg']) AND $_GET['msg'] == 'saved') {21 array_push($page['infos'], l10n('Information data registered in database'));22 }23 21 24 22 // available icons 25 23 $dh = opendir(COA_PATH . 'template/s26'); 26 24 while (($file = readdir($dh)) !== false ) { 27 if ($file !== '.' && $file !== '..') {28 $color = preg_replace('#^outline\_([a-f0-9]{6})\.png$#', '$1', $file);29 $template->append('COLORS', $ color);25 if ($file !== '.' AND $file !== '..' 26 AND in_array(strtolower(end(explode('.', $file))), array('jpg', 'png', 'gif'))) { 27 $template->append('COLORS', $file); 30 28 } 31 29 } 32 30 closedir($dh); 33 31 34 35 32 $template->assign(array( 36 33 'ICON_COLOR' => $conf['comments_on_albums']['icon_color'], … … 38 35 )); 39 36 40 41 37 $template->set_filenames(array('plugin_admin_content' => dirname(__FILE__).'/template/config.tpl')); 42 38 $template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content'); 39 43 40 ?>
Note: See TracChangeset
for help on using the changeset viewer.