Thread: [Openfirst-cvscommit] members updateprofile.php,1.5,1.6
Brought to you by:
xtimg
From: <xt...@us...> - 2003-10-05 13:23:12
|
Update of /cvsroot/openfirst/members In directory sc8-pr-cvs1:/tmp/cvs-serv2036 Modified Files: updateprofile.php Log Message: Add cell phone information gathering to profiles with sufficient information so that it may be used to send SMS messages to members. Index: updateprofile.php =================================================================== RCS file: /cvsroot/openfirst/members/updateprofile.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** updateprofile.php 23 Aug 2003 20:31:16 -0000 1.5 --- updateprofile.php 5 Oct 2003 13:23:07 -0000 1.6 *************** *** 37,45 **** $q = ofirst_dbquery("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"] . "', icq='" . $_POST["icq"] . "', aim='" . $_POST["aim"] . "', msn='" . $_POST["msn"] . "', yim='" . $_POST["yim"] . "', signature='" . $_POST["signature"] . "', description='" . $_POST["description"] . ! "', picturelocation='" . $_POST["picturelocation"] . "' WHERE user='$user->user';"; $q = ofirst_dbquery($query); if(isset($_POST["password"]) == true && isset($_POST["cpassword"]) == true) { --- 37,58 ---- $q = ofirst_dbquery("UPDATE ofirst_divisions SET description='" . $_POST["divisiondescription"] . "' WHERE division='" . $_POST["division"] . "';"); } + + if($_POST["cellphonesms"] == "0") { + $_POST["cellphonesms"] = true; + $user->cellphonesms = "1"; + } else { + $_POST["cellphonesms"] = false; + $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) { *************** *** 80,87 **** <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> <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> --- 93,116 ---- <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> + <tr><th>Cell Phone/Pager Information</th><td> + Number (10 digit)<input type='text' value='$user->cellphonenumber' name='cellphonenumber' maxlength='10'> + <br>Carrier <select name='cellphonecarrier'>"); + $query = ofirst_dbquery("SELECT * FROM ofirst_cellphonecarriers ORDER BY fullname;"); + while($sms = ofirst_dbfetch_object($query)) { + if(($user->smsaddress == "" && $sms->smsaddress == "txt.bellmobility.ca") || ($user->cellphonecarrier == $sms->smsaddress)) { + echo("<option value='$sms->smsaddress' selected='selected'>$sms->fullname</option>\n"); + } else { + echo("<option value='$sms->smsaddress'>$sms->fullname</option>\n"); + } + } + if($user->cellphonesms == "1") { + echo("</select><br><input type='checkbox' checked='checked' value='0' name='cellphonesms'>Device is SMS Enabled"); + } else { + echo("</select><br><input type='checkbox' value='0' name='cellphonesms'>Device is SMS Enabled"); + } + echo("<br><input type='checkbox' value='on' name='sendsmstestmessage'>Send a test SMS message to my device</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> |