home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Blogs / wordpress2.6.exe / wordpress2.6 / wp-admin / options-general.php < prev    next >
Encoding:
PHP Script  |  2008-05-04  |  6.0 KB  |  122 lines

  1. <?php
  2. require_once('./admin.php');
  3.  
  4. $title = __('General Settings');
  5. $parent_file = 'options-general.php';
  6.  
  7. include('./admin-header.php');
  8. ?>
  9.  
  10. <div class="wrap">
  11. <h2><?php _e('General Settings') ?></h2>
  12. <form method="post" action="options.php">
  13. <?php wp_nonce_field('update-options') ?>
  14. <table class="form-table">
  15. <tr valign="top">
  16. <th scope="row"><label for="blogname"><?php _e('Blog Title') ?></label></th>
  17. <td><input name="blogname" type="text" id="blogname" value="<?php form_option('blogname'); ?>" size="40" /></td>
  18. </tr>
  19. <tr valign="top">
  20. <th scope="row"><label for="blogdescription"><?php _e('Tagline') ?></label></th>
  21. <td><input name="blogdescription" type="text" id="blogdescription" style="width: 95%" value="<?php form_option('blogdescription'); ?>" size="45" />
  22. <br />
  23. <?php _e('In a few words, explain what this blog is about.') ?></td>
  24. </tr>
  25. <tr valign="top">
  26. <th scope="row"><label for="siteurl"><?php _e('WordPress address (URL)') ?></label></th>
  27. <td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>" size="40" class="code<?php if ( defined( 'WP_SITEURL' ) ) : ?> disabled" disabled="disabled"<?php else: ?>"<?php endif; ?> /></td>
  28. </tr>
  29. <tr valign="top">
  30. <th scope="row"><label for="home"><?php _e('Blog address (URL)') ?></label></th>
  31. <td><input name="home" type="text" id="home" value="<?php form_option('home'); ?>" size="40" class="code<?php if ( defined( 'WP_HOME' ) ) : ?> disabled" disabled="disabled"<?php else: ?>"<?php endif; ?> /><br /><?php _e('Enter the address here if you want your blog homepage <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">to be different from the directory</a> you installed WordPress.'); ?></td>
  32. </tr>
  33. <tr valign="top">
  34. <th scope="row"><label for="admin_email"><?php _e('E-mail address') ?> </label></th>
  35. <td><input name="admin_email" type="text" id="admin_email" value="<?php form_option('admin_email'); ?>" size="40" class="code" />
  36. <br />
  37. <?php _e('This address is used for admin purposes, like new user notification.') ?></td>
  38. </tr>
  39. <tr valign="top">
  40. <th scope="row"><?php _e('Membership') ?></th>
  41. <td> <fieldset><legend class="hidden"><?php _e('Membership') ?></legend><label for="users_can_register">
  42. <input name="users_can_register" type="checkbox" id="users_can_register" value="1" <?php checked('1', get_option('users_can_register')); ?> />
  43. <?php _e('Anyone can register') ?></label><br />
  44. <label for="comment_registration">
  45. <input name="comment_registration" type="checkbox" id="comment_registration" value="1" <?php checked('1', get_option('comment_registration')); ?> />
  46. <?php _e('Users must be registered and logged in to comment') ?>
  47. </label>
  48. </fieldset></td>
  49. </tr>
  50. <tr valign="top">
  51. <th scope="row"><label for="default_role"><?php _e('New User Default Role') ?></label></th>
  52. <td>
  53. <select name="default_role" id="default_role"><?php wp_dropdown_roles( get_option('default_role') ); ?></select>
  54. </td>
  55. </tr>
  56. <tr>
  57. <th scope="row"><label for="gmt_offset"><?php _e('Timezone') ?> </label></th>
  58. <td>
  59. <select name="gmt_offset" id="gmt_offset">
  60. <?php
  61. $current_offset = get_option('gmt_offset');
  62. $offset_range = array (-12, -11.5, -11, -10.5, -10, -9.5, -9, -8.5, -8, -7.5, -7, -6.5, -6, -5.5, -5, -4.5, -4, -3.5, -3, -2.5, -2, -1.5, -1, -0.5,
  63.     0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 5.75, 6, 6.5, 7, 7.5, 8, 8.5, 8.75, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.75, 13, 13.75, 14);
  64. foreach ( $offset_range as $offset ) {
  65.     if ( 0 < $offset )
  66.         $offset_name = '+' . $offset;
  67.     elseif ( 0 == $offset )
  68.         $offset_name = '';
  69.     else
  70.         $offset_name = (string) $offset;
  71.  
  72.     $offset_name = str_replace(array('.25','.5','.75'), array(':15',':30',':45'), $offset_name);
  73.  
  74.     $selected = '';
  75.     if ( $current_offset == $offset ) {
  76.         $selected = " selected='selected'";
  77.         $current_offset_name = $offset_name;
  78.     }
  79.     echo "<option value=\"$offset\"$selected>" . sprintf(__('UTC %s'), $offset_name) . '</option>';
  80. }
  81. ?>
  82. </select>
  83. <?php _e('hours') ?><br />
  84. <?php printf(__('<abbr title="Coordinated Universal Time">UTC</abbr> time is <code>%s</code>'), gmdate(__('Y-m-d G:i:s'))); ?><br />
  85. <?php if ($current_offset) printf(__('UTC %1$s is <code>%2$s</code>'), $current_offset_name, gmdate(__('Y-m-d G:i:s'), current_time('timestamp'))); ?><br />
  86. <?php _e('Unfortunately, you have to manually update this for Daylight Savings Time. Lame, we know, but will be fixed in the future.'); ?>
  87. </td>
  88. </tr>
  89. <tr>
  90. <th scope="row"><label for="date_format"><?php _e('Date Format') ?></label></th>
  91. <td><input name="date_format" type="text" id="date_format" size="30" value="<?php form_option('date_format'); ?>" /><br />
  92. <?php _e('Output:') ?> <strong><?php echo mysql2date(get_option('date_format'), current_time('mysql')); ?></strong></td>
  93. </tr>
  94. <tr>
  95. <th scope="row"><label for="time_format"><?php _e('Time Format') ?></label></th>
  96. <td><input name="time_format" type="text" id="time_format" size="30" value="<?php form_option('time_format'); ?>" /><br />
  97. <?php _e('Output:') ?> <strong><?php echo gmdate(get_option('time_format'), current_time('timestamp')); ?></strong><br />
  98. <?php _e('<a href="http://codex.wordpress.org/Formatting_Date_and_Time">Documentation on date formatting</a>. Click "Save Changes" to update sample output.') ?></td>
  99. </tr>
  100. <tr>
  101. <th scope="row"><label for="start_of_week"><?php _e('Week Starts On') ?></label></th>
  102. <td><select name="start_of_week" id="start_of_week">
  103. <?php
  104. for ($day_index = 0; $day_index <= 6; $day_index++) :
  105.     $selected = (get_option('start_of_week') == $day_index) ? 'selected="selected"' : '';
  106.     echo "\n\t<option value='$day_index' $selected>" . $wp_locale->get_weekday($day_index) . '</option>';
  107. endfor;
  108. ?>
  109. </select></td>
  110. </tr>
  111. </table>
  112.  
  113. <p class="submit"><input type="submit" name="Submit" value="<?php _e('Save Changes') ?>" />
  114. <input type="hidden" name="action" value="update" />
  115. <input type="hidden" name="page_options" value="<?php if ( ! defined( 'WP_SITEURL' ) ) echo 'siteurl,'; if ( ! defined( 'WP_HOME' ) ) echo 'home,'; ?>blogname,blogdescription,admin_email,users_can_register,gmt_offset,date_format,time_format,start_of_week,comment_registration,default_role" />
  116. </p>
  117. </form>
  118.  
  119. </div>
  120.  
  121. <?php include('./admin-footer.php') ?>
  122.