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

// begin Recordset
$query_device = "SELECT * FROM dev_type ORDER BY code ASC";
$device = $guest_acct->SelectLimit($query_device) or die($guest_acct->ErrorMsg());
$totalRows_device = $device->RecordCount();
// end Recordset

// begin Recordset
$query_sponsor = "SELECT concat(name,', ',first_name,' - ', pcs_code) as sponsor, pcs_code FROM clients WHERE name not in ('(not to be charged)', '-') 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">
<title>ip request form</title>
<link href="/~pcs/css/genericblue.css" rel="stylesheet" type="text/css">
</head>

<body>
<div id="superheader">
	| <a href="http://www.physics.utoronto.ca/services/pcs">PCS Group</a> 
	| <a href="http://www.physics.utoronto.ca/">Physics Department</a> 
	| <a href="http://www.artsci.utoronto.ca/">Arts and Science</a> 
	| <a href="http://www.utoronto.ca/">University of Toronto</a>
	|</div>
<div id="outer">
<div id="hdr">
	
<h1>IP Application Form</h1>
<p>Registration form for a desktop or server machine which needs<br>
to have a static IP address on the network</p>
</div>
<div id="bodyblock">

<h2>Notes</h2>
<ol>
  
<span class="info">The following form must be filled out when requesting a new IP address on the departmental networks.</span></span>

    <li class="info"><strong>Rate</strong>: The latest basic network access rate is $15.52 / month.</li>
    <li class="info"><strong>Naming Computers</strong>: Provided the desired name is not already taken, there are no restrictions to computer names.</li>
    <li class="info"><strong>Naming Printers</strong>: All the printer names will start with the prefix &ldquo;pr-&ldquo;. The printers that are already named will keep their names.</li>
  
  <li class="info"><strong>MAC Address: </strong>To be assigned a dynamic (DHCP) address, you must provide the ethernet hardware (MAC) address for your computer. If your computer has wireless network support, you will probably have two such addresses and will need to specify which one is attached to which interface (wired or wireless).
</li>
</ol>
<h2>Submission Form </h2>
<form action="ip_application_form_2.php" method="post" name="ip_request" id="ip_request">
  <table  border="0" align="center" cellpadding="3" cellspacing="0">
    <tr>
      <th><strong>Network</div></th>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <th><strong>Hardware</strong></th>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <th>Choose network</th>
	  <td>
	    <p>
	  <select name="network" id="network">
        <option value="empty">don't know</option>
        <option value="128.100.75.0">128.100.75.0</option>
		<option value="128.100.78.0">128.100.78.0</option>
		<option value="128.100.79.0">128.100.79.0</option>
		<option value="128.100.80.0">128.100.80.0</option>
		<option value="128.100.86.0">128.100.86.0</option>
		<option value="128.100.93.0">128.100.93.0</option>
		<option value="128.100.107.0">128.100.107.0</option>
		<option value="128.100.148.0">128.100.148.0</option>
      </select>
        </p>
      </td>
      <td>&nbsp;</td>
      <td>device type </td>
      <td><select name="dev_type" id="dev_type">
        <option value="0">choose one</option>
        <?php
  while(!$device->EOF){
?>
        <option value="<?php echo $device->Fields('description')?>"><?php echo $device->Fields('description')?></option>
        <?php
    $device->MoveNext();
  }
  $device->MoveFirst();
?>

      </select></td>
    </tr>
    <tr>
      <td>Location</td>
      <td><input name="room" type="text" id="room" size="30"></td>
      <td>&nbsp;</td>
      <td>MAC Address </td>
      <td><input name="mac" type="text" id="mac" size="30"></td>
    </tr>
    <tr>
      <td>Name of the machine </td>
      <td><input name="name1" type="text" id="name1" size="30"></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Alternate name </td>
      <td><input name="name2" type="text" id="name2" size="30"></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Replacing old machine with IP </td>
      <td><input name="old_ip" type="text" id="old_ip" size="30"></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td><img name="" src="" width="1" height="3" alt=""></td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <th><strong>Contact information </strong></th>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <th><strong>Sponsor</strong></th>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Owner of the machine </td>
      <td><input name="owner" type="text" id="owner_name" size="30"></td>
      <td>&nbsp;</td>
      <td>Name</td>
      <td><select name="sponsor" id="sponsor">
        <option value="empty">choose 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>
      <td>Office</td>
      <td><input name="owner_office" type="text" id="owner_office" size="30"></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Phone</td>
      <td><input name="owner_phone" type="text" id="owner_phone" size="30"></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Email</td>
      <td><input name="owner_email" type="text" id="owner_email" size="30"></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td>Additional Notes:</td>
       <td colspan="5"><input name="notes" type="text" id="notes" size="90" value="<?php echo $_POST['notes']; ?>">
    </tr>
    <tr>
      <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>
</div>
<div id="ftr">2008 Physics Computing Services</div>
</div>
</body>
</html>
<?php
$device->Close();

$sponsor->Close();

?>
