Changeset 44 for trunk/wp-admin/b2team.php
- Timestamp:
- 05/23/2003 08:29:51 AM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/b2team.php
r38 r44 1 1 <?php 2 $title = "Team management";2 $title = 'Team management'; 3 3 /* <Team> */ 4 4 … … 21 21 switch ($action) { 22 22 23 case "promote":23 case 'promote': 24 24 25 25 $standalone = 1; 26 require_once( "./b2header.php");26 require_once('b2header.php'); 27 27 28 28 if (empty($HTTP_GET_VARS["prom"])) { 29 header( "Location: b2team.php");29 header('Location: b2team.php'); 30 30 } 31 31 … … 33 33 $prom = $HTTP_GET_VARS["prom"]; 34 34 35 $user_data =get_userdata($id);36 $usertopromote_level =$user_data[13];35 $user_data = get_userdata($id); 36 $usertopromote_level = $user_data[13]; 37 37 38 38 if ($user_level <= $usertopromote_level) { 39 die( "Can't change the level of an user whose level is higher than yours.");40 } 41 42 if ( $prom == "up") {39 die('Can’t change the level of an user whose level is higher than yours.'); 40 } 41 42 if ('up' == $prom) { 43 43 $sql="UPDATE $tableusers SET user_level=user_level+1 WHERE ID = $id"; 44 } elseif ( $prom == "down") {44 } elseif ('down' == $prom) { 45 45 $sql="UPDATE $tableusers SET user_level=user_level-1 WHERE ID = $id"; 46 46 } 47 $result =mysql_query($sql) or die("Couldn't change $id's level.");48 49 header( "Location: b2team.php");47 $result = mysql_query($sql) or die("Couldn't change $id's level."); 48 49 header('Location: b2team.php'); 50 50 51 51 break; 52 52 53 case "delete":53 case 'delete': 54 54 55 55 $standalone = 1; 56 require_once( "./b2header.php");56 require_once('b2header.php'); 57 57 58 58 $id = $HTTP_GET_VARS["id"]; 59 59 60 60 if (!$id) { 61 header( "Location: b2team.php");62 } 63 64 $user_data =get_userdata($id);65 $usertodelete_level =$user_data[13];61 header('Location: b2team.php'); 62 } 63 64 $user_data = get_userdata($id); 65 $usertodelete_level = $user_data[13]; 66 66 67 67 if ($user_level <= $usertodelete_level) 68 die("Can't delete an user whose level is higher than yours.");68 die('Can’t delete an user whose level is higher than yours.'); 69 69 70 70 $sql="DELETE FROM $tableusers WHERE ID = $id"; 71 $result =mysql_query($sql) or die("Couldn't delete user #$id.");71 $result = mysql_query($sql) or die("Couldn’t delete user #$id."); 72 72 73 73 $sql="DELETE FROM $tableposts WHERE post_author = $id"; 74 $result =mysql_query($sql) or die("Couldn't delete user #$id's posts.");75 76 header( "Location: b2team.php");74 $result = mysql_query($sql) or die("Couldn’t delete user #$id’s posts."); 75 76 header('Location: b2team.php'); 77 77 78 78 break; … … 80 80 default: 81 81 82 $standalone =0;83 include ( "./b2header.php");82 $standalone = 0; 83 include ('b2header.php'); 84 84 ?> 85 <?php echo $blankline.$tabletop ?> 86 <table cellspacing="0" cellpadding="5" border="0" width="100%"> 87 <tr> 88 <td>Click on an user's login name to see his/her complete Profile.<br /> 89 To edit your Profile, click on your login name.</td> 90 </tr> 91 </table> 92 <?php echo $tablebottom ?> 93 <br /> 94 <?php echo $tabletop ?> 95 <p><b>Active users</b> 85 86 <div class="wrap"><p>Click on an user’s login name to see his complete profile.<br /> 87 To edit your profile, click on your login name.</p> 88 </div> 89 90 <div class="wrap"> 91 <h3>Active users</h3> 96 92 <table cellpadding="5" cellspacing="0"> 97 93 <tr> … … 107 103 </tr> 108 104 <?php 109 $request = " 105 $request = "SELECT * FROM $tableusers WHERE user_level>0 ORDER BY ID"; 110 106 $result = mysql_query($request); 111 107 while($row = mysql_fetch_object($result)) { … … 139 135 140 136 </table> 141 </p> 142 <?php echo $tablebottom ?> 137 138 </div> 139 143 140 <?php 144 141 $request = " SELECT * FROM $tableusers WHERE user_level=0 ORDER BY ID"; … … 146 143 if (mysql_num_rows($result)) { 147 144 ?> 148 <br /> 149 <?php echo $tabletop ?> 150 <p><b>Inactive users (level 0)</b> 145 <div class="wrap"> 146 <h3>Inactive users (level 0)</h3> 151 147 <table cellpadding="5" cellspacing="0"> 152 148 <tr> … … 192 188 193 189 </table> 194 </p> 195 <?php echo $tablebottom ?> 190 </div> 196 191 197 192 <?php 198 193 } 199 194 if ($user_level >= 3) { ?> 200 <br /> 201 <?php echo $tabletop ?>202 To delete an user, bring his/her level to zero, then click on the red cross.<br /> 203 <b>Warning:</b> deleting an user also deletes all posts made by this user. 204 < ?php echo $tablebottom ?>195 <div class="wrap"> 196 <p>To delete an user, bring his level to zero, then click on the red X.<br /> 197 <strong>Warning:</strong> deleting an user also deletes all posts made by this user. 198 </p> 199 </div> 205 200 <?php 206 201 } … … 210 205 211 206 /* </Team> */ 212 include("b2footer.php") ?> 207 include('b2footer.php'); 208 ?>
Note: See TracChangeset
for help on using the changeset viewer.