need help with login sys
Posted: Sat Aug 16, 2003 5:01 am
the function of the sys
the chack if login is
the prob that thing isnt working is not chack if i am login to the sys why>?
Code: Select all
<?php
function is_login()
{
if (!$_SESSION["proc_v1_user"] || $_SESSION["proc_v1_login"]==0)
{
return false; //not autorized
}
else {
return true; //authorized
}
}
function checkuser() {
$this->condb();
if ($this->condb()!=true) {
if ($this->pass==$this->auth['pass']&&$this->user==$this->auth['user']) {
session_register("proc_v1_user");
$user = $this->user;
$_SESSION['proc_v1_user'] = $user;
session_register("proc_v1_login");
$login = '1'; #0=off - 1=on
$_SESSION['proc_v1_login'] = $login;
header("Location: index.php?loc=main");
}
else {
$this->msg = "PassWord/User are not correct"; }
}
}
function logout() {
$_SESSION['proc_v1_user'} = "";
$_SESSION['proc_v1_login'] = 0;
header("Location: http://www.maslul.org");
}
?>Code: Select all
<?php
include_once('./includes/auths.inc.php');
$set = new loginsys();
if(!$set->is_login()) {
echo "<script> window.location('www.maslul.org/admin/index.php?loc=login')</script>";
}
include('./header.php');
?>