Changeset 1165 for trunk/wp-admin/users.php
- Timestamp:
- 04/25/2004 04:24:06 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/users.php
r1108 r1165 1 1 <?php 2 $title = 'Users'; 2 require_once('../wp-includes/wp-l10n.php'); 3 4 $title = __('Users'); 3 5 /* <Team> */ 4 6 … … 36 38 /* checking login has been typed */ 37 39 if ($user_login == '') { 38 die ( '<strong>ERROR</strong>: Please enter a login.');40 die (__('<strong>ERROR</strong>: Please enter a login.')); 39 41 } 40 42 41 43 /* checking the password has been typed twice */ 42 44 if ($pass1 == '' || $pass2 == '') { 43 die ( '<strong>ERROR</strong>: Please enter your password twice.');45 die (__('<strong>ERROR</strong>: Please enter your password twice.')); 44 46 } 45 47 46 48 /* checking the password has been typed twice the same */ 47 49 if ($pass1 != $pass2) { 48 die ( '<strong>ERROR</strong>: Please type the same password in the two password fields.');50 die (__('<strong>ERROR</strong>: Please type the same password in the two password fields.')); 49 51 } 50 52 $user_nickname = $user_login; … … 52 54 /* checking e-mail address */ 53 55 if ($user_email == '') { 54 die ( '<strong>ERROR</strong>: Please type your e-mail address.');56 die (__('<strong>ERROR</strong>: Please type your e-mail address.')); 55 57 } else if (!is_email($user_email)) { 56 die ( '<strong>ERROR</strong>: The email address isn’t correct.');58 die (__('<strong>ERROR</strong>: The email address isn’t correct.')); 57 59 } 58 60 … … 60 62 $loginthere = $wpdb->get_var("SELECT user_login FROM $tableusers WHERE user_login = '$user_login'"); 61 63 if ($loginthere) { 62 die ( '<strong>ERROR</strong>: This login is already registered, please choose another one.');64 die (__('<strong>ERROR</strong>: This login is already registered, please choose another one.')); 63 65 } 64 66 … … 79 81 80 82 if ($result == false) { 81 die ( '<strong>ERROR</strong>: Couldn’t register you!');83 die (__('<strong>ERROR</strong>: Couldn’t register you!')); 82 84 } 83 85 … … 110 112 111 113 if ($user_level <= $usertopromote_level) { 112 die( 'Can’t change the level of a user whose level is higher than yours.');114 die(__('Can’t change the level of a user whose level is higher than yours.')); 113 115 } 114 116 … … 141 143 142 144 if ($user_level <= $usertodelete_level) 143 die( 'Can’t delete a user whose level is higher than yours.');145 die(__('Can’t delete a user whose level is higher than yours.')); 144 146 145 147 $post_ids = $wpdb->get_col("SELECT ID FROM $tableposts WHERE post_author = $id"); … … 169 171 ?> 170 172 <?php if ($_GET['deleted']) : ?> 171 <div class="updated"><p> User deleted.</p></div>173 <div class="updated"><p><?php _e('User deleted.') ?></p></div> 172 174 <?php endif; ?> 173 175 <div class="wrap"> 174 <h2> Authors</h2>176 <h2><?php _e('Authors') ?></h2> 175 177 <table cellpadding="3" cellspacing="3" width="100%"> 176 178 <tr> 177 <th> ID</th>178 <th> Nickname</th>179 <th> Name</th>180 <th> E-mail</th>181 <th> URI</th>182 <th> Level</th>183 <th> Posts</th>179 <th><?php _e('ID') ?></th> 180 <th><?php _e('Nickname') ?></th> 181 <th><?php _e('Name') ?></th> 182 <th><?php _e('E-mail') ?></th> 183 <th><?php _e('URI') ?></th> 184 <th><?php _e('Level') ?></th> 185 <th><?php _e('Posts') ?></th> 184 186 </tr> 185 187 <?php … … 197 199 $style = ('class="alternate"' == $style) ? '' : 'class="alternate"'; 198 200 $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $tableposts WHERE post_author = $user->ID and post_status = 'publish'"); 199 if (0 < $numposts) $numposts = "<a href='edit.php?author=$user_data->ID' title=' View posts'>$numposts</a>";201 if (0 < $numposts) $numposts = "<a href='edit.php?author=$user_data->ID' title='" . __('View posts') . "'>$numposts</a>"; 200 202 echo " 201 203 <tr $style> … … 203 205 <td><strong>$user_data->user_nickname</strong></td> 204 206 <td>$user_data->user_firstname $user_data->user_lastname</td> 205 <td><a href='mailto:$email' title=' e-mail: $email'>$email</a></td>207 <td><a href='mailto:$email' title='" . sprintf(__('e-mail: %s'), $email) . "'>$email</a></td> 206 208 <td><a href='$url' title='website: $url'>$short_url</a></td> 207 209 <td align='center'>"; … … 225 227 ?> 226 228 <div class="wrap"> 227 <h2> Users</h2>229 <h2><?php _e('Users') ?></h2> 228 230 <table cellpadding="3" cellspacing="3" width="100%"> 229 231 <tr> 230 <th> ID</th>231 <th> Nickname</th>232 <th> Name</th>233 <th> E-mail</th>234 <th> URI</th>235 <th> Level</th>232 <th><?php _e('ID') ?></th> 233 <th><?php _e('Nickname') ?></th> 234 <th><?php _e('Name') ?></th> 235 <th><?php _e('E-mail') ?></th> 236 <th><?php _e('URI') ?></th> 237 <th><?php _e('Level') ?></th> 236 238 </tr> 237 239 <?php … … 251 253 <td><strong>$user_data->user_nickname</td> 252 254 <td>$user_data->user_firstname $user_data->user_lastname</td> 253 <td><a href='mailto:$email' title=' e-mail: $email'>$email</a></td>255 <td><a href='mailto:$email' title='" . sprintf(__('e-mail: %s'), $email) . "'>$email</a></td> 254 256 <td><a href='$url' title='website: $url'>$short_url</a></td> 255 257 <td align='center'>"; … … 264 266 265 267 </table> 266 <p>To delete a user, bring his level to zero, then click on the red X.<br /> 267 <strong>Warning:</strong> deleting a user also deletes all posts made by this user. 268 </p> 268 <?php _e('<p>To delete a user, bring his level to zero, then click on the red X.<br /> 269 <strong>Warning:</strong> deleting a user also deletes all posts made by this user.</p>') ?> 269 270 </div> 270 271 … … 272 273 } ?> 273 274 <div class="wrap"> 274 <h2> Add User</h2>275 < p>Users can <a href="<?php echo get_settings('siteurl'); ?>/wp-register.php">register themselves</a> or you can manually create users here.</p>275 <h2><?php _e('Add User') ?></h2> 276 <?php printf(__('<p>Users can <a href="%s/wp-register.php">register themselves</a> or you can manually create users here.</p>'), get_settings('siteurl')); ?> 276 277 <form action="" method="post" name="adduser" id="adduser"> 277 278 <table border="0" cellspacing="5" cellpadding="3"> 278 279 <tr> 279 <th scope="row"> Nickname280 <th scope="row"><?php _e('Nickname') ?> 280 281 <input name="action" type="hidden" id="action" value="adduser" /></th> 281 282 <td><input name="user_login" type="text" id="user_login" /></td> 282 283 </tr> 283 284 <tr> 284 <th scope="row"> First Name</th>285 <th scope="row"><?php _e('First Name') ?> </th> 285 286 <td><input name="firstname" type="text" id="firstname" /></td> 286 287 </tr> 287 288 <tr> 288 <th scope="row"> Last Name</th>289 <th scope="row"><?php _e('Last Name') ?> </th> 289 290 <td><input name="lastname" type="text" id="lastname" /></td> 290 291 </tr> 291 292 <tr> 292 <th scope="row"> Email</th>293 <th scope="row"><?php _e('Email') ?></th> 293 294 <td><input name="email" type="text" id="email" /></td> 294 295 </tr> 295 296 <tr> 296 <th scope="row"> URI</th>297 <th scope="row"><?php _e('URI') ?></th> 297 298 <td><input name="uri" type="text" id="uri" /></td> 298 299 </tr> 299 300 <tr> 300 <th scope="row"> Password (twice)</th>301 <th scope="row"><?php _e('Password (twice)') ?> </th> 301 302 <td><input name="pass1" type="password" id="pass1" /> 302 303 <br /> … … 305 306 </table> 306 307 <p> 307 <input name="adduser" type="submit" id="adduser" value=" Add User">308 <input name="adduser" type="submit" id="adduser" value="<?php _e('Add User') ?>"> 308 309 </p> 309 310 </form>
Note: See TracChangeset
for help on using the changeset viewer.