<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="description" content="PILKETOS WATUSKA">
		<meta name="author" content="Aetos Digital Design">
		<meta name="keyword" content="Aplikasi Voting">
		<link rel="shortcut icon" href="<?php echo base_url(); ?>assets/img/icon.png">
		<title>PILKETOS | PEMILIH</title>
		<link href="<?php echo base_url(); ?>assets/css/bootstrap.min.css" rel="stylesheet">
		<link href="<?php echo base_url(); ?>assets/css/bootstrap-reset.css" rel="stylesheet">
		<link href="<?php echo base_url(); ?>assets/assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
		<link href="<?php echo base_url(); ?>assets/css/style.css" rel="stylesheet">
		<link href="<?php echo base_url(); ?>assets/css/style-responsive.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>/assets/gritter/css/jquery.gritter.css" />
		<script src="<?php echo base_url(); ?>assets/js/jquery.js"></script>
		<script src="<?php echo base_url(); ?>assets/js/bootstrap.min.js"></script>
		<script>
			$(document).ready(function() {
				$('.alert').hide();
				<?php if($this->session->flashdata('msg')) { ?>
				$('.alert').show();
			});
			<?php } ?>
		</script>
	</head>
	<body class="lock-screen" onload="startTime">
		<div class="lock-wrapper">
			<?php if(empty($logo)){ $logo = "default.gif"; } ?>
			<div id="mybutton1" class="lock-box text-center">
				<img src="<?php echo base_url().'assets/img/logo/'.$logo; ?>" alt="lock avatar" style="height:75px; width:75px;"/>
				<h2 style="color:blue"><b>TERIMAKASIH SUDAH MEMILIH</b></h2>
				<h1 style="color:black"><b>SALAM DEMOKRASI!</b></h1>
			</div>
			<div id="mybutton2" class="lock-box text-center">
				<img src="<?php echo base_url().'assets/img/logo/'.$logo; ?>" alt="lock avatar" style="height:75px; width:75px;"/>
				<h2 style="color:blue"><b><?=$judul?></b></h2>
				<h1 style="color:black"><b><?=$subjudul?></b></h1>
				<span style="color:green" class="locked"><b>PERIODE <?=$periode?></b></span>
				<form method="post" role="form" class="form-inline" action="<?php echo base_url(); ?>user/login_user/auth">
					<div class="form-group col-lg-12">
						<input type="hidden" placeholder="TOKEN" id="password" name="password" value="pemilih" class="form-control lock-input" autofocus style="color:black;">
						<button  class="btn btn-lock" type="submit">
							SAYA SIAP MEMILIH <i class="fa fa-check"></i>
						</button>
					</div>
				</form>
			</div>
			<div class="col-md-12">
				<div class="alert alert-danger fade in" style="display:none; margin-top:45px; alignt:center;">
					<a class="close" data-dismiss="alert" href="#" aria-hidden="true">&times;</a>
					<?php echo $this->session->flashdata('msg'); ?>
				</div> 
			</div> 
		</div>
		<script type="text/javascript" src="<?php echo base_url(); ?>/assets/gritter/js/jquery.gritter.js"></script>
		<script type="text/javascript">
			<?php if($this->session->flashdata('pesan')) { ?>
				var unique_id = $.gritter.add({
					title: 'BERHASIL',
					text: '<?=$this->session->flashdata("pesan")?>',
				});
				setTimeout(function(){
					$.gritter.remove(unique_id, {
						fade: true,
						speed: 'slow'
					});
				}, 4000)
			<?php } ?>
		</script>
		<script>
			function startTime() {
				var today=new Date();
				var h=today.getHours();
				var m=today.getMinutes();
				var s=today.getSeconds();
				m=checkTime(m);
				s=checkTime(s);
				document.getElementById('time').innerHTML=h+":"+m+":"+s;
				t=setTimeout(function(){startTime()},500);
			}
			function checkTime(i) {
				if (i<10) { i="0" + i; }
				return i;
			}
		</script>
		<script>
			$(document).ready(function() {
				$('#mybutton1').fadeOut(5000);
			});
			$(document).ready(function() {
				$('#mybutton2').hide().delay(5000).fadeIn(2500);
			});
		</script>
	</body>
</html>