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->headad = new clsControl(ccsImage, "headad", "headad", ccsText, "", CCGetRequestParam("headad", ccsGet, NULL), $this);
$this->title = new clsControl(ccsLabel, "title", "title", ccsText, "", CCGetRequestParam("title", ccsGet, NULL), $this);
$this->picture = new clsControl(ccsImage, "picture", "picture", ccsText, "", CCGetRequestParam("picture", ccsGet, NULL), $this);
$this->caption = new clsControl(ccsLabel, "caption", "caption", ccsText, "", CCGetRequestParam("caption", ccsGet, NULL), $this);
$this->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("headad", $this->headad);
$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-C216E62D
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["expr9"] = "help";
$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["headad"] = $this->headad->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->headad->SetValue($this->DataSource->headad->GetValue());
$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);
}
}
else { // Show NoRecords block if no records are found
$this->Attributes->Show();
$Tpl->parse("NoRecords", false);
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @7-E3297747
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->headad->Errors->ToString());
$errors = ComposeStrings($errors, $this->title->Errors->ToString());
$errors = ComposeStrings($errors, $this->picture->Errors->ToString());
$errors = ComposeStrings($errors, $this->caption->Errors->ToString());
$errors = ComposeStrings($errors, $this->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-98BAE0DB
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $headad;
public $title;
public $picture;
public $caption;
public $content;
public $linkcaption;
//End DataSource Variables
//DataSourceClass_Initialize Event @7-6F59F18B
function clstb_siteDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_site";
$this->Initialize();
$this->headad = new clsField("headad", ccsText, "");
$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-BFDADDE4
function SetValues()
{
$this->headad->SetDBValue($this->f("headad"));
$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
//Include Page implementation @4-697796E3
include_once(RelativePath . "/inc/gen_sub.php");
//End Include Page implementation
//Include Page implementation @2-80DD80B4
include_once(RelativePath . "/inc/header.php");
//End Include Page implementation
//Include Page implementation @5-E5D4CE8B
include_once(RelativePath . "/inc/footer.php");
//End Include Page implementation
class clsGridbg { //bg class @35-2689D52B
//Variables @35-6E51DF5A
// Public variables
public $ComponentType = "Grid";
public $ComponentName;
public $Visible;
public $Errors;
public $ErrorBlock;
public $ds;
public $DataSource;
public $PageSize;
public $IsEmpty;
public $ForceIteration = false;
public $HasRecord = false;
public $SorterName = "";
public $SorterDirection = "";
public $PageNumber;
public $RowNumber;
public $ControlsVisible = array();
public $CCSEvents = "";
public $CCSEventResult;
public $RelativePath = "";
public $Attributes;
// Grid Controls
public $StaticControls;
public $RowControls;
//End Variables
//Class_Initialize Event @35-807C668D
function clsGridbg($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "bg";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid bg";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clsbgDataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 1;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100)
$this->PageSize = 100;
if($this->PageSize == 0)
$this->Errors->addError("Form: Grid " . $this->ComponentName . "
Error: (CCS06) Invalid page size.
");
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0) $this->PageNumber = 1;
$this->snews = new clsControl(ccsHidden, "snews", "snews", ccsText, "", CCGetRequestParam("snews", ccsGet, NULL), $this);
}
//End Class_Initialize Event
//Initialize Method @35-90E704C5
function Initialize()
{
if(!$this->Visible) return;
$this->DataSource->PageSize = & $this->PageSize;
$this->DataSource->AbsolutePage = & $this->PageNumber;
$this->DataSource->SetOrder($this->SorterName, $this->SorterDirection);
}
//End Initialize Method
//Show Method @35-10FEC224
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this);
$this->DataSource->Prepare();
$this->DataSource->Open();
$this->HasRecord = $this->DataSource->has_next_record();
$this->IsEmpty = ! $this->HasRecord;
$this->Attributes->Show();
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this);
if(!$this->Visible) return;
$GridBlock = "Grid " . $this->ComponentName;
$ParentPath = $Tpl->block_path;
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
if (!$this->IsEmpty) {
$this->ControlsVisible["snews"] = $this->snews->Visible;
while ($this->ForceIteration || (($this->RowNumber < $this->PageSize) && ($this->HasRecord = $this->DataSource->has_next_record()))) {
$this->RowNumber++;
if ($this->HasRecord) {
$this->DataSource->next_record();
$this->DataSource->SetValues();
}
$Tpl->block_path = $ParentPath . "/" . $GridBlock . "/Row";
$this->snews->SetValue($this->DataSource->snews->GetValue());
$this->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->snews->Show();
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
$Tpl->parse("Row", true);
}
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @35-6E5E02F9
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->snews->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End bg Class @35-FCB6E20C
class clsbgDataSource extends clsDBeasy { //bgDataSource Class @35-44C11189
//DataSource Variables @35-9E76664F
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $snews;
//End DataSource Variables
//DataSourceClass_Initialize Event @35-E95BD331
function clsbgDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid bg";
$this->Initialize();
$this->snews = new clsField("snews", ccsText, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @35-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @35-14D6CD9D
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
}
//End Prepare Method
//Open Method @35-159108FA
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM db_bg";
$this->SQL = "SELECT * \n\n" .
"FROM db_bg {SQL_Where} {SQL_OrderBy}";
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect", $this->Parent);
if ($this->CountSQL)
$this->RecordsCount = CCGetDBValue(CCBuildSQL($this->CountSQL, $this->Where, ""), $this);
else
$this->RecordsCount = "CCS not counted";
$this->query($this->OptimizeSQL(CCBuildSQL($this->SQL, $this->Where, $this->Order)));
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect", $this->Parent);
}
//End Open Method
//SetValues Method @35-F2FC20F4
function SetValues()
{
$this->snews->SetDBValue($this->f("snews"));
}
//End SetValues Method
} //End bgDataSource Class @35-FCB6E20C
//Include Page implementation @38-3E5A21C3
include_once(RelativePath . "/inc/news_inc.php");
//End Include Page implementation
class clsGridusers { //users class @40-0CB76799
//Variables @40-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 @40-8F30ABD9
function clsGridusers($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "users";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid users";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clsusersDataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 1;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100)
$this->PageSize = 100;
if($this->PageSize == 0)
$this->Errors->addError("Form: Grid " . $this->ComponentName . "
Error: (CCS06) Invalid page size.
");
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0) $this->PageNumber = 1;
$this->group_id = new clsControl(ccsHidden, "group_id", "group_id", ccsInteger, "", CCGetRequestParam("group_id", ccsGet, NULL), $this);
}
//End Class_Initialize Event
//Initialize Method @40-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 @40-C44FCE3F
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["sesUserID"] = CCGetSession("UserID", NULL);
$this->DataSource->Parameters["sesUserLogin"] = CCGetSession("UserLogin", NULL);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this);
$this->DataSource->Prepare();
$this->DataSource->Open();
$this->HasRecord = $this->DataSource->has_next_record();
$this->IsEmpty = ! $this->HasRecord;
$this->Attributes->Show();
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this);
if(!$this->Visible) return;
$GridBlock = "Grid " . $this->ComponentName;
$ParentPath = $Tpl->block_path;
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
if (!$this->IsEmpty) {
$this->ControlsVisible["group_id"] = $this->group_id->Visible;
while ($this->ForceIteration || (($this->RowNumber < $this->PageSize) && ($this->HasRecord = $this->DataSource->has_next_record()))) {
$this->RowNumber++;
if ($this->HasRecord) {
$this->DataSource->next_record();
$this->DataSource->SetValues();
}
$Tpl->block_path = $ParentPath . "/" . $GridBlock . "/Row";
$this->group_id->SetValue($this->DataSource->group_id->GetValue());
$this->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->group_id->Show();
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
$Tpl->parse("Row", true);
}
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @40-21D9DDD8
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->group_id->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End users Class @40-FCB6E20C
class clsusersDataSource extends clsDBeasy { //usersDataSource Class @40-6A08F44A
//DataSource Variables @40-39BE6FA9
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $group_id;
//End DataSource Variables
//DataSourceClass_Initialize Event @40-737FCE65
function clsusersDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid users";
$this->Initialize();
$this->group_id = new clsField("group_id", ccsInteger, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @40-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @40-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 @40-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 @40-AD96E205
function SetValues()
{
$this->group_id->SetDBValue(trim($this->f("group_id")));
}
//End SetValues Method
} //End usersDataSource Class @40-FCB6E20C
class clsGridtb_c_users { //tb_c_users class @46-C6A005B9
//Variables @46-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 @46-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 @46-90E704C5
function Initialize()
{
if(!$this->Visible) return;
$this->DataSource->PageSize = & $this->PageSize;
$this->DataSource->AbsolutePage = & $this->PageNumber;
$this->DataSource->SetOrder($this->SorterName, $this->SorterDirection);
}
//End Initialize Method
//Show Method @46-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 @46-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 @46-FCB6E20C
class clstb_c_usersDataSource extends clsDBeasy { //tb_c_usersDataSource Class @46-8BB191E6
//DataSource Variables @46-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 @46-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 @46-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @46-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 @46-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 @46-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 @46-FCB6E20C
class clsGridtb_cmps { //tb_cmps class @53-B8B89B31
//Variables @53-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 @53-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 @53-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 @53-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 @53-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 @53-FCB6E20C
class clstb_cmpsDataSource extends clsDBeasy { //tb_cmpsDataSource Class @53-C700919C
//DataSource Variables @53-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 @53-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 @53-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @53-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 @53-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 @53-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 @53-FCB6E20C
class clsGridtb_c_users4 { //tb_c_users4 class @61-D04FBFDE
//Variables @61-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 @61-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 @61-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 @61-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 @61-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 @61-FCB6E20C
class clstb_c_users4DataSource extends clsDBeasy { //tb_c_users4DataSource Class @61-628BCB1F
//DataSource Variables @61-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 @61-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 @61-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @61-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 @61-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 @61-CFD21D2E
function SetValues()
{
$this->account->SetDBValue(trim($this->f("account")));
}
//End SetValues Method
} //End tb_c_users4DataSource Class @61-FCB6E20C
class clsGridtb_c_users1 { //tb_c_users1 class @96-AD384B9B
//Variables @96-6E51DF5A
// Public variables
public $ComponentType = "Grid";
public $ComponentName;
public $Visible;
public $Errors;
public $ErrorBlock;
public $ds;
public $DataSource;
public $PageSize;
public $IsEmpty;
public $ForceIteration = false;
public $HasRecord = false;
public $SorterName = "";
public $SorterDirection = "";
public $PageNumber;
public $RowNumber;
public $ControlsVisible = array();
public $CCSEvents = "";
public $CCSEventResult;
public $RelativePath = "";
public $Attributes;
// Grid Controls
public $StaticControls;
public $RowControls;
//End Variables
//Class_Initialize Event @96-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 @96-90E704C5
function Initialize()
{
if(!$this->Visible) return;
$this->DataSource->PageSize = & $this->PageSize;
$this->DataSource->AbsolutePage = & $this->PageNumber;
$this->DataSource->SetOrder($this->SorterName, $this->SorterDirection);
}
//End Initialize Method
//Show Method @96-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 @96-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 @96-FCB6E20C
class clstb_c_users1DataSource extends clsDBeasy { //tb_c_users1DataSource Class @96-65E9C276
//DataSource Variables @96-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 @96-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 @96-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @96-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 @96-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 @96-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 @96-FCB6E20C
class clsGridtb_c_users2 { //tb_c_users2 class @103-86151858
//Variables @103-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 @103-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 @103-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 @103-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 @103-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 @103-FCB6E20C
class clstb_c_users2DataSource extends clsDBeasy { //tb_c_users2DataSource Class @103-6737C551
//DataSource Variables @103-404AA26D
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
//End DataSource Variables
//DataSourceClass_Initialize Event @103-24180DC7
function clstb_c_users2DataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_c_users2";
$this->Initialize();
}
//End DataSourceClass_Initialize Event
//SetOrder Method @103-24FF35BF
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
}
//End SetOrder Method
//Prepare Method @103-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 @103-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 @103-BAF0975B
function SetValues()
{
}
//End SetValues Method
} //End tb_c_users2DataSource Class @103-FCB6E20C
class clsGridtb_r_users { //tb_r_users class @130-76B1340C
//Variables @130-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 @130-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 @130-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 @130-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 @130-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 @130-FCB6E20C
class clstb_r_usersDataSource extends clsDBeasy { //tb_r_usersDataSource Class @130-8A85D973
//DataSource Variables @130-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 @130-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 @130-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @130-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 @130-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 @130-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 @130-FCB6E20C
class clsGridtb_ru { //tb_ru class @137-53A7B54D
//Variables @137-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 @137-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 @137-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 @137-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 @137-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 @137-FCB6E20C
class clstb_ruDataSource extends clsDBeasy { //tb_ruDataSource Class @137-AF740678
//DataSource Variables @137-404AA26D
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
//End DataSource Variables
//DataSourceClass_Initialize Event @137-AD4E7ED8
function clstb_ruDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_ru";
$this->Initialize();
}
//End DataSourceClass_Initialize Event
//SetOrder Method @137-24FF35BF
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
}
//End SetOrder Method
//Prepare Method @137-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 @137-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 @137-BAF0975B
function SetValues()
{
}
//End SetValues Method
} //End tb_ruDataSource Class @137-FCB6E20C
class clsGridtb_r_users1 { //tb_r_users1 class @162-16831DA9
//Variables @162-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 @162-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 @162-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 @162-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 @162-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 @162-FCB6E20C
class clstb_r_users1DataSource extends clsDBeasy { //tb_r_users1DataSource Class @162-E58D91F5
//DataSource Variables @162-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 @162-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 @162-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @162-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 @162-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 @162-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 @162-FCB6E20C
class clsGridtb_rm { //tb_rm class @169-D1BC2D14
//Variables @169-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 @169-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 @169-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 @169-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 @169-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 @169-FCB6E20C
class clstb_rmDataSource extends clsDBeasy { //tb_rmDataSource Class @169-B9843F40
//DataSource Variables @169-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 @169-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 @169-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @169-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 @169-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 @169-13076841
function SetValues()
{
$this->account->SetDBValue(trim($this->f("mainaccount")));
$this->retailer->SetDBValue($this->f("retailer"));
}
//End SetValues Method
} //End tb_rmDataSource Class @169-FCB6E20C
class clsGridtb_sd_users { //tb_sd_users class @198-852889BA
//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-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 @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-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 @198-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 @198-FCB6E20C
class clstb_sd_usersDataSource extends clsDBeasy { //tb_sd_usersDataSource Class @198-F67768C4
//DataSource Variables @198-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 @198-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 @198-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @198-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 @198-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 @198-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 @198-FCB6E20C
class clsGridtb_sd { //tb_sd class @205-01BCFC6A
//Variables @205-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 @205-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 @205-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 @205-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 @205-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 @205-FCB6E20C
class clstb_sdDataSource extends clsDBeasy { //tb_sdDataSource Class @205-D699F391
//DataSource Variables @205-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 @205-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 @205-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @205-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 @205-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 @205-E66645E5
function SetValues()
{
$this->account->SetDBValue(trim($this->f("mainaccount")));
$this->wholesaler->SetDBValue($this->f("wholesaler"));
}
//End SetValues Method
} //End tb_sdDataSource Class @205-FCB6E20C
class clsRecordLogin { //Login Class @242-58926B8F
//Variables @242-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 @242-7A72E167
function clsRecordLogin($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->Visible = true;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Record Login/Error";
$this->ReadAllowed = true;
if($this->Visible)
{
$this->ComponentName = "Login";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$CCSForm = split(":", CCGetFromGet("ccsForm", ""), 2);
if(sizeof($CCSForm) == 1)
$CCSForm[1] = "";
list($FormName, $FormMethod) = $CCSForm;
$this->FormEnctype = "application/x-www-form-urlencoded";
$this->FormSubmitted = ($FormName == $this->ComponentName);
$Method = $this->FormSubmitted ? ccsPost : ccsGet;
$this->login = new clsControl(ccsTextBox, "login", "login", ccsText, "", CCGetRequestParam("login", $Method, NULL), $this);
$this->login->Required = true;
$this->password = new clsControl(ccsTextBox, "password", "password", ccsText, "", CCGetRequestParam("password", $Method, NULL), $this);
$this->password->Required = true;
$this->Button_DoLogin = new clsButton("Button_DoLogin", $Method, $this);
$this->autoLogin = new clsControl(ccsHidden, "autoLogin", "autoLogin", ccsBoolean, $CCSLocales->GetFormatInfo("BooleanFormat"), CCGetRequestParam("autoLogin", $Method, NULL), $this);
}
}
//End Class_Initialize Event
//Validate Method @242-E943E0FF
function Validate()
{
global $CCSLocales;
$Validation = true;
$Where = "";
$Validation = ($this->login->Validate() && $Validation);
$Validation = ($this->password->Validate() && $Validation);
$Validation = ($this->autoLogin->Validate() && $Validation);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "OnValidate", $this);
$Validation = $Validation && ($this->login->Errors->Count() == 0);
$Validation = $Validation && ($this->password->Errors->Count() == 0);
$Validation = $Validation && ($this->autoLogin->Errors->Count() == 0);
return (($this->Errors->Count() == 0) && $Validation);
}
//End Validate Method
//CheckErrors Method @242-91657E88
function CheckErrors()
{
$errors = false;
$errors = ($errors || $this->login->Errors->Count());
$errors = ($errors || $this->password->Errors->Count());
$errors = ($errors || $this->autoLogin->Errors->Count());
$errors = ($errors || $this->Errors->Count());
return $errors;
}
//End CheckErrors Method
//MasterDetail @242-ED598703
function SetPrimaryKeys($keyArray)
{
$this->PrimaryKeys = $keyArray;
}
function GetPrimaryKeys()
{
return $this->PrimaryKeys;
}
function GetPrimaryKey($keyName)
{
return $this->PrimaryKeys[$keyName];
}
//End MasterDetail
//Operation Method @242-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 @242-A23B838B
function Show()
{
global $CCSUseAmp;
global $Tpl;
global $FileName;
global $CCSLocales;
$Error = "";
if(!$this->Visible)
return;
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this);
$RecordBlock = "Record " . $this->ComponentName;
$ParentPath = $Tpl->block_path;
$Tpl->block_path = $ParentPath . "/" . $RecordBlock;
$this->EditMode = $this->EditMode && $this->ReadAllowed;
if($this->FormSubmitted || $this->CheckErrors()) {
$Error = "";
$Error = ComposeStrings($Error, $this->login->Errors->ToString());
$Error = ComposeStrings($Error, $this->password->Errors->ToString());
$Error = ComposeStrings($Error, $this->autoLogin->Errors->ToString());
$Error = ComposeStrings($Error, $this->Errors->ToString());
$Tpl->SetVar("Error", $Error);
$Tpl->Parse("Error", false);
}
$CCSForm = $this->EditMode ? $this->ComponentName . ":" . "Edit" : $this->ComponentName;
$this->HTMLFormAction = $FileName . "?" . CCAddParam(CCGetQueryString("QueryString", ""), "ccsForm", $CCSForm);
$Tpl->SetVar("Action", !$CCSUseAmp ? $this->HTMLFormAction : str_replace("&", "&", $this->HTMLFormAction));
$Tpl->SetVar("HTMLFormName", $this->ComponentName);
$Tpl->SetVar("HTMLFormEnctype", $this->FormEnctype);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this);
$this->Attributes->Show();
if(!$this->Visible) {
$Tpl->block_path = $ParentPath;
return;
}
$this->login->Show();
$this->password->Show();
$this->Button_DoLogin->Show();
$this->autoLogin->Show();
$Tpl->parse();
$Tpl->block_path = $ParentPath;
}
//End Show Method
} //End Login Class @242-FCB6E20C
class clsGridtb_ag_users { //tb_ag_users class @258-8991E4AE
//Variables @258-6E51DF5A
// Public variables
public $ComponentType = "Grid";
public $ComponentName;
public $Visible;
public $Errors;
public $ErrorBlock;
public $ds;
public $DataSource;
public $PageSize;
public $IsEmpty;
public $ForceIteration = false;
public $HasRecord = false;
public $SorterName = "";
public $SorterDirection = "";
public $PageNumber;
public $RowNumber;
public $ControlsVisible = array();
public $CCSEvents = "";
public $CCSEventResult;
public $RelativePath = "";
public $Attributes;
// Grid Controls
public $StaticControls;
public $RowControls;
//End Variables
//Class_Initialize Event @258-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 @258-90E704C5
function Initialize()
{
if(!$this->Visible) return;
$this->DataSource->PageSize = & $this->PageSize;
$this->DataSource->AbsolutePage = & $this->PageNumber;
$this->DataSource->SetOrder($this->SorterName, $this->SorterDirection);
}
//End Initialize Method
//Show Method @258-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 @258-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 @258-FCB6E20C
class clstb_ag_usersDataSource extends clsDBeasy { //tb_ag_usersDataSource Class @258-9046F604
//DataSource Variables @258-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 @258-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 @258-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @258-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 @258-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 @258-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 @258-FCB6E20C
class clsGridtb_sa { //tb_sa class @265-7CCB082F
//Variables @265-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 @265-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 @265-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 @265-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 @265-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 @265-FCB6E20C
class clstb_saDataSource extends clsDBeasy { //tb_saDataSource Class @265-D1FBFAF8
//DataSource Variables @265-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 @265-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 @265-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @265-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 @265-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 @265-CFD21D2E
function SetValues()
{
$this->account->SetDBValue(trim($this->f("account")));
}
//End SetValues Method
} //End tb_saDataSource Class @265-FCB6E20C
class clsGridtb_d_users { //tb_d_users class @290-CC650CA0
//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-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 @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_d_users Class @290-FCB6E20C
class clstb_d_usersDataSource extends clsDBeasy { //tb_d_usersDataSource Class @290-743E2664
//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-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 @290-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @290-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 @290-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 @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_d_usersDataSource Class @290-FCB6E20C
class clsGridtb_dl { //tb_dl class @297-D00CC397
//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-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 @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-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 @297-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 @297-FCB6E20C
class clstb_dlDataSource extends clsDBeasy { //tb_dlDataSource Class @297-AF989FC1
//DataSource Variables @297-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 @297-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 @297-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @297-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 @297-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 @297-60291B95
function SetValues()
{
$this->account->SetDBValue(trim($this->f("mainaccount")));
$this->Dealer->SetDBValue($this->f("Dealer"));
}
//End SetValues Method
} //End tb_dlDataSource Class @297-FCB6E20C
class clsGridtb_help { //tb_help class @329-34CD8B18
//Variables @329-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 @329-0A1B9223
function clsGridtb_help($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "tb_help";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid tb_help";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clstb_helpDataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 5;
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(ccsLink, "title", "title", ccsText, "", CCGetRequestParam("title", ccsGet, NULL), $this);
$this->title->Page = "helpcenter.php";
$this->tb_help_TotalRecords = new clsControl(ccsLabel, "tb_help_TotalRecords", "tb_help_TotalRecords", ccsText, "", CCGetRequestParam("tb_help_TotalRecords", ccsGet, NULL), $this);
$this->Navigator = new clsNavigator($this->ComponentName, "Navigator", $FileName, 10, tpCentered, $this);
$this->Navigator->PageSizes = array("1", "5", "10", "25", "50");
}
//End Class_Initialize Event
//Initialize Method @329-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 @329-DEC02EB0
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["urls_title"] = CCGetFromGet("s_title", NULL);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this);
$this->DataSource->Prepare();
$this->DataSource->Open();
$this->HasRecord = $this->DataSource->has_next_record();
$this->IsEmpty = ! $this->HasRecord;
if ($this->DataSource->PageCount() <= 1) {
$this->Navigator->Visible = false;
}
$this->Attributes->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;
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("help"));
$this->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->title->Show();
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
$Tpl->parse("Row", true);
}
}
else { // Show NoRecords block if no records are found
$this->Attributes->Show();
$Tpl->parse("NoRecords", false);
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$this->Navigator->PageNumber = $this->DataSource->AbsolutePage;
$this->Navigator->PageSize = $this->PageSize;
if ($this->DataSource->RecordsCount == "CCS not counted")
$this->Navigator->TotalPages = $this->DataSource->AbsolutePage + ($this->DataSource->next_record() ? 1 : 0);
else
$this->Navigator->TotalPages = $this->DataSource->PageCount();
$this->tb_help_TotalRecords->Show();
$this->Navigator->Show();
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @329-0365E829
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->title->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End tb_help Class @329-FCB6E20C
class clstb_helpDataSource extends clsDBeasy { //tb_helpDataSource Class @329-E6C5DD37
//DataSource Variables @329-D51D435B
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $title;
//End DataSource Variables
//DataSourceClass_Initialize Event @329-23F26F81
function clstb_helpDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid tb_help";
$this->Initialize();
$this->title = new clsField("title", ccsText, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @329-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @329-0AA53E8A
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "urls_title", ccsText, "", "", $this->Parameters["urls_title"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opContains, "title", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsText),false);
$this->Where =
$this->wp->Criterion[1];
}
//End Prepare Method
//Open Method @329-0BFF8F63
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*)\n\n" .
"FROM tb_help";
$this->SQL = "SELECT * \n\n" .
"FROM tb_help {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 @329-D28A4839
function SetValues()
{
$this->title->SetDBValue($this->f("title"));
}
//End SetValues Method
} //End tb_helpDataSource Class @329-FCB6E20C
class clsRecordtb_helpSearch { //tb_helpSearch Class @330-A15EE410
//Variables @330-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 @330-ECA5FF5A
function clsRecordtb_helpSearch($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->Visible = true;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Record tb_helpSearch/Error";
$this->ReadAllowed = true;
if($this->Visible)
{
$this->ComponentName = "tb_helpSearch";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$CCSForm = split(":", CCGetFromGet("ccsForm", ""), 2);
if(sizeof($CCSForm) == 1)
$CCSForm[1] = "";
list($FormName, $FormMethod) = $CCSForm;
$this->FormEnctype = "application/x-www-form-urlencoded";
$this->FormSubmitted = ($FormName == $this->ComponentName);
$Method = $this->FormSubmitted ? ccsPost : ccsGet;
$this->s_title = new clsControl(ccsTextBox, "s_title", "s_title", ccsText, "", CCGetRequestParam("s_title", $Method, NULL), $this);
$this->Button_DoSearch = new clsButton("Button_DoSearch", $Method, $this);
}
}
//End Class_Initialize Event
//Validate Method @330-ED5D81B5
function Validate()
{
global $CCSLocales;
$Validation = true;
$Where = "";
$Validation = ($this->s_title->Validate() && $Validation);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "OnValidate", $this);
$Validation = $Validation && ($this->s_title->Errors->Count() == 0);
return (($this->Errors->Count() == 0) && $Validation);
}
//End Validate Method
//CheckErrors Method @330-E8312E87
function CheckErrors()
{
$errors = false;
$errors = ($errors || $this->s_title->Errors->Count());
$errors = ($errors || $this->Errors->Count());
return $errors;
}
//End CheckErrors Method
//MasterDetail @330-ED598703
function SetPrimaryKeys($keyArray)
{
$this->PrimaryKeys = $keyArray;
}
function GetPrimaryKeys()
{
return $this->PrimaryKeys;
}
function GetPrimaryKey($keyName)
{
return $this->PrimaryKeys[$keyName];
}
//End MasterDetail
//Operation Method @330-29A61629
function Operation()
{
if(!$this->Visible)
return;
global $Redirect;
global $FileName;
if(!$this->FormSubmitted) {
return;
}
if($this->FormSubmitted) {
$this->PressedButton = "Button_DoSearch";
if($this->Button_DoSearch->Pressed) {
$this->PressedButton = "Button_DoSearch";
}
}
$Redirect = "help.php";
if($this->Validate()) {
if($this->PressedButton == "Button_DoSearch") {
$Redirect = "help.php" . "?" . CCMergeQueryStrings(CCGetQueryString("Form", array("Button_DoSearch", "Button_DoSearch_x", "Button_DoSearch_y")));
if(!CCGetEvent($this->Button_DoSearch->CCSEvents, "OnClick", $this->Button_DoSearch)) {
$Redirect = "";
}
}
} else {
$Redirect = "";
}
}
//End Operation Method
//Show Method @330-D2384A03
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->s_title->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->s_title->Show();
$this->Button_DoSearch->Show();
$Tpl->parse();
$Tpl->block_path = $ParentPath;
}
//End Show Method
} //End tb_helpSearch Class @330-FCB6E20C
//Initialize Page @1-81E57312
// Variables
$FileName = "";
$Redirect = "";
$Tpl = "";
$TemplateFileName = "";
$BlockToParse = "";
$ComponentName = "";
$Attributes = "";
// Events;
$CCSEvents = "";
$CCSEventResult = "";
$FileName = FileName;
$Redirect = "";
$TemplateFileName = "help.html";
$BlockToParse = "main";
$TemplateEncoding = "UTF-8";
$ContentType = "text/html";
$PathToRoot = "./";
$Charset = $Charset ? $Charset : "utf-8";
//End Initialize Page
//Include events file @1-E8632D5B
include_once("./help_events.php");
//End Include events file
//Before Initialize @1-E870CEBC
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeInitialize", $MainPage);
//End Before Initialize
//Initialize Objects @1-C2365FF1
$DBeasy = new clsDBeasy();
$MainPage->Connections["easy"] = & $DBeasy;
$Attributes = new clsAttributes("page:");
$MainPage->Attributes = & $Attributes;
// Controls
$gen_ad = new clsgen_ad("inc/", "gen_ad", $MainPage);
$gen_ad->Initialize();
$tb_site = new clsGridtb_site("", $MainPage);
$gen_sub = new clsgen_sub("inc/", "gen_sub", $MainPage);
$gen_sub->Initialize();
$header = new clsheader("inc/", "header", $MainPage);
$header->Initialize();
$footer = new clsfooter("inc/", "footer", $MainPage);
$footer->Initialize();
$bg = new clsGridbg("", $MainPage);
$shownews = new clsPanel("shownews", $MainPage);
$news_inc = new clsnews_inc("inc/", "news_inc", $MainPage);
$news_inc->Initialize();
$users = new clsGridusers("", $MainPage);
$showcm = new clsPanel("showcm", $MainPage);
$tb_c_users = new clsGridtb_c_users("", $MainPage);
$tb_cmps = new clsGridtb_cmps("", $MainPage);
$tb_c_users4 = new clsGridtb_c_users4("", $MainPage);
$showcu = new clsPanel("showcu", $MainPage);
$tb_c_users1 = new clsGridtb_c_users1("", $MainPage);
$tb_c_users2 = new clsGridtb_c_users2("", $MainPage);
$showru = new clsPanel("showru", $MainPage);
$tb_r_users = new clsGridtb_r_users("", $MainPage);
$tb_ru = new clsGridtb_ru("", $MainPage);
$showrm = new clsPanel("showrm", $MainPage);
$tb_r_users1 = new clsGridtb_r_users1("", $MainPage);
$tb_rm = new clsGridtb_rm("", $MainPage);
$rmlink = new clsControl(ccsLink, "rmlink", "rmlink", ccsText, "", CCGetRequestParam("rmlink", ccsGet, NULL), $MainPage);
$rmlink->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$rmlink->Page = "ra.php";
$culogout3 = new clsControl(ccsLink, "culogout3", "culogout3", ccsText, "", CCGetRequestParam("culogout3", ccsGet, NULL), $MainPage);
$culogout3->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$culogout3->Page = "logout.php";
$showsd = new clsPanel("showsd", $MainPage);
$tb_sd_users = new clsGridtb_sd_users("", $MainPage);
$tb_sd = new clsGridtb_sd("", $MainPage);
$sdlink = new clsControl(ccsLink, "sdlink", "sdlink", ccsText, "", CCGetRequestParam("sdlink", ccsGet, NULL), $MainPage);
$sdlink->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$sdlink->Page = "sd.php";
$culogout2 = new clsControl(ccsLink, "culogout2", "culogout2", ccsText, "", CCGetRequestParam("culogout2", ccsGet, NULL), $MainPage);
$culogout2->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$culogout2->Page = "logout.php";
$showadmin = new clsPanel("showadmin", $MainPage);
$Link1 = new clsControl(ccsLink, "Link1", "Link1", ccsText, "", CCGetRequestParam("Link1", ccsGet, NULL), $MainPage);
$Link1->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$Link1->Page = "mtn/index.php";
$culogout4 = new clsControl(ccsLink, "culogout4", "culogout4", ccsText, "", CCGetRequestParam("culogout4", ccsGet, NULL), $MainPage);
$culogout4->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$culogout4->Page = "logout.php";
$showlogin = new clsPanel("showlogin", $MainPage);
$Login = new clsRecordLogin("", $MainPage);
$showsa = new clsPanel("showsa", $MainPage);
$tb_ag_users = new clsGridtb_ag_users("", $MainPage);
$tb_sa = new clsGridtb_sa("", $MainPage);
$showdl = new clsPanel("showdl", $MainPage);
$tb_d_users = new clsGridtb_d_users("", $MainPage);
$tb_dl = new clsGridtb_dl("", $MainPage);
$dllink = new clsControl(ccsLink, "dllink", "dllink", ccsText, "", CCGetRequestParam("dllink", ccsGet, NULL), $MainPage);
$dllink->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$dllink->Page = "dl.php";
$culogout1 = new clsControl(ccsLink, "culogout1", "culogout1", ccsText, "", CCGetRequestParam("culogout1", ccsGet, NULL), $MainPage);
$culogout1->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$culogout1->Page = "logout.php";
$showsp = new clsPanel("showsp", $MainPage);
$spllink = new clsControl(ccsLink, "spllink", "spllink", ccsText, "", CCGetRequestParam("spllink", ccsGet, NULL), $MainPage);
$spllink->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$spllink->Page = "sp.php";
$culogout = new clsControl(ccsLink, "culogout", "culogout", ccsText, "", CCGetRequestParam("culogout", ccsGet, NULL), $MainPage);
$culogout->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$culogout->Page = "logout.php";
$tb_help = new clsGridtb_help("", $MainPage);
$tb_helpSearch = new clsRecordtb_helpSearch("", $MainPage);
$MainPage->gen_ad = & $gen_ad;
$MainPage->tb_site = & $tb_site;
$MainPage->gen_sub = & $gen_sub;
$MainPage->header = & $header;
$MainPage->footer = & $footer;
$MainPage->bg = & $bg;
$MainPage->shownews = & $shownews;
$MainPage->news_inc = & $news_inc;
$MainPage->users = & $users;
$MainPage->showcm = & $showcm;
$MainPage->tb_c_users = & $tb_c_users;
$MainPage->tb_cmps = & $tb_cmps;
$MainPage->tb_c_users4 = & $tb_c_users4;
$MainPage->showcu = & $showcu;
$MainPage->tb_c_users1 = & $tb_c_users1;
$MainPage->tb_c_users2 = & $tb_c_users2;
$MainPage->showru = & $showru;
$MainPage->tb_r_users = & $tb_r_users;
$MainPage->tb_ru = & $tb_ru;
$MainPage->showrm = & $showrm;
$MainPage->tb_r_users1 = & $tb_r_users1;
$MainPage->tb_rm = & $tb_rm;
$MainPage->rmlink = & $rmlink;
$MainPage->culogout3 = & $culogout3;
$MainPage->showsd = & $showsd;
$MainPage->tb_sd_users = & $tb_sd_users;
$MainPage->tb_sd = & $tb_sd;
$MainPage->sdlink = & $sdlink;
$MainPage->culogout2 = & $culogout2;
$MainPage->showadmin = & $showadmin;
$MainPage->Link1 = & $Link1;
$MainPage->culogout4 = & $culogout4;
$MainPage->showlogin = & $showlogin;
$MainPage->Login = & $Login;
$MainPage->showsa = & $showsa;
$MainPage->tb_ag_users = & $tb_ag_users;
$MainPage->tb_sa = & $tb_sa;
$MainPage->showdl = & $showdl;
$MainPage->tb_d_users = & $tb_d_users;
$MainPage->tb_dl = & $tb_dl;
$MainPage->dllink = & $dllink;
$MainPage->culogout1 = & $culogout1;
$MainPage->showsp = & $showsp;
$MainPage->spllink = & $spllink;
$MainPage->culogout = & $culogout;
$MainPage->tb_help = & $tb_help;
$MainPage->tb_helpSearch = & $tb_helpSearch;
$shownews->Visible = false;
$shownews->AddComponent("news_inc", $news_inc);
$showcm->Visible = false;
$showcm->AddComponent("tb_c_users", $tb_c_users);
$showcm->AddComponent("tb_cmps", $tb_cmps);
$showcm->AddComponent("tb_c_users4", $tb_c_users4);
$showcu->Visible = false;
$showcu->AddComponent("tb_c_users1", $tb_c_users1);
$showcu->AddComponent("tb_c_users2", $tb_c_users2);
$showru->Visible = false;
$showru->AddComponent("tb_r_users", $tb_r_users);
$showru->AddComponent("tb_ru", $tb_ru);
$showrm->Visible = false;
$showrm->AddComponent("tb_r_users1", $tb_r_users1);
$showrm->AddComponent("tb_rm", $tb_rm);
$showrm->AddComponent("rmlink", $rmlink);
$showrm->AddComponent("culogout3", $culogout3);
$showsd->Visible = false;
$showsd->AddComponent("tb_sd_users", $tb_sd_users);
$showsd->AddComponent("tb_sd", $tb_sd);
$showsd->AddComponent("sdlink", $sdlink);
$showsd->AddComponent("culogout2", $culogout2);
$showadmin->Visible = false;
$showadmin->AddComponent("Link1", $Link1);
$showadmin->AddComponent("culogout4", $culogout4);
$showlogin->Visible = false;
$showlogin->AddComponent("Login", $Login);
$showsa->Visible = false;
$showsa->AddComponent("tb_ag_users", $tb_ag_users);
$showsa->AddComponent("tb_sa", $tb_sa);
$showdl->Visible = false;
$showdl->AddComponent("tb_d_users", $tb_d_users);
$showdl->AddComponent("tb_dl", $tb_dl);
$showdl->AddComponent("dllink", $dllink);
$showdl->AddComponent("culogout1", $culogout1);
$showsp->Visible = false;
$showsp->AddComponent("spllink", $spllink);
$showsp->AddComponent("culogout", $culogout);
$tb_site->Initialize();
$bg->Initialize();
$users->Initialize();
$tb_c_users->Initialize();
$tb_cmps->Initialize();
$tb_c_users4->Initialize();
$tb_c_users1->Initialize();
$tb_c_users2->Initialize();
$tb_r_users->Initialize();
$tb_ru->Initialize();
$tb_r_users1->Initialize();
$tb_rm->Initialize();
$tb_sd_users->Initialize();
$tb_sd->Initialize();
$tb_ag_users->Initialize();
$tb_sa->Initialize();
$tb_d_users->Initialize();
$tb_dl->Initialize();
$tb_help->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-9A7B18F8
$gen_ad->Operations();
$gen_sub->Operations();
$header->Operations();
$footer->Operations();
$news_inc->Operations();
$Login->Operation();
$tb_helpSearch->Operation();
//End Execute Components
//Go to destination page @1-558C90DA
if($Redirect)
{
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
$DBeasy->close();
header("Location: " . $Redirect);
$gen_ad->Class_Terminate();
unset($gen_ad);
unset($tb_site);
$gen_sub->Class_Terminate();
unset($gen_sub);
$header->Class_Terminate();
unset($header);
$footer->Class_Terminate();
unset($footer);
unset($bg);
$news_inc->Class_Terminate();
unset($news_inc);
unset($users);
unset($tb_c_users);
unset($tb_cmps);
unset($tb_c_users4);
unset($tb_c_users1);
unset($tb_c_users2);
unset($tb_r_users);
unset($tb_ru);
unset($tb_r_users1);
unset($tb_rm);
unset($tb_sd_users);
unset($tb_sd);
unset($Login);
unset($tb_ag_users);
unset($tb_sa);
unset($tb_d_users);
unset($tb_dl);
unset($tb_help);
unset($tb_helpSearch);
unset($Tpl);
exit;
}
//End Go to destination page
//Show Page @1-5CB33B0E
$gen_ad->Show();
$tb_site->Show();
$gen_sub->Show();
$header->Show();
$footer->Show();
$bg->Show();
$users->Show();
$tb_help->Show();
$tb_helpSearch->Show();
$shownews->Show();
$showcm->Show();
$showcu->Show();
$showru->Show();
$showrm->Show();
$showsd->Show();
$showadmin->Show();
$showlogin->Show();
$showsa->Show();
$showdl->Show();
$showsp->Show();
$Tpl->block_path = "";
$Tpl->Parse($BlockToParse, false);
if (!isset($main_block)) $main_block = $Tpl->GetVar($BlockToParse);
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeOutput", $MainPage);
if ($CCSEventResult) echo $main_block;
//End Show Page
//Unload Page @1-8026CAC6
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
$DBeasy->close();
$gen_ad->Class_Terminate();
unset($gen_ad);
unset($tb_site);
$gen_sub->Class_Terminate();
unset($gen_sub);
$header->Class_Terminate();
unset($header);
$footer->Class_Terminate();
unset($footer);
unset($bg);
$news_inc->Class_Terminate();
unset($news_inc);
unset($users);
unset($tb_c_users);
unset($tb_cmps);
unset($tb_c_users4);
unset($tb_c_users1);
unset($tb_c_users2);
unset($tb_r_users);
unset($tb_ru);
unset($tb_r_users1);
unset($tb_rm);
unset($tb_sd_users);
unset($tb_sd);
unset($Login);
unset($tb_ag_users);
unset($tb_sa);
unset($tb_d_users);
unset($tb_dl);
unset($tb_help);
unset($tb_helpSearch);
unset($Tpl);
//End Unload Page
?>