PHP Classes

File: brnchMstr.php

Recommend this page to a friend!
  Classes of Prakash Khanchandani   Table Maintenance   brnchMstr.php   Download  
File: brnchMstr.php
Role: Example script
Content type: text/plain
Description: 1st level, basic, example
Class: Table Maintenance
Manage forms for CRUD MySQL table records
Author: By
Last change:
Date: 10 years ago
Size: 977 bytes
 

Contents

Class file image Download
<?php

/**
 * @author Prakash Khanchandani
 * @copyright 2013
 * @program brnchMstr.php
 * @description branch master maintenance
 * @specialities - none
 */


session_start();
require_once (
"classes.php");


function
createTableObject()
{
   
$obj = new brnchMstrTbl;
    if (
$obj->getListAndColumns() === false)
        return
false;
    else
        return
$obj;
}


class
brnchMstrTbl extends mstrTable
{
    function
getListAndColumns()
    {
       
$this->tableName = 'brnchMstr';

       
$this->orderByClause = 'bank, branch';
       
/*
        generate the list with auto determined columns, ie., dont pass any parameters. */
       
$result = parent::getListAndColumns();
        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(brnchMstrNotes());
$form->displayForm();
?>