<?PHP
session_start();
if(isset($_SESSION['Nama']) and isset($_SESSION['Pass'])) {
include("index.cma.login.db.php");
$nama1 = $_GET["name"];
$session1 = $_GET["session"];
$query = "Select * from $mytable where user_name = '$nama1'"; 
$result = mysql_query($query); 
if($row = mysql_fetch_array($result)){
if ($row["user_session"] == $session1){
?>
<?PHP
if
($row[user_page] == "0"){ header("Location: admin/index.php");}
elseif ($row["user_page"] == "1a"){ header("Location: tatapersuratan/ago/index.php");}
elseif ($row["user_page"] == "1"){ header("Location: pembinaan/index.php");}
elseif ($row["user_page"] == "2"){ header("Location: intel/index.php");}
elseif ($row["user_page"] == "3"){ header("Location: pidum/index.php");}
elseif ($row["user_page"] == "3a"){ header("Location: pidum/index.kasipidum.php");}
elseif ($row["user_page"] == "4"){ header("Location: pidsus/index.php");}
elseif ($row["user_page"] == "5"){ header("Location: datun/index.page.php");}
elseif ($row["user_page"] == "6"){ header("Location: tatapersuratan/index.php");}
elseif ($row["user_page"] == "61"){ header("Location: tatapersuratan/index.kaur.php");}
elseif ($row["user_page"] == "6a"){ header("Location: tatapersuratan/index.php");}
elseif ($row["user_page"] == "7"){ header("Location: smscenter/index.php");}
elseif ($row["user_page"] == "8"){ header("Location: perpustakaan/perpus_post.php");}
elseif ($row["user_page"] == "9"){ header("Location: sidang/index.php");}
elseif ($row["user_page"] == "9a"){ header("Location: besuk/index.php");}
elseif ($row["user_page"] == "9b"){ header("Location: barbuk/index.php");}
elseif ($row["user_page"] == "9c"){ header("Location: barbuk/index.kasibb.php");}
elseif ($row["user_page"] == "10"){ header("Location: intel/index.php");}
elseif ($row["user_page"] == "11"){ header("Location: pidsus/index.php");}
elseif ($row["user_page"] == "88"){ header("Location: readme/index.php");}
elseif ($row["user_page"] == "77"){ header("Location: tilang/index_tilang.php");}
elseif ($row["user_page"] == "71"){ header("Location: tamu/index.tamu.php");}
else{ include("index.help.php"); }
?>
<? }else{header("Location: index.php"); }} ?>
<?
}
else {
echo "ANDA BELUM LOGIN";
echo "<meta http-equiv=\"refresh\" content=\"3; url=../index.php\">";
}
?>
