<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<script language="Javascript1.1" src="ei_vert.js"></script>
	<title>TrakSoft. Professional Software</title>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
	<meta name="description" content="TrakSoft.  Professional Software for Government and Business, Computer Information Systems and Management Consulting.">
	<link href="2.css" type="text/css" rel="stylesheet">
	
	<meta name="keywords" content="systems design, development, integration, system migration, systems analysis, systems maintenance, systems support, project management, recruitment, project oversight, database, database design, database administration, dba, desktop, client/server, data modeling, architecture, data warehouse, implementation, data collection, data mining, data analysis, data conversion, data migration, geographic information systems, gis, change management, configuration management, internet, web application development, security analysis, risk analysis, feasibility analysis, business process reengineering, it auditing, software testing, validation, verification, professional development, education, training, staff augmentation, technical writing, ecommerce, government, internetworking, it, jobs, object oriented, process engineering, process re-engineering, programming, resume, software engineering, software maintenance, standards, systems planning, transact sql, windows development, windows xp">

</head>

<body link="#808080" vlink="#808080" alink="#808080" style="background-image: url(images/bg.gif); margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;">

<table border="0" width="694" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%">
    <img border="0" src="images/topx.jpg" width="693" height="52"><br>
    <img src="images/bar0Copyx2.jpg" width="224" height="18"><a HREF="index.htm" onmouseover="tabOn(&quot;1&quot;)" onmouseout="tabOff(&quot;1&quot;)"><img SRC="images/bar1.gif" BORDER="0" name="ft1" hspace="0" vspace="0" alt="Home" width="59" height="18"></a><a HREF="about.htm" onmouseover="tabOn(&quot;2&quot;)" onmouseout="tabOff(&quot;2&quot;)"><img SRC="images/bar2.gif" BORDER="0" name="ft2" hspace="0" vspace="0" alt="About Us" width="75" height="18"></a><a HREF="products.htm" onmouseover="tabOn(&quot;3&quot;)" onmouseout="tabOff(&quot;3&quot;)"><img SRC="images/bar3.gif" BORDER="0" name="ft3" hspace="0" vspace="0" alt="Products" width="70" height="18"></a><a HREF="services.htm" onmouseover="tabOn(&quot;4&quot;)" onmouseout="tabOff(&quot;4&quot;)"><img SRC="images/bar4.gif" BORDER="0" name="ft4" hspace="0" vspace="0" alt="Services" width="72" height="18"></a><a HREF="release.htm" onmouseover="tabOn(&quot;5&quot;)" onmouseout="tabOff(&quot;5&quot;)"><img SRC="images/bar5.gif" BORDER="0" name="ft5" hspace="0" vspace="0" alt="News &amp; Release" width="109" height="18"></a><a HREF="contact.htm" onmouseover="tabOn(&quot;6&quot;)" onmouseout="tabOff(&quot;6&quot;)"><img SRC="images/bar6.gif" BORDER="0" name="ft6" hspace="0" vspace="0" alt="Contact us" width="84" height="18"><br>
    </a><img border="0" src="images/top2.jpg" width="693" height="32"></td>
  </tr>
</table>

<table border="0" width="694" cellspacing="0" cellpadding="0">
  <tr>
    <td width="125" valign="top">
    <img border="0" src="images/picside.jpg" width="187" height="255"></td>
    <td width="583" valign="top"><br>
	
	<!-- *************START OF PAGE CONTENT********************* -->
	
	<h1>&nbsp;&nbsp;&nbsp;<img src="./images/Splash6.gif"><u><b>Admin View Page</b></u></h1>

<?php

//create short variable names
$user_id = $HTTP_POST_VARS['user_id'];
$password = $HTTP_POST_VARS['password'];
$view_type = $HTTP_POST_VARS['view_type'];

$user_id = trim(strtolower($user_id));
$password = trim(strtolower($password));

//CONNECT TO DB
require_once("support_conn.php");

//SET VARIABLE
$ok = false;

//VALIDATE ADMIN USER
$q1 = "select * from admin_users where TRIM(LOWER(user_id)) = '$user_id' 
		and (site = 'CA' or site = 'ALL') and TRIM(LOWER(password)) = '$password' ";
$result = mysql_query($q1);

if (!$result)
{
	die(mysql_error());
	exit;
}
else
{
if (mysql_num_rows($result) > 0)
	{$ok = true;}	
else		
	{$ok = false;}
}

