<?php
session_start();
?>

<?php
//$pasali=(($_SESSION["pasali"])-591);

 $pasali=$_SESSION["pasali"]; 

      include "../include/mysql.php";

        include "../include/common.php";

		 extract($_REQUEST);

        $cbid=$val;

		 $icondn=" where cbid='$cbid'";


            $getticketinfo=$db->select(CB,"*",$icondn);

			$getticketinfo_fetch=$db->fetch($getticketinfo);

			$rate=$getticketinfo_fetch["rate"];

		$qty=$getticketinfo_fetch["qty"];

		$amount=$getticketinfo_fetch["amount"];

		$start_no=$getticketinfo_fetch["start_no"];

		$end_no=$getticketinfo_fetch["end_no"];

		$ticket_no=$getticketinfo_fetch["ticket_no"];

		$tid=$getticketinfo_fetch["tid"];

		 $tid_condn=" where tid='$tid'";

		$ticketname_select=$db->select(TM,"*",$tid_condn);

		$ticketname_select_fetch=$db->fetch($ticketname_select);

		$tname_eng=$ticketname_select_fetch["tname_eng"];

		$tname_tam=$ticketname_select_fetch["tname_tam"]; 


		$booking_date=date("d/m/Y",strtotime($getticketinfo_fetch["booking_date"]));

		$booking_time=$getticketinfo_fetch["booking_time"];

		if($qty==1)
		{
           
		   $sno_display=$start_no;

		}
		else
		{

            $sno_display=$start_no ."-" .$end_no;

		}


			echo $table="<table  align='center' style='height:70mm' ><tr><td><table align='center' style='text-align:center;font-size:11px;font-weight:bold;'><tr><td align='center'>அருள்மிகு மீனாட்சி சுந்தரேசுவரர்<br> திருக்கோவில் <br>மதுரை</td></tr></table>
					
					<table  style='width:100%;font-size:13px;'><tr><td align='left' width='30%'>$booking_date</td><td width='40%'></td><td align='right' width='30%'><b>$sno_display</b></td></tr><tr><td align='left'>$booking_time</td><td align='center'><b>$pasali / $ticket_no</b></td><td align='right'></td></tr></table>
					
					<table style='width:100%;background-color:#000;color:#FFF;height:40px;position: relative;background-repeat:repeat;'><tr><td align='center'><b>$tname_eng</b></td></tr><tr><td align='center'><b>$tname_tam</b></td></tr></table><table  style='width:100%;'><tr><td align='center' style='font-weight:bold;'>விலை $rate/-</td></tr></table>
					
					<table  style='width:100%;font-size:14px;'>
					<tr><td align='left' width='20%'><b>Nos</b></td><td width='20%'></td><td align='right' width='60%'  style='font-size:16px;'>Amount</td></tr>
					<tr><td align='left' style='font-size:18px;'><b>$qty </b></td>
					<td align='center'></td>
					<td align='right' style='font-size:18px;'><b><img src='indian-rupee-symbol.gif' width='12px' height='12px'> $amount/-</b></td></tr></table>
					
					
					
					<table  style='width:100%;font-size:9px;font-weight:bold;'><tr><td align='right' width='100%'><img src='jc.jpg' height='40px;'></td></tr><tr><td align='right' width='100%'>இணை ஆணையர் / நிர்வாக அதிகாரி</td></tr></table>
					
					</td></tr></table>";

 
?>

<script type="text/javascript">
window.onload=function(){window.print()};
</script>