Changeset 704 for trunk/phpbms/modules/base/myaccount.php
- Timestamp:
- 01/01/10 23:10:02 (2 years ago)
- Files:
-
- 1 modified
-
trunk/phpbms/modules/base/myaccount.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpbms/modules/base/myaccount.php
r703 r704 1 <?php 1 <?php 2 2 /* 3 3 $Rev: 186 $ | $LastChangedBy: brieb $ … … 43 43 require_once("include/myaccount.php"); 44 44 45 $user = new myAccount($db, $_SESSION["userinfo"]["uuid"]); 46 47 if(isset($_POST["command"])){ 48 49 switch($_POST["command"]){ 50 51 case "Change Password": 52 53 if($_POST["newPass"] === $_POST["confirmPass"]) 54 $statusmessage = $user->changePassword($_POST["curPass"], $_POST["newPass"]); 55 else 56 $statusmessage = "New password not confirmed"; 57 break; 58 59 case "Update Contact": 60 61 $statusmessage = $user->update($_POST); 62 break; 63 64 }//endswitch 65 66 }//endif 67 45 68 $pageTitle="My Account"; 46 69 … … 57 80 $theinput = new inputField("phone",$_SESSION["userinfo"]["phone"],"phone/extension",false,"phone",32,64); 58 81 $theform->addField($theinput); 59 82 60 83 $theform->jsMerge(); 61 84 //============================================================== 62 //End Form Elements 63 85 //End Form Elements 86 64 87 include("header.php"); 65 88 ?><div class="bodyline"> 66 <form action="<?php echo $_SERVER["PHP_SELF"]?>" method="post" name="record" id="record" onsubmit="return false">89 <form action="<?php echo htmlentities($_SERVER["PHP_SELF"])?>" method="post" name="record" id="record" onsubmit="return false"> 67 90 <input type="hidden" id="command" name="command" value=""/> 68 91 69 92 <h1><span><?php echo $pageTitle ?></span></h1> 70 93 … … 73 96 <p id="nameP"><?php echo htmlQuotes($_SESSION["userinfo"]["firstname"]." ".$_SESSION["userinfo"]["lastname"])?></p> 74 97 </fieldset> 75 98 76 99 <fieldset> 77 100 <legend>Change Password</legend> … … 80 103 <input type="password" id="curPass" name="curPass" maxlength="32"/> 81 104 </p> 82 105 83 106 <p> 84 107 <label for="newPass">new password</label><br /> … … 93 116 <button type="button" class="Buttons" onclick="changePass()">Change Password</button> 94 117 </p> 95 118 96 119 <fieldset> 97 120 <legend>Contact Information</legend> 98 121 99 122 <p><?php $theform->showField("email")?></p> 100 123 101 124 <p><?php $theform->showField("phone")?></p> 102 125 103 126 </fieldset> 104 127 <p><button type="button" class="Buttons" onclick="changeContact()">Update Contact Information</button></p> 105 128 106 129 <fieldset> 107 130 <legend>Access / Assigned Roles</legend> 108 131 <ul> 109 <?php 132 <?php 110 133 if($_SESSION["userinfo"]["admin"]) {?><li><strong>Administrator</strong></li><?php } 111 displayRoles($db)134 $user->displayRoles(); 112 135 ?></ul> 113 136 </fieldset>