PHP Classes

File: Security/login.php

Recommend this page to a friend!
  Classes of Michael J. Fuhrman   Security   Security/login.php   Download  
File: Security/login.php
Role: Example script
Content type: text/plain
Description: Confirms the users's UID and PSW for login
Class: Security
Manage user accounts and access controls
Author: By
Last change:
Date: 13 years ago
Size: 1,235 bytes
 

Contents

Class file image Download
<?
    $szURLPath
= "";

function
dirPath() { return ("../../"); }

Include_Once (
dirPath() . "Shared/Classes/Ladder/Ladder_Ladder.cls");
Include_Once (
dirPath() . "Marketing/Security/Classes/Security_Security.cls");
Include_Once (
dirPath() . "Marketing/Security/rootFolder.php");
Include_Once (
dirPath() . "Marketing/Security/Panels/Panel_Panel.cls");
Include_Once (
dirPath() . "Marketing/Security/Panels/Panel_Security_Login.cls");
Include_Once (
dirPath() . "Shared/_app.inc");

Function
php_Main ()
{


   
// =========================================

   
$pnlLogin = new ENetArch_Panels_Security_Login ();
   
$pnlLogin->setPanelName ("Security.Login");
   
$pnlLogin->getPOST();

   
// ========================================
    // Core Code

   
$objRoot = gblLadder()->getItem (rootFolder ());
   
$objSecurity = new ENetArch_Security_Security();
   
$objSecurity->setState($objRoot);

   
// ========================================
    // Core Code

   
$objUser = $objSecurity->Login ($pnlLogin->szUID, $pnlLogin->szPSW);
    if (
$objUser == null)
    {
        print (
"login failed<BR>");
       
header ("Location:login_failed.php");
        return;
    }

   
// =========================================

   
header ("Location:home.php");
}

?>