<?php
session_start();
include_once '../db_connect/db.php';
if (isset($_SESSION['student_id'])) {
    $student_id = $_SESSION['student_id'];
    $type_id = $_SESSION['type_id'];
    include_once 'includes/php/get_student_by_id.php';

    include_once 'includes/functions.php';
    $app_dept = strtoupper(get_department_title($department_id));
    $app_prog = strtoupper(get_programme_title($programme_id));
    $prog_type =  strtoupper (show_programme_type($type_id));
    $image = $image;

    if (isset($_REQUEST['qlk'])) {
        //collect the quick link
        $encripted_qlk = $_REQUEST['qlk'];
    }
    
    if((time() - $_SESSION['last_time']) > 1000){
	header('Location:scripts/index.php');
    }else{
    	$_SESSION['last_time'] = time();
    }


    $full_name = $middle_name . ', ' . $first_name;
}

if($type_id=='1')
{
    $images = '<img src="http://coeminna-edu.ng/prence/uploads/'.$image.'" alt="" class="img-responsive"/>';
}
else if($type_id == '2')
{
    $images = '<img src="http://coeminna-edu.ng/nce/uploads/'.$image.'" alt="" class="img-responsive"/>';
}
else if($type_id == '3')
{
    $images = '<img src="http://coeminna-edu.ng/duap/uploads/'.$image.'" alt="" class="img-responsive"/>';
}
else if($type_id == '4')
{
    $images = '<img src="images/user.jpg" alt="" class="img-responsive"/>';
}
else if($type_id == '5')
{
    $images = '<img src="http://coeminna-edu.ng/summer_sales/uploads/'.$image.'" alt="" class="img-responsive"/>';
}
else if($type_id == '5')
{
    $images = '<img src="http://coeminna-edu.ng/nce_lvsp/uploads/'.$image.'" alt="" class="img-responsive"/>';
}
?>

<!DOCTYPE html>
<html lang="en">

<!-- Mirrored from swlabs.co/edugate/courses-detail.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 04 Jul 2020 12:32:27 GMT -->
<head><title>COE Hostel | Dashboard</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
		<link rel="shortcut icon" href="images/coe.png" type="image/x-icon" />
    <!-- LIBRARY FONT-->
    <link type="text/css" rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lato:400,400italic,700,900,300">
    <link type="text/css" rel="stylesheet" href="assets/font/font-icon/font-awesome-4.4.0/css/font-awesome.css">
    <link type="text/css" rel="stylesheet" href="assets/font/font-icon/font-svg/css/Glyphter.css">
    <!-- LIBRARY CSS-->
    <link type="text/css" rel="stylesheet" href="assets/libs/animate/animate.css">
    <link type="text/css" rel="stylesheet" href="assets/libs/bootstrap-3.3.5/css/bootstrap.css">
    <link type="text/css" rel="stylesheet" href="assets/libs/owl-carousel-2.0/assets/owl.carousel.css">
    <link type="text/css" rel="stylesheet" href="assets/libs/selectbox/css/jquery.selectbox.css">
    <link type="text/css" rel="stylesheet" href="assets/libs/fancybox/css/jquery.fancybox.css">
    <link type="text/css" rel="stylesheet" href="assets/libs/fancybox/css/jquery.fancybox-buttons.css">
    <link type="text/css" rel="stylesheet" href="assets/libs/fancybox/css/jquery.fancybox-buttons.css">
    <link type="text/css" rel="stylesheet" href="assets/libs/media-element/build/mediaelementplayer.min.css">
    <!-- STYLE CSS    --><!--link(type="text/css", rel='stylesheet', href='assets/css/color-1.css', id="color-skins")-->
    <link type="text/css" rel="stylesheet" href="#" id="color-skins">
    <script src="assets/libs/jquery/jquery-2.1.4.min.js"></script>
    <script src="assets/libs/js-cookie/js.cookie.js"></script>
    <script>if ((Cookies.get('color-skin') != undefined) && (Cookies.get('color-skin') != 'color-1')) {
        $('#color-skins').attr('href', 'assets/css/' + Cookies.get('color-skin') + '.css');
    } else if ((Cookies.get('color-skin') == undefined) || (Cookies.get('color-skin') == 'color-1')) {
        $('#color-skins').attr('href', 'assets/css/color-1.css');
    }

	$(document).ready(function(e){

		//swal("weldone");

	});
    </script>

	<link type="text/css" rel="stylesheet" href="assets/css/sweet_alert2.css">
	<link type="text/css" rel="stylesheet" href="assets/css/sweetalert2.min.css">

	<script src="assets/js/sweetalert.js"></script>
	<script src="assets/js/sweetalert2.min.js"></script>

