[Openfirst-cvscommit] members adduser.php,1.2,1.3 index.php,1.4,1.5 logout.php,1.1,1.2 profile.php,1
Brought to you by:
xtimg
Update of /cvsroot/openfirst/members In directory sc8-pr-cvs1:/tmp/cvs-serv3996 Modified Files: adduser.php index.php logout.php profile.php skills.php updateprofile.php Removed Files: sqlinstall.php Log Message: Remove old files, convert code to proper standards, remove membersmenu() usage (since this has been moved to the headers), switch many tables with <td> where <th> should have been to be proper. Index: adduser.php =================================================================== RCS file: /cvsroot/openfirst/members/adduser.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** adduser.php 24 May 2003 18:46:47 -0000 1.2 --- adduser.php 28 Jun 2003 03:01:25 -0000 1.3 *************** *** 29,162 **** include($header); - membersmenu($user->membertype); - if($user->membertype == "administrator") { ! if(isset($_POST["team"]) == true) { ! $user = $_POST["user"]; $firstname=$_POST["firstname"]; ! $lastname = $_POST["lastname"]; ! if($_POST["password"] == $_POST["password2"]) { ! $q = mysql_query("INSERT INTO ofirst_members (user, firstname, lastname, password, membertype, division, year, email, icq, aim, msn, yim, description, signature, picturelocation, team, dateregistered) ! VALUES ('". ! $_POST["user"] ."', '" . ! $_POST["firstname"] . "', '" . $_POST["lastname"] . "', '" . cryptpassword($_POST["password"], $encryption) . "', '" . $_POST["membertype"] ."', '" . $_POST["division"] . "', '" . $_POST["year"] . "', '" . ! $_POST["email"] . "', '" . $_POST["icq"] . "', '" . $_POST["aim"] . "', '" . $_POST["msn"] . "', '". $_POST["yim"] ."', '" . $_POST["description"] . "', '" . $_POST["signature"] . "', '" . $_POST["picturelocation"] . "', '" . $_POST["team"] . "', '" . date("Y-m-d") . "');"); ! echo("Added user: " . $_POST["user"]); ! } else { ! echo("Password does not match confirm password."); } ! } ! ?> <h1>Add Users</h1> <p>This utility will add users to the members area.</p> <table> ! <form method="post" action="adduser.php"> ! <tr><td> ! Team Number: ! </td><td> ! <input type="text" name="team" /></td></tr> ! <tr><td> ! User Name: ! </td><td> ! <input type="text" name="user" /> ! </td></tr> ! <tr><td> ! First Name: ! </td><td> ! <input type="text" name="firstname" /> ! </td></tr> ! <tr><td> ! Last Name: ! </td><td> ! <input type="text" name="lastname" /> ! </td></tr> ! <tr><td> ! Password: ! </td><td> ! <input type="password" name="password" /> ! </td></tr> ! <tr><td> ! Confirm Password: ! </td><td> ! <input type="password" name="password2" /> ! </td></tr> ! <tr><td> ! Member Type: ! </td><td> ! <select name="membertype"> ! <option value="administrator">Administrator</option> ! <option value="user" selected="selected">User</option> ! </select> ! </td></tr> ! <tr><td> ! Division: ! </td><td> ! <input type="text" name="division" /> ! </td></tr> ! <tr><td> ! Year: ! </td><td> ! <input type="text" name="year" value="<?php echo(date("Y")); ?>" /> ! </td></tr> ! <tr><td> ! E-mail: ! </td><td> ! <input type="text" name="email" /> ! </td></tr> ! <tr><td> ! ICQ: ! </td><td> ! <input type="text" name="icq" /> ! </td></tr> ! <tr><td> ! AIM: ! </td><td> ! <input type="text" name="aim" /> ! </td></tr> ! <tr><td> ! MSN: ! </td><td> ! <input type="text" name="msn" /> ! </td></tr> ! <tr><td> ! YIM: ! </td><td> ! <input type="text" name="yim" /> ! </td></tr> ! <tr><td> ! Description: ! </td><td> ! <textarea name="description">I have not yet updated my profile.</textarea> ! </td></tr> ! <tr><td> ! Signature: ! </td><td> ! <textarea name="signature">-- ! Team Member</textarea> ! </td></tr> ! <tr><td> ! Picture Location ! </td><td> ! <input type="text" name="picture" value="nophoto.png" /> ! </td></tr> ! <tr><td> ! <input type="submit" value="Add User" /> ! <input type="reset" value="Clear Details" /> ! </td> ! </tr> </form> </table> ! <?php } else { ! showlogin(); ! } ! include($footer); ?> --- 29,144 ---- include($header); if($user->membertype == "administrator") { ! if(isset($_POST["team"]) == true) { ! $user = $_POST["user"]; $firstname=$_POST["firstname"]; ! $lastname = $_POST["lastname"]; ! if($_POST["password"] == $_POST["password2"]) { ! $q = mysql_query("INSERT INTO ofirst_members (user, firstname, lastname, password, membertype, division, year, email, icq, aim, msn, yim, description, signature, picturelocation, team, dateregistered) ! VALUES ('". $_POST["user"] ."', '" . $_POST["firstname"] . "', '" . $_POST["lastname"] . "', '" . cryptpassword($_POST["password"], $encryption) . "', '" . $_POST["membertype"] ."', '" . $_POST["division"] . "', '" . $_POST["year"] . "', '" . ! $_POST["email"] . "', '" . $_POST["icq"] . "', '" . $_POST["aim"] . "', '" . $_POST["msn"] . "', '". $_POST["yim"] ."', '" . $_POST["description"] . "', '" . $_POST["signature"] . "', '" . $_POST["picturelocation"] . "', '" . $_POST["team"] . "', '" . date("Y-m-d") . "');"); ! echo("Added user: " . $_POST["user"]); ! } else { ! echo("Password does not match confirm password."); ! } } ! ?> <h1>Add Users</h1> <p>This utility will add users to the members area.</p> <table> ! <form method="post" action="adduser.php"> ! <tr> ! <th>Team Number</th> ! <td><input type="text" name="team" /></td> ! </tr> ! <tr> ! <th>User Name</th> ! <td><input type="text" name="user" /></td> ! </tr> ! <tr> ! <th>First Name</th> ! <td><input type="text" name="firstname" /></td> ! </tr> ! <tr> ! <th>Last Name</th> ! <td><input type="text" name="lastname" /></td> ! </tr> ! <tr> ! <th>Password</th> ! <td><input type="password" name="password" /></td> ! </tr> ! <tr> ! <th>Confirm Password</th> ! <td><input type="password" name="password2" /></td> ! </tr> ! <tr> ! <th>Member Type</th> ! <td> ! <select name="membertype"> ! <option value="administrator">Administrator</option> ! <option value="user" selected="selected">User</option> ! </select> ! </td> ! </tr> ! <tr> ! <th>Division</th> ! <td><input type="text" name="division" /></td> ! </tr> ! <tr> ! <th>Year</th> ! <td><input type="text" name="year" value="<?php echo(date("Y")); ?>" /></td> ! </tr> ! <tr> ! <th>E-mail</th> ! <td><input type="text" name="email" /></td> ! </tr> ! <tr> ! <th>ICQ</th> ! <td><input type="text" name="icq" /></td> ! </tr> ! <tr> ! <th>AIM</th> ! <td><input type="text" name="aim" /></td> ! </tr> ! <tr> ! <th>MSN</th> ! <td><input type="text" name="msn" /></td> ! </tr> ! <tr> ! <th>YIM</th> ! <td><input type="text" name="yim" /></td> ! </tr> ! <tr> ! <th>Description</th> ! <td><textarea name="description">I have not yet updated my profile.</textarea></td> ! </tr> ! <tr> ! <th>Signature</th> ! <td><textarea name="signature">-- ! Team Member</textarea></td> ! </tr> ! <tr> ! <th>Picture Location</th> ! <td><input type="text" name="picture" value="nophoto.png" /></td> ! </tr> ! <tr> ! <th>Take Action</th> ! <td><input type="submit" value="Add User" /> <input type="reset" value="Clear Details" /></td> ! </tr> </form> </table> ! <?php ! } else { ! showlogin(); ! } ! include($footer); ?> \ No newline at end of file Index: index.php =================================================================== RCS file: /cvsroot/openfirst/members/index.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** index.php 24 May 2003 18:33:43 -0000 1.4 --- index.php 28 Jun 2003 03:01:25 -0000 1.5 *************** *** 30,43 **** 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(); } ! include($footer); ?> --- 30,42 ---- 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> <?php } else { showlogin(); } ! include($footer); ?> \ No newline at end of file Index: logout.php =================================================================== RCS file: /cvsroot/openfirst/members/logout.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** logout.php 2 Jun 2003 20:01:36 -0000 1.1 --- logout.php 28 Jun 2003 03:01:25 -0000 1.2 *************** *** 30,53 **** if(isset($user->user)) { - ?> - <?php - membersmenu($user->membertype); ?> <h1>Logged Out</h1> <?php ! $q = mysql_query("UPDATE ofirst_members SET authcode = NULL WHERE user='$user->user';"); ! echo(mysql_error()); ! session_start(); ! session_destroy(); ?> <p>You have been logged out of this web site.</p> ! ! <?php } else { ! echo("<h1>Cannot Logout</h1> ! <p>You must be logged in in order to log out.</p>"); ! showlogin(); ! } ! include($footer); ?> --- 30,49 ---- if(isset($user->user)) { ?> <h1>Logged Out</h1> <?php ! $q = mysql_query("UPDATE ofirst_members SET authcode = NULL WHERE user='$user->user';"); ! echo(mysql_error()); ! session_start(); ! session_destroy(); ?> <p>You have been logged out of this web site.</p> ! <?php ! } else { ! echo("<h1>Cannot Logout</h1><p>You must be logged in in order to log out.</p>"); ! showlogin(); ! } ! include($footer); ?> \ No newline at end of file Index: profile.php =================================================================== RCS file: /cvsroot/openfirst/members/profile.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** profile.php 1 Jun 2003 20:00:32 -0000 1.5 --- profile.php 28 Jun 2003 03:01:25 -0000 1.6 *************** *** 29,55 **** include("../config/globals.php"); include($header); - - if(isset($user->user)) { - membersmenu($user->membertype); - } ?> - <h1>Members Profiles</h1> <?php ! if(isset($_GET["id"]) == false) { ?> <table> <tr><th>User Name</th><th>Team</th><th>MSN</th><th>ICQ</th><th>AIM</th></tr> <?php ! $query = mysql_query("SELECT user, team, msn, icq, aim FROM ofirst_members;"); ! while($q = mysql_fetch_object($query)) { ! echo("<tr><td><a href='profile.php?id=$q->user'>$q->user</a></td><td>$q->team</td><td>$q->msn</td><td>$q->icq</td><td>$q->aim</td></tr>"); ! } ?> </table> <?php ! } else { ! $query = mysql_query("SELECT * FROM ofirst_members WHERE user='" . $_GET["id"] . "';"); ! while($q = mysql_fetch_object($query)) { if (function_exists('emoticon_translate')) { --- 29,50 ---- include("../config/globals.php"); include($header); ?> <h1>Members Profiles</h1> <?php ! if(isset($_GET["id"]) == false) { ?> <table> <tr><th>User Name</th><th>Team</th><th>MSN</th><th>ICQ</th><th>AIM</th></tr> <?php ! $query = mysql_query("SELECT user, team, msn, icq, aim FROM ofirst_members;"); ! while($q = mysql_fetch_object($query)) { ! echo("<tr><td><a href='profile.php?id=$q->user'>$q->user</a></td><td>$q->team</td><td>$q->msn</td><td>$q->icq</td><td>$q->aim</td></tr>"); ! } ?> </table> <?php ! } else { ! $query = mysql_query("SELECT * FROM ofirst_members WHERE user='" . $_GET["id"] . "';"); ! while($q = mysql_fetch_object($query)) { if (function_exists('emoticon_translate')) { *************** *** 57,77 **** } ! echo("<table><tr><td style='vertical-align: top;'>"); ! if($q->picturelocation == "") { ! echo("<img src='nophoto.png' alt='No photograph provided' />"); ! } else { ! echo("<img src='$q->picturelocation' alt='$q->firstname $q->lastname' />"); ! } ! if ($q->skills == "") { $q->skills = "No skills entered."; } ! if ($q->description == "") { $q->description = "No description entered."; } ! if ($q->division == "") { $q->division = "No division given."; } ! if ($q->year == "") { $q->year = "Year unavailable."; } ! if ($q->firstname == "") { $q->firstname = "None"; } ! if ($q->lastname == "") { $q->lastname = "None"; } ! if ($q->team == "") { $q->team = "no particular team"; } ! if ($q->dateregistered == "") { $q->dateregistered = "creation"; } ! if ($q->lastseen == "") { $q->lastseen = "$q->firstname has never logged in."; } ! echo("</td><td><h2>$q->user of $q->team</h2> <sub>Real Name: $q->firstname $q->lastname <br />Member since: $q->dateregistered --- 52,72 ---- } ! echo("<table><tr><td style='vertical-align: top;'>"); ! if($q->picturelocation == "") { ! echo("<img src='nophoto.png' alt='No photograph provided' />"); ! } else { ! echo("<img src='$q->picturelocation' alt='$q->firstname $q->lastname' />"); ! } ! if ($q->skills == "") { $q->skills = "No skills entered."; } ! if ($q->description == "") { $q->description = "No description entered."; } ! if ($q->division == "") { $q->division = "No division given."; } ! if ($q->year == "") { $q->year = "Year unavailable."; } ! if ($q->firstname == "") { $q->firstname = "None"; } ! if ($q->lastname == "") { $q->lastname = "None"; } ! if ($q->team == "") { $q->team = "no particular team"; } ! if ($q->dateregistered == "") { $q->dateregistered = "creation"; } ! if ($q->lastseen == "") { $q->lastseen = "$q->firstname has never logged in."; } ! echo("</td><td><h2>$q->user of $q->team</h2> <sub>Real Name: $q->firstname $q->lastname <br />Member since: $q->dateregistered *************** *** 88,115 **** "); if ($q->icq != "") { ! echo("<img src=\"http://wwp.icq.com/scripts/online.dll?icq=$q->icq&img=5\" alt=\"User status\" />"); } else { ! echo("none"); } ! echo(" ! <br /><img src='msmsgs.png' alt='Microsoft Network: Messenger address' />: $q->msn"); ! if($q->msn == "") { ! echo("none"); ! } ! echo("<br /><img src='aim.png' alt='AOL Instant Messenger address' />: "); ! if ($q->aim != "") { ! echo("<a href='aim:goim?screenname=$q->aim&message=Hello+$q->firstname+$q->lastname,+I+was+just+browsing+your+profile+when+I+noticed+you+had+AIM.'>$q->aim</a>"); ! } else { ! echo("none"); ! } ! echo(" ! <br /><img src='yahoo.png' alt='Yahoo! Messenger address' />: ! <a href='http://edit.yahoo.com/config/send_webmesg?.target=$q->yim&.src=pg'>$q->yim</a> "); ! if ($q->yim != "") { ! echo("<img src=\"http://opi.yahoo.com/online?u=$q->yim&m=g&t=1\" alt=\"User status\" />"); ! } else { ! echo("none"); ! } ! echo("</p> <h3>Description</h3> --- 83,107 ---- "); if ($q->icq != "") { ! echo("<img src=\"http://wwp.icq.com/scripts/online.dll?icq=$q->icq&img=5\" alt=\"User status\" />"); } else { ! echo("none"); } ! echo("<br /><img src='msmsgs.png' alt='Microsoft Network: Messenger address' />: $q->msn"); ! if($q->msn == "") { ! echo("none"); ! } ! echo("<br /><img src='aim.png' alt='AOL Instant Messenger address' />: "); ! if ($q->aim != "") { ! echo("<a href='aim:goim?screenname=$q->aim&message=Hello+$q->firstname+$q->lastname,+I+was+just+browsing+your+profile+when+I+noticed+you+had+AIM.'>$q->aim</a>"); ! } else { ! echo("none"); ! } ! echo("<br /><img src='yahoo.png' alt='Yahoo! Messenger address' />: <a href='http://edit.yahoo.com/config/send_webmesg?.target=$q->yim&.src=pg'>$q->yim</a> "); ! if ($q->yim != "") { ! echo("<img src=\"http://opi.yahoo.com/online?u=$q->yim&m=g&t=1\" alt=\"User status\" />"); ! } else { ! echo("none"); ! } ! echo("</p> <h3>Description</h3> *************** *** 120,152 **** <h3>Skills</h3> <p>"); function status($n) { ! if($n == "1") { ! return("Minimal Skill"); ! } elseif($n == "2") { ! return("Not quite mediocre"); ! } elseif($n == "3") { ! return("Mediocre"); ! } elseif($n == "4") { ! return("Competent"); ! } elseif($n == "5") { ! return("Above Average"); ! } elseif($n == "6") { ! return("Professional"); ! } } ! $skill = explode(",", $q->skills); ! for($y = 0; $y < count($skill); $y++) { ! $det = explode("|",$skill[$y]); ! echo("<br />$det[0] - " . status($det[1])); } ! echo(" ! </p> ! ! </td></tr></table> ! "); ! } ! } ! ?> ! ! <?php ! include($footer); ?> --- 112,138 ---- <h3>Skills</h3> <p>"); + function status($n) { ! if($n == "1") { ! return("Minimal Skill"); ! } elseif($n == "2") { ! return("Not quite mediocre"); ! } elseif($n == "3") { ! return("Mediocre"); ! } elseif($n == "4") { ! return("Competent"); ! } elseif($n == "5") { ! return("Above Average"); ! } elseif($n == "6") { ! return("Professional"); ! } } ! $skill = explode(",", $q->skills); ! for($y = 0; $y < count($skill); $y++) { ! $det = explode("|",$skill[$y]); ! echo("<br />$det[0] - " . status($det[1])); ! } ! echo("</p></td></tr></table>"); ! } } ! include($footer); ?> \ No newline at end of file Index: skills.php =================================================================== RCS file: /cvsroot/openfirst/members/skills.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** skills.php 1 Jun 2003 05:59:56 -0000 1.1 --- skills.php 28 Jun 2003 03:01:25 -0000 1.2 *************** *** 30,63 **** if(isset($user->user)) { - ?> - <?php - membersmenu($user->membertype); ! $skills = array('Languages', 'Computer-Programming', 'Hands-on-Skills', 'Fundraising', 'Creativity', 'Organization', 'Time-Management', 'Research', 'Computer-Aided-Design', 'Teaching', 'Mentorship'); ! if(isset($_POST["$skills[0]"]) == true) { ! for($x=0; $x < count($skills); $x++) { ! if (isset($_POST["$skills[$x]"]) == true) { ! if($_POST["$skills[$x]"] > 0) { ! $skilled = $skilled . $skills[$x] . "|" . $_POST["$skills[$x]"] . ","; ! } ! } ! } ! $query = "UPDATE ofirst_members SET skills='$skilled' WHERE user='$user->user';"; ! $q = mysql_query($query); ! unset($q); ! $query = "SELECT * FROM ofirst_members WHERE user='$user->user';"; ! $q = mysql_query($query); ! $user = mysql_fetch_object($q); ! echo("Updated Skills"); ! } ?> <h1>Skills</h1> <p>You may use this page to customize the listing of skills that you have. Having skills from ! this list allows those interested in starting a project to locate all the people with the required skills. It also allows those members who are new to a team to quickly find out who it is they should talk to regarding what.</p> --- 30,60 ---- if(isset($user->user)) { ! $skills = array('Languages', 'Computer-Programming', 'Hands-on-Skills', 'Fundraising', 'Creativity', 'Organization', 'Time-Management', 'Research', 'Computer-Aided-Design', 'Teaching', 'Mentorship'); ! if(isset($_POST["$skills[0]"]) == true) { ! for($x=0; $x < count($skills); $x++) { ! if (isset($_POST["$skills[$x]"]) == true) { ! if($_POST["$skills[$x]"] > 0) { ! $skilled = $skilled . $skills[$x] . "|" . $_POST["$skills[$x]"] . ","; ! } ! } ! } ! $query = "UPDATE ofirst_members SET skills='$skilled' WHERE user='$user->user';"; ! $q = mysql_query($query); ! unset($q); ! $query = "SELECT * FROM ofirst_members WHERE user='$user->user';"; ! $q = mysql_query($query); ! $user = mysql_fetch_object($q); ! echo("Updated Skills"); ! } ?> <h1>Skills</h1> <p>You may use this page to customize the listing of skills that you have. Having skills from ! this list allows those interested in starting a project to locate all the people with the required skills. It also allows those members who are new to a team to quickly find out who it is they should talk to regarding what.</p> *************** *** 66,121 **** <tr><th>Skill Name</th><th>Proficiency</th></tr> <?php ! if(isset($user->skills) == true) { ! $skill = explode(",", $user->skills); ! for($y = 0; $y < count($skills); $y++) { ! $set = "n"; ! for($x = 0; $x < count($skill); $x++) { ! $det = explode("|",$skill[$x]); ! if($det[0] == $skills[$y]) { ! echo("<tr><td>$det[0]</td>"); ! echo("<td><select name='$det[0]'><option value='0'>No skill</option>"); ! if ($det[1] == "1") { ! echo("<option value='1' selected='selected'>Minimal skill</option>"); ! } else { ! echo("<option value='1'>Minimal skill</option>"); ! } ! if ($det[1] == "2") { ! echo("<option value='2' selected='selected'>Not quite mediocre</option>"); ! } else { ! echo("<option value='2'>Not quite mediocre</option>"); ! } ! if ($det[1] == "3") { ! echo("<option value='3' selected='selected'>Mediocre</option>"); ! } else { ! echo("<option value='3'>Mediocre</option>"); ! } ! if ($det[1] == "4") { ! echo("<option value='4' selected='selected'>Competent</option>"); ! } else { ! echo("<option value='4'>Competent</option>"); ! } ! if ($det[1] == "5") { ! echo("<option value='5' selected='selected'>Above Average</option>"); ! } else { ! echo("<option value='5'>Above Average</option>"); ! } ! if ($det[1] == "6") { ! echo("<option value='6' selected='selected'>Professional</option>"); ! } else { ! echo("<option value='6'>Professional</option>"); ! } ! echo("</select></td></tr>"); ! $set = "y"; ! } ! } ! if($set == "n") { ! echo("<tr><td>$skills[$y]</td><td><select name='$skills[$y]'> <option value='0' selected='selected'>No skill</option> <option value='1'>Minimal</option> --- 63,118 ---- <tr><th>Skill Name</th><th>Proficiency</th></tr> <?php ! if(isset($user->skills) == true) { ! $skill = explode(",", $user->skills); ! for($y = 0; $y < count($skills); $y++) { ! $set = "n"; ! for($x = 0; $x < count($skill); $x++) { ! $det = explode("|",$skill[$x]); ! if($det[0] == $skills[$y]) { ! echo("<tr><td>$det[0]</td>"); ! echo("<td><select name='$det[0]'><option value='0'>No skill</option>"); ! if ($det[1] == "1") { ! echo("<option value='1' selected='selected'>Minimal skill</option>"); ! } else { ! echo("<option value='1'>Minimal skill</option>"); ! } ! if ($det[1] == "2") { ! echo("<option value='2' selected='selected'>Not quite mediocre</option>"); ! } else { ! echo("<option value='2'>Not quite mediocre</option>"); ! } ! if ($det[1] == "3") { ! echo("<option value='3' selected='selected'>Mediocre</option>"); ! } else { ! echo("<option value='3'>Mediocre</option>"); ! } ! if ($det[1] == "4") { ! echo("<option value='4' selected='selected'>Competent</option>"); ! } else { ! echo("<option value='4'>Competent</option>"); ! } ! if ($det[1] == "5") { ! echo("<option value='5' selected='selected'>Above Average</option>"); ! } else { ! echo("<option value='5'>Above Average</option>"); ! } ! if ($det[1] == "6") { ! echo("<option value='6' selected='selected'>Professional</option>"); ! } else { ! echo("<option value='6'>Professional</option>"); ! } ! echo("</select></td></tr>"); ! $set = "y"; ! } ! } ! if($set == "n") { ! echo("<tr><td>$skills[$y]</td><td><select name='$skills[$y]'> <option value='0' selected='selected'>No skill</option> <option value='1'>Minimal</option> *************** *** 127,136 **** </select> </td></tr>"); ! } } ! } else { ! echo("You do not have any skills set up."); ! for($y = 0; $y < count($skills); $y++) { ! echo("<tr><td>$skills[$y]</td><td><select name='$skills[$y]'> <option value='0' selected='selected'>No skill</option> <option value='1'>Minimal</option> --- 124,133 ---- </select> </td></tr>"); ! } } ! } else { ! echo("You do not have any skills set up."); ! for($y = 0; $y < count($skills); $y++) { ! echo("<tr><td>$skills[$y]</td><td><select name='$skills[$y]'> <option value='0' selected='selected'>No skill</option> <option value='1'>Minimal</option> *************** *** 143,153 **** </td></tr>"); } ! } ?> <tr><td></td><td><input type="submit" value="Set skills"> <input type="reset" value="Reset skills"> </table> </form> ! <?php } else { ! showlogin(); ! } ! include($footer); ?> --- 140,151 ---- </td></tr>"); } ! } ?> <tr><td></td><td><input type="submit" value="Set skills"> <input type="reset" value="Reset skills"> </table> </form> ! <?php ! } else { ! showlogin(); ! } ! include($footer); ?> Index: updateprofile.php =================================================================== RCS file: /cvsroot/openfirst/members/updateprofile.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** updateprofile.php 1 Jun 2003 14:46:28 -0000 1.1 --- updateprofile.php 28 Jun 2003 03:01:25 -0000 1.2 *************** *** 30,36 **** if(isset($user->user)) { ! membersmenu($user->membertype); ! if (isset($_POST["firstname"]) == true) { ! $query = "UPDATE ofirst_members SET firstname='" . $_POST["firstname"] . "', lastname='" . $_POST["lastname"] . "' , division='" . $_POST["division"] . "', year='" . $_POST["year"] . "', email='" . $_POST["email"] . "', icq='" . $_POST["icq"] . "', aim='" . $_POST["aim"] . "', msn='" . $_POST["msn"] . "', yim='" . --- 30,35 ---- if(isset($user->user)) { ! if (isset($_POST["firstname"]) == true) { ! $query = "UPDATE ofirst_members SET firstname='" . $_POST["firstname"] . "', lastname='" . $_POST["lastname"] . "' , division='" . $_POST["division"] . "', year='" . $_POST["year"] . "', email='" . $_POST["email"] . "', icq='" . $_POST["icq"] . "', aim='" . $_POST["aim"] . "', msn='" . $_POST["msn"] . "', yim='" . *************** *** 38,51 **** "', picturelocation='" . $_POST["picturelocation"] . "' WHERE user='$user->user';"; $q = mysql_query($query); ! if(isset($_POST["password"]) == true && isset($_POST["cpassword"]) == true) { ! if($_POST["password"] == $_POST["cpassword"] && $_POST["password"] != "") { ! $query = mysql_query("UPDATE ofirst_members SET password='" . cryptpassword($_POST["password"], $encryption) ."' WHERE user='$user->user';"); ! echo("Password Changed."); ! } elseif ($_POST["password"] != $_POST["cpassword"]) { ! echo("The password and confirm password fields do not match."); ! } ! } ! echo("Profile updated."); ! } ?> --- 37,50 ---- "', picturelocation='" . $_POST["picturelocation"] . "' WHERE user='$user->user';"; $q = mysql_query($query); ! if(isset($_POST["password"]) == true && isset($_POST["cpassword"]) == true) { ! if($_POST["password"] == $_POST["cpassword"] && $_POST["password"] != "") { ! $query = mysql_query("UPDATE ofirst_members SET password='" . cryptpassword($_POST["password"], $encryption) ."' WHERE user='$user->user';"); ! echo("Password Changed."); ! } elseif ($_POST["password"] != $_POST["cpassword"]) { ! echo("The password and confirm password fields do not match."); ! } ! } ! echo("Profile updated."); ! } ?> *************** *** 56,83 **** <form action='updateprofile.php' method='post'> <table> ! <tr><th>Heading</th><th>Content</th></tr> <?php ! echo("<tr><td>Username</td><td>$user->user</td></tr> ! <tr><td>First Name</td><td><input type='text' name='firstname' value='$user->firstname' /></td></tr> ! <tr><td>Last Name</td><td><input type='text' name='lastname' value='$user->lastname' /></td></tr> ! <tr><td>Password</td><td><input type='password' name='password' value='' /></td></tr> ! <tr><td>Confirm Password</td><td><input type='password' name='cpassword' value='' /></td></tr> ! <tr><td>Division</td><td><input type='text' name='division' value='$user->division'></td></tr> ! <tr><td>Year</td><td><input type='text' name='year' value='$user->year'></td></tr> ! <tr><td>E-mail Address</td><td><input type='text' name='email' value='$user->email'></td></tr> ! <tr><td>ICQ Number</td><td><input type='text' name='icq' value='$user->icq'></td></tr> ! <tr><td>AIM Screenname</td><td><input type='text' name='aim' value='$user->aim'></td></tr> ! <tr><td>MSN Messenger Address</td><td><input type='text' name='msn' value='$user->msn'></td></tr> ! <tr><td>Yahoo! Instant Messenger Address</td><td><input type='text' name='yim' value='$user->yim'></td></tr> ! <tr><td>Freeform Description</td><td><textarea name='description'>$user->description</textarea></td></tr> ! <tr><td>Signature</td><td><textarea name='signature'>$user->signature</textarea></td></tr> ! <tr><td>Picture Location</td><td><input type='text' name='picturelocation' value='$user->picturelocation'></td></tr> "); ?> ! <tr><td></td><td><input type="submit" value="Update Profile"> <input type="reset" value="Reset Profile"> </table> </form> ! <?php } else { ! showlogin(); ! } ! include($footer); ?> --- 55,83 ---- <form action='updateprofile.php' method='post'> <table> ! <tr><th>Heading</th><th>Content</th></tr> <?php ! echo("<tr><th>Username</th><td>$user->user</td></tr> ! <tr><th>First Name</th><td><input type='text' name='firstname' value='$user->firstname' /></td></tr> ! <tr><th>Last Name</th><td><input type='text' name='lastname' value='$user->lastname' /></td></tr> ! <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> ! <tr><th>ICQ Number</th><td><input type='text' name='icq' value='$user->icq'></td></tr> ! <tr><th>AIM Screenname</th><td><input type='text' name='aim' value='$user->aim'></td></tr> ! <tr><th>MSN Messenger Address</th><td><input type='text' name='msn' value='$user->msn'></td></tr> ! <tr><th>Yahoo! Instant Messenger Address</th><td><input type='text' name='yim' value='$user->yim'></td></tr> ! <tr><th>Freeform Description</th><td><textarea name='description'>$user->description</textarea></td></tr> ! <tr><th>Signature</th><td><textarea name='signature'>$user->signature</textarea></td></tr> ! <tr><th>Picture Location</th><td><input type='text' name='picturelocation' value='$user->picturelocation'></td></tr> "); ?> ! <tr><td></td><td><input type="submit" value="Update Profile"> <input type="reset" value="Reset Profile"> </table> </form> ! <?php ! } else { ! showlogin(); ! } ! include($footer); ?> \ No newline at end of file --- sqlinstall.php DELETED --- |