Viewing file: phpSP_user_list.php (34.64 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
//Include Common Files @1-EFCCB017
define("RelativePath", ".");
define("PathToCurrentPage", "/");
define("FileName", "phpSP_user_list.php");
include(RelativePath . "/Common.php");
include(RelativePath . "/Template.php");
include(RelativePath . "/Sorter.php");
include(RelativePath . "/Navigator.php");
//End Include Common Files
//Include Page implementation @69-3DD2EFDC
include_once(RelativePath . "/Header.php");
//End Include Page implementation
class clsGridphpSP_users { //phpSP_users class @19-59A16D38
//Variables @19-46347103
// Public variables
var $ComponentType = "Grid";
var $ComponentName;
var $Visible;
var $Errors;
var $ErrorBlock;
var $ds;
var $DataSource;
var $PageSize;
var $SorterName = "";
var $SorterDirection = "";
var $PageNumber;
var $CCSEvents = "";
var $CCSEventResult;
var $RelativePath = "";
// Grid Controls
var $StaticControls;
var $RowControls;
var $Sorter_primary_key;
var $Sorter_user;
var $Sorter_MinaGen_site_do;
var $Sorter_MinaBiz_site_do;
var $Sorter_Daily_site_do;
var $Sorter_Daily_mail_do;
var $Sorter_MinaB_mail_do;
//End Variables
//Class_Initialize Event @19-8675AB7C
function clsGridphpSP_users($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "phpSP_users";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid phpSP_users";
$this->DataSource = new clsphpSP_usersDataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 20;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100)
$this->PageSize = 100;
if($this->PageSize == 0)
$this->Errors->addError("<p>Form: Grid " . $this->ComponentName . "<br>Error: (CCS06) Invalid page size.</p>");
$this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
if ($this->PageNumber <= 0) $this->PageNumber = 1;
$this->SorterName = CCGetParam("phpSP_usersOrder", "");
$this->SorterDirection = CCGetParam("phpSP_usersDir", "");
$this->primary_key = & new clsControl(ccsLink, "primary_key", "primary_key", ccsInteger, "", CCGetRequestParam("primary_key", ccsGet), $this);
$this->primary_key->Page = "phpSP_user_maint.php";
$this->user = & new clsControl(ccsLabel, "user", "user", ccsText, "", CCGetRequestParam("user", ccsGet), $this);
$this->MinaGen_site_do = & new clsControl(ccsLabel, "MinaGen_site_do", "MinaGen_site_do", ccsDate, $DefaultDateFormat, CCGetRequestParam("MinaGen_site_do", ccsGet), $this);
$this->MinaBiz_site_do = & new clsControl(ccsLabel, "MinaBiz_site_do", "MinaBiz_site_do", ccsDate, $DefaultDateFormat, CCGetRequestParam("MinaBiz_site_do", ccsGet), $this);
$this->Daily_site_do = & new clsControl(ccsLabel, "Daily_site_do", "Daily_site_do", ccsDate, $DefaultDateFormat, CCGetRequestParam("Daily_site_do", ccsGet), $this);
$this->Daily_mail_do = & new clsControl(ccsLabel, "Daily_mail_do", "Daily_mail_do", ccsDate, $DefaultDateFormat, CCGetRequestParam("Daily_mail_do", ccsGet), $this);
$this->MinaB_mail_do = & new clsControl(ccsLabel, "MinaB_mail_do", "MinaB_mail_do", ccsDate, $DefaultDateFormat, CCGetRequestParam("MinaB_mail_do", ccsGet), $this);
$this->Sorter_primary_key = & new clsSorter($this->ComponentName, "Sorter_primary_key", $FileName, $this);
$this->Sorter_user = & new clsSorter($this->ComponentName, "Sorter_user", $FileName, $this);
$this->Sorter_MinaGen_site_do = & new clsSorter($this->ComponentName, "Sorter_MinaGen_site_do", $FileName, $this);
$this->Sorter_MinaBiz_site_do = & new clsSorter($this->ComponentName, "Sorter_MinaBiz_site_do", $FileName, $this);
$this->Sorter_Daily_site_do = & new clsSorter($this->ComponentName, "Sorter_Daily_site_do", $FileName, $this);
$this->Sorter_Daily_mail_do = & new clsSorter($this->ComponentName, "Sorter_Daily_mail_do", $FileName, $this);
$this->Sorter_MinaB_mail_do = & new clsSorter($this->ComponentName, "Sorter_MinaB_mail_do", $FileName, $this);
$this->phpSP_users_Insert = & new clsControl(ccsLink, "phpSP_users_Insert", "phpSP_users_Insert", ccsText, "", CCGetRequestParam("phpSP_users_Insert", ccsGet), $this);
$this->phpSP_users_Insert->Parameters = CCGetQueryString("QueryString", array("primary_key", "ccsForm"));
$this->phpSP_users_Insert->Page = "phpSP_user_maint.php";
$this->Navigator = & new clsNavigator($this->ComponentName, "Navigator", $FileName, 10, tpSimple, $this);
}
//End Class_Initialize Event
//Initialize Method @19-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 @19-5C44C3EB
function Show()
{
global $Tpl;
global $CCSLocales;
if(!$this->Visible) return;
$ShownRecords = 0;
$this->DataSource->Parameters["urls_user"] = CCGetFromGet("s_user", "");
$this->DataSource->Parameters["urls_password"] = CCGetFromGet("s_password", "");
$this->DataSource->Parameters["urls_kontakt"] = CCGetFromGet("s_kontakt", "");
$this->DataSource->Parameters["urls_napomena"] = CCGetFromGet("s_napomena", "");
$this->DataSource->Parameters["urls_Organizacija"] = CCGetFromGet("s_Organizacija", "");
$this->DataSource->Parameters["urls_Adresa"] = CCGetFromGet("s_Adresa", "");
$this->DataSource->Parameters["urls_E_mail"] = CCGetFromGet("s_E_mail", "");
$this->DataSource->Parameters["urls_Telefon"] = CCGetFromGet("s_Telefon", "");
$this->DataSource->Parameters["urls_Fax"] = CCGetFromGet("s_Fax", "");
$this->DataSource->Parameters["urls_Mobilni"] = CCGetFromGet("s_Mobilni", "");
$this->DataSource->Parameters["urls_Web"] = CCGetFromGet("s_Web", "");
$this->DataSource->Parameters["urls_MinasendmailA"] = CCGetFromGet("s_MinasendmailA", "");
$this->DataSource->Parameters["urls_MinaBsendmailA"] = CCGetFromGet("s_MinaBsendmailA", "");
$this->DataSource->Parameters["urls_DailyMail"] = CCGetFromGet("s_DailyMail", "");
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this);
$this->DataSource->Prepare();
$this->DataSource->Open();
$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(($ShownRecords < $this->PageSize) && $this->DataSource->next_record())
{
do {
$this->DataSource->SetValues();
$Tpl->block_path = $ParentPath . "/" . $GridBlock . "/Row";
$this->primary_key->SetValue($this->DataSource->primary_key->GetValue());
$this->primary_key->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$this->primary_key->Parameters = CCAddParam($this->primary_key->Parameters, "primary_key", $this->DataSource->f("primary_key"));
$this->user->SetValue($this->DataSource->user->GetValue());
$this->MinaGen_site_do->SetValue($this->DataSource->MinaGen_site_do->GetValue());
$this->MinaBiz_site_do->SetValue($this->DataSource->MinaBiz_site_do->GetValue());
$this->Daily_site_do->SetValue($this->DataSource->Daily_site_do->GetValue());
$this->Daily_mail_do->SetValue($this->DataSource->Daily_mail_do->GetValue());
$this->MinaB_mail_do->SetValue($this->DataSource->MinaB_mail_do->GetValue());
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->primary_key->Show();
$this->user->Show();
$this->MinaGen_site_do->Show();
$this->MinaBiz_site_do->Show();
$this->Daily_site_do->Show();
$this->Daily_mail_do->Show();
$this->MinaB_mail_do->Show();
$Tpl->block_path = $ParentPath . "/" . $GridBlock;
$Tpl->parse("Row", true);
$ShownRecords++;
} while (($ShownRecords < $this->PageSize) && $this->DataSource->next_record());
}
else // Show NoRecords block if no records are found
{
$Tpl->parse("NoRecords", false);
}
$errors = $this->GetErrors();
if(strlen($errors))
{
$Tpl->replaceblock("", $errors);
$Tpl->block_path = $ParentPath;
return;
}
$this->Navigator->PageNumber = $this->DataSource->AbsolutePage;
if ($this->DataSource->RecordsCount == "CCS not counted")
$this->Navigator->TotalPages = $this->DataSource->AbsolutePage + ($this->DataSource->next_record() ? 1 : 0);
else
$this->Navigator->TotalPages = $this->DataSource->PageCount();
$this->Sorter_primary_key->Show();
$this->Sorter_user->Show();
$this->Sorter_MinaGen_site_do->Show();
$this->Sorter_MinaBiz_site_do->Show();
$this->Sorter_Daily_site_do->Show();
$this->Sorter_Daily_mail_do->Show();
$this->Sorter_MinaB_mail_do->Show();
$this->phpSP_users_Insert->Show();
$this->Navigator->Show();
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @19-970434A4
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->primary_key->Errors->ToString());
$errors = ComposeStrings($errors, $this->user->Errors->ToString());
$errors = ComposeStrings($errors, $this->MinaGen_site_do->Errors->ToString());
$errors = ComposeStrings($errors, $this->MinaBiz_site_do->Errors->ToString());
$errors = ComposeStrings($errors, $this->Daily_site_do->Errors->ToString());
$errors = ComposeStrings($errors, $this->Daily_mail_do->Errors->ToString());
$errors = ComposeStrings($errors, $this->MinaB_mail_do->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End phpSP_users Class @19-FCB6E20C
class clsphpSP_usersDataSource extends clsDBConnection1 { //phpSP_usersDataSource Class @19-D7B82E7A
//DataSource Variables @19-F49EF03B
var $Parent = "";
var $CCSEvents = "";
var $CCSEventResult;
var $ErrorBlock;
var $CmdExecution;
var $CountSQL;
var $wp;
// Datasource fields
var $primary_key;
var $user;
var $MinaGen_site_do;
var $MinaBiz_site_do;
var $Daily_site_do;
var $Daily_mail_do;
var $MinaB_mail_do;
//End DataSource Variables
//DataSourceClass_Initialize Event @19-712B52B9
function clsphpSP_usersDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid phpSP_users";
$this->Initialize();
$this->primary_key = new clsField("primary_key", ccsInteger, "");
$this->user = new clsField("user", ccsText, "");
$this->MinaGen_site_do = new clsField("MinaGen_site_do", ccsDate, array("yyyy", "-", "mm", "-", "dd", " ", "HH", ":", "nn", ":", "ss"));
$this->MinaBiz_site_do = new clsField("MinaBiz_site_do", ccsDate, array("yyyy", "-", "mm", "-", "dd", " ", "HH", ":", "nn", ":", "ss"));
$this->Daily_site_do = new clsField("Daily_site_do", ccsDate, array("yyyy", "-", "mm", "-", "dd", " ", "HH", ":", "nn", ":", "ss"));
$this->Daily_mail_do = new clsField("Daily_mail_do", ccsDate, array("yyyy", "-", "mm", "-", "dd", " ", "HH", ":", "nn", ":", "ss"));
$this->MinaB_mail_do = new clsField("MinaB_mail_do", ccsDate, array("yyyy", "-", "mm", "-", "dd", " ", "HH", ":", "nn", ":", "ss"));
}
//End DataSourceClass_Initialize Event
//SetOrder Method @19-F0531E92
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
array("Sorter_primary_key" => array("primary_key", ""),
"Sorter_user" => array("user", ""),
"Sorter_MinaGen_site_do" => array("MinaGen_site_do", ""),
"Sorter_MinaBiz_site_do" => array("MinaBiz_site_do", ""),
"Sorter_Daily_site_do" => array("Daily_site_do", ""),
"Sorter_Daily_mail_do" => array("Daily_mail_do", ""),
"Sorter_MinaB_mail_do" => array("MinaB_mail_do", "")));
}
//End SetOrder Method
//Prepare Method @19-A4ABFEDD
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "urls_user", ccsText, "", "", $this->Parameters["urls_user"], "", false);
$this->wp->AddParameter("2", "urls_password", ccsText, "", "", $this->Parameters["urls_password"], "", false);
$this->wp->AddParameter("3", "urls_kontakt", ccsText, "", "", $this->Parameters["urls_kontakt"], "", false);
$this->wp->AddParameter("4", "urls_napomena", ccsMemo, "", "", $this->Parameters["urls_napomena"], "", false);
$this->wp->AddParameter("5", "urls_Organizacija", ccsMemo, "", "", $this->Parameters["urls_Organizacija"], "", false);
$this->wp->AddParameter("6", "urls_Adresa", ccsMemo, "", "", $this->Parameters["urls_Adresa"], "", false);
$this->wp->AddParameter("7", "urls_E_mail", ccsMemo, "", "", $this->Parameters["urls_E_mail"], "", false);
$this->wp->AddParameter("8", "urls_Telefon", ccsText, "", "", $this->Parameters["urls_Telefon"], "", false);
$this->wp->AddParameter("9", "urls_Fax", ccsText, "", "", $this->Parameters["urls_Fax"], "", false);
$this->wp->AddParameter("10", "urls_Mobilni", ccsText, "", "", $this->Parameters["urls_Mobilni"], "", false);
$this->wp->AddParameter("11", "urls_Web", ccsMemo, "", "", $this->Parameters["urls_Web"], "", false);
$this->wp->AddParameter("12", "urls_MinasendmailA", ccsMemo, "", "", $this->Parameters["urls_MinasendmailA"], "", false);
$this->wp->AddParameter("13", "urls_MinaBsendmailA", ccsMemo, "", "", $this->Parameters["urls_MinaBsendmailA"], "", false);
$this->wp->AddParameter("14", "urls_DailyMail", ccsMemo, "", "", $this->Parameters["urls_DailyMail"], "", false);
$this->wp->Criterion[1] = $this->wp->Operation(opContains, "`user`", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsText),false);
$this->wp->Criterion[2] = $this->wp->Operation(opContains, "password", $this->wp->GetDBValue("2"), $this->ToSQL($this->wp->GetDBValue("2"), ccsText),false);
$this->wp->Criterion[3] = $this->wp->Operation(opContains, "kontakt", $this->wp->GetDBValue("3"), $this->ToSQL($this->wp->GetDBValue("3"), ccsText),false);
$this->wp->Criterion[4] = $this->wp->Operation(opContains, "napomena", $this->wp->GetDBValue("4"), $this->ToSQL($this->wp->GetDBValue("4"), ccsMemo),false);
$this->wp->Criterion[5] = $this->wp->Operation(opContains, "Organizacija", $this->wp->GetDBValue("5"), $this->ToSQL($this->wp->GetDBValue("5"), ccsMemo),false);
$this->wp->Criterion[6] = $this->wp->Operation(opContains, "Adresa", $this->wp->GetDBValue("6"), $this->ToSQL($this->wp->GetDBValue("6"), ccsMemo),false);
$this->wp->Criterion[7] = $this->wp->Operation(opContains, "`E-mail`", $this->wp->GetDBValue("7"), $this->ToSQL($this->wp->GetDBValue("7"), ccsMemo),false);
$this->wp->Criterion[8] = $this->wp->Operation(opContains, "Telefon", $this->wp->GetDBValue("8"), $this->ToSQL($this->wp->GetDBValue("8"), ccsText),false);
$this->wp->Criterion[9] = $this->wp->Operation(opContains, "Fax", $this->wp->GetDBValue("9"), $this->ToSQL($this->wp->GetDBValue("9"), ccsText),false);
$this->wp->Criterion[10] = $this->wp->Operation(opContains, "Mobilni", $this->wp->GetDBValue("10"), $this->ToSQL($this->wp->GetDBValue("10"), ccsText),false);
$this->wp->Criterion[11] = $this->wp->Operation(opContains, "Web", $this->wp->GetDBValue("11"), $this->ToSQL($this->wp->GetDBValue("11"), ccsMemo),false);
$this->wp->Criterion[12] = $this->wp->Operation(opContains, "MinasendmailA", $this->wp->GetDBValue("12"), $this->ToSQL($this->wp->GetDBValue("12"), ccsMemo),false);
$this->wp->Criterion[13] = $this->wp->Operation(opContains, "MinaBsendmailA", $this->wp->GetDBValue("13"), $this->ToSQL($this->wp->GetDBValue("13"), ccsMemo),false);
$this->wp->Criterion[14] = $this->wp->Operation(opContains, "DailyMail", $this->wp->GetDBValue("14"), $this->ToSQL($this->wp->GetDBValue("14"), ccsMemo),false);
$this->Where = $this->wp->opAND(
false, $this->wp->opAND(
false, $this->wp->opAND(
false, $this->wp->opAND(
false, $this->wp->opAND(
false, $this->wp->opAND(
false, $this->wp->opAND(
false, $this->wp->opAND(
false, $this->wp->opAND(
false, $this->wp->opAND(
false, $this->wp->opAND(
false, $this->wp->opAND(
false, $this->wp->opAND(
false,
$this->wp->Criterion[1],
$this->wp->Criterion[2]),
$this->wp->Criterion[3]),
$this->wp->Criterion[4]),
$this->wp->Criterion[5]),
$this->wp->Criterion[6]),
$this->wp->Criterion[7]),
$this->wp->Criterion[8]),
$this->wp->Criterion[9]),
$this->wp->Criterion[10]),
$this->wp->Criterion[11]),
$this->wp->Criterion[12]),
$this->wp->Criterion[13]),
$this->wp->Criterion[14]);
}
//End Prepare Method
//Open Method @19-D72B0F9A
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*) " .
"FROM phpSP_users";
$this->SQL = "SELECT * " .
"FROM phpSP_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 @19-63C9A9A0
function SetValues()
{
$this->primary_key->SetDBValue(trim($this->f("primary_key")));
$this->user->SetDBValue($this->f("Organizacija"));
$this->MinaGen_site_do->SetDBValue(trim($this->f("MinaGen_site_do")));
$this->MinaBiz_site_do->SetDBValue(trim($this->f("MinaBiz_site_do")));
$this->Daily_site_do->SetDBValue(trim($this->f("Daily_site_do")));
$this->Daily_mail_do->SetDBValue(trim($this->f("Daily_mail_do")));
$this->MinaB_mail_do->SetDBValue(trim($this->f("MinaB_mail_do")));
}
//End SetValues Method
} //End phpSP_usersDataSource Class @19-FCB6E20C
class clsRecordphpSP_usersSearch { //phpSP_usersSearch Class @2-E5BA4063
//Variables @2-F607D3A5
// Public variables
var $ComponentType = "Record";
var $ComponentName;
var $Parent;
var $HTMLFormAction;
var $PressedButton;
var $Errors;
var $ErrorBlock;
var $FormSubmitted;
var $FormEnctype;
var $Visible;
var $Recordset;
var $CCSEvents = "";
var $CCSEventResult;
var $RelativePath = "";
var $InsertAllowed = false;
var $UpdateAllowed = false;
var $DeleteAllowed = false;
var $ReadAllowed = false;
var $EditMode = false;
var $ds;
var $DataSource;
var $ValidatingControls;
var $Controls;
// Class variables
//End Variables
//Class_Initialize Event @2-A5D571EC
function clsRecordphpSP_usersSearch($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->Visible = true;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Record phpSP_usersSearch/Error";
$this->ReadAllowed = true;
if($this->Visible)
{
$this->ComponentName = "phpSP_usersSearch";
$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_user = & new clsControl(ccsTextBox, "s_user", "s_user", ccsText, "", CCGetRequestParam("s_user", $Method), $this);
$this->s_password = & new clsControl(ccsTextBox, "s_password", "s_password", ccsText, "", CCGetRequestParam("s_password", $Method), $this);
$this->s_kontakt = & new clsControl(ccsTextBox, "s_kontakt", "s_kontakt", ccsText, "", CCGetRequestParam("s_kontakt", $Method), $this);
$this->s_napomena = & new clsControl(ccsTextBox, "s_napomena", "s_napomena", ccsMemo, "", CCGetRequestParam("s_napomena", $Method), $this);
$this->s_Organizacija = & new clsControl(ccsTextBox, "s_Organizacija", "s_Organizacija", ccsMemo, "", CCGetRequestParam("s_Organizacija", $Method), $this);
$this->s_Adresa = & new clsControl(ccsTextBox, "s_Adresa", "s_Adresa", ccsMemo, "", CCGetRequestParam("s_Adresa", $Method), $this);
$this->s_E_mail = & new clsControl(ccsTextBox, "s_E_mail", "s_E_mail", ccsMemo, "", CCGetRequestParam("s_E_mail", $Method), $this);
$this->s_Telefon = & new clsControl(ccsTextBox, "s_Telefon", "s_Telefon", ccsText, "", CCGetRequestParam("s_Telefon", $Method), $this);
$this->s_Fax = & new clsControl(ccsTextBox, "s_Fax", "s_Fax", ccsText, "", CCGetRequestParam("s_Fax", $Method), $this);
$this->s_Mobilni = & new clsControl(ccsTextBox, "s_Mobilni", "s_Mobilni", ccsText, "", CCGetRequestParam("s_Mobilni", $Method), $this);
$this->s_Web = & new clsControl(ccsTextBox, "s_Web", "s_Web", ccsMemo, "", CCGetRequestParam("s_Web", $Method), $this);
$this->s_MinasendmailA = & new clsControl(ccsTextBox, "s_MinasendmailA", "s_MinasendmailA", ccsMemo, "", CCGetRequestParam("s_MinasendmailA", $Method), $this);
$this->s_MinaBsendmailA = & new clsControl(ccsTextBox, "s_MinaBsendmailA", "s_MinaBsendmailA", ccsMemo, "", CCGetRequestParam("s_MinaBsendmailA", $Method), $this);
$this->s_DailyMail = & new clsControl(ccsTextBox, "s_DailyMail", "s_DailyMail", ccsMemo, "", CCGetRequestParam("s_DailyMail", $Method), $this);
$this->DoSearch = & new clsButton("DoSearch", $Method, $this);
}
}
//End Class_Initialize Event
//Validate Method @2-94913D78
function Validate()
{
global $CCSLocales;
$Validation = true;
$Where = "";
$Validation = ($this->s_user->Validate() && $Validation);
$Validation = ($this->s_password->Validate() && $Validation);
$Validation = ($this->s_kontakt->Validate() && $Validation);
$Validation = ($this->s_napomena->Validate() && $Validation);
$Validation = ($this->s_Organizacija->Validate() && $Validation);
$Validation = ($this->s_Adresa->Validate() && $Validation);
$Validation = ($this->s_E_mail->Validate() && $Validation);
$Validation = ($this->s_Telefon->Validate() && $Validation);
$Validation = ($this->s_Fax->Validate() && $Validation);
$Validation = ($this->s_Mobilni->Validate() && $Validation);
$Validation = ($this->s_Web->Validate() && $Validation);
$Validation = ($this->s_MinasendmailA->Validate() && $Validation);
$Validation = ($this->s_MinaBsendmailA->Validate() && $Validation);
$Validation = ($this->s_DailyMail->Validate() && $Validation);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "OnValidate", $this);
$Validation = $Validation && ($this->s_user->Errors->Count() == 0);
$Validation = $Validation && ($this->s_password->Errors->Count() == 0);
$Validation = $Validation && ($this->s_kontakt->Errors->Count() == 0);
$Validation = $Validation && ($this->s_napomena->Errors->Count() == 0);
$Validation = $Validation && ($this->s_Organizacija->Errors->Count() == 0);
$Validation = $Validation && ($this->s_Adresa->Errors->Count() == 0);
$Validation = $Validation && ($this->s_E_mail->Errors->Count() == 0);
$Validation = $Validation && ($this->s_Telefon->Errors->Count() == 0);
$Validation = $Validation && ($this->s_Fax->Errors->Count() == 0);
$Validation = $Validation && ($this->s_Mobilni->Errors->Count() == 0);
$Validation = $Validation && ($this->s_Web->Errors->Count() == 0);
$Validation = $Validation && ($this->s_MinasendmailA->Errors->Count() == 0);
$Validation = $Validation && ($this->s_MinaBsendmailA->Errors->Count() == 0);
$Validation = $Validation && ($this->s_DailyMail->Errors->Count() == 0);
return (($this->Errors->Count() == 0) && $Validation);
}
//End Validate Method
//CheckErrors Method @2-DDB2484F
function CheckErrors()
{
$errors = false;
$errors = ($errors || $this->s_user->Errors->Count());
$errors = ($errors || $this->s_password->Errors->Count());
$errors = ($errors || $this->s_kontakt->Errors->Count());
$errors = ($errors || $this->s_napomena->Errors->Count());
$errors = ($errors || $this->s_Organizacija->Errors->Count());
$errors = ($errors || $this->s_Adresa->Errors->Count());
$errors = ($errors || $this->s_E_mail->Errors->Count());
$errors = ($errors || $this->s_Telefon->Errors->Count());
$errors = ($errors || $this->s_Fax->Errors->Count());
$errors = ($errors || $this->s_Mobilni->Errors->Count());
$errors = ($errors || $this->s_Web->Errors->Count());
$errors = ($errors || $this->s_MinasendmailA->Errors->Count());
$errors = ($errors || $this->s_MinaBsendmailA->Errors->Count());
$errors = ($errors || $this->s_DailyMail->Errors->Count());
$errors = ($errors || $this->Errors->Count());
return $errors;
}
//End CheckErrors Method
//Operation Method @2-1E972159
function Operation()
{
if(!$this->Visible)
return;
global $Redirect;
global $FileName;
if(!$this->FormSubmitted) {
return;
}
if($this->FormSubmitted) {
$this->PressedButton = "DoSearch";
if($this->DoSearch->Pressed) {
$this->PressedButton = "DoSearch";
}
}
$Redirect = "phpSP_user_list.php" . "?" . CCGetQueryString("QueryString", array("ccsForm"));
if($this->Validate()) {
if($this->PressedButton == "DoSearch") {
$Redirect = "phpSP_user_list.php" . "?" . CCMergeQueryStrings(CCGetQueryString("Form", array("DoSearch", "DoSearch_x", "DoSearch_y")));
if(!CCGetEvent($this->DoSearch->CCSEvents, "OnClick", $this->DoSearch)) {
$Redirect = "";
}
}
} else {
$Redirect = "";
}
}
//End Operation Method
//Show Method @2-CAF6ED34
function Show()
{
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_user->Errors->ToString());
$Error = ComposeStrings($Error, $this->s_password->Errors->ToString());
$Error = ComposeStrings($Error, $this->s_kontakt->Errors->ToString());
$Error = ComposeStrings($Error, $this->s_napomena->Errors->ToString());
$Error = ComposeStrings($Error, $this->s_Organizacija->Errors->ToString());
$Error = ComposeStrings($Error, $this->s_Adresa->Errors->ToString());
$Error = ComposeStrings($Error, $this->s_E_mail->Errors->ToString());
$Error = ComposeStrings($Error, $this->s_Telefon->Errors->ToString());
$Error = ComposeStrings($Error, $this->s_Fax->Errors->ToString());
$Error = ComposeStrings($Error, $this->s_Mobilni->Errors->ToString());
$Error = ComposeStrings($Error, $this->s_Web->Errors->ToString());
$Error = ComposeStrings($Error, $this->s_MinasendmailA->Errors->ToString());
$Error = ComposeStrings($Error, $this->s_MinaBsendmailA->Errors->ToString());
$Error = ComposeStrings($Error, $this->s_DailyMail->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", $this->HTMLFormAction);
$Tpl->SetVar("HTMLFormName", $this->ComponentName);
$Tpl->SetVar("HTMLFormEnctype", $this->FormEnctype);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this);
if(!$this->Visible) {
$Tpl->block_path = $ParentPath;
return;
}
$this->s_user->Show();
$this->s_password->Show();
$this->s_kontakt->Show();
$this->s_napomena->Show();
$this->s_Organizacija->Show();
$this->s_Adresa->Show();
$this->s_E_mail->Show();
$this->s_Telefon->Show();
$this->s_Fax->Show();
$this->s_Mobilni->Show();
$this->s_Web->Show();
$this->s_MinasendmailA->Show();
$this->s_MinaBsendmailA->Show();
$this->s_DailyMail->Show();
$this->DoSearch->Show();
$Tpl->parse();
$Tpl->block_path = $ParentPath;
}
//End Show Method
} //End phpSP_usersSearch Class @2-FCB6E20C
//Include Page implementation @70-58DBA1E3
include_once(RelativePath . "/Footer.php");
//End Include Page implementation
//Initialize Page @1-8D95B406
// Variables
$FileName = "";
$Redirect = "";
$Tpl = "";
$TemplateFileName = "";
$BlockToParse = "";
$ComponentName = "";
// Events;
$CCSEvents = "";
$CCSEventResult = "";
$FileName = FileName;
$Redirect = "";
$TemplateFileName = "phpSP_user_list.html";
$BlockToParse = "main";
$TemplateEncoding = "CP1252";
$PathToRoot = "./";
//End Initialize Page
//Authenticate User @1-DC94A87D
CCSecurityRedirect("1", "");
//End Authenticate User
//Initialize Objects @1-8904AD85
$DBConnection1 = new clsDBConnection1();
$MainPage->Connections["Connection1"] = & $DBConnection1;
// Controls
$Header = & new clsHeader("", "Header", $MainPage);
$Header->Initialize();
$phpSP_users = & new clsGridphpSP_users("", $MainPage);
$phpSP_usersSearch = & new clsRecordphpSP_usersSearch("", $MainPage);
$Footer = & new clsFooter("", "Footer", $MainPage);
$Footer->Initialize();
$MainPage->Header = & $Header;
$MainPage->phpSP_users = & $phpSP_users;
$MainPage->phpSP_usersSearch = & $phpSP_usersSearch;
$MainPage->Footer = & $Footer;
$phpSP_users->Initialize();
$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize", $MainPage);
if ($Charset)
header("Content-Type: text/html; charset=" . $Charset);
//End Initialize Objects
//Initialize HTML Template @1-8F4531F3
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView", $MainPage);
$Tpl = new clsTemplate($FileEncoding, $TemplateEncoding);
$Tpl->LoadTemplate(PathToCurrentPage . $TemplateFileName, $BlockToParse, "CP1252");
$Tpl->block_path = "/$BlockToParse";
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow", $MainPage);
//End Initialize HTML Template
//Execute Components @1-50AEE4AE
$Header->Operations();
$phpSP_usersSearch->Operation();
$Footer->Operations();
//End Execute Components
//Go to destination page @1-041659C4
if($Redirect)
{
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
$DBConnection1->close();
header("Location: " . $Redirect);
$Header->Class_Terminate();
unset($Header);
unset($phpSP_users);
unset($phpSP_usersSearch);
$Footer->Class_Terminate();
unset($Footer);
unset($Tpl);
exit;
}
//End Go to destination page
//Show Page @1-AFBAEFEB
$Header->Show();
$phpSP_users->Show();
$phpSP_usersSearch->Show();
$Footer->Show();
$Tpl->block_path = "";
$Tpl->Parse($BlockToParse, false);
$main_block = $Tpl->GetVar($BlockToParse);
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeOutput", $MainPage);
if ($CCSEventResult) echo $main_block;
//End Show Page
//Unload Page @1-5519E861
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
$DBConnection1->close();
$Header->Class_Terminate();
unset($Header);
unset($phpSP_users);
unset($phpSP_usersSearch);
$Footer->Class_Terminate();
unset($Footer);
unset($Tpl);
//End Unload Page
?>
|