<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
	<title>Student Office of Financial Aid</title>
	
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

	<link href="css/stylesheet.css" type="text/css" rel="stylesheet" />

	<script type="text/javascript" src="scripts.js"></script>
	<script src="sorttable.js" type="text/javascript"></script>	
	
</head>

<body class="content">

<!--chtml include "nav.inc"-->

<!-- MAIN PAGE CONTENT -->


	<h2>UW Employer Work Study Positions</h2>
	
	
	<div id="table">
<?php
	$db_host = 'uwfinaid.ovid.u.washington.edu:3798';
	$db_user = root;
	$db_pwd = '03798';
	$database = 'workstudy';
	$table = 'onCampus';

	if (!($GLOBALS["___mysqli_ston"] = mysqli_connect($db_host,  $db_user,  $db_pwd)))
		die("Can't connect to database");

	if (!((bool)mysqli_query($GLOBALS["___mysqli_ston"], "USE " . $database)))
		die("Can't select database");

	$result = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT jobTitle, orgName, location, category, jobNumber, id FROM {$table} WHERE status='open' AND jobNumber != '' ORDER BY id");

	if (!$result) {
		die("Query to show fields from table failed");
	}
	
	$fields_num = (($___mysqli_tmp = mysqli_num_fields($result)) ? $___mysqli_tmp : false);
	echo "<table class='sortable'>";
		echo "<thead>";
		echo "<tr>";
			echo "<th>Job Title</th>";
			echo "<th>Department</th>";
			echo "<th>Location</th>";
			echo "<th id='category'>Category</th>";
			echo "<th id='number'>Job Number</th>";
			echo "<th id='number'>ID</th>";
			echo "</tr>\n";
		echo "</thead>";
		echo "<tbody>";
			while($row = mysqli_fetch_row($result)){
				echo "<tr>";
				foreach($row as $cell){
					if($cell == $row[0])
						echo "<td><a href='report.php?id=$row[5]&table=$table&viewReport=View+Report'>$cell</a></td>";
					else
						echo "<td>$cell</td>";
				}
			}
		echo "</tbody>";
	echo "</table>";

	((mysqli_free_result($result) || (is_object($result) && (get_class($result) == "mysqli_result"))) ? true : false);


	?>
</div>
	
<!-- MAIN PAGE CONTENT -->				

<!-- From FOOTER.INC -->

			</div>
		</div>
	</div>	
	<div id="contentFooter"></div>


<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." 
: "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + 
"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-11922437-1");
pageTracker._trackPageview();
} catch(err) {}</script>



</body>

</html>

<!-- From FOOTER.INC -->

<!--Created by chtml 1.48 on Feb 3, 2011 10:18am-->


<!--
<body>
<input type="radio" value="onCampus" name="type" onClick="change()">On Campus Employer</input>

<input type="radio" value="offCampus" onClick="change()" name ="type">Off Campus Employer</input>

<br/>


<label for="street" id="streetL">Street Address:</label>
<input type="text" name="street" id="street"/>

<label for="city" id="cityL">City:</label>
<input type="text" name="city" id="city"/>

<label for="state" id="stateL">State:</label>
<input type="text" name="state" id="state"/>

<label for="zip" id="zipL">Zip Code:</label>
<input type="text" name="zip" id="zip"/>

<label for="boxNumber" id="boxL">Box Number:</label>
<input type="text" name="boxNumber" id="boxNumber"/>
</body>
</html>
-->