</head>
<body><!-- HEADER-->
<header>

   <?php
include_once 'includes/header.php';
?>
</header>
<!-- WRAPPER-->
<div id="wrapper-content"><!-- PAGE WRAPPER-->
    <div id="page-wrapper"><!-- MAIN CONTENT-->
        <div class="main-content"><!-- CONTENT-->
            <div class="content">


                <div class="section section-padding courses-detail">
                    <div class="container">
                        <div class="courses-detail-wrapper">
                            <div class="row">

							<div class="col-md-3 sidebar layout-left">
                                    <div class="row">

                                        <div class="author-widget widget col-sm-6 col-md-12 col-xs-6 sd380">
                                            <div class="title-widget"><?php
if (!empty($matric_number)) {
    echo $matric_number .'&nbsp;&nbsp;||&nbsp;&nbsp;'. $prog_type;
}
?></div>
                                            <div class="content-widget">
                                                <div class="staff-item author-widget-wrapper customize">
                                                    <div class="staff-item-wrapper">

                                                        <div class="staff-info"><a href="#" data-toggle="modal" data-target="#myModall" class="staff-avatar"><?php echo $images;?></a><a href="#" class="staff-name" ><?php echo strtoupper($full_name); ?></a>

                                                            <div class="staff-job">
																<?php if ($app_dept != '') {echo $app_dept;} else {echo '<span class="label label-info" style="font-size:11px;">NIL FOR NOW</span>';}?>

															</div>
																															<div class="staff-desctiption">
																																<?php if ($app_prog != '') {echo $app_prog;} else {echo '<span class="label label-info" style="font-size:11px;">NIL FOR NOW</span>';}?><br>
                                                            <?php if ($prog_type != '') {echo $prog_type;} else {echo '<span class="label label-info" style="font-size:11px;">NIL FOR NOW</span>';}?><br>
																														</div>
                                                        </div>
                                                    </div>
                                                    													<button type="submit" onclick="window.location.href='index'" class="btn btn-login btn-green" style="width:200px;"><span>Logout</span></button>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="clearfix"></div>


                                    </div>
                                </div>
                                <div class="col-md-9 layout-right">
                                <?php include_once 'includes/php/notification.php';?>
									<?php
if (isset($_REQUEST['sms'])) {
    $page = $_REQUEST['sms'];
    include_once 'includes/pages/' . $page . '.php';
} else {
    include_once 'includes/pages/default.php';
}

?>


                                </div>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- BUTTON BACK TO TOP-->
    <div id="back-top"><a href="#top"><i class="fa fa-angle-double-up"></i></a></div>
</div>
<!-- FOOTER-->
<footer>
    <div class="footer-top">
        <div class="container">

        </div>
    </div>
    <div class="footer-main">
        <div class="container">

            <div class="hyperlink">
                <div class="pull-left hyper-left">

                </div>
                <div class="pull-right hyper-right"><a href="https://jsp.ng"> &copy;JSP</a></div>
            </div>
        </div>
    </div>
</footer>


<!-- transaction Modal -->
<div class="modal fade modal-lg" id="myModallTLOG" tabindex="-1" role="dialog" aria-labelledby="myModalLabelTLOG" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabelTLOG">View Transaction Log</h4>
      </div>



      <div class="modal-body">

        <?php echo view_remita_pay_transaction_log_min($user_id, $t_type = 5, $t_for= 5); ?>

      </div>
  <div class="modal-footer">
          <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
      </div>


  </div>
