[Openfirst-cvscommit] members auth.php,1.2,1.3 index.php,1.3,1.4 sqlinstall.php,1.1,1.2
Brought to you by:
xtimg
From: <xt...@us...> - 2003-05-24 18:33:47
|
Update of /cvsroot/openfirst/members In directory sc8-pr-cvs1:/tmp/cvs-serv23151 Modified Files: auth.php index.php sqlinstall.php Log Message: Update members area to have common menu. Index: auth.php =================================================================== RCS file: /cvsroot/openfirst/members/auth.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** auth.php 11 May 2003 22:15:05 -0000 1.2 --- auth.php 24 May 2003 18:33:43 -0000 1.3 *************** *** 43,46 **** --- 43,56 ---- } + function membersmenu($membertype) { + echo("<p><a href='index.php'>Members Home</a> "); + if($membertype == "administrator") { + echo("<a href='sqlinstall.php'>Install SQL Tables</a> + <a href='adduser.php'>Add User</a>"); + } + echo("</p>"); + return(0); + } + function showlogin () { echo("<form action='".$_SERVER["PHP_SELF"] . "' method='post'> *************** *** 90,94 **** echo("<p>Members table does not exist, therefore I am creating it.</p>"); $query = mysql_query("CREATE TABLE ofirst_members ( ! user TEXT, firstname TINYTEXT, lastname TINYTEXT, --- 100,105 ---- echo("<p>Members table does not exist, therefore I am creating it.</p>"); $query = mysql_query("CREATE TABLE ofirst_members ( ! UNIQUE(user), ! user CHAR(128), firstname TINYTEXT, lastname TINYTEXT, *************** *** 126,130 **** } } - // $msg = mysql_fetch_object($query); ?> --- 137,140 ---- Index: index.php =================================================================== RCS file: /cvsroot/openfirst/members/index.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index.php 11 May 2003 23:53:44 -0000 1.3 --- index.php 24 May 2003 18:33:43 -0000 1.4 *************** *** 31,43 **** if(isset($user->user)) { ?> <h1>Members Area</h1> <p>This is the openFIRST members area. You are logged in as: <?php echo($user->user . " the " . $user->membertype . "."); ?></p> - <ul> - <?php if($user->membertype == "administrator") { - echo("<li><a href='sqlinstall.php'>Install SQL Tables</a></li>"); - } ?> - </ul> <?php } else { showlogin(); --- 31,41 ---- if(isset($user->user)) { ?> + <?php + membersmenu($user->membertype); + ?> <h1>Members Area</h1> <p>This is the openFIRST members area. You are logged in as: <?php echo($user->user . " the " . $user->membertype . "."); ?></p> <?php } else { showlogin(); Index: sqlinstall.php =================================================================== RCS file: /cvsroot/openfirst/members/sqlinstall.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sqlinstall.php 12 May 2003 00:29:02 -0000 1.1 --- sqlinstall.php 24 May 2003 18:33:44 -0000 1.2 *************** *** 29,32 **** --- 29,34 ---- include($header); + membersmenu($user->membertype); + if($user->membertype == "administrator") { ?> |