cvs: pearweb /public_html account-info.php
| From: | Daniel Convissor | Date: | Wed, 16 Jun 2004 23:53:25 +0000 |
| Subject: | cvs: pearweb /public_html account-info.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-20781@lists.php.net to get a copy of this message | ||
danielc Wed Jun 16 19:53:25 2004 EDT
Modified files:
/pearweb/public_html account-info.php
Log:
* Improve width and readability by putting "Details" in one row,
then "Maintains" and "Notes" in another.
* Put edit link in bottom cell of details box, the one with the
RSS link in it.
* Do strtolower at top rather than down in code.
* Tabs to spaces.
* /** to /* on block that isn't documentable.
* Capitalization of titles.
http://cvs.php.net/diff.php/pearweb/public_html/account-info.php?r1=1.26&r2=1.27&ty=u
Index: pearweb/public_html/account-info.php
diff -u pearweb/public_html/account-info.php:1.26 pearweb/public_html/account-info.php:1.27
--- pearweb/public_html/account-info.php:1.26 Wed Jun 9 02:05:00 2004
+++ pearweb/public_html/account-info.php Wed Jun 16 19:53:25 2004
@@ -15,7 +15,7 @@
+----------------------------------------------------------------------+
| Authors: |
+----------------------------------------------------------------------+
- $Id: account-info.php,v 1.26 2004/06/09 06:05:00 danielc Exp $
+ $Id: account-info.php,v 1.27 2004/06/16 23:53:25 danielc Exp $
*/
/**
@@ -27,9 +27,9 @@
$params = array("handle" => "");
$site->getElements($params);
-$handle = $params['handle'];
+$handle = strtolower($params['handle']);
-/**
+/*
* Redirect to the accounts list if no handle was specified
*/
if (empty($handle)) {
@@ -49,7 +49,7 @@
print "<h1>" . $row['name'] . "</h1>\n";
print "<table border=\"0\" cellspacing=\"4\"
cellpadding=\"0\">\n";
-print "<tr><td valign=\"top\">\n";
+print ' <tr><td valign="top" colspan="2">' .
"\n\n";
$bb = new BorderBox("Account Details", "100%", "", 2, true);
$bb->horizHeadRow("Handle:", $handle);
@@ -64,24 +64,29 @@
'&op=get', $row['pgpkeyid']));
}
if ($row['homepage'] != "") {
- $bb->horizHeadRow("Homepage:",
- "<a href=\"$row[homepage]\" target=\"_blank\">".
- "$row[homepage]</a>");
+ $bb->horizHeadRow("Homepage:",
+ "<a href=\"$row[homepage]\"
target=\"_blank\">".
+ "$row[homepage]</a>");
}
-$bb->horizHeadRow("Registered since:", $row['created']);
+$bb->horizHeadRow('Registered Since:', $row['created']);
+
if ($row['userinfo'] != "") {
- $bb->horizHeadRow("Additional information:", empty($row['userinfo']) ?
" " : stripslashes($row['userinfo']));
+ $bb->horizHeadRow('Additional Information:', empty($row['userinfo']) ?
' ' : stripslashes($row['userinfo']));
}
if ($row['wishlist'] != "") {
$bb->horizHeadRow("Wishlist:", make_link("/wishlist.php/" .
$row['handle'], "Click here to be redirected."));
}
-$bb->fullRow("Get the " . make_link("/feeds/user_" . strtolower($handle) .
".rss", "RSS feed"));
+$bb->fullRow(make_link('/account-edit.php?handle=' . $handle,
+ make_image('edit.gif', 'Edit', 'right')) .
+ 'Get the ' .
+ make_link('/feeds/user_' . $handle . '.rss', 'RSS
feed'));
+
$bb->end();
-print "</td><td valign=\"top\">\n";
+print '</td></tr><tr><td valign="top">' .
"\n";
$query = "SELECT p.id, p.name, m.role
FROM packages p, maintains m
@@ -90,23 +95,21 @@
ORDER BY p.name";
$maintained_pkg = $dbh->getAll($query, array($handle), DB_FETCHMODE_ASSOC);
-$bb = new BorderBox("Maintaining These Packages:", "100%", "", 2,
true);
+$bb = new BorderBox('Maintains These Packages', '100%', '', 2, true);
if (count($maintained_pkg) > 0) {
$bb->headRow("Package Name", "Role");
foreach ($maintained_pkg as $row) {
- $bb->plainRow("<a href=\"/package/" . $row['name'] .
"\">" . $row['name'] . "</a>",
- $row['role']);
+ $bb->plainRow("<a href=\"/package/" . $row['name'] .
"\">" . $row['name'] . "</a>",
+ $row['role']);
}
}
$bb->end();
-print "<br />\n";
+print '</td><td valign="top">' . "\n";
display_user_notes($handle, "100%");
-
-print "<br /><a href=\"/account-edit.php?handle=$handle\">".
make_image("edit.gif", "Edit") . "</a>";
print "</td></tr></table>\n";