[Linpha-cvs] SF.net SVN: linpha: [4535] trunk/linpha2
Status: Inactive
Brought to you by:
bzrudi
From: <fan...@us...> - 2006-04-14 14:24:56
|
Revision: 4535 Author: fangehrn Date: 2006-04-14 07:24:45 -0700 (Fri, 14 Apr 2006) ViewCVS: http://svn.sourceforge.net/linpha/?rev=4535&view=rev Log Message: ----------- * added settings all feature in admin section Modified Paths: -------------- trunk/linpha2/ChangeLog trunk/linpha2/admin/index.php trunk/linpha2/admin/settings.php trunk/linpha2/admin/settings_features.php trunk/linpha2/admin/settings_layout.php Added Paths: ----------- trunk/linpha2/admin/settings_all.php Modified: trunk/linpha2/ChangeLog =================================================================== --- trunk/linpha2/ChangeLog 2006-04-14 14:03:58 UTC (rev 4534) +++ trunk/linpha2/ChangeLog 2006-04-14 14:24:45 UTC (rev 4535) @@ -1,5 +1,6 @@ 2006-04-14 flo * startet implementing basket checkout features (download, print, mail) + * added settings all feature in admin section 2006-04-13 flo * finished search feature Modified: trunk/linpha2/admin/index.php =================================================================== --- trunk/linpha2/admin/index.php 2006-04-14 14:03:58 UTC (rev 4534) +++ trunk/linpha2/admin/index.php 2006-04-14 14:24:45 UTC (rev 4535) @@ -128,37 +128,45 @@ function printAdminConfig($type,$text,$id,$options=array()) { + ?> + <div style="width: 600px; border: 1px solid black; padding: 5px; margin-bottom: 5px;"> + <div align="left" style="float: left;"> + <?php switch($type) { case 'radio': - if($GLOBALS['linpha']->sql->config->value[$id]) - { - $str_enabled = ' checked="checked"'; - $str_disabled = ''; - } - else - { - $str_enabled = ''; - $str_disabled = ' checked="checked"'; - } - echo $text; - ?> - <input type="radio" id="<?php echo $id; ?>01" name="<?php echo $id; ?>" value="1"<?php echo $str_enabled; ?> /><label for="<?php echo $id; ?>01"><?php echo i18n("Enable"); ?></label> - <input type="radio" id="<?php echo $id; ?>02" name="<?php echo $id; ?>" value="0"<?php echo $str_disabled; ?>/><label for="<?php echo $id; ?>02"><?php echo i18n("Disable"); ?></label> - <br /> - <?php + if($GLOBALS['linpha']->sql->config->value[$id]) + { + $str_enabled = ' checked="checked"'; + $str_disabled = ''; + } + else + { + $str_enabled = ''; + $str_disabled = ' checked="checked"'; + } + echo $text; + ?> + </div> + <div align="right"> + <input type="radio" id="<?php echo $id; ?>01" name="<?php echo $id; ?>" value="1"<?php echo $str_enabled; ?> /><label for="<?php echo $id; ?>01"><?php echo i18n("Enable"); ?></label> + <input type="radio" id="<?php echo $id; ?>02" name="<?php echo $id; ?>" value="0"<?php echo $str_disabled; ?>/><label for="<?php echo $id; ?>02"><?php echo i18n("Disable"); ?></label> + <?php break; case 'text': - echo $text; - ?> - <input type="text" name="<?php echo $id; ?>" value="<?php echo $GLOBALS['linpha']->sql->config->value[$id]; ?>" maxlength="255"/> - <br /> - <?php + echo $text; + ?> + </div> + <div align="right"> + <input type="text" name="<?php echo $id; ?>" value="<?php echo $GLOBALS['linpha']->sql->config->value[$id]; ?>" maxlength="255"/> + <?php break; case 'select': echo $text; ?> + </div> + <div align="right"> <select name="<?php echo $id; ?>" size="1"> <?php foreach($options AS $key=>$value) @@ -178,6 +186,10 @@ <?php break; } + ?> + </div> + </div> + <?php } function saveConfig($array) Modified: trunk/linpha2/admin/settings.php =================================================================== --- trunk/linpha2/admin/settings.php 2006-04-14 14:03:58 UTC (rev 4534) +++ trunk/linpha2/admin/settings.php 2006-04-14 14:24:45 UTC (rev 4535) @@ -9,7 +9,8 @@ $array_menu = Array( 'layout' => Array('name' => 'Layout', 'link' => 'settings_layout'), 'features' => Array('name' => 'Features', 'link' => 'settings_features'), - 'others' => Array('name' => 'Others', 'link' => 'settings_others') + 'others' => Array('name' => 'Others', 'link' => 'settings_others'), + 'all' => Array('name' => 'All', 'link' => 'settings_all') ); print_admin_menu($array_menu,$cat2); @@ -24,5 +25,12 @@ break; case 'others': break; + case 'all': + include_once(LINPHA_DIR.'/admin/settings_all.php'); + break; } -?> \ No newline at end of file +?> +<br /><br /><hr /> +<input type="hidden" name="cmd" value="saveconfig" /> +<input type="submit" name="submit" value="<?php echo i18n("Submit"); ?>" /> +</form> \ No newline at end of file Added: trunk/linpha2/admin/settings_all.php =================================================================== --- trunk/linpha2/admin/settings_all.php (rev 0) +++ trunk/linpha2/admin/settings_all.php 2006-04-14 14:24:45 UTC (rev 4535) @@ -0,0 +1,87 @@ +<?php +if(!defined('LINPHA_DIR')) { exit(1); } + +$options = array( + 'sys_db_version', + 'sys_im_bracket_support', + 'sys_im_imagemagick_path', + 'sys_im_use_imagemagick', + 'sys_im_video_thumbnail', + 'sys_import_autoimport', + 'sys_image_exif', + 'sys_image_iptc', + 'sys_image_xmp', + 'sys_lang', + 'sys_lang_autolang', + 'sys_path_album_dir', + 'sys_path_cache_dir', + 'sys_path_tmp_dir', + + 'sys_style_sortorder', + 'sys_style_template', + 'sys_style_home_showbrowsebydate', + 'sys_style_home_nrrandomimages', + 'sys_style_home_showalbums', + 'sys_style_home_usedefaultwelcometext', + 'sys_style_home_firstsortorder', + 'sys_style_thumb_size_max', + 'sys_style_thumb_size_display', + 'sys_style_thumb_showsubfoldersseparate', + 'sys_style_thumb_selectsizes', + 'sys_style_thumb_selectnrimages', + 'sys_style_thumb_nojsnrrows', + 'sys_style_thumb_nojsnrcols', + 'sys_style_image_quality', + 'sys_style_image_size', + 'sys_style_image_nrprevnextthumbs', + + 'sys_user_autologin' +); + +$radio_options = array( + 'sys_im_bracket_support', + 'sys_im_use_imagemagick', + 'sys_im_video_thumbnail', + 'sys_import_autoimport', + 'sys_image_exif', + 'sys_image_iptc', + 'sys_image_xmp', + 'sys_lang_autolang', + 'sys_style_home_showbrowsebydate', + 'sys_style_home_showalbums', + 'sys_style_home_usedefaultwelcometext', + 'sys_style_thumb_showsubfoldersseparate', + 'sys_user_autologin' +); + + +echo '<b>'.i18n("This Stuff here is only for advanced Users, don't play around...").'</b>'; +?> +<br /><br /> +<form method="POST" action="<?php echo LINPHA_DIR.'/admin/?cat=settings_all'; ?>"> +<?php + + + + /** + * save settings + */ + if(isset($_POST['cmd']) && $_POST['cmd']=='saveconfig') + { + saveConfig($options); + } + + foreach($options AS $value) + { + if(in_array($value,$radio_options)) + { + $type = 'radio'; + } + else + { + $type = 'text'; + } + printAdminConfig($type,$value,$value); + } + +?> \ No newline at end of file Modified: trunk/linpha2/admin/settings_features.php =================================================================== --- trunk/linpha2/admin/settings_features.php 2006-04-14 14:03:58 UTC (rev 4534) +++ trunk/linpha2/admin/settings_features.php 2006-04-14 14:24:45 UTC (rev 4535) @@ -37,8 +37,4 @@ printAdminConfig('radio',i18n("Use XMP"),'sys_image_xmp'); break; } -?> -<br /><br /><hr /> -<input type="hidden" name="cmd" value="saveconfig" /> -<input type="submit" name="submit" value="<?php echo i18n("Submit"); ?>" /> -</form> \ No newline at end of file +?> \ No newline at end of file Modified: trunk/linpha2/admin/settings_layout.php =================================================================== --- trunk/linpha2/admin/settings_layout.php 2006-04-14 14:03:58 UTC (rev 4534) +++ trunk/linpha2/admin/settings_layout.php 2006-04-14 14:24:45 UTC (rev 4535) @@ -86,8 +86,4 @@ break; } -?> -<br /><br /><hr /> -<input type="hidden" name="cmd" value="saveconfig" /> -<input type="submit" name="submit" value="<?php echo i18n("Submit"); ?>" /> -</form> \ No newline at end of file +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |