Login   Register  
PHP Classes
elePHPant
Icontem

File: phpsecureweb/groupAccountAndPermission.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/groupAccountAndPermission.php  >  Download  
File: phpsecureweb/groupAccountAndPermission.php
Role: Application script
Content type: text/plain
Description: deals with group permissions
Class: phpsecureweb
Allow users certain rights, login with password.
Author: By
Last change:
Date: 12 years ago
Size: 1,496 bytes
 

Contents

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

    
require_once "Security.class.php";

    require_once 
"Groups.class.php";

    
session_start();

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

    
ob_start( );

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

    if (
$FormElements["B_cancel"])
        
$mySecurity-> GotoThisPage"adminmenu.php" );

    switch (
TRUE)
    {
        Case 
$FormElements["B_add_actions"]:
            
            
$myGroups-> AddGroupActions($FormElements);
            
            break;
        
        Case 
$FormElements["B_remove_actions"]:
            
            
$myGroups-> RemoveGroupActions($FormElements);
            
            break;
        
        Case 
$FormElements["B_add_accounts"]:
            
            
$myGroups-> AddGroupAccounts($FormElements);
            
            break;
        
        Case 
$FormElements["B_remove_accounts"]:
            
            
$myGroups-> RemoveGroupAccounts($FormElements);
            
            break;
        

    }

    echo 
$myGroups->SendGroupAccountsAndActionsForm($FormElements);

    
    include 
"donate.inc.php";

    include 
"footer.inc.php";

    
ob_end_flush( );

    return 
true;
?>