<?php
//Include Common Files @1-A3459B8E
define("RelativePath", ".");
define("PathToCurrentPage", "/");
define("FileName", "ML_Maindelivery_Rejects_List.php");
include(RelativePath . "/Common.php");
include(RelativePath . "/Template.php");
include(RelativePath . "/Sorter.php");
include(RelativePath . "/Navigator.php");
include(RelativePath . "/SM_SubMenuControl.php");
//End Include Common Files
class clsRecordNewRecord1 { //NewRecord1 Class @2-D7EDAFB1
//Variables @2-D6FF3E86
// Public variables
var $ComponentType = "Record";
var $ComponentName;
var $Parent;
var $HTMLFormAction;
var $PressedButton;
var $Errors;
var $ErrorBlock;
var $FormSubmitted;
var $FormEnctype;
var $Visible;
var $IsEmpty;
var $CCSEvents = "";
var $CCSEventResult;
var $RelativePath = "";
var $InsertAllowed = false;
var $UpdateAllowed = false;
var $DeleteAllowed = false;
var $ReadAllowed = false;
var $EditMode = false;
var $ds;
var $DataSource;
var $ValidatingControls;
var $Controls;
var $Attributes;
// Class variables
//End Variables
//Class_Initialize Event @2-AA73D9D1
function clsRecordNewRecord1($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->Visible = true;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Record NewRecord1/Error";
$this->ReadAllowed = true;
$this->Visible = (CCSecurityAccessCheck("") == "success");
if($this->Visible)
{
$this->ComponentName = "NewRecord1";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$CCSForm = split(":", CCGetFromGet("ccsForm", ""), 2);
if(sizeof($CCSForm) == 1)
$CCSForm[1] = "";
list($FormName, $FormMethod) = $CCSForm;
$this->FormEnctype = "application/x-www-form-urlencoded";
$this->FormSubmitted = ($FormName == $this->ComponentName);
$Method = $this->FormSubmitted ? ccsPost : ccsGet;
$this->routeid = & new clsControl(ccsListBox, "routeid", "routeid", ccsText, "", CCGetRequestParam("routeid", $Method, NULL), $this);
$this->routeid->DSType = dsTable;
$this->routeid->DataSource = new clsDBCoopWorksConn();
$this->routeid->ds = & $this->routeid->DataSource;
$this->routeid->DataSource->SQL = "SELECT * \n" .
"FROM routes {SQL_Where} {SQL_OrderBy}";
list($this->routeid->BoundColumn, $this->routeid->TextColumn, $this->routeid->DBFormat) = array("routeid", "Descr", "");
$this->startdate = & new clsControl(ccsTextBox, "startdate", "startdate", ccsDate, array("mm", "/", "dd", "/", "yyyy"), CCGetRequestParam("startdate", $Method, NULL), $this);
$this->enddate = & new clsControl(ccsTextBox, "enddate", "enddate", ccsDate, array("mm", "/", "dd", "/", "yyyy"), CCGetRequestParam("enddate", $Method, NULL), $this);
$this->Button_DoSearch = & new clsButton("Button_DoSearch", $Method, $this);
$this->DatePicker_startdate1 = & new clsDatePicker("DatePicker_startdate1", "NewRecord1", "startdate", $this);
$this->DatePicker_enddate1 = & new clsDatePicker("DatePicker_enddate1", "NewRecord1", "enddate", $this);
if(!$this->FormSubmitted) {
if(!is_array($this->startdate->Value) && !strlen($this->startdate->Value) && $this->startdate->Value !== false)
$this->startdate->SetValue(time());
if(!is_array($this->enddate->Value) && !strlen($this->enddate->Value) && $this->enddate->Value !== false)
$this->enddate->SetValue(time());
}
}
}
//End Class_Initialize Event
//Validate Method @2-2C0B4898
function Validate()
{
global $CCSLocales;
$Validation = true;
$Where = "";
$Validation = ($this->routeid->Validate() && $Validation);
$Validation = ($this->startdate->Validate() && $Validation);
$Validation = ($this->enddate->Validate() && $Validation);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "OnValidate", $this);
$Validation = $Validation && ($this->routeid->Errors->Count() == 0);
$Validation = $Validation && ($this->startdate->Errors->Count() == 0);
$Validation = $Validation && ($this->enddate->Errors->Count() == 0);
return (($this->Errors->Count() == 0) && $Validation);
}
//End Validate Method
//CheckErrors Method @2-DAF134B2
function CheckErrors()
{
$errors = false;
$errors = ($errors || $this->routeid->Errors->Count());
$errors = ($errors || $this->startdate->Errors->Count());
$errors = ($errors || $this->enddate->Errors->Count());
$errors = ($errors || $this->DatePicker_startdate1->Errors->Count());
$errors = ($errors || $this->DatePicker_enddate1->Errors->Count());
$errors = ($errors || $this->Errors->Count());
return $errors;
}
//End CheckErrors Method
//MasterDetail @2-ED598703
function SetPrimaryKeys($keyArray)
{
$this->PrimaryKeys = $keyArray;
}
function GetPrimaryKeys()
{
return $this->PrimaryKeys;
}
function GetPrimaryKey($keyName)
{
return $this->PrimaryKeys[$keyName];
}
//End MasterDetail
//Operation Method @2-DD94EE4C
function Operation()
{
if(!$this->Visible)
return;
global $Redirect;
global $FileName;
if(!$this->FormSubmitted) {
return;
}
if($this->FormSubmitted) {
$this->PressedButton = "Button_DoSearch";
if($this->Button_DoSearch->Pressed) {
$this->PressedButton = "Button_DoSearch";
}
}
$Redirect = $FileName;
if($this->Validate()) {
if($this->PressedButton == "Button_DoSearch") {
$Redirect = $FileName . "?" . CCMergeQueryStrings(CCGetQueryString("Form", array("Button_DoSearch", "Button_DoSearch_x", "Button_DoSearch_y")));
if(!CCGetEvent($this->Button_DoSearch->CCSEvents, "OnClick", $this->Button_DoSearch)) {
$Redirect = "";
}
}
} else {
$Redirect = "";
}
}
//End Operation Method
//Show Method @2-244C62E3
function Show()
{
global $CCSUseAmp;
global $Tpl;
global $FileName;
global $CCSLocales;
$Error = "";
if(!$this->Visible)
return;
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this);
$this->routeid->Prepare();
$RecordBlock = "Record " . $this->ComponentName;
$ParentPath = $Tpl->block_path;
$Tpl->block_path = $ParentPath . "/" . $RecordBlock;
$this->EditMode = $this->EditMode && $this->ReadAllowed;
if (!$this->FormSubmitted) {
}
if($this->FormSubmitted || $this->CheckErrors()) {
$Error = "";
$Error = ComposeStrings($Error, $this->routeid->Errors->ToString());
$Error = ComposeStrings($Error, $this->startdate->Errors->ToString());
$Error = ComposeStrings($Error, $this->enddate->Errors->ToString());
$Error = ComposeStrings($Error, $this->DatePicker_startdate1->Errors->ToString());
$Error = ComposeStrings($Error, $this->DatePicker_enddate1->Errors->ToString());
$Error = ComposeStrings($Error, $this->Errors->ToString());
$Tpl->SetVar("Error", $Error);
$Tpl->Parse("Error", false);
}
$CCSForm = $this->EditMode ? $this->ComponentName . ":" . "Edit" : $this->ComponentName;
$this->HTMLFormAction = $FileName . "?" . CCAddParam(CCGetQueryString("QueryString", ""), "ccsForm", $CCSForm);
$Tpl->SetVar("Action", !$CCSUseAmp ? $this->HTMLFormAction : str_replace("&", "&", $this->HTMLFormAction));
$Tpl->SetVar("HTMLFormName", $this->ComponentName);
$Tpl->SetVar("HTMLFormEnctype", $this->FormEnctype);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this);
$this->Attributes->Show();
if(!$this->Visible) {
$Tpl->block_path = $ParentPath;
return;
}
$this->routeid->Show();
$this->startdate->Show();
$this->enddate->Show();
$this->Button_DoSearch->Show();
$this->DatePicker_startdate1->Show();
$this->DatePicker_enddate1->Show();
$Tpl->parse();
$Tpl->block_path = $ParentPath;
}
//End Show Method
} //End NewRecord1 Class @2-FCB6E20C
//Report1 ReportGroup class @58-3BCE48CB
class clsReportGroupReport1 {
var $GroupType;
var $mode; //1 - open, 2 - close
var $Report_TotalRecords, $_Report_TotalRecordsAttributes;
var $DNNBR, $_DNNBRAttributes;
var $CustID, $_CustIDAttributes;
var $CustRefNbr, $_CustRefNbrAttributes;
var $TranDate, $_TranDateAttributes;
var $CANID, $_CANIDAttributes;
var $Shift, $_ShiftAttributes;
var $Qty, $_QtyAttributes;
var $ReportLabel1, $_ReportLabel1Attributes;
var $Confirmed, $_ConfirmedAttributes;
var $descr, $_descrAttributes;
var $TotalSum_Qty, $_TotalSum_QtyAttributes;
var $Report_CurrentDate, $_Report_CurrentDateAttributes;
var $Attributes;
var $ReportTotalIndex = 0;
var $PageTotalIndex;
var $PageNumber;
var $RowNumber;
var $Parent;
function clsReportGroupReport1(& $parent) {
$this->Parent = & $parent;
$this->Attributes = $this->Parent->Attributes->GetAsArray();
}
function SetControls($PrevGroup = "") {
$this->DNNBR = $this->Parent->DNNBR->Value;
$this->CustID = $this->Parent->CustID->Value;
$this->CustRefNbr = $this->Parent->CustRefNbr->Value;
$this->TranDate = $this->Parent->TranDate->Value;
$this->CANID = $this->Parent->CANID->Value;
$this->Shift = $this->Parent->Shift->Value;
$this->Qty = $this->Parent->Qty->Value;
$this->ReportLabel1 = $this->Parent->ReportLabel1->Value;
$this->Confirmed = $this->Parent->Confirmed->Value;
$this->descr = $this->Parent->descr->Value;
}
function SetTotalControls($mode = "", $PrevGroup = "") {
$this->Report_TotalRecords = $this->Parent->Report_TotalRecords->GetTotalValue($mode);
$this->TotalSum_Qty = $this->Parent->TotalSum_Qty->GetTotalValue($mode);
$this->_Report_TotalRecordsAttributes = $this->Parent->Report_TotalRecords->Attributes->GetAsArray();
$this->_Sorter2Attributes = $this->Parent->Sorter2->Attributes->GetAsArray();
$this->_Sorter3Attributes = $this->Parent->Sorter3->Attributes->GetAsArray();
$this->_Sorter4Attributes = $this->Parent->Sorter4->Attributes->GetAsArray();
$this->_DNNBRAttributes = $this->Parent->DNNBR->Attributes->GetAsArray();
$this->_CustIDAttributes = $this->Parent->CustID->Attributes->GetAsArray();
$this->_CustRefNbrAttributes = $this->Parent->CustRefNbr->Attributes->GetAsArray();
$this->_TranDateAttributes = $this->Parent->TranDate->Attributes->GetAsArray();
$this->_CANIDAttributes = $this->Parent->CANID->Attributes->GetAsArray();
$this->_ShiftAttributes = $this->Parent->Shift->Attributes->GetAsArray();
$this->_QtyAttributes = $this->Parent->Qty->Attributes->GetAsArray();
$this->_ReportLabel1Attributes = $this->Parent->ReportLabel1->Attributes->GetAsArray();
$this->_ConfirmedAttributes = $this->Parent->Confirmed->Attributes->GetAsArray();
$this->_descrAttributes = $this->Parent->descr->Attributes->GetAsArray();
$this->_TotalSum_QtyAttributes = $this->Parent->TotalSum_Qty->Attributes->GetAsArray();
$this->_Report_CurrentDateAttributes = $this->Parent->Report_CurrentDate->Attributes->GetAsArray();
$this->_NavigatorAttributes = $this->Parent->Navigator->Attributes->GetAsArray();
}
function SyncWithHeader(& $Header) {
$Header->Report_TotalRecords = $this->Report_TotalRecords;
$Header->_Report_TotalRecordsAttributes = $this->_Report_TotalRecordsAttributes;
$Header->TotalSum_Qty = $this->TotalSum_Qty;
$Header->_TotalSum_QtyAttributes = $this->_TotalSum_QtyAttributes;
$this->DNNBR = $Header->DNNBR;
$Header->_DNNBRAttributes = $this->_DNNBRAttributes;
$this->Parent->DNNBR->Value = $Header->DNNBR;
$this->Parent->DNNBR->Attributes->RestoreFromArray($Header->_DNNBRAttributes);
$this->CustID = $Header->CustID;
$Header->_CustIDAttributes = $this->_CustIDAttributes;
$this->Parent->CustID->Value = $Header->CustID;
$this->Parent->CustID->Attributes->RestoreFromArray($Header->_CustIDAttributes);
$this->CustRefNbr = $Header->CustRefNbr;
$Header->_CustRefNbrAttributes = $this->_CustRefNbrAttributes;
$this->Parent->CustRefNbr->Value = $Header->CustRefNbr;
$this->Parent->CustRefNbr->Attributes->RestoreFromArray($Header->_CustRefNbrAttributes);
$this->TranDate = $Header->TranDate;
$Header->_TranDateAttributes = $this->_TranDateAttributes;
$this->Parent->TranDate->Value = $Header->TranDate;
$this->Parent->TranDate->Attributes->RestoreFromArray($Header->_TranDateAttributes);
$this->CANID = $Header->CANID;
$Header->_CANIDAttributes = $this->_CANIDAttributes;
$this->Parent->CANID->Value = $Header->CANID;
$this->Parent->CANID->Attributes->RestoreFromArray($Header->_CANIDAttributes);
$this->Shift = $Header->Shift;
$Header->_ShiftAttributes = $this->_ShiftAttributes;
$this->Parent->Shift->Value = $Header->Shift;
$this->Parent->Shift->Attributes->RestoreFromArray($Header->_ShiftAttributes);
$this->Qty = $Header->Qty;
$Header->_QtyAttributes = $this->_QtyAttributes;
$this->Parent->Qty->Value = $Header->Qty;
$this->Parent->Qty->Attributes->RestoreFromArray($Header->_QtyAttributes);
$this->ReportLabel1 = $Header->ReportLabel1;
$Header->_ReportLabel1Attributes = $this->_ReportLabel1Attributes;
$this->Parent->ReportLabel1->Value = $Header->ReportLabel1;
$this->Parent->ReportLabel1->Attributes->RestoreFromArray($Header->_ReportLabel1Attributes);
$this->Confirmed = $Header->Confirmed;
$Header->_ConfirmedAttributes = $this->_ConfirmedAttributes;
$this->Parent->Confirmed->Value = $Header->Confirmed;
$this->Parent->Confirmed->Attributes->RestoreFromArray($Header->_ConfirmedAttributes);
$this->descr = $Header->descr;
$Header->_descrAttributes = $this->_descrAttributes;
$this->Parent->descr->Value = $Header->descr;
$this->Parent->descr->Attributes->RestoreFromArray($Header->_descrAttributes);
}
function ChangeTotalControls() {
$this->Report_TotalRecords = $this->Parent->Report_TotalRecords->GetValue();
$this->TotalSum_Qty = $this->Parent->TotalSum_Qty->GetValue();
}
}
//End Report1 ReportGroup class
//Report1 GroupsCollection class @58-D96375DA
class clsGroupsCollectionReport1 {
var $Groups;
var $mPageCurrentHeaderIndex;
var $PageSize;
var $TotalPages = 0;
var $TotalRows = 0;
var $CurrentPageSize = 0;
var $Pages;
var $Parent;
var $LastDetailIndex;
function clsGroupsCollectionReport1(& $parent) {
$this->Parent = & $parent;
$this->Groups = array();
$this->Pages = array();
$this->mReportTotalIndex = 0;
$this->mPageTotalIndex = 1;
}
function & InitGroup() {
$group = new clsReportGroupReport1($this->Parent);
$group->RowNumber = $this->TotalRows + 1;
$group->PageNumber = $this->TotalPages;
$group->PageTotalIndex = $this->mPageCurrentHeaderIndex;
return $group;
}
function RestoreValues() {
$this->Parent->Report_TotalRecords->Value = $this->Parent->Report_TotalRecords->initialValue;
$this->Parent->DNNBR->Value = $this->Parent->DNNBR->initialValue;
$this->Parent->CustID->Value = $this->Parent->CustID->initialValue;
$this->Parent->CustRefNbr->Value = $this->Parent->CustRefNbr->initialValue;
$this->Parent->TranDate->Value = $this->Parent->TranDate->initialValue;
$this->Parent->CANID->Value = $this->Parent->CANID->initialValue;
$this->Parent->Shift->Value = $this->Parent->Shift->initialValue;
$this->Parent->Qty->Value = $this->Parent->Qty->initialValue;
$this->Parent->ReportLabel1->Value = $this->Parent->ReportLabel1->initialValue;
$this->Parent->Confirmed->Value = $this->Parent->Confirmed->initialValue;
$this->Parent->descr->Value = $this->Parent->descr->initialValue;
$this->Parent->TotalSum_Qty->Value = $this->Parent->TotalSum_Qty->initialValue;
}
function OpenPage() {
$this->TotalPages++;
$Group = & $this->InitGroup();
$this->Parent->Page_Header->CCSEventResult = CCGetEvent($this->Parent->Page_Header->CCSEvents, "OnInitialize", $this->Parent->Page_Header);
if ($this->Parent->Page_Header->Visible)
$this->CurrentPageSize = $this->CurrentPageSize + $this->Parent->Page_Header->Height;
$Group->SetTotalControls("GetNextValue");
$this->Parent->Page_Header->CCSEventResult = CCGetEvent($this->Parent->Page_Header->CCSEvents, "OnCalculate", $this->Parent->Page_Header);
$Group->SetControls();
$Group->Mode = 1;
$Group->GroupType = "Page";
$Group->PageTotalIndex = count($this->Groups);
$this->mPageCurrentHeaderIndex = count($this->Groups);
$this->Groups[] = & $Group;
$this->Pages[] = count($this->Groups) == 2 ? 0 : count($this->Groups) - 1;
}
function OpenGroup($groupName) {
$Group = "";
$OpenFlag = false;
if ($groupName == "Report") {
$Group = & $this->InitGroup(true);
$this->Parent->Report_Header->CCSEventResult = CCGetEvent($this->Parent->Report_Header->CCSEvents, "OnInitialize", $this->Parent->Report_Header);
if ($this->Parent->Report_Header->Visible)
$this->CurrentPageSize = $this->CurrentPageSize + $this->Parent->Report_Header->Height;
$Group->SetTotalControls("GetNextValue");
$this->Parent->Report_Header->CCSEventResult = CCGetEvent($this->Parent->Report_Header->CCSEvents, "OnCalculate", $this->Parent->Report_Header);
$Group->SetControls();
$Group->Mode = 1;
$Group->GroupType = "Report";
$this->Groups[] = & $Group;
$this->OpenPage();
}
}
function ClosePage() {
$Group = & $this->InitGroup();
$this->Parent->Page_Footer->CCSEventResult = CCGetEvent($this->Parent->Page_Footer->CCSEvents, "OnInitialize", $this->Parent->Page_Footer);
$Group->SetTotalControls("GetPrevValue");
$Group->SyncWithHeader($this->Groups[$this->mPageCurrentHeaderIndex]);
$this->Parent->Page_Footer->CCSEventResult = CCGetEvent($this->Parent->Page_Footer->CCSEvents, "OnCalculate", $this->Parent->Page_Footer);
$Group->SetControls();
$this->RestoreValues();
$this->CurrentPageSize = 0;
$Group->Mode = 2;
$Group->GroupType = "Page";
$this->Groups[] = & $Group;
}
function CloseGroup($groupName)
{
$Group = "";
if ($groupName == "Report") {
$Group = & $this->InitGroup(true);
$this->Parent->Report_Footer->CCSEventResult = CCGetEvent($this->Parent->Report_Footer->CCSEvents, "OnInitialize", $this->Parent->Report_Footer);
if ($this->Parent->Page_Footer->Visible)
$OverSize = $this->Parent->Report_Footer->Height + $this->Parent->Page_Footer->Height;
else
$OverSize = $this->Parent->Report_Footer->Height;
if (($this->PageSize > 0) and $this->Parent->Report_Footer->Visible and ($this->CurrentPageSize + $OverSize > $this->PageSize)) {
$this->ClosePage();
$this->OpenPage();
}
$Group->SetTotalControls("GetPrevValue");
$Group->SyncWithHeader($this->Groups[0]);
if ($this->Parent->Report_Footer->Visible)
$this->CurrentPageSize = $this->CurrentPageSize + $this->Parent->Report_Footer->Height;
$this->Parent->Report_Footer->CCSEventResult = CCGetEvent($this->Parent->Report_Footer->CCSEvents, "OnCalculate", $this->Parent->Report_Footer);
$Group->SetControls();
$this->RestoreValues();
$Group->Mode = 2;
$Group->GroupType = "Report";
$this->Groups[] = & $Group;
$this->ClosePage();
return;
}
}
function AddItem()
{
$Group = & $this->InitGroup(true);
$this->Parent->Detail->CCSEventResult = CCGetEvent($this->Parent->Detail->CCSEvents, "OnInitialize", $this->Parent->Detail);
if ($this->Parent->Page_Footer->Visible)
$OverSize = $this->Parent->Detail->Height + $this->Parent->Page_Footer->Height;
else
$OverSize = $this->Parent->Detail->Height;
if (($this->PageSize > 0) and $this->Parent->Detail->Visible and ($this->CurrentPageSize + $OverSize > $this->PageSize)) {
$this->ClosePage();
$this->OpenPage();
}
$this->TotalRows++;
if ($this->LastDetailIndex)
$PrevGroup = & $this->Groups[$this->LastDetailIndex];
else
$PrevGroup = "";
$Group->SetTotalControls("", $PrevGroup);
if ($this->Parent->Detail->Visible)
$this->CurrentPageSize = $this->CurrentPageSize + $this->Parent->Detail->Height;
$this->Parent->Detail->CCSEventResult = CCGetEvent($this->Parent->Detail->CCSEvents, "OnCalculate", $this->Parent->Detail);
$Group->SetControls($PrevGroup);
$this->LastDetailIndex = count($this->Groups);
$this->Groups[] = & $Group;
}
}
//End Report1 GroupsCollection class
class clsReportReport1 { //Report1 Class @58-BC2FB08C
//Report1 Variables @58-A246238E
var $ComponentType = "Report";
var $PageSize;
var $ComponentName;
var $Visible;
var $Errors;
var $CCSEvents = array();
var $CCSEventResult;
var $RelativePath = "";
var $ViewMode = "Web";
var $TemplateBlock;
var $PageNumber;
var $RowNumber;
var $TotalRows;
var $TotalPages;
var $ControlsVisible = array();
var $IsEmpty;
var $Attributes;
var $DetailBlock, $Detail;
var $Report_FooterBlock, $Report_Footer;
var $Report_HeaderBlock, $Report_Header;
var $Page_FooterBlock, $Page_Footer;
var $Page_HeaderBlock, $Page_Header;
var $SorterName, $SorterDirection;
var $ds;
var $DataSource;
var $UseClientPaging = false;
//Report Controls
var $StaticControls, $RowControls, $Report_FooterControls, $Report_HeaderControls;
var $Page_FooterControls, $Page_HeaderControls;
var $Sorter2;
var $Sorter3;
var $Sorter4;
//End Report1 Variables
//Class_Initialize Event @58-C5EEB6E3
function clsReportReport1($RelativePath = "", & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "Report1";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->Detail = new clsSection($this);
$MinPageSize = 0;
$MaxSectionSize = 0;
$this->Detail->Height = 1;
$MaxSectionSize = max($MaxSectionSize, $this->Detail->Height);
$this->Report_Footer = new clsSection($this);
$this->Report_Footer->Height = 1;
$MaxSectionSize = max($MaxSectionSize, $this->Report_Footer->Height);
$this->Report_Header = new clsSection($this);
$this->Page_Footer = new clsSection($this);
$this->Page_Footer->Height = 2;
$MinPageSize += $this->Page_Footer->Height;
$this->Page_Header = new clsSection($this);
$this->Page_Header->Height = 1;
$MinPageSize += $this->Page_Header->Height;
$this->Errors = new clsErrors();
$this->DataSource = new clsReport1DataSource($this);
$this->ds = & $this->DataSource;
$this->ViewMode = CCGetParam("ViewMode", "Web");
$PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(is_numeric($PageSize) && $PageSize > 0) {
$this->PageSize = $PageSize;
} else if($this->ViewMode == "Print") {
if (!is_numeric($PageSize) || $PageSize < 0)
$this->PageSize = 50;
else if ($PageSize == "0")
$this->PageSize = 0;
else
$this->PageSize = $PageSize;
} else {
if (!is_numeric($PageSize) || $PageSize < 0)
$this->PageSize = 100;
else if ($PageSize == "0")
$this->PageSize = 100;
else
$this->PageSize = min(100, $PageSize);
}
$MinPageSize += $MaxSectionSize;
if ($this->PageSize && $MinPageSize && $this->PageSize < $MinPageSize)
$this->PageSize = $MinPageSize;
$this->PageNumber = $this->ViewMode == "Print" ? 1 : intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0 ) {
$this->PageNumber = 1;
}
$this->Visible = (CCSecurityAccessCheck("") == "success");
$this->SorterName = CCGetParam("Report1Order", "");
$this->SorterDirection = CCGetParam("Report1Dir", "");
$this->Report_TotalRecords = & new clsControl(ccsReportLabel, "Report_TotalRecords", "Report_TotalRecords", ccsText, "", 0, $this);
$this->Report_TotalRecords->TotalFunction = "Count";
$this->Report_TotalRecords->IsEmptySource = true;
$this->Sorter2 = & new clsSorter($this->ComponentName, "Sorter2", $FileName, $this);
$this->Sorter3 = & new clsSorter($this->ComponentName, "Sorter3", $FileName, $this);
$this->Sorter4 = & new clsSorter($this->ComponentName, "Sorter4", $FileName, $this);
$this->DNNBR = & new clsControl(ccsReportLabel, "DNNBR", "DNNBR", ccsText, "", "", $this);
$this->CustID = & new clsControl(ccsReportLabel, "CustID", "CustID", ccsText, "", "", $this);
$this->CustRefNbr = & new clsControl(ccsReportLabel, "CustRefNbr", "CustRefNbr", ccsText, "", "", $this);
$this->TranDate = & new clsControl(ccsReportLabel, "TranDate", "TranDate", ccsDate, $DefaultDateFormat, "", $this);
$this->CANID = & new clsControl(ccsReportLabel, "CANID", "CANID", ccsText, "", "", $this);
$this->Shift = & new clsControl(ccsReportLabel, "Shift", "Shift", ccsText, "", "", $this);
$this->Qty = & new clsControl(ccsReportLabel, "Qty", "Qty", ccsFloat, array(False, 2, Null, Null, False, "", "", 1, True, ""), "", $this);
$this->ReportLabel1 = & new clsControl(ccsReportLabel, "ReportLabel1", "ReportLabel1", ccsText, "", "", $this);
$this->Confirmed = & new clsControl(ccsReportLabel, "Confirmed", "Confirmed", ccsBoolean, array("Yes", "No", ""), "", $this);
$this->descr = & new clsControl(ccsReportLabel, "descr", "descr", ccsText, "", "", $this);
$this->NoRecords = & new clsPanel("NoRecords", $this);
$this->TotalSum_Qty = & new clsControl(ccsReportLabel, "TotalSum_Qty", "TotalSum_Qty", ccsFloat, array(False, 2, Null, Null, False, "", "", 1, True, ""), "", $this);
$this->TotalSum_Qty->TotalFunction = "Sum";
$this->Report_CurrentDate = & new clsControl(ccsReportLabel, "Report_CurrentDate", "Report_CurrentDate", ccsText, array('ShortDate'), "", $this);
$this->Navigator = & new clsNavigator($this->ComponentName, "Navigator", $FileName, 10, tpCentered, $this);
$this->Navigator->PageSizes = array("1", "5", "10", "25", "50");
$this->PageBreak = & new clsPanel("PageBreak", $this);
}
//End Class_Initialize Event
//Initialize Method @58-6C59EE65
function Initialize()
{
if(!$this->Visible) return;
$this->DataSource->PageSize = $this->PageSize;
$this->DataSource->AbsolutePage = $this->PageNumber;
$this->DataSource->SetOrder($this->SorterName, $this->SorterDirection);
}
//End Initialize Method
//CheckErrors Method @58-06DD1EC7
function CheckErrors()
{
$errors = false;
$errors = ($errors || $this->Report_TotalRecords->Errors->Count());
$errors = ($errors || $this->DNNBR->Errors->Count());
$errors = ($errors || $this->CustID->Errors->Count());
$errors = ($errors || $this->CustRefNbr->Errors->Count());
$errors = ($errors || $this->TranDate->Errors->Count());
$errors = ($errors || $this->CANID->Errors->Count());
$errors = ($errors || $this->Shift->Errors->Count());
$errors = ($errors || $this->Qty->Errors->Count());
$errors = ($errors || $this->ReportLabel1->Errors->Count());
$errors = ($errors || $this->Confirmed->Errors->Count());
$errors = ($errors || $this->descr->Errors->Count());
$errors = ($errors || $this->TotalSum_Qty->Errors->Count());
$errors = ($errors || $this->Report_CurrentDate->Errors->Count());
$errors = ($errors || $this->Errors->Count());
$errors = ($errors || $this->DataSource->Errors->Count());
return $errors;
}
//End CheckErrors Method
//GetErrors Method @58-D2895A0A
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->Report_TotalRecords->Errors->ToString());
$errors = ComposeStrings($errors, $this->DNNBR->Errors->ToString());
$errors = ComposeStrings($errors, $this->CustID->Errors->ToString());
$errors = ComposeStrings($errors, $this->CustRefNbr->Errors->ToString());
$errors = ComposeStrings($errors, $this->TranDate->Errors->ToString());
$errors = ComposeStrings($errors, $this->CANID->Errors->ToString());
$errors = ComposeStrings($errors, $this->Shift->Errors->ToString());
$errors = ComposeStrings($errors, $this->Qty->Errors->ToString());
$errors = ComposeStrings($errors, $this->ReportLabel1->Errors->ToString());
$errors = ComposeStrings($errors, $this->Confirmed->Errors->ToString());
$errors = ComposeStrings($errors, $this->descr->Errors->ToString());
$errors = ComposeStrings($errors, $this->TotalSum_Qty->Errors->ToString());
$errors = ComposeStrings($errors, $this->Report_CurrentDate->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
//Show Method @58-28C83EFC
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$ShownRecords = 0;
$this->DataSource->Parameters["urlstartdate"] = CCGetFromGet("startdate", NULL);
$this->DataSource->Parameters["urlenddate"] = CCGetFromGet("enddate", NULL);
$this->DataSource->Parameters["urlrouteid"] = CCGetFromGet("routeid", NULL);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this);
$this->DataSource->Prepare();
$this->DataSource->Open();
$Groups = new clsGroupsCollectionReport1($this);
$Groups->PageSize = $this->PageSize > 0 ? $this->PageSize : 0;
$is_next_record = $this->DataSource->next_record();
$this->IsEmpty = ! $is_next_record;
while($is_next_record) {
$this->DataSource->SetValues();
$this->DNNBR->SetValue($this->DataSource->DNNBR->GetValue());
$this->CustID->SetValue($this->DataSource->CustID->GetValue());
$this->CustRefNbr->SetValue($this->DataSource->CustRefNbr->GetValue());
$this->TranDate->SetValue($this->DataSource->TranDate->GetValue());
$this->CANID->SetValue($this->DataSource->CANID->GetValue());
$this->Shift->SetValue($this->DataSource->Shift->GetValue());
$this->Qty->SetValue($this->DataSource->Qty->GetValue());
$this->ReportLabel1->SetValue($this->DataSource->ReportLabel1->GetValue());
$this->Confirmed->SetValue($this->DataSource->Confirmed->GetValue());
$this->descr->SetValue($this->DataSource->descr->GetValue());
$this->TotalSum_Qty->SetValue($this->DataSource->TotalSum_Qty->GetValue());
$this->Report_TotalRecords->SetValue(1);
if (count($Groups->Groups) == 0) $Groups->OpenGroup("Report");
$Groups->AddItem();
$is_next_record = $this->DataSource->next_record();
}
if (!count($Groups->Groups))
$Groups->OpenGroup("Report");
else
$this->NoRecords->Visible = false;
$Groups->CloseGroup("Report");
$this->TotalPages = $Groups->TotalPages;
$this->TotalRows = $Groups->TotalRows;
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this);
if(!$this->Visible) return;
$this->Attributes->Show();
$ReportBlock = "Report " . $this->ComponentName;
$ParentPath = $Tpl->block_path;
$Tpl->block_path = $ParentPath . "/" . $ReportBlock;
if($this->CheckErrors()) {
$Tpl->replaceblock("", $this->GetErrors());
$Tpl->block_path = $ParentPath;
return;
} else {
$items = & $Groups->Groups;
$i = $Groups->Pages[min($this->PageNumber, $Groups->TotalPages) - 1];
$this->ControlsVisible["DNNBR"] = $this->DNNBR->Visible;
$this->ControlsVisible["CustID"] = $this->CustID->Visible;
$this->ControlsVisible["CustRefNbr"] = $this->CustRefNbr->Visible;
$this->ControlsVisible["TranDate"] = $this->TranDate->Visible;
$this->ControlsVisible["CANID"] = $this->CANID->Visible;
$this->ControlsVisible["Shift"] = $this->Shift->Visible;
$this->ControlsVisible["Qty"] = $this->Qty->Visible;
$this->ControlsVisible["ReportLabel1"] = $this->ReportLabel1->Visible;
$this->ControlsVisible["Confirmed"] = $this->Confirmed->Visible;
$this->ControlsVisible["descr"] = $this->descr->Visible;
do {
$this->Attributes->RestoreFromArray($items[$i]->Attributes);
$this->RowNumber = $items[$i]->RowNumber;
switch ($items[$i]->GroupType) {
Case "":
$Tpl->block_path = $ParentPath . "/" . $ReportBlock . "/Section Detail";
$this->DNNBR->SetValue($items[$i]->DNNBR);
$this->DNNBR->Attributes->RestoreFromArray($items[$i]->_DNNBRAttributes);
$this->CustID->SetValue($items[$i]->CustID);
$this->CustID->Attributes->RestoreFromArray($items[$i]->_CustIDAttributes);
$this->CustRefNbr->SetValue($items[$i]->CustRefNbr);
$this->CustRefNbr->Attributes->RestoreFromArray($items[$i]->_CustRefNbrAttributes);
$this->TranDate->SetValue($items[$i]->TranDate);
$this->TranDate->Attributes->RestoreFromArray($items[$i]->_TranDateAttributes);
$this->CANID->SetValue($items[$i]->CANID);
$this->CANID->Attributes->RestoreFromArray($items[$i]->_CANIDAttributes);
$this->Shift->SetValue($items[$i]->Shift);
$this->Shift->Attributes->RestoreFromArray($items[$i]->_ShiftAttributes);
$this->Qty->SetValue($items[$i]->Qty);
$this->Qty->Attributes->RestoreFromArray($items[$i]->_QtyAttributes);
$this->ReportLabel1->SetValue($items[$i]->ReportLabel1);
$this->ReportLabel1->Attributes->RestoreFromArray($items[$i]->_ReportLabel1Attributes);
$this->Confirmed->SetValue($items[$i]->Confirmed);
$this->Confirmed->Attributes->RestoreFromArray($items[$i]->_ConfirmedAttributes);
$this->descr->SetValue($items[$i]->descr);
$this->descr->Attributes->RestoreFromArray($items[$i]->_descrAttributes);
$this->Detail->CCSEventResult = CCGetEvent($this->Detail->CCSEvents, "BeforeShow", $this->Detail);
$this->Attributes->Show();
$this->DNNBR->Show();
$this->CustID->Show();
$this->CustRefNbr->Show();
$this->TranDate->Show();
$this->CANID->Show();
$this->Shift->Show();
$this->Qty->Show();
$this->ReportLabel1->Show();
$this->Confirmed->Show();
$this->descr->Show();
$Tpl->block_path = $ParentPath . "/" . $ReportBlock;
if ($this->Detail->Visible)
$Tpl->parseto("Section Detail", true, "Section Detail");
break;
case "Report":
if ($items[$i]->Mode == 1) {
$this->Report_TotalRecords->SetValue($items[$i]->Report_TotalRecords);
$this->Report_TotalRecords->Attributes->RestoreFromArray($items[$i]->_Report_TotalRecordsAttributes);
$this->Report_Header->CCSEventResult = CCGetEvent($this->Report_Header->CCSEvents, "BeforeShow", $this->Report_Header);
if ($this->Report_Header->Visible) {
$Tpl->block_path = $ParentPath . "/" . $ReportBlock . "/Section Report_Header";
$this->Attributes->Show();
$this->Report_TotalRecords->Show();
$Tpl->block_path = $ParentPath . "/" . $ReportBlock;
$Tpl->parseto("Section Report_Header", true, "Section Detail");
}
}
if ($items[$i]->Mode == 2) {
$this->TotalSum_Qty->SetText(CCFormatNumber($items[$i]->TotalSum_Qty, array(False, 2, Null, Null, False, "", "", 1, True, "")), ccsFloat);
$this->TotalSum_Qty->Attributes->RestoreFromArray($items[$i]->_TotalSum_QtyAttributes);
$this->Report_Footer->CCSEventResult = CCGetEvent($this->Report_Footer->CCSEvents, "BeforeShow", $this->Report_Footer);
if ($this->Report_Footer->Visible) {
$Tpl->block_path = $ParentPath . "/" . $ReportBlock . "/Section Report_Footer";
$this->NoRecords->Show();
$this->TotalSum_Qty->Show();
$this->Attributes->Show();
$Tpl->block_path = $ParentPath . "/" . $ReportBlock;
$Tpl->parseto("Section Report_Footer", true, "Section Detail");
}
}
break;
case "Page":
if ($items[$i]->Mode == 1) {
$this->Page_Header->CCSEventResult = CCGetEvent($this->Page_Header->CCSEvents, "BeforeShow", $this->Page_Header);
if ($this->Page_Header->Visible) {
$Tpl->block_path = $ParentPath . "/" . $ReportBlock . "/Section Page_Header";
$this->Attributes->Show();
$this->Sorter2->Show();
$this->Sorter3->Show();
$this->Sorter4->Show();
$Tpl->block_path = $ParentPath . "/" . $ReportBlock;
$Tpl->parseto("Section Page_Header", true, "Section Detail");
}
}
if ($items[$i]->Mode == 2 && !$this->UseClientPaging || $items[$i]->Mode == 1 && $this->UseClientPaging) {
$this->PageBreak->Visible = (($i < count($items) - 1) && ($this->ViewMode == "Print"));
$this->Report_CurrentDate->SetValue(CCFormatDate(CCGetDateArray(), $this->Report_CurrentDate->Format));
$this->Report_CurrentDate->Attributes->RestoreFromArray($items[$i]->_Report_CurrentDateAttributes);
$this->Navigator->PageNumber = $items[$i]->PageNumber;
$this->Navigator->TotalPages = $Groups->TotalPages;
$this->Navigator->Visible = ("Print" != $this->ViewMode);
$this->Page_Footer->CCSEventResult = CCGetEvent($this->Page_Footer->CCSEvents, "BeforeShow", $this->Page_Footer);
if ($this->Page_Footer->Visible) {
$Tpl->block_path = $ParentPath . "/" . $ReportBlock . "/Section Page_Footer";
$this->Report_CurrentDate->Show();
$this->Navigator->Show();
$this->PageBreak->Show();
$this->Attributes->Show();
$Tpl->block_path = $ParentPath . "/" . $ReportBlock;
$Tpl->parseto("Section Page_Footer", true, "Section Detail");
}
}
break;
}
$i++;
} while ($i < count($items) && ($this->ViewMode == "Print" || !($i > 1 && $items[$i]->GroupType == 'Page' && $items[$i]->Mode == 1)));
$Tpl->block_path = $ParentPath;
$Tpl->parse($ReportBlock);
$this->DataSource->close();
}
}
//End Show Method
} //End Report1 Class @58-FCB6E20C
class clsReport1DataSource extends clsDBCoopWorksConn { //Report1DataSource Class @58-BCC4E5C8
//DataSource Variables @58-9569A591
var $Parent = "";
var $CCSEvents = "";
var $CCSEventResult;
var $ErrorBlock;
var $CmdExecution;
// Datasource fields
var $DNNBR;
var $CustID;
var $CustRefNbr;
var $TranDate;
var $CANID;
var $Shift;
var $Qty;
var $ReportLabel1;
var $Confirmed;
var $descr;
var $TotalSum_Qty;
//End DataSource Variables
//DataSourceClass_Initialize Event @58-BB094BF3
function clsReport1DataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Report Report1";
$this->Initialize();
$this->DNNBR = new clsField("DNNBR", ccsText, "");
$this->CustID = new clsField("CustID", ccsText, "");
$this->CustRefNbr = new clsField("CustRefNbr", ccsText, "");
$this->TranDate = new clsField("TranDate", ccsDate, $this->DateFormat);
$this->CANID = new clsField("CANID", ccsText, "");
$this->Shift = new clsField("Shift", ccsText, "");
$this->Qty = new clsField("Qty", ccsFloat, "");
$this->ReportLabel1 = new clsField("ReportLabel1", ccsText, "");
$this->Confirmed = new clsField("Confirmed", ccsBoolean, $this->BooleanFormat);
$this->descr = new clsField("descr", ccsText, "");
$this->TotalSum_Qty = new clsField("TotalSum_Qty", ccsFloat, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @58-610CC937
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
array("Sorter2" => array("TranDate", ""),
"Sorter3" => array("CANID", ""),
"Sorter4" => array("Qty", "")));
}
//End SetOrder Method
//Prepare Method @58-14D6CD9D
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
}
//End Prepare Method
//Open Method @58-2E9ED213
function Open()
{
$this->cp["startdate"] = new clsSQLParameter("urlstartdate", ccsDate, array("mm", "/", "dd", "/", "yyyy"), $this->DateFormat, CCGetFromGet("startdate", NULL), "", false, $this->ErrorBlock);
$this->cp["enddate"] = new clsSQLParameter("urlenddate", ccsDate, array("mm", "/", "dd", "/", "yyyy"), $this->DateFormat, CCGetFromGet("enddate", NULL), "", false, $this->ErrorBlock);
$this->cp["Xrouteid"] = new clsSQLParameter("urlrouteid", ccsText, "", "", CCGetFromGet("routeid", NULL), "", false, $this->ErrorBlock);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->SQL = "CALL ML_Maindelivery_Rejects_List (" . $this->ToSQL($this->cp["startdate"]->GetDBValue(), $this->cp["startdate"]->DataType) . ", "
. $this->ToSQL($this->cp["enddate"]->GetDBValue(), $this->cp["enddate"]->DataType) . ", "
. $this->ToSQL($this->cp["Xrouteid"]->GetDBValue(), $this->cp["Xrouteid"]->DataType) . ");";
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect", $this->Parent);
$this->query($this->SQL);
$this->RecordsCount = "CCS not counted";
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect", $this->Parent);
if ($this->Errors->count()) return false;
}
//End Open Method
//SetValues Method @58-F7BB28C5
function SetValues()
{
$this->DNNBR->SetDBValue($this->f("DNNBR"));
$this->CustID->SetDBValue($this->f("name"));
$this->CustRefNbr->SetDBValue($this->f("CustRefNbr"));
$this->TranDate->SetDBValue(trim($this->f("TranDate")));
$this->CANID->SetDBValue($this->f("CANID"));
$this->Shift->SetDBValue($this->f("Shift"));
$this->Qty->SetDBValue(trim($this->f("Qty")));
$this->ReportLabel1->SetDBValue($this->f("Reason"));
$this->Confirmed->SetDBValue(trim($this->f("Confirmed")));
$this->descr->SetDBValue($this->f("descr"));
$this->TotalSum_Qty->SetDBValue(trim($this->f("Qty")));
}
//End SetValues Method
} //End Report1DataSource Class @58-FCB6E20C
//Initialize Page @1-96B17D44
// Variables
$FileName = "";
$Redirect = "";
$Tpl = "";
$TemplateFileName = "";
$BlockToParse = "";
$ComponentName = "";
$Attributes = "";
// Events;
$CCSEvents = "";
$CCSEventResult = "";
$FileName = FileName;
$Redirect = "";
$TemplateFileName = "ML_Maindelivery_Rejects_List.html";
$BlockToParse = "main";
$TemplateEncoding = "UTF-8";
$ContentType = "text/html";
$PathToRoot = "./";
$Charset = $Charset ? $Charset : "utf-8";
//End Initialize Page
//Authenticate User @1-872FD3D7
CCSecurityRedirect("", "");
//End Authenticate User
//Before Initialize @1-E870CEBC
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeInitialize", $MainPage);
//End Before Initialize
//Initialize Objects @1-DA0D73BF
$DBCoopWorksConn = new clsDBCoopWorksConn();
$MainPage->Connections["CoopWorksConn"] = & $DBCoopWorksConn;
$Attributes = new clsAttributes("page:");
$MainPage->Attributes = & $Attributes;
// Controls
$NewRecord1 = & new clsRecordNewRecord1("", $MainPage);
$Report1 = & new clsReportReport1("", $MainPage);
$MainPage->NewRecord1 = & $NewRecord1;
$MainPage->Report1 = & $Report1;
$Report1->Initialize();
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize", $MainPage);
if ($Charset) {
header("Content-Type: " . $ContentType . "; charset=" . $Charset);
} else {
header("Content-Type: " . $ContentType);
}
//End Initialize Objects
//Initialize HTML Template @1-A06E9207
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView", $MainPage);
$Tpl = new clsTemplate($FileEncoding, $TemplateEncoding);
$Tpl->LoadTemplate(PathToCurrentPage . $TemplateFileName, $BlockToParse, "UTF-8", "replace");
$Tpl->block_path = "/$BlockToParse";
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow", $MainPage);
$Attributes->SetValue("pathToRoot", "");
$Attributes->Show();
//End Initialize HTML Template
//Execute Components @1-A09052E6
$NewRecord1->Operation();
//End Execute Components
//Go to destination page @1-9808D01F
if($Redirect)
{
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
$DBCoopWorksConn->close();
header("Location: " . $Redirect);
unset($NewRecord1);
unset($Report1);
unset($Tpl);
exit;
}
//End Go to destination page
//Show Page @1-3745E581
$NewRecord1->Show();
$Report1->Show();
$Tpl->block_path = "";
$Tpl->Parse($BlockToParse, false);
if (!isset($main_block)) $main_block = $Tpl->GetVar($BlockToParse);
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeOutput", $MainPage);
if ($CCSEventResult) echo $main_block;
//End Show Page
//Unload Page @1-348C608D
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
$DBCoopWorksConn->close();
unset($NewRecord1);
unset($Report1);
unset($Tpl);
//End Unload Page
?>