<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>Dashboard RSUP Dr. Kariadi</title>
  <link rel="stylesheet" href="<?php echo base_url(); ?>assets/style/bootstrap/css/bootstrap.min.css">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
  <link rel="stylesheet" href="<?php echo base_url(); ?>assets/style/css/AdminLTE.min.css">
  <link rel="stylesheet" href="<?php echo base_url(); ?>assets/style/css/mystyle.css">
  <link rel="stylesheet" href="<?php echo base_url(); ?>assets/style/plugins/iCheck/square/blue.css">
</head>
<body class="hold-transition login-page">
<?php
  $_SESSION['n1'] = rand(1,10); //mendapatkan nilai 1
  $_SESSION['n2'] = rand(1,10); //mendapatkan nilai 2
  $_SESSION['hasil'] = $_SESSION['n1']+$_SESSION['n2']; //menjumlahkan nilai 1 dan nilai 2
?>
<br><br>
<div class="login-box">
  <div class="login-logo">
    <b>Dashboard</b> RSDK
  </div>
  <div class="login-box-body">
    <!--<img src="<?php //echo base_url(); ?>assets/style/dist/img/logo.png"><br><br>-->
    <p align="center">Login</p>
    <form action="<?php echo base_url(); ?>admin/login" method="post">
      <div class="form-group has-feedback">
        <input type="text" name="username" class="form-control" placeholder="Username" required="required">
        <span class="glyphicon glyphicon-user form-control-feedback"></span>
      </div>
      <div class="form-group has-feedback">
        <input type="password" name="password" class="form-control" placeholder="Password" required="required">
        <span class="glyphicon glyphicon-lock form-control-feedback"></span>
      </div>
          <div class="input-group">
            <div class="input-group-btn">
              <spann class="btn btn-danger btn-sm" type="button"><?php echo form_label("$_SESSION[n1] + $_SESSION[n2] = "); ?></spann>
            </div>
            <script language='javascript'>function validAngka(a) { if(!/^[0-9.]+$/.test(a.value)) { a.value = a.value.substring(0,a.value.length-1000); } }</script>
            <input type="text" name="captcha" class="form-control" placeholder="Hasil Penjumlahan" onkeyup="validAngka(this)" size="2" required="required">
          </div><br>
      <div class="row">
        <div class="col-xs-4">
          <a href="<?php echo base_url('profil'); ?>" class="btn btn-success btn-block btn-flat">Tamu</a>
        </div>
        <div class="col-xs-4">
        </div>
        <!-- /.col -->
        <div class="col-xs-4">
          <button type="submit" name="login" value="Login" class="btn btn-primary btn-block btn-flat">Sign In</button>
        </div>
        <!-- /.col -->
      </div>
    </form>
  <br><center><h4 style="color:red;"><?php echo $error; ?></h4></center>

<br><center>
<!-- Histats.com  (div with counter) --><div id="histats_counter"></div>
<!-- Histats.com  START  (aync)-->
<script type="text/javascript">var _Hasync= _Hasync|| [];
_Hasync.push(['Histats.start', '1,3564796,4,3024,130,80,00011111']);
_Hasync.push(['Histats.fasi', '1']);
_Hasync.push(['Histats.track_hits', '']);
(function() {
var hs = document.createElement('script'); hs.type = 'text/javascript'; hs.async = true;
hs.src = ('//s10.histats.com/js15_as.js');
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(hs);
})();</script>
<noscript><a href="/" target="_blank"><img  src="//sstatic1.histats.com/0.gif?3564796&101" alt="counter easy hit" border="0"></a></noscript>
<!-- Histats.com  END  -->      
</center>

  <script src="<?php echo base_url(); ?>assets/style/plugins/jQuery/jQuery-2.2.0.min.js"></script>
  <script src="<?php echo base_url(); ?>assets/style/bootstrap/js/bootstrap.min.js"></script>

</body>
</html>
