function enc($data) {
$data = sha1(md5($data));
return $data;
}
function is_admin() {
global $admin_password;
$password = enc($admin_password);
if (isset($_SESSION['adm']) && $_SESSION['adm'] == $password) {
return true;
}
$psw = (isset($_POST['password'])) ? cleanUp($_POST['password']) : '';
if (!empty($psw) && enc($psw) == $password) {
$_SESSION['adm'] = $password;
return true;
}
return false;
}
if (@is_admin() === false) { exit; }
Any comments? It's enough secure?