<?php
include_once"config.php";
$query = mysqli_query($con,"select *  from custome_page  where id = 5");
$d = mysqli_fetch_array($query);

$chart_title = isset($d['chart_title'])?$d['chart_title']:null;
$Area_title = isset($d['Area_title'])?$d['Area_title']:null;
$Special_title = isset($d['Special_title'])?$d['Special_title']:null;
$natianilty_title = isset($d['natianilty_title'])?$d['natianilty_title']:null;
$category_nat_title = isset($d['category_nat_title'])?$d['category_nat_title']:null;
$Theme_color = isset($d['Theme_color'])?$d['Theme_color']:'#17A2B8';
 $margint = isset($d['marginst'])?$d['marginst']:'0';
$marginb = isset($d['marginb'])?$d['marginb']:'0';
$Sequence_theme = isset($d['Sequence_theme'])?$d['Sequence_theme']:null;
$text_color = isset($d['text_color'])?$d['text_color']:'#ffffff';
$l = explode(',',$Sequence_theme);
?>
<link href="css/bootstrap.css" type="text/css" rel="stylesheet">
<style type="text/css" media="print">
table { page-break-inside:auto; }
    section   { page-break-inside:avoid;} /* This is the key */
    thead { display:table-header-group }
    tfoot { display:table-footer-group }
	
      @media print
      {
         @page {
           margin-top: 0px;
           margin-bottom: 0;
         }
         body  {
           padding-top: 0px;
           padding-bottom: 0px ;
         }
         hr{margin-top:<?=$margint;?>px !important; margin-bottom:<?=$marginb;?>px !important; }
       
      } 
</style>
<style>

h2 {text-align:center; font-family: fantasy; background-color: <?= $Theme_color;?>;
    color: <?=  $text_color ;?>;
    padding: 5px;
    width: 50%;
    margin: 0px auto; margin-bottom:35px;}
thead tr{border-top:5px solid #fbbd00;background:#e3e3e3;font-weight: 600;}
tbody tr:nth-child(odd){background:#f5f4f4}
tbody tr:nth-child(even){border-bottom: 1px solid #f5f4f4;}
h3{color:#4076b6; font-size:20px;}

.background_color {background-color: <?= $Theme_color;?>;}
.text_color {color: <?=  $text_color ;?>;}
.canvasjs-chart-credit{color:#fff !important; font-size:0px !important}
</style>


<div id="div_print" class="container p-2 ">

<div class="background_color text_color" style="width:70%; float:left;height:95px; padding:5px;">Dubai Office :2501,Fortune Tower, <br> Cluster C, JLT, Dubai, UAE
<br>
Phone: +971 4 453 6025 l Sales Enquiries: +971 4 8189666</div>
<div class="background_color" style="width:29%; float:right; height:95px;  text-align:center; padding:5px"><img src="img/logo.png" ></div>

<div style="clear:both"></div>
<iframe src="chart.php" style="width:100%; height:367px; border:none; overflow:hidden;" scrolling="no"></iframe>


<?php 
     if($l[0]>0){ $disp[$l[0]] = "area.php";}
	 if($l[1]>0){  $disp[$l[1]] = 'nationailty.php';}
     if($l[2]>0){  $disp[$l[2]] = 'special_category.php';}
	 if($l[3]>0){  $disp[$l[3]] = 'category_nationailty.php';}
	   
ksort($disp);	  ?>
<div class="clearfix"></div>
<?php foreach($disp as $dis) { ?>
<?php  include_once"reports/".$dis;?>
<div class="clearfix"></div>
<?php } ?>


</div>
