<?php
//Connection statement
require_once('../Connections/guest_acct.php');

// begin Recordset
$query_sponsor = "SELECT concat(name,', ',first_name,' - ', pcs_code) as sponsor, pcs_code FROM clients WHERE pcs_code != '_nobody' ORDER BY sponsor ASC";
$sponsor = $guest_acct->SelectLimit($query_sponsor) or die($guest_acct->ErrorMsg());
$totalRows_sponsor = $sponsor->RecordCount();
// end Recordset

//PHP ADODB document - made with PHAkt 2.8.2
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="/~pcs/css/default.css" rel="stylesheet" type="text/css">
<title>Account Request Form</title>
</head>

<body>
<h1>Account Request Form</h1>

<h2>Submission Form </h2>
<form action="account_request_form_2.php" method="post" name="account_req" id="account_req">
  <table  border="0" cellspacing="0" cellpadding="3">
    <tr>
      <td colspan="5" scope="col"><h3>Account Information </h3></td>
    </tr>
    <tr class="mediumFont">
      <td colspan="5">&nbsp;</td>
    </tr>
    <tr class="mediumFont">
      <td>First Name </td>
      <td><input name="first_name" type="text" id="first_name" value="<?php echo $_POST['first_name']; ?>"></td>
      <td>&nbsp;</td>
      <td>Innitial Password<sup>3)</sup>: </td>
      <td><input name="password" type="text" id="password" value="<?php echo $_POST['password']; ?>"></td>
    </tr>
    <tr class="mediumFont">
      <td>Last Name </td>
      <td><input name="last_name" type="text" id="last_name" value="<?php echo $_POST['last_name']; ?>"></td>
      <td>&nbsp;</td>
      <td>Account Name<sup>2), 4)</sup>: </td>
      <td><input name="account_name" type="text" id="account_name" value="<?php echo $_POST['account_name']; ?>"></td>
    </tr>
    <tr class="mediumFont">
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td><strong>Account Type</strong></td>
      <td class="smallFont">(for Helios accounts only) </td>
    </tr>
    <tr class="mediumFont">
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td class="mediumFont"><input <?php if (!(strcmp($_POST['acct_type'],"Normal"))) {echo "CHECKED";} ?> name="acct_type" type="radio" value="Normal">
      Normal (500 MB) </td>
      <td>&nbsp;</td>
    </tr>
    <tr class="mediumFont">
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td class="mediumFont"><input <?php if (!(strcmp($_POST['acct_type'],"Power User 1"))) {echo "CHECKED";} ?> name="acct_type" type="radio" value="Power User 1">
      Power User 1 (750 MB) </td>
      <td>&nbsp;</td>
    </tr>
    <tr class="mediumFont">
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td class="mediumFont"><input <?php if (!(strcmp($_POST['acct_type'],"Power User 2"))) {echo "CHECKED";} ?> name="acct_type" type="radio" value="Power User 2">
      Power User 2 (1500 MB)</td>
      <td>&nbsp;</td>
    </tr>
    <tr class="mediumFont">
      <td colspan="5"><h3>Contact Information </h3></td>
    </tr>
    <tr class="mediumFont">
      <td>Room</td>
      <td><input name="room" type="text" id="room" value="<?php echo $_POST['room']; ?>"></td>
      <td>&nbsp;</td>
      <td><strong>Sponsor</strong></td>
      <td><select name="sponsor" id="sponsor">
        <option value="0">chose one</option>
        <?php
  while(!$sponsor->EOF){
?>
        <option value="<?php echo $sponsor->Fields('pcs_code')?>"><?php echo $sponsor->Fields('sponsor')?></option>
        <?php
    $sponsor->MoveNext();
  }
  $sponsor->MoveFirst();
