Changeset 12632 for trunk/wp-admin/ms-sites.php
- Timestamp:
- 01/07/2010 04:27:46 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/ms-sites.php
r12629 r12632 82 82 <form method="post" action="ms-edit.php?action=updateblog"> 83 83 <?php wp_nonce_field('editblog'); ?> 84 <input type="hidden" name="id" value="<?php echo esc_attr($id) ?>" /> 84 <input type="hidden" name="id" value="<?php echo esc_attr($id) ?>" /> 85 85 <div class='metabox-holder' style='width:49%;float:left;'> 86 86 <div id="blogedit_bloginfo" class="postbox " > … … 89 89 <table class="form-table"> 90 90 <tr class="form-field form-required"> 91 <th scope="row"><?php _e('Domain') ?></th> 91 <th scope="row"><?php _e('Domain') ?></th> 92 92 <td>http://<input name="blog[domain]" type="text" id="domain" value="<?php echo $details['domain'] ?>" size="33" /></td> 93 </tr> 93 </tr> 94 94 <tr class="form-field form-required"> 95 <th scope="row"><?php _e('Path') ?></th> 95 <th scope="row"><?php _e('Path') ?></th> 96 96 <td><input name="blog[path]" type="text" id="path" value="<?php echo esc_attr($details['path']) ?>" size="40" style='margin-bottom:5px;' /> 97 97 <br /><input type='checkbox' style='width:20px;' name='update_home_url' value='update' <?php if( get_blog_option( $id, 'siteurl' ) == preg_replace('|/+$|', '', 'http://' . $details['domain'] . $details['path']) || get_blog_option( $id, 'home' ) == preg_replace('|/+$|', '', 'http://' . $details['domain'] . $details['path']) ) echo 'checked="checked"'; ?> /> <?php _e( "Update 'siteurl' and 'home' as well." ); ?></td> 98 </tr> 98 </tr> 99 99 <tr class="form-field"> 100 <th scope="row"><?php _e('Registered') ?></th> 101 <td><input name="blog[registered]" type="text" id="blog_registered" value="<?php echo esc_attr($details['registered']) ?>" size="40" /></td> 102 </tr> 100 <th scope="row"><?php _e('Registered') ?></th> 101 <td><input name="blog[registered]" type="text" id="blog_registered" value="<?php echo esc_attr($details['registered']) ?>" size="40" /></td> 102 </tr> 103 103 <tr class="form-field"> 104 <th scope="row"><?php _e('Last Updated') ?></th> 105 <td><input name="blog[last_updated]" type="text" id="blog_last_updated" value="<?php echo esc_attr($details['last_updated']) ?>" size="40" /></td> 106 </tr> 104 <th scope="row"><?php _e('Last Updated') ?></th> 105 <td><input name="blog[last_updated]" type="text" id="blog_last_updated" value="<?php echo esc_attr($details['last_updated']) ?>" size="40" /></td> 106 </tr> 107 107 <tr class="form-field"> 108 <th scope="row"><?php _e('Public') ?></th> 108 <th scope="row"><?php _e('Public') ?></th> 109 109 <td> 110 110 <input type='radio' style='width:20px;' name='blog[public]' value='1' <?php if( $details['public'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?> 111 111 <input type='radio' style='width:20px;' name='blog[public]' value='0' <?php if( $details['public'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?> 112 </td> 113 </tr> 112 </td> 113 </tr> 114 114 <tr class="form-field"> 115 <th scope="row"><?php _e( 'Archived' ); ?></th> 115 <th scope="row"><?php _e( 'Archived' ); ?></th> 116 116 <td> 117 117 <input type='radio' style='width:20px;' name='blog[archived]' value='1' <?php if( $details['archived'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?> 118 118 <input type='radio' style='width:20px;' name='blog[archived]' value='0' <?php if( $details['archived'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?> 119 </td> 120 </tr> 119 </td> 120 </tr> 121 121 <tr class="form-field"> 122 <th scope="row"><?php _e( 'Mature' ); ?></th> 122 <th scope="row"><?php _e( 'Mature' ); ?></th> 123 123 <td> 124 124 <input type='radio' style='width:20px;' name='blog[mature]' value='1' <?php if( $details['mature'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?> 125 125 <input type='radio' style='width:20px;' name='blog[mature]' value='0' <?php if( $details['mature'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?> 126 </td> 127 </tr> 126 </td> 127 </tr> 128 128 <tr class="form-field"> 129 <th scope="row"><?php _e( 'Spam' ); ?></th> 129 <th scope="row"><?php _e( 'Spam' ); ?></th> 130 130 <td> 131 131 <input type='radio' style='width:20px;' name='blog[spam]' value='1' <?php if( $details['spam'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?> 132 132 <input type='radio' style='width:20px;' name='blog[spam]' value='0' <?php if( $details['spam'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?> 133 </td> 134 </tr> 133 </td> 134 </tr> 135 135 <tr class="form-field"> 136 <th scope="row"><?php _e( 'Deleted' ); ?></th> 136 <th scope="row"><?php _e( 'Deleted' ); ?></th> 137 137 <td> 138 138 <input type='radio' style='width:20px;' name='blog[deleted]' value='1' <?php if( $details['deleted'] == '1' ) echo 'checked="checked"'; ?> /> <?php _e('Yes') ?> 139 139 <input type='radio' style='width:20px;' name='blog[deleted]' value='0' <?php if( $details['deleted'] == '0' ) echo 'checked="checked"'; ?> /> <?php _e('No') ?> 140 </td> 141 </tr> 140 </td> 141 </tr> 142 142 </table> 143 143 <p class="submit" style="margin:-15px 0 -5px 230px;"><input type="submit" name="Submit" value="<?php esc_attr_e('Update Options') ?>" /></p> 144 144 </div></div> 145 145 146 146 <div id="blogedit_blogoptions" class="postbox " > 147 147 <h3 class='hndle'><span><?php printf( __('Blog options (wp_%s_options)'), $id ); ?></span></h3> … … 166 166 ?> 167 167 <tr class="form-field"> 168 <th scope="row"><?php echo ucwords( str_replace( "_", " ", $val['option_name'] ) ) ?></th> 168 <th scope="row"><?php echo ucwords( str_replace( "_", " ", $val['option_name'] ) ) ?></th> 169 169 <td><textarea rows="5" cols="40" name="option[<?php echo $val['option_name'] ?>]" type="text" id="<?php echo $val['option_name'] ?>"<?php echo $disabled ?>><?php echo wp_specialchars( stripslashes( $val['option_value'] ), 1 ) ?></textarea></td> 170 170 </tr> … … 173 173 ?> 174 174 <tr class="form-field"> 175 <th scope="row"><?php echo ucwords( str_replace( "_", " ", $val['option_name'] ) ) ?></th> 176 <td><input name="option[<?php echo $val['option_name'] ?>]" type="text" id="<?php echo $val['option_name'] ?>" value="<?php echo esc_attr( stripslashes( $val['option_value'] ), 1 ) ?>" size="40" <?php echo $disabled ?> /></td> 177 </tr> 175 <th scope="row"><?php echo ucwords( str_replace( "_", " ", $val['option_name'] ) ) ?></th> 176 <td><input name="option[<?php echo $val['option_name'] ?>]" type="text" id="<?php echo $val['option_name'] ?>" value="<?php echo esc_attr( stripslashes( $val['option_value'] ), 1 ) ?>" size="40" <?php echo $disabled ?> /></td> 177 </tr> 178 178 <?php 179 179 } … … 184 184 </div></div> 185 185 </div> 186 186 187 187 <div class='metabox-holder' style='width:49%;float:right;'> 188 188 <?php … … 200 200 $checked = ( isset($blog_allowed_themes[ $theme_key ]) ) ? 'checked="checked"' : ''; 201 201 $out .= '<tr class="form-field form-required"> 202 <th title="'.htmlspecialchars( $theme["Description"] ).'" scope="row">'.$key.'</th> 203 <td><input name="theme['.$theme_key.']" type="checkbox" style="width:20px;" value="on" '.$checked.'/>' . __( 'Active' ) . '</td> 202 <th title="'.htmlspecialchars( $theme["Description"] ).'" scope="row">'.$key.'</th> 203 <td><input name="theme['.$theme_key.']" type="checkbox" style="width:20px;" value="on" '.$checked.'/>' . __( 'Active' ) . '</td> 204 204 </tr>'; 205 205 } 206 206 } 207 207 208 208 if ( $out != '' ) { 209 209 ?> … … 218 218 </div></div> 219 219 <?php } ?> 220 220 221 221 <?php 222 222 // Blog users … … 237 237 ?> 238 238 <td> 239 <select name="role[<?php echo $val->user_id ?>]" id="new_role"><?php 239 <select name="role[<?php echo $val->user_id ?>]" id="new_role"><?php 240 240 foreach( $editblog_roles as $role => $role_assoc ){ 241 241 $name = translate_with_context($role_assoc['name']); … … 261 261 } 262 262 ?> 263 263 264 264 <div id="blogedit_blogadduser" class="postbox"> 265 265 <h3 class='hndle'><span><?php _e('Add a new user'); ?></span></h3> … … 275 275 <td> 276 276 <select name="new_role" id="new_role"> 277 <?php 277 <?php 278 278 reset( $editblog_roles ); 279 279 foreach( $editblog_roles as $role => $role_assoc ){ … … 289 289 <p class="submit" style="margin:-15px 0 -5px 230px;"><input type="submit" name="Submit" value="<?php esc_attr_e('Update Options') ?>" /></p> 290 290 </div></div> 291 291 292 292 <div id="blogedit_miscoptions" class="postbox"> 293 293 <h3 class='hndle'><span><?php _e('Misc Blog Actions') ?></span></h3> … … 298 298 <p class="submit" style="margin:-15px 0 -5px 230px;"><input type="submit" name="Submit" value="<?php esc_attr_e('Update Options') ?>" /></p> 299 299 </div></div> 300 300 301 301 </div> 302 302 303 303 <div style="clear:both;"></div> 304 304 </form> … … 325 325 AND {$wpdb->blogs}.blog_id = {$wpdb->registration_log}.blog_id 326 326 AND {$wpdb->registration_log}.IP LIKE ('%{$s}%')"; 327 } 327 } 328 328 329 329 if( isset( $_GET['sortby'] ) == false ) { … … 408 408 'users' => __('Users') 409 409 ); 410 410 411 411 if( has_filter( 'wpmublogsaction' ) ) 412 412 $posts_columns['plugins'] = __('Actions'); 413 413 414 414 $posts_columns = apply_filters('wpmu_blogs_columns', $posts_columns); 415 415 … … 428 428 <?php foreach($posts_columns as $column_id => $column_display_name) { 429 429 $column_link = "<a href='ms-blogs.php?{$sortby_url}&sortby={$column_id}&"; 430 if( $_GET['sortby'] == $column_id ) { 430 if( $_GET['sortby'] == $column_id ) { 431 431 $column_link .= $_GET[ 'order' ] == 'DESC' ? 'order=ASC&' : 'order=DESC&'; 432 432 } … … 444 444 $bgcolor = $class = ''; 445 445 $status_list = array( "archived" => "#fee", "spam" => "#faa", "deleted" => "#f55" ); 446 foreach ($blog_list as $blog) { 446 foreach ($blog_list as $blog) { 447 447 $class = ('alternate' == $class) ? '' : 'alternate'; 448 448 reset( $status_list ); … … 456 456 echo "<tr $bgcolour class='$class'>"; 457 457 458 $blogname = ( constant( "VHOST" ) == 'yes' ) ? str_replace('.'.$current_site->domain, '', $blog['domain']) : $blog['path']; 458 $blogname = ( constant( "VHOST" ) == 'yes' ) ? str_replace('.'.$current_site->domain, '', $blog['domain']) : $blog['path']; 459 459 foreach( $posts_columns as $column_name=>$column_display_name ) { 460 460 switch($column_name) { … … 468 468 <?php 469 469 break; 470 470 471 471 case 'blogname': ?> 472 472 <td valign="top"> … … 477 477 $controlActions[] = '<a href="ms-blogs.php?action=editblog&id=' . $blog['blog_id'] . '" class="edit">' . __('Edit') . '</a>'; 478 478 $controlActions[] = "<a href='{$protocol}{$blog['domain']}{$blog['path']}wp-admin/' class='edit'>" . __('Backend') . '</a>'; 479 479 480 480 if( get_blog_status( $blog['blog_id'], "deleted" ) == '1' ) 481 481 $controlActions[] = '<a class="delete" href="ms-edit.php?action=confirm&action2=activateblog&ref=' . urlencode( $_SERVER['REQUEST_URI'] ) . '&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to activate the blog %s" ), $blogname ) ) . '">' . __('Activate') . '</a>'; 482 482 else 483 483 $controlActions[] = '<a class="delete" href="ms-edit.php?action=confirm&action2=deactivateblog&ref=' . urlencode( $_SERVER['REQUEST_URI'] ) . '&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to deactivate the blog %s" ), $blogname ) ) . '">' . __('Deactivate') . '</a>'; 484 484 485 485 if( get_blog_status( $blog['blog_id'], "archived" ) == '1' ) 486 486 $controlActions[] = '<a class="delete" href="ms-edit.php?action=confirm&action2=unarchiveblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to unarchive the blog %s" ), $blogname ) ) . '">' . __('Unarchive') . '</a>'; 487 487 else 488 488 $controlActions[] = '<a class="delete" href="ms-edit.php?action=confirm&action2=archiveblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to archive the blog %s" ), $blogname ) ) . '">' . __('Archive') . '</a>'; 489 489 490 490 if( get_blog_status( $blog['blog_id'], "spam" ) == '1' ) 491 491 $controlActions[] = '<a class="delete" href="ms-edit.php?action=confirm&action2=unspamblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to unspam the blog %s" ), $blogname ) ) . '">' . __('Not Spam') . '</a>'; 492 492 else 493 493 $controlActions[] = '<a class="delete" href="ms-edit.php?action=confirm&action2=spamblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to mark the blog %s as spam" ), $blogname ) ) . '">' . __("Spam") . '</a>'; 494 494 495 495 $controlActions[] = '<a class="delete" href="ms-edit.php?action=confirm&action2=deleteblog&id=' . $blog['blog_id'] . '&msg=' . urlencode( sprintf( __( "You are about to delete the blog %s" ), $blogname ) ) . '">' . __("Delete") . '</a>'; 496 496 497 497 $controlActions[] = "<a href='http://{$blog['domain']}{$blog['path']}' rel='permalink'>" . __('Visit') . '</a>'; 498 498 ?> 499 499 500 500 <?php if (count($controlActions)) : ?> 501 501 <div class="row-actions"> … … 506 506 <?php 507 507 break; 508 508 509 509 case 'lastupdated': ?> 510 510 <td valign="top"> … … 523 523 <td valign="top"> 524 524 <?php 525 $blogusers = get_users_of_blog( $blog['blog_id'] ); 525 $blogusers = get_users_of_blog( $blog['blog_id'] ); 526 526 if ( is_array( $blogusers ) ) { 527 527 $blogusers_warning = ''; … … 531 531 } 532 532 foreach ( $blogusers as $key => $val ) { 533 echo '<a href="user-edit.php?user_id=' . $val->user_id . '">' . $val->user_login . '</a> ('.$val->user_email.')<br />'; 533 echo '<a href="user-edit.php?user_id=' . $val->user_id . '">' . $val->user_login . '</a> ('.$val->user_email.')<br />'; 534 534 } 535 535 if( $blogusers_warning != '' ) { … … 549 549 <?php } ?> 550 550 <?php break; 551 551 552 552 default: ?> 553 553 <?php if( has_filter( 'manage_blogs_custom_column' ) ) { ?> … … 564 564 } 565 565 } else { ?> 566 <tr style='background-color: <?php echo $bgcolor; ?>'> 567 <td colspan="8"><?php _e('No blogs found.') ?></td> 568 </tr> 566 <tr style='background-color: <?php echo $bgcolor; ?>'> 567 <td colspan="8"><?php _e('No blogs found.') ?></td> 568 </tr> 569 569 <?php 570 570 } // end if ($blogs) … … 586 586 <td> 587 587 <?php if ( constant( "VHOST" ) == 'yes' ) { ?> 588 <input name="blog[domain]" type="text" title="<?php _e('Domain') ?>"/>.<?php echo $current_site->domain;?> 588 <input name="blog[domain]" type="text" title="<?php _e('Domain') ?>"/>.<?php echo $current_site->domain;?> 589 589 <?php } else { 590 590 echo $current_site->domain . $current_site->path ?><input name="blog[domain]" type="text" title="<?php _e('Domain') ?>"/> 591 <?php } 591 <?php } 592 592 echo "<p>" . __( 'Only the characters a-z and 0-9 recommended.' ) . "</p>"; 593 593 ?>
Note: See TracChangeset
for help on using the changeset viewer.