<?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=1,resizable=yes,width=800,height=500,left = 100,top = 100');");

}

// End -->



function cash(i){

document.getElementById('Paid By').style.display = 'none';

document.getElementById(i).style.display = 'block';

}

</script>

<style type="text/css">
<!--
.style2 {color: #DC147B;
	font-weight: bold;
}
.style3 {color: #000000}
-->
</style>
	<?php include("calendar.php")?>
			<style type="text/css">
			<!-- .style2 {
				color: #DC147B;
				font-weight: bold;
			}
			
			.style3 {
				color: #000000
			}
			
			    .print-btn {
        background-color: #007bff;
        color: white;
        padding: 10px 18px;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-size: 16px;
        transition: 0.3s;
    }

    .print-btn:hover {
        background-color: #0056b3;
    }
			-->

		</style>
</head>



<body>

<table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" class="box-wrap">

  <tr>

    <td><?php include("top.php")?></td>
  </tr>

  <tr>

    <td><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>  Add <a href="all_cost.php">Cost </a></strong></td>
      </tr>

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

  <tr>

    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="center" valign="top" class="round_box"><form action="token_insert.php" method="post" enctype="multipart/form-data" name="form1" id="form3">
      <span class="red"><strong>
        <?php if($_GET[info] == 'y'){echo 'Added Successfully';}?>
        </strong></span>
      <table width="100%" border="0" cellpadding="3" cellspacing="2" bordercolor="#999999">
        <tr>
          <td colspan="2" ><strong>Token</strong></td>
        </tr>
        <tr>
          <td width="171" >Date</td>
          <td ><table width="180" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="70%"><input name="cdate" type="text" id="cdate" size="15"  value="<?php echo date("d-m-Y");?>" required="required"/></td>
              <td width="30%" align="center"><a title="Calendar" onclick="displayDatePicker('cdate', this);" href="javascript:;"><img src="images/calendar.gif" width="20" height="20" border="0" /></a></td>
            </tr>
          </table></td>
        </tr>
        <tr>
          <td height="30" >Food Name</td>
          <td height="30"  class="input200"><input name="fn" type="text" required="required" id="fn" size="80" /></td>
        </tr>
        <tr>
          <td height="30" >Time </td>
          <td width="1453"  class="input200"><input name="time" type="text" required="required" id="time" value="7:00AM - 10:00AM" size="10" /></td>
        </tr>
        <tr>
          <td height="30" align="left" >RSV No: </td>
          <td height="30" align="left" ><span class="input200">
            <input name="rsv" type="text" required="required" id="rsv" size="80" />
          </span></td>
        </tr>
        <tr>
          <td height="30" align="left" >Total Token : </td>
          <td height="30" align="left" ><span class="input200">
            <input name="totalt" type="number" required="required" id="totalt" size="80" />
          </span></td>
        </tr>
        <tr>
          <td height="30" align="center" >&nbsp;</td>
          <td height="30" align="left" ><input type="submit" name="submit" id="submit" value="Submit"  style=" padding:
          10px"/></td>
        </tr>
      </table>
    </form></td>
  </tr>

  <tr>

    <td align="center" valign="top">&nbsp;</td>
  </tr>

  <tr>

    <td  class="round_box"><table width="100%" border="0" cellpadding="3" cellspacing="1" class="list_table">

          <tr>

            <td height="30" colspan="6" align="left" ><strong>All Token </strong></td>
          </tr>

          <tr>
            <th align="left" > Date</th>
            <th align="left" >Food Name</th>
            <th align="left" >Time</th>
            <th align="left" >RSV No: </th>
            <th align="left" >Total Token : </th>
            <th > Print</th>
        </tr>

		  <?php 

 
	
		  $dresult=mysql_query("select * from restaurent_token order by id desc  ");
		  $drow=mysql_fetch_array($dresult);

		  $total=0;

		  do{

		  ?>

          <tr>

          <td width="166" align="left"  class="link"><?php 

			 echo dtformat($drow[cdate]);

			?></td>
          <td width="153" align="left"  class="link"><?php echo $drow[fn]; ?></td>

            <td width="243" align="left"  class="link"><?php echo $drow[time]; ?></td>



            <td width="185" align="left"  class="link"> <?php echo $drow[rsv]; ?></td>
            <td width="223" align="left"  class="link"><?php echo $drow[totalt]; ?> </td>

            <td width="223"  class="link">	
			<button class="print-btn" onclick="popUp('restaurent_token_print.php?id=<?php echo $drow[id]; ?>');">Print</button>
			</div></td>
        </tr>

         

          <?php 

		  }while($drow=mysql_fetch_array($dresult));

		  ?>

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

  <tr>

    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><?php include("bot.php")?></td>
  </tr>
</table>

</body>

</html>

<?php }?>