<?php
include 'admin/koneksi/koneksi.php';
include 'include/app.php';
ini_set('date.timezone', 'Asia/Jakarta');
$skr = date('Y-m-d');

?>
<!Doctype html>
<html lang="en-US">
	<head>
		<!-- ==============================================
		Title and basic Metas
		=============================================== -->
        <meta charset="utf-8">
        <title><?= $app['nama_aplikasi'];?> - <?= $app['nama_perusahaan'];?></title>
		<meta name="description" content="Survey Kepuasan Pelanggan">
		<meta name="author" content="GendhiSoftware">
		
		<!-- ==============================================
		Mobile Metas
		=============================================== -->
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
		
		<!-- ==============================================
		Fonts and CSS
		=============================================== -->
		<link href="css/font-awesome.min.css" rel="stylesheet" type="text/css">
		<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
        <link href="css/style.css" rel="stylesheet" type="text/css">
		<style>
		
		.time{
			height:60px;
			font-size: 30px;
			line-height: 1;
			background:<?php echo $app['jam'];?>;
			color:#fff;
			padding-top: 0;
			position:absolute;
			bottom:0px;
			width:15%; 
		}
		.footer{
			height:60px;
			line-height:0px;
			background:<?php echo $app['footer'];?>;
			color:#fff;
			margin-left:15%;
			position:absolute;
			bottom:0px;
			width:85%; 
		}
		.socialize {
			background: <?php echo $app['header'];?>;
			padding: 3px 0 1px 0;
			position:relative ;
			margin: 0 0.5% 0.5% 0.5%;
		width:100%;
		}
		body {
			font-size: 15px;
			font-family: 'Open Sans', sans-serif;
			background-image: url(admin/images/<?= $app['background'];?>);
		}
		</style>
		<!-- ==============================================
		JS
		=============================================== -->
		<script src="js/jquery-1.10.2.min.js"></script>
        <script src="js/modernizr.custom.97074.js"></script>
		
		<!--[if lt IE 9]>
			<script src="js/selectivizr.js"></script>
            <script src="js/respond.min.js"></script>
        <![endif]-->

        <!-- ==============================================
		Favicons
		=============================================== -->
       
        <link rel="shortcut icon" href="admin/images/<?= $app['logo'];?>">
		
    </head>
    <body>
		
				<div class="row">
				    <table width="100%">
					<tr>
						<td width = "15%"><img src="admin/images/<?= $app['logo'];?>" width="100%" alt="Image"></td>
						<td><div class="socialize">
						<h2 class="h2" style="color:<?= $app['text_header'];?>" > <?= $app['nama_perusahaan'];?></h2>
					</div></td>
					</tr>
					<tr><td colspan="2"><br/><br/><h3 class="h3" style="color:<?= $app['text_isi'];?>"><?php $pertanyaan = mysql_fetch_array(mysql_query("SELECT * from pertanyaan where  status='1' ORDER by id DESC")); echo $pertanyaan['pertanyaan'];?></h3></td></tr>
					</table>
				</div>
				<div class="center-box">
					<br/><br/>
					<div class="container">
							
						<div class="row">
						<div class="tile tile-item tile-client">
							<a class="ascensorLink tile-nav" data-toggle="modal" role="button" href="#portfolio-1">
								<h5 class="h5">Sangat Puas</h5>
								<i class="fa fa-thumbs-o-up fa-5x"></i>
							</a>
						</div>
						
						<div class="tile tile-item tile-team">
							<a class="ascensorLink tile-nav" data-toggle="modal" role="button" href="#portfolio-2">
								<h5 class="h5">Puas</h5>
								<i class="fa fa-smile-o fa-5x"></i>
							</a>
						</div>
						<div class="tile tile-item tile-about">
							<a class="ascensorLink  tile-nav" data-toggle="modal" role="button" href="#portfolio-3">
								<h5 class="h5">Cukup</h5>
								<i class="fa fa-meh-o fa-5x"></i>
							</a>
						</div>
						<div class="tile tile-item tile-service">
							<a class="ascensorLink  tile-nav" data-toggle="modal" role="button" href="#portfolio-4">
								<h5 class="h5">Tidak Puas</h5>
								<i class="fa fa-frown-o fa-5x"></i>
							</a>
						</div>
						<div class="clearfix"><br/></div>
						<div class="clearfix"></div>
						
						<h1 align="center" style="color:<?= $app['text_isi'];?>"><?php $tanggal = date('d M Y');
								$day = date('D', strtotime($tanggal));
								$dayList = array(
									'Sun' => 'Minggu',
									'Mon' => 'Senin',
									'Tue' => 'Selasa',
									'Wed' => 'Rabu',
									'Thu' => 'Kamis',
									'Fri' => 'Jumat',
									'Sat' => 'Sabtu'
								);
						echo $dayList[$day].", ".$tanggal;?></h1>
						<p align="center" style="color:<?= $app['text_isi'];?>"><?= $app['nama_aplikasi'];?></p>
						<script type="text/javascript">
							var detik = <?php echo date('s'); ?>;
							var menit = <?php echo date('i'); ?>;
							var jam   = <?php echo date('H'); ?>;
						 
							function clock()
							{
							if (detik!=0 && detik%60==0) {
								menit++;
								detik=0;
							}
							second = detik;
							 
							if (menit!=0 && menit%60==0) {
								jam++;
								menit=0;
							}
							minute = menit;
							 
							if (jam!=0 && jam%24==0) {
								jam=0;
							}
							hour = jam;
							 
							if (detik<10){
								second='0'+detik;
							}
							if (menit<10){
								minute='0'+menit;
							}
							 
							if (jam<10){
								hour='0'+jam;
							}
							waktu = hour+':'+minute+':'+second;
							 
							document.getElementById("clock").innerHTML = waktu;
							detik++;
						}
					 
						setInterval(clock,1000);
						</script>
				</div>
			</div>
		</div>
			
			<div class="time">
				<h3><div align="center" id="clock"></div></h3>
						
				
			</div>
			<div class="footer"><marquee scrollamount="5">
			<?php $s_feed=mysql_query("SELECT * FROM feed where status='1'  order by id  DESC");
					$d_feed = mysql_fetch_array($s_feed);
				?>
			<h3 align="center"><?= $d_feed['feed'];?></h3>
			</marquee>
			
			</div>
		 <!-- /wrapper -->
		
		<!-- ==============================================
								MODAL
		=============================================== -->
		<!-- Sangat Puas -->
								<div class="modal fade" id="portfolio-1" tabindex="-1" role="dialog" aria-hidden="true">
									<div class="modal-dialog">
										<div class="contact-box">
									  	
											<div class="modal-header">
										  		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
										  		<h3 class="h3 modal-title">Anda Memilih Sangat Puas ?</h3>
											</div>
											<div class="modal-body">
												<div class="container">
													<div class="row">
														<div class="col-sm-2">
														</div>
														<div class="col-sm-8">
														<div class="row">
															<form method="POST" action="include/submit.php">
															<table width="100%" border="0">
															<tr>
															<td align="center" width="30%"><i class="fa fa-thumbs-o-up fa-5x"></i></td>
															<td align="center" width="70%"><textarea class="form-control" name="saran" rows="5" Placeholder="Masukkan Saran"></textarea></td>
															</tr>
															</table>
															<br/>
															
															<input type="hidden" name="survey" value="SP"/>
															<input type="hidden" name="id_pertanyaan" value="<?= $pertanyaan['id'];?>"/>
															
															<p align="center"> <button type="submit" class="btn btn-lg btn-success " ><b><i class="fa fa-check"></i> Ya</b></button>
															
															 <button  data-dismiss="modal" aria-hidden="true" class="btn btn-lg btn-danger" ><b><i class="fa fa-times"></i> Tidak</b></button></p>
														</form>
														</div>
														</div>
														<div class="col-sm-2">
															
														</div>
													</div>
												</div>
											</div>
									  	
										</div>
									</div>
								</div>
		<!-- Puas -->
								<div class="modal fade" id="portfolio-2" tabindex="-1" role="dialog" aria-hidden="true">
									<div class="modal-dialog">
										<div class="contact-box">
									  	
											<div class="modal-header">
										  		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
										  		<h3 class="h3 modal-title">Anda Memilih Puas ?</h3>
											</div>
											<div class="modal-body">
												<div class="container">
													<div class="row">
														<div class="col-sm-2">
														</div>
														<div class="col-sm-8">
														<div class="row">
															<form method="POST" action="include/submit.php">
															<table width="100%" border="0">
															<tr>
															<td align="center" width="30%"><i class="fa fa-smile-o fa-5x"></i></td>
															<td align="center" width="70%"><textarea class="form-control" name="saran" rows="5" Placeholder="Masukkan Saran"></textarea></td>
															</tr>
															</table>
															<br/>
															
															<input type="hidden" name="survey" value="P"/>
															<input type="hidden" name="id_pertanyaan" value="<?= $pertanyaan['id'];?>"/>
															
															<p align="center"> <button type="submit" class="btn btn-lg btn-success " ><b><i class="fa fa-check"></i> Ya</b></button>
															
															 <button  data-dismiss="modal" aria-hidden="true" class="btn btn-lg btn-danger" ><b><i class="fa fa-times"></i> Tidak</b></button></p>
														</form>
														</div>
														</div>
														<div class="col-sm-2">
															
														</div>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
		<!-- Cukup -->
								<div class="modal fade" id="portfolio-3" tabindex="-1" role="dialog" aria-hidden="true">
									<div class="modal-dialog">
										<div class="contact-box">
									  	
											<div class="modal-header">
										  		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
										  		<h3 class="h3 modal-title">Anda Memilih Cukup ?</h3>
											</div>
											<div class="modal-body">
												<div class="container">
													<div class="row">
														<div class="col-sm-2">
														</div>
														<div class="col-sm-8">
														<div class="row">
															<form method="POST" action="include/submit.php">
															<table width="100%" border="0">
															<tr>
															<td align="center" width="30%"><i class="fa fa-meh-o fa-5x"></i></td>
															<td align="center" width="70%"><textarea class="form-control" name="saran" rows="5" Placeholder="Masukkan Saran"></textarea></td>
															</tr>
															</table>
															<br/>
															
															<input type="hidden" name="survey" value="C"/>
															<input type="hidden" name="id_pertanyaan" value="<?= $pertanyaan['id'];?>"/>
															
															<p align="center"> <button type="submit" class="btn btn-lg btn-success " ><b><i class="fa fa-check"></i> Ya</b></button>
															
															 <button  data-dismiss="modal" aria-hidden="true" class="btn btn-lg btn-danger" ><b><i class="fa fa-times"></i> Tidak</b></button></p>
														</form>
														</div>
														</div>
														<div class="col-sm-2">
															
														</div>
													</div>
												</div>
											</div>
									  	
										</div>
									</div>
								</div>
		<!-- Tidak Puas -->
								<div class="modal fade" id="portfolio-4" tabindex="-1" role="dialog" aria-hidden="true">
									<div class="modal-dialog">
										<div class="contact-box">
									  	
											<div class="modal-header">
										  		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
										  		<h3 class="h3 modal-title">Anda Memilih Tidak Puas ?</h3>
											</div>
											<div class="modal-body">
												<div class="container">
													<div class="row">
														<div class="col-sm-2">
														</div>
														<div class="col-sm-8">
														<div class="row">
															<form method="POST" action="include/submit.php">
															<table width="100%" border="0">
															<tr>
															<td align="center" width="30%"><i class="fa fa-frown-o fa-5x"></i></td>
															<td align="center" width="70%"><textarea class="form-control" name="saran" rows="5" Placeholder="Masukkan Saran"></textarea></td>
															</tr>
															</table>
															<br/>
															
															<input type="hidden" name="survey" value="TP"/>
															<input type="hidden" name="id_pertanyaan" value="<?= $pertanyaan['id'];?>"/>
															
															<p align="center"> <button type="submit" class="btn btn-lg btn-success " ><b><i class="fa fa-check"></i> Ya</b></button>
															
															 <button  data-dismiss="modal" aria-hidden="true" class="btn btn-lg btn-danger" ><b><i class="fa fa-times"></i> Tidak</b></button></p>
														</form>
														</div>
														</div>
														<div class="col-sm-2">
															
														</div>
													</div>
												</div>
											</div>
									  	
										</div>
									</div>
								</div>
		<!-- ==============================================
		JS
		=============================================== -->
		<script src="js/jquery.ascensor.js"></script>
        <script src="js/bootstrap.min.js"></script>
		<script src="js/jquery.mixitup.min.js"></script>
		<script src="js/jquery.hoverdir.js"></script>
		<script src="js/jquery.placeholder.min.js"></script>
        <script src="js/main.js"></script>
		<script src="js/bootstrap-notify/bootstrap-notify.min.js"></script>
		<?php
		if (isset($_GET['sukses'])) : ?>
		<script type="text/javascript">
		$(document).ready(function(){
				$.notify({
					icon: 'font-icon font-icon-lock',
					title: '<strong>Berhasil.</strong>',
					message: '<?=base64_decode($_GET['sukses']);?>'
				},{
					type: 'success',
					placement: {
						align: "center"
					}
				});
		});
		</script>
		<?php endif;?>
 </body>
</html>