<?
session_start();
if(strlen($brcode)<=0)
{
 print "<script> alert('Session timed out'); parent.document.location='../ind.php'; </script>";
 return;
}

include("opendb.php");
include("test.php");
if($sv)
{
 $sql="insert into inqsource (source) values('$sour')";
 mysqli_query($db,$sql) or die(mysqli_error($db));
}
if($del)
{
 mysqli_query($db,"delete from inqsource where code='$code'");
}
?>

<head>
<title>PSN Telcon</title>
<link rel="stylesheet" href="style.css" type="text/css" />
<script type="text/javascript" src="scripts/jquery-latest.js"></script>
<link type="text/css" href="includes/style1.css" rel="stylesheet" />
<link rel="stylesheet" href="css/form.css" type="text/css" />
<script type="text/javascript">
        $(function() {
          if ($.browser.msie && $.browser.version.substr(0,1)<7)
          {
			$('li').has('ul').mouseover(function(){
				$(this).children('ul').show();
				}).mouseout(function(){
				$(this).children('ul').hide();
				})
          }
        });        
    </script>

<body background="back_ground.jpg">
<?php include('logo2.php'); ?>
<?php include('includes/top.php'); ?>
<br>
<table class="container"><tr><td>
<font style="font-family: 'Trebuchet MS',Verdana,Helvetica,sans-serif; font-size:15px;">  &nbsp;&nbsp;Master >> Inquiry Source</font>
<br>
<center>

<form action='<?print $PHP_SELF?>'>
<table class='form'>
<tr bgcolor='green'><th colspan='3'><font color='white'>INQUIRY SOURCE</font></th></tr>
<tr><td>Source</td><td><input type=text name='sour' size=40></td>
    <td><input type=submit value='Add' name='sv'></td>
</tr>
</table>
</form>
<hr>
<table cellspacing=1 cellpadding=3 class='report'>
<th> No <th> Source <th>Action
<?
$i=1;
$re=mysqli_query($db,"select * from inqsource order by source");
while($row=mysqli_fetch_array($re))
{
 print "\n<form action='$PHP_SELF'> <input type=hidden name='code' value='$row[0]'><tr ><td align=center>".$i++."</td><td>$row[1]</td>";
 print "<td align=center>\n<input type=submit value='Del' name='del'></td></tr></form>";
}
?>
</table>

</td></tr></table>