?>
        

      </select></td>
    </tr>
    <tr class="mediumFont">
      <td>Work Phone</td>
      <td><input name="office_phone" type="text" id="office_phone" value="<?php echo $_POST['office_phone']; ?>"></td>
      <td>&nbsp;</td>
      <td>UofT account no. </td>
      <td><input name="acct_no" type="text" id="acct_no" value="<?php echo $_POST['acct_no']; ?>"></td>
    </tr>
    <tr class="mediumFont">
      <td>Home Phone (opt) </td>
      <td><input name="home_phone" type="text" id="home_phone" value="<?php echo $_POST['home_phone']; ?>"></td>
      <td>&nbsp;</td>
      <td>expiry date of account</td>
      <td><input name="expiry" type="text" id="expiry" value="<?php echo $_POST['expiry']; ?>">
leave blank for none</td>
    </tr>
    <tr class="mediumFont">
      <td>Existing email </td>
      <td><input name="email" type="text" id="email" value="<?php echo $_POST['email']; ?>"></td>
      <td>&nbsp;</td>
      <td>supported by sponsor<sup>5)</sup></td>
      <td><select name="percentage" id="percentage">
        <option value="1" <?php if (!(strcmp(1, $_POST['percentage']))) {echo "SELECTED";} ?>>100%</option>
        <option value="0.75" <?php if (!(strcmp(0.75, $_POST['percentage']))) {echo "SELECTED";} ?>>75%</option>
        <option value="0.50" <?php if (!(strcmp(0.50, $_POST['percentage']))) {echo "SELECTED";} ?>>50%</option>
        <option value="0.25" <?php if (!(strcmp(0.25, $_POST['percentage']))) {echo "SELECTED";} ?>>25%</option>
      </select>
      % of amount </td>
    </tr>
    <tr class="mediumFont">
      <td>Status</td>
      <td><select name="status" id="status">
        <option value="0" <?php if (!(strcmp(0, $_POST['status']))) {echo "SELECTED";} ?>>choose one</option>
        <option value="Professor" <?php if (!(strcmp("Professor", $_POST['status']))) {echo "SELECTED";} ?>>Professor</option>
        <option value="Post Doctorate" <?php if (!(strcmp("Post Doctorate", $_POST['status']))) {echo "SELECTED";} ?>>Post Doctorate</option>
        <option value="Ph D Student" <?php if (!(strcmp("Ph D Student", $_POST['status']))) {echo "SELECTED";} ?>>Ph D Student</option>
        <option value="Masters Student" <?php if (!(strcmp("Masters Student", $_POST['status']))) {echo "SELECTED";} ?>>Masters Student</option>
        <option value="Undergraduate" <?php if (!(strcmp("Undergraduate", $_POST['status']))) {echo "SELECTED";} ?>>Undergraduate</option>
        <option value="Summer Student" <?php if (!(strcmp("Summer Student", $_POST['status']))) {echo "SELECTED";} ?>>Summer Student</option>
        <option value="Non-academic Staff" <?php if (!(strcmp("Non-academic Staff", $_POST['status']))) {echo "SELECTED";} ?>>Non-academic Staff</option>
        <option value="Other" <?php if (!(strcmp("Other", $_POST['status']))) {echo "SELECTED";} ?>>Other </option>
      </select></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr class="mediumFont">
      <td>&nbsp;</td>
      <td><input type="submit" name="Submit" value="Submit">
      <input type="reset" name="Reset" value="Reset"></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
</form>
<h2>Notes</h2>
<p class="info">
<ol>
  
  <li><strong>Account name</strong>: The login name will be no longer than 8 characters and will be composed of the first name initial followed by the last name. The last name will be cut when the login name reaches the length of 8 characters. If you open accounts on more than one server the login name should be the same for all.</li>
  <li><strong>Password</strong>: Your account will be set up with the initial password you specified. You MUST change your password the first time you log in to the system. Passwords resembling dictionary names are not accepted by the system.</li>
  <li><strong>Email</strong>: Your full name will appear as shown below on all outgoing electronic mail. If you want to change your Email address to something different than your account name, you can get an alternate address name (alias)</li>
  <li><strong>Sponsor Support</strong>: Usually graduate students in the 1<sup>st</sup> year of study are supported by the graduate office. If they have a supervisor / sponsor this will pay 25% from the total amount of networking. The rest will be paid by the graduate office. </li>
</ol>
</p>
</body>
</html>
<?php
$sponsor->Close();

?>
