ComponentName = "tb_services";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_services";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_servicesDataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 1;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100)
$this->PageSize = 100;
if($this->PageSize == 0)
$this->Errors->addError("
Form: Grid " . $this->ComponentName . "
Error: (CCS06) Invalid page size.
");
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0) $this->PageNumber = 1;
$this->RowOpenTag = new clsPanel("RowOpenTag", $this);
$this->RowComponents = new clsPanel("RowComponents", $this);
$this->topheader = new clsControl(ccsImage, "topheader", "topheader", ccsText, "", CCGetRequestParam("topheader", ccsGet, NULL), $this);
$this->title = new clsControl(ccsLabel, "title", "title", ccsText, "", CCGetRequestParam("title", ccsGet, NULL), $this);
$this->picture = new clsControl(ccsImage, "picture", "picture", ccsText, "", CCGetRequestParam("picture", ccsGet, NULL), $this);
$this->caption = new clsControl(ccsLabel, "caption", "caption", ccsText, "", CCGetRequestParam("caption", ccsGet, NULL), $this);
$this->dicon = new clsControl(ccsImageLink, "dicon", "dicon", ccsText, "", CCGetRequestParam("dicon", ccsGet, NULL), $this);
$this->Link1 = new clsControl(ccsLink, "Link1", "Link1", ccsText, "", CCGetRequestParam("Link1", ccsGet, NULL), $this);
$this->Label1 = new clsControl(ccsLabel, "Label1", "Label1", ccsText, "", CCGetRequestParam("Label1", ccsGet, NULL), $this);
$this->RowCloseTag = new clsPanel("RowCloseTag", $this);
$this->RowComponents->AddComponent("topheader", $this->topheader);
$this->RowComponents->AddComponent("title", $this->title);
$this->RowComponents->AddComponent("picture", $this->picture);
$this->RowComponents->AddComponent("caption", $this->caption);
$this->RowComponents->AddComponent("dicon", $this->dicon);
$this->RowComponents->AddComponent("Link1", $this->Link1);
$this->RowComponents->AddComponent("Label1", $this->Label1);
}
//End Class_Initialize Event
//Initialize Method @51-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 @51-ABCAC8AF
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["urlservice_id"] = CCGetFromGet("service_id", NULL);
$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->SetValue("numberOfColumns", 1);
$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["RowOpenTag"] = $this->RowOpenTag->Visible;
$this->ControlsVisible["RowComponents"] = $this->RowComponents->Visible;
$this->ControlsVisible["topheader"] = $this->topheader->Visible;
$this->ControlsVisible["title"] = $this->title->Visible;
$this->ControlsVisible["picture"] = $this->picture->Visible;
$this->ControlsVisible["caption"] = $this->caption->Visible;
$this->ControlsVisible["dicon"] = $this->dicon->Visible;
$this->ControlsVisible["Link1"] = $this->Link1->Visible;
$this->ControlsVisible["Label1"] = $this->Label1->Visible;
$this->ControlsVisible["RowCloseTag"] = $this->RowCloseTag->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->topheader->SetValue($this->DataSource->topheader->GetValue());
$this->title->SetValue($this->DataSource->title->GetValue());
$this->picture->SetValue($this->DataSource->picture->GetValue());
$this->caption->SetValue($this->DataSource->caption->GetValue());
$this->dicon->SetValue($this->DataSource->dicon->GetValue());
$this->dicon->Page = $this->DataSource->f("ddoc");
$this->Link1->SetValue($this->DataSource->Link1->GetValue());
$this->Link1->Page = $this->DataSource->f("ddoc");
$this->Label1->SetValue($this->DataSource->Label1->GetValue());
$this->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->RowOpenTag->Show();
$this->RowComponents->Show();
$this->RowCloseTag->Show();
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
$Tpl->parse("Row", true);
}
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @51-EB5F31C4
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->topheader->Errors->ToString());
$errors = ComposeStrings($errors, $this->title->Errors->ToString());
$errors = ComposeStrings($errors, $this->picture->Errors->ToString());
$errors = ComposeStrings($errors, $this->caption->Errors->ToString());
$errors = ComposeStrings($errors, $this->dicon->Errors->ToString());
$errors = ComposeStrings($errors, $this->Link1->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 tb_services Class @51-FCB6E20C
class clstb_servicesDataSource extends clsDBeasy { //tb_servicesDataSource Class @51-8BB2B63C
//DataSource Variables @51-4D35763A
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $topheader;
public $title;
public $picture;
public $caption;
public $dicon;
public $Link1;
public $Label1;
//End DataSource Variables
//DataSourceClass_Initialize Event @51-F1D212CC
function clstb_servicesDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_services";
$this->Initialize();
$this->topheader = new clsField("topheader", ccsText, "");
$this->title = new clsField("title", ccsText, "");
$this->picture = new clsField("picture", ccsText, "");
$this->caption = new clsField("caption", ccsText, "");
$this->dicon = new clsField("dicon", ccsText, "");
$this->Link1 = new clsField("Link1", ccsText, "");
$this->Label1 = new clsField("Label1", ccsText, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @51-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @51-CE294606
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "urlservice_id", ccsInteger, "", "", $this->Parameters["urlservice_id"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "service_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
$this->Where =
$this->wp->Criterion[1];
}
//End Prepare Method
//Open Method @51-39B6934F
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM tb_services";
$this->SQL = "SELECT * \n\n" .
"FROM tb_services {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 @51-33611207
function SetValues()
{
$this->topheader->SetDBValue($this->f("topheader"));
$this->title->SetDBValue($this->f("title"));
$this->picture->SetDBValue($this->f("picture"));
$this->caption->SetDBValue($this->f("caption"));
$this->dicon->SetDBValue($this->f("dicon"));
$this->Link1->SetDBValue($this->f("dcaption"));
$this->Label1->SetDBValue($this->f("serviceinfo"));
}
//End SetValues Method
} //End tb_servicesDataSource Class @51-FCB6E20C
class clsGridtb_subservices { //tb_subservices class @64-D80BE143
//Variables @64-6E51DF5A
// 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;
//End Variables
//Class_Initialize Event @64-EDA4E798
function clsGridtb_subservices($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "tb_subservices";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_subservices";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_subservicesDataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 10;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100)
$this->PageSize = 100;
if($this->PageSize == 0)
$this->Errors->addError("Form: Grid " . $this->ComponentName . "
Error: (CCS06) Invalid page size.
");
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0) $this->PageNumber = 1;
$this->RowOpenTag = new clsPanel("RowOpenTag", $this);
$this->RowComponents = new clsPanel("RowComponents", $this);
$this->title = new clsControl(ccsLabel, "title", "title", ccsText, "", CCGetRequestParam("title", ccsGet, NULL), $this);
$this->picture = new clsControl(ccsImage, "picture", "picture", ccsText, "", CCGetRequestParam("picture", ccsGet, NULL), $this);
$this->description = new clsControl(ccsLabel, "description", "description", ccsText, "", CCGetRequestParam("description", ccsGet, NULL), $this);
$this->RowCloseTag = new clsPanel("RowCloseTag", $this);
$this->Navigator = new clsNavigator($this->ComponentName, "Navigator", $FileName, 10, tpCentered, $this);
$this->Navigator->PageSizes = array("1", "5", "10", "25", "50");
$this->RowComponents->AddComponent("title", $this->title);
$this->RowComponents->AddComponent("picture", $this->picture);
$this->RowComponents->AddComponent("description", $this->description);
}
//End Class_Initialize Event
//Initialize Method @64-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 @64-D9F421EB
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["urlproduct_id"] = CCGetFromGet("product_id", NULL);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this);
$this->DataSource->Prepare();
$this->DataSource->Open();
$this->HasRecord = $this->DataSource->has_next_record();
$this->IsEmpty = ! $this->HasRecord;
if ($this->DataSource->PageCount() <= 1) {
$this->Navigator->Visible = false;
}
$this->Attributes->SetValue("numberOfColumns", 1);
$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["RowOpenTag"] = $this->RowOpenTag->Visible;
$this->ControlsVisible["RowComponents"] = $this->RowComponents->Visible;
$this->ControlsVisible["title"] = $this->title->Visible;
$this->ControlsVisible["picture"] = $this->picture->Visible;
$this->ControlsVisible["description"] = $this->description->Visible;
$this->ControlsVisible["RowCloseTag"] = $this->RowCloseTag->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->title->SetValue($this->DataSource->title->GetValue());
$this->picture->SetValue($this->DataSource->picture->GetValue());
$this->description->SetValue($this->DataSource->description->GetValue());
$this->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->RowOpenTag->Show();
$this->RowComponents->Show();
$this->RowCloseTag->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;
$this->Navigator->PageSize = $this->PageSize;
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->Navigator->Show();
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @64-D690452A
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->title->Errors->ToString());
$errors = ComposeStrings($errors, $this->picture->Errors->ToString());
$errors = ComposeStrings($errors, $this->description->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End tb_subservices Class @64-FCB6E20C
class clstb_subservicesDataSource extends clsDBeasy { //tb_subservicesDataSource Class @64-1AF400F9
//DataSource Variables @64-F6771225
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $title;
public $picture;
public $description;
//End DataSource Variables
//DataSourceClass_Initialize Event @64-B7CC9BD1
function clstb_subservicesDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_subservices";
$this->Initialize();
$this->title = new clsField("title", ccsText, "");
$this->picture = new clsField("picture", ccsText, "");
$this->description = new clsField("description", ccsText, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @64-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @64-C2E64889
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "urlproduct_id", ccsInteger, "", "", $this->Parameters["urlproduct_id"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "product_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
$this->Where =
$this->wp->Criterion[1];
}
//End Prepare Method
//Open Method @64-873950E9
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM tb_subservices";
$this->SQL = "SELECT * \n\n" .
"FROM tb_subservices {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 @64-3B7E5286
function SetValues()
{
$this->title->SetDBValue($this->f("title"));
$this->picture->SetDBValue($this->f("picture"));
$this->description->SetDBValue($this->f("description"));
}
//End SetValues Method
} //End tb_subservicesDataSource Class @64-FCB6E20C
//Include Page implementation @95-80DD80B4
include_once(RelativePath . "/inc/header.php");
//End Include Page implementation
//Include Page implementation @5-E5D4CE8B
include_once(RelativePath . "/inc/footer.php");
//End Include Page implementation
class clsGridbg { //bg class @35-2689D52B
//Variables @35-6E51DF5A
// 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;
//End Variables
//Class_Initialize Event @35-807C668D
function clsGridbg($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "bg";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid bg";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clsbgDataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 1;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100)
$this->PageSize = 100;
if($this->PageSize == 0)
$this->Errors->addError("Form: Grid " . $this->ComponentName . "
Error: (CCS06) Invalid page size.
");
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0) $this->PageNumber = 1;
$this->snews = new clsControl(ccsHidden, "snews", "snews", ccsText, "", CCGetRequestParam("snews", ccsGet, NULL), $this);
}
//End Class_Initialize Event
//Initialize Method @35-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 @35-10FEC224
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["snews"] = $this->snews->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->snews->SetValue($this->DataSource->snews->GetValue());
$this->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->snews->Show();
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
$Tpl->parse("Row", true);
}
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @35-6E5E02F9
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->snews->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End bg Class @35-FCB6E20C
class clsbgDataSource extends clsDBeasy { //bgDataSource Class @35-44C11189
//DataSource Variables @35-9E76664F
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $snews;
//End DataSource Variables
//DataSourceClass_Initialize Event @35-E95BD331
function clsbgDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid bg";
$this->Initialize();
$this->snews = new clsField("snews", ccsText, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @35-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @35-14D6CD9D
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
}
//End Prepare Method
//Open Method @35-159108FA
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM db_bg";
$this->SQL = "SELECT * \n\n" .
"FROM db_bg {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 @35-F2FC20F4
function SetValues()
{
$this->snews->SetDBValue($this->f("snews"));
}
//End SetValues Method
} //End bgDataSource Class @35-FCB6E20C
//Include Page implementation @38-3E5A21C3
include_once(RelativePath . "/inc/news_inc.php");
//End Include Page implementation
class clsGridusers { //users class @96-0CB76799
//Variables @96-6E51DF5A
// 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;
//End Variables
//Class_Initialize Event @96-8F30ABD9
function clsGridusers($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "users";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid users";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clsusersDataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 1;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100)
$this->PageSize = 100;
if($this->PageSize == 0)
$this->Errors->addError("Form: Grid " . $this->ComponentName . "
Error: (CCS06) Invalid page size.
");
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0) $this->PageNumber = 1;
$this->group_id = new clsControl(ccsHidden, "group_id", "group_id", ccsInteger, "", CCGetRequestParam("group_id", ccsGet, NULL), $this);
}
//End Class_Initialize Event
//Initialize Method @96-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 @96-C44FCE3F
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["sesUserID"] = CCGetSession("UserID", NULL);
$this->DataSource->Parameters["sesUserLogin"] = CCGetSession("UserLogin", NULL);
$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["group_id"] = $this->group_id->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->group_id->SetValue($this->DataSource->group_id->GetValue());
$this->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->group_id->Show();
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
$Tpl->parse("Row", true);
}
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @96-21D9DDD8
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->group_id->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End users Class @96-FCB6E20C
class clsusersDataSource extends clsDBeasy { //usersDataSource Class @96-6A08F44A
//DataSource Variables @96-39BE6FA9
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $group_id;
//End DataSource Variables
//DataSourceClass_Initialize Event @96-737FCE65
function clsusersDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid users";
$this->Initialize();
$this->group_id = new clsField("group_id", ccsInteger, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @96-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @96-415563F6
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "sesUserID", ccsInteger, "", "", $this->Parameters["sesUserID"], 1, false);
$this->wp->AddParameter("2", "sesUserLogin", ccsText, "", "", $this->Parameters["sesUserLogin"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "login_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
$this->wp->Criterion[2] = $this->wp->Operation(opEqual, "username", $this->wp->GetDBValue("2"), $this->ToSQL($this->wp->GetDBValue("2"), ccsText),false);
$this->Where = $this->wp->opAND(
false,
$this->wp->Criterion[1],
$this->wp->Criterion[2]);
}
//End Prepare Method
//Open Method @96-7C828179
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM tb_users";
$this->SQL = "SELECT * \n\n" .
"FROM tb_users {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 @96-AD96E205
function SetValues()
{
$this->group_id->SetDBValue(trim($this->f("group_id")));
}
//End SetValues Method
} //End usersDataSource Class @96-FCB6E20C
class clsGridtb_c_users { //tb_c_users class @101-C6A005B9
//Variables @101-6E51DF5A
// 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;
//End Variables
//Class_Initialize Event @101-6AA0D3EB
function clsGridtb_c_users($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "tb_c_users";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_c_users";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_c_usersDataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 1;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100)
$this->PageSize = 100;
if($this->PageSize == 0)
$this->Errors->addError("Form: Grid " . $this->ComponentName . "
Error: (CCS06) Invalid page size.
");
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0) $this->PageNumber = 1;
$this->title = new clsControl(ccsLabel, "title", "title", ccsText, "", CCGetRequestParam("title", ccsGet, NULL), $this);
$this->firstname = new clsControl(ccsLabel, "firstname", "firstname", ccsText, "", CCGetRequestParam("firstname", ccsGet, NULL), $this);
$this->lastname = new clsControl(ccsLabel, "lastname", "lastname", ccsText, "", CCGetRequestParam("lastname", ccsGet, NULL), $this);
}
//End Class_Initialize Event
//Initialize Method @101-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 @101-4CE8DD34
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["sesUserID"] = CCGetSession("UserID", NULL);
$this->DataSource->Parameters["sesUserLogin"] = CCGetSession("UserLogin", NULL);
$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["title"] = $this->title->Visible;
$this->ControlsVisible["firstname"] = $this->firstname->Visible;
$this->ControlsVisible["lastname"] = $this->lastname->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->title->SetValue($this->DataSource->title->GetValue());
$this->firstname->SetValue($this->DataSource->firstname->GetValue());
$this->lastname->SetValue($this->DataSource->lastname->GetValue());
$this->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->title->Show();
$this->firstname->Show();
$this->lastname->Show();
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
$Tpl->parse("Row", true);
}
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @101-BB1D8C3F
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->title->Errors->ToString());
$errors = ComposeStrings($errors, $this->firstname->Errors->ToString());
$errors = ComposeStrings($errors, $this->lastname->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End tb_c_users Class @101-FCB6E20C
class clstb_c_usersDataSource extends clsDBeasy { //tb_c_usersDataSource Class @101-8BB191E6
//DataSource Variables @101-5761AFE8
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $title;
public $firstname;
public $lastname;
//End DataSource Variables
//DataSourceClass_Initialize Event @101-4DD5B477
function clstb_c_usersDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_c_users";
$this->Initialize();
$this->title = new clsField("title", ccsText, "");
$this->firstname = new clsField("firstname", ccsText, "");
$this->lastname = new clsField("lastname", ccsText, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @101-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @101-1B623775
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "sesUserID", ccsInteger, "", "", $this->Parameters["sesUserID"], "", false);
$this->wp->AddParameter("2", "sesUserLogin", ccsText, "", "", $this->Parameters["sesUserLogin"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "company_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
$this->wp->Criterion[2] = $this->wp->Operation(opEqual, "username", $this->wp->GetDBValue("2"), $this->ToSQL($this->wp->GetDBValue("2"), ccsText),false);
$this->Where = $this->wp->opAND(
false,
$this->wp->Criterion[1],
$this->wp->Criterion[2]);
}
//End Prepare Method
//Open Method @101-029B5027
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM tb_c_users";
$this->SQL = "SELECT * \n\n" .
"FROM tb_c_users {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 @101-E8413630
function SetValues()
{
$this->title->SetDBValue($this->f("title"));
$this->firstname->SetDBValue($this->f("firstname"));
$this->lastname->SetDBValue($this->f("lastname"));
}
//End SetValues Method
} //End tb_c_usersDataSource Class @101-FCB6E20C
class clsGridtb_cmps { //tb_cmps class @108-B8B89B31
//Variables @108-6E51DF5A
// 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;
//End Variables
//Class_Initialize Event @108-26024AC7
function clsGridtb_cmps($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "tb_cmps";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_cmps";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_cmpsDataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 1;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100)
$this->PageSize = 100;
if($this->PageSize == 0)
$this->Errors->addError("Form: Grid " . $this->ComponentName . "
Error: (CCS06) Invalid page size.
");
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0) $this->PageNumber = 1;
$this->account = new clsControl(ccsLabel, "account", "account", ccsFloat, array(False, 2, Null, Null, False, "", "", 1, True, ""), CCGetRequestParam("account", ccsGet, NULL), $this);
$this->Link2 = new clsControl(ccsLink, "Link2", "Link2", ccsText, "", CCGetRequestParam("Link2", ccsGet, NULL), $this);
$this->Link2->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$this->Link2->Page = "cm.php";
$this->company_name = new clsControl(ccsLabel, "company_name", "company_name", ccsText, "", CCGetRequestParam("company_name", ccsGet, NULL), $this);
}
//End Class_Initialize Event
//Initialize Method @108-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 @108-DE1528AA
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["sesUserID"] = CCGetSession("UserID", NULL);
$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["account"] = $this->account->Visible;
$this->ControlsVisible["Link2"] = $this->Link2->Visible;
$this->ControlsVisible["company_name"] = $this->company_name->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->account->SetValue($this->DataSource->account->GetValue());
$this->company_name->SetValue($this->DataSource->company_name->GetValue());
$this->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->account->Show();
$this->Link2->Show();
$this->company_name->Show();
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
$Tpl->parse("Row", true);
}
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @108-3D34B683
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->account->Errors->ToString());
$errors = ComposeStrings($errors, $this->Link2->Errors->ToString());
$errors = ComposeStrings($errors, $this->company_name->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End tb_cmps Class @108-FCB6E20C
class clstb_cmpsDataSource extends clsDBeasy { //tb_cmpsDataSource Class @108-C700919C
//DataSource Variables @108-D516B617
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $account;
public $company_name;
//End DataSource Variables
//DataSourceClass_Initialize Event @108-9C4A94D2
function clstb_cmpsDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_cmps";
$this->Initialize();
$this->account = new clsField("account", ccsFloat, "");
$this->company_name = new clsField("company_name", ccsText, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @108-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @108-77B5EED2
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "sesUserID", ccsInteger, "", "", $this->Parameters["sesUserID"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "company_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
$this->Where =
$this->wp->Criterion[1];
}
//End Prepare Method
//Open Method @108-7E2AB147
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM tb_companies";
$this->SQL = "SELECT mainaccount, company_name \n\n" .
"FROM tb_companies {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 @108-21FB612E
function SetValues()
{
$this->account->SetDBValue(trim($this->f("mainaccount")));
$this->company_name->SetDBValue($this->f("company_name"));
}
//End SetValues Method
} //End tb_cmpsDataSource Class @108-FCB6E20C
class clsGridtb_c_users4 { //tb_c_users4 class @116-D04FBFDE
//Variables @116-6E51DF5A
// 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;
//End Variables
//Class_Initialize Event @116-3BADB566
function clsGridtb_c_users4($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "tb_c_users4";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_c_users4";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_c_users4DataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 1;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100)
$this->PageSize = 100;
if($this->PageSize == 0)
$this->Errors->addError("Form: Grid " . $this->ComponentName . "
Error: (CCS06) Invalid page size.
");
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0) $this->PageNumber = 1;
$this->account = new clsControl(ccsLabel, "account", "account", ccsFloat, array(False, 2, Null, Null, False, "", "", 1, True, ""), CCGetRequestParam("account", ccsGet, NULL), $this);
$this->cmlogout = new clsControl(ccsLink, "cmlogout", "cmlogout", ccsText, "", CCGetRequestParam("cmlogout", ccsGet, NULL), $this);
$this->cmlogout->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$this->cmlogout->Page = "logout.php";
$this->culink1 = new clsControl(ccsLink, "culink1", "culink1", ccsText, "", CCGetRequestParam("culink1", ccsGet, NULL), $this);
$this->culink1->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$this->culink1->Page = "cu.php";
}
//End Class_Initialize Event
//Initialize Method @116-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 @116-87660EBC
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["sesUserID"] = CCGetSession("UserID", NULL);
$this->DataSource->Parameters["sesUserLogin"] = CCGetSession("UserLogin", NULL);
$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["account"] = $this->account->Visible;
$this->ControlsVisible["cmlogout"] = $this->cmlogout->Visible;
$this->ControlsVisible["culink1"] = $this->culink1->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->account->SetValue($this->DataSource->account->GetValue());
$this->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->account->Show();
$this->cmlogout->Show();
$this->culink1->Show();
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
$Tpl->parse("Row", true);
}
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @116-711765E5
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->account->Errors->ToString());
$errors = ComposeStrings($errors, $this->cmlogout->Errors->ToString());
$errors = ComposeStrings($errors, $this->culink1->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End tb_c_users4 Class @116-FCB6E20C
class clstb_c_users4DataSource extends clsDBeasy { //tb_c_users4DataSource Class @116-628BCB1F
//DataSource Variables @116-FE2D95B7
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $account;
//End DataSource Variables
//DataSourceClass_Initialize Event @116-9C64EF24
function clstb_c_users4DataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_c_users4";
$this->Initialize();
$this->account = new clsField("account", ccsFloat, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @116-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @116-1B623775
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "sesUserID", ccsInteger, "", "", $this->Parameters["sesUserID"], "", false);
$this->wp->AddParameter("2", "sesUserLogin", ccsText, "", "", $this->Parameters["sesUserLogin"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "company_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
$this->wp->Criterion[2] = $this->wp->Operation(opEqual, "username", $this->wp->GetDBValue("2"), $this->ToSQL($this->wp->GetDBValue("2"), ccsText),false);
$this->Where = $this->wp->opAND(
false,
$this->wp->Criterion[1],
$this->wp->Criterion[2]);
}
//End Prepare Method
//Open Method @116-A4DD3956
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM tb_c_users";
$this->SQL = "SELECT account \n\n" .
"FROM tb_c_users {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 @116-CFD21D2E
function SetValues()
{
$this->account->SetDBValue(trim($this->f("account")));
}
//End SetValues Method
} //End tb_c_users4DataSource Class @116-FCB6E20C
class clsGridtb_c_users1 { //tb_c_users1 class @151-AD384B9B
//Variables @151-6E51DF5A
// 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;
//End Variables
//Class_Initialize Event @151-42B56D66
function clsGridtb_c_users1($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "tb_c_users1";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_c_users1";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_c_users1DataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 1;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100)
$this->PageSize = 100;
if($this->PageSize == 0)
$this->Errors->addError("Form: Grid " . $this->ComponentName . "
Error: (CCS06) Invalid page size.
");
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0) $this->PageNumber = 1;
$this->title = new clsControl(ccsLabel, "title", "title", ccsText, "", CCGetRequestParam("title", ccsGet, NULL), $this);
$this->firstname = new clsControl(ccsLabel, "firstname", "firstname", ccsText, "", CCGetRequestParam("firstname", ccsGet, NULL), $this);
$this->lastname = new clsControl(ccsLabel, "lastname", "lastname", ccsText, "", CCGetRequestParam("lastname", ccsGet, NULL), $this);
}
//End Class_Initialize Event
//Initialize Method @151-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 @151-4CE8DD34
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["sesUserID"] = CCGetSession("UserID", NULL);
$this->DataSource->Parameters["sesUserLogin"] = CCGetSession("UserLogin", NULL);
$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["title"] = $this->title->Visible;
$this->ControlsVisible["firstname"] = $this->firstname->Visible;
$this->ControlsVisible["lastname"] = $this->lastname->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->title->SetValue($this->DataSource->title->GetValue());
$this->firstname->SetValue($this->DataSource->firstname->GetValue());
$this->lastname->SetValue($this->DataSource->lastname->GetValue());
$this->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->title->Show();
$this->firstname->Show();
$this->lastname->Show();
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
$Tpl->parse("Row", true);
}
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @151-BB1D8C3F
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->title->Errors->ToString());
$errors = ComposeStrings($errors, $this->firstname->Errors->ToString());
$errors = ComposeStrings($errors, $this->lastname->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End tb_c_users1 Class @151-FCB6E20C
class clstb_c_users1DataSource extends clsDBeasy { //tb_c_users1DataSource Class @151-65E9C276
//DataSource Variables @151-5761AFE8
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $title;
public $firstname;
public $lastname;
//End DataSource Variables
//DataSourceClass_Initialize Event @151-1F02BE72
function clstb_c_users1DataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_c_users1";
$this->Initialize();
$this->title = new clsField("title", ccsText, "");
$this->firstname = new clsField("firstname", ccsText, "");
$this->lastname = new clsField("lastname", ccsText, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @151-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @151-1B623775
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "sesUserID", ccsInteger, "", "", $this->Parameters["sesUserID"], "", false);
$this->wp->AddParameter("2", "sesUserLogin", ccsText, "", "", $this->Parameters["sesUserLogin"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "company_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
$this->wp->Criterion[2] = $this->wp->Operation(opEqual, "username", $this->wp->GetDBValue("2"), $this->ToSQL($this->wp->GetDBValue("2"), ccsText),false);
$this->Where = $this->wp->opAND(
false,
$this->wp->Criterion[1],
$this->wp->Criterion[2]);
}
//End Prepare Method
//Open Method @151-029B5027
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM tb_c_users";
$this->SQL = "SELECT * \n\n" .
"FROM tb_c_users {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 @151-E8413630
function SetValues()
{
$this->title->SetDBValue($this->f("title"));
$this->firstname->SetDBValue($this->f("firstname"));
$this->lastname->SetDBValue($this->f("lastname"));
}
//End SetValues Method
} //End tb_c_users1DataSource Class @151-FCB6E20C
class clsGridtb_c_users2 { //tb_c_users2 class @158-86151858
//Variables @158-6E51DF5A
// 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;
//End Variables
//Class_Initialize Event @158-0203F6DC
function clsGridtb_c_users2($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "tb_c_users2";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_c_users2";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_c_users2DataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 1;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100)
$this->PageSize = 100;
if($this->PageSize == 0)
$this->Errors->addError("Form: Grid " . $this->ComponentName . "
Error: (CCS06) Invalid page size.
");
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0) $this->PageNumber = 1;
$this->culogout = new clsControl(ccsLink, "culogout", "culogout", ccsText, "", CCGetRequestParam("culogout", ccsGet, NULL), $this);
$this->culogout->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$this->culogout->Page = "logout.php";
$this->culink = new clsControl(ccsLink, "culink", "culink", ccsText, "", CCGetRequestParam("culink", ccsGet, NULL), $this);
$this->culink->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$this->culink->Page = "cu.php";
}
//End Class_Initialize Event
//Initialize Method @158-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 @158-D4D530A7
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["sesUserID"] = CCGetSession("UserID", NULL);
$this->DataSource->Parameters["sesUserLogin"] = CCGetSession("UserLogin", NULL);
$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["culogout"] = $this->culogout->Visible;
$this->ControlsVisible["culink"] = $this->culink->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->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->culogout->Show();
$this->culink->Show();
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
$Tpl->parse("Row", true);
}
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @158-23CDAF70
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->culogout->Errors->ToString());
$errors = ComposeStrings($errors, $this->culink->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End tb_c_users2 Class @158-FCB6E20C
class clstb_c_users2DataSource extends clsDBeasy { //tb_c_users2DataSource Class @158-6737C551
//DataSource Variables @158-404AA26D
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
//End DataSource Variables
//DataSourceClass_Initialize Event @158-24180DC7
function clstb_c_users2DataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_c_users2";
$this->Initialize();
}
//End DataSourceClass_Initialize Event
//SetOrder Method @158-24FF35BF
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
}
//End SetOrder Method
//Prepare Method @158-1B623775
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "sesUserID", ccsInteger, "", "", $this->Parameters["sesUserID"], "", false);
$this->wp->AddParameter("2", "sesUserLogin", ccsText, "", "", $this->Parameters["sesUserLogin"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "company_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
$this->wp->Criterion[2] = $this->wp->Operation(opEqual, "username", $this->wp->GetDBValue("2"), $this->ToSQL($this->wp->GetDBValue("2"), ccsText),false);
$this->Where = $this->wp->opAND(
false,
$this->wp->Criterion[1],
$this->wp->Criterion[2]);
}
//End Prepare Method
//Open Method @158-A4DD3956
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM tb_c_users";
$this->SQL = "SELECT account \n\n" .
"FROM tb_c_users {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 @158-BAF0975B
function SetValues()
{
}
//End SetValues Method
} //End tb_c_users2DataSource Class @158-FCB6E20C
class clsGridtb_r_users { //tb_r_users class @184-76B1340C
//Variables @184-6E51DF5A
// 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;
//End Variables
//Class_Initialize Event @184-0F0F7C96
function clsGridtb_r_users($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "tb_r_users";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_r_users";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_r_usersDataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 1;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100)
$this->PageSize = 100;
if($this->PageSize == 0)
$this->Errors->addError("Form: Grid " . $this->ComponentName . "
Error: (CCS06) Invalid page size.
");
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0) $this->PageNumber = 1;
$this->title = new clsControl(ccsLabel, "title", "title", ccsText, "", CCGetRequestParam("title", ccsGet, NULL), $this);
$this->firstname = new clsControl(ccsLabel, "firstname", "firstname", ccsText, "", CCGetRequestParam("firstname", ccsGet, NULL), $this);
$this->lastname = new clsControl(ccsLabel, "lastname", "lastname", ccsText, "", CCGetRequestParam("lastname", ccsGet, NULL), $this);
}
//End Class_Initialize Event
//Initialize Method @184-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 @184-4CE8DD34
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["sesUserID"] = CCGetSession("UserID", NULL);
$this->DataSource->Parameters["sesUserLogin"] = CCGetSession("UserLogin", NULL);
$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["title"] = $this->title->Visible;
$this->ControlsVisible["firstname"] = $this->firstname->Visible;
$this->ControlsVisible["lastname"] = $this->lastname->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->title->SetValue($this->DataSource->title->GetValue());
$this->firstname->SetValue($this->DataSource->firstname->GetValue());
$this->lastname->SetValue($this->DataSource->lastname->GetValue());
$this->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->title->Show();
$this->firstname->Show();
$this->lastname->Show();
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
$Tpl->parse("Row", true);
}
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @184-BB1D8C3F
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->title->Errors->ToString());
$errors = ComposeStrings($errors, $this->firstname->Errors->ToString());
$errors = ComposeStrings($errors, $this->lastname->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End tb_r_users Class @184-FCB6E20C
class clstb_r_usersDataSource extends clsDBeasy { //tb_r_usersDataSource Class @184-8A85D973
//DataSource Variables @184-5761AFE8
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $title;
public $firstname;
public $lastname;
//End DataSource Variables
//DataSourceClass_Initialize Event @184-704395FA
function clstb_r_usersDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_r_users";
$this->Initialize();
$this->title = new clsField("title", ccsText, "");
$this->firstname = new clsField("firstname", ccsText, "");
$this->lastname = new clsField("lastname", ccsText, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @184-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @184-0EB4312A
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "sesUserID", ccsInteger, "", "", $this->Parameters["sesUserID"], "", false);
$this->wp->AddParameter("2", "sesUserLogin", ccsText, "", "", $this->Parameters["sesUserLogin"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "retailer_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
$this->wp->Criterion[2] = $this->wp->Operation(opEqual, "username", $this->wp->GetDBValue("2"), $this->ToSQL($this->wp->GetDBValue("2"), ccsText),false);
$this->Where = $this->wp->opAND(
false,
$this->wp->Criterion[1],
$this->wp->Criterion[2]);
}
//End Prepare Method
//Open Method @184-3D005679
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM tb_r_users";
$this->SQL = "SELECT * \n\n" .
"FROM tb_r_users {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 @184-E8413630
function SetValues()
{
$this->title->SetDBValue($this->f("title"));
$this->firstname->SetDBValue($this->f("firstname"));
$this->lastname->SetDBValue($this->f("lastname"));
}
//End SetValues Method
} //End tb_r_usersDataSource Class @184-FCB6E20C
class clsGridtb_ru { //tb_ru class @191-53A7B54D
//Variables @191-6E51DF5A
// 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;
//End Variables
//Class_Initialize Event @191-DEAEBB34
function clsGridtb_ru($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "tb_ru";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_ru";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_ruDataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 1;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100)
$this->PageSize = 100;
if($this->PageSize == 0)
$this->Errors->addError("Form: Grid " . $this->ComponentName . "
Error: (CCS06) Invalid page size.
");
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0) $this->PageNumber = 1;
$this->culogout = new clsControl(ccsLink, "culogout", "culogout", ccsText, "", CCGetRequestParam("culogout", ccsGet, NULL), $this);
$this->culogout->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$this->culogout->Page = "logout.php";
$this->culink = new clsControl(ccsLink, "culink", "culink", ccsText, "", CCGetRequestParam("culink", ccsGet, NULL), $this);
$this->culink->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$this->culink->Page = "ru.php";
}
//End Class_Initialize Event
//Initialize Method @191-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 @191-D4D530A7
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["sesUserID"] = CCGetSession("UserID", NULL);
$this->DataSource->Parameters["sesUserLogin"] = CCGetSession("UserLogin", NULL);
$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["culogout"] = $this->culogout->Visible;
$this->ControlsVisible["culink"] = $this->culink->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->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->culogout->Show();
$this->culink->Show();
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
$Tpl->parse("Row", true);
}
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @191-23CDAF70
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->culogout->Errors->ToString());
$errors = ComposeStrings($errors, $this->culink->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End tb_ru Class @191-FCB6E20C
class clstb_ruDataSource extends clsDBeasy { //tb_ruDataSource Class @191-AF740678
//DataSource Variables @191-404AA26D
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
//End DataSource Variables
//DataSourceClass_Initialize Event @191-AD4E7ED8
function clstb_ruDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_ru";
$this->Initialize();
}
//End DataSourceClass_Initialize Event
//SetOrder Method @191-24FF35BF
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
}
//End SetOrder Method
//Prepare Method @191-0EB4312A
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "sesUserID", ccsInteger, "", "", $this->Parameters["sesUserID"], "", false);
$this->wp->AddParameter("2", "sesUserLogin", ccsText, "", "", $this->Parameters["sesUserLogin"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "retailer_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
$this->wp->Criterion[2] = $this->wp->Operation(opEqual, "username", $this->wp->GetDBValue("2"), $this->ToSQL($this->wp->GetDBValue("2"), ccsText),false);
$this->Where = $this->wp->opAND(
false,
$this->wp->Criterion[1],
$this->wp->Criterion[2]);
}
//End Prepare Method
//Open Method @191-3D005679
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM tb_r_users";
$this->SQL = "SELECT * \n\n" .
"FROM tb_r_users {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 @191-BAF0975B
function SetValues()
{
}
//End SetValues Method
} //End tb_ruDataSource Class @191-FCB6E20C
class clsGridtb_r_users1 { //tb_r_users1 class @215-16831DA9
//Variables @215-6E51DF5A
// 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;
//End Variables
//Class_Initialize Event @215-C1B2622F
function clsGridtb_r_users1($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "tb_r_users1";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_r_users1";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_r_users1DataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 1;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100)
$this->PageSize = 100;
if($this->PageSize == 0)
$this->Errors->addError("Form: Grid " . $this->ComponentName . "
Error: (CCS06) Invalid page size.
");
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0) $this->PageNumber = 1;
$this->title = new clsControl(ccsLabel, "title", "title", ccsText, "", CCGetRequestParam("title", ccsGet, NULL), $this);
$this->firstname = new clsControl(ccsLabel, "firstname", "firstname", ccsText, "", CCGetRequestParam("firstname", ccsGet, NULL), $this);
$this->lastname = new clsControl(ccsLabel, "lastname", "lastname", ccsText, "", CCGetRequestParam("lastname", ccsGet, NULL), $this);
}
//End Class_Initialize Event
//Initialize Method @215-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 @215-4CE8DD34
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["sesUserID"] = CCGetSession("UserID", NULL);
$this->DataSource->Parameters["sesUserLogin"] = CCGetSession("UserLogin", NULL);
$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["title"] = $this->title->Visible;
$this->ControlsVisible["firstname"] = $this->firstname->Visible;
$this->ControlsVisible["lastname"] = $this->lastname->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->title->SetValue($this->DataSource->title->GetValue());
$this->firstname->SetValue($this->DataSource->firstname->GetValue());
$this->lastname->SetValue($this->DataSource->lastname->GetValue());
$this->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->title->Show();
$this->firstname->Show();
$this->lastname->Show();
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
$Tpl->parse("Row", true);
}
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @215-BB1D8C3F
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->title->Errors->ToString());
$errors = ComposeStrings($errors, $this->firstname->Errors->ToString());
$errors = ComposeStrings($errors, $this->lastname->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End tb_r_users1 Class @215-FCB6E20C
class clstb_r_users1DataSource extends clsDBeasy { //tb_r_users1DataSource Class @215-E58D91F5
//DataSource Variables @215-5761AFE8
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $title;
public $firstname;
public $lastname;
//End DataSource Variables
//DataSourceClass_Initialize Event @215-B808EBCB
function clstb_r_users1DataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_r_users1";
$this->Initialize();
$this->title = new clsField("title", ccsText, "");
$this->firstname = new clsField("firstname", ccsText, "");
$this->lastname = new clsField("lastname", ccsText, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @215-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @215-0EB4312A
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "sesUserID", ccsInteger, "", "", $this->Parameters["sesUserID"], "", false);
$this->wp->AddParameter("2", "sesUserLogin", ccsText, "", "", $this->Parameters["sesUserLogin"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "retailer_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
$this->wp->Criterion[2] = $this->wp->Operation(opEqual, "username", $this->wp->GetDBValue("2"), $this->ToSQL($this->wp->GetDBValue("2"), ccsText),false);
$this->Where = $this->wp->opAND(
false,
$this->wp->Criterion[1],
$this->wp->Criterion[2]);
}
//End Prepare Method
//Open Method @215-3D005679
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM tb_r_users";
$this->SQL = "SELECT * \n\n" .
"FROM tb_r_users {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 @215-E8413630
function SetValues()
{
$this->title->SetDBValue($this->f("title"));
$this->firstname->SetDBValue($this->f("firstname"));
$this->lastname->SetDBValue($this->f("lastname"));
}
//End SetValues Method
} //End tb_r_users1DataSource Class @215-FCB6E20C
class clsGridtb_rm { //tb_rm class @222-D1BC2D14
//Variables @222-6E51DF5A
// 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;
//End Variables
//Class_Initialize Event @222-A14A0797
function clsGridtb_rm($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "tb_rm";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_rm";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_rmDataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 1;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100)
$this->PageSize = 100;
if($this->PageSize == 0)
$this->Errors->addError("Form: Grid " . $this->ComponentName . "
Error: (CCS06) Invalid page size.
");
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0) $this->PageNumber = 1;
$this->account = new clsControl(ccsLabel, "account", "account", ccsFloat, array(False, 2, Null, Null, False, "", "", 1, True, ""), CCGetRequestParam("account", ccsGet, NULL), $this);
$this->retailer = new clsControl(ccsLabel, "retailer", "retailer", ccsText, "", CCGetRequestParam("retailer", ccsGet, NULL), $this);
}
//End Class_Initialize Event
//Initialize Method @222-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 @222-EFB08D9F
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["sesUserID"] = CCGetSession("UserID", NULL);
$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["account"] = $this->account->Visible;
$this->ControlsVisible["retailer"] = $this->retailer->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->account->SetValue($this->DataSource->account->GetValue());
$this->retailer->SetValue($this->DataSource->retailer->GetValue());
$this->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->account->Show();
$this->retailer->Show();
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
$Tpl->parse("Row", true);
}
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @222-31484CAA
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->account->Errors->ToString());
$errors = ComposeStrings($errors, $this->retailer->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End tb_rm Class @222-FCB6E20C
class clstb_rmDataSource extends clsDBeasy { //tb_rmDataSource Class @222-B9843F40
//DataSource Variables @222-AC02A6AA
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $account;
public $retailer;
//End DataSource Variables
//DataSourceClass_Initialize Event @222-EF3EF967
function clstb_rmDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_rm";
$this->Initialize();
$this->account = new clsField("account", ccsFloat, "");
$this->retailer = new clsField("retailer", ccsText, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @222-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @222-E1BB5CF2
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "sesUserID", ccsInteger, "", "", $this->Parameters["sesUserID"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "retailer_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
$this->Where =
$this->wp->Criterion[1];
}
//End Prepare Method
//Open Method @222-88DC3452
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM tb_retailers";
$this->SQL = "SELECT retailer, mainaccount \n\n" .
"FROM tb_retailers {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 @222-13076841
function SetValues()
{
$this->account->SetDBValue(trim($this->f("mainaccount")));
$this->retailer->SetDBValue($this->f("retailer"));
}
//End SetValues Method
} //End tb_rmDataSource Class @222-FCB6E20C
class clsGridtb_sd_users { //tb_sd_users class @251-852889BA
//Variables @251-6E51DF5A
// 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;
//End Variables
//Class_Initialize Event @251-3F5E0D91
function clsGridtb_sd_users($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "tb_sd_users";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_sd_users";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_sd_usersDataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 1;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100)
$this->PageSize = 100;
if($this->PageSize == 0)
$this->Errors->addError("Form: Grid " . $this->ComponentName . "
Error: (CCS06) Invalid page size.
");
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0) $this->PageNumber = 1;
$this->title = new clsControl(ccsLabel, "title", "title", ccsText, "", CCGetRequestParam("title", ccsGet, NULL), $this);
$this->firstname = new clsControl(ccsLabel, "firstname", "firstname", ccsText, "", CCGetRequestParam("firstname", ccsGet, NULL), $this);
$this->lastname = new clsControl(ccsLabel, "lastname", "lastname", ccsText, "", CCGetRequestParam("lastname", ccsGet, NULL), $this);
}
//End Class_Initialize Event
//Initialize Method @251-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 @251-4CE8DD34
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["sesUserID"] = CCGetSession("UserID", NULL);
$this->DataSource->Parameters["sesUserLogin"] = CCGetSession("UserLogin", NULL);
$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["title"] = $this->title->Visible;
$this->ControlsVisible["firstname"] = $this->firstname->Visible;
$this->ControlsVisible["lastname"] = $this->lastname->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->title->SetValue($this->DataSource->title->GetValue());
$this->firstname->SetValue($this->DataSource->firstname->GetValue());
$this->lastname->SetValue($this->DataSource->lastname->GetValue());
$this->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->title->Show();
$this->firstname->Show();
$this->lastname->Show();
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
$Tpl->parse("Row", true);
}
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @251-BB1D8C3F
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->title->Errors->ToString());
$errors = ComposeStrings($errors, $this->firstname->Errors->ToString());
$errors = ComposeStrings($errors, $this->lastname->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End tb_sd_users Class @251-FCB6E20C
class clstb_sd_usersDataSource extends clsDBeasy { //tb_sd_usersDataSource Class @251-F67768C4
//DataSource Variables @251-5761AFE8
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $title;
public $firstname;
public $lastname;
//End DataSource Variables
//DataSourceClass_Initialize Event @251-69584AB7
function clstb_sd_usersDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_sd_users";
$this->Initialize();
$this->title = new clsField("title", ccsText, "");
$this->firstname = new clsField("firstname", ccsText, "");
$this->lastname = new clsField("lastname", ccsText, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @251-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @251-31FC509F
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "sesUserID", ccsInteger, "", "", $this->Parameters["sesUserID"], "", false);
$this->wp->AddParameter("2", "sesUserLogin", ccsText, "", "", $this->Parameters["sesUserLogin"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "wholesaler_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
$this->wp->Criterion[2] = $this->wp->Operation(opEqual, "username", $this->wp->GetDBValue("2"), $this->ToSQL($this->wp->GetDBValue("2"), ccsText),false);
$this->Where = $this->wp->opAND(
false,
$this->wp->Criterion[1],
$this->wp->Criterion[2]);
}
//End Prepare Method
//Open Method @251-4D52E8B5
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM tb_sd_users";
$this->SQL = "SELECT * \n\n" .
"FROM tb_sd_users {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 @251-E8413630
function SetValues()
{
$this->title->SetDBValue($this->f("title"));
$this->firstname->SetDBValue($this->f("firstname"));
$this->lastname->SetDBValue($this->f("lastname"));
}
//End SetValues Method
} //End tb_sd_usersDataSource Class @251-FCB6E20C
class clsGridtb_sd { //tb_sd class @258-01BCFC6A
//Variables @258-6E51DF5A
// 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;
//End Variables
//Class_Initialize Event @258-8C7A1603
function clsGridtb_sd($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "tb_sd";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_sd";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_sdDataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 1;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100)
$this->PageSize = 100;
if($this->PageSize == 0)
$this->Errors->addError("Form: Grid " . $this->ComponentName . "
Error: (CCS06) Invalid page size.
");
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0) $this->PageNumber = 1;
$this->account = new clsControl(ccsLabel, "account", "account", ccsFloat, array(False, 2, Null, Null, False, "", "", 1, True, ""), CCGetRequestParam("account", ccsGet, NULL), $this);
$this->wholesaler = new clsControl(ccsLabel, "wholesaler", "wholesaler", ccsText, "", CCGetRequestParam("wholesaler", ccsGet, NULL), $this);
}
//End Class_Initialize Event
//Initialize Method @258-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 @258-EC7DC691
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["sesUserID"] = CCGetSession("UserID", NULL);
$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["account"] = $this->account->Visible;
$this->ControlsVisible["wholesaler"] = $this->wholesaler->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->account->SetValue($this->DataSource->account->GetValue());
$this->wholesaler->SetValue($this->DataSource->wholesaler->GetValue());
$this->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->account->Show();
$this->wholesaler->Show();
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
$Tpl->parse("Row", true);
}
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @258-2C4D1CFA
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->account->Errors->ToString());
$errors = ComposeStrings($errors, $this->wholesaler->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End tb_sd Class @258-FCB6E20C
class clstb_sdDataSource extends clsDBeasy { //tb_sdDataSource Class @258-D699F391
//DataSource Variables @258-A1FBAF70
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $account;
public $wholesaler;
//End DataSource Variables
//DataSourceClass_Initialize Event @258-1902BA06
function clstb_sdDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_sd";
$this->Initialize();
$this->account = new clsField("account", ccsFloat, "");
$this->wholesaler = new clsField("wholesaler", ccsText, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @258-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @258-AF256FC2
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "sesUserID", ccsInteger, "", "", $this->Parameters["sesUserID"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "wholesaler_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
$this->Where =
$this->wp->Criterion[1];
}
//End Prepare Method
//Open Method @258-2C01839F
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM tb_subdealers";
$this->SQL = "SELECT wholesaler, mainaccount \n\n" .
"FROM tb_subdealers {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 @258-E66645E5
function SetValues()
{
$this->account->SetDBValue(trim($this->f("mainaccount")));
$this->wholesaler->SetDBValue($this->f("wholesaler"));
}
//End SetValues Method
} //End tb_sdDataSource Class @258-FCB6E20C
class clsRecordLogin { //Login Class @295-58926B8F
//Variables @295-9E315808
// Public variables
public $ComponentType = "Record";
public $ComponentName;
public $Parent;
public $HTMLFormAction;
public $PressedButton;
public $Errors;
public $ErrorBlock;
public $FormSubmitted;
public $FormEnctype;
public $Visible;
public $IsEmpty;
public $CCSEvents = "";
public $CCSEventResult;
public $RelativePath = "";
public $InsertAllowed = false;
public $UpdateAllowed = false;
public $DeleteAllowed = false;
public $ReadAllowed = false;
public $EditMode = false;
public $ds;
public $DataSource;
public $ValidatingControls;
public $Controls;
public $Attributes;
// Class variables
//End Variables
//Class_Initialize Event @295-7A72E167
function clsRecordLogin($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->Visible = true;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Record Login/Error";
$this->ReadAllowed = true;
if($this->Visible)
{
$this->ComponentName = "Login";
$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->login = new clsControl(ccsTextBox, "login", "login", ccsText, "", CCGetRequestParam("login", $Method, NULL), $this);
$this->login->Required = true;
$this->password = new clsControl(ccsTextBox, "password", "password", ccsText, "", CCGetRequestParam("password", $Method, NULL), $this);
$this->password->Required = true;
$this->Button_DoLogin = new clsButton("Button_DoLogin", $Method, $this);
$this->autoLogin = new clsControl(ccsHidden, "autoLogin", "autoLogin", ccsBoolean, $CCSLocales->GetFormatInfo("BooleanFormat"), CCGetRequestParam("autoLogin", $Method, NULL), $this);
}
}
//End Class_Initialize Event
//Validate Method @295-E943E0FF
function Validate()
{
global $CCSLocales;
$Validation = true;
$Where = "";
$Validation = ($this->login->Validate() && $Validation);
$Validation = ($this->password->Validate() && $Validation);
$Validation = ($this->autoLogin->Validate() && $Validation);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "OnValidate", $this);
$Validation = $Validation && ($this->login->Errors->Count() == 0);
$Validation = $Validation && ($this->password->Errors->Count() == 0);
$Validation = $Validation && ($this->autoLogin->Errors->Count() == 0);
return (($this->Errors->Count() == 0) && $Validation);
}
//End Validate Method
//CheckErrors Method @295-91657E88
function CheckErrors()
{
$errors = false;
$errors = ($errors || $this->login->Errors->Count());
$errors = ($errors || $this->password->Errors->Count());
$errors = ($errors || $this->autoLogin->Errors->Count());
$errors = ($errors || $this->Errors->Count());
return $errors;
}
//End CheckErrors Method
//MasterDetail @295-ED598703
function SetPrimaryKeys($keyArray)
{
$this->PrimaryKeys = $keyArray;
}
function GetPrimaryKeys()
{
return $this->PrimaryKeys;
}
function GetPrimaryKey($keyName)
{
return $this->PrimaryKeys[$keyName];
}
//End MasterDetail
//Operation Method @295-5AC4CFBE
function Operation()
{
if(!$this->Visible)
return;
global $Redirect;
global $FileName;
if(!$this->FormSubmitted) {
return;
}
if($this->FormSubmitted) {
$this->PressedButton = "Button_DoLogin";
if($this->Button_DoLogin->Pressed) {
$this->PressedButton = "Button_DoLogin";
}
}
$Redirect = $FileName;
if($this->Validate()) {
if($this->PressedButton == "Button_DoLogin") {
if(!CCGetEvent($this->Button_DoLogin->CCSEvents, "OnClick", $this->Button_DoLogin)) {
$Redirect = "";
}
}
} else {
$Redirect = "";
}
}
//End Operation Method
//Show Method @295-A23B838B
function Show()
{
global $CCSUseAmp;
global $Tpl;
global $FileName;
global $CCSLocales;
$Error = "";
if(!$this->Visible)
return;
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this);
$RecordBlock = "Record " . $this->ComponentName;
$ParentPath = $Tpl->block_path;
$Tpl->block_path = $ParentPath . "/" . $RecordBlock;
$this->EditMode = $this->EditMode && $this->ReadAllowed;
if($this->FormSubmitted || $this->CheckErrors()) {
$Error = "";
$Error = ComposeStrings($Error, $this->login->Errors->ToString());
$Error = ComposeStrings($Error, $this->password->Errors->ToString());
$Error = ComposeStrings($Error, $this->autoLogin->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->login->Show();
$this->password->Show();
$this->Button_DoLogin->Show();
$this->autoLogin->Show();
$Tpl->parse();
$Tpl->block_path = $ParentPath;
}
//End Show Method
} //End Login Class @295-FCB6E20C
class clsGridtb_ag_users { //tb_ag_users class @311-8991E4AE
//Variables @311-6E51DF5A
// 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;
//End Variables
//Class_Initialize Event @311-05F77F25
function clsGridtb_ag_users($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "tb_ag_users";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_ag_users";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_ag_usersDataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 1;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100)
$this->PageSize = 100;
if($this->PageSize == 0)
$this->Errors->addError("Form: Grid " . $this->ComponentName . "
Error: (CCS06) Invalid page size.
");
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0) $this->PageNumber = 1;
$this->title = new clsControl(ccsLabel, "title", "title", ccsText, "", CCGetRequestParam("title", ccsGet, NULL), $this);
$this->firstname = new clsControl(ccsLabel, "firstname", "firstname", ccsText, "", CCGetRequestParam("firstname", ccsGet, NULL), $this);
$this->lastname = new clsControl(ccsLabel, "lastname", "lastname", ccsText, "", CCGetRequestParam("lastname", ccsGet, NULL), $this);
}
//End Class_Initialize Event
//Initialize Method @311-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 @311-4CE8DD34
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["sesUserID"] = CCGetSession("UserID", NULL);
$this->DataSource->Parameters["sesUserLogin"] = CCGetSession("UserLogin", NULL);
$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["title"] = $this->title->Visible;
$this->ControlsVisible["firstname"] = $this->firstname->Visible;
$this->ControlsVisible["lastname"] = $this->lastname->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->title->SetValue($this->DataSource->title->GetValue());
$this->firstname->SetValue($this->DataSource->firstname->GetValue());
$this->lastname->SetValue($this->DataSource->lastname->GetValue());
$this->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->title->Show();
$this->firstname->Show();
$this->lastname->Show();
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
$Tpl->parse("Row", true);
}
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @311-BB1D8C3F
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->title->Errors->ToString());
$errors = ComposeStrings($errors, $this->firstname->Errors->ToString());
$errors = ComposeStrings($errors, $this->lastname->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End tb_ag_users Class @311-FCB6E20C
class clstb_ag_usersDataSource extends clsDBeasy { //tb_ag_usersDataSource Class @311-9046F604
//DataSource Variables @311-5761AFE8
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $title;
public $firstname;
public $lastname;
//End DataSource Variables
//DataSourceClass_Initialize Event @311-6C2063A6
function clstb_ag_usersDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_ag_users";
$this->Initialize();
$this->title = new clsField("title", ccsText, "");
$this->firstname = new clsField("firstname", ccsText, "");
$this->lastname = new clsField("lastname", ccsText, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @311-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @311-843E52DC
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "sesUserID", ccsInteger, "", "", $this->Parameters["sesUserID"], "", false);
$this->wp->AddParameter("2", "sesUserLogin", ccsText, "", "", $this->Parameters["sesUserLogin"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "agent_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
$this->wp->Criterion[2] = $this->wp->Operation(opEqual, "username", $this->wp->GetDBValue("2"), $this->ToSQL($this->wp->GetDBValue("2"), ccsText),false);
$this->Where = $this->wp->opAND(
false,
$this->wp->Criterion[1],
$this->wp->Criterion[2]);
}
//End Prepare Method
//Open Method @311-3EA92605
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM tb_agents";
$this->SQL = "SELECT * \n\n" .
"FROM tb_agents {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 @311-E8413630
function SetValues()
{
$this->title->SetDBValue($this->f("title"));
$this->firstname->SetDBValue($this->f("firstname"));
$this->lastname->SetDBValue($this->f("lastname"));
}
//End SetValues Method
} //End tb_ag_usersDataSource Class @311-FCB6E20C
class clsGridtb_sa { //tb_sa class @318-7CCB082F
//Variables @318-6E51DF5A
// 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;
//End Variables
//Class_Initialize Event @318-97314385
function clsGridtb_sa($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "tb_sa";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_sa";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_saDataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 1;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100)
$this->PageSize = 100;
if($this->PageSize == 0)
$this->Errors->addError("Form: Grid " . $this->ComponentName . "
Error: (CCS06) Invalid page size.
");
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0) $this->PageNumber = 1;
$this->account = new clsControl(ccsLabel, "account", "account", ccsFloat, array(False, 2, Null, Null, False, "", "", 1, True, ""), CCGetRequestParam("account", ccsGet, NULL), $this);
$this->sallink = new clsControl(ccsLink, "sallink", "sallink", ccsText, "", CCGetRequestParam("sallink", ccsGet, NULL), $this);
$this->sallink->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$this->sallink->Page = "sa.php";
$this->culogout = new clsControl(ccsLink, "culogout", "culogout", ccsText, "", CCGetRequestParam("culogout", ccsGet, NULL), $this);
$this->culogout->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$this->culogout->Page = "logout.php";
}
//End Class_Initialize Event
//Initialize Method @318-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 @318-B37A5E8B
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["sesUserID"] = CCGetSession("UserID", NULL);
$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["account"] = $this->account->Visible;
$this->ControlsVisible["sallink"] = $this->sallink->Visible;
$this->ControlsVisible["culogout"] = $this->culogout->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->account->SetValue($this->DataSource->account->GetValue());
$this->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->account->Show();
$this->sallink->Show();
$this->culogout->Show();
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
$Tpl->parse("Row", true);
}
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @318-08F53FFA
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->account->Errors->ToString());
$errors = ComposeStrings($errors, $this->sallink->Errors->ToString());
$errors = ComposeStrings($errors, $this->culogout->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End tb_sa Class @318-FCB6E20C
class clstb_saDataSource extends clsDBeasy { //tb_saDataSource Class @318-D1FBFAF8
//DataSource Variables @318-FE2D95B7
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $account;
//End DataSource Variables
//DataSourceClass_Initialize Event @318-0FAD6BDE
function clstb_saDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_sa";
$this->Initialize();
$this->account = new clsField("account", ccsFloat, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @318-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @318-2A230758
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "sesUserID", ccsInteger, "", "", $this->Parameters["sesUserID"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "agent_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
$this->Where =
$this->wp->Criterion[1];
}
//End Prepare Method
//Open Method @318-3911007D
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM tb_agents";
$this->SQL = "SELECT account \n\n" .
"FROM tb_agents {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 @318-CFD21D2E
function SetValues()
{
$this->account->SetDBValue(trim($this->f("account")));
}
//End SetValues Method
} //End tb_saDataSource Class @318-FCB6E20C
class clsGridtb_d_users { //tb_d_users class @343-CC650CA0
//Variables @343-6E51DF5A
// 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;
//End Variables
//Class_Initialize Event @343-312EB04E
function clsGridtb_d_users($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "tb_d_users";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_d_users";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_d_usersDataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 1;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100)
$this->PageSize = 100;
if($this->PageSize == 0)
$this->Errors->addError("Form: Grid " . $this->ComponentName . "
Error: (CCS06) Invalid page size.
");
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0) $this->PageNumber = 1;
$this->title = new clsControl(ccsLabel, "title", "title", ccsText, "", CCGetRequestParam("title", ccsGet, NULL), $this);
$this->firstname = new clsControl(ccsLabel, "firstname", "firstname", ccsText, "", CCGetRequestParam("firstname", ccsGet, NULL), $this);
$this->lastname = new clsControl(ccsLabel, "lastname", "lastname", ccsText, "", CCGetRequestParam("lastname", ccsGet, NULL), $this);
}
//End Class_Initialize Event
//Initialize Method @343-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 @343-4CE8DD34
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["sesUserID"] = CCGetSession("UserID", NULL);
$this->DataSource->Parameters["sesUserLogin"] = CCGetSession("UserLogin", NULL);
$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["title"] = $this->title->Visible;
$this->ControlsVisible["firstname"] = $this->firstname->Visible;
$this->ControlsVisible["lastname"] = $this->lastname->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->title->SetValue($this->DataSource->title->GetValue());
$this->firstname->SetValue($this->DataSource->firstname->GetValue());
$this->lastname->SetValue($this->DataSource->lastname->GetValue());
$this->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->title->Show();
$this->firstname->Show();
$this->lastname->Show();
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
$Tpl->parse("Row", true);
}
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @343-BB1D8C3F
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->title->Errors->ToString());
$errors = ComposeStrings($errors, $this->firstname->Errors->ToString());
$errors = ComposeStrings($errors, $this->lastname->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End tb_d_users Class @343-FCB6E20C
class clstb_d_usersDataSource extends clsDBeasy { //tb_d_usersDataSource Class @343-743E2664
//DataSource Variables @343-5761AFE8
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $title;
public $firstname;
public $lastname;
//End DataSource Variables
//DataSourceClass_Initialize Event @343-7E80EF46
function clstb_d_usersDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_d_users";
$this->Initialize();
$this->title = new clsField("title", ccsText, "");
$this->firstname = new clsField("firstname", ccsText, "");
$this->lastname = new clsField("lastname", ccsText, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @343-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @343-982F7E0A
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "sesUserID", ccsInteger, "", "", $this->Parameters["sesUserID"], "", false);
$this->wp->AddParameter("2", "sesUserLogin", ccsText, "", "", $this->Parameters["sesUserLogin"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "dealer_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
$this->wp->Criterion[2] = $this->wp->Operation(opEqual, "username", $this->wp->GetDBValue("2"), $this->ToSQL($this->wp->GetDBValue("2"), ccsText),false);
$this->Where = $this->wp->opAND(
false,
$this->wp->Criterion[1],
$this->wp->Criterion[2]);
}
//End Prepare Method
//Open Method @343-588E5D88
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM tb_dealer_users";
$this->SQL = "SELECT * \n\n" .
"FROM tb_dealer_users {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 @343-E8413630
function SetValues()
{
$this->title->SetDBValue($this->f("title"));
$this->firstname->SetDBValue($this->f("firstname"));
$this->lastname->SetDBValue($this->f("lastname"));
}
//End SetValues Method
} //End tb_d_usersDataSource Class @343-FCB6E20C
class clsGridtb_dl { //tb_dl class @350-D00CC397
//Variables @350-6E51DF5A
// 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;
//End Variables
//Class_Initialize Event @350-D7F8EE1D
function clsGridtb_dl($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "tb_dl";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_dl";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_dlDataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 1;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100)
$this->PageSize = 100;
if($this->PageSize == 0)
$this->Errors->addError("Form: Grid " . $this->ComponentName . "
Error: (CCS06) Invalid page size.
");
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0) $this->PageNumber = 1;
$this->account = new clsControl(ccsLabel, "account", "account", ccsFloat, array(False, 2, Null, Null, False, "", "", 1, True, ""), CCGetRequestParam("account", ccsGet, NULL), $this);
$this->Dealer = new clsControl(ccsLabel, "Dealer", "Dealer", ccsText, "", CCGetRequestParam("Dealer", ccsGet, NULL), $this);
}
//End Class_Initialize Event
//Initialize Method @350-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 @350-013D2EFF
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["sesUserID"] = CCGetSession("UserID", NULL);
$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["account"] = $this->account->Visible;
$this->ControlsVisible["Dealer"] = $this->Dealer->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->account->SetValue($this->DataSource->account->GetValue());
$this->Dealer->SetValue($this->DataSource->Dealer->GetValue());
$this->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->account->Show();
$this->Dealer->Show();
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
$Tpl->parse("Row", true);
}
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @350-1B70A611
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->account->Errors->ToString());
$errors = ComposeStrings($errors, $this->Dealer->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End tb_dl Class @350-FCB6E20C
class clstb_dlDataSource extends clsDBeasy { //tb_dlDataSource Class @350-AF989FC1
//DataSource Variables @350-F1488860
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $account;
public $Dealer;
//End DataSource Variables
//DataSourceClass_Initialize Event @350-A0054C9F
function clstb_dlDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_dl";
$this->Initialize();
$this->account = new clsField("account", ccsFloat, "");
$this->Dealer = new clsField("Dealer", ccsText, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @350-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @350-406C22F0
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "sesUserID", ccsInteger, "", "", $this->Parameters["sesUserID"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "dealer_id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
$this->Where =
$this->wp->Criterion[1];
}
//End Prepare Method
//Open Method @350-4AEAF468
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM tb_dealers";
$this->SQL = "SELECT Dealer, mainaccount \n\n" .
"FROM tb_dealers {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 @350-60291B95
function SetValues()
{
$this->account->SetDBValue(trim($this->f("mainaccount")));
$this->Dealer->SetDBValue($this->f("Dealer"));
}
//End SetValues Method
} //End tb_dlDataSource Class @350-FCB6E20C
//Initialize Page @1-955DC45E
// Variables
$FileName = "";
$Redirect = "";
$Tpl = "";
$TemplateFileName = "";
$BlockToParse = "";
$ComponentName = "";
$Attributes = "";
// Events;
$CCSEvents = "";
$CCSEventResult = "";
$FileName = FileName;
$Redirect = "";
$TemplateFileName = "iservice.html";
$BlockToParse = "main";
$TemplateEncoding = "UTF-8";
$ContentType = "text/html";
$PathToRoot = "./";
$Charset = $Charset ? $Charset : "utf-8";
//End Initialize Page
//Include events file @1-9EB195BF
include_once("./iservice_events.php");
//End Include events file
//Before Initialize @1-E870CEBC
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeInitialize", $MainPage);
//End Before Initialize
//Initialize Objects @1-1F3754B4
$DBeasy = new clsDBeasy();
$MainPage->Connections["easy"] = & $DBeasy;
$Attributes = new clsAttributes("page:");
$MainPage->Attributes = & $Attributes;
// Controls
$gen_ad = new clsproduct_ad("inc/", "gen_ad", $MainPage);
$gen_ad->Initialize();
$gen_sub = new clsproducts_sub("inc/", "gen_sub", $MainPage);
$gen_sub->Initialize();
$tb_services = new clsGridtb_services("", $MainPage);
$tb_subservices = new clsGridtb_subservices("", $MainPage);
$header = new clsheader("inc/", "header", $MainPage);
$header->Initialize();
$footer = new clsfooter("inc/", "footer", $MainPage);
$footer->Initialize();
$bg = new clsGridbg("", $MainPage);
$shownews = new clsPanel("shownews", $MainPage);
$news_inc = new clsnews_inc("inc/", "news_inc", $MainPage);
$news_inc->Initialize();
$users = new clsGridusers("", $MainPage);
$showcm = new clsPanel("showcm", $MainPage);
$tb_c_users = new clsGridtb_c_users("", $MainPage);
$tb_cmps = new clsGridtb_cmps("", $MainPage);
$tb_c_users4 = new clsGridtb_c_users4("", $MainPage);
$showcu = new clsPanel("showcu", $MainPage);
$tb_c_users1 = new clsGridtb_c_users1("", $MainPage);
$tb_c_users2 = new clsGridtb_c_users2("", $MainPage);
$showru = new clsPanel("showru", $MainPage);
$tb_r_users = new clsGridtb_r_users("", $MainPage);
$tb_ru = new clsGridtb_ru("", $MainPage);
$showrm = new clsPanel("showrm", $MainPage);
$tb_r_users1 = new clsGridtb_r_users1("", $MainPage);
$tb_rm = new clsGridtb_rm("", $MainPage);
$rmlink = new clsControl(ccsLink, "rmlink", "rmlink", ccsText, "", CCGetRequestParam("rmlink", ccsGet, NULL), $MainPage);
$rmlink->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$rmlink->Page = "ra.php";
$culogout3 = new clsControl(ccsLink, "culogout3", "culogout3", ccsText, "", CCGetRequestParam("culogout3", ccsGet, NULL), $MainPage);
$culogout3->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$culogout3->Page = "logout.php";
$showsd = new clsPanel("showsd", $MainPage);
$tb_sd_users = new clsGridtb_sd_users("", $MainPage);
$tb_sd = new clsGridtb_sd("", $MainPage);
$sdlink = new clsControl(ccsLink, "sdlink", "sdlink", ccsText, "", CCGetRequestParam("sdlink", ccsGet, NULL), $MainPage);
$sdlink->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$sdlink->Page = "sd.php";
$culogout2 = new clsControl(ccsLink, "culogout2", "culogout2", ccsText, "", CCGetRequestParam("culogout2", ccsGet, NULL), $MainPage);
$culogout2->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$culogout2->Page = "logout.php";
$showadmin = new clsPanel("showadmin", $MainPage);
$Link1 = new clsControl(ccsLink, "Link1", "Link1", ccsText, "", CCGetRequestParam("Link1", ccsGet, NULL), $MainPage);
$Link1->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$Link1->Page = "mtn/index.php";
$culogout4 = new clsControl(ccsLink, "culogout4", "culogout4", ccsText, "", CCGetRequestParam("culogout4", ccsGet, NULL), $MainPage);
$culogout4->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$culogout4->Page = "logout.php";
$showlogin = new clsPanel("showlogin", $MainPage);
$Login = new clsRecordLogin("", $MainPage);
$showsa = new clsPanel("showsa", $MainPage);
$tb_ag_users = new clsGridtb_ag_users("", $MainPage);
$tb_sa = new clsGridtb_sa("", $MainPage);
$showdl = new clsPanel("showdl", $MainPage);
$tb_d_users = new clsGridtb_d_users("", $MainPage);
$tb_dl = new clsGridtb_dl("", $MainPage);
$dllink = new clsControl(ccsLink, "dllink", "dllink", ccsText, "", CCGetRequestParam("dllink", ccsGet, NULL), $MainPage);
$dllink->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$dllink->Page = "dl.php";
$culogout1 = new clsControl(ccsLink, "culogout1", "culogout1", ccsText, "", CCGetRequestParam("culogout1", ccsGet, NULL), $MainPage);
$culogout1->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$culogout1->Page = "logout.php";
$showsp = new clsPanel("showsp", $MainPage);
$spllink = new clsControl(ccsLink, "spllink", "spllink", ccsText, "", CCGetRequestParam("spllink", ccsGet, NULL), $MainPage);
$spllink->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$spllink->Page = "sp.php";
$culogout = new clsControl(ccsLink, "culogout", "culogout", ccsText, "", CCGetRequestParam("culogout", ccsGet, NULL), $MainPage);
$culogout->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$culogout->Page = "logout.php";
$MainPage->gen_ad = & $gen_ad;
$MainPage->gen_sub = & $gen_sub;
$MainPage->tb_services = & $tb_services;
$MainPage->tb_subservices = & $tb_subservices;
$MainPage->header = & $header;
$MainPage->footer = & $footer;
$MainPage->bg = & $bg;
$MainPage->shownews = & $shownews;
$MainPage->news_inc = & $news_inc;
$MainPage->users = & $users;
$MainPage->showcm = & $showcm;
$MainPage->tb_c_users = & $tb_c_users;
$MainPage->tb_cmps = & $tb_cmps;
$MainPage->tb_c_users4 = & $tb_c_users4;
$MainPage->showcu = & $showcu;
$MainPage->tb_c_users1 = & $tb_c_users1;
$MainPage->tb_c_users2 = & $tb_c_users2;
$MainPage->showru = & $showru;
$MainPage->tb_r_users = & $tb_r_users;
$MainPage->tb_ru = & $tb_ru;
$MainPage->showrm = & $showrm;
$MainPage->tb_r_users1 = & $tb_r_users1;
$MainPage->tb_rm = & $tb_rm;
$MainPage->rmlink = & $rmlink;
$MainPage->culogout3 = & $culogout3;
$MainPage->showsd = & $showsd;
$MainPage->tb_sd_users = & $tb_sd_users;
$MainPage->tb_sd = & $tb_sd;
$MainPage->sdlink = & $sdlink;
$MainPage->culogout2 = & $culogout2;
$MainPage->showadmin = & $showadmin;
$MainPage->Link1 = & $Link1;
$MainPage->culogout4 = & $culogout4;
$MainPage->showlogin = & $showlogin;
$MainPage->Login = & $Login;
$MainPage->showsa = & $showsa;
$MainPage->tb_ag_users = & $tb_ag_users;
$MainPage->tb_sa = & $tb_sa;
$MainPage->showdl = & $showdl;
$MainPage->tb_d_users = & $tb_d_users;
$MainPage->tb_dl = & $tb_dl;
$MainPage->dllink = & $dllink;
$MainPage->culogout1 = & $culogout1;
$MainPage->showsp = & $showsp;
$MainPage->spllink = & $spllink;
$MainPage->culogout = & $culogout;
$shownews->Visible = false;
$shownews->AddComponent("news_inc", $news_inc);
$showcm->Visible = false;
$showcm->AddComponent("tb_c_users", $tb_c_users);
$showcm->AddComponent("tb_cmps", $tb_cmps);
$showcm->AddComponent("tb_c_users4", $tb_c_users4);
$showcu->Visible = false;
$showcu->AddComponent("tb_c_users1", $tb_c_users1);
$showcu->AddComponent("tb_c_users2", $tb_c_users2);
$showru->Visible = false;
$showru->AddComponent("tb_r_users", $tb_r_users);
$showru->AddComponent("tb_ru", $tb_ru);
$showrm->Visible = false;
$showrm->AddComponent("tb_r_users1", $tb_r_users1);
$showrm->AddComponent("tb_rm", $tb_rm);
$showrm->AddComponent("rmlink", $rmlink);
$showrm->AddComponent("culogout3", $culogout3);
$showsd->Visible = false;
$showsd->AddComponent("tb_sd_users", $tb_sd_users);
$showsd->AddComponent("tb_sd", $tb_sd);
$showsd->AddComponent("sdlink", $sdlink);
$showsd->AddComponent("culogout2", $culogout2);
$showadmin->Visible = false;
$showadmin->AddComponent("Link1", $Link1);
$showadmin->AddComponent("culogout4", $culogout4);
$showlogin->Visible = false;
$showlogin->AddComponent("Login", $Login);
$showsa->Visible = false;
$showsa->AddComponent("tb_ag_users", $tb_ag_users);
$showsa->AddComponent("tb_sa", $tb_sa);
$showdl->Visible = false;
$showdl->AddComponent("tb_d_users", $tb_d_users);
$showdl->AddComponent("tb_dl", $tb_dl);
$showdl->AddComponent("dllink", $dllink);
$showdl->AddComponent("culogout1", $culogout1);
$showsp->Visible = false;
$showsp->AddComponent("spllink", $spllink);
$showsp->AddComponent("culogout", $culogout);
$tb_services->Initialize();
$tb_subservices->Initialize();
$bg->Initialize();
$users->Initialize();
$tb_c_users->Initialize();
$tb_cmps->Initialize();
$tb_c_users4->Initialize();
$tb_c_users1->Initialize();
$tb_c_users2->Initialize();
$tb_r_users->Initialize();
$tb_ru->Initialize();
$tb_r_users1->Initialize();
$tb_rm->Initialize();
$tb_sd_users->Initialize();
$tb_sd->Initialize();
$tb_ag_users->Initialize();
$tb_sa->Initialize();
$tb_d_users->Initialize();
$tb_dl->Initialize();
BindEvents();
$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-51EC165D
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView", $MainPage);
$Tpl = new clsTemplate($FileEncoding, $TemplateEncoding);
$Tpl->LoadTemplate(PathToCurrentPage . $TemplateFileName, $BlockToParse, "UTF-8");
$Tpl->block_path = "/$BlockToParse";
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow", $MainPage);
$Attributes->SetValue("pathToRoot", "");
$Attributes->Show();
//End Initialize HTML Template
//Execute Components @1-DFBC20DF
$gen_ad->Operations();
$gen_sub->Operations();
$header->Operations();
$footer->Operations();
$news_inc->Operations();
$Login->Operation();
//End Execute Components
//Go to destination page @1-3C3FAE32
if($Redirect)
{
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
$DBeasy->close();
header("Location: " . $Redirect);
$gen_ad->Class_Terminate();
unset($gen_ad);
$gen_sub->Class_Terminate();
unset($gen_sub);
unset($tb_services);
unset($tb_subservices);
$header->Class_Terminate();
unset($header);
$footer->Class_Terminate();
unset($footer);
unset($bg);
$news_inc->Class_Terminate();
unset($news_inc);
unset($users);
unset($tb_c_users);
unset($tb_cmps);
unset($tb_c_users4);
unset($tb_c_users1);
unset($tb_c_users2);
unset($tb_r_users);
unset($tb_ru);
unset($tb_r_users1);
unset($tb_rm);
unset($tb_sd_users);
unset($tb_sd);
unset($Login);
unset($tb_ag_users);
unset($tb_sa);
unset($tb_d_users);
unset($tb_dl);
unset($Tpl);
exit;
}
//End Go to destination page
//Show Page @1-F9B88902
$gen_ad->Show();
$gen_sub->Show();
$tb_services->Show();
$tb_subservices->Show();
$header->Show();
$footer->Show();
$bg->Show();
$users->Show();
$shownews->Show();
$showcm->Show();
$showcu->Show();
$showru->Show();
$showrm->Show();
$showsd->Show();
$showadmin->Show();
$showlogin->Show();
$showsa->Show();
$showdl->Show();
$showsp->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-C682DF13
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
$DBeasy->close();
$gen_ad->Class_Terminate();
unset($gen_ad);
$gen_sub->Class_Terminate();
unset($gen_sub);
unset($tb_services);
unset($tb_subservices);
$header->Class_Terminate();
unset($header);
$footer->Class_Terminate();
unset($footer);
unset($bg);
$news_inc->Class_Terminate();
unset($news_inc);
unset($users);
unset($tb_c_users);
unset($tb_cmps);
unset($tb_c_users4);
unset($tb_c_users1);
unset($tb_c_users2);
unset($tb_r_users);
unset($tb_ru);
unset($tb_r_users1);
unset($tb_rm);
unset($tb_sd_users);
unset($tb_sd);
unset($Login);
unset($tb_ag_users);
unset($tb_sa);
unset($tb_d_users);
unset($tb_dl);
unset($Tpl);
//End Unload Page
?>