<?php
/**
* @author Prakash Khanchandani
* @copyright 2013
* @program authRules.php
* @description authorisation rules maintenance
* @specialities - set constraints
*/
session_start();
require_once ("classes.php");
function createTableObject()
{
$obj = new authRulesTable;
if ($obj->getListAndColumns() === false)
return false;
else
return $obj;
}
class authRulesTable extends mstrTable
{
function getListAndColumns()
{
$this->tableName = 'authRules';
/* Initialise the master class with the constraints. Setting bank=412 IS FOR DEMO ONLY.
In the project in which it is actually used the value comes from the session set at login. */
$var = array();
$pair[0] = 'bank';
$pair[1] = '412';
$var[] = $pair;
$this->constraints = $var;
$result = parent::getListAndColumns('txnType', 'slabAmt', 'nofAuth');
return $result;
}
}
if (!isset($_REQUEST['actn'])) {
$obj = createTableObject();
} else {
/* if the user has taken some action, handle it. */
$obj = handleRequestOption();
}
$form = new mstrFH($obj);
$form->setDemoNotes(authRulesNotes());
$form->displayForm();
?>
|