<?
session_start();
if(strlen($user)<=0)
{
 print "<script> alert('You are not logged in') </script>";
 include("logout.php");
 return;
}

include("opendb.php");
?>
<title>PSN Telcon</title>
    <script type="text/javascript" src="scripts/jquery-latest.js"></script>
	<link type="text/css" href="includes/style1.css" rel="stylesheet" />
<link type="text/css" href="css/form.css" rel="stylesheet" />
    <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 >> Customer List(All)</font>
<br>
<table cellspacing=1 cellpadding=3 class='report'>
<th>No. <th>Name <th>A/C Name<th>Address <th>Dist <th>State <th> Pin <th>Phone <th>Mobile <th>Cramt<th>Crdays<th>Del
<?
$re=mysqli_query($db,"select * from customer where brcode='$brcode' order by acname")or die(mysqli_error($db));
$i=1;
while($row=mysqli_fetch_array($re))
{
 print "\n<form action='editcust.php'>\n<input type=hidden name='code' value='$row[1]'><input type=hidden name='acname' value='$row[5]'>";
 print "\n<tr ><td>".$i++."</td><td>$row[cname]</td><td>$row[acname]</td><td>$row[addr1]</td><td>$row[dist1]</td><td>$row[state1]</td><td>$row[pin1]</td><td>$row[phone1]</td>";
 print "<td>$row[mob]</td><td>$row[cramt]</td><td>$row[crdays]</td>

</tr></form>";
}
?>
</table>

<table cellspacing=1 cellpadding=3 class='report'>
<th>No. <th>Name <th>A/C Name<th>Address <th>Dist <th>State <th> Pin <th>Phone <th>Mobile <th>Cramt<th>Crdays<th>Branch
<?
$re1=mysqli_query($db,"select * from customer where brcode!='$brcode' order by brcode,acname")or die(mysqli_error($db));
$i=1;
while($row1=mysqli_fetch_array($re1))
{
 print "\n<form action='editcust.php'>\n<input type=hidden name='code' value='$row1[1]'>";
 print "\n<tr ><td>".$i++."</td><td>$row1[cname]</td><td>$row1[acname]</td><td>$row1[addr1]</td><td>$row1[dist1]</td><td>$row1[state1]</td><td>$row1[pin1]</td><td>$row1[phone1]</td>";
 print "<td>$row1[mob]</td><td>$row1[cramt]</td><td>$row1[crdays]</td><td>$row1[brcode]</td></tr></form>";
}
?>
</table>
</td></tr></table>