//IF ADMIN USR IS IN DB
if ($ok)
{

//VIEW SUPPORT TICKETS
if ($view_type == 'S')
{

echo '<div align="left">';

echo '<table width="99%" border="0" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 12px;">';
echo '<tr bgcolor=#cccccc>';
echo '  <th width=10>Submit Date</th>';
echo '  <th width=280>Problem</th>';
echo '  <th width=280>Solution</th>';
echo '  <th width=10>Status</th>';
echo '  <th width=10>Action Date</th>';
echo '</tr>';

$q1 = "select * from support where site = 'CA' order by record_no";
$result = mysql_query($q1);
if (!$result)
{
	die(mysql_error());
	exit;
}
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
	echo "<tr>";
	echo "<td align=left valign=top>".$row["submit_date"]."</td>";
	echo "<td width=280 align=left valign=top>".$row["problem"]."</td>";
	echo "<td width=280 align=left valign=top>".$row["solution"]."</td>";
	echo "<td align=left valign=top>".$row["status"]."</td>";
	echo "<td align=left valign=top>".$row["date_resolved"]."</td>";
	echo "</tr>";
}
}

//VIEW FEEDBACK
elseif ($view_type == 'F')
{

echo '<div align="left">';

echo '<table width="99%" border="0" style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 12px;">';
echo '<tr bgcolor=#cccccc>';
echo '  <th width=10>Submit Date</th>';
echo '  <th width=4>QU 1</th>';
echo '  <th width=100>Comments 1</th>';
echo '  <th width=4>QU 2</th>';
echo '  <th width=100>Comments 2</th>';
echo '  <th width=4>QU 3</th>';
echo '  <th width=100>Comments 3</th>';
echo '  <th width=4>QU 4</th>';
echo '  <th width=100>Comments 4</th>';
echo '  <th width=4>QU 5</th>';
echo '  <th width=100>Comments 5</th>';
echo '  <th width=4>QU 6</th>';
echo '  <th width=100>Comments 6</th>';
echo '  <th width=4>Buy</th>';
echo '  <th width=100>Explain Purchase</th>';
echo '  <th width=100>Suggestions</th>';
echo '</tr>';


$q1 = "select * from survey1 where site = 'CA' order by rec_no";
$result = mysql_query($q1);
if (!$result)
{
	die(mysql_error());
	exit;
}
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
	echo "<tr>";
	echo "<td align=left valign=top>".$row["submit_date"]."</td>";
	echo "<td width=4 align=left valign=top>".$row["ques1"]."</td>";
	echo "<td width=100 align=left valign=top>".$row["comment1"]."</td>";
	echo "<td width=4 align=left valign=top>".$row["ques2"]."</td>";
	echo "<td width=100 align=left valign=top>".$row["comment2"]."</td>";
	echo "<td width=4 align=left valign=top>".$row["ques3"]."</td>";
	echo "<td width=100 align=left valign=top>".$row["comment3"]."</td>";
	echo "<td width=4 align=left valign=top>".$row["ques4"]."</td>";
	echo "<td width=100 align=left valign=top>".$row["comment4"]."</td>";
	echo "<td width=4 align=left valign=top>".$row["ques5"]."</td>";
	echo "<td width=100 align=left valign=top>".$row["comment5"]."</td>";
	echo "<td width=4 align=left valign=top>".$row["ques6"]."</td>";
	echo "<td width=100 align=left valign=top>".$row["comment6"]."</td>";
	echo "<td width=4 align=left valign=top>".$row["buy1"]."</td>";
	echo "<td width=100 align=left valign=top>".$row["purch_explain"]."</td>";
	echo "<td width=100 align=left valign=top>".$row["suggestions"]."</td>";
	echo "</tr>";
}

}

}

?>

</table>
</div>	

</td>
</tr>
</table>
    
	
	
	
	<br><br>
	
	<!-- *****************END OF PAGE CONTENT***************** -->
	
	<!-- MENU AT BOTTOM OF PAGE -->
    <p align="center" style="font-family: Arial, Helvetica, sans-serif; font-size: 9px;">
			<a href="index.htm" style="font-family: Arial, Helvetica, sans-serif; font-size: 10px;">Home</a> : 
			<a href="about.htm" style="font-family: Arial, Helvetica, sans-serif; font-size: 10px;">About</a> : 
			<a href="services.htm" style="font-family: Arial, Helvetica, sans-serif; font-size: 10px;">Services</a> : 
			<a href="products.htm" style="font-family: Arial, Helvetica, sans-serif; font-size: 10px;">Products</a> : 
    		<a href="contact.htm" style="font-family: Arial, Helvetica, sans-serif; font-size: 10px;">Contacts</a> : 
			<a href="release.htm" style="font-family: Arial, Helvetica, sans-serif; font-size: 10px;">News &amp; Release</a>
	</p>
    
	<hr size="1">
    
	<div align="center" style="font-family: Arial, Helvetica, sans-serif; font-size: 9px;">
		Copyright © 2001 - 2005 TrakSoft.&nbsp; All Rights Reserved.
	</div>
	
    
	</td>
  </tr>
</table>

<div align="right"> 
<a href="elist.htm"></a>
<a href="elist2.htm"></a> 
</div>

</body>

</html>
