<?php
session_start();
include 'admin/koneksi/koneksi.php';
include 'include/app.php';

$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:fixed;
			bottom:0px;
			width:10%; 
		}
		.footer{
			height:60px;
			line-height:0px;
			background:<?php echo $app['footer'];?>;
			color:#fff;
			margin-left:0%;
			position:fixed;
			bottom:0px;
			width:100%; 
		}
		.socialize {
			background: transparent;
			padding: 3px 0 1px 0;
			position:relative ;
			margin: 0 0.5% 0.5% 0.5%;
		width:100%;
		}
		body, html {
		    top:10%;
  height: 100%;
}

.bg {
  /* The image used */
			background: url(admin/images/<?= $app['background'];?>)  no-repeat ;

  /* Full height */
  height: 100%;

  /* Center and scale the image nicely */
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}
	
		@keyframes marquee {
		  from {
			transform: translateX(0);
		  }
		  to {
			transform: translateX(-75%);
		  }
		}

		@keyframes marquee-r {
		  from {
			transform: translateX(-75%);
		  }
		  to {
			transform: translateX(0);
		  }
		}

		.marquee {
		  position: relative;
		  width: 100vw;
		  max-width: 100%;
		  height: 10em;
		  overflow: hidden;
		}

		@media screen and (max-width: 768px) {
		  .marquee {
			height: 6em;
		  }
		}

		.track {
		  position: absolute;
		  white-space: nowrap;
		  will-change: transform;
		  animation: marquee 40s linear infinite;
		}

		
		@media screen and (max-width: 768px) {
		  .marquee-text {
			font-size: 6em;
		  }
		}
		
		
        label > input{ /* Menyembunyikan radio button */
          visibility: hidden; 
          position: absolute; 
        }
        label > input + img{ /* style gambar */
          cursor:pointer;
          border:2px solid transparent;
        }
        label > input:checked + img{ /* (RADIO CHECKED) style gambar */
          border:2px solid #f00;
        }
        textarea {
    
    font-family:"Times New Roman", Times, serif;  
   font-size: 50px;   
}
 </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="wrapper bg">
			<section class="section home ">
				<div class="row">
					<div class="socialize">
					    <table border="0" align="center" width="100%">
					        <tr>
					            <td width="15%" align="center">	</td>
					            <td width="70%" align="center"><h3 ><div align="center" style="font-size:60px;color:white; padding:1px;" id="clock"></div></h3>
					            <h3 style="font-size:25px;color:white; padding:1px;"><?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;
						$profil = mysql_fetch_array(mysql_query("SELECT * from user"));
						?></h3></td>
					            <td width="15%" align="center"></td>
					        </tr>
					       
					    </table>
				
						<?php if($app['kategori']==1){ ?>
							
															<table width="100%">
																<tr>
																<?php
																$sql_p = mysql_query("SELECT * from jenis_kelamin");
																while($d_p = mysql_fetch_array($sql_p)){
																?>
																<form method="GET">
																	<td width="10%"><input type="radio" onchange="submit();" name="jenis_kelamin" value="<?= $d_p['kd_jenis'];?>" class="form-control" <?php if(isset($_GET['jenis_kelamin']) && $_GET['jenis_kelamin']==$d_p['kd_jenis']){ echo 'checked';}?>/></td>
																	<td><h2><?= $d_p['jenis_kelamin'];?></h2></td>
																</form>
																	<?php ;} ?>
																</tr>
															</table>
							<br/>
							<?php ;} ?>
							<b><h2 class="h2" style="color:<?= $app['text_isi'];?>;font-weight: bold;"><?php  echo $app['nama_aplikasi'];?></h2></b>
							<h3 class="h3" style="color:<?= $app['text_isi'];?>"><?php  echo $app['nama_perusahaan'];?></h3>
						<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>
							<br/>									
					
						     <form action="include/submit" method="post">
						          
						<table width="80%" border="0" align="center">
						    <tr>
						        <td width="50%"  align="left">
						           
                                      <label>
                                        
										<input type="hidden" name="id_pertanyaan" value="<?= $pertanyaan['id'];?>"/>
                                         <input type="radio"  name="survey" value="SP" id="emoji" required>
                                         <img src="admin/images/sp.png" width="550px">
                                     </label><br/>
                                     <label>
                                         <input type="radio"  name="survey" value="P" id="emoji" >
                                         <img src="admin/images/p.png" width="550px">
                                     </label><br/>
                                     <label>
                                         <input type="radio"  name="survey" value="TP" id="emoji">
                                         <img src="admin/images/tp.png" width="550px">
                                     </label>
                                     
                                    
                                </td>
						        <td width="50%"  ><h3>Saran Anda Untuk Kami :</h3> <textarea name="saran" class="form-control" style="font-size: 30px;   " width="90%" rows="5"></textarea><br/>
						        <input class="btn btn-lg btn-primary" type="submit" style="font-size=30px" value="Submit"></input>
						        </td>
						    </tr>
						</table>
						</form>
						
						<div class="clearfix"></div>
						
						
						
						<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 class="row">
				        
			    </div>
				
				
			
			</section> <!-- /home -->
			<div class="time">
				<h3><div align="center" id="clock"></div></h3>
						
				
			</div>
			<div class="footer">
			<div class="marquee">
			  <div class="track">
				<div class="marquee-text">
					<table width="100%">
						<tr>
						<?php $s_feed=mysql_query("SELECT * FROM feed where status='1' ");
							while ($d_feed = mysql_fetch_array($s_feed)){
						?>
						
						<td>  <h3 style="color:<?= $app['text_footer'];?>"><?= $d_feed['tanggal'];?><h3>  </td><td width="10%"><h3 style="color:<?= $app['footer'];?>">--<h3></td><td> <h3 style="color:<?= $app['text_footer'];?>"> <?= $d_feed['feed'];?><h3></td><td width="10%"><h3 style="color:<?= $app['footer'];?>">---------<h3></td>
						<?php
							;}
						?>
						</tr>
					</table>
				</div>
			  </div>
			</div>
			</div>
		</div> <!-- /wrapper -->
		
		<!-- ==============================================
		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>