<?php

$strTableName="##@TABLE.strDataSourceTable s##";
$_SESSION["OwnerID"] = $_SESSION["_".$strTableName."_OwnerID"];

##if @TABLE.strOriginalTable##
$strOriginalTableName="##@TABLE.strOriginalTable s##";
##else##
$strOriginalTableName="##@TABLE.strDataSourceTable s##";
##endif##

##if @TABLE.nType==titTABLE || @TABLE.nType==titVIEW##
$gPageSize=##@TABLE.nNumberOfRecords##;
$ColumnsCount		= ##@TABLE.nRecordsPerRowList##;
##endif##

$gstrOrderBy="##@TABLE.strOrderBy s##";
if(strlen($gstrOrderBy) && strcasecmp(substr($gstrOrderBy,0,8),"order by"))
	$gstrOrderBy="order by ".$gstrOrderBy;
	
$gsqlHead="##@TABLE.sqlHead ls##";
$gsqlFrom="##@TABLE.sqlFrom ls##";
$gsqlWhere="##@TABLE.sqlWhere ls##";
$gsqlTail="##@TABLE.sqlTail ls##";
// $gstrSQL = "##@TABLE.strSQL ls##";
$gstrSQL = gSQLWhere("");

include("##@TABLE.strShortTableName##_settings.php");
include("##@TABLE.strShortTableName##_events.php");
?>