<!DOCTYPE html>
<html>
    <head>
   <?php
   session_start();
   //if(empty($_SESSION['id'])){
if(empty($_SESSION['surname'])|| empty($_SESSION['othernames'])|| empty($_SESSION['id'])){
    echo "You are not logged in or session has expired, redirecting to login page<br />";
    echo img('images/preload.gif');
    header("refresh: 3; url=../../../");
    exit();
}

?>
        <meta charset="UTF-8">
        <title>The Nigerian Institution of Quantity Surveyors</title>
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
        <link href="<?php echo base_url('css/bootstrap.min.css'); ?>" rel="stylesheet" type="text/css" />
        <link href="<?php echo base_url('css/font-awesome.min.css');?>" rel="stylesheet" type="text/css" />
        <link href="<?php echo base_url('css/ionicons.min.css'); ?>" rel="stylesheet" type="text/css" />
        <link href="<?php echo base_url('css/morris/morris.css'); ?>" rel="stylesheet" type="text/css" />
        <link href="<?php echo base_url('css/jvectormap/jquery-jvectormap-1.2.2.css');?>" rel="stylesheet" type="text/css" />
        <link href="<?php echo base_url('css/fullcalendar/fullcalendar.css');?>" rel="stylesheet" type="text/css" />
        <link href="<?php echo base_url('css/daterangepicker/daterangepicker-bs3.css');?>" rel="stylesheet" type="text/css" />
        <link href="<?php echo base_url('css/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css');?>" rel="stylesheet" type="text/css" />
        <link href="<?php echo base_url('css/AdminLTE.css');?>" rel="stylesheet" type="text/css" />

        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
          <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->
        <!--<script src="http://ajax.googleapis.com/ajax/libs/jquer</fieldset>
                            -->   
        
        <script src="<?php echo base_url('js/jquerynew-min.js');?>" type="text/javascript"></script>
        <script src="<?php echo base_url('js/jquery-ui-1.10.3.min.js');?>" type="text/javascript"></script>
        <script src="<?php echo base_url('js/bootstrap.min.js');?>" type="text/javascript"></script>
        <script src="<?php echo base_url('js/raphael.js');?>" type="text/javascript"></script>
        <!--<script src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"></script>-->
        <script src="<?php echo base_url('js/plugins/morris/morris.min.js');?>" type="text/javascript"></script>
        <script src="<?php echo base_url('js/plugins/sparkline/jquery.sparkline.min.js');?>" type="text/javascript"></script>
        <script src="<?php echo base_url('js/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js');?>" type="text/javascript"></script>
        <script src="<?php echo base_url('js/plugins/jvectormap/jquery-jvectormap-world-mill-en.js');?>" type="text/javascript"></script>
        <script src="<?php echo base_url('js/plugins/fullcalendar/fullcalendar.min.js');?>" type="text/javascript"></script>
        <script src="<?php echo base_url('js/plugins/jqueryKnob/jquery.knob.js');?>" type="text/javascript"></script>
        <script src="<?php echo base_url('js/plugins/daterangepicker/daterangepicker.js');?>" type="text/javascript"></script>
        <script src="<?php echo base_url('js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js');?>" type="text/javascript"></script>
        <script src="<?php echo base_url('js/plugins/iCheck/icheck.min.js');?>" type="text/javascript"></script>
        <script src="<?php echo base_url('js/AdminLTE/app.js');?>" type="text/javascript"></script>
        <script src="<?php echo base_url('js/AdminLTE/dashboard.js');?>" type="text/javascript"></script>     
        <script src="<?php echo base_url('js/AdminLTE/demo.js');?>" type="text/javascript"></script>
        <script src="<?php echo base_url('js/gen_validatorv4.js');?>" type="text/javascript"></script>
        <!--<script src="<?php echo base_url('js/jquery-1.11.js');?>" type="text/javascript"></script>-->
<!--<script type="text/javascript" src="<?=base_url('js/jquery-1.11.js')?>" ></script>-->
    </head>
    <body>
<div class="container">
    <div class="row">
        <div class="col-lg-6 col-lg-offset-3">
            <?php 
            foreach($details as $row){}
            ?>
            <div class="panel panel-default">
                <div class="panel panel-heading">
                    <div id="printArea">
                    <strong><h4><center>CONFERENCE 2015 BADGE</center></h4></strong>
                <div class="panel panel-body">
                    <?php
                    if($row['transStatus']=='PAID'){ ?>
                    
                    <table class="table table-bordered">
                        <tr><td><?php echo img('../images/logo22.png',array('class'=>'img-responsive')); ?></td></tr>
                        <!--<tr><td align="center"><?php echo img('../pictures/passConf'.$row['transAppID'].".jpg"); ?></td></tr>-->
                        <tr><td align="center"><h4><strong><?php echo strtoupper($row['confName']); ?></strong></h4></td></tr>
                        <tr><td align="center"><h5><strong><?php echo strtoupper($row['confcatName']); ?><br />PARTICIPANT</strong></h5></td></tr>
                        <tr><td align="center"><img src="<?php echo base_url(); ?>welcome/set_barcode/<?php echo $row['transRef'];?>"></td></tr>
                    </table>
                    </div>
                    </div>
                    <button onclick="printDiv('printArea');" class="btn btn-primary">Print Badge</button> | 
                    <?php echo anchor('welcome/add','Add New',array('class'=>'btn btn-success')); ?>
                    <?php } else{ ?>
                    <div class="alert alert-danger">Invalid Application No</div>
                    <?php } ?>
                </div>
            </div>
        </div>
    </div>
</div>
    
<script>
      $(document).ready(function(){
          $('#tabs').tab();
      })
    	function printDiv(divName) {
     var printContents = document.getElementById(divName).innerHTML;
     var originalContents = document.body.innerHTML;

     document.body.innerHTML = printContents;

     window.print();

     document.body.innerHTML = originalContents;
}</script>
</body>
</html>