Changeset 620
- Timestamp:
- 12/17/2003 01:07:40 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/options.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options.php
r619 r620 37 37 38 38 require_once("optionhandler.php"); 39 $non_was_selected = 0; 39 40 if ($option_group_id == '') { 40 41 $option_group_id = 1; 42 $non_was_selected = 1; 41 43 } 42 44 … … 50 52 // iterate through the list of options in this group 51 53 // pull the vars from the post 52 // validate ranges etc. ?54 // validate ranges etc. 53 55 // update the values 54 56 $options = $wpdb->get_results("SELECT $tableoptions.option_id, option_name, option_type, option_value, option_admin_level " … … 103 105 include_once("./admin-header.php"); 104 106 if ($user_level <= 3) { 105 die("You have no right to edit the options for this blog.<br>Ask for a promotion toyour <a href=\"mailto:$admin_email\">blog admin</a> :)");107 die("You have no right to edit the options for this blog.<br>Ask for a promotion from your <a href=\"mailto:$admin_email\">blog admin</a> :)"); 106 108 } 109 ?> 110 111 <?php 112 if ($non_was_selected) { // no group pre-selected, display opening page 113 ?> 114 <div class="wrap"> 115 <?php 116 //iterate through the available option groups. output them as a definition list. 117 $option_groups = $wpdb->get_results("SELECT group_id, group_name, group_desc, group_longdesc FROM $tableoptiongroups ORDER BY group_id"); 118 foreach ($option_groups as $option_group) { 119 echo(" <dt><a href=\"$this_file?option_group_id={$option_group->group_id}\" title=\"{$option_group->group_desc}\">{$option_group->group_name}</a></dt>\n"); 120 $current_long_desc = $option_group->group_longdesc; 121 if ($current_long_desc == '') { 122 $current_long_desc = 'No help for this group of options.'; 123 } 124 echo(" <dd>{$option_group->group_desc}: $current_long_desc</dd>\n"); 125 } // end for each group 126 ?> 127 <dt><a href="options-permalink.php">Permalinks</a></dt> 128 <dd>Permanent link configuration</dd> 129 </div> 130 <?php 131 132 } else { //there was a group selected. 133 107 134 ?> 108 135 <ul id="adminmenu2"> 109 136 <?php 110 // we need to iterate through the available option groups.137 //Iterate through the available option groups. 111 138 $option_groups = $wpdb->get_results("SELECT group_id, group_name, group_desc, group_longdesc FROM $tableoptiongroups ORDER BY group_id"); 112 139 foreach ($option_groups as $option_group) { … … 120 147 } // end for each group 121 148 ?> 122 <li class="last"><a href="options-permalink.php">Permalinks</a></li>149 <li class="last"><a href="options-permalink.php">Permalinks</a></li> 123 150 </ul> 124 <br clear="all" />151 <br clear="all" /> 125 152 <div class="wrap"> 126 <h2><?php echo $current_desc; ?></h2> 127 <form name="form" action="<?php echo $this_file; ?>" method="post"> 128 <input type="hidden" name="action" value="update" /> 129 <input type="hidden" name="option_group_id" value="<?php echo $option_group_id; ?>" /> 130 153 <h2><?php echo $current_desc; ?></h2> 154 <form name="form" action="<?php echo $this_file; ?>" method="post"> 155 <input type="hidden" name="action" value="update" /> 156 <input type="hidden" name="option_group_id" value="<?php echo $option_group_id; ?>" /> 131 157 <table width="90%" cellpadding="2" cellspacing="2" border="0"> 132 158 <?php … … 139 165 if ($options) { 140 166 foreach ($options as $option) { 141 echo(' <tr><td width="10%" valign="top">'. get_option_widget($option, ($user_level >= $option->option_admin_level), '</td><td width="15%" valign="top" style="border: 1px solid #ccc">'));142 echo(" </td><td valign='top' class='helptext'>$option->option_description</td></tr>\n");167 echo(' <tr><td width="10%" valign="top">'. get_option_widget($option, ($user_level >= $option->option_admin_level), '</td><td width="15%" valign="top" style="border: 1px solid #ccc">')); 168 echo(" </td><td valign='top' class='helptext'>$option->option_description</td></tr>\n"); 143 169 } 144 170 } … … 148 174 <tr><td colspan="3"><?php echo $message; ?></td></tr> 149 175 </table> 150 176 </form> 151 177 </div> 152 153 </form>154 178 155 179 <div class="wrap"> 156 180 <?php 157 if ($current_long_desc != '') {158 echo($current_long_desc);159 } else {181 if ($current_long_desc != '') { 182 echo($current_long_desc); 183 } else { 160 184 ?> 161 <p> No help for this group of options.</p>185 <p> No help for this group of options.</p> 162 186 <?php 163 }187 } 164 188 ?> 165 189 </div> 166 190 <?php 167 191 } // end else a group was selected 168 192 break; 169 } 193 } // end switch 170 194 171 195 include("admin-footer.php") ?>
Note: See TracChangeset
for help on using the changeset viewer.