[Openfirst-cvscommit] members adduser.php,1.3,1.4 profile.php,1.8,1.9 updateprofile.php,1.3,1.4
Brought to you by:
xtimg
From: <xt...@us...> - 2003-08-12 05:44:09
|
Update of /cvsroot/openfirst/members In directory sc8-pr-cvs1:/tmp/cvs-serv30896 Modified Files: adduser.php profile.php updateprofile.php Log Message: Add division functionality to other major areas of members area. Index: adduser.php =================================================================== RCS file: /cvsroot/openfirst/members/adduser.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** adduser.php 28 Jun 2003 03:01:25 -0000 1.3 --- adduser.php 12 Aug 2003 05:02:59 -0000 1.4 *************** *** 34,37 **** --- 34,42 ---- $lastname = $_POST["lastname"]; if($_POST["password"] == $_POST["password2"]) { + if(isset($_POST["ndivision"]) == true && $_POST["ndivision"] != "") { + $_POST["division"] = $_POST["ndivision"]; + $q = mysql_query("INSERT INTO ofirst_divisions (division, description) VALUES ( + '" . $_POST["division"] . "', '" . $_POST["divisiondescription"] . "');"); + } $q = mysql_query("INSERT INTO ofirst_members (user, firstname, lastname, password, membertype, division, year, email, icq, aim, msn, *************** *** 92,96 **** <tr> <th>Division</th> ! <td><input type="text" name="division" /></td> </tr> <tr> --- 97,114 ---- <tr> <th>Division</th> ! <td>Existing: ! <br><select name="division"> ! <?php ! $div = mysql_query("SELECT division FROM ofirst_divisions;"); ! while($d = mysql_fetch_object($div)) { ! echo("<option value='$d->division'>$d->division</option>"); ! } ! ?> ! </select> ! <br>New ! <br><input type="text" name="ndivision" /> ! <br>Description of New Division ! <br><input type="text" name="divisiondescription" /> ! </td> </tr> <tr> *************** *** 142,144 **** showlogin(); } ! include($footer); ?> \ No newline at end of file --- 160,162 ---- showlogin(); } ! include($footer); ?> Index: profile.php =================================================================== RCS file: /cvsroot/openfirst/members/profile.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** profile.php 23 Jul 2003 22:46:30 -0000 1.8 --- profile.php 12 Aug 2003 05:02:59 -0000 1.9 *************** *** 80,84 **** <br />Last seen logged in: $q->lastseen</sub> <p> ! Division: $q->division <br />Year $q->year </p> --- 80,84 ---- <br />Last seen logged in: $q->lastseen</sub> <p> ! Division: <a href='divisions.php?division=$q->division'>$q->division</a> <br />Year $q->year </p> Index: updateprofile.php =================================================================== RCS file: /cvsroot/openfirst/members/updateprofile.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** updateprofile.php 29 Jun 2003 03:58:50 -0000 1.3 --- updateprofile.php 12 Aug 2003 05:02:59 -0000 1.4 *************** *** 31,34 **** --- 31,40 ---- if(isset($user->user)) { if (isset($_POST["firstname"]) == true) { + if(isset($_POST["ndivision"]) == true && $_POST["ndivision"] != "") { + $_POST["division"] = $_POST["ndivision"]; + $q = mysql_query("INSERT INTO ofirst_divisions (division) VALUES ( + '" . $_POST["division"] . "');"); + $q = mysql_query("UPDATE ofirst_divisions SET description='" . $_POST["divisiondescription"] . "' WHERE division='" . $_POST["division"] . "';"); + } $query = "UPDATE ofirst_members SET firstname='" . $_POST["firstname"] . "', lastname='" . $_POST["lastname"] . "' , division='" . $_POST["division"] . "', year='" . $_POST["year"] . "', email='" . $_POST["email"] . *************** *** 61,65 **** <tr><th>Password</th><td><input type='password' name='password' value='' /></td></tr> <tr><th>Confirm Password</th><td><input type='password' name='cpassword' value='' /></td></tr> ! <tr><th>Division</th><td><input type='text' name='division' value='$user->division'></td></tr> <tr><th>Year</th><td><input type='text' name='year' value='$user->year'></td></tr> <tr><th>E-mail Address</th><td><input type='text' name='email' value='$user->email'></td></tr> --- 67,85 ---- <tr><th>Password</th><td><input type='password' name='password' value='' /></td></tr> <tr><th>Confirm Password</th><td><input type='password' name='cpassword' value='' /></td></tr> ! <tr><th>Division</th><td> ! Existing: ! <br><select name='division'>"); ! $div = mysql_query("SELECT division FROM ofirst_divisions;"); ! while($d = mysql_fetch_object($div)) { ! echo("<option value='$d->division'"); ! if($d->division == $user->division) { echo(" selected='selected'"); } ! echo(">$d->division</option>"); ! } ! echo("</select> ! <br>New ! <br><input type='text' name='ndivision' /> ! <br>Description of New Division ! <br><input type='text' name='divisiondescription' /> ! </td></tr> <tr><th>Year</th><td><input type='text' name='year' value='$user->year'></td></tr> <tr><th>E-mail Address</th><td><input type='text' name='email' value='$user->email'></td></tr> |