Viewing file: statistika_list2.php (21.57 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php //Include Common Files @1-2DF9D91A define("RelativePath", "."); define("PathToCurrentPage", "/"); define("FileName", "statistika_list2.php"); include(RelativePath . "/Common.php"); include(RelativePath . "/Template.php"); include(RelativePath . "/Sorter.php"); include(RelativePath . "/Navigator.php"); //End Include Common Files
//Include Page implementation @43-3DD2EFDC include_once(RelativePath . "/Header.php"); //End Include Page implementation
class clsGridmail_log { //mail_log class @37-C2DF2A64
//Variables @37-400C034D
// Public variables public $ComponentType = "Grid"; public $ComponentName; public $Visible; public $Errors; public $ErrorBlock; public $ds; public $DataSource; public $PageSize; public $IsEmpty; public $ForceIteration = false; public $HasRecord = false; public $SorterName = ""; public $SorterDirection = ""; public $PageNumber; public $RowNumber; public $ControlsVisible = array();
public $CCSEvents = ""; public $CCSEventResult;
public $RelativePath = ""; public $Attributes;
// Grid Controls public $StaticControls; public $RowControls; public $Sorter_date; public $Sorter_email_log; //End Variables
//Class_Initialize Event @37-553184C7 function clsGridmail_log($RelativePath, & $Parent) { global $FileName; global $CCSLocales; global $DefaultDateFormat; $this->ComponentName = "mail_log"; $this->Visible = True; $this->Parent = & $Parent; $this->RelativePath = $RelativePath; $this->Errors = new clsErrors(); $this->ErrorBlock = "Grid mail_log"; $this->Attributes = new clsAttributes($this->ComponentName . ":"); $this->DataSource = new clsmail_logDataSource($this); $this->ds = & $this->DataSource; $this->PageSize = CCGetParam($this->ComponentName . "PageSize", ""); if(!is_numeric($this->PageSize) || !strlen($this->PageSize)) $this->PageSize = 100; else $this->PageSize = intval($this->PageSize); if ($this->PageSize > 100) $this->PageSize = 100; if($this->PageSize == 0) $this->Errors->addError("<p>Form: Grid " . $this->ComponentName . "<br>Error: (CCS06) Invalid page size.</p>"); $this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1)); if ($this->PageNumber <= 0) $this->PageNumber = 1; $this->SorterName = CCGetParam("mail_logOrder", ""); $this->SorterDirection = CCGetParam("mail_logDir", "");
$this->date = new clsControl(ccsLabel, "date", "date", ccsDate, array("GeneralDate"), CCGetRequestParam("date", ccsGet, NULL), $this); $this->email_log = new clsControl(ccsLabel, "email_log", "email_log", ccsText, "", CCGetRequestParam("email_log", ccsGet, NULL), $this); $this->Label1 = new clsControl(ccsLabel, "Label1", "Label1", ccsText, "", CCGetRequestParam("Label1", ccsGet, NULL), $this); $this->Sorter_date = new clsSorter($this->ComponentName, "Sorter_date", $FileName, $this); $this->Sorter_email_log = new clsSorter($this->ComponentName, "Sorter_email_log", $FileName, $this); $this->Navigator = new clsNavigator($this->ComponentName, "Navigator", $FileName, 10, tpCentered, $this); } //End Class_Initialize Event
//Initialize Method @37-90E704C5 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
//Show Method @37-8971E63D function Show() { global $Tpl; global $CCSLocales; if(!$this->Visible) return;
$this->RowNumber = 0;
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this);
$this->DataSource->Prepare(); $this->DataSource->Open(); $this->HasRecord = $this->DataSource->has_next_record(); $this->IsEmpty = ! $this->HasRecord; $this->Attributes->Show();
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this); if(!$this->Visible) return;
$GridBlock = "Grid " . $this->ComponentName; $ParentPath = $Tpl->block_path; $Tpl->block_path = $ParentPath . "/" . $GridBlock;
if (!$this->IsEmpty) { $this->ControlsVisible["date"] = $this->date->Visible; $this->ControlsVisible["email_log"] = $this->email_log->Visible; $this->ControlsVisible["Label1"] = $this->Label1->Visible; while ($this->ForceIteration || (($this->RowNumber < $this->PageSize) && ($this->HasRecord = $this->DataSource->has_next_record()))) { // Parse Separator if($this->RowNumber) { $this->Attributes->Show(); $Tpl->parseto("Separator", true, "Row"); } $this->RowNumber++; if ($this->HasRecord) { $this->DataSource->next_record(); $this->DataSource->SetValues(); } $Tpl->block_path = $ParentPath . "/" . $GridBlock . "/Row"; $this->date->SetValue($this->DataSource->date->GetValue()); $this->email_log->SetValue($this->DataSource->email_log->GetValue()); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this); $this->Attributes->Show(); $this->date->Show(); $this->email_log->Show(); $this->Label1->Show(); $Tpl->block_path = $ParentPath . "/" . $GridBlock; $Tpl->parse("Row", true); } } else { // Show NoRecords block if no records are found $this->Attributes->Show(); $Tpl->parse("NoRecords", false); }
$errors = $this->GetErrors(); if(strlen($errors)) { $Tpl->replaceblock("", $errors); $Tpl->block_path = $ParentPath; return; } $this->Navigator->PageNumber = $this->DataSource->AbsolutePage; if ($this->DataSource->RecordsCount == "CCS not counted") $this->Navigator->TotalPages = $this->DataSource->AbsolutePage + ($this->DataSource->next_record() ? 1 : 0); else $this->Navigator->TotalPages = $this->DataSource->PageCount(); $this->Sorter_date->Show(); $this->Sorter_email_log->Show(); $this->Navigator->Show(); $Tpl->parse(); $Tpl->block_path = $ParentPath; $this->DataSource->close(); } //End Show Method
//GetErrors Method @37-CE2FD806 function GetErrors() { $errors = ""; $errors = ComposeStrings($errors, $this->date->Errors->ToString()); $errors = ComposeStrings($errors, $this->email_log->Errors->ToString()); $errors = ComposeStrings($errors, $this->Label1->Errors->ToString()); $errors = ComposeStrings($errors, $this->Errors->ToString()); $errors = ComposeStrings($errors, $this->DataSource->Errors->ToString()); return $errors; } //End GetErrors Method
} //End mail_log Class @37-FCB6E20C
class clsmail_logDataSource extends clsDBConnection1 { //mail_logDataSource Class @37-65DCAB6E
//DataSource Variables @37-0AC59450 public $Parent = ""; public $CCSEvents = ""; public $CCSEventResult; public $ErrorBlock; public $CmdExecution;
public $CountSQL; public $wp;
// Datasource fields public $date; public $email_log; //End DataSource Variables
//DataSourceClass_Initialize Event @37-73968068 function clsmail_logDataSource(& $Parent) { $this->Parent = & $Parent; $this->ErrorBlock = "Grid mail_log"; $this->Initialize(); $this->date = new clsField("date", ccsDate, array("yyyy", "-", "mm", "-", "dd", " ", "HH", ":", "nn", ":", "ss")); $this->email_log = new clsField("email_log", ccsText, "");
} //End DataSourceClass_Initialize Event
//SetOrder Method @37-E821F963 function SetOrder($SorterName, $SorterDirection) { $this->Order = "date desc"; $this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection, array("Sorter_date" => array("date", ""), "Sorter_email_log" => array("email_log", ""))); } //End SetOrder Method
//Prepare Method @37-14D6CD9D function Prepare() { global $CCSLocales; global $DefaultDateFormat; } //End Prepare Method
//Open Method @37-47A2C4BA function Open() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent); $this->CountSQL = "SELECT COUNT(*)\n\n" . "FROM mail_log"; $this->SQL = "SELECT * \n\n" . "FROM mail_log {SQL_Where} {SQL_OrderBy}"; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect", $this->Parent); if ($this->CountSQL) $this->RecordsCount = CCGetDBValue(CCBuildSQL($this->CountSQL, $this->Where, ""), $this); else $this->RecordsCount = "CCS not counted"; $this->query($this->OptimizeSQL(CCBuildSQL($this->SQL, $this->Where, $this->Order))); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect", $this->Parent); } //End Open Method
//SetValues Method @37-BED050AB function SetValues() { $this->date->SetDBValue(trim($this->f("date"))); $this->email_log->SetDBValue($this->f("email_log")); } //End SetValues Method
} //End mail_logDataSource Class @37-FCB6E20C
class clsGridmail_spool { //mail_spool class @46-5BC7A814
//Variables @46-58275B07
// Public variables public $ComponentType = "Grid"; public $ComponentName; public $Visible; public $Errors; public $ErrorBlock; public $ds; public $DataSource; public $PageSize; public $IsEmpty; public $ForceIteration = false; public $HasRecord = false; public $SorterName = ""; public $SorterDirection = ""; public $PageNumber; public $RowNumber; public $ControlsVisible = array();
public $CCSEvents = ""; public $CCSEventResult;
public $RelativePath = ""; public $Attributes;
// Grid Controls public $StaticControls; public $RowControls; public $Sorter_primalac; public $Sorter_fajl; //End Variables
//Class_Initialize Event @46-22424BF5 function clsGridmail_spool($RelativePath, & $Parent) { global $FileName; global $CCSLocales; global $DefaultDateFormat; $this->ComponentName = "mail_spool"; $this->Visible = True; $this->Parent = & $Parent; $this->RelativePath = $RelativePath; $this->Errors = new clsErrors(); $this->ErrorBlock = "Grid mail_spool"; $this->Attributes = new clsAttributes($this->ComponentName . ":"); $this->DataSource = new clsmail_spoolDataSource($this); $this->ds = & $this->DataSource; $this->PageSize = CCGetParam($this->ComponentName . "PageSize", ""); if(!is_numeric($this->PageSize) || !strlen($this->PageSize)) $this->PageSize = 300; else $this->PageSize = intval($this->PageSize); if ($this->PageSize > 400) $this->PageSize = 400; if($this->PageSize == 0) $this->Errors->addError("<p>Form: Grid " . $this->ComponentName . "<br>Error: (CCS06) Invalid page size.</p>"); $this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1)); if ($this->PageNumber <= 0) $this->PageNumber = 1; $this->SorterName = CCGetParam("mail_spoolOrder", ""); $this->SorterDirection = CCGetParam("mail_spoolDir", "");
$this->primalac = new clsControl(ccsLabel, "primalac", "primalac", ccsText, "", CCGetRequestParam("primalac", ccsGet, NULL), $this); $this->fajl = new clsControl(ccsLabel, "fajl", "fajl", ccsText, "", CCGetRequestParam("fajl", ccsGet, NULL), $this); $this->subject = new clsControl(ccsLabel, "subject", "subject", ccsMemo, "", CCGetRequestParam("subject", ccsGet, NULL), $this); $this->text = new clsControl(ccsLabel, "text", "text", ccsMemo, "", CCGetRequestParam("text", ccsGet, NULL), $this); $this->Sorter_primalac = new clsSorter($this->ComponentName, "Sorter_primalac", $FileName, $this); $this->Sorter_fajl = new clsSorter($this->ComponentName, "Sorter_fajl", $FileName, $this); $this->Navigator = new clsNavigator($this->ComponentName, "Navigator", $FileName, 10, tpCentered, $this); } //End Class_Initialize Event
//Initialize Method @46-90E704C5 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
//Show Method @46-26FA533A function Show() { global $Tpl; global $CCSLocales; if(!$this->Visible) return;
$this->RowNumber = 0;
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this);
$this->DataSource->Prepare(); $this->DataSource->Open(); $this->HasRecord = $this->DataSource->has_next_record(); $this->IsEmpty = ! $this->HasRecord; $this->Attributes->Show();
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this); if(!$this->Visible) return;
$GridBlock = "Grid " . $this->ComponentName; $ParentPath = $Tpl->block_path; $Tpl->block_path = $ParentPath . "/" . $GridBlock;
if (!$this->IsEmpty) { $this->ControlsVisible["primalac"] = $this->primalac->Visible; $this->ControlsVisible["fajl"] = $this->fajl->Visible; while ($this->ForceIteration || (($this->RowNumber < $this->PageSize) && ($this->HasRecord = $this->DataSource->has_next_record()))) { $this->RowNumber++; if ($this->HasRecord) { $this->DataSource->next_record(); $this->DataSource->SetValues(); } $Tpl->block_path = $ParentPath . "/" . $GridBlock . "/Row"; $this->primalac->SetValue($this->DataSource->primalac->GetValue()); $this->fajl->SetValue($this->DataSource->fajl->GetValue()); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this); $this->Attributes->Show(); $this->primalac->Show(); $this->fajl->Show(); $Tpl->block_path = $ParentPath . "/" . $GridBlock; $Tpl->parse("Row", true); } } else { // Show NoRecords block if no records are found $this->Attributes->Show(); $Tpl->parse("NoRecords", false); }
$errors = $this->GetErrors(); if(strlen($errors)) { $Tpl->replaceblock("", $errors); $Tpl->block_path = $ParentPath; return; } $this->subject->SetValue($this->DataSource->subject->GetValue()); $this->text->SetValue($this->DataSource->text->GetValue()); $this->Navigator->PageNumber = $this->DataSource->AbsolutePage; if ($this->DataSource->RecordsCount == "CCS not counted") $this->Navigator->TotalPages = $this->DataSource->AbsolutePage + ($this->DataSource->next_record() ? 1 : 0); else $this->Navigator->TotalPages = $this->DataSource->PageCount(); $this->subject->Show(); $this->text->Show(); $this->Sorter_primalac->Show(); $this->Sorter_fajl->Show(); $this->Navigator->Show(); $Tpl->parse(); $Tpl->block_path = $ParentPath; $this->DataSource->close(); } //End Show Method
//GetErrors Method @46-CBA34BF1 function GetErrors() { $errors = ""; $errors = ComposeStrings($errors, $this->primalac->Errors->ToString()); $errors = ComposeStrings($errors, $this->fajl->Errors->ToString()); $errors = ComposeStrings($errors, $this->Errors->ToString()); $errors = ComposeStrings($errors, $this->DataSource->Errors->ToString()); return $errors; } //End GetErrors Method
} //End mail_spool Class @46-FCB6E20C
class clsmail_spoolDataSource extends clsDBConnection1 { //mail_spoolDataSource Class @46-C219A753
//DataSource Variables @46-E3E14691 public $Parent = ""; public $CCSEvents = ""; public $CCSEventResult; public $ErrorBlock; public $CmdExecution;
public $CountSQL; public $wp;
// Datasource fields public $subject; public $text; public $primalac; public $fajl; //End DataSource Variables
//DataSourceClass_Initialize Event @46-33B28097 function clsmail_spoolDataSource(& $Parent) { $this->Parent = & $Parent; $this->ErrorBlock = "Grid mail_spool"; $this->Initialize(); $this->subject = new clsField("subject", ccsMemo, ""); $this->text = new clsField("text", ccsMemo, ""); $this->primalac = new clsField("primalac", ccsText, ""); $this->fajl = new clsField("fajl", ccsText, "");
} //End DataSourceClass_Initialize Event
//SetOrder Method @46-FDD54710 function SetOrder($SorterName, $SorterDirection) { $this->Order = ""; $this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection, array("Sorter_primalac" => array("primalac", ""), "Sorter_fajl" => array("fajl", ""))); } //End SetOrder Method
//Prepare Method @46-14D6CD9D function Prepare() { global $CCSLocales; global $DefaultDateFormat; } //End Prepare Method
//Open Method @46-01209EE3 function Open() { $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent); $this->CountSQL = "SELECT COUNT(*)\n\n" . "FROM mail_spool"; $this->SQL = "SELECT * \n\n" . "FROM mail_spool {SQL_Where} {SQL_OrderBy}"; $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect", $this->Parent); if ($this->CountSQL) $this->RecordsCount = CCGetDBValue(CCBuildSQL($this->CountSQL, $this->Where, ""), $this); else $this->RecordsCount = "CCS not counted"; $this->query($this->OptimizeSQL(CCBuildSQL($this->SQL, $this->Where, $this->Order))); $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect", $this->Parent); } //End Open Method
//SetValues Method @46-516D8B40 function SetValues() { $this->subject->SetDBValue($this->f("subject")); $this->text->SetDBValue($this->f("text")); $this->primalac->SetDBValue($this->f("primalac")); $this->fajl->SetDBValue($this->f("fajl")); } //End SetValues Method
} //End mail_spoolDataSource Class @46-FCB6E20C
//Initialize Page @1-C2119FDA // Variables $FileName = ""; $Redirect = ""; $Tpl = ""; $TemplateFileName = ""; $BlockToParse = ""; $ComponentName = ""; $Attributes = "";
// Events; $CCSEvents = ""; $CCSEventResult = "";
$FileName = FileName; $Redirect = ""; $TemplateFileName = "statistika_list2.html"; $BlockToParse = "main"; $TemplateEncoding = "ISO-8859-1"; $PathToRoot = "./"; //End Initialize Page
//Authenticate User @1-DC94A87D CCSecurityRedirect("1", ""); //End Authenticate User
//Before Initialize @1-E870CEBC $CCSEventResult = CCGetEvent($CCSEvents, "BeforeInitialize", $MainPage); //End Before Initialize
//Initialize Objects @1-40AA865B $DBConnection1 = new clsDBConnection1(); $MainPage->Connections["Connection1"] = & $DBConnection1; $Attributes = new clsAttributes("page:"); $MainPage->Attributes = & $Attributes;
// Controls $Header = new clsHeader("", "Header", $MainPage); $Header->Initialize(); $mail_log = new clsGridmail_log("", $MainPage); $mail_spool = new clsGridmail_spool("", $MainPage); $MainPage->Header = & $Header; $MainPage->mail_log = & $mail_log; $MainPage->mail_spool = & $mail_spool; $mail_log->Initialize(); $mail_spool->Initialize();
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize", $MainPage);
$Charset = $Charset ? $Charset : "iso-8859-1"; if ($Charset) header("Content-Type: text/html; charset=" . $Charset); //End Initialize Objects
//Initialize HTML Template @1-A8C4B9DA $CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView", $MainPage); $Tpl = new clsTemplate($FileEncoding, $TemplateEncoding); $Tpl->LoadTemplate(PathToCurrentPage . $TemplateFileName, $BlockToParse, "ISO-8859-1"); $Tpl->block_path = "/$BlockToParse"; $CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow", $MainPage); $Attributes->Show(); //End Initialize HTML Template
//Execute Components @1-47111282 $Header->Operations(); //End Execute Components
//Go to destination page @1-A294C52B if($Redirect) { $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage); $DBConnection1->close(); header("Location: " . $Redirect); $Header->Class_Terminate(); unset($Header); unset($mail_log); unset($mail_spool); unset($Tpl); exit; } //End Go to destination page
//Show Page @1-72C94014 $Header->Show(); $mail_log->Show(); $mail_spool->Show(); $Tpl->block_path = ""; $Tpl->Parse($BlockToParse, false); $main_block = $Tpl->GetVar($BlockToParse); $CCSEventResult = CCGetEvent($CCSEvents, "BeforeOutput", $MainPage); if ($CCSEventResult) echo $main_block; //End Show Page
//Unload Page @1-ED5C5FAE $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage); $DBConnection1->close(); $Header->Class_Terminate(); unset($Header); unset($mail_log); unset($mail_spool); unset($Tpl); //End Unload Page
?>
|