<?php
session_start();

$pasali=(($_SESSION["pasali"])-591);

      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;

		}


			$table="<table style='width:100%;font-size:13px;font-weight:bold;'><tr><td align='center'>????????? ???????? ????????????? ????????????<br>?????</td></tr></table><table  style='width:100%;'><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 cellpadding='4' style='width:100%;background-color:black;color:white;height:40px;'><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%;'><tr><td align='left' width='20%'></td><td width='20%'></td><td align='right' width='60%'>Amount</td></tr><tr><td align='left'><b>$qty</b> Nos.</td><td align='center'></td><td align='right'><b><img src='indian-rupee-symbol.gif' width='12px' height='12px'> $amount/-</b></td></tr></table><table  style='width:100%;font-size:12px;font-weight:bold;'><tr><td colspan='3' height='20px;'></td></tr><tr><td align='left' width='10%'></td><td width='10%'></td><td align='right' width='80%'>??? ??????</td></tr><tr><td align='left' width='10%'></td><td width='10%'></td><td align='right' width='80%'>??????? ???????</td></tr></table>";

			

echo $table; 
?>

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