ComponentName = "tb_site";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_site";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_siteDataSource($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->caption = new clsControl(ccsLabel, "caption", "caption", ccsText, "", CCGetRequestParam("caption", ccsGet, NULL), $this);
$this->content = new clsControl(ccsLabel, "content", "content", ccsMemo, "", CCGetRequestParam("content", ccsGet, NULL), $this);
$this->linkcaption = new clsControl(ccsLink, "linkcaption", "linkcaption", ccsText, "", CCGetRequestParam("linkcaption", ccsGet, NULL), $this);
$this->linkcaption->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$this->RowCloseTag = new clsPanel("RowCloseTag", $this);
$this->RowComponents->AddComponent("title", $this->title);
$this->RowComponents->AddComponent("picture", $this->picture);
$this->RowComponents->AddComponent("caption", $this->caption);
$this->RowComponents->AddComponent("content", $this->content);
$this->RowComponents->AddComponent("linkcaption", $this->linkcaption);
}
//End Class_Initialize Event
//Initialize Method @7-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 @7-CF58C52F
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["expr9"] = "welcome";
$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["title"] = $this->title->Visible;
$this->ControlsVisible["picture"] = $this->picture->Visible;
$this->ControlsVisible["caption"] = $this->caption->Visible;
$this->ControlsVisible["content"] = $this->content->Visible;
$this->ControlsVisible["linkcaption"] = $this->linkcaption->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->caption->SetValue($this->DataSource->caption->GetValue());
$this->content->SetValue($this->DataSource->content->GetValue());
$this->linkcaption->SetValue($this->DataSource->linkcaption->GetValue());
$this->linkcaption->Page = $this->DataSource->f("linkurl");
$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 @7-0FE9A5E7
function GetErrors()
{
$errors = "";
$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->content->Errors->ToString());
$errors = ComposeStrings($errors, $this->linkcaption->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End tb_site Class @7-FCB6E20C
class clstb_siteDataSource extends clsDBeasy { //tb_siteDataSource Class @7-91702DE3
//DataSource Variables @7-64356910
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $title;
public $picture;
public $caption;
public $content;
public $linkcaption;
//End DataSource Variables
//DataSourceClass_Initialize Event @7-978AB5F8
function clstb_siteDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_site";
$this->Initialize();
$this->title = new clsField("title", ccsText, "");
$this->picture = new clsField("picture", ccsText, "");
$this->caption = new clsField("caption", ccsText, "");
$this->content = new clsField("content", ccsMemo, "");
$this->linkcaption = new clsField("linkcaption", ccsText, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @7-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @7-62457118
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "expr9", ccsText, "", "", $this->Parameters["expr9"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "page", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsText),false);
$this->Where =
$this->wp->Criterion[1];
}
//End Prepare Method
//Open Method @7-D924D97F
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM tb_site";
$this->SQL = "SELECT * \n\n" .
"FROM tb_site {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 @7-A16B5B27
function SetValues()
{
$this->title->SetDBValue($this->f("title"));
$this->picture->SetDBValue($this->f("picture"));
$this->caption->SetDBValue($this->f("caption"));
$this->content->SetDBValue($this->f("content"));
$this->linkcaption->SetDBValue($this->f("linkcaption"));
}
//End SetValues Method
} //End tb_siteDataSource Class @7-FCB6E20C
class clsGridtb_subsite { //tb_subsite class @22-9DC616BE
//Variables @22-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 @22-B4F51BA5
function clsGridtb_subsite($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "tb_subsite";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_subsite";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_subsiteDataSource($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->title1 = new clsControl(ccsLabel, "title1", "title1", ccsText, "", CCGetRequestParam("title1", ccsGet, NULL), $this);
$this->thumbnail = new clsControl(ccsImage, "thumbnail", "thumbnail", ccsText, "", CCGetRequestParam("thumbnail", ccsGet, NULL), $this);
$this->content = new clsControl(ccsLabel, "content", "content", ccsMemo, "", CCGetRequestParam("content", ccsGet, NULL), $this);
$this->linkcaption = new clsControl(ccsLink, "linkcaption", "linkcaption", ccsText, "", CCGetRequestParam("linkcaption", ccsGet, NULL), $this);
$this->linkcaption->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$this->RowCloseTag = new clsPanel("RowCloseTag", $this);
$this->RowComponents->AddComponent("title1", $this->title1);
$this->RowComponents->AddComponent("thumbnail", $this->thumbnail);
$this->RowComponents->AddComponent("content", $this->content);
$this->RowComponents->AddComponent("linkcaption", $this->linkcaption);
}
//End Class_Initialize Event
//Initialize Method @22-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 @22-8F4A1377
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["expr24"] = "welcome";
$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["title1"] = $this->title1->Visible;
$this->ControlsVisible["thumbnail"] = $this->thumbnail->Visible;
$this->ControlsVisible["content"] = $this->content->Visible;
$this->ControlsVisible["linkcaption"] = $this->linkcaption->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->title1->SetValue($this->DataSource->title1->GetValue());
$this->thumbnail->SetValue($this->DataSource->thumbnail->GetValue());
$this->content->SetValue($this->DataSource->content->GetValue());
$this->linkcaption->SetValue($this->DataSource->linkcaption->GetValue());
$this->linkcaption->Page = $this->DataSource->f("linkurl");
$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 @22-D15CB9F9
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->title1->Errors->ToString());
$errors = ComposeStrings($errors, $this->thumbnail->Errors->ToString());
$errors = ComposeStrings($errors, $this->content->Errors->ToString());
$errors = ComposeStrings($errors, $this->linkcaption->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End tb_subsite Class @22-FCB6E20C
class clstb_subsiteDataSource extends clsDBeasy { //tb_subsiteDataSource Class @22-245BC805
//DataSource Variables @22-3CCBE703
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $title1;
public $thumbnail;
public $content;
public $linkcaption;
//End DataSource Variables
//DataSourceClass_Initialize Event @22-D5EA4931
function clstb_subsiteDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_subsite";
$this->Initialize();
$this->title1 = new clsField("title1", ccsText, "");
$this->thumbnail = new clsField("thumbnail", ccsText, "");
$this->content = new clsField("content", ccsMemo, "");
$this->linkcaption = new clsField("linkcaption", ccsText, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @22-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @22-BB1D7E16
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "expr24", ccsText, "", "", $this->Parameters["expr24"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "page", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsText),false);
$this->Where =
$this->wp->Criterion[1];
}
//End Prepare Method
//Open Method @22-26048BC7
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM tb_subsite";
$this->SQL = "SELECT * \n\n" .
"FROM tb_subsite {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 @22-A06E893B
function SetValues()
{
$this->title1->SetDBValue($this->f("title"));
$this->thumbnail->SetDBValue($this->f("thumbnail"));
$this->content->SetDBValue($this->f("content"));
$this->linkcaption->SetDBValue($this->f("linkcaption"));
}
//End SetValues Method
} //End tb_subsiteDataSource Class @22-FCB6E20C
//Include Page implementation @62-84A7A219
include_once(RelativePath . "/inc/main_ad.php");
//End Include Page implementation
class clsGridtb_site1 { //tb_site1 class @63-2FBAB4D9
//Variables @63-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 @63-201BA6BD
function clsGridtb_site1($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "tb_site1";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_site1";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_site1DataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 2;
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(ccsLink, "title", "title", ccsText, "", CCGetRequestParam("title", ccsGet, NULL), $this);
$this->title->Page = "easy.php";
$this->thumbnail = new clsControl(ccsImageLink, "thumbnail", "thumbnail", ccsText, "", CCGetRequestParam("thumbnail", ccsGet, NULL), $this);
$this->thumbnail->Page = "hill.php";
$this->caption = new clsControl(ccsLabel, "caption", "caption", ccsText, "", CCGetRequestParam("caption", ccsGet, NULL), $this);
$this->RowCloseTag = new clsPanel("RowCloseTag", $this);
$this->RowComponents->AddComponent("title", $this->title);
$this->RowComponents->AddComponent("thumbnail", $this->thumbnail);
$this->RowComponents->AddComponent("caption", $this->caption);
}
//End Class_Initialize Event
//Initialize Method @63-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 @63-D8B945F1
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["expr74"] = "Yes";
$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", 2);
$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["thumbnail"] = $this->thumbnail->Visible;
$this->ControlsVisible["caption"] = $this->caption->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->title->Parameters = "";
$this->title->Parameters = CCAddParam($this->title->Parameters, "@", $this->DataSource->f("page"));
$this->thumbnail->SetValue($this->DataSource->thumbnail->GetValue());
$this->thumbnail->Parameters = "";
$this->thumbnail->Parameters = CCAddParam($this->thumbnail->Parameters, "@", $this->DataSource->f("page"));
$this->caption->SetValue($this->DataSource->caption->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 @63-5BC71FB4
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->title->Errors->ToString());
$errors = ComposeStrings($errors, $this->thumbnail->Errors->ToString());
$errors = ComposeStrings($errors, $this->caption->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End tb_site1 Class @63-FCB6E20C
class clstb_site1DataSource extends clsDBeasy { //tb_site1DataSource Class @63-1599F745
//DataSource Variables @63-E31C6962
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $title;
public $thumbnail;
public $caption;
//End DataSource Variables
//DataSourceClass_Initialize Event @63-1F3A7A47
function clstb_site1DataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_site1";
$this->Initialize();
$this->title = new clsField("title", ccsText, "");
$this->thumbnail = new clsField("thumbnail", ccsText, "");
$this->caption = new clsField("caption", ccsText, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @63-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @63-FC2E5424
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "expr74", ccsText, "", "", $this->Parameters["expr74"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "home", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsText),false);
$this->Where =
$this->wp->Criterion[1];
}
//End Prepare Method
//Open Method @63-D924D97F
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM tb_site";
$this->SQL = "SELECT * \n\n" .
"FROM tb_site {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 @63-A377B6E5
function SetValues()
{
$this->title->SetDBValue($this->f("title"));
$this->thumbnail->SetDBValue($this->f("thumbnail"));
$this->caption->SetDBValue($this->f("caption"));
}
//End SetValues Method
} //End tb_site1DataSource Class @63-FCB6E20C
//Include Page implementation @4-71596A59
include_once(RelativePath . "/inc/home_sub.php");
//End Include Page implementation
//Include Page implementation @101-6617A085
include_once(RelativePath . "/inc/homeflash.php");
//End Include Page implementation
//Include Page implementation @102-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
//Include Page implementation @103-3E5A21C3
include_once(RelativePath . "/inc/news_inc.php");
//End Include Page implementation
class clsGridbg { //bg class @105-2689D52B
//Variables @105-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 @105-68196D45
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);
$this->shtab = new clsControl(ccsHidden, "shtab", "shtab", ccsText, "", CCGetRequestParam("shtab", ccsGet, NULL), $this);
}
//End Class_Initialize Event
//Initialize Method @105-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 @105-ABF4A503
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;
$this->ControlsVisible["shtab"] = $this->shtab->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->shtab->SetValue($this->DataSource->shtab->GetValue());
$this->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->snews->Show();
$this->shtab->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 @105-A9FE1518
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->snews->Errors->ToString());
$errors = ComposeStrings($errors, $this->shtab->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End bg Class @105-FCB6E20C
class clsbgDataSource extends clsDBeasy { //bgDataSource Class @105-44C11189
//DataSource Variables @105-A447126F
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $snews;
public $shtab;
//End DataSource Variables
//DataSourceClass_Initialize Event @105-1BBD1C04
function clsbgDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid bg";
$this->Initialize();
$this->snews = new clsField("snews", ccsText, "");
$this->shtab = new clsField("shtab", ccsText, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @105-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @105-14D6CD9D
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
}
//End Prepare Method
//Open Method @105-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 @105-6EFF7E2D
function SetValues()
{
$this->snews->SetDBValue($this->f("snews"));
$this->shtab->SetDBValue($this->f("shtab"));
}
//End SetValues Method
} //End bgDataSource Class @105-FCB6E20C
class clsGridtb_c_users { //tb_c_users class @138-C6A005B9
//Variables @138-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 @138-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 @138-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 @138-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 @138-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 @138-FCB6E20C
class clstb_c_usersDataSource extends clsDBeasy { //tb_c_usersDataSource Class @138-8BB191E6
//DataSource Variables @138-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 @138-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 @138-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @138-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 @138-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 @138-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 @138-FCB6E20C
class clsGridtb_cmps { //tb_cmps class @198-B8B89B31
//Variables @198-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 @198-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 @198-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 @198-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 @198-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 @198-FCB6E20C
class clstb_cmpsDataSource extends clsDBeasy { //tb_cmpsDataSource Class @198-C700919C
//DataSource Variables @198-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 @198-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 @198-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @198-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 @198-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 @198-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 @198-FCB6E20C
class clsGridtb_c_users4 { //tb_c_users4 class @206-D04FBFDE
//Variables @206-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 @206-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 @206-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 @206-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 @206-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 @206-FCB6E20C
class clstb_c_users4DataSource extends clsDBeasy { //tb_c_users4DataSource Class @206-628BCB1F
//DataSource Variables @206-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 @206-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 @206-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @206-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 @206-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 @206-CFD21D2E
function SetValues()
{
$this->account->SetDBValue(trim($this->f("account")));
}
//End SetValues Method
} //End tb_c_users4DataSource Class @206-FCB6E20C
class clsGridtb_c_users1 { //tb_c_users1 class @145-AD384B9B
//Variables @145-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 @145-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 @145-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 @145-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 @145-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 @145-FCB6E20C
class clstb_c_users1DataSource extends clsDBeasy { //tb_c_users1DataSource Class @145-65E9C276
//DataSource Variables @145-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 @145-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 @145-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @145-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 @145-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 @145-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 @145-FCB6E20C
class clsGridtb_c_users2 { //tb_c_users2 class @190-86151858
//Variables @190-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 @190-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 @190-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 @190-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 @190-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 @190-FCB6E20C
class clstb_c_users2DataSource extends clsDBeasy { //tb_c_users2DataSource Class @190-6737C551
//DataSource Variables @190-404AA26D
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
//End DataSource Variables
//DataSourceClass_Initialize Event @190-24180DC7
function clstb_c_users2DataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_c_users2";
$this->Initialize();
}
//End DataSourceClass_Initialize Event
//SetOrder Method @190-24FF35BF
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
}
//End SetOrder Method
//Prepare Method @190-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 @190-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 @190-BAF0975B
function SetValues()
{
}
//End SetValues Method
} //End tb_c_users2DataSource Class @190-FCB6E20C
class clsGridtb_r_users { //tb_r_users class @152-76B1340C
//Variables @152-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 @152-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 @152-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 @152-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 @152-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 @152-FCB6E20C
class clstb_r_usersDataSource extends clsDBeasy { //tb_r_usersDataSource Class @152-8A85D973
//DataSource Variables @152-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 @152-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 @152-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @152-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 @152-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 @152-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 @152-FCB6E20C
class clsGridtb_ru { //tb_ru class @250-53A7B54D
//Variables @250-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 @250-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 @250-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 @250-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 @250-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 @250-FCB6E20C
class clstb_ruDataSource extends clsDBeasy { //tb_ruDataSource Class @250-AF740678
//DataSource Variables @250-404AA26D
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
//End DataSource Variables
//DataSourceClass_Initialize Event @250-AD4E7ED8
function clstb_ruDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_ru";
$this->Initialize();
}
//End DataSourceClass_Initialize Event
//SetOrder Method @250-24FF35BF
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
}
//End SetOrder Method
//Prepare Method @250-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 @250-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 @250-BAF0975B
function SetValues()
{
}
//End SetValues Method
} //End tb_ruDataSource Class @250-FCB6E20C
class clsGridtb_r_users1 { //tb_r_users1 class @159-16831DA9
//Variables @159-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 @159-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 @159-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 @159-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 @159-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 @159-FCB6E20C
class clstb_r_users1DataSource extends clsDBeasy { //tb_r_users1DataSource Class @159-E58D91F5
//DataSource Variables @159-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 @159-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 @159-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @159-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 @159-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 @159-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 @159-FCB6E20C
class clsGridtb_rm { //tb_rm class @218-D1BC2D14
//Variables @218-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 @218-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 @218-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 @218-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 @218-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 @218-FCB6E20C
class clstb_rmDataSource extends clsDBeasy { //tb_rmDataSource Class @218-B9843F40
//DataSource Variables @218-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 @218-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 @218-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @218-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 @218-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 @218-13076841
function SetValues()
{
$this->account->SetDBValue(trim($this->f("mainaccount")));
$this->retailer->SetDBValue($this->f("retailer"));
}
//End SetValues Method
} //End tb_rmDataSource Class @218-FCB6E20C
class clsGridtb_sd_users { //tb_sd_users class @166-852889BA
//Variables @166-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 @166-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 @166-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 @166-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 @166-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 @166-FCB6E20C
class clstb_sd_usersDataSource extends clsDBeasy { //tb_sd_usersDataSource Class @166-F67768C4
//DataSource Variables @166-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 @166-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 @166-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @166-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 @166-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 @166-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 @166-FCB6E20C
class clsGridtb_sd { //tb_sd class @226-01BCFC6A
//Variables @226-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 @226-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 @226-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 @226-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 @226-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 @226-FCB6E20C
class clstb_sdDataSource extends clsDBeasy { //tb_sdDataSource Class @226-D699F391
//DataSource Variables @226-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 @226-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 @226-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @226-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 @226-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 @226-E66645E5
function SetValues()
{
$this->account->SetDBValue(trim($this->f("mainaccount")));
$this->wholesaler->SetDBValue($this->f("wholesaler"));
}
//End SetValues Method
} //End tb_sdDataSource Class @226-FCB6E20C
class clsGridusers { //users class @111-0CB76799
//Variables @111-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 @111-52F19636
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);
$this->login_id = new clsControl(ccsHidden, "login_id", "login_id", ccsInteger, "", CCGetRequestParam("login_id", ccsGet, NULL), $this);
}
//End Class_Initialize Event
//Initialize Method @111-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 @111-1F15EBB3
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;
$this->ControlsVisible["login_id"] = $this->login_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->login_id->SetValue($this->DataSource->login_id->GetValue());
$this->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->group_id->Show();
$this->login_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 @111-1B984EF2
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->group_id->Errors->ToString());
$errors = ComposeStrings($errors, $this->login_id->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End users Class @111-FCB6E20C
class clsusersDataSource extends clsDBeasy { //usersDataSource Class @111-6A08F44A
//DataSource Variables @111-B6DC3BD6
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $group_id;
public $login_id;
//End DataSource Variables
//DataSourceClass_Initialize Event @111-C879C289
function clsusersDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid users";
$this->Initialize();
$this->group_id = new clsField("group_id", ccsInteger, "");
$this->login_id = new clsField("login_id", ccsInteger, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @111-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @111-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 @111-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 @111-164B9509
function SetValues()
{
$this->group_id->SetDBValue(trim($this->f("group_id")));
$this->login_id->SetDBValue(trim($this->f("login_id")));
}
//End SetValues Method
} //End usersDataSource Class @111-FCB6E20C
class clsRecordLogin { //Login Class @124-58926B8F
//Variables @124-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 @124-D9CE2DA2
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 = explode(":", 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);
$this->ldate = new clsControl(ccsHidden, "ldate", "ldate", ccsDate, array("mm", "/", "dd", "/", "yyyy", " ", "h", ":", "nn", " ", "AM/PM"), CCGetRequestParam("ldate", $Method, NULL), $this);
$this->ip_addr = new clsControl(ccsHidden, "ip_addr", "ip_addr", ccsText, "", CCGetRequestParam("ip_addr", $Method, NULL), $this);
if(!$this->FormSubmitted) {
if(!is_array($this->ldate->Value) && !strlen($this->ldate->Value) && $this->ldate->Value !== false)
$this->ldate->SetValue(time());
if(!is_array($this->ip_addr->Value) && !strlen($this->ip_addr->Value) && $this->ip_addr->Value !== false)
$this->ip_addr->SetText(getenv(REMOTE_ADDR));
}
}
}
//End Class_Initialize Event
//Validate Method @124-2E79F89F
function Validate()
{
global $CCSLocales;
$Validation = true;
$Where = "";
$Validation = ($this->login->Validate() && $Validation);
$Validation = ($this->password->Validate() && $Validation);
$Validation = ($this->autoLogin->Validate() && $Validation);
$Validation = ($this->ldate->Validate() && $Validation);
$Validation = ($this->ip_addr->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);
$Validation = $Validation && ($this->ldate->Errors->Count() == 0);
$Validation = $Validation && ($this->ip_addr->Errors->Count() == 0);
return (($this->Errors->Count() == 0) && $Validation);
}
//End Validate Method
//CheckErrors Method @124-52986DF7
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->ldate->Errors->Count());
$errors = ($errors || $this->ip_addr->Errors->Count());
$errors = ($errors || $this->Errors->Count());
return $errors;
}
//End CheckErrors Method
//MasterDetail @124-ED598703
function SetPrimaryKeys($keyArray)
{
$this->PrimaryKeys = $keyArray;
}
function GetPrimaryKeys()
{
return $this->PrimaryKeys;
}
function GetPrimaryKey($keyName)
{
return $this->PrimaryKeys[$keyName];
}
//End MasterDetail
//Operation Method @124-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 @124-F454A97A
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) {
}
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->ldate->Errors->ToString());
$Error = ComposeStrings($Error, $this->ip_addr->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();
$this->ldate->Show();
$this->ip_addr->Show();
$Tpl->parse();
$Tpl->block_path = $ParentPath;
}
//End Show Method
} //End Login Class @124-FCB6E20C
class clsGridtb_ag_users { //tb_ag_users class @173-8991E4AE
//Variables @173-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 @173-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 @173-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 @173-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 @173-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 @173-FCB6E20C
class clstb_ag_usersDataSource extends clsDBeasy { //tb_ag_usersDataSource Class @173-9046F604
//DataSource Variables @173-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 @173-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 @173-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @173-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 @173-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 @173-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 @173-FCB6E20C
class clsGridtb_sa { //tb_sa class @243-7CCB082F
//Variables @243-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 @243-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 @243-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 @243-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 @243-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 @243-FCB6E20C
class clstb_saDataSource extends clsDBeasy { //tb_saDataSource Class @243-D1FBFAF8
//DataSource Variables @243-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 @243-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 @243-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @243-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 @243-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 @243-CFD21D2E
function SetValues()
{
$this->account->SetDBValue(trim($this->f("account")));
}
//End SetValues Method
} //End tb_saDataSource Class @243-FCB6E20C
class clsGridtb_d_users { //tb_d_users class @183-CC650CA0
//Variables @183-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 @183-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 @183-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 @183-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 @183-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 @183-FCB6E20C
class clstb_d_usersDataSource extends clsDBeasy { //tb_d_usersDataSource Class @183-743E2664
//DataSource Variables @183-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 @183-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 @183-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @183-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 @183-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 @183-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 @183-FCB6E20C
class clsGridtb_dl { //tb_dl class @234-D00CC397
//Variables @234-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 @234-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 @234-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 @234-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 @234-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 @234-FCB6E20C
class clstb_dlDataSource extends clsDBeasy { //tb_dlDataSource Class @234-AF989FC1
//DataSource Variables @234-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 @234-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 @234-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @234-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 @234-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 @234-60291B95
function SetValues()
{
$this->account->SetDBValue(trim($this->f("mainaccount")));
$this->Dealer->SetDBValue($this->f("Dealer"));
}
//End SetValues Method
} //End tb_dlDataSource Class @234-FCB6E20C
class clsGridtb_r_users2 { //tb_r_users2 class @272-3DAE4E6A
//Variables @272-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 @272-FD9D597A
function clsGridtb_r_users2($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "tb_r_users2";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_r_users2";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_r_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->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 @272-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 @272-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 @272-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_users2 Class @272-FCB6E20C
class clstb_r_users2DataSource extends clsDBeasy { //tb_r_users2DataSource Class @272-E75396D2
//DataSource Variables @272-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 @272-D2E7C3B5
function clstb_r_users2DataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_r_users2";
$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 @272-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @272-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 @272-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 @272-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_users2DataSource Class @272-FCB6E20C
class clsGridtb_rm1 { //tb_rm1 class @279-054888E6
//Variables @279-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 @279-1AE7ABC5
function clsGridtb_rm1($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "tb_rm1";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_rm1";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_rm1DataSource($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 @279-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 @279-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 @279-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_rm1 Class @279-FCB6E20C
class clstb_rm1DataSource extends clsDBeasy { //tb_rm1DataSource Class @279-5A6EF105
//DataSource Variables @279-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 @279-C79F06F2
function clstb_rm1DataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_rm1";
$this->Initialize();
$this->account = new clsField("account", ccsFloat, "");
$this->retailer = new clsField("retailer", ccsText, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @279-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @279-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 @279-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 @279-13076841
function SetValues()
{
$this->account->SetDBValue(trim($this->f("mainaccount")));
$this->retailer->SetDBValue($this->f("retailer"));
}
//End SetValues Method
} //End tb_rm1DataSource Class @279-FCB6E20C
class clsGridtb_r_users3 { //tb_r_users3 class @290-24B57F2B
//Variables @290-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 @290-E987B049
function clsGridtb_r_users3($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "tb_r_users3";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_r_users3";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_r_users3DataSource($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 @290-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 @290-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 @290-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_users3 Class @290-FCB6E20C
class clstb_r_users3DataSource extends clsDBeasy { //tb_r_users3DataSource Class @290-E6E66BCF
//DataSource Variables @290-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 @290-426DD9A0
function clstb_r_users3DataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_r_users3";
$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 @290-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @290-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 @290-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 @290-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_users3DataSource Class @290-FCB6E20C
class clsGridtb_ru1 { //tb_ru1 class @297-177D7A2E
//Variables @297-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 @297-4A59997F
function clsGridtb_ru1($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "tb_ru1";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_ru1";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_ru1DataSource($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 = "lru.php";
}
//End Class_Initialize Event
//Initialize Method @297-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 @297-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 @297-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_ru1 Class @297-FCB6E20C
class clstb_ru1DataSource extends clsDBeasy { //tb_ru1DataSource Class @297-727AB9A2
//DataSource Variables @297-404AA26D
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
//End DataSource Variables
//DataSourceClass_Initialize Event @297-9D8049EA
function clstb_ru1DataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_ru1";
$this->Initialize();
}
//End DataSourceClass_Initialize Event
//SetOrder Method @297-24FF35BF
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
}
//End SetOrder Method
//Prepare Method @297-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 @297-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 @297-BAF0975B
function SetValues()
{
}
//End SetValues Method
} //End tb_ru1DataSource Class @297-FCB6E20C
//Initialize Page @1-B8BCB1F8
// Variables
$FileName = "";
$Redirect = "";
$Tpl = "";
$TemplateFileName = "";
$BlockToParse = "";
$ComponentName = "";
$Attributes = "";
// Events;
$CCSEvents = "";
$CCSEventResult = "";
$FileName = FileName;
$Redirect = "";
$TemplateFileName = "index1.html";
$BlockToParse = "main";
$TemplateEncoding = "UTF-8";
$ContentType = "text/html";
$PathToRoot = "./";
$Charset = $Charset ? $Charset : "utf-8";
//End Initialize Page
//Include events file @1-B7D86394
include_once("./index_events.php");
//End Include events file
//Before Initialize @1-E870CEBC
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeInitialize", $MainPage);
//End Before Initialize
//Initialize Objects @1-4DDE7F20
$DBeasy = new clsDBeasy();
$MainPage->Connections["easy"] = & $DBeasy;
$Attributes = new clsAttributes("page:");
$MainPage->Attributes = & $Attributes;
// Controls
$gen_ad = new clshome_ad("inc/", "gen_ad", $MainPage);
$gen_ad->Initialize();
$tb_site = new clsGridtb_site("", $MainPage);
$tb_subsite = new clsGridtb_subsite("", $MainPage);
$main_ad = new clsmain_ad("inc/", "main_ad", $MainPage);
$main_ad->Initialize();
$tb_site1 = new clsGridtb_site1("", $MainPage);
$gen_sub = new clshome_sub("inc/", "gen_sub", $MainPage);
$gen_sub->Initialize();
$homeflash = new clshomeflash("inc/", "homeflash", $MainPage);
$homeflash->Initialize();
$header = new clsheader("inc/", "header", $MainPage);
$header->Initialize();
$footer = new clsfooter("inc/", "footer", $MainPage);
$footer->Initialize();
$shownews = new clsPanel("shownews", $MainPage);
$news_inc = new clsnews_inc("inc/", "news_inc", $MainPage);
$news_inc->Initialize();
$bg = new clsGridbg("", $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";
$users = new clsGridusers("", $MainPage);
$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";
$showlp = new clsPanel("showlp", $MainPage);
$tb_r_users2 = new clsGridtb_r_users2("", $MainPage);
$tb_rm1 = new clsGridtb_rm1("", $MainPage);
$rmlink1 = new clsControl(ccsLink, "rmlink1", "rmlink1", ccsText, "", CCGetRequestParam("rmlink1", ccsGet, NULL), $MainPage);
$rmlink1->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$rmlink1->Page = "lra.php";
$culogout5 = new clsControl(ccsLink, "culogout5", "culogout5", ccsText, "", CCGetRequestParam("culogout5", ccsGet, NULL), $MainPage);
$culogout5->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$culogout5->Page = "logout.php";
$showlu = new clsPanel("showlu", $MainPage);
$tb_r_users3 = new clsGridtb_r_users3("", $MainPage);
$tb_ru1 = new clsGridtb_ru1("", $MainPage);
$MainPage->gen_ad = & $gen_ad;
$MainPage->tb_site = & $tb_site;
$MainPage->tb_subsite = & $tb_subsite;
$MainPage->main_ad = & $main_ad;
$MainPage->tb_site1 = & $tb_site1;
$MainPage->gen_sub = & $gen_sub;
$MainPage->homeflash = & $homeflash;
$MainPage->header = & $header;
$MainPage->footer = & $footer;
$MainPage->shownews = & $shownews;
$MainPage->news_inc = & $news_inc;
$MainPage->bg = & $bg;
$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->users = & $users;
$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;
$MainPage->showlp = & $showlp;
$MainPage->tb_r_users2 = & $tb_r_users2;
$MainPage->tb_rm1 = & $tb_rm1;
$MainPage->rmlink1 = & $rmlink1;
$MainPage->culogout5 = & $culogout5;
$MainPage->showlu = & $showlu;
$MainPage->tb_r_users3 = & $tb_r_users3;
$MainPage->tb_ru1 = & $tb_ru1;
$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);
$showlp->Visible = false;
$showlp->AddComponent("tb_r_users2", $tb_r_users2);
$showlp->AddComponent("tb_rm1", $tb_rm1);
$showlp->AddComponent("rmlink1", $rmlink1);
$showlp->AddComponent("culogout5", $culogout5);
$showlu->Visible = false;
$showlu->AddComponent("tb_r_users3", $tb_r_users3);
$showlu->AddComponent("tb_ru1", $tb_ru1);
$tb_site->Initialize();
$tb_subsite->Initialize();
$tb_site1->Initialize();
$bg->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();
$users->Initialize();
$tb_ag_users->Initialize();
$tb_sa->Initialize();
$tb_d_users->Initialize();
$tb_dl->Initialize();
$tb_r_users2->Initialize();
$tb_rm1->Initialize();
$tb_r_users3->Initialize();
$tb_ru1->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-DC519672
$gen_ad->Operations();
$main_ad->Operations();
$gen_sub->Operations();
$homeflash->Operations();
$header->Operations();
$footer->Operations();
$news_inc->Operations();
$Login->Operation();
//End Execute Components
//Go to destination page @1-29317F99
if($Redirect)
{
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
$DBeasy->close();
header("Location: " . $Redirect);
$gen_ad->Class_Terminate();
unset($gen_ad);
unset($tb_site);
unset($tb_subsite);
$main_ad->Class_Terminate();
unset($main_ad);
unset($tb_site1);
$gen_sub->Class_Terminate();
unset($gen_sub);
$homeflash->Class_Terminate();
unset($homeflash);
$header->Class_Terminate();
unset($header);
$footer->Class_Terminate();
unset($footer);
$news_inc->Class_Terminate();
unset($news_inc);
unset($bg);
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($users);
unset($Login);
unset($tb_ag_users);
unset($tb_sa);
unset($tb_d_users);
unset($tb_dl);
unset($tb_r_users2);
unset($tb_rm1);
unset($tb_r_users3);
unset($tb_ru1);
unset($Tpl);
exit;
}
//End Go to destination page
//Show Page @1-AD78301B
$gen_ad->Show();
$tb_site->Show();
$tb_subsite->Show();
$main_ad->Show();
$tb_site1->Show();
$gen_sub->Show();
$homeflash->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();
$showlp->Show();
$showlu->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-20DBC02A
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
$DBeasy->close();
$gen_ad->Class_Terminate();
unset($gen_ad);
unset($tb_site);
unset($tb_subsite);
$main_ad->Class_Terminate();
unset($main_ad);
unset($tb_site1);
$gen_sub->Class_Terminate();
unset($gen_sub);
$homeflash->Class_Terminate();
unset($homeflash);
$header->Class_Terminate();
unset($header);
$footer->Class_Terminate();
unset($footer);
$news_inc->Class_Terminate();
unset($news_inc);
unset($bg);
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($users);
unset($Login);
unset($tb_ag_users);
unset($tb_sa);
unset($tb_d_users);
unset($tb_dl);
unset($tb_r_users2);
unset($tb_rm1);
unset($tb_r_users3);
unset($tb_ru1);
unset($Tpl);
//End Unload Page
?>