<!DOCTYPE html>
<html>
<head>
  <!-- Standard Meta -->
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
  <LINK rel="icon" href="images/aa.png" type="image/png">
  <LINK rel="shortcut icon" href="images/aa.png" type="image/png">
        
  <!-- Site Properities -->
  <title>HMS - Saranghe Living</title>
  <link rel="stylesheet" type="text/css" href="css/components/reset.css">
  <link rel="stylesheet" type="text/css" href="css/components/site.css">

  <link rel="stylesheet" type="text/css" href="css/components/container.css">
  <link rel="stylesheet" type="text/css" href="css/components/grid.css">
  <link rel="stylesheet" type="text/css" href="css/components/header.css">
  <link rel="stylesheet" type="text/css" href="css/components/image.css">
  <link rel="stylesheet" type="text/css" href="css/components/menu.css">

  <link rel="stylesheet" type="text/css" href="css/components/divider.css">
  <link rel="stylesheet" type="text/css" href="css/components/segment.css">
  <link rel="stylesheet" type="text/css" href="css/components/form.css">
  <link rel="stylesheet" type="text/css" href="css/components/input.css">
  <link rel="stylesheet" type="text/css" href="css/components/button.css">
  <link rel="stylesheet" type="text/css" href="css/components/list.css">
  <link rel="stylesheet" type="text/css" href="css/components/message.css">
  <link rel="stylesheet" type="text/css" href="css/components/icon.css">

  <script src="js/jquery.min.js"></script>
  <script src="css/components/form.js"></script>
  <script src="css/components/transition.js"></script>

  <style type="text/css">
    
    body > .grid {
      height: 100%;
    }
    .image {
      margin-top: -100px;
    }
    .column {
      max-width: 450px;
    }
  </style>
  <script>
  $(document)
    .ready(function() {
      $('.ui.form')
        .form({
          fields: {
            email: {
              identifier  : 'email',
              rules: [
                {
                  type   : 'empty',
                  prompt : 'Please enter your e-mail'
                },
                {
                  type   : 'email',
                  prompt : 'Please enter a valid e-mail'
                }
              ]
            },
            password: {
              identifier  : 'password',
              rules: [
                {
                  type   : 'empty',
                  prompt : 'Please enter your password'
                },
                {
                  type   : 'length[6]',
                  prompt : 'Your password must be at least 6 characters'
                }
              ]
            }
          }
        })
      ;
    })
  ;
  </script>
</head>
<body>

<div class="ui middle aligned center aligned grid">
  <div class="column">
    <h2 class="ui teal image header">
      <img src="images/aa.png" class="image">
      
      <div class="content">
        
      </div>
      <br>
      <div class="content">
        Saranghe Living
      </div>
      <br>
      <div class="content">
        Log-in to your account
      </div>
    </h2>
    <form class="ui large form" action="actions/login.php" method="POST">
      <div class="ui stacked segment">
        <div class="field">
          <div class="ui left icon input">
            <i class="user icon"></i>
            <input type="text" name="email" placeholder="E-mail address">
          </div>
        </div>
        <div class="field">
          <div class="ui left icon input">
            <i class="lock icon"></i>
            <input type="password" name="password" placeholder="Password">
          </div>
        </div>
        <div class="ui fluid large teal submit button">Login</div>
      </div>

      <div class="ui error message"></div>
		<?php
		if (isset($_GET['ck']) > 0){
			echo "<div class='ui error'><font color='red'>".base64_decode($_GET['ck'])."</font></div>";
		}
		?>
    </form>

  </div>
</div>

</body>

</html>
