<?php
include_once 'includes/processes.php';
$Process = new Login_Process;
$pageLink = basename($_SERVER['REQUEST_URI']);
$Process->check_status($pageLink);

$addTicket = $Process->addTicket($_POST,$_POST['open_ticket']);
$roleData = $Process->getAccessRoleInfo($_SESSION['access']);
$privileges = explode(",",$roleData->privileges);
?>
<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
  <title>Manifest - APL Portal</title>

  <meta charset="utf-8">
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width">

  <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,700italic,400,600,700">
  <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Oswald:400,300,700">
  <link rel="stylesheet" href="./css/font-awesome.min.css">
  <link rel="stylesheet" href="./js/libs/css/ui-lightness/jquery-ui-1.9.2.custom.min.css">
  <link rel="stylesheet" href="./css/bootstrap.min.css">

  <!-- Plugin CSS -->
  <link rel="stylesheet" href="./js/plugins/magnific/magnific-popup.css">
  <link rel="stylesheet" href="./js/plugins/datepicker/datepicker.css">
  <link rel="stylesheet" href="./js/plugins/timepicker/bootstrap-timepicker.css">
  <link rel="stylesheet" href="./js/plugins/icheck/skins/minimal/blue.css">

  <!-- App CSS -->
  <link rel="stylesheet" href="./css/target-admin.css">
  <link rel="stylesheet" href="./css/custom.css">


  <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!--[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>

function openModal() {
	document.getElementById('modal').style.display = 'block';
	document.getElementById('fade').style.display = 'block';
}

function closeModal() {
    document.getElementById('modal').style.display = 'none';
    document.getElementById('fade').style.display = 'none';
}

function runTicketReport() {
	openModal();
	var station_id = document.getElementById("serchTicket").elements.namedItem("station_id").value;
	var startDate = document.getElementById("serchTicket").elements.namedItem("startDate").value;
	var endDate = document.getElementById("serchTicket").elements.namedItem("endDate").value;
	var severity = document.getElementById("serchTicket").elements.namedItem("severity").value;
	var tstatus = document.getElementById("serchTicket").elements.namedItem("tstatus").value;
	var assigned = document.getElementById("serchTicket").elements.namedItem("assigned").value;


    //if (str == "") {
    //    document.getElementById("txtHint").innerHTML = "";
    //    return;
   // } else {
        if (window.XMLHttpRequest) {
            // code for IE7+, Firefox, Chrome, Opera, Safari
            xmlhttp = new XMLHttpRequest();
        } else {
            // code for IE6, IE5
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange = function() {
            if (this.readyState == 4 && this.status == 200) {
				closeModal();
                document.getElementById("SearchResults").innerHTML = this.responseText;
            }
        };
        xmlhttp.open("GET","ticket-search.php?station_id="+station_id+"&startDate="+startDate+"&endDate="+endDate+"&severity="+severity+"&tstatus="+tstatus+"&assigned="+assigned,true);
        xmlhttp.send();
    //}
}
</script>
<style>
body, html {
    margin:0;
    padding;
    height:100%
}

#content {
    padding:25px;
}

#fade {
    display: none;
    position:absolute;
    top: 0%;
    left: 0%;
    width: 100%;
    height: 100%;
    background-color: #ababab;
    z-index: 1001;
    -moz-opacity: 0.8;
    opacity: .70;
    filter: alpha(opacity=80);
}

#modal {
    display: none;
    position: absolute;
    top: 45%;
    left: 45%;
    width: 64px;
    height: 64px;
    padding:10px 5px 0px;
    border: 3px solid #ababab;
    box-shadow:1px 1px 10px #ababab;
    border-radius:20px;
    background-color: white;
    z-index: 1002;
    text-align:center;
}

</style>
</head>

<body>

<div class="container">

    <div class="row" style="background-color:#fff; margin-top:20px;">
    
        <div class="col-lg-8">
            <div class="row">
                <div class="col-lg-12">
                    <img src="./img/logo.png" alt="Site Logo" width="" />
                </div>
                <div class="col-lg-4"></div>
                <div class="col-lg-8" style="font-size:12px; text-align:center;">
                    <div class="col-lg-12">25 SOBO AROBIODU STREET,GRA IKEJA, LAGOS</div>
                    <div class="col-lg-12">Station/Office Location: IT OFFICE - 25 SOBO AROBIODU STREET,GRA,IKEJA,LAGOS</div>
                </div>
                <div class="col-lg-12" style="font-size:30px; color:#B20000; text-align:center; margin-top:20px;">
                    <span><strong>AIRPEACE CARGO MANIFEST</strong></span>
                </div>
                <div class="col-lg-12">
                ISSUER: <strong>Air Peace IT Dept HQ</strong><br />
                NAME: <br />
                DATE: <br /><br />
                SIGN:......................................
                </div>
                <div class="col-lg-12" style="font-size:12px;">
                    <table class="table table-striped table-bordered table-hover">
                        <thead>
                            <tr>
                                <th>SN</th>
                                <th>Item Name</th>
                                <th>Model NO.</th>
                                <th>Serial NO.</th>
                                <th>Description</th>
                                <th>Quantity Sent</th>
                                <th>Acknoledgment</th>
                                <th>Actions</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td></td>
                                <td></td>
                                <td> </td>
                                <td></td>
                                <td></td>
                                <td></td>
                                <td></td>
                                <td></td>
                            </tr>
                            <tr>
                                <td></td>
                                <td></td>
                                <td> </td>
                                <td></td>
                                <td></td>
                                <td></td>
                                <td></td>
                                <td></td>
                            </tr>
                            <tr>
                                <td></td>
                                <td></td>
                                <td> </td>
                                <td></td>
                                <td></td>
                                <td></td>
                                <td></td>
                                <td></td>
                            </tr>
                            <tr>
                                <td></td>
                                <td></td>
                                <td> </td>
                                <td></td>
                                <td></td>
                                <td></td>
                                <td></td>
                                <td></td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div class="col-lg-4">
            <div class="col-lg-12">
                <h3>FLIGHT NUMBER:</h3><br />
                <h3>FLIGHT TIME:</h3>
            </div>
            <div class="col-lg-12">
                ISSUER'S CONTACT: 08033984392
            </div>
            <div class="col-lg-12">
            <h3>Destination: <?php  ?> Station</h3><br />
            <br />
            ATTENTION: STATION MANAGER <?php  ?> AIRPORT<br />
            TRANSPORT MODE: AIR
            </div>
        </div>

    </div> <!-- /.content-container -->

</div> <!-- /.container -->
	

 <script src="./js/libs/jquery-1.10.1.min.js"></script>
  <script src="./js/libs/jquery-ui-1.9.2.custom.min.js"></script>
  <script src="./js/libs/bootstrap.min.js"></script>

  <!--[if lt IE 9]>
  <script src="./js/libs/excanvas.compiled.js"></script>
  <![endif]-->

</body>
</html>
