<?php
/*
* @author Bulent Tezcan. bulent@greenpepper.ca
*/
require_once "Security.class.php";
require_once "Accounts.class.php";
session_start();
$Accounts = new Accounts();
$mySecurity = new Security( );
#
# This should be added in every script. Ofcourse the action name
# will be different for each script.
#
if ($mySecurity-> isNotAllowedTo('Add Account'))
{
if ($mySecurity-> isAllowedTo('Show Admin Menu'))
$mySecurity-> GotoThisPage( "adminmenu.php" );
else
$mySecurity-> GotoThisPage( "login.php" );
}
ob_start( );
include "header.inc.php";
$FormElements = $_POST['form_AccountsForm'];
if ($FormElements["B_clear"])
unset ($FormElements);
if ($FormElements["B_add_submit"])
{
if (!$Accounts->ErrCheckAccountsForm($FormElements,null,'add'))
if ($Accounts->AddAccount($FormElements))
unset ($FormElements);
}
echo $Accounts->SendAccountsForm($FormElements,null);
include "donate.inc.php";
include "footer.inc.php";
ob_end_flush( );
return true;
?>
|