cvs: php-master-web /manage users.php
| From: | Rasmus Lerdorf | Date: | Sat, 03 May 2003 08:53:12 +0000 |
| Subject: | cvs: php-master-web /manage users.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-17240@lists.php.net to get a copy of this message | ||
rasmus Sat May 3 04:53:12 2003 EDT
Modified files:
/php-master-web/manage users.php
Log:
Add a verified checkbox and the ability for users to add notes. This is
preparation for doing a cvs account cleanup of stale accounts.
Index: php-master-web/manage/users.php
diff -u php-master-web/manage/users.php:1.27 php-master-web/manage/users.php:1.28
--- php-master-web/manage/users.php:1.27 Fri May 10 15:21:14 2002
+++ php-master-web/manage/users.php Sat May 3 04:53:12 2003
@@ -111,6 +111,7 @@
}
$cvsaccess = $in[cvsaccess] ? 1 : 0;
$spamprotect = $in[spamprotect] ? 1 : 0;
+ $verified = $in[verified] ? 1 : 0;
if ($id) {
# update main table data
@@ -120,8 +121,14 @@
. ((is_admin($user) && $in[username]) ?
",username='$in[username]'" : "")
. (is_admin($user) ? ",cvsaccess=$cvsaccess" : "")
. ",spamprotect=$spamprotect"
+ . ",verified=$verified"
. " WHERE userid=$id";
query($query);
+ if(strlen($in['purpose'])) {
+ $purpose = addslashes($in['purpose']);
+ $query = "INSERT INTO users_note (userid, note, entered) VALUES ($id,
'$purpose', NOW())";
+ query($query);
+ }
}
warn("record $id updated");
@@ -132,7 +139,8 @@
. ($in[username] ? ",username='$in[username]'" : "")
. ($in[passwd] ? ",passwd='$in[passwd]'" : "")
. (is_admin($user) ? ",cvsaccess=$cvsaccess" : "")
- . ",spamprotect=$spamprotect";
+ . ",spamprotect=$spamprotect"
+ . ",verified=$verified";
query($query);
$nid = mysql_insert_id();
@@ -196,7 +204,15 @@
<td><input type="checkbox" name="in[spamprotect]"<?php echo
$row[spamprotect] ? " checked" : "";?> /></td>
</tr>
<tr>
- <td><input type="submit" value="<?php echo $id ? "Change" :
"Add";?>" />
+ <th align="right">Verified?</th>
+ <td><input type="checkbox" name="in[verified]"<?php echo
$row[verified] ? " checked" : "";?> /></td>
+</tr>
+<tr>
+ <th align="right">Add Note: </th>
+ <td><textarea cols="50" rows="5"
name="in[purpose]"></textarea></td>
+</tr>
+<tr>
+ <td><input type="submit" value="<?php echo $id ? "Update" :
"Add";?>" />
</tr>
</form>
<?php if (is_admin($user) && !$row[cvsaccess]) {?>