<table width="200" border="0" align="center">
  <tr>
    <td><a href="http://ul.uc.edu/uclit/teaming/equipment/add_home.php"><img src="addequip.jpg" alt="Add" width="120" height="50" border="0" /></a></td>
    <td><a href="http://ul.uc.edu/uclit/teaming/equipment/sel_allequiptdetail.php"><img src="equipbydept.jpg" alt="dept" width="120" height="50" border="0" /></a></td>
    <td><a href="http://ul.uc.edu/uclit/teaming/equipment/show_move.php"><img src="searchequip.jpg" alt="search" width="120" height="50" border="0" /></a></td>
    <td><a href="http://ul.uc.edu/uclit/teaming/equipment/show_assignequipt.php"><img src="Assign.jpg" alt="assign" width="120" height="50" border="0" /></a></td>
    <td><a href="http://ul.uc.edu/uclit/teaming/equipment/printmon.php"><img src="printmon.jpg" alt="print" width="120" height="50" border="0" /></a></td>
  </tr>
</table>

<?php
	include('/var/www/html/uclit/protected/connections/db_equip.php');

	$db = mysql_select_db('equipment', $equipConn) or die ("Unable to select equipment database.");
	
	
	
	
	if (isset($_POST['monitor_serial']))
	{
		$mserial = $_POST['monitor_serial'];
		$room = $_POST['stock_room'];
		$sql = "SELECT * FROM monitors WHERE monitor_serial='$mserial'";
		$sql_result = mysql_query($sql, $equipConn) or die ("Unable to exercute query.<p>$sql</p>");
	
		while($row = mysql_fetch_array($sql_result))
		{
						$monitor_make = strtoupper($row['monitor_make']);
			$monitor_model = $row['monitor_model'];
			$monitor_serial = strtoupper($row['monitor_serial']);
			$monitor_uc = strtoupper($row['monitor_uc_property_num']);
			$monitor_lock_key = strtoupper($row['monitor_lock_key']);
			$monitor_size = $row['monitor_size'];
			$monitor_type = $row['monitor_type'];
			$monitor_room = $row['monitor_room'];
			
			
			
			
			
				$display_block = "<table>
					   <tr><td><strong>Monitor Make:</strong>&nbsp;<i>$monitor_make</i><td></tr>
					   <tr><td><strong>Monitor Model:</strong>&nbsp;<i>$monitor_model</i>&nbsp;&nbsp;</td></tr>
					   <tr><td><strong>Monitor Serial:</strong>&nbsp;<i>$monitor_serial</i></td></tr>
					   <tr>
					     <td>
					       <strong>Monitor UC Property:</strong>&nbsp;<i>$monitor_uc</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					       <strong>Monitor Lock Key:</strong>&nbsp;<i>$monitor_lock_key</i>
					     </td>
					   </tr>		
					   <tr>
					     <td>
					       <strong>Monitor Size:</strong>&nbsp;<i>$monitor_size</i>&nbsp;&nbsp;&nbsp;&nbsp;
					       <strong>Monitor Type:</strong>&nbsp;<i>$monitor_type</i>
					     </td>
					   </tr>
					   <tr>
					    	<td>
							<strong>Stock Room:</strong>&nbsp;<i>$monitor_room</i>&nbsp;&nbsp;&nbsp;&nbsp;
							</td>
							</tr>
							
					   
				</table>";
		}
		
		$today = date("Y-m-d");  
		
		$sqlupdate = "UPDATE monitors SET monitor_room='$room' WHERE monitor_serial='$mserial'";
		$sql_result = mysql_query($sqlupdate, $equipConn) or die ("Unable to exercute query.<p>$sqlupdate</p>");		//echo"Change Date Successfull.";
		
		//$sqlprod = "DELETE from equipment_detail WHERE computer_serial='$cserial'";
		//$sql_result = mysql_query($sqlprod, $equipConn) or die ("Unable to exercute query.<p>$sqlprod</p>");
		//echo"Delete Production Successfull.";
		
		//end while

		echo "<h2>Monitor '$monitor_serial ' has been sent to Stock Room: $room</h2>
			  $display_block
			  <br /> <a href='show_move.php'>Search for another Monitor</a>";
		}	
	else  
	{
		header("Location: ./uclit/protected/itstaff/show_pcsearch.php");
		exit;				
	}
		
?>