<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Kumpulan Contoh Aplikasi Andeznet</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le styles -->
	    <link href="assets/css/bootstrap.css" rel="stylesheet" media="screen">
        <link href="assets/css/bootstrap-responsive.min.css" rel="stylesheet" media="screen">
	<script src="assets/js/jquery.js"></script>
    <script src="assets/js/bootstrap.min.js"></script>
		
    <style>
      body {
        padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
      }
    </style>
    <link href="assets/css/bootstrap-responsive.css" rel="stylesheet">

    <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="../assets/js/html5shiv.js"></script>
    <![endif]-->

    <!-- Fav and touch icons -->
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/ico/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/ico/apple-touch-icon-114-precomposed.png">
      <link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ico/apple-touch-icon-72-precomposed.png">
                    <link rel="apple-touch-icon-precomposed" href="assets/ico/apple-touch-icon-57-precomposed.png">
                                   <link rel="shortcut icon" href="assets/ico/logoandeznet.png">
  </head>

  <body>
  
   <div class="navbar navbar-inverse navbar-fixed-top">
      <div class="navbar-inner">
        <div class="container">
          <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="brand" href="http://andeznet.com">AndezNet</a>
          <div class="nav-collapse collapse">
            <ul class="nav pull-right">
              <li><a href="index.php">Back To Home</a></li>
			  <li class="active"><a href="register.php">Register</a></li>
			  <li class="divider-vertical"></li>
            </ul>
          </div><!--/.nav-collapse -->
        </div>
      </div>
    </div>
	
<div class="container">
	  <div class="hero-unit">
	  <?php 
include "koneksi.php";
if (isset($_POST['input'])) { 
$email= addslashes (strip_tags ($_POST['email'])); 
$username= addslashes (strip_tags ($_POST['username'])); 
$password = addslashes (strip_tags ($_POST['password'])); 
$enkrip_pass=md5($password);
 

 $sql = mysqli_query ($db,"INSERT INTO tbl_user VALUES('',
									  	'$username',
										'$enkrip_pass',
										'1',
										'$email',
										'',
										'1',
										'',
										NOW(),
										''
										)");

 if ($sql) { 
 echo "<div class='alert alert-info'><strong>Data berhasil disimpan silahkan login</strong><a href='index.php'>&nbsp KEMBALI</a></div>";
 
 } else { 
  echo "<div class='alert alert-danger'><strong>Data Gagal Disimpan</strong><a href='index.php'>&nbsp KEMBALI</a></div>";  
 } 
 
}
?>  
      <h2>Form Daftar User</h2>
     <form data-toggle="validator" action="" method="post" role="form">
  <div class="form-group">
    <label for="inputName" class="control-label">Username</label>
    <input type="text" class="form-control" id="username" name="username" placeholder="username" required>
  </div>
  <div class="form-group">
    <label for="inputEmail" class="control-label">Email</label>
    <input type="email" class="form-control" id="email" name="email" placeholder="Email" data-error="Bruh, that email address is invalid" required>
    <div class="help-block with-errors"></div>
  </div>
  <div class="form-group">
    <label for="inputPassword" class="control-label">Password</label>
    <div class="form-group col-sm-6">
      <input type="password" data-minlength="6" class="form-control" name="password" id="inputPassword" placeholder="Password" required>
      <span class="help-block">Minimum of 6 characters</span>
    </div>
    <div class="form-group col-sm-6">
      <input type="password" class="form-control" id="inputPasswordConfirm" data-match="#inputPassword" data-match-error="Whoops, these don't match" placeholder="Confirm" required>
      <div class="help-block with-errors"></div>
    </div>
    </div>
	  <div class="form-group">
	<input type="submit" name="input" class="btn btn-primary" id="input" value="Simpan" />
  </div>
  </div>

</form>
      
    </div> 
	  
</div> <!-- /container -->


	<div class="row-fluid">
			<div class="span12">
			  <div class="row-fluid">
				<div class="alert alert-info">
					<a name="contact"></a>
				  <h2>www.andeznet.com</h2>
				  <p class="text-info">Gudang Teknologi & Informasi</p>
				  <p>&copy; <a href="http://andeznet.com">www.andeznet.com</a>&nbsp<?php echo date("Y");?></p>
				</div><!--/span-->
			  </div><!--/row-->
			</div><!--/span-->
	</div><!--/row-->	
	
	
	