</div>
</div>
<!-------------------------------transaction modal ------------------------------------------------------------------->

<!-- transaction Modal -->
<div class="modal fade modal-lg" id="myModallTLOG2" tabindex="-1" role="dialog" aria-labelledby="myModalLabelTLOG" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabelTLOG">View Transaction Log</h4>
      </div>



      <div class="modal-body">

        <?php echo view_remita_pay_transaction_log_min($user_id, $t_type = 55, $t_for= 55); ?>

      </div>
  <div class="modal-footer">
          <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
      </div>


  </div>
</div>
</div>
<!-------------------------------transaction modal ------------------------------------------------------------------->



<!-- passport Modal -->
<div class="modal fade" id="myModall" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">Upload your passport</h4>
      </div>
      <div class="modal-body">
      <div class="col-md-5" style="padding-right:0px">

      <form action="dashboard.php" method="post" enctype="multipart/form-data">
        <?php if (empty($image)) {?>
         <a href="#" class="btn btn-default" data-toggle="modal" data-target="#myModall"> <img class="thumbnail img-responsive text-center" style="height:170px;"  src="images/bg.jpg" ></img></a>

        <?php } else {?>
                       <a href="#" class="btn btn-default" data-toggle="modal" data-target="#myModall"> <img class="thumbnail img-responsive text-center" style="height:170px;"  src="../uploads/<?php echo get_user_image($user_id); ?>" alt="Click here to upload image"></img></a><!-- passed mymodall for upload -->


                <?php }?>

         <input type="file" name="image" />




    </center>
      </div>
      <div class="col-md-7" style="padding-left:0px">
        <div class="list-group">
        <div class="form-group">
          <div class="list-group">
          <div><button class="btn btn-login btn-green" disabled><span><h4>Instructions</h4></span></button></div>
            Your picture to be uploaded MUST conform with the following:<br/>

                        * Jpeg format ONLY<br/>
                        * Less than 30KB<br/>
                        * Exactly 150px by 150px<br/>
                        * Recent Photograph<br/>
                        * Of good quality<br/>
                        * Of plain white background<br/>
        </div>

        </div>
      </div>
      </div>
                <div class="modal-footer">
                 <button type="submit"  class="btn btn-login btn-green" disabled><span>Upload Passport</span></button>
								 <button type="button"  class="btn btn-login btn-green" data-dismiss="modal"><span>Close</span></button>


               </div>

                  <input type="hidden" name="act" value="upload_image" />




            </form>



    </div>
  </div>
</div>
</div>
<!-------------------------------passport modal ------------------------------------------------------------------->






<!-- LOADING--><!-- JAVASCRIPT LIBS-->
<script>if ((Cookies.get('color-skin') != undefined) && (Cookies.get('color-skin') != 'color-1')) {
    $('.logo .header-logo img').attr('src', 'assets/images/logo-' + Cookies.get('color-skin') + '.png');
} else if ((Cookies.get('color-skin') == undefined) || (Cookies.get('color-skin') == 'color-1')) {
    $('.logo .header-logo img').attr('src', 'assets/images/logo-color-1.png');
}</script>
<script src="assets/libs/bootstrap-3.3.5/js/bootstrap.min.js"></script>
<script src="assets/libs/smooth-scroll/jquery-smoothscroll.js"></script>
<script src="assets/libs/owl-carousel-2.0/owl.carousel.min.js"></script>
<script src="assets/libs/appear/jquery.appear.js"></script>
<script src="assets/libs/count-to/jquery.countTo.js"></script>
<script src="assets/libs/wow-js/wow.min.js"></script>
<script src="assets/libs/selectbox/js/jquery.selectbox-0.2.min.js"></script>
<script src="assets/libs/fancybox/js/jquery.fancybox.js"></script>
<script src="assets/libs/fancybox/js/jquery.fancybox-buttons.js"></script>
<!-- MAIN JS-->
<script src="assets/js/main.js"></script>
<?php require 'includes/js_plugins.php';?>
</body>
</html>
