示例#1
0
     $UTILITY->location_goto(".");
 }
 if ($user_name1 != $userlogin && $user_pass1 != $password) {
     $UTILITY->popup_message("Maaf password atau username tidak ada!");
     session_destroy();
     $UTILITY->location_goto(".");
 }
 if ($user_name1 == $userlogin && $user_pass1 == $password) {
     $_SESSION["level{$ID}"] = $level_idlevel;
     $level = $level_idlevel;
     $_SESSION['user_id'] = $user_id;
     $_SESSION['email'] = $email;
     $_SESSION["user_name{$ID}"] = $userlogin;
     $_SESSION['unversitas'] = trim($universitas_iduniversitas);
     $qry = $DB->query("select namauniversitas from universitas where kodeUniversitas='{$_SESSION['unversitas']}' ");
     while ($row = $DB->fetch_object($qry)) {
         $nama_universitas = $row->namauniversitas;
     }
     $_SESSION['nama_unversitas'] = $nama_universitas;
     //enkripsi
     // $hash = $UTILITY->enkripsi($algoritma, $mode, $secretkey, "$user_id");
     //$user_id_hash = base64_decode($hash);
     //enkripsi
     //setting cookies --> paramater berasal dari application.php
     //echo "MASUKKK";
     $user_id_hash = $user_id;
     $status = setcookie($cookie_name, 'usr='******'&hash=' . $user_id_hash, time() + $cookie_time, "/", "{$domain}");
     //   $_SESSION['cookies'] = 'usr='******'&hash=' . $user_id_hash;
     if ($level == "4") {
         $UTILITY->location_goto("ch/view");
         exit;