PHP Classes

File: phpsecureweb/activity.php

Recommend this page to a friend!
  Classes of Bulent Tezcan   phpsecureweb   phpsecureweb/activity.php   Download  
File: phpsecureweb/activity.php
Role: Application script
Content type: text/plain
Description: deals with activities
Class: phpsecureweb
Allow users certain rights, login with password.
Author: By
Last change:
Date: 22 years ago
Size: 1,466 bytes
 

Contents

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

   
require_once "Security.class.php";

    require_once
"Activity.class.php";

   
session_start();

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

   
ob_start( );

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

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

    if (
$mySecurity-> isAllowedTo('Add Activity'))
    {
        if (
$FormElements["B_add_submit"])
        {
            if (
$Activity->AddActivity($FormElements))
                unset (
$FormElements);
        }

        echo
$Activity->SendActivityForm($FormElements,null);
    }

    if (
$mySecurity-> isAllowedTo('Add Activity') or
           
$mySecurity-> isAllowedTo('Delete Activity') or
           
$mySecurity-> isAllowedTo('Modify Activity') or
           
$mySecurity-> isAllowedTo('View Activity'))
       
$Activity->ListActivity();
   
    include
"donate.inc.php";

    include
"footer.inc.php";

   
ob_end_flush( );

    return
true;
?>