| Current Path : /var/www/cesa.co.za/cceconvenors/ |
| Current File : /var/www/cesa.co.za/cceconvenors/CCEWeeklySessionsinfo.php |
<?php
// Global variable for table object
$CCEWeeklySessions = NULL;
//
// Table class for CCEWeeklySessions
//
class cCCEWeeklySessions {
var $TableVar = 'CCEWeeklySessions';
var $TableName = 'CCEWeeklySessions';
var $TableType = 'TABLE';
var $CCEWeeklySessionID;
var $ScheduleID;
var $TrimesterNum;
var $WeekNum;
var $SessionDate;
var $SessionDay;
var $StartTime;
var $EndTime;
var $Description;
var $PresentationRef;
var $AssignmentRef;
var $AssignmentSubDate;
var $PresenterName;
var $Duration;
var $fields = array();
var $UseTokenInUrl = EW_USE_TOKEN_IN_URL;
var $Export; // Export
var $ExportOriginalValue = EW_EXPORT_ORIGINAL_VALUE;
var $ExportAll = TRUE;
var $SendEmail; // Send email
var $TableCustomInnerHtml; // Custom inner HTML
var $BasicSearchKeyword; // Basic search keyword
var $BasicSearchType; // Basic search type
var $CurrentFilter; // Current filter
var $CurrentOrder; // Current order
var $CurrentOrderType; // Current order type
var $RowType; // Row type
var $CssClass; // CSS class
var $CssStyle; // CSS style
var $RowAttrs = array(); // Row custom attributes
var $TableFilter = "";
var $CurrentAction; // Current action
var $UpdateConflict; // Update conflict
var $EventName; // Event name
var $EventCancelled; // Event cancelled
var $CancelMessage; // Cancel message
//
// Table class constructor
//
function __construct() {
global $Language;
// CCEWeeklySessionID
$this->CCEWeeklySessionID = new cField('CCEWeeklySessions', 'CCEWeeklySessions', 'x_CCEWeeklySessionID', 'CCEWeeklySessionID', '`CCEWeeklySessionID`', 3, -1, FALSE, '`CCEWeeklySessionID`', FALSE);
$this->CCEWeeklySessionID->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
$this->fields['CCEWeeklySessionID'] =& $this->CCEWeeklySessionID;
// ScheduleID
$this->ScheduleID = new cField('CCEWeeklySessions', 'CCEWeeklySessions', 'x_ScheduleID', 'ScheduleID', '`ScheduleID`', 3, -1, FALSE, '`ScheduleID`', FALSE);
$this->ScheduleID->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
$this->fields['ScheduleID'] =& $this->ScheduleID;
// TrimesterNum
$this->TrimesterNum = new cField('CCEWeeklySessions', 'CCEWeeklySessions', 'x_TrimesterNum', 'TrimesterNum', '`TrimesterNum`', 3, -1, FALSE, '`TrimesterNum`', FALSE);
$this->TrimesterNum->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
$this->fields['TrimesterNum'] =& $this->TrimesterNum;
// WeekNum
$this->WeekNum = new cField('CCEWeeklySessions', 'CCEWeeklySessions', 'x_WeekNum', 'WeekNum', '`WeekNum`', 3, -1, FALSE, '`WeekNum`', FALSE);
$this->WeekNum->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
$this->fields['WeekNum'] =& $this->WeekNum;
// SessionDate
$this->SessionDate = new cField('CCEWeeklySessions', 'CCEWeeklySessions', 'x_SessionDate', 'SessionDate', '`SessionDate`', 133, 5, FALSE, '`SessionDate`', FALSE);
$this->SessionDate->FldDefaultErrMsg = str_replace("%s", "/", $Language->Phrase("IncorrectDateYMD"));
$this->fields['SessionDate'] =& $this->SessionDate;
// SessionDay
$this->SessionDay = new cField('CCEWeeklySessions', 'CCEWeeklySessions', 'x_SessionDay', 'SessionDay', '`SessionDay`', 200, -1, FALSE, '`SessionDay`', FALSE);
$this->fields['SessionDay'] =& $this->SessionDay;
// StartTime
$this->StartTime = new cField('CCEWeeklySessions', 'CCEWeeklySessions', 'x_StartTime', 'StartTime', '`StartTime`', 134, -1, FALSE, '`StartTime`', FALSE);
$this->StartTime->FldDefaultErrMsg = $Language->Phrase("IncorrectTime");
$this->fields['StartTime'] =& $this->StartTime;
// EndTime
$this->EndTime = new cField('CCEWeeklySessions', 'CCEWeeklySessions', 'x_EndTime', 'EndTime', '`EndTime`', 134, -1, FALSE, '`EndTime`', FALSE);
$this->EndTime->FldDefaultErrMsg = $Language->Phrase("IncorrectTime");
$this->fields['EndTime'] =& $this->EndTime;
// Description
$this->Description = new cField('CCEWeeklySessions', 'CCEWeeklySessions', 'x_Description', 'Description', '`Description`', 201, -1, FALSE, '`Description`', FALSE);
$this->fields['Description'] =& $this->Description;
// PresentationRef
$this->PresentationRef = new cField('CCEWeeklySessions', 'CCEWeeklySessions', 'x_PresentationRef', 'PresentationRef', '`PresentationRef`', 200, -1, FALSE, '`PresentationRef`', FALSE);
$this->fields['PresentationRef'] =& $this->PresentationRef;
// AssignmentRef
$this->AssignmentRef = new cField('CCEWeeklySessions', 'CCEWeeklySessions', 'x_AssignmentRef', 'AssignmentRef', '`AssignmentRef`', 200, -1, FALSE, '`AssignmentRef`', FALSE);
$this->fields['AssignmentRef'] =& $this->AssignmentRef;
// AssignmentSubDate
$this->AssignmentSubDate = new cField('CCEWeeklySessions', 'CCEWeeklySessions', 'x_AssignmentSubDate', 'AssignmentSubDate', '`AssignmentSubDate`', 133, 5, FALSE, '`AssignmentSubDate`', FALSE);
$this->AssignmentSubDate->FldDefaultErrMsg = str_replace("%s", "/", $Language->Phrase("IncorrectDateYMD"));
$this->fields['AssignmentSubDate'] =& $this->AssignmentSubDate;
// PresenterName
$this->PresenterName = new cField('CCEWeeklySessions', 'CCEWeeklySessions', 'x_PresenterName', 'PresenterName', '`PresenterName`', 200, -1, FALSE, '`PresenterName`', FALSE);
$this->fields['PresenterName'] =& $this->PresenterName;
// Duration
$this->Duration = new cField('CCEWeeklySessions', 'CCEWeeklySessions', 'x_Duration', 'Duration', '`Duration`', 200, -1, FALSE, '`Duration`', FALSE);
$this->fields['Duration'] =& $this->Duration;
}
// Table caption
function TableCaption() {
global $Language;
return $Language->TablePhrase($this->TableVar, "TblCaption");
}
// Page caption
function PageCaption($Page) {
global $Language;
$Caption = $Language->TablePhrase($this->TableVar, "TblPageCaption" . $Page);
if ($Caption == "") $Caption = "Page " . $Page;
return $Caption;
}
// Export return page
function ExportReturnUrl() {
$url = @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_EXPORT_RETURN_URL];
return ($url <> "") ? $url : ew_CurrentPage();
}
function setExportReturnUrl($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_EXPORT_RETURN_URL] = $v;
}
// Records per page
function getRecordsPerPage() {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_REC_PER_PAGE];
}
function setRecordsPerPage($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_REC_PER_PAGE] = $v;
}
// Start record number
function getStartRecordNumber() {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_START_REC];
}
function setStartRecordNumber($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_START_REC] = $v;
}
// Search highlight name
function HighlightName() {
return "CCEWeeklySessions_Highlight";
}
// Advanced search
function getAdvancedSearch($fld) {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ADVANCED_SEARCH . "_" . $fld];
}
function setAdvancedSearch($fld, $v) {
if (@$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ADVANCED_SEARCH . "_" . $fld] <> $v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ADVANCED_SEARCH . "_" . $fld] = $v;
}
}
// Basic search keyword
function getSessionBasicSearchKeyword() {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_BASIC_SEARCH];
}
function setSessionBasicSearchKeyword($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_BASIC_SEARCH] = $v;
}
// Basic search type
function getSessionBasicSearchType() {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_BASIC_SEARCH_TYPE];
}
function setSessionBasicSearchType($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_BASIC_SEARCH_TYPE] = $v;
}
// Search WHERE clause
function getSearchWhere() {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_SEARCH_WHERE];
}
function setSearchWhere($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_SEARCH_WHERE] = $v;
}
// Multiple column sort
function UpdateSort(&$ofld, $ctrl) {
if ($this->CurrentOrder == $ofld->FldName) {
$sSortField = $ofld->FldExpression;
$sLastSort = $ofld->getSort();
if ($this->CurrentOrderType == "ASC" || $this->CurrentOrderType == "DESC") {
$sThisSort = $this->CurrentOrderType;
} else {
$sThisSort = ($sLastSort == "ASC") ? "DESC" : "ASC";
}
$ofld->setSort($sThisSort);
if ($ctrl) {
$sOrderBy = $this->getSessionOrderBy();
if (strpos($sOrderBy, $sSortField . " " . $sLastSort) !== FALSE) {
$sOrderBy = str_replace($sSortField . " " . $sLastSort, $sSortField . " " . $sThisSort, $sOrderBy);
} else {
if ($sOrderBy <> "") $sOrderBy .= ", ";
$sOrderBy .= $sSortField . " " . $sThisSort;
}
$this->setSessionOrderBy($sOrderBy); // Save to Session
} else {
$this->setSessionOrderBy($sSortField . " " . $sThisSort); // Save to Session
}
} else {
if (!$ctrl) $ofld->setSort("");
}
}
// Session WHERE clause
function getSessionWhere() {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_WHERE];
}
function setSessionWhere($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_WHERE] = $v;
}
// Session ORDER BY
function getSessionOrderBy() {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ORDER_BY];
}
function setSessionOrderBy($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ORDER_BY] = $v;
}
// Session key
function getKey($fld) {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_KEY . "_" . $fld];
}
function setKey($fld, $v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_KEY . "_" . $fld] = $v;
}
// Table level SQL
function SqlFrom() { // From
return "`CCEWeeklySessions`";
}
function SqlSelect() { // Select
return "SELECT * FROM " . $this->SqlFrom();
}
function SqlWhere() { // Where
$sWhere = "";
$this->TableFilter = "ScheduleID IN (SELECT CurrentScheduleID FROM CCESetup)";
if ($this->TableFilter <> "") {
if ($sWhere <> "") $sWhere = "(" . $sWhere . ") AND (";
$sWhere .= "(" . $this->TableFilter . ")";
}
return $sWhere;
}
function SqlGroupBy() { // Group By
return "";
}
function SqlHaving() { // Having
return "";
}
function SqlOrderBy() { // Order By
return "";
}
// Check if Anonymous User is allowed
function AllowAnonymousUser() {
switch (EW_PAGE_ID) {
case "add":
case "register":
case "addopt":
return FALSE;
case "edit":
case "update":
return FALSE;
case "delete":
return FALSE;
case "view":
return FALSE;
case "search":
return FALSE;
default:
return FALSE;
}
}
// Apply User ID filters
function ApplyUserIDFilters($sFilter) {
return $sFilter;
}
// Get SQL
function GetSQL($where, $orderby) {
return ew_BuildSelectSql($this->SqlSelect(), $this->SqlWhere(),
$this->SqlGroupBy(), $this->SqlHaving(), $this->SqlOrderBy(),
$where, $orderby);
}
// Table SQL
function SQL() {
$sFilter = $this->CurrentFilter;
$sFilter = $this->ApplyUserIDFilters($sFilter);
$sSort = $this->getSessionOrderBy();
return ew_BuildSelectSql($this->SqlSelect(), $this->SqlWhere(),
$this->SqlGroupBy(), $this->SqlHaving(), $this->SqlOrderBy(),
$sFilter, $sSort);
}
// Table SQL with List page filter
function SelectSQL() {
$sFilter = $this->getSessionWhere();
if ($this->CurrentFilter <> "") {
if ($sFilter <> "") $sFilter = "(" . $sFilter . ") AND ";
$sFilter .= "(" . $this->CurrentFilter . ")";
}
$sFilter = $this->ApplyUserIDFilters($sFilter);
$sSort = $this->getSessionOrderBy();
return ew_BuildSelectSql($this->SqlSelect(), $this->SqlWhere(), $this->SqlGroupBy(),
$this->SqlHaving(), $this->SqlOrderBy(), $sFilter, $sSort);
}
// Try to get record count
function TryGetRecordCount($sSql) {
global $conn;
$cnt = -1;
if ($this->TableType == 'TABLE' || $this->TableType == 'VIEW') {
$sSql = "SELECT COUNT(*) FROM" . substr($sSql, 13);
} else {
$sSql = "SELECT COUNT(*) FROM (" . $sSql . ") EW_COUNT_TABLE";
}
if ($rs = $conn->Execute($sSql)) {
if (!$rs->EOF && $rs->FieldCount() > 0) {
$cnt = $rs->fields[0];
$rs->Close();
}
}
return intval($cnt);
}
// Get record count based on filter (for detail record count in master table pages)
function LoadRecordCount($sFilter) {
$origFilter = $this->CurrentFilter;
$this->CurrentFilter = $sFilter;
$this->Recordset_Selecting($this->CurrentFilter);
$sSql = $this->SQL();
$cnt = $this->TryGetRecordCount($sSql);
if ($cnt == -1) {
if ($rs = $this->LoadRs($this->CurrentFilter)) {
$cnt = $rs->RecordCount();
$rs->Close();
}
}
$this->CurrentFilter = $origFilter;
return intval($cnt);
}
// Get record count (for current List page)
function SelectRecordCount() {
global $conn;
$origFilter = $this->CurrentFilter;
$this->Recordset_Selecting($this->CurrentFilter);
$sSql = $this->SelectSQL();
$cnt = $this->TryGetRecordCount($sSql);
if ($cnt == -1) {
if ($rs = $conn->Execute($this->SelectSQL())) {
$cnt = $rs->RecordCount();
$rs->Close();
}
}
$this->CurrentFilter = $origFilter;
return intval($cnt);
}
// INSERT statement
function InsertSQL(&$rs) {
global $conn;
$names = "";
$values = "";
foreach ($rs as $name => $value) {
$names .= $this->fields[$name]->FldExpression . ",";
$values .= ew_QuotedValue($value, $this->fields[$name]->FldDataType) . ",";
}
if (substr($names, -1) == ",") $names = substr($names, 0, strlen($names)-1);
if (substr($values, -1) == ",") $values = substr($values, 0, strlen($values)-1);
return "INSERT INTO `CCEWeeklySessions` ($names) VALUES ($values)";
}
// UPDATE statement
function UpdateSQL(&$rs) {
global $conn;
$SQL = "UPDATE `CCEWeeklySessions` SET ";
foreach ($rs as $name => $value) {
$SQL .= $this->fields[$name]->FldExpression . "=";
$SQL .= ew_QuotedValue($value, $this->fields[$name]->FldDataType) . ",";
}
if (substr($SQL, -1) == ",") $SQL = substr($SQL, 0, strlen($SQL)-1);
if ($this->CurrentFilter <> "") $SQL .= " WHERE " . $this->CurrentFilter;
return $SQL;
}
// DELETE statement
function DeleteSQL(&$rs) {
$SQL = "DELETE FROM `CCEWeeklySessions` WHERE ";
$SQL .= ew_QuotedName('CCEWeeklySessionID') . '=' . ew_QuotedValue($rs['CCEWeeklySessionID'], $this->CCEWeeklySessionID->FldDataType) . ' AND ';
if (substr($SQL, -5) == " AND ") $SQL = substr($SQL, 0, strlen($SQL)-5);
if ($this->CurrentFilter <> "") $SQL .= " AND " . $this->CurrentFilter;
return $SQL;
}
// Key filter WHERE clause
function SqlKeyFilter() {
return "`CCEWeeklySessionID` = @CCEWeeklySessionID@";
}
// Key filter
function KeyFilter() {
$sKeyFilter = $this->SqlKeyFilter();
if (!is_numeric($this->CCEWeeklySessionID->CurrentValue))
$sKeyFilter = "0=1"; // Invalid key
$sKeyFilter = str_replace("@CCEWeeklySessionID@", ew_AdjustSql($this->CCEWeeklySessionID->CurrentValue), $sKeyFilter); // Replace key value
return $sKeyFilter;
}
// Return page URL
function getReturnUrl() {
$name = EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_RETURN_URL;
// Get referer URL automatically
if (ew_ServerVar("HTTP_REFERER") <> "" && ew_ReferPage() <> ew_CurrentPage() && ew_ReferPage() <> "login.php") // Referer not same page or login page
$_SESSION[$name] = ew_ServerVar("HTTP_REFERER"); // Save to Session
if (@$_SESSION[$name] <> "") {
return $_SESSION[$name];
} else {
return "CCEWeeklySessionslist.php";
}
}
function setReturnUrl($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_RETURN_URL] = $v;
}
// List URL
function ListUrl() {
return "CCEWeeklySessionslist.php";
}
// View URL
function ViewUrl() {
return $this->KeyUrl("CCEWeeklySessionsview.php", $this->UrlParm());
}
// Add URL
function AddUrl() {
$AddUrl = "CCEWeeklySessionsadd.php";
$sUrlParm = $this->UrlParm();
if ($sUrlParm <> "")
$AddUrl .= "?" . $sUrlParm;
return $AddUrl;
}
// Edit URL
function EditUrl() {
return $this->KeyUrl("CCEWeeklySessionsedit.php", $this->UrlParm());
}
// Inline edit URL
function InlineEditUrl() {
return $this->KeyUrl(ew_CurrentPage(), $this->UrlParm("a=edit"));
}
// Copy URL
function CopyUrl() {
return $this->KeyUrl("CCEWeeklySessionsadd.php", $this->UrlParm());
}
// Inline copy URL
function InlineCopyUrl() {
return $this->KeyUrl(ew_CurrentPage(), $this->UrlParm("a=copy"));
}
// Delete URL
function DeleteUrl() {
return $this->KeyUrl("CCEWeeklySessionsdelete.php", $this->UrlParm());
}
// Add key value to URL
function KeyUrl($url, $parm = "") {
$sUrl = $url . "?";
if ($parm <> "") $sUrl .= $parm . "&";
if (!is_null($this->CCEWeeklySessionID->CurrentValue)) {
$sUrl .= "CCEWeeklySessionID=" . urlencode($this->CCEWeeklySessionID->CurrentValue);
} else {
return "javascript:alert(ewLanguage.Phrase(\"InvalidRecord\"));";
}
return $sUrl;
}
// Sort URL
function SortUrl(&$fld) {
if ($this->CurrentAction <> "" || $this->Export <> "" ||
in_array($fld->FldType, array(128, 204, 205))) { // Unsortable data type
return "";
} elseif ($fld->Sortable) {
$sUrlParm = $this->UrlParm("order=" . urlencode($fld->FldName) . "&ordertype=" . $fld->ReverseSort());
return ew_CurrentPage() . "?" . $sUrlParm;
} else {
return "";
}
}
// Add URL parameter
function UrlParm($parm = "") {
$UrlParm = ($this->UseTokenInUrl) ? "t=CCEWeeklySessions" : "";
if ($parm <> "") {
if ($UrlParm <> "")
$UrlParm .= "&";
$UrlParm .= $parm;
}
return $UrlParm;
}
// Load rows based on filter
function &LoadRs($sFilter) {
global $conn;
// Set up filter (SQL WHERE clause) and get return SQL
$this->CurrentFilter = $sFilter;
$sSql = $this->SQL();
return $conn->Execute($sSql);
}
// Load row values from recordset
function LoadListRowValues(&$rs) {
$this->CCEWeeklySessionID->setDbValue($rs->fields('CCEWeeklySessionID'));
$this->ScheduleID->setDbValue($rs->fields('ScheduleID'));
$this->TrimesterNum->setDbValue($rs->fields('TrimesterNum'));
$this->WeekNum->setDbValue($rs->fields('WeekNum'));
$this->SessionDate->setDbValue($rs->fields('SessionDate'));
$this->SessionDay->setDbValue($rs->fields('SessionDay'));
$this->StartTime->setDbValue($rs->fields('StartTime'));
$this->EndTime->setDbValue($rs->fields('EndTime'));
$this->Description->setDbValue($rs->fields('Description'));
$this->PresentationRef->setDbValue($rs->fields('PresentationRef'));
$this->AssignmentRef->setDbValue($rs->fields('AssignmentRef'));
$this->AssignmentSubDate->setDbValue($rs->fields('AssignmentSubDate'));
$this->PresenterName->setDbValue($rs->fields('PresenterName'));
$this->Duration->setDbValue($rs->fields('Duration'));
}
// Render list row values
function RenderListRow() {
global $conn, $Security;
// Call Row Rendering event
$this->Row_Rendering();
// Common render codes
// TrimesterNum
$this->TrimesterNum->CellCssStyle = ""; $this->TrimesterNum->CellCssClass = "";
$this->TrimesterNum->CellAttrs = array(); $this->TrimesterNum->ViewAttrs = array(); $this->TrimesterNum->EditAttrs = array();
// WeekNum
$this->WeekNum->CellCssStyle = ""; $this->WeekNum->CellCssClass = "";
$this->WeekNum->CellAttrs = array(); $this->WeekNum->ViewAttrs = array(); $this->WeekNum->EditAttrs = array();
// SessionDate
$this->SessionDate->CellCssStyle = ""; $this->SessionDate->CellCssClass = "";
$this->SessionDate->CellAttrs = array(); $this->SessionDate->ViewAttrs = array(); $this->SessionDate->EditAttrs = array();
// SessionDay
$this->SessionDay->CellCssStyle = ""; $this->SessionDay->CellCssClass = "";
$this->SessionDay->CellAttrs = array(); $this->SessionDay->ViewAttrs = array(); $this->SessionDay->EditAttrs = array();
// StartTime
$this->StartTime->CellCssStyle = ""; $this->StartTime->CellCssClass = "";
$this->StartTime->CellAttrs = array(); $this->StartTime->ViewAttrs = array(); $this->StartTime->EditAttrs = array();
// EndTime
$this->EndTime->CellCssStyle = ""; $this->EndTime->CellCssClass = "";
$this->EndTime->CellAttrs = array(); $this->EndTime->ViewAttrs = array(); $this->EndTime->EditAttrs = array();
// Description
$this->Description->CellCssStyle = ""; $this->Description->CellCssClass = "";
$this->Description->CellAttrs = array(); $this->Description->ViewAttrs = array(); $this->Description->EditAttrs = array();
// PresentationRef
$this->PresentationRef->CellCssStyle = ""; $this->PresentationRef->CellCssClass = "";
$this->PresentationRef->CellAttrs = array(); $this->PresentationRef->ViewAttrs = array(); $this->PresentationRef->EditAttrs = array();
// AssignmentRef
$this->AssignmentRef->CellCssStyle = ""; $this->AssignmentRef->CellCssClass = "";
$this->AssignmentRef->CellAttrs = array(); $this->AssignmentRef->ViewAttrs = array(); $this->AssignmentRef->EditAttrs = array();
// AssignmentSubDate
$this->AssignmentSubDate->CellCssStyle = ""; $this->AssignmentSubDate->CellCssClass = "";
$this->AssignmentSubDate->CellAttrs = array(); $this->AssignmentSubDate->ViewAttrs = array(); $this->AssignmentSubDate->EditAttrs = array();
// PresenterName
$this->PresenterName->CellCssStyle = ""; $this->PresenterName->CellCssClass = "";
$this->PresenterName->CellAttrs = array(); $this->PresenterName->ViewAttrs = array(); $this->PresenterName->EditAttrs = array();
// Duration
$this->Duration->CellCssStyle = ""; $this->Duration->CellCssClass = "";
$this->Duration->CellAttrs = array(); $this->Duration->ViewAttrs = array(); $this->Duration->EditAttrs = array();
// TrimesterNum
$this->TrimesterNum->ViewValue = $this->TrimesterNum->CurrentValue;
$this->TrimesterNum->CssStyle = "";
$this->TrimesterNum->CssClass = "";
$this->TrimesterNum->ViewCustomAttributes = "";
// WeekNum
$this->WeekNum->ViewValue = $this->WeekNum->CurrentValue;
$this->WeekNum->CssStyle = "";
$this->WeekNum->CssClass = "";
$this->WeekNum->ViewCustomAttributes = "";
// SessionDate
$this->SessionDate->ViewValue = $this->SessionDate->CurrentValue;
$this->SessionDate->ViewValue = ew_FormatDateTime($this->SessionDate->ViewValue, 5);
$this->SessionDate->CssStyle = "";
$this->SessionDate->CssClass = "";
$this->SessionDate->ViewCustomAttributes = "";
// SessionDay
$this->SessionDay->ViewValue = $this->SessionDay->CurrentValue;
$this->SessionDay->CssStyle = "";
$this->SessionDay->CssClass = "";
$this->SessionDay->ViewCustomAttributes = "";
// StartTime
$this->StartTime->ViewValue = $this->StartTime->CurrentValue;
$this->StartTime->ViewValue = ew_FormatDateTime($this->StartTime->ViewValue, 4);
$this->StartTime->CssStyle = "";
$this->StartTime->CssClass = "";
$this->StartTime->ViewCustomAttributes = "";
// EndTime
$this->EndTime->ViewValue = $this->EndTime->CurrentValue;
$this->EndTime->ViewValue = ew_FormatDateTime($this->EndTime->ViewValue, 4);
$this->EndTime->CssStyle = "";
$this->EndTime->CssClass = "";
$this->EndTime->ViewCustomAttributes = "";
// Description
$this->Description->ViewValue = $this->Description->CurrentValue;
$this->Description->CssStyle = "";
$this->Description->CssClass = "";
$this->Description->ViewCustomAttributes = "";
// PresentationRef
$this->PresentationRef->ViewValue = $this->PresentationRef->CurrentValue;
$this->PresentationRef->CssStyle = "";
$this->PresentationRef->CssClass = "";
$this->PresentationRef->ViewCustomAttributes = "";
// AssignmentRef
$this->AssignmentRef->ViewValue = $this->AssignmentRef->CurrentValue;
$this->AssignmentRef->CssStyle = "";
$this->AssignmentRef->CssClass = "";
$this->AssignmentRef->ViewCustomAttributes = "";
// AssignmentSubDate
$this->AssignmentSubDate->ViewValue = $this->AssignmentSubDate->CurrentValue;
$this->AssignmentSubDate->ViewValue = ew_FormatDateTime($this->AssignmentSubDate->ViewValue, 5);
$this->AssignmentSubDate->CssStyle = "";
$this->AssignmentSubDate->CssClass = "";
$this->AssignmentSubDate->ViewCustomAttributes = "";
// PresenterName
$this->PresenterName->ViewValue = $this->PresenterName->CurrentValue;
$this->PresenterName->CssStyle = "";
$this->PresenterName->CssClass = "";
$this->PresenterName->ViewCustomAttributes = "";
// Duration
$this->Duration->ViewValue = $this->Duration->CurrentValue;
$this->Duration->CssStyle = "";
$this->Duration->CssClass = "";
$this->Duration->ViewCustomAttributes = "";
// TrimesterNum
$this->TrimesterNum->HrefValue = "";
$this->TrimesterNum->TooltipValue = "";
// WeekNum
$this->WeekNum->HrefValue = "";
$this->WeekNum->TooltipValue = "";
// SessionDate
$this->SessionDate->HrefValue = "";
$this->SessionDate->TooltipValue = "";
// SessionDay
$this->SessionDay->HrefValue = "";
$this->SessionDay->TooltipValue = "";
// StartTime
$this->StartTime->HrefValue = "";
$this->StartTime->TooltipValue = "";
// EndTime
$this->EndTime->HrefValue = "";
$this->EndTime->TooltipValue = "";
// Description
$this->Description->HrefValue = "";
$this->Description->TooltipValue = "";
// PresentationRef
$this->PresentationRef->HrefValue = "";
$this->PresentationRef->TooltipValue = "";
// AssignmentRef
$this->AssignmentRef->HrefValue = "";
$this->AssignmentRef->TooltipValue = "";
// AssignmentSubDate
$this->AssignmentSubDate->HrefValue = "";
$this->AssignmentSubDate->TooltipValue = "";
// PresenterName
$this->PresenterName->HrefValue = "";
$this->PresenterName->TooltipValue = "";
// Duration
$this->Duration->HrefValue = "";
$this->Duration->TooltipValue = "";
// Call Row Rendered event
$this->Row_Rendered();
}
// Aggregate list row values
function AggregateListRowValues() {
}
// Aggregate list row (for rendering)
function AggregateListRow() {
}
// Row styles
function RowStyles() {
$sAtt = "";
$sStyle = trim($this->CssStyle);
if (@$this->RowAttrs["style"] <> "")
$sStyle .= " " . $this->RowAttrs["style"];
$sClass = trim($this->CssClass);
if (@$this->RowAttrs["class"] <> "")
$sClass .= " " . $this->RowAttrs["class"];
if (trim($sStyle) <> "")
$sAtt .= " style=\"" . trim($sStyle) . "\"";
if (trim($sClass) <> "")
$sAtt .= " class=\"" . trim($sClass) . "\"";
return $sAtt;
}
// Row attributes
function RowAttributes() {
$sAtt = $this->RowStyles();
if ($this->Export == "") {
foreach ($this->RowAttrs as $k => $v) {
if ($k <> "class" && $k <> "style" && trim($v) <> "")
$sAtt .= " " . $k . "=\"" . trim($v) . "\"";
}
}
return $sAtt;
}
// Field object by name
function fields($fldname) {
return $this->fields[$fldname];
}
// Table level events
// Recordset Selecting event
function Recordset_Selecting(&$filter) {
// Enter your code here
}
// Recordset Selected event
function Recordset_Selected(&$rs) {
//echo "Recordset Selected";
}
// Recordset Search Validated event
function Recordset_SearchValidated() {
// Example:
//$this->MyField1->AdvancedSearch->SearchValue = "your search criteria"; // Search value
}
// Recordset Searching event
function Recordset_Searching(&$filter) {
// Enter your code here
}
// Row_Selecting event
function Row_Selecting(&$filter) {
// Enter your code here
}
// Row Selected event
function Row_Selected(&$rs) {
//echo "Row Selected";
}
// Row Rendering event
function Row_Rendering() {
// Enter your code here
}
// Row Rendered event
function Row_Rendered() {
// To view properties of field class, use:
//var_dump($this-><FieldName>);
}
// Row Inserting event
function Row_Inserting(&$rs) {
// Enter your code here
// To cancel, set return value to FALSE
return TRUE;
}
// Row Inserted event
function Row_Inserted(&$rs) {
//echo "Row Inserted"
}
// Row Updating event
function Row_Updating(&$rsold, &$rsnew) {
// Enter your code here
// To cancel, set return value to FALSE
return TRUE;
}
// Row Updated event
function Row_Updated(&$rsold, &$rsnew) {
//echo "Row Updated";
}
// Row Update Conflict event
function Row_UpdateConflict(&$rsold, &$rsnew) {
// Enter your code here
// To ignore conflict, set return value to FALSE
return TRUE;
}
// Row Deleting event
function Row_Deleting(&$rs) {
// Enter your code here
// To cancel, set return value to False
return TRUE;
}
// Row Deleted event
function Row_Deleted(&$rs) {
//echo "Row Deleted";
}
// Email Sending event
function Email_Sending(&$Email, &$Args) {
//var_dump($Email); var_dump($Args); exit();
return TRUE;
}
}
?>