<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>EHONGMD</title>
  <?php
  include '_plugin.php';
  include '_connect.php';
  ?>
  <script src="bower_components/jquery/dist/jquery.min.js"></script>

</head>
<body class="hold-transition skin-blue sidebar-mini">
  <script language="JavaScript">
    function ClickCheckAll(vol)
    {
      var i=1;
      for(i=1;i<=document.frmMain.hdnCount.value;i++)
      {
        if(vol.checked == true)
        {
          eval("document.frmMain.chkPrint"+i+".checked=true");
        }
        else
        {
          eval("document.frmMain.chkPrint"+i+".checked=false");
        }
      }
    }
    function onPrint()
    {
      if(confirm('ต้องการที่จะพิมพ์ทั้งหมดหรือไม่?')==true)
      {
        return true;
      }
      else
      {
        return false;
      }
    }
</script>

<style media="screen">
div.ex1 {
  height: 550px;
  overflow-y: scroll;
}
table{
  /* font: 12px; */
}
</style>

<div class="wrapper">

<?php
include '_header.php';
include '_menu.php';
?>
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
      <!-- ค้นหา -->
      <?php
      $DMY_11 = $_POST['DMY_1']." 00:00:00.000";
      $DMY_21 = $_POST['DMY_2']." 00:00:00.000";

      // $month = $_POST['M'];
      // $year = $_POST['Y']-543;
      // $month2 =  $month;
      // ทำถึงตรงนี้
      if ($_POST['tsp_no'] != "") {
        $PROV_NO = $_POST['tsp_no'];
        $code_prov = "AND a.BG_PROV = '$PROV_NO'";
      } else {
        $PROV_NO = 'ทั้งหมด';
        $code_prov = "";
      }
      if ($_POST['FEE_NO'] != "") {
        $FEE_NO = $_POST['FEE_NO'];
        $code_fee = "AND a.FEE_NO = '$FEE_NO'";
      } else {
        $FEE_NO = 'ทั้งหมด';
        $code_fee = "";
      }
      ?>
      <?php
      include '_connect.php';
      $_month_name = array("01"=>"มกราคม",  "02"=>"กุมภาพันธ์",  "03"=>"มีนาคม",
         "04"=>"เมษายน",  "05"=>"พฤษภาคม",  "06"=>"มิถุนายน",
         "07"=>"กรกฎาคม",  "08"=>"สิงหาคม",  "09"=>"กันยายน",
         "10"=>"ตุลาคม", "11"=>"พฤศจิกายน",  "12"=>"ธันวาคม");
      $m = date('m');

      // $now_month = date("$year-$month-01");
      // $mk_time = strtotime($now_month);
      // $day_no = date("t",$mk_time);
      // $wan_no = date("w",$mk_time);
      // $box_day = $day_no+$wan_no;
      // $rows_week = ceil($box_day/7);
      // $total_box=$rows_week*7;
      // $timeDate = strtotime($year.'-'.$month."-01"); //เปลี่ยนวันที่เป็น timestamp
      // $lastDay = date("t", $timeDate); //จำนวนวันของเดือน

      $CHK_BERG1 = substr($DMY_11,0,4)+543; $CHK_BERG2 = substr($DMY_11,5,2); $CHK_BERG3 = substr($DMY_11,8,2);
      $CHK_BERG12a = "วันที่ ".$CHK_BERG3." ". $_month_name[$CHK_BERG2]." ".$CHK_BERG1;

      $CHK_BERG11 = substr($DMY_21,0,4)+543; $CHK_BERG21 = substr($DMY_21,5,2); $CHK_BERG31 = substr($DMY_21,8,2);
      $CHK_BERG12b = " ถึงวันที่ ".$CHK_BERG31." ". $_month_name[$CHK_BERG21]." ".$CHK_BERG11;

      include 'reg_search_1.2.php'
      ?>
      <?php
      $sql = "SELECT * FROM CONFIG.dbo.tsp_transport WHERE tsp_no = $PROV_NO ORDER BY tsp_no";
      $select = $conn->prepare($sql);
      $select -> execute();
      $fetch_1 = $select->fetch();

      $sql = "SELECT * FROM EHONGDB.dbo.REG_FEEDATA WHERE FEE_NO = $FEE_NO ORDER BY FEE_NO";
      $select = $conn->prepare($sql);
      $select -> execute();
      $fetch_2 = $select->fetch();

      // $Eday1 = date('Y-m-t',strtotime($year."-".$month2."-".'01'));
      // $Eday2 = substr($Eday1,8,2);
      // echo $Eday2;
      if ($_POST['REG_STATUS'] == 'Y') {
        $REG_STATUS = "and c.REG_STATUS = 'Y' ";
        $REG_STATUS1 = 'พิมพ์แล้ว';
      }
      if ($_POST['REG_STATUS'] != 'Y') {
        $REG_STATUS = "and c.REG_STATUS IS NULL";
        $REG_STATUS1 = 'ยังไม่ได้พิมพ์';

      }
      if ($_POST['REG_STATUS'] == '') {
        $REG_STATUS = '';
        $REG_STATUS1 = 'ทั้งหมด';

      }

      // if ($_POST['REG_STATUS'] != 'Y') {
      //   $REG_STATUS = "";
      // }

      // $day1 = $year."-".$month2."-"."01";
      // $day2 = $year."-".$month2."-".$Eday2;

      // $day1 = $year."-".$month2."-".$day;
      // $day2 = $year."-".$month2."-".$Eday2;
      $code = "c.REG_DATE1 BETWEEN '$DMY_11' AND '$DMY_21' $code_prov $code_fee $REG_STATUS";
      // $code = "c.REG_DATE1 BETWEEN '$day1' AND '$day2' $code_prov $code_fee $REG_STATUS";

      ?>
      <!-- <input type="number"  required  min = "-99999" max = "99999" step="0.1"  name="money" class="form-control text-right" autocomplete="off" placeholder="0.00" value=""> -->

      <!-- ตาราง -->
      <div class="col-md-12">
        <div class="box box-success">
          <div class="box-header">
            <!-- <form name="frmMain" action="reg_print_1.php?M1=<?php echo $month2; ?>&Y1=<?php echo $year; ?>" target="_blank" method="POST" OnSubmit="return onPrint();"> -->
            <h3 class="box-title"><p class="text-success">รายงานการบันทึกใบเสร็จ</p></h3>
            <p><?php echo "$CHK_BERG12a $CHK_BERG12b"." จังหวัด ".$PROV_NO.":".$fetch_1['tsp_transport']." ประเภท ".$FEE_NO.":".$fetch_2['FEE_NAME']." การพิมพ์ : ".$REG_STATUS1;?> &nbsp;&nbsp;&nbsp;
              <!-- <input type="submit" class="btn btn-warning" name="btnDelete" value="ดูใบแทนรับเงิน"> </p> -->
              <form class="" action="reg_print_8.php" method="POST" target="_blank">
                <input type="hidden" name="code" value="<?php echo $code; ?>">
                <input type="hidden" name="code_2" value="<?php echo "$CHK_BERG12a $CHK_BERG12b"." จังหวัด ".$PROV_NO.":".$fetch_1['tsp_transport']." ประเภท ".$FEE_NO.":".$fetch_2['FEE_NAME']." การพิมพ์ : ".$REG_STATUS1;?>">
                <input type="submit" class="btn btn-warning" name="" value="พิมพ์รายงาน">
              </form>
              <!-- <input type="button" class="btn btn-warning" value="ทดสอบ" onclick="myApp.printTable()" /> -->
          </div>
          <div class="box-body">
            <div class="form-group ex1" style="overflow-x:auto; overflow-y:10%;">
              <table id="tab" class="table-bordered table-striped" width="180%" border="0">
                <!-- <thead> -->
                <tr>
                  <td width=""> <div align="center"><b>No.</div></td>
                  <td width=""> <div align="center"><b>วันที่เบิก</div></td>
                  <td width=""> <div align="center"><b>เลขที่ใบเบิก</div></td>
                  <td width=""> <div align="center"><b>#เบิก</div></td>
                  <td width=""> <div align="center"><b>ชื่อลูกค้า</div></td>
                  <td width=""> <div align="center"><b>รายการเบิก</div></td>
                  <td width=""> <div align="center"><b>บริษัทที่เบิก</div></td>
                  <td width=""> <div align="center"><b>ยี่ห้อ</div></td>
                  <td width=""> <div align="center"><b>เลขที่เครื่อง</div></td>
                  <td width=""> <div align="center"><b>เลขตัวถัง</div></td>
                  <td width=""> <div align="center"><b>ชื่อผู้เบิก</div></td>
                  <td width=""> <div align="center"><b>ค่าใช้จ่ายในการเบิก</div></td>
                  <td width=""> <div align="center"><b>ค่าใช้จ่ายที่มีใบเสร็จ (บาท)</div></td>
                  <td width=""> <div align="center"><b>ค่าใช้จ่ายที่จ่ายให้ขนส่ง</div></td>
                  <td width=""> <div align="center"><b>ชื่อเจ้าหน้าที่ให้ขนส่ง 1</div></td>
                  <td width=""> <div align="center"><b>มูลค่าที่ได้รับ (ค่าตรวจ)</div></td>
                  <td width=""> <div align="center"><b>ชื่อเจ้าหน้าที่ให้ขนส่ง 2</div></td>
                  <td width=""> <div align="center"><b>มูลค่าที่ได้รับ (ค่าบริการ)</div></td>
                  <td width=""> <div align="center"><b>จังหวัด</div></td>
                  <td width=""> <div align="center"><b>ผลต่าง</div></td>
                  <td width=""> <div align="center"><b>หมายเหตุ</div></td>
                  <td width=""> <div align="center"><b>วันที่พิมพ์</div></td>
                  <td width=""> <div align="center"><b>ผู้พิมพ์</div></td>
                </tr>
                <!-- </thead> -->
                <!-- <tbody> -->
                  <tr>
                    <?php
                    $sql = "SELECT DISTINCT a.BILL_NO, a.CHK_BERG as cb_date, a.BG_PROV as prov_no1, a.FEE_COST as FEE_COST1,
                    b.PR_NAME, b.PR_CODE,
                    c.REG_NO, c.REG_CROPNO, c.FEE_NO, c.REG_DATE1, c.REG_BREG, c.REG_BILLBREG, c.REG_BILLBREGTRANSPORT, c.REG_BILLUSER1, c.REG_BILLUSER2, c.REG_SAVEUSER,
                    d.BILL_NO, d.PS_NAME, d.CROP_NAME, d.BRAND_NAME, d.SERIAL_NO, d.PSERIAL_NO,
                    e.tsp_no, e.tsp_open, e.tsp_registrar1, e.tsp_registrar,
                    f.FEE_NO, f.FEE_NAME,
                    g.xcorp_no
                    FROM EHONGDB.dbo.REG_BILLDATADOCUMENT a
                    LEFT OUTER JOIN (SELECT * FROM [EHONGDB].[dbo].[PROV]) b ON (a.BG_PROV = b.PR_CODE)
                    LEFT OUTER JOIN (SELECT * FROM [CONFIG].[dbo].[REG_BILLDATA_V1]) c ON (a.BILL_NO=c.BILL_NO) AND (a.FEE_NO=c.FEE_NO)
                    LEFT OUTER JOIN (SELECT * FROM [EHONGDB].[dbo].[REG_BILL]) d ON (a.BILL_NO=d.BILL_NO)
                    LEFT OUTER JOIN (SELECT * FROM [CONFIG].[dbo].[tsp_transport]) e ON (a.BG_PROV=e.tsp_no)
                    LEFT OUTER JOIN (SELECT * FROM [EHONGDB].[dbo].[REG_FEEDATA]) f ON (a.FEE_NO=f.FEE_NO)
                    LEFT OUTER JOIN (SELECT * FROM [EHONGDB].[dbo].[REG_BILLDATA]) g ON (a.BILL_NO=g.BILL_NO)
                    WHERE $code and (a.status<>'V') and (a.chkdate2 is not null and a.chkstatus2='C') and (a.acpdate is not null) and (a.chk_berg is not null) ORDER BY c.REG_NO ASC, b.PR_CODE ASC";
                    $select=$conn->prepare($sql);
                    $select->execute();
                    // echo $sql;
                    $FEE_COST = 0;
                    $REG_BILL1= 0;
                    $REG_BILL2= 0;
                    $REG_BILL3 = 0;
                    $REG_BILL4 = 0;

                    $item = 1;
                    $i = 0;
                    while($fetch=$select->fetch())
                    {
                      $i++;
                      if ($fetch['cb_date'] != '') {
                        $CHK_BERG1 = substr($fetch['cb_date'],0,4)+543; $CHK_BERG2 = substr($fetch['cb_date'],5,2); $CHK_BERG3 = substr($fetch['cb_date'],8,2);
                        $CHK_BERG = $CHK_BERG3." ". $_month_name[$CHK_BERG2]." ".$CHK_BERG1;
                      } else {
                        $CHK_BERG = '';
                      }
                      if ($fetch['REG_DATE1'] != '') {
                        $REG_DATE1 = substr($fetch['REG_DATE1'],0,4)+543; $REG_DATE2 = substr($fetch['REG_DATE1'],5,2); $REG_DATE3 = substr($fetch['REG_DATE1'],8,2);
                        $REG_DATE165 = $REG_DATE3." ". $_month_name[$REG_DATE2]." ".$REG_DATE1;
                      } else {
                        $REG_DATE165 = '';
                      }

                      if ($fetch['REG_BREG'] == '') {
                        $FEE_COST_10 = '0.00';
                      } else {
                        $FEE_COST_10 = $fetch['REG_BREG'];
                      }

                      if ($fetch['REG_BILLBREG'] == '') {
                        $REG_BILL1_10 = '0.00';
                      } else {
                        $REG_BILL1_10 = $fetch['REG_BILLBREG'];
                      }

                      if ($fetch['REG_BILLBREGTRANSPORT'] == '') {
                        $REG_BILL4_10 = '0.00';
                      } else {
                        $REG_BILL4_10 = $fetch['REG_BILLBREGTRANSPORT'];
                      }

                      if ($fetch['REG_BILLUSER1'] == '') {
                        $REG_BILL2_10 = '0.00';
                      } else {
                        $REG_BILL2_10 = $fetch['REG_BILLUSER1'];
                      }

                      if ($fetch['REG_BILLUSER2'] == '') {
                        $REG_BILL3_10 = '0.00';
                      } else {
                        $REG_BILL3_10 = $fetch['REG_BILLUSER2'];
                      }

                      // // 00 จดทะเบียนใหม่(สด)ไฟแนนซ์
                      // if ($fetch['FEE_NO'] == '00') { $SUM1 = '340.00'; $SUM2 = '80.00';	$SUM3 = '100.00';	$SUM4 = $SUM2+$SUM3;
                      //   // echo $SUM1." ".$SUM2." ".$SUM3." ".$SUM4;
                      // }
                      // // 01 จดทะเบียนใหม่(สด)
                      // if ($fetch['FEE_NO'] == '01') {
                      //   if ($fetch['FEE_COST1'] = '1250.0') { $SUM1 = $fetch['FEE_COST1']; $SUM2 = '0.00'; $SUM3 = '0.00'; $SUM4 = '0.00';
                      //   }
                      //   else { $SUM1 = '340.00'; $SUM2 = '80.00'; $SUM3 = '100.00'; $SUM4 = $SUM2+$SUM3;
                      //   }
                      // }
                      // // 02 จดทะเบียนใหม่(ผ่อน) มี 2 อัน ทำถึงอันนี้นะ
                      // if ($fetch['FEE_NO'] == '02' && $fetch['FEE_COST'] == '495.0') { $SUM1 = '315.00'; $SUM2 = '80.00'; $SUM3 = '100.00'; $SUM4 = $SUM2+$SUM3;
                      // }
                      // else {
                      //   $SUM1 = $fetch['FEE_COST1']; $SUM2 = '0.00'; $SUM3 = '0.00'; $SUM4 = '0.00';
                      // }
                      // if ($fetch['FEE_NO'] == '02' && $fetch['FEE_COST1'] == '75.0') { $SUM1 = '25.00'; $SUM2 = '0.00'; $SUM3 = '50.00'; $SUM4 = $SUM2+$SUM3;
                      // }
                      // // 03 โอนทะเบียน
                      // if ($fetch['FEE_NO'] == '03') { $SUM1 = '125.00'; $SUM2 = '100.00'; $SUM3 = '80.00'; $SUM4 = $SUM2+$SUM3;
                      // }
                      // if ($fetch['FEE_NO'] == '03' && $fetch['FEE_COST1'] != '305.0') { $SUM1 = $fetch['FEE_COST1']; $SUM2 = '0.00'; $SUM3 = '0.00'; $SUM4 = '0.00';
                      // }
                      // // 04 ต่อภาษีปีละ
                      // if ($fetch['FEE_NO'] == '04') { $SUM1 = $fetch['FEE_COST1']; $SUM2 = '0.00'; $SUM3 = '0.00'; $SUM4 = '0.00';
                      // }
                      // // 05 แจ้งป้ายวงกลมหาย
                      // if ($fetch['FEE_NO'] == '05') { $SUM1 = '25.00'; $SUM2 = '0.00';	$SUM3 = '50.00';	$SUM4 = $SUM2+$SUM3;
                      // }
                      // // 07 แจ้งป้ายแข็งหาย
                      // if ($fetch['FEE_NO'] == '07') { $SUM1 = '105.00'; $SUM2 = '0.00';	$SUM3 = '70.00';	$SUM4 = $SUM2+$SUM3;
                      // }
                      // // 14 เปลี่ยนสีรถ
                      // if ($fetch['FEE_NO'] == '14') { $SUM1 = '25.00'; $SUM2 = '100.00';	$SUM3 = '25.00';	$SUM4 = $SUM2+$SUM3;
                      // }
                      // // 17 ชื่อผู้ครอบครอง
                      // if ($fetch['FEE_NO'] == '17') { $SUM1 = '25.00'; $SUM2 = '100.00';	$SUM3 = '25.00';	$SUM4 = $SUM2+$SUM3;
                      // }

                    ?>
                    <td style="text-align: center;"><?=$item."."?></td>
                    <!-- <td><center><input type="checkbox" name="chkPrint[]" id="chkPrint<?php echo $i;?>" value="<?php echo $fetch["BILL_NO"]." ".$fetch['FEE_NO'];?>"></center></td> -->
                    <!-- <td>
                      <form class="" action="reg_print_5.php?BILL_NO=<?php echo $fetch["BILL_NO"];?>&FEE_NO=<?php echo $fetch['FEE_NO'];?>&1REG_NO=<?php echo $fetch['REG_NO'];?>" method="POST" target="_blank">
                        <center><button id="myBtn" class="btn btn-success table-striped" name="btnOpen" OnClick="fncOpenPopup();">ดู</button><center>
                      </form>
                    </td> -->
                    <td><center><?php echo $CHK_BERG; ?></center></td>
                    <td><center><a href="reg_print_5.php?BILL_NO=<?php echo $fetch["BILL_NO"];?>&FEE_NO=<?php echo $fetch['FEE_NO'];?>&1REG_NO=<?php echo $fetch['REG_NO'];?>" class="text-green" target="_blank"><?php echo $fetch['REG_CROPNO']." ".$fetch['REG_NO'];?></a></center></td>
                    <td><center><a><?php echo $fetch['BILL_NO']; ?></a></center></td>
                    <td><center><?php echo $fetch['PS_NAME']; ?></center></td>
                    <td><center><?php echo $fetch['FEE_NO'].":".$fetch['FEE_NAME']?></center></td>
                    <td><center><?php echo $fetch['CROP_NAME']; ?></center></td>
                    <td><center><?php echo $fetch['BRAND_NAME']; ?></center></td>
                    <td><center><?php echo $fetch['SERIAL_NO']; ?></center></td>
                    <td><center><?php echo $fetch['PSERIAL_NO']; ?></center></td>
                    <td><center><?php echo $fetch['tsp_open']; ?></center></td>
                    <td><center><p class="text-blue"><?php echo $REG_BILL1_10; ?></p></center></td>
                    <td><center><p class="text-blue"><?php echo $FEE_COST_10; ?></p></center></td>
                    <td><center><p class="text-blue"><?php echo $REG_BILL4_10; ?></p></center></td>
                    <td><center><?php echo $fetch['tsp_registrar1']; ?></center></td>
                    <td><center><p class="text-blue"><?php echo $REG_BILL2_10; ?></center></p></td>
                    <td><center><?php echo $fetch['tsp_registrar']; ?></center></td>
                    <td><center><p class="text-blue"><?php echo $REG_BILL3_10; ?></p></center></td>
                    <td><center><?php echo $fetch['prov_no1'].":".$fetch['PR_NAME'];?></center></td>
                    <td><center></center></td>
                    <td><center></center></td>
                    <td><center><a class="text-green"><?php echo $REG_DATE165; ?></a></center></td>
                    <td><center><a class="text-green"><?php echo $fetch['REG_SAVEUSER']; ?></a></center></td>
                  </tr>
                  <?php
                    // $REG_BREG += str_replace( ',', '', $fetch['REG_BREG']);
                    // $REG_BILLBREG += str_replace( ',', '', $fetch['REG_BILLBREG']);
                    $FEE_COST += str_replace( ',', '', $FEE_COST_10);
                    $REG_BILL1+= str_replace( ',', '', $REG_BILL1_10);
                    $REG_BILL4 += str_replace( ',', '', $REG_BILL4_10);
                    $REG_BILL2 += str_replace( ',', '', $REG_BILL2_10);
                    $REG_BILL3 += str_replace( ',', '', $REG_BILL3_10);
                    $item++; }
                  ?>
                  <!-- </tbody> -->
                  <!-- <tbody> -->
                  <tr style="background-color:DodgerBlue; color:#fff;">
                    <td><center><b>รวม</center></td>
                    <!-- <td><center></center></td> -->
                    <td><center></center></td>
                    <td><center></center></td>
                    <td><center></center></td>
                    <td><center></center></td>
                    <td><center></center></td>
                    <td><center></center></td>
                    <td><center></center></td>
                    <td><center></center></td>
                    <td><center></center></td>
                    <td><center></center></td>
                    <td><center><b><?php echo number_format($REG_BILL1,2); ?></center></td>
                    <td><center><b><?php echo number_format($FEE_COST,2); ?></center></td>
                    <td><center><b><?php echo number_format($REG_BILL4,2); ?></center></td>
                    <td><center></center></td>
                    <td><center><b><?php echo number_format($REG_BILL2,2); ?></center></td>
                    <td><center></td>
                    <td><center><b><?php echo number_format($REG_BILL3,2); ?></center></center></td>
                    <td><center></center></td>
                    <td><center></center></td>
                    <td><center></center></td>
                    <td><center></center></td>
                    <td><center></center></td>
                  </tr>
                  <!-- <tr>
                    <td width=""> <div align="center"><b>No.</div></td>
                    <td width=""> <div align="center"><b></div></td>
                    <td width=""> <div align="center"><b>วันที่เบิก</div></td>
                    <td width=""> <div align="center"><b>#เบิก</div></td>
                    <td width=""> <div align="center"><b>เลขที่ใบเบิก</div></td>
                    <td width=""> <div align="center"><b>ชื่อลูกค้า</div></td>
                    <td width=""> <div align="center"><b>รายการเบิก</div></td>
                    <td width=""> <div align="center"><b>บริษัทที่เบิก</div></td>
                    <td width=""> <div align="center"><b>ยี่ห้อ</div></td>
                    <td width=""> <div align="center"><b>เลขที่เครื่อง</div></td>
                    <td width=""> <div align="center"><b>ชื่อผู้เบิก</div></td>
                    <td width=""> <div align="center"><b>ค่าใช้จ่ายในการเบิก</div></td>
                    <td width=""> <div align="center"><b>ค่าใช้จ่ายที่มีใบเสร็จ (บาท)</div></td>
                    <td width=""> <div align="center"><b>ค่าใช้จ่ายที่จ่ายให้ขนส่ง</div></td>
                    <td width=""> <div align="center"><b>ชื่อเจ้าหน้าที่ให้ขนส่ง 1</div></td>
                    <td width=""> <div align="center"><b>มูลค่าที่ได้รับ</div></td>
                    <td width=""> <div align="center"><b>ชื่อเจ้าหน้าที่ให้ขนส่ง 2</div></td>
                    <td width=""> <div align="center"><b>มูลค่าที่ได้รับ</div></td>
                    <td width=""> <div align="center"><b>จังหวัด</div></td>
                    <td width=""> <div align="center"><b>ผลต่าง</div></td>
                    <td width=""> <div align="center"><b>หมายเหตุ</div></td>
                  </tr> -->
                <!-- </tbody> -->
              </table>
              <!-- <input type="hidden" name="hdnCount" value="<?php echo $i;?>"> -->
              <!-- </form> -->
            </div>
          </div>
        </div>
      </div>

      </div>
    </section>
  </div>
</div>

<?php
include '_footer.php';
include '_form.php';
?>
<div class="control-sidebar-bg"></div>
<?php include '_script_2.php'; ?>
<!-- <script>
    var myApp = new function () {
        this.printTable = function () {
            var tab = document.getElementById('tab');
            var win = window.open('', '', 'height=700,width=1200');
            win.document.write(tab.outerHTML);
            win.document.close();
            win.print();
            // tab.style.font = "bold 2px arial,serif";
            // tab.style.backgroundColor = "#FF0000";
            // win.close();
        }
    }
</script> -->
</body>
</html>
