[Openfirst-cvscommit] members/admin editdivisions.php,1.1,1.2 editmember.php,1.1,1.2 index.php,1.1,1
Brought to you by:
xtimg
From: <xt...@us...> - 2003-12-23 14:48:33
|
Update of /cvsroot/openfirst/members/admin In directory sc8-pr-cvs1:/tmp/cvs-serv16911 Modified Files: editdivisions.php editmember.php index.php Log Message: Fix white space issues and indenting mistakes, also correct system design flaws. Index: editdivisions.php =================================================================== RCS file: /cvsroot/openfirst/members/admin/editdivisions.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** editdivisions.php 22 Dec 2003 23:10:08 -0000 1.1 --- editdivisions.php 23 Dec 2003 14:48:30 -0000 1.2 *************** *** 38,46 **** $q = ofirst_dbquery("INSERT INTO ofirst_divisions (division, description) VALUES ( '" . $_POST["division"] . "', ! '" . $_POST["divisiondescription"] . "');"); } if(isset($_GET["delete"])) { ! $q = ofirst_dbquery("DELETE FROM ofirst_divisions WHERE division = '" . $_GET["delete"] . "';"); } --- 38,46 ---- $q = ofirst_dbquery("INSERT INTO ofirst_divisions (division, description) VALUES ( '" . $_POST["division"] . "', ! '" . $_POST["divisiondescription"] . "');"); } if(isset($_GET["delete"])) { ! $q = ofirst_dbquery("DELETE FROM ofirst_divisions WHERE division = '" . $_GET["delete"] . "';"); } *************** *** 52,64 **** if(isset($_GET['update'])){ ! if(isset($_POST["update"])) { ! $q = ofirst_dbquery("UPDATE ofirst_divisions SET division = '".$_POST['updivision']."', ! description = '".$_POST['updescription']."' WHERE division = '" . $_GET["update"] . "';"); ! } ! $division_query = ofirst_dbquery("SELECT * FROM ofirst_divisions WHERE division = '".$_GET['update']."';"); ! $division = ofirst_dbfetch_object($division_query); ?> </p> --- 52,64 ---- if(isset($_GET['update'])){ ! if(isset($_POST["update"])) { ! $q = ofirst_dbquery("UPDATE ofirst_divisions SET division = '".$_POST['updivision']."', ! description = '".$_POST['updescription']."' WHERE division = '" . $_GET["update"] . "';"); ! } ! $division_query = ofirst_dbquery("SELECT * FROM ofirst_divisions WHERE division = '".$_GET['update']."';"); ! $division = ofirst_dbfetch_object($division_query); ?> </p> *************** *** 75,79 **** <tr> <td>Description </td> ! <td><textarea name="updescription" cols="40" rows="10" id="textarea2" value="<?php echo $division->description; ?>"><?php echo $division->description; ?></textarea></td> </tr> <tr> --- 75,79 ---- <tr> <td>Description </td> ! <td><textarea name="updescription" cols="40" rows="10" id="textarea2" value="<?php echo $division->description; ?>"><?php echo $division->description; ?></textarea></td> </tr> <tr> *************** *** 101,105 **** </tr> <?php ! } ?> </table> --- 101,105 ---- </tr> <?php ! } ?> </table> *************** *** 127,132 **** </table> </form> ! <p> ! <?php include_once($footer); ?> ! </p> ! <p> </p> --- 127,129 ---- </table> </form> ! <?php include_once($footer); ?> Index: editmember.php =================================================================== RCS file: /cvsroot/openfirst/members/admin/editmember.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** editmember.php 22 Dec 2003 23:10:08 -0000 1.1 --- editmember.php 23 Dec 2003 14:48:30 -0000 1.2 *************** *** 52,70 **** $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='".$_GET['user']."';"; $q = ofirst_dbquery($query); --- 52,70 ---- $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='".$_GET['user']."';"; $q = ofirst_dbquery($query); *************** *** 98,111 **** <tr><th>Confirm Password</th><td><input type='password' name='cpassword' value='' /></td></tr> <tr><th>Division</th> ! <td> Existing: <br><select name='division'> ! <?php ! $div = ofirst_dbquery("SELECT division FROM ofirst_divisions;"); while($d = ofirst_dbfetch_object($div)) { ! echo("<option value='$d->division'"); ! if($d->division == $user->division) { echo(" selected='selected'"); } ! echo(">$d->division</option>"); ! } ?> </select> --- 98,111 ---- <tr><th>Confirm Password</th><td><input type='password' name='cpassword' value='' /></td></tr> <tr><th>Division</th> ! <td> Existing: <br><select name='division'> ! <?php ! $div = ofirst_dbquery("SELECT division FROM ofirst_divisions;"); while($d = ofirst_dbfetch_object($div)) { ! echo("<option value='$d->division'"); ! if($d->division == $user->division) { echo(" selected='selected'"); } ! echo(">$d->division</option>"); ! } ?> </select> *************** *** 128,136 **** Number (10 digit)<input type='text' value='<?php echo $user->cellphonenumber; ?>' name='cellphonenumber' maxlength='10'> <br>Carrier ! <select name='cellphonecarrier'> ! <?php ! // Populate cell phone carrier space ! $query = ofirst_dbquery("SELECT * FROM ofirst_cellphonecarriers ORDER BY fullname;"); ! while($sms = ofirst_dbfetch_object($query)) { if(isset($user->smsaddress) == true && ($user->smsaddress == "" && $sms->smsaddress == "txt.bellmobility.ca") || ($user->cellphonecarrier == $sms->smsaddress)) { echo("<option value='$sms->smsaddress' selected='selected'>$sms->fullname</option>\n"); --- 128,136 ---- Number (10 digit)<input type='text' value='<?php echo $user->cellphonenumber; ?>' name='cellphonenumber' maxlength='10'> <br>Carrier ! <select name='cellphonecarrier'> ! <?php ! // Populate cell phone carrier space ! $query = ofirst_dbquery("SELECT * FROM ofirst_cellphonecarriers ORDER BY fullname;"); ! while($sms = ofirst_dbfetch_object($query)) { if(isset($user->smsaddress) == true && ($user->smsaddress == "" && $sms->smsaddress == "txt.bellmobility.ca") || ($user->cellphonecarrier == $sms->smsaddress)) { echo("<option value='$sms->smsaddress' selected='selected'>$sms->fullname</option>\n"); *************** *** 139,146 **** } } ! ?> ! </select> <?php ! // Check user specified cell info if($user->cellphonesms == "1") { echo("</select><br><input type='checkbox' checked='checked' value='0' name='cellphonesms'>Device is SMS Enabled"); --- 139,146 ---- } } ! ?> ! </select> <?php ! // Check user specified cell info if($user->cellphonesms == "1") { echo("</select><br><input type='checkbox' checked='checked' value='0' name='cellphonesms'>Device is SMS Enabled"); *************** *** 177,185 **** <tr> <th>Picture Location</th> ! <td><input type='text' name='picturelocation' value='<?php echo $user->picturelocation; ?>'></td> </tr> <tr> <td> </td> ! <td><input type="submit" value="Update Profile"> <input type="reset" value="Reset Profile"> </tr> </table> --- 177,185 ---- <tr> <th>Picture Location</th> ! <td><input type='text' name='picturelocation' value='<?php echo $user->picturelocation; ?>'></td> </tr> <tr> <td> </td> ! <td><input type="submit" value="Update Profile"> <input type="reset" value="Reset Profile"> </tr> </table> Index: index.php =================================================================== RCS file: /cvsroot/openfirst/members/admin/index.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** index.php 22 Dec 2003 23:10:08 -0000 1.1 --- index.php 23 Dec 2003 14:48:30 -0000 1.2 *************** *** 59,63 **** <td><a href='/members/divisions.php?division=<?php echo $member->division; ?>'><?php echo $member->division; ?></a></td> <td> ! <a href='editmember.php?user=<?php echo $member->user; ?>'><img src='<?php echo $home.$basepath; ?>/members/icons/actions/edit.png' border="0"></a> <a href='index.php?delete=<?php echo $member->user; ?>'><img src='<?php echo $home.$basepath; ?>/members/icons/actions/button_cancel.png' border="0"></a> </td> --- 59,63 ---- <td><a href='/members/divisions.php?division=<?php echo $member->division; ?>'><?php echo $member->division; ?></a></td> <td> ! <a href='editmember.php?user=<?php echo $member->user; ?>'><img src='<?php echo $home.$basepath; ?>/members/icons/actions/edit.png' border="0"></a> <a href='index.php?delete=<?php echo $member->user; ?>'><img src='<?php echo $home.$basepath; ?>/members/icons/actions/button_cancel.png' border="0"></a> </td> *************** *** 65,67 **** <?php } ?> </table><br> ! <?php include_once($footer); ?> \ No newline at end of file --- 65,67 ---- <?php } ?> </table><br> ! <?php include_once($footer); ?> |