cvs: pearweb /public_html admin.php

From: Date: Wed, 02 Oct 2002 22:03:30 +0000
Subject: cvs: pearweb /public_html admin.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-6819@lists.php.net to get a copy of this message
mj Wed Oct 2 18:03:30 2002 EDT Modified files: /pearweb/public_html admin.php Log: * Make list of outstanding account requests a bit more readable. Index: pearweb/public_html/admin.php diff -u pearweb/public_html/admin.php:1.18 pearweb/public_html/admin.php:1.19 --- pearweb/public_html/admin.php:1.18 Sun Jun 9 18:48:50 2002 +++ pearweb/public_html/admin.php Wed Oct 2 18:03:30 2002 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: admin.php,v 1.18 2002/06/09 22:48:50 richard Exp $ + $Id: admin.php,v 1.19 2002/10/02 22:03:30 mj Exp $ */ auth_require(true); @@ -218,14 +218,24 @@ // {{{ admin menu } else { - $bb = new BorderBox("Account Requests", "30%"); - $requests = $dbh->getAssoc("SELECT handle,name,email FROM users ". - "WHERE registered = 0"); + $bb = new BorderBox("Account Requests", "50%", "", 4, true); + $requests = $dbh->getAssoc("SELECT u.handle,u.name,n.note FROM users u ". + "LEFT JOIN notes n ON n.uid = u.handle ". + "WHERE u.registered = 0"); if (is_array($requests) && sizeof($requests) > 0) { + $bb->headRow("Name", "Handle", "Status", "&nbsp;"); + foreach ($requests as $handle => $data) { - list($name, $email) = $data; - print "<a href=\"" . $_SERVER['PHP_SELF'] . "?acreq=$handle\">$name ($handle)</a><br />\n"; + list($name, $note) = $data; + $rejected = (preg_match("/^Account rejected:/", $note)); + + $bb->plainRow($name, + $handle, + ($rejected ? "rejected" : "<font color=\"#FF0000\">open</font>"), + "<a href=\"" . $_SERVER['PHP_SELF'] . "?acreq=$handle\">" . make_image("edit.gif") . "</a>" + ); } + } else { print "No account requests."; }

« previous php.pear.cvs (#6819) next »