5 include("include/session.php");
7 * User has submitted form without errors and user's
8 * account has been edited successfully.
10 if(isset($_SESSION['useredit'])){
11 unset($_SESSION['useredit']);
13 echo "<h2>User Account Edit Success!</h2>";
14 echo "<p><b>$session->username</b>, your account has been successfully updated. </p>";
18 * If user is not logged in, then do not display anything.
19 * If user is logged in, then display the form to edit
20 * account information, with the current email address
21 * already in the field.
23 if($session->logged_in ||
$session->isAdmin()){
26 <h1
>Editar cuenta del Instructor
: <?
echo $session->username
; ?
></h1
>
28 if($form->num_errors
> 0){
29 echo "<td><font size=\"2\" color=\"#ff0000\">".$form->num_errors
." error(s) found</font></td>";
32 <form action
="process.php" method
="POST">
33 <table align
="left" border
="0" cellspacing
="0" cellpadding
="3">
35 <td
>Clave actual
:</td
>
36 <td
><input type
="password" name
="curpass" maxlength
="30" value
="
37 <?echo $form->value("curpass
"); ?>"></td
>
38 <td
><?
echo $form->error("curpass"); ?
></td
>
42 <td
><input type
="password" name
="newpass" maxlength
="30" value
="
43 <? echo $form->value("newpass
"); ?>"></td
>
44 <td
><?
echo $form->error("newpass"); ?
></td
>
48 <td
><input type
="text" name
="email" maxlength
="50" value
="
50 if($form->value("email
") == ""){
51 echo $session->userinfo['email'];
53 echo $form->value("email
");
57 <td
><?
echo $form->error("email"); ?
></td
>
59 <tr
><td colspan
="2" align
="right">
60 <input type
="hidden" name
="subedit" value
="1">
61 <input type
="submit" value
="Edit Account"></td
></tr
>
62 <tr
><td colspan
="2" align
="left"></td
></tr
>