PHP Classes

File: admin_enter.php

Recommend this page to a friend!
  Classes of Alexey Baranov   BAccess   admin_enter.php   Download  
File: admin_enter.php
Role: Example script
Content type: text/plain
Description: admin enter script
Class: BAccess
Site access control class
Author: By
Last change:
Date: 21 years ago
Size: 590 bytes
 

Contents

Class file image Download
<?php
 session_start
();

 @
$login=$_POST['login'];
 @
$pass=$_POST['pass'];
 if (!
$_SESSION){
   if(@!
$login or @!$pass) {
     print(
"You don't enter your login and pass. <br><a href=\"index.html\">Return</a> and try once more.");
     exit();
   }
   include
"baccess.class";
  
$access=new BAccess("pswd");
  
$rights=$access->check_access($login,$pass);
   if(!
$rights or $rights=="u"){
     print(
"You haven't any rights. <br><a href=\"../\">Return</a>");
     exit();
   }
 }



  
$_SESSION['login']=$login;
  
$_SESSION['pass']=$pass;
 include
"admin.tpl";
?>