cvs: pearweb /public_html account-info.php
| From: | Martin Jansen | Date: | Thu, 01 Jul 2004 09:24:29 +0000 |
| Subject: | cvs: pearweb /public_html account-info.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-21341@lists.php.net to get a copy of this message | ||
mj Thu Jul 1 05:24:29 2004 EDT
Modified files:
/pearweb/public_html account-info.php
Log:
* Added tabbed navigation bar to the top of the user information page
which contains links to editing the account information and changing
the password.
The bar is only visible if the user is logged in to the website and is
either an administrator or is viewing their own information page.
http://cvs.php.net/diff.php/pearweb/public_html/account-info.php?r1=1.32&r2=1.33&ty=u
Index: pearweb/public_html/account-info.php
diff -u pearweb/public_html/account-info.php:1.32 pearweb/public_html/account-info.php:1.33
--- pearweb/public_html/account-info.php:1.32 Thu Jul 1 05:13:58 2004
+++ pearweb/public_html/account-info.php Thu Jul 1 05:24:29 2004
@@ -15,7 +15,7 @@
+----------------------------------------------------------------------+
| Authors: |
+----------------------------------------------------------------------+
- $Id: account-info.php,v 1.32 2004/07/01 09:13:58 mj Exp $
+ $Id: account-info.php,v 1.33 2004/07/01 09:24:29 mj Exp $
*/
/**
@@ -50,6 +50,32 @@
echo '<h1>User Information: ' . $handle . "</h1>\n";
+if (isset($auth_user) && is_object($auth_user)
+ && ($auth_user->handle == $handle ||
+ auth_check('pear.admin'))) {
+
+ $nav_items = array('Edit user' => array('url' =>
'/account-edit.php?handle=' . $handle,
+ 'title' => 'Edit user standing
data.'),
+ 'Change password' => array('url' =>
'/account-edit.php?handle=' . $handle . '#password',
+ 'title' => 'Change your
password.')
+ );
+
+ print '<div id="nav">';
+
+ foreach ($nav_items as $title => $item) {
+ if (!empty($item['url']) && $item['url']{0} == '/') {
+ $url = $item['url'];
+ } else {
+ $url = '/package/' . $name . '/' . $item['url'];
+ }
+ print '<a href="' . $url . '"'
+ . ' title="' . $item['title'] . '"> '
+ . $title
+ . '</a>';
+ }
+
+ print '</div>';
+}
?>
<table border="0" cellspacing="0" cellpadding="2"
style="width: 100%">