Location: PHPKode > projects > FreeSMS (Free Student Management System) > FreeSMS/pages/data/crc_profile_main.html
<form name="profile" action="crc_handler.php?method=profile&func=update" method="post">
<input type="hidden" name="context" value="ou=Don Mills,ou=Toronto,ou=Ontario,ou=Canada,o=CRC World">
<table width="500">
		<tr>
		<td valign="top" width="80">

			<!--
			This is the menu
			-->
			<br><br>

				<?php
					include "../common/crc_menu.html";
				?>

		</td>

		<td valign="top" align="left" width="420">

			<br>

	<table class="std">

    <?php
		$len = strlen($_SESSION['msg']);
		if ($len > 0) {
    		print('<tr><td class="error"><br>' . $_SESSION['msg'] . '<br></td></tr>');
		}
        $data = $_SESSION["profiledata"];
		if ($data != NULL) {
		print '<tr>';
			print '<th colspan="2"><em>Edit User Profile</em></th>';
		print '</tr>';
          print '<tr><td><br>';
          print 'Please note that fields with "[<span class="error">*</span>]" are mandatory.';
		      print '<tr><br><td>';
				print '<table  width="400" align="left" border="0" cellpadding="6" cellspacing="0">';
          //print '<table class="CENTER" align="center" cellpadding="0" cellspacing="0">';
    		  print '<tr>';
          print '</tr>';
          print '<tr>';
          print '<td><input type="hidden" name="roleid" value="' . $data[20] . '" class="text"><br></td>';
          print '</tr>';
          print '<tr>';
          print '<td><input type="hidden" name="profileid" value="' . $_SESSION['profileid'] . '" class="text"></td>';
          print '</tr>';
          print '<tr>';
          print '<td>Password: </td>';
          print '<td><input type="password" name="password" size="15" value="' . $data[2] . '" class="text"> [<span class="error">*</span>]</td>';
          print '</tr>';
          print '<tr>';
          print '<td>Given Name: </td>';
          print '<td><input type="text" name="fname" size="15" value="' . $data[3] . '" class="text"> [<span class="error">*</span>]</td>';
          print '</tr>';
          print '<tr>';
          print '<td>Surname: </td>';
          print '<td><input type="text" name="lname" size="15" value="' . $data[4] . '" class="text"> [<span class="error">*</span>]</td>';
          print '</tr>';
    		  print '<tr>';
          print '<td>Email: </td>';
          print '<td><input type="text" name="email" size="40" value="' . $data[5] . '" class="text"> [<span class="error">*</span>]</td>';
          print '</tr>';
    		  print '<tr>';
          print '<td>Gender: </td>';
          print '<td><select name="gender" class="text">';

          if ($data[7] = 'M') {
            print("<option selected>Male</option>");
            print("<option>Female</option>");
          } else {
            print("<option>Male</option>");
            print("<option selected>Female</option>");
          }

          print '    </select> [<span class="error">*</span>]';
          print '</td>';
        print '</tr>';
    		print '<tr>';
          print '<td>Date of Birth: &nbsp;</td>';
          print '<td><input type="text" name="day" size="2" value="' . substr($data[6], 8, 2) . '" class="text">-<input type="text" name="month" size="2" value="' . substr($data[6], 5, 2) . '" class="text">-<input type="text" name="year" size="4" value="' . substr($data[6], 0, 4) . '" class="text"> (DD-MM-YYYY) [<span class="error">*</span>]';
          print '</td>';
        print '</tr>';
    		print '<tr>';
          print '<td>Address: </td>';
          print '<td><input type="text" name="add1" size="40" value="' . $data[11] . '" class="text"> [<span class="error">*</span>]</td>';
        print '</tr>';
    		print '<tr>';
          print '<td></td>';
          print '<td><input type="text" name="add2" size="40" value="' . $data[12] . '" class="text"></td>';
        print '</tr>';
    		print '<tr>';
          print '<td>City: </td>';
          print '<td><input type="text" name="city" size="30" value="' . $data[13] . '" class="text"> [<span class="error">*</span>]</td>';
        print '</tr>';
    		print '<tr>';
          print '<td>Province: </td>';
          print '<td><input type="text" name="province" size="2" value="' . $data[14] . '" class="text"> [<span class="error">*</span>]</td>';
        print '</tr>';
    		print '<tr>';
          print '<td>Country: </td>';
          print '<td><input type="text" name="country" size="30" value="' . $data[16] . '" class="text"> [<span class="error">*</span>]</td>';
        print '</tr>';
    		print '<tr>';
          print '<td>Postal Code: </td>';
          print '<td><input type="text" name="pc" size="15" value="' . $data[15] . '" class="text"> [<span class="error">*</span>]</td>';
        print '</tr>';
    		print '<tr>';
          print '<td>Phone: </td>';
          print '<td>(<input type="text" name="lcode" size="3" value="' . substr($data[17], 0, 3) . '" class="text">) ';
              print '<input type="text" name="lprefix" size="3" value="' . substr($data[17], 3, 3) . '" class="text">-';
              print '<input type="text" name="lpostfix" size="4" value="' . substr($data[17], 6, 4) . '" class="text"> [<span class="error">*</span>]';
          print '</td>';
        print '</tr>';
  	print '<tr>';
      print '<td colspan="3" align="center"><BR/><input type="button" onclick="javascript:verify(\'profile\');" name="update" value="Update" class="button">';
		  print '</td>';
    print '</tr>';
      print '</table>';

      } else {

          print '<tr><td><br>';
          print 'Sorry, there was an error trying to retrieve your profile. Please contact a CRC member for support.';
		      print '<br>';

      }

          ?>
      </td>
    </tr>


	<table>
</form>

Return current item: FreeSMS (Free Student Management System)