<?php session_start();
if($_SESSION[invcox] == ""){
header("location:login.php?action=need");
}else{

include("config.php");?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Arnim Holidays Accounting Software</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=yes,width=500,height=350,left = 390,top = 312');");
}
// End -->
</script>
</head>

<body>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="1">
  <tr>
    <td><?php include("top.php")?></td>
  </tr>
  <tr>
    <td valign="top" class="center_page_white"><table width="100%" border="0" cellspacing="1" cellpadding="0">
      <tr>
        <td align="center" class="red"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="30" background="images/place_bg.jpg" class="link2"><strong>&nbsp;&nbsp;<a href="index.php">Home</a> &gt; <a href="accounts.php">Accounts &gt; </a>  Income View </strong></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td align="center" class="red"><strong>
		<?php 
		if($_GET[info] == 'success'){echo 'Submitted Successfully<br>';}echo date("F")."&nbsp;".date("Y");
		?>
		</strong></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="1" cellpadding="0">
        <tr>
          <td valign="top">            <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC">
              <tr>
                <td bgcolor="#999999"><strong>Total Income List </strong></td>
                    <td width="29%" bgcolor="#999999">&nbsp;</td>
                    </tr>
					  <tr>
                <td width="19%" bgcolor="#EFEFEF">Date</td>
                    <td bgcolor="#EFEFEF">Total Inocme </td>
                    </tr>
				  <?php 
			  
			  $dt=$_GET[dt];
			  
				  $result=mysql_query("select * from income where dt='$dt' group by cdate");
				  $row=mysql_fetch_array($result);
				  do{
				  ?>
            
              <tr>
                <td bgcolor="#FFFFFF" class="link">
				
				  <a href="view_cost_date_details.php?d=<?php echo $row[cdate];?>"><?php 
			  echo $row[cdate];
			  
			   ?></a></td>
                <td bgcolor="#FFFFFF" class="link"><a href="view_income_date_details.php?d=<?php echo $row[cdate];?>"><?php 
				$bresult=mysql_query("select SUM(amount)as camount from cost WHERE cdate='$row[cdate]'");
				$brow=mysql_fetch_array($bresult);
			echo $brow[camount];
				
				?></a></td>
                </tr>
					<?php }while($row=mysql_fetch_array($result));?>
            </table></td>
        </tr>
        <tr>
          <td><br />            </td>
        </tr>
      </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><?php include("bot.php")?></td>
  </tr>
</table>
</body>
</html>
<?php }?>