Login   Register  
PHP Classes
elePHPant
Icontem

File: phpsecureweb/actions.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Bulent Tezcan  >  phpsecureweb  >  phpsecureweb/actions.php  >  Download  
File: phpsecureweb/actions.php
Role: Application script
Content type: text/plain
Description: deals with actions
Class: phpsecureweb
Allow users certain rights, login with password.
Author: By
Last change:
Date: 11 years ago
Size: 1,201 bytes
 

Contents

Class file image Download
<?php
    
/*
    * @author Bulent Tezcan. bulent@greenpepper.ca
    */

    
require_once "Security.class.php";

    require_once 
"Actions.class.php";

    
session_start();

    
$Actions = new Actions();
    
$mySecurity = new Security( );
    
    
#
    # This should be added in every script. Ofcourse the action name
    # will be different for each script.
    #
    
if ($mySecurity-> isNotAllowedTo('Add Action') and
            
$mySecurity-> isNotAllowedTo('Delete Action') and
            
$mySecurity-> isNotAllowedTo('Modify Action') and
            
$mySecurity-> isNotAllowedTo('View Action'))
    {
        if (
$mySecurity-> isAllowedTo('Show Admin Menu'))
            
$mySecurity-> GotoThisPage"adminmenu.php" );
        else
            
$mySecurity-> GotoThisPage"login.php" );
    }

    
ob_start( );

    include 
"header.inc.php";
    
    
$FormElements $_POST['form_ActionsForm'];

    if (
$FormElements["B_clear"])
        unset (
$FormElements);

    if (
$mySecurity-> isAllowedTo('Add Action'))
    {
        if (
$FormElements["B_add_submit"])
            
$Actions->AddAction($FormElements);
        
        echo 
$Actions->SendActionsForm($FormElements,null);
    }

    
$Actions->ListActions();
    
    include 
"donate.inc.php";

    include 
"footer.inc.php";

    
ob_end_flush( );

    return 
true;
?>