<?php
    session_start();
    if(empty($_SESSION['id_petugas']))
    {
        echo "<meta http-equiv='refresh' content='0; url=login.php'>";
    }
    else
    {
        include("../inc/koneksi.php");
        $id_petugas = $_SESSION['id_petugas'];
        $nama = $_SESSION['nama'];
        $telp = $_SESSION['telp'];

?>
<!DOCTYPE HTML>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0 minimal-ui" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black">

<link rel="icon" type="image/png" href="images/splash/android-chrome-192x192.png" sizes="192x192">
<link rel="apple-touch-icon" sizes="196x196" href="images/splash/apple-touch-icon-196x196.png">
<link rel="apple-touch-icon" sizes="180x180" href="images/splash/apple-touch-icon-180x180.png">
<link rel="apple-touch-icon" sizes="152x152" href="images/splash/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="144x144" href="images/splash/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="120x120" href="images/splash/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="114x114" href="images/splash/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="76x76" href="images/splash/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="72x72" href="images/splash/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="60x60" href="images/splash/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="57x57" href="images/splash/apple-touch-icon-57x57.png">
<link rel="icon" type="image/png" href="images/splash/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="images/splash/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="images/splash/favicon-16x16.png" sizes="16x16">
<link rel="shortcut icon" href="images/splash/favicon.ico" type="image/x-icon" />
<link href='https://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css'>
    
<title>Tagor.</title>

<link rel="stylesheet" type="text/css" href="styles/style.css">
<link rel="stylesheet" type="text/css" href="styles/menu.css">
<link rel="stylesheet" type="text/css" href="styles/framework.css">
<link rel="stylesheet" type="text/css" href="styles/font-awesome.css">

<script type="text/javascript" src="scripts/jquery.js"></script>
<script type="text/javascript" src="scripts/plugins.js"></script>
<script type="text/javascript" src="scripts/custom.js"></script>

<script src="http://maps.google.com/maps?file=api&v=2&key=AIzaSyCe-95nlLo7bu1FWl94IwoZ14o5WnE9L_M&sensor=false" type="text/javascript"></script>
<style type="text/css">
	body {font:10pt arial; }
	.main { text-align:center; font:12pt Arial; width:100%; height:auto; }
	.eventtext {width:100%; margin-top:20px; font:10pt Arial; text-align:left; line-height:25px; background-color:#EDF4F8;
	padding:5px; border:1px dashed #C2DAE7;}
	#mapa {width:100%; height:340px; border:5px solid #DEEBF2;}

	.code {border:1px dashed #cecece; background-color:#F7F7F7; padding:5px;}
	.small {font:9pt arial; color:gray; padding:2px; }
	.jimi { margin:0px;}
	</style>
	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
</head>

<body>
<div class="gallery-fix"></div><!-- Fix Gallery next/prev error on Android -->
<div class="sidebar-tap-close"></div><!-- Overlay for content to close Sidebar -->

<div class="header-fixed header-light">
    <a href="index.php" class="header-logo"></a>
    <a onclick="location.reload();" class="header-icon-4"><i class="fa fa-refresh"></i></a>
</div>              
<div id="page-content">
    <div id="page-content-scroll"><!--Enables this element to be scrolled -->        
        <div class="header-clear"></div>
        <div class="content-strip">
            <div class="strip-content">
                <h4>Pemberitahuan</h4>
                <p>Laporan Pemberitahuan Tabaos</p>
            </div>
            <div class="overlay"></div>
            <img class="preload-image" data-original="images/3.jpg" alt="img">
        </div>
		<div class="decoration"></div>
		<div class="content">
			<div class="container no-bottom">
                <div class="one-responsive">
                	<?php
                		//cari id
						// $cari = mysql_query("SELECT id_user FROM user WHERE username='$user'");
						// $r = mysql_fetch_array($cari);
						// $id_user = $r[0];

                		$cari_laporan = mysql_query("SELECT * FROM laporan");
                	
						while ($notif = mysql_fetch_array($cari_laporan)) {

						$status = $notif[10];

						if ($status=="Menunggu") {
							$warna = "bg-orange-light";
						}
						elseif ($status=="Sedang ditangani") {
							$warna = "bg-blue-light";
						}
						else
						{
							$warna = "bg-green-dark";	
						}
							
                	?>
                    <div class="static-notification <?php echo "$warna";?>">
                        <h6><i class="fa fa-bell static-notification-icon"></i><?php echo "$notif[4] ($notif[10])";?></h6>
                        <a class="static-notification-close" href="#"><i class="fa fa-times"></i></a>
                        <p>
                            <?php 
                                echo "$notif[5] <br>";
                                echo "<a href='detail_laporan?id=$notif[0]' class='button button-block button-teal teal-3d'><i class='fa fa-angle-right'></i> Lihat  Detail</a>";

                            ?>
                            <br>
                            
                        </p>
                    </div>
                    <?php
                    	}
                    ?>
                              
                </div>
            </div>
		</div>
    </div>

</div>

<div class="footer-clear"></div>

<div class="footer-menu footer-menu-light">
    <a href="index" class="footer-menu-item"><i class="fa fa-home"></i><em>Home</em></a>
    <a href="notif" class="footer-menu-item active-footer-item"><i class="fa fa-bell-o"></i><em>Notifikasi</em></a>
    <a href="laporan" class="footer-menu-item"><i class="fa fa-file-o"></i><em>Laporan</em></a>
    <a href="histori" class="footer-menu-item"><i class="fa fa-refresh"></i><em>History</em></a>
    <a href="logout.php" class="footer-menu-item"><i class="fa fa-sign-out"></i><em>Keluar</em></a>
    <a href="#" class="footer-menu-item footer-tablet-item"><i class="fa fa-facebook"></i><em>Facebook</em></a>
    <a href="#" class="footer-menu-item footer-tablet-item"><i class="fa fa-twitter"></i><em>Twitter</em></a>
    <a href="#" class="footer-menu-item footer-tablet-item"><i class="fa fa-google-plus"></i><em>Google+</em></a>
    <a href="#" class="footer-menu-item footer-tablet-item"><i class="fa fa-phone"></i><em>Call Us</em></a>
    <a href="#" class="footer-menu-item footer-tablet-item"><i class="fa fa-comment-o"></i><em>Text Us</em></a>
</div>
</body>
<?php 
    } 
?>