[Openfirst-cvscommit] members updateprofile.php,1.6,1.7
Brought to you by:
xtimg
From: <dav...@us...> - 2003-11-02 16:28:12
|
Update of /cvsroot/openfirst/members In directory sc8-pr-cvs1:/tmp/cvs-serv1014 Modified Files: updateprofile.php Log Message: Fixed error that checks for sms send checkbox. Instead of using on, it should use isset. Index: updateprofile.php =================================================================== RCS file: /cvsroot/openfirst/members/updateprofile.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** updateprofile.php 5 Oct 2003 13:23:07 -0000 1.6 --- updateprofile.php 2 Nov 2003 16:28:09 -0000 1.7 *************** *** 31,38 **** if(isset($user->user)) { if (isset($_POST["firstname"]) == true) { if(isset($_POST["ndivision"]) == true && $_POST["ndivision"] != "") { $_POST["division"] = $_POST["ndivision"]; ! $q = ofirst_dbquery("INSERT INTO ofirst_divisions (division) VALUES ( ! '" . $_POST["division"] . "');"); $q = ofirst_dbquery("UPDATE ofirst_divisions SET description='" . $_POST["divisiondescription"] . "' WHERE division='" . $_POST["division"] . "';"); } --- 31,38 ---- if(isset($user->user)) { if (isset($_POST["firstname"]) == true) { + if(isset($_POST["ndivision"]) == true && $_POST["ndivision"] != "") { $_POST["division"] = $_POST["ndivision"]; ! $q = ofirst_dbquery("INSERT INTO ofirst_divisions (division) VALUES ('" . $_POST["division"] . "');"); $q = ofirst_dbquery("UPDATE ofirst_divisions SET description='" . $_POST["divisiondescription"] . "' WHERE division='" . $_POST["division"] . "';"); } *************** *** 45,68 **** $user->cellphonesms = "0"; } ! if($_POST["sendsmstestmessage"] == "on" && $user->cellphonesms == true) { mail($_POST["cellphonenumber"] . "@" . $_POST["cellphonecarrier"], "SMS Test", "This is the test message you requested from $title."); echo("A test SMS Message has been sent, it should arrive soon, depending on the speed of your carrier's system."); } ! $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='" . ! $_POST["yim"] . "', signature='" . $_POST["signature"] . "', description='" . $_POST["description"] . ! "', picturelocation='" . $_POST["picturelocation"] . "', cellphonenumber='" . $_POST["cellphonenumber"] . "', cellphonecarrier='" . $_POST["cellphonecarrier"] . "', ! cellphonesms='" . $_POST["cellphonesms"] . "' WHERE user='$user->user';"; ! $q = ofirst_dbquery($query); if(isset($_POST["password"]) == true && isset($_POST["cpassword"]) == true) { if($_POST["password"] == $_POST["cpassword"] && $_POST["password"] != "") { $query = ofirst_dbquery("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."); } ?> --- 45,83 ---- $user->cellphonesms = "0"; } ! ! if(isset($_POST["sendsmstestmessage"]) && $user->cellphonesms == true) { mail($_POST["cellphonenumber"] . "@" . $_POST["cellphonecarrier"], "SMS Test", "This is the test message you requested from $title."); echo("A test SMS Message has been sent, it should arrive soon, depending on the speed of your carrier's system."); } ! ! $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='" . $_POST["yim"] . "', ! signature='" . $_POST["signature"] . "', ! description='" . $_POST["description"] . "', ! picturelocation='" . $_POST["picturelocation"] . "', ! cellphonenumber='" . $_POST["cellphonenumber"] . "', ! cellphonecarrier='" . $_POST["cellphonecarrier"] . "', ! cellphonesms='" . $_POST["cellphonesms"] . "' WHERE user='$user->user';"; ! ! $q = ofirst_dbquery($query); if(isset($_POST["password"]) == true && isset($_POST["cpassword"]) == true) { + if($_POST["password"] == $_POST["cpassword"] && $_POST["password"] != "") { $query = ofirst_dbquery("UPDATE ofirst_members SET password='" . cryptpassword($_POST["password"], $encryption) ."' WHERE user='$user->user';"); ! echo("<br><br>Password Changed. "); } elseif ($_POST["password"] != $_POST["cpassword"]) { ! echo("<br><br>The password and confirm password fields do not match."); } } ! ! echo("<br><font color='green'>Profile updated.</font>"); } ?> *************** *** 73,77 **** <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> --- 88,94 ---- <form action='updateprofile.php' method='post'> <table> ! <tr> ! <th> </th> ! <th>Content</th></tr> <?php echo("<tr><th>Username</th><td>$user->user</td></tr> |