<!DOCTYPE html>
<html lang="en">
<head>
<title>Login</title>
</head>
<body class="special-page login-bg dark">
<!--[if lt IE 9]><div class="ie"><![endif]-->
<!--[if lt IE 8]><div class="ie7"><![endif]-->
<form name="myform" onSubmit="return validasi()" method="post" action="log.php?op=in">
<table width="200" border="0">
<tr>
<td>Username</td>
<td><input type="text" name="nama" value="" ></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" name="password" value="" ></td>
</tr>
</table><br>
<input type="submit" value="Submit" onclick="fungsi()">
<input type="submit" name="Submit2" value="Daftar">
</form>
<!--[if lt IE 8]></div><![endif]-->
<!--[if lt IE 9]></div><![endif]-->
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<title>login</title>
</head>
<body class="putih">
<!--[if lt IE 9]><div class="ie"><![endif]-->
<!--[if lt IE 8]><div class="ie7"><![endif]-->
<a name="atas"></a>
<nav id="main-nav">
<div class="columns">
<!-- Left column -->
<div class="colx3-center">
<div class="block-content">
<h1>Welcome</h1>
<div class="columns">
<div class="colx2-left form">
<fieldset>
<legend>Select</legend>
<?php
session_start();
include 'koneksi.php';
$userid = $_POST['nama'];
$psw = $_POST['password'];
$op = $_GET['op'];
if($op=="in"){
$cek = mysql_query("SELECT * FROM tipe_user_aksi,aksi,user WHERE nama='$userid' AND password='$psw' AND user.id=tipe_user_aksi.id_user and tipe_user_aksi.id_aksi=aksi.id ");
if(mysql_num_rows($cek)==1){//jika berhasil akan bernilai 1
$c = mysql_fetch_array($cek);
$_SESSION['nama'] = $c['nama'];
$_SESSION['id_aksi'] = $c['id_aksi'];
if($c['id_aksi']==$c['id_aksi']){
header($_SESSION['aksi.url']);
}else{
die("password salah <a href=\"javascript:history.back()\">kembali</a>");
}
}
}else if($op=="out"){
unset($_SESSION['nama']);
header("location:index.php");
}
?>
</fieldset>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<div class="clear"></div>
<footer>
</footer>
<!--[if lt IE 8]></div><![endif]-->
<!--[if lt IE 9]></div><![endif]-->
</body>
</html>
<?php
session_start();
include 'koneksi.php';
$userid = $_POST['nama'];
$psw = $_POST['password'];
$op = $_GET['op'];
if($op=="in"){
$cek = mysql_query("SELECT * FROM tipe_user_aksi,aksi,user WHERE nama='$userid' AND password='$psw' AND user.id=tipe_user_aksi.id_user and tipe_user_aksi.id_aksi=aksi.id ");
if(mysql_num_rows($cek)>=1){//jika berhasil akan bernilai 1
$c = mysql_fetch_array($cek);
$_SESSION['nama'] = $c['nama'];
$_SESSION['id_aksi'] = $c['id_aksi'];
if($c['id_aksi']==$c['id_aksi']){
header($_SESSION['aksi.url']);
}else{
die("password salah <a href=\"javascript:history.back()\">kembali</a>");
}
}
}else if($op=="out"){
unset($_SESSION['nama']);
header("location:index.php");
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>login</title>
</head>
<body class="putih">
<!--[if lt IE 9]><div class="ie"><![endif]-->
<!--[if lt IE 8]><div class="ie7"><![endif]-->
<a name="atas"></a>
<nav id="main-nav">
<div class="columns">
<!-- Left column -->
<div class="colx3-center">
<div class="block-content">
<h1>Welcome</h1>
<div class="columns">
<div class="colx2-left form">
<fieldset>
<legend>Select</legend>
<?php
session_start();
include 'koneksi.php';
$userid = $_POST['nama'];
$psw = $_POST['password'];
$op = $_GET['op'];
if($op=="in"){
$cek = mysql_query("SELECT * FROM tipe_user_aksi,aksi,user WHERE nama='$userid' AND password='$psw' AND user.id=tipe_user_aksi.id_user and tipe_user_aksi.id_aksi=aksi.id ");
if(mysql_num_rows($cek)>=1){//jika berhasil akan bernilai 1
$c = mysql_fetch_array($cek);
$_SESSION['nama'] = $c['nama'];
$_SESSION['id_aksi'] = $c['id_aksi'];
if($c['id_aksi']==$c['id_aksi']){
header($_SESSION['aksi.url']);
}else{
die("password salah <a href=\"javascript:history.back()\">kembali</a>");
}
}
}else if($op=="out"){
unset($_SESSION['nama']);
header("location:index.php");
}
?>
</fieldset>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<div class="clear"></div>
<footer>
</footer>
<!--[if lt IE 8]></div><![endif]-->
<!--[if lt IE 9]></div><![endif]-->
</body>
</html>