Current File : /home/inlingua/public_html/icentex/admin_oral/ingl_oral_main.main.php |
<?php
// Created on: 18-02-2015
session_start();
/*
$loggedUserNo = $_SESSION['loggedUserNo'];
if ($loggedUserNo == "")
{ echo "Please <a href='index.php'>login</a> first.";
exit(0);
}
*/
// Include the database connection details
require('../dbConnection.php');
// Include common functions
require('../commonFunc.php');
// Include common functions
require('../globalVars.php');
// Setup table name, configuration and data entry form
$tableName = "ingl_oral_main";
$tableConf = $tableName . ".conf.php";
$dataForm = $tableName . ".form.php";
$viewForm = $tableName . ".view.php";
// Include table configuration details
require($tableConf);
// Include the table handler class
require('../dbHandler.class.php');
$dbObject = new dbHandler();
$dbObject->setTableName($tableName);
$dbObject->setDbFieldList($dbFieldList);
$dbObject->setKeyFieldName("recNo");
$dbObject->connect();
// Retrieve parameters from request
$dbObject->getDbFieldsFromRequest();
$currentMode = "";
$formPrompt = "";
$succFailMesg = "";
$showResult = "N";
$action = $_REQUEST['aC'];
if (($action == "") || ($action == "sA"))
{ // Set 'Add' mode in dataform
$currentMode = "Save"; $succFailMesg = "<b>Add entry</b> [<a href='javascript:history.back()'>Back</a>]<br>";
$currentMode1="Send";
}
else if ($action == "sV")
{ // Set 'View' mode
$currentMode = "View"; $succFailMesg = "<b>View entry</b> [<a href='javascript:history.back()'>Back</a>]<br>";
$dataForm = $viewForm;
// Retrieve record first
if ($dbObject->Retrieve("recNo",$_REQUEST["kV"]))
{ ; }
else
{ $succFailMesg = "<font color='#da0000'><b>Could not retrieve entry. Contact system administrator</b></font> [<a href='javascript:history.back()'>Back</a>]<br>";
$showResult = "Y"; // Goto result part in dataform
}
}
else
{ echo "Nothing to do !";
return;
}
// Load the data entry or view entry form
require($dataForm);
$dbObject->CloseConnection();
return;
?>