.=< { Star Gans Tq } >=.
<?php
//Include Common Files @1-4E82AA8F
define("RelativePath", ".");
define("PathToCurrentPage", "/");
define("FileName", "recensement_index.php");
include_once(RelativePath . "/Common.php");
include_once(RelativePath . "/Template.php");
include_once(RelativePath . "/Sorter.php");
include_once(RelativePath . "/Navigator.php");
//End Include Common Files
class clsRecordsrcMehari { //srcMehari Class @3-67744A9B
//Variables @3-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 @3-15F2EF4D
function clsRecordsrcMehari($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->Visible = true;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Record srcMehari/Error";
$this->ReadAllowed = true;
if($this->Visible)
{
$this->ComponentName = "srcMehari";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$CCSForm = explode(":", CCGetFromGet("ccsForm", ""), 2);
if(sizeof($CCSForm) == 1)
$CCSForm[1] = "";
list($FormName, $FormMethod) = $CCSForm;
$this->FormEnctype = "application/x-www-form-urlencoded";
$this->FormSubmitted = ($FormName == $this->ComponentName);
$Method = $this->FormSubmitted ? ccsPost : ccsGet;
$this->Button_DoSearch = new clsButton("Button_DoSearch", $Method, $this);
$this->s_mehari_an = new clsControl(ccsTextBox, "s_mehari_an", "s_mehari_an", ccsText, "", CCGetRequestParam("s_mehari_an", $Method, NULL), $this);
$this->s_mehari_type = new clsControl(ccsTextBox, "s_mehari_type", "s_mehari_type", ccsText, "", CCGetRequestParam("s_mehari_type", $Method, NULL), $this);
$this->s_mehari_numero_serie = new clsControl(ccsTextBox, "s_mehari_numero_serie", "s_mehari_numero_serie", ccsText, "", CCGetRequestParam("s_mehari_numero_serie", $Method, NULL), $this);
$this->s_mehari_immatriculation = new clsControl(ccsTextBox, "s_mehari_immatriculation", "s_mehari_immatriculation", ccsText, "", CCGetRequestParam("s_mehari_immatriculation", $Method, NULL), $this);
$this->s_mehari_id = new clsControl(ccsTextBox, "s_mehari_id", "s_mehari_id", ccsText, "", CCGetRequestParam("s_mehari_id", $Method, NULL), $this);
}
}
//End Class_Initialize Event
//Validate Method @3-5F897B33
function Validate()
{
global $CCSLocales;
$Validation = true;
$Where = "";
$Validation = ($this->s_mehari_an->Validate() && $Validation);
$Validation = ($this->s_mehari_type->Validate() && $Validation);
$Validation = ($this->s_mehari_numero_serie->Validate() && $Validation);
$Validation = ($this->s_mehari_immatriculation->Validate() && $Validation);
$Validation = ($this->s_mehari_id->Validate() && $Validation);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "OnValidate", $this);
$Validation = $Validation && ($this->s_mehari_an->Errors->Count() == 0);
$Validation = $Validation && ($this->s_mehari_type->Errors->Count() == 0);
$Validation = $Validation && ($this->s_mehari_numero_serie->Errors->Count() == 0);
$Validation = $Validation && ($this->s_mehari_immatriculation->Errors->Count() == 0);
$Validation = $Validation && ($this->s_mehari_id->Errors->Count() == 0);
return (($this->Errors->Count() == 0) && $Validation);
}
//End Validate Method
//CheckErrors Method @3-9013F0BA
function CheckErrors()
{
$errors = false;
$errors = ($errors || $this->s_mehari_an->Errors->Count());
$errors = ($errors || $this->s_mehari_type->Errors->Count());
$errors = ($errors || $this->s_mehari_numero_serie->Errors->Count());
$errors = ($errors || $this->s_mehari_immatriculation->Errors->Count());
$errors = ($errors || $this->s_mehari_id->Errors->Count());
$errors = ($errors || $this->Errors->Count());
return $errors;
}
//End CheckErrors Method
//Operation Method @3-7DDC32C1
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 = "recensement_index.php";
if($this->Validate()) {
if($this->PressedButton == "Button_DoSearch") {
$Redirect = "recensement_index.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 @3-6E9DC0FE
function Show()
{
global $CCSUseAmp;
$Tpl = CCGetTemplate($this);
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_mehari_an->Errors->ToString());
$Error = ComposeStrings($Error, $this->s_mehari_type->Errors->ToString());
$Error = ComposeStrings($Error, $this->s_mehari_numero_serie->Errors->ToString());
$Error = ComposeStrings($Error, $this->s_mehari_immatriculation->Errors->ToString());
$Error = ComposeStrings($Error, $this->s_mehari_id->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->Button_DoSearch->Show();
$this->s_mehari_an->Show();
$this->s_mehari_type->Show();
$this->s_mehari_numero_serie->Show();
$this->s_mehari_immatriculation->Show();
$this->s_mehari_id->Show();
$Tpl->parse();
$Tpl->block_path = $ParentPath;
}
//End Show Method
} //End srcMehari Class @3-FCB6E20C
class clsGridgrdMehari { //grdMehari class @2-FDCF10A6
//Variables @2-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 @2-8E5792DC
function clsGridgrdMehari($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->ComponentName = "grdMehari";
$this->Visible = True;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Grid grdMehari";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$this->DataSource = new clsgrdMehariDataSource($this);
$this->ds = & $this->DataSource;
$this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
$this->PageSize = 100000;
else
$this->PageSize = intval($this->PageSize);
if ($this->PageSize > 100000)
$this->PageSize = 100000;
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->lblMehari_id = new clsControl(ccsLabel, "lblMehari_id", "lblMehari_id", ccsInteger, "", CCGetRequestParam("lblMehari_id", ccsGet, NULL), $this);
$this->lblDateSaisie = new clsControl(ccsLabel, "lblDateSaisie", "lblDateSaisie", ccsDate, array("dd", "/", "mm", "/", "yyyy"), CCGetRequestParam("lblDateSaisie", ccsGet, NULL), $this);
$this->lblAn = new clsControl(ccsLabel, "lblAn", "lblAn", ccsText, "", CCGetRequestParam("lblAn", ccsGet, NULL), $this);
$this->lblType = new clsControl(ccsLabel, "lblType", "lblType", ccsText, "", CCGetRequestParam("lblType", ccsGet, NULL), $this);
$this->lblNumero_serie = new clsControl(ccsLabel, "lblNumero_serie", "lblNumero_serie", ccsText, "", CCGetRequestParam("lblNumero_serie", ccsGet, NULL), $this);
$this->lblDate_circulation = new clsControl(ccsLabel, "lblDate_circulation", "lblDate_circulation", ccsDate, array("dd", "/", "mm", "/", "yyyy"), CCGetRequestParam("lblDate_circulation", ccsGet, NULL), $this);
$this->lblModele = new clsControl(ccsLabel, "lblModele", "lblModele", ccsText, "", CCGetRequestParam("lblModele", ccsGet, NULL), $this);
$this->lblDepartement = new clsControl(ccsLabel, "lblDepartement", "lblDepartement", ccsText, "", CCGetRequestParam("lblDepartement", ccsGet, NULL), $this);
$this->lblRegion = new clsControl(ccsLabel, "lblRegion", "lblRegion", ccsText, "", CCGetRequestParam("lblRegion", ccsGet, NULL), $this);
$this->lblRecensement_adherent = new clsControl(ccsLabel, "lblRecensement_adherent", "lblRecensement_adherent", ccsText, "", CCGetRequestParam("lblRecensement_adherent", ccsGet, NULL), $this);
$this->lblRecensement_qui = new clsControl(ccsLabel, "lblRecensement_qui", "lblRecensement_qui", ccsText, "", CCGetRequestParam("lblRecensement_qui", ccsGet, NULL), $this);
$this->lblRecensement_email = new clsControl(ccsLabel, "lblRecensement_email", "lblRecensement_email", ccsText, "", CCGetRequestParam("lblRecensement_email", ccsGet, NULL), $this);
$this->lblRecensement_note = new clsControl(ccsLabel, "lblRecensement_note", "lblRecensement_note", ccsText, "", CCGetRequestParam("lblRecensement_note", ccsGet, NULL), $this);
$this->last_update = new clsControl(ccsLabel, "last_update", "last_update", ccsDate, array("dd", "/", "mm", "/", "yyyy", " ", "H", ":", "nn", ":", "ss"), CCGetRequestParam("last_update", ccsGet, NULL), $this);
$this->lblPays = new clsControl(ccsLabel, "lblPays", "lblPays", ccsText, "", CCGetRequestParam("lblPays", ccsGet, NULL), $this);
$this->lblClassAlternative = new clsControl(ccsLabel, "lblClassAlternative", "lblClassAlternative", ccsText, "", CCGetRequestParam("lblClassAlternative", ccsGet, NULL), $this);
$this->lblClassAlternative->HTML = true;
$this->imlEdit = new clsControl(ccsImageLink, "imlEdit", "imlEdit", ccsText, "", CCGetRequestParam("imlEdit", ccsGet, NULL), $this);
$this->imlEdit->Page = "recensement_index.php";
$this->lblEnac = new clsControl(ccsLabel, "lblEnac", "lblEnac", ccsText, "", CCGetRequestParam("lblEnac", ccsGet, NULL), $this);
$this->lblImmatriculation = new clsControl(ccsLabel, "lblImmatriculation", "lblImmatriculation", ccsText, "", CCGetRequestParam("lblImmatriculation", ccsGet, NULL), $this);
$this->lblDepartementNom = new clsControl(ccsLabel, "lblDepartementNom", "lblDepartementNom", ccsText, "", CCGetRequestParam("lblDepartementNom", ccsGet, NULL), $this);
$this->lblCouleur = new clsControl(ccsLabel, "lblCouleur", "lblCouleur", ccsText, "", CCGetRequestParam("lblCouleur", ccsGet, NULL), $this);
$this->lblPlace = new clsControl(ccsLabel, "lblPlace", "lblPlace", ccsText, "", CCGetRequestParam("lblPlace", ccsGet, NULL), $this);
$this->imgActif = new clsControl(ccsImage, "imgActif", "imgActif", ccsText, "", CCGetRequestParam("imgActif", ccsGet, NULL), $this);
$this->imlDupliquer = new clsControl(ccsImageLink, "imlDupliquer", "imlDupliquer", ccsText, "", CCGetRequestParam("imlDupliquer", ccsGet, NULL), $this);
$this->imlDupliquer->Page = "";
$this->lblCount = new clsControl(ccsLabel, "lblCount", "lblCount", ccsText, "", CCGetRequestParam("lblCount", ccsGet, NULL), $this);
}
//End Class_Initialize Event
//Initialize Method @2-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 @2-54D6D9F0
function Show()
{
$Tpl = CCGetTemplate($this);
global $CCSLocales;
if(!$this->Visible) return;
$this->RowNumber = 0;
$this->DataSource->Parameters["urls_mehari_an"] = CCGetFromGet("s_mehari_an", NULL);
$this->DataSource->Parameters["urls_mehari_type"] = CCGetFromGet("s_mehari_type", NULL);
$this->DataSource->Parameters["urls_mehari_numero_serie"] = CCGetFromGet("s_mehari_numero_serie", NULL);
$this->DataSource->Parameters["urls_mehari_immatriculation"] = CCGetFromGet("s_mehari_immatriculation", NULL);
$this->DataSource->Parameters["urls_mehari_id"] = CCGetFromGet("s_mehari_id", NULL);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this);
$this->DataSource->Prepare();
$this->DataSource->Open();
$this->HasRecord = $this->DataSource->has_next_record();
$this->IsEmpty = ! $this->HasRecord;
$this->Attributes->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["lblMehari_id"] = $this->lblMehari_id->Visible;
$this->ControlsVisible["lblDateSaisie"] = $this->lblDateSaisie->Visible;
$this->ControlsVisible["lblAn"] = $this->lblAn->Visible;
$this->ControlsVisible["lblType"] = $this->lblType->Visible;
$this->ControlsVisible["lblNumero_serie"] = $this->lblNumero_serie->Visible;
$this->ControlsVisible["lblDate_circulation"] = $this->lblDate_circulation->Visible;
$this->ControlsVisible["lblModele"] = $this->lblModele->Visible;
$this->ControlsVisible["lblDepartement"] = $this->lblDepartement->Visible;
$this->ControlsVisible["lblRegion"] = $this->lblRegion->Visible;
$this->ControlsVisible["lblRecensement_adherent"] = $this->lblRecensement_adherent->Visible;
$this->ControlsVisible["lblRecensement_qui"] = $this->lblRecensement_qui->Visible;
$this->ControlsVisible["lblRecensement_email"] = $this->lblRecensement_email->Visible;
$this->ControlsVisible["lblRecensement_note"] = $this->lblRecensement_note->Visible;
$this->ControlsVisible["last_update"] = $this->last_update->Visible;
$this->ControlsVisible["lblPays"] = $this->lblPays->Visible;
$this->ControlsVisible["lblClassAlternative"] = $this->lblClassAlternative->Visible;
$this->ControlsVisible["imlEdit"] = $this->imlEdit->Visible;
$this->ControlsVisible["lblEnac"] = $this->lblEnac->Visible;
$this->ControlsVisible["lblImmatriculation"] = $this->lblImmatriculation->Visible;
$this->ControlsVisible["lblDepartementNom"] = $this->lblDepartementNom->Visible;
$this->ControlsVisible["lblCouleur"] = $this->lblCouleur->Visible;
$this->ControlsVisible["lblPlace"] = $this->lblPlace->Visible;
$this->ControlsVisible["imgActif"] = $this->imgActif->Visible;
$this->ControlsVisible["imlDupliquer"] = $this->imlDupliquer->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->lblMehari_id->SetValue($this->DataSource->lblMehari_id->GetValue());
$this->lblDateSaisie->SetValue($this->DataSource->lblDateSaisie->GetValue());
$this->lblAn->SetValue($this->DataSource->lblAn->GetValue());
$this->lblType->SetValue($this->DataSource->lblType->GetValue());
$this->lblNumero_serie->SetValue($this->DataSource->lblNumero_serie->GetValue());
$this->lblDate_circulation->SetValue($this->DataSource->lblDate_circulation->GetValue());
$this->lblModele->SetValue($this->DataSource->lblModele->GetValue());
$this->lblDepartement->SetValue($this->DataSource->lblDepartement->GetValue());
$this->lblRegion->SetValue($this->DataSource->lblRegion->GetValue());
$this->lblRecensement_adherent->SetValue($this->DataSource->lblRecensement_adherent->GetValue());
$this->lblRecensement_qui->SetValue($this->DataSource->lblRecensement_qui->GetValue());
$this->lblRecensement_email->SetValue($this->DataSource->lblRecensement_email->GetValue());
$this->lblRecensement_note->SetValue($this->DataSource->lblRecensement_note->GetValue());
$this->last_update->SetValue($this->DataSource->last_update->GetValue());
$this->lblPays->SetValue($this->DataSource->lblPays->GetValue());
$this->imlEdit->Parameters = CCGetQueryString("QueryString", array("s_mehari_numero_serie", "s_mehari_an", "s_mehari_type", "s_mehari_immatriculation", "ccsForm"));
$this->imlEdit->Parameters = CCAddParam($this->imlEdit->Parameters, "id", $this->DataSource->f("id"));
$this->imlEdit->Parameters = CCAddParam($this->imlEdit->Parameters, "s_mehari_id", $this->DataSource->f("mehari_id"));
$this->lblEnac->SetValue($this->DataSource->lblEnac->GetValue());
$this->lblImmatriculation->SetValue($this->DataSource->lblImmatriculation->GetValue());
$this->lblDepartementNom->SetValue($this->DataSource->lblDepartementNom->GetValue());
$this->lblCouleur->SetValue($this->DataSource->lblCouleur->GetValue());
$this->lblPlace->SetValue($this->DataSource->lblPlace->GetValue());
$this->imlDupliquer->Parameters = CCGetQueryString("QueryString", array("ccsForm"));
$this->imlDupliquer->Parameters = CCAddParam($this->imlDupliquer->Parameters, "dupliquer", 1);
$this->imlDupliquer->Parameters = CCAddParam($this->imlDupliquer->Parameters, "id", $this->DataSource->f("id"));
$this->Attributes->SetValue("rowNumber", $this->RowNumber);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
$this->Attributes->Show();
$this->lblMehari_id->Show();
$this->lblDateSaisie->Show();
$this->lblAn->Show();
$this->lblType->Show();
$this->lblNumero_serie->Show();
$this->lblDate_circulation->Show();
$this->lblModele->Show();
$this->lblDepartement->Show();
$this->lblRegion->Show();
$this->lblRecensement_adherent->Show();
$this->lblRecensement_qui->Show();
$this->lblRecensement_email->Show();
$this->lblRecensement_note->Show();
$this->last_update->Show();
$this->lblPays->Show();
$this->lblClassAlternative->Show();
$this->imlEdit->Show();
$this->lblEnac->Show();
$this->lblImmatriculation->Show();
$this->lblDepartementNom->Show();
$this->lblCouleur->Show();
$this->lblPlace->Show();
$this->imgActif->Show();
$this->imlDupliquer->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->lblCount->Show();
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
//GetErrors Method @2-9C463AFF
function GetErrors()
{
$errors = "";
$errors = ComposeStrings($errors, $this->lblMehari_id->Errors->ToString());
$errors = ComposeStrings($errors, $this->lblDateSaisie->Errors->ToString());
$errors = ComposeStrings($errors, $this->lblAn->Errors->ToString());
$errors = ComposeStrings($errors, $this->lblType->Errors->ToString());
$errors = ComposeStrings($errors, $this->lblNumero_serie->Errors->ToString());
$errors = ComposeStrings($errors, $this->lblDate_circulation->Errors->ToString());
$errors = ComposeStrings($errors, $this->lblModele->Errors->ToString());
$errors = ComposeStrings($errors, $this->lblDepartement->Errors->ToString());
$errors = ComposeStrings($errors, $this->lblRegion->Errors->ToString());
$errors = ComposeStrings($errors, $this->lblRecensement_adherent->Errors->ToString());
$errors = ComposeStrings($errors, $this->lblRecensement_qui->Errors->ToString());
$errors = ComposeStrings($errors, $this->lblRecensement_email->Errors->ToString());
$errors = ComposeStrings($errors, $this->lblRecensement_note->Errors->ToString());
$errors = ComposeStrings($errors, $this->last_update->Errors->ToString());
$errors = ComposeStrings($errors, $this->lblPays->Errors->ToString());
$errors = ComposeStrings($errors, $this->lblClassAlternative->Errors->ToString());
$errors = ComposeStrings($errors, $this->imlEdit->Errors->ToString());
$errors = ComposeStrings($errors, $this->lblEnac->Errors->ToString());
$errors = ComposeStrings($errors, $this->lblImmatriculation->Errors->ToString());
$errors = ComposeStrings($errors, $this->lblDepartementNom->Errors->ToString());
$errors = ComposeStrings($errors, $this->lblCouleur->Errors->ToString());
$errors = ComposeStrings($errors, $this->lblPlace->Errors->ToString());
$errors = ComposeStrings($errors, $this->imgActif->Errors->ToString());
$errors = ComposeStrings($errors, $this->imlDupliquer->Errors->ToString());
$errors = ComposeStrings($errors, $this->Errors->ToString());
$errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
return $errors;
}
//End GetErrors Method
} //End grdMehari Class @2-FCB6E20C
class clsgrdMehariDataSource extends clsDBcnxRecensement { //grdMehariDataSource Class @2-2F4B0F33
//DataSource Variables @2-CA756833
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $CountSQL;
public $wp;
// Datasource fields
public $lblMehari_id;
public $lblDateSaisie;
public $lblAn;
public $lblType;
public $lblNumero_serie;
public $lblDate_circulation;
public $lblModele;
public $lblDepartement;
public $lblRegion;
public $lblRecensement_adherent;
public $lblRecensement_qui;
public $lblRecensement_email;
public $lblRecensement_note;
public $last_update;
public $lblPays;
public $lblEnac;
public $lblImmatriculation;
public $lblDepartementNom;
public $lblCouleur;
public $lblPlace;
//End DataSource Variables
//DataSourceClass_Initialize Event @2-413F1817
function clsgrdMehariDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Grid grdMehari";
$this->Initialize();
$this->lblMehari_id = new clsField("lblMehari_id", ccsInteger, "");
$this->lblDateSaisie = new clsField("lblDateSaisie", ccsDate, $this->DateFormat);
$this->lblAn = new clsField("lblAn", ccsText, "");
$this->lblType = new clsField("lblType", ccsText, "");
$this->lblNumero_serie = new clsField("lblNumero_serie", ccsText, "");
$this->lblDate_circulation = new clsField("lblDate_circulation", ccsDate, $this->DateFormat);
$this->lblModele = new clsField("lblModele", ccsText, "");
$this->lblDepartement = new clsField("lblDepartement", ccsText, "");
$this->lblRegion = new clsField("lblRegion", ccsText, "");
$this->lblRecensement_adherent = new clsField("lblRecensement_adherent", ccsText, "");
$this->lblRecensement_qui = new clsField("lblRecensement_qui", ccsText, "");
$this->lblRecensement_email = new clsField("lblRecensement_email", ccsText, "");
$this->lblRecensement_note = new clsField("lblRecensement_note", ccsText, "");
$this->last_update = new clsField("last_update", ccsDate, $this->DateFormat);
$this->lblPays = new clsField("lblPays", ccsText, "");
$this->lblEnac = new clsField("lblEnac", ccsText, "");
$this->lblImmatriculation = new clsField("lblImmatriculation", ccsText, "");
$this->lblDepartementNom = new clsField("lblDepartementNom", ccsText, "");
$this->lblCouleur = new clsField("lblCouleur", ccsText, "");
$this->lblPlace = new clsField("lblPlace", ccsText, "");
}
//End DataSourceClass_Initialize Event
//SetOrder Method @2-9E1383D1
function SetOrder($SorterName, $SorterDirection)
{
$this->Order = "";
$this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection,
"");
}
//End SetOrder Method
//Prepare Method @2-59FDCBA4
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "urls_mehari_an", ccsText, "", "", $this->Parameters["urls_mehari_an"], "", false);
$this->wp->AddParameter("2", "urls_mehari_type", ccsText, "", "", $this->Parameters["urls_mehari_type"], "", false);
$this->wp->AddParameter("3", "urls_mehari_numero_serie", ccsText, "", "", $this->Parameters["urls_mehari_numero_serie"], "", false);
$this->wp->AddParameter("4", "urls_mehari_immatriculation", ccsText, "", "", $this->Parameters["urls_mehari_immatriculation"], "", false);
$this->wp->AddParameter("5", "urls_mehari_id", ccsText, "", "", $this->Parameters["urls_mehari_id"], "", false);
}
//End Prepare Method
//Open Method @2-5486EAC3
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->CountSQL = "SELECT COUNT(*) FROM (((((rec_mehari LEFT JOIN rec_departements ON\n" .
"rec_mehari.departement_id = rec_departements.departement_id) LEFT JOIN rec_regions ON\n" .
"rec_departements.region_id = rec_regions.region_id) LEFT JOIN rec_couleurs ON\n" .
"rec_mehari.mehari_couleur = rec_couleurs.couleur_id) LEFT JOIN rec_places ON\n" .
"rec_mehari.mehari_place = rec_places.place_id) LEFT JOIN rec_pays ON\n" .
"rec_regions.pays_id = rec_pays.pays_id) LEFT JOIN rec_modele ON\n" .
"rec_mehari.modele_id = rec_modele.modele_id";
$this->SQL = "SELECT rec_mehari.*, num_departement, departement_nom, region_nom, pays_nom, couleur_desc, place_desc, modele_desc\n" .
"FROM (((((rec_mehari LEFT JOIN rec_departements ON\n" .
"rec_mehari.departement_id = rec_departements.departement_id) LEFT JOIN rec_regions ON\n" .
"rec_departements.region_id = rec_regions.region_id) LEFT JOIN rec_couleurs ON\n" .
"rec_mehari.mehari_couleur = rec_couleurs.couleur_id) LEFT JOIN rec_places ON\n" .
"rec_mehari.mehari_place = rec_places.place_id) LEFT JOIN rec_pays ON\n" .
"rec_regions.pays_id = rec_pays.pays_id) LEFT JOIN rec_modele ON\n" .
"rec_mehari.modele_id = rec_modele.modele_id";
$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 @2-CDED085F
function SetValues()
{
$this->lblMehari_id->SetDBValue(trim($this->f("mehari_id")));
$this->lblDateSaisie->SetDBValue(trim($this->f("saisie")));
$this->lblAn->SetDBValue($this->f("mehari_an"));
$this->lblType->SetDBValue($this->f("mehari_type"));
$this->lblNumero_serie->SetDBValue($this->f("mehari_numero_serie"));
$this->lblDate_circulation->SetDBValue(trim($this->f("mehari_date_circulation")));
$this->lblModele->SetDBValue($this->f("modele_desc"));
$this->lblDepartement->SetDBValue($this->f("num_departement"));
$this->lblRegion->SetDBValue($this->f("region_nom"));
$this->lblRecensement_adherent->SetDBValue($this->f("recensement_adherent"));
$this->lblRecensement_qui->SetDBValue($this->f("recensement_qui"));
$this->lblRecensement_email->SetDBValue($this->f("recensement_email"));
$this->lblRecensement_note->SetDBValue($this->f("recensement_note"));
$this->last_update->SetDBValue(trim($this->f("last_update")));
$this->lblPays->SetDBValue($this->f("pays_nom"));
$this->lblEnac->SetDBValue($this->f("mehari:enac"));
$this->lblImmatriculation->SetDBValue($this->f("mehari_immatriculation"));
$this->lblDepartementNom->SetDBValue($this->f("departement_nom"));
$this->lblCouleur->SetDBValue($this->f("couleur_desc"));
$this->lblPlace->SetDBValue($this->f("place_desc"));
}
//End SetValues Method
} //End grdMehariDataSource Class @2-FCB6E20C
//Include Page implementation @132-11B45D65
include_once(RelativePath . "/top.php");
//End Include Page implementation
class clsRecordfrmMehari { //frmMehari Class @140-B3791205
//Variables @140-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 @140-715CFF87
function clsRecordfrmMehari($RelativePath, & $Parent)
{
global $FileName;
global $CCSLocales;
global $DefaultDateFormat;
$this->Visible = true;
$this->Parent = & $Parent;
$this->RelativePath = $RelativePath;
$this->Errors = new clsErrors();
$this->ErrorBlock = "Record frmMehari/Error";
$this->DataSource = new clsfrmMehariDataSource($this);
$this->ds = & $this->DataSource;
$this->InsertAllowed = true;
$this->UpdateAllowed = true;
$this->ReadAllowed = true;
if($this->Visible)
{
$this->ComponentName = "frmMehari";
$this->Attributes = new clsAttributes($this->ComponentName . ":");
$CCSForm = explode(":", CCGetFromGet("ccsForm", ""), 2);
if(sizeof($CCSForm) == 1)
$CCSForm[1] = "";
list($FormName, $FormMethod) = $CCSForm;
$this->EditMode = ($FormMethod == "Edit");
$this->FormEnctype = "application/x-www-form-urlencoded";
$this->FormSubmitted = ($FormName == $this->ComponentName);
$Method = $this->FormSubmitted ? ccsPost : ccsGet;
$this->Button_Insert = new clsButton("Button_Insert", $Method, $this);
$this->Button_Update = new clsButton("Button_Update", $Method, $this);
$this->mehari_id = new clsControl(ccsTextBox, "mehari_id", "Mehari Id", ccsInteger, "", CCGetRequestParam("mehari_id", $Method, NULL), $this);
$this->mehari_id->Required = true;
$this->saisie = new clsControl(ccsTextBox, "saisie", "Saisie", ccsDate, $DefaultDateFormat, CCGetRequestParam("saisie", $Method, NULL), $this);
$this->DatePicker_saisie = new clsDatePicker("DatePicker_saisie", "frmMehari", "saisie", $this);
$this->mehari_an = new clsControl(ccsTextBox, "mehari_an", "Mehari An", ccsText, "", CCGetRequestParam("mehari_an", $Method, NULL), $this);
$this->mehari_type = new clsControl(ccsTextBox, "mehari_type", "Mehari Type", ccsText, "", CCGetRequestParam("mehari_type", $Method, NULL), $this);
$this->mehari_numero_serie = new clsControl(ccsTextBox, "mehari_numero_serie", "Mehari Numero Serie", ccsText, "", CCGetRequestParam("mehari_numero_serie", $Method, NULL), $this);
$this->mehari_date_circulation = new clsControl(ccsTextBox, "mehari_date_circulation", "Mehari Date Circulation", ccsDate, $DefaultDateFormat, CCGetRequestParam("mehari_date_circulation", $Method, NULL), $this);
$this->DatePicker_mehari_date_circulation = new clsDatePicker("DatePicker_mehari_date_circulation", "frmMehari", "mehari_date_circulation", $this);
$this->departement_id = new clsControl(ccsListBox, "departement_id", "Departement Id", ccsInteger, "", CCGetRequestParam("departement_id", $Method, NULL), $this);
$this->departement_id->DSType = dsSQL;
$this->departement_id->DataSource = new clsDBcnxRecensement();
$this->departement_id->ds = & $this->departement_id->DataSource;
list($this->departement_id->BoundColumn, $this->departement_id->TextColumn, $this->departement_id->DBFormat) = array("departement_id", "departement", "");
$this->departement_id->DataSource->SQL = "SELECT departement_id, concat(concat(num_departement, \" - \"), departement_nom) as departement \n" .
"FROM rec_departements ";
$this->departement_id->DataSource->Order = "";
$this->recensement_adherent = new clsControl(ccsTextBox, "recensement_adherent", "Recensement Adherent", ccsText, "", CCGetRequestParam("recensement_adherent", $Method, NULL), $this);
$this->recensement_qui = new clsControl(ccsTextBox, "recensement_qui", "Recensement Qui", ccsText, "", CCGetRequestParam("recensement_qui", $Method, NULL), $this);
$this->recensement_email = new clsControl(ccsTextBox, "recensement_email", "Recensement Email", ccsText, "", CCGetRequestParam("recensement_email", $Method, NULL), $this);
$this->mehari_enac = new clsControl(ccsTextBox, "mehari_enac", "Mehari Enac", ccsText, "", CCGetRequestParam("mehari_enac", $Method, NULL), $this);
$this->mehari_immatriculation = new clsControl(ccsTextBox, "mehari_immatriculation", "Mehari Immatriculation", ccsText, "", CCGetRequestParam("mehari_immatriculation", $Method, NULL), $this);
$this->mehari_couleur = new clsControl(ccsListBox, "mehari_couleur", "Mehari Couleur", ccsInteger, "", CCGetRequestParam("mehari_couleur", $Method, NULL), $this);
$this->mehari_couleur->DSType = dsTable;
$this->mehari_couleur->DataSource = new clsDBcnxRecensement();
$this->mehari_couleur->ds = & $this->mehari_couleur->DataSource;
$this->mehari_couleur->DataSource->SQL = "SELECT * \n" .
"FROM rec_couleurs {SQL_Where} {SQL_OrderBy}";
list($this->mehari_couleur->BoundColumn, $this->mehari_couleur->TextColumn, $this->mehari_couleur->DBFormat) = array("couleur_id", "couleur_desc", "");
$this->mehari_place = new clsControl(ccsListBox, "mehari_place", "Mehari Place", ccsInteger, "", CCGetRequestParam("mehari_place", $Method, NULL), $this);
$this->mehari_place->DSType = dsTable;
$this->mehari_place->DataSource = new clsDBcnxRecensement();
$this->mehari_place->ds = & $this->mehari_place->DataSource;
$this->mehari_place->DataSource->SQL = "SELECT * \n" .
"FROM rec_places {SQL_Where} {SQL_OrderBy}";
list($this->mehari_place->BoundColumn, $this->mehari_place->TextColumn, $this->mehari_place->DBFormat) = array("place_id", "place_desc", "");
$this->modele_id = new clsControl(ccsListBox, "modele_id", "Modele Id", ccsInteger, "", CCGetRequestParam("modele_id", $Method, NULL), $this);
$this->modele_id->DSType = dsTable;
$this->modele_id->DataSource = new clsDBcnxRecensement();
$this->modele_id->ds = & $this->modele_id->DataSource;
$this->modele_id->DataSource->SQL = "SELECT * \n" .
"FROM rec_modele {SQL_Where} {SQL_OrderBy}";
list($this->modele_id->BoundColumn, $this->modele_id->TextColumn, $this->modele_id->DBFormat) = array("modele_id", "modele_desc", "");
$this->modele_id->Required = true;
$this->recensement_note = new clsControl(ccsTextArea, "recensement_note", "Recensement Note", ccsMemo, "", CCGetRequestParam("recensement_note", $Method, NULL), $this);
$this->lblDernierRecensement = new clsControl(ccsLabel, "lblDernierRecensement", "lblDernierRecensement", ccsText, "", CCGetRequestParam("lblDernierRecensement", $Method, NULL), $this);
$this->last_update = new clsControl(ccsHidden, "last_update", "Last Update", ccsText, "", CCGetRequestParam("last_update", $Method, NULL), $this);
$this->txtPseudo = new clsControl(ccsTextBox, "txtPseudo", "txtPseudo", ccsText, "", CCGetRequestParam("txtPseudo", $Method, NULL), $this);
$this->mehari_pseudo_ok = new clsControl(ccsCheckBox, "mehari_pseudo_ok", "mehari_pseudo_ok", ccsInteger, "", CCGetRequestParam("mehari_pseudo_ok", $Method, NULL), $this);
$this->mehari_pseudo_ok->CheckedValue = $this->mehari_pseudo_ok->GetParsedValue(1);
$this->mehari_pseudo_ok->UncheckedValue = $this->mehari_pseudo_ok->GetParsedValue(0);
$this->mehari_post_forum = new clsControl(ccsTextBox, "mehari_post_forum", "mehari_post_forum", ccsText, "", CCGetRequestParam("mehari_post_forum", $Method, NULL), $this);
$this->recensement_actif = new clsControl(ccsRadioButton, "recensement_actif", "recensement_actif", ccsInteger, "", CCGetRequestParam("recensement_actif", $Method, NULL), $this);
$this->recensement_actif->DSType = dsListOfValues;
$this->recensement_actif->Values = array(array("0", "Non"), array("1", "Oui"));
$this->recensement_actif->HTML = true;
$this->mehari_numero_serie_id = new clsControl(ccsListBox, "mehari_numero_serie_id", "mehari_numero_serie_id", ccsInteger, "", CCGetRequestParam("mehari_numero_serie_id", $Method, NULL), $this);
$this->mehari_numero_serie_id->DSType = dsSQL;
$this->mehari_numero_serie_id->DataSource = new clsDBcnxRecensement();
$this->mehari_numero_serie_id->ds = & $this->mehari_numero_serie_id->DataSource;
list($this->mehari_numero_serie_id->BoundColumn, $this->mehari_numero_serie_id->TextColumn, $this->mehari_numero_serie_id->DBFormat) = array("numero_serie_id", "texte_output", "");
$this->mehari_numero_serie_id->DataSource->SQL = "SELECT numero_serie_id, CONCAT_WS(\" - \", numero_serie_annee, numero_serie_type, numero_serie_start, numero_serie_end) as texte_output\n" .
"FROM rec_numero_serie {SQL_OrderBy}";
$this->mehari_numero_serie_id->DataSource->Order = "numero_serie_annee, numero_serie_id";
if(!$this->FormSubmitted) {
if(!is_array($this->saisie->Value) && !strlen($this->saisie->Value) && $this->saisie->Value !== false)
$this->saisie->SetValue(time());
if(!is_array($this->mehari_pseudo_ok->Value) && !strlen($this->mehari_pseudo_ok->Value) && $this->mehari_pseudo_ok->Value !== false)
$this->mehari_pseudo_ok->SetValue(false);
if(!is_array($this->recensement_actif->Value) && !strlen($this->recensement_actif->Value) && $this->recensement_actif->Value !== false)
$this->recensement_actif->SetText(1);
}
}
}
//End Class_Initialize Event
//Initialize Method @140-2832F4DC
function Initialize()
{
if(!$this->Visible)
return;
$this->DataSource->Parameters["urlid"] = CCGetFromGet("id", NULL);
}
//End Initialize Method
//Validate Method @140-714DFCE4
function Validate()
{
global $CCSLocales;
$Validation = true;
$Where = "";
$Validation = ($this->mehari_id->Validate() && $Validation);
$Validation = ($this->saisie->Validate() && $Validation);
$Validation = ($this->mehari_an->Validate() && $Validation);
$Validation = ($this->mehari_type->Validate() && $Validation);
$Validation = ($this->mehari_numero_serie->Validate() && $Validation);
$Validation = ($this->mehari_date_circulation->Validate() && $Validation);
$Validation = ($this->departement_id->Validate() && $Validation);
$Validation = ($this->recensement_adherent->Validate() && $Validation);
$Validation = ($this->recensement_qui->Validate() && $Validation);
$Validation = ($this->recensement_email->Validate() && $Validation);
$Validation = ($this->mehari_enac->Validate() && $Validation);
$Validation = ($this->mehari_immatriculation->Validate() && $Validation);
$Validation = ($this->mehari_couleur->Validate() && $Validation);
$Validation = ($this->mehari_place->Validate() && $Validation);
$Validation = ($this->modele_id->Validate() && $Validation);
$Validation = ($this->recensement_note->Validate() && $Validation);
$Validation = ($this->last_update->Validate() && $Validation);
$Validation = ($this->txtPseudo->Validate() && $Validation);
$Validation = ($this->mehari_pseudo_ok->Validate() && $Validation);
$Validation = ($this->mehari_post_forum->Validate() && $Validation);
$Validation = ($this->recensement_actif->Validate() && $Validation);
$Validation = ($this->mehari_numero_serie_id->Validate() && $Validation);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "OnValidate", $this);
$Validation = $Validation && ($this->mehari_id->Errors->Count() == 0);
$Validation = $Validation && ($this->saisie->Errors->Count() == 0);
$Validation = $Validation && ($this->mehari_an->Errors->Count() == 0);
$Validation = $Validation && ($this->mehari_type->Errors->Count() == 0);
$Validation = $Validation && ($this->mehari_numero_serie->Errors->Count() == 0);
$Validation = $Validation && ($this->mehari_date_circulation->Errors->Count() == 0);
$Validation = $Validation && ($this->departement_id->Errors->Count() == 0);
$Validation = $Validation && ($this->recensement_adherent->Errors->Count() == 0);
$Validation = $Validation && ($this->recensement_qui->Errors->Count() == 0);
$Validation = $Validation && ($this->recensement_email->Errors->Count() == 0);
$Validation = $Validation && ($this->mehari_enac->Errors->Count() == 0);
$Validation = $Validation && ($this->mehari_immatriculation->Errors->Count() == 0);
$Validation = $Validation && ($this->mehari_couleur->Errors->Count() == 0);
$Validation = $Validation && ($this->mehari_place->Errors->Count() == 0);
$Validation = $Validation && ($this->modele_id->Errors->Count() == 0);
$Validation = $Validation && ($this->recensement_note->Errors->Count() == 0);
$Validation = $Validation && ($this->last_update->Errors->Count() == 0);
$Validation = $Validation && ($this->txtPseudo->Errors->Count() == 0);
$Validation = $Validation && ($this->mehari_pseudo_ok->Errors->Count() == 0);
$Validation = $Validation && ($this->mehari_post_forum->Errors->Count() == 0);
$Validation = $Validation && ($this->recensement_actif->Errors->Count() == 0);
$Validation = $Validation && ($this->mehari_numero_serie_id->Errors->Count() == 0);
return (($this->Errors->Count() == 0) && $Validation);
}
//End Validate Method
//CheckErrors Method @140-A7ADA0E0
function CheckErrors()
{
$errors = false;
$errors = ($errors || $this->mehari_id->Errors->Count());
$errors = ($errors || $this->saisie->Errors->Count());
$errors = ($errors || $this->DatePicker_saisie->Errors->Count());
$errors = ($errors || $this->mehari_an->Errors->Count());
$errors = ($errors || $this->mehari_type->Errors->Count());
$errors = ($errors || $this->mehari_numero_serie->Errors->Count());
$errors = ($errors || $this->mehari_date_circulation->Errors->Count());
$errors = ($errors || $this->DatePicker_mehari_date_circulation->Errors->Count());
$errors = ($errors || $this->departement_id->Errors->Count());
$errors = ($errors || $this->recensement_adherent->Errors->Count());
$errors = ($errors || $this->recensement_qui->Errors->Count());
$errors = ($errors || $this->recensement_email->Errors->Count());
$errors = ($errors || $this->mehari_enac->Errors->Count());
$errors = ($errors || $this->mehari_immatriculation->Errors->Count());
$errors = ($errors || $this->mehari_couleur->Errors->Count());
$errors = ($errors || $this->mehari_place->Errors->Count());
$errors = ($errors || $this->modele_id->Errors->Count());
$errors = ($errors || $this->recensement_note->Errors->Count());
$errors = ($errors || $this->lblDernierRecensement->Errors->Count());
$errors = ($errors || $this->last_update->Errors->Count());
$errors = ($errors || $this->txtPseudo->Errors->Count());
$errors = ($errors || $this->mehari_pseudo_ok->Errors->Count());
$errors = ($errors || $this->mehari_post_forum->Errors->Count());
$errors = ($errors || $this->recensement_actif->Errors->Count());
$errors = ($errors || $this->mehari_numero_serie_id->Errors->Count());
$errors = ($errors || $this->Errors->Count());
$errors = ($errors || $this->DataSource->Errors->Count());
return $errors;
}
//End CheckErrors Method
//Operation Method @140-FA782B31
function Operation()
{
if(!$this->Visible)
return;
global $Redirect;
global $FileName;
$this->DataSource->Prepare();
if(!$this->FormSubmitted) {
$this->EditMode = $this->DataSource->AllParametersSet;
return;
}
if($this->FormSubmitted) {
$this->PressedButton = $this->EditMode ? "Button_Update" : "Button_Insert";
if($this->Button_Insert->Pressed) {
$this->PressedButton = "Button_Insert";
} else if($this->Button_Update->Pressed) {
$this->PressedButton = "Button_Update";
}
}
$Redirect = $FileName . "?" . CCGetQueryString("QueryString", array("ccsForm"));
if($this->Validate()) {
if($this->PressedButton == "Button_Insert") {
if(!CCGetEvent($this->Button_Insert->CCSEvents, "OnClick", $this->Button_Insert) || !$this->InsertRow()) {
$Redirect = "";
}
} else if($this->PressedButton == "Button_Update") {
$Redirect = $FileName . "?" . CCGetQueryString("QueryString", array("ccsForm", "id"));
if(!CCGetEvent($this->Button_Update->CCSEvents, "OnClick", $this->Button_Update) || !$this->UpdateRow()) {
$Redirect = "";
}
}
} else {
$Redirect = "";
}
if ($Redirect)
$this->DataSource->close();
}
//End Operation Method
//InsertRow Method @140-36913494
function InsertRow()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeInsert", $this);
if(!$this->InsertAllowed) return false;
$this->DataSource->mehari_id->SetValue($this->mehari_id->GetValue(true));
$this->DataSource->saisie->SetValue($this->saisie->GetValue(true));
$this->DataSource->mehari_an->SetValue($this->mehari_an->GetValue(true));
$this->DataSource->mehari_type->SetValue($this->mehari_type->GetValue(true));
$this->DataSource->mehari_numero_serie->SetValue($this->mehari_numero_serie->GetValue(true));
$this->DataSource->mehari_date_circulation->SetValue($this->mehari_date_circulation->GetValue(true));
$this->DataSource->departement_id->SetValue($this->departement_id->GetValue(true));
$this->DataSource->recensement_adherent->SetValue($this->recensement_adherent->GetValue(true));
$this->DataSource->recensement_qui->SetValue($this->recensement_qui->GetValue(true));
$this->DataSource->recensement_email->SetValue($this->recensement_email->GetValue(true));
$this->DataSource->mehari_enac->SetValue($this->mehari_enac->GetValue(true));
$this->DataSource->mehari_immatriculation->SetValue($this->mehari_immatriculation->GetValue(true));
$this->DataSource->mehari_couleur->SetValue($this->mehari_couleur->GetValue(true));
$this->DataSource->mehari_place->SetValue($this->mehari_place->GetValue(true));
$this->DataSource->modele_id->SetValue($this->modele_id->GetValue(true));
$this->DataSource->recensement_note->SetValue($this->recensement_note->GetValue(true));
$this->DataSource->lblDernierRecensement->SetValue($this->lblDernierRecensement->GetValue(true));
$this->DataSource->last_update->SetValue($this->last_update->GetValue(true));
$this->DataSource->txtPseudo->SetValue($this->txtPseudo->GetValue(true));
$this->DataSource->mehari_pseudo_ok->SetValue($this->mehari_pseudo_ok->GetValue(true));
$this->DataSource->mehari_post_forum->SetValue($this->mehari_post_forum->GetValue(true));
$this->DataSource->recensement_actif->SetValue($this->recensement_actif->GetValue(true));
$this->DataSource->mehari_numero_serie_id->SetValue($this->mehari_numero_serie_id->GetValue(true));
$this->DataSource->Insert();
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterInsert", $this);
return (!$this->CheckErrors());
}
//End InsertRow Method
//UpdateRow Method @140-2DBEF0C8
function UpdateRow()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeUpdate", $this);
if(!$this->UpdateAllowed) return false;
$this->DataSource->mehari_id->SetValue($this->mehari_id->GetValue(true));
$this->DataSource->saisie->SetValue($this->saisie->GetValue(true));
$this->DataSource->mehari_an->SetValue($this->mehari_an->GetValue(true));
$this->DataSource->mehari_type->SetValue($this->mehari_type->GetValue(true));
$this->DataSource->mehari_numero_serie->SetValue($this->mehari_numero_serie->GetValue(true));
$this->DataSource->mehari_date_circulation->SetValue($this->mehari_date_circulation->GetValue(true));
$this->DataSource->departement_id->SetValue($this->departement_id->GetValue(true));
$this->DataSource->recensement_adherent->SetValue($this->recensement_adherent->GetValue(true));
$this->DataSource->recensement_qui->SetValue($this->recensement_qui->GetValue(true));
$this->DataSource->recensement_email->SetValue($this->recensement_email->GetValue(true));
$this->DataSource->mehari_enac->SetValue($this->mehari_enac->GetValue(true));
$this->DataSource->mehari_immatriculation->SetValue($this->mehari_immatriculation->GetValue(true));
$this->DataSource->mehari_couleur->SetValue($this->mehari_couleur->GetValue(true));
$this->DataSource->mehari_place->SetValue($this->mehari_place->GetValue(true));
$this->DataSource->modele_id->SetValue($this->modele_id->GetValue(true));
$this->DataSource->recensement_note->SetValue($this->recensement_note->GetValue(true));
$this->DataSource->lblDernierRecensement->SetValue($this->lblDernierRecensement->GetValue(true));
$this->DataSource->last_update->SetValue($this->last_update->GetValue(true));
$this->DataSource->txtPseudo->SetValue($this->txtPseudo->GetValue(true));
$this->DataSource->mehari_pseudo_ok->SetValue($this->mehari_pseudo_ok->GetValue(true));
$this->DataSource->mehari_post_forum->SetValue($this->mehari_post_forum->GetValue(true));
$this->DataSource->recensement_actif->SetValue($this->recensement_actif->GetValue(true));
$this->DataSource->mehari_numero_serie_id->SetValue($this->mehari_numero_serie_id->GetValue(true));
$this->DataSource->Update();
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterUpdate", $this);
return (!$this->CheckErrors());
}
//End UpdateRow Method
//Show Method @140-AA9E8BE2
function Show()
{
global $CCSUseAmp;
$Tpl = CCGetTemplate($this);
global $FileName;
global $CCSLocales;
$Error = "";
if(!$this->Visible)
return;
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this);
$this->departement_id->Prepare();
$this->mehari_couleur->Prepare();
$this->mehari_place->Prepare();
$this->modele_id->Prepare();
$this->recensement_actif->Prepare();
$this->mehari_numero_serie_id->Prepare();
$RecordBlock = "Record " . $this->ComponentName;
$ParentPath = $Tpl->block_path;
$Tpl->block_path = $ParentPath . "/" . $RecordBlock;
$this->EditMode = $this->EditMode && $this->ReadAllowed;
if($this->EditMode) {
if($this->DataSource->Errors->Count()){
$this->Errors->AddErrors($this->DataSource->Errors);
$this->DataSource->Errors->clear();
}
$this->DataSource->Open();
if($this->DataSource->Errors->Count() == 0 && $this->DataSource->next_record()) {
$this->DataSource->SetValues();
if(!$this->FormSubmitted){
$this->mehari_id->SetValue($this->DataSource->mehari_id->GetValue());
$this->saisie->SetValue($this->DataSource->saisie->GetValue());
$this->mehari_an->SetValue($this->DataSource->mehari_an->GetValue());
$this->mehari_type->SetValue($this->DataSource->mehari_type->GetValue());
$this->mehari_numero_serie->SetValue($this->DataSource->mehari_numero_serie->GetValue());
$this->mehari_date_circulation->SetValue($this->DataSource->mehari_date_circulation->GetValue());
$this->departement_id->SetValue($this->DataSource->departement_id->GetValue());
$this->recensement_adherent->SetValue($this->DataSource->recensement_adherent->GetValue());
$this->recensement_qui->SetValue($this->DataSource->recensement_qui->GetValue());
$this->recensement_email->SetValue($this->DataSource->recensement_email->GetValue());
$this->mehari_enac->SetValue($this->DataSource->mehari_enac->GetValue());
$this->mehari_immatriculation->SetValue($this->DataSource->mehari_immatriculation->GetValue());
$this->mehari_couleur->SetValue($this->DataSource->mehari_couleur->GetValue());
$this->mehari_place->SetValue($this->DataSource->mehari_place->GetValue());
$this->modele_id->SetValue($this->DataSource->modele_id->GetValue());
$this->recensement_note->SetValue($this->DataSource->recensement_note->GetValue());
$this->last_update->SetValue($this->DataSource->last_update->GetValue());
$this->txtPseudo->SetValue($this->DataSource->txtPseudo->GetValue());
$this->mehari_pseudo_ok->SetValue($this->DataSource->mehari_pseudo_ok->GetValue());
$this->mehari_post_forum->SetValue($this->DataSource->mehari_post_forum->GetValue());
$this->recensement_actif->SetValue($this->DataSource->recensement_actif->GetValue());
$this->mehari_numero_serie_id->SetValue($this->DataSource->mehari_numero_serie_id->GetValue());
}
} else {
$this->EditMode = false;
}
}
if($this->FormSubmitted || $this->CheckErrors()) {
$Error = "";
$Error = ComposeStrings($Error, $this->mehari_id->Errors->ToString());
$Error = ComposeStrings($Error, $this->saisie->Errors->ToString());
$Error = ComposeStrings($Error, $this->DatePicker_saisie->Errors->ToString());
$Error = ComposeStrings($Error, $this->mehari_an->Errors->ToString());
$Error = ComposeStrings($Error, $this->mehari_type->Errors->ToString());
$Error = ComposeStrings($Error, $this->mehari_numero_serie->Errors->ToString());
$Error = ComposeStrings($Error, $this->mehari_date_circulation->Errors->ToString());
$Error = ComposeStrings($Error, $this->DatePicker_mehari_date_circulation->Errors->ToString());
$Error = ComposeStrings($Error, $this->departement_id->Errors->ToString());
$Error = ComposeStrings($Error, $this->recensement_adherent->Errors->ToString());
$Error = ComposeStrings($Error, $this->recensement_qui->Errors->ToString());
$Error = ComposeStrings($Error, $this->recensement_email->Errors->ToString());
$Error = ComposeStrings($Error, $this->mehari_enac->Errors->ToString());
$Error = ComposeStrings($Error, $this->mehari_immatriculation->Errors->ToString());
$Error = ComposeStrings($Error, $this->mehari_couleur->Errors->ToString());
$Error = ComposeStrings($Error, $this->mehari_place->Errors->ToString());
$Error = ComposeStrings($Error, $this->modele_id->Errors->ToString());
$Error = ComposeStrings($Error, $this->recensement_note->Errors->ToString());
$Error = ComposeStrings($Error, $this->lblDernierRecensement->Errors->ToString());
$Error = ComposeStrings($Error, $this->last_update->Errors->ToString());
$Error = ComposeStrings($Error, $this->txtPseudo->Errors->ToString());
$Error = ComposeStrings($Error, $this->mehari_pseudo_ok->Errors->ToString());
$Error = ComposeStrings($Error, $this->mehari_post_forum->Errors->ToString());
$Error = ComposeStrings($Error, $this->recensement_actif->Errors->ToString());
$Error = ComposeStrings($Error, $this->mehari_numero_serie_id->Errors->ToString());
$Error = ComposeStrings($Error, $this->Errors->ToString());
$Error = ComposeStrings($Error, $this->DataSource->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->Button_Insert->Visible = !$this->EditMode && $this->InsertAllowed;
$this->Button_Update->Visible = $this->EditMode && $this->UpdateAllowed;
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this);
$this->Attributes->Show();
if(!$this->Visible) {
$Tpl->block_path = $ParentPath;
return;
}
$this->Button_Insert->Show();
$this->Button_Update->Show();
$this->mehari_id->Show();
$this->saisie->Show();
$this->DatePicker_saisie->Show();
$this->mehari_an->Show();
$this->mehari_type->Show();
$this->mehari_numero_serie->Show();
$this->mehari_date_circulation->Show();
$this->DatePicker_mehari_date_circulation->Show();
$this->departement_id->Show();
$this->recensement_adherent->Show();
$this->recensement_qui->Show();
$this->recensement_email->Show();
$this->mehari_enac->Show();
$this->mehari_immatriculation->Show();
$this->mehari_couleur->Show();
$this->mehari_place->Show();
$this->modele_id->Show();
$this->recensement_note->Show();
$this->lblDernierRecensement->Show();
$this->last_update->Show();
$this->txtPseudo->Show();
$this->mehari_pseudo_ok->Show();
$this->mehari_post_forum->Show();
$this->recensement_actif->Show();
$this->mehari_numero_serie_id->Show();
$Tpl->parse();
$Tpl->block_path = $ParentPath;
$this->DataSource->close();
}
//End Show Method
} //End frmMehari Class @140-FCB6E20C
class clsfrmMehariDataSource extends clsDBcnxRecensement { //frmMehariDataSource Class @140-F09A6993
//DataSource Variables @140-08BD4E93
public $Parent = "";
public $CCSEvents = "";
public $CCSEventResult;
public $ErrorBlock;
public $CmdExecution;
public $InsertParameters;
public $UpdateParameters;
public $wp;
public $AllParametersSet;
public $InsertFields = array();
public $UpdateFields = array();
// Datasource fields
public $mehari_id;
public $saisie;
public $mehari_an;
public $mehari_type;
public $mehari_numero_serie;
public $mehari_date_circulation;
public $departement_id;
public $recensement_adherent;
public $recensement_qui;
public $recensement_email;
public $mehari_enac;
public $mehari_immatriculation;
public $mehari_couleur;
public $mehari_place;
public $modele_id;
public $recensement_note;
public $lblDernierRecensement;
public $last_update;
public $txtPseudo;
public $mehari_pseudo_ok;
public $mehari_post_forum;
public $recensement_actif;
public $mehari_numero_serie_id;
//End DataSource Variables
//DataSourceClass_Initialize Event @140-8984DFA0
function clsfrmMehariDataSource(& $Parent)
{
$this->Parent = & $Parent;
$this->ErrorBlock = "Record frmMehari/Error";
$this->Initialize();
$this->mehari_id = new clsField("mehari_id", ccsInteger, "");
$this->saisie = new clsField("saisie", ccsDate, $this->DateFormat);
$this->mehari_an = new clsField("mehari_an", ccsText, "");
$this->mehari_type = new clsField("mehari_type", ccsText, "");
$this->mehari_numero_serie = new clsField("mehari_numero_serie", ccsText, "");
$this->mehari_date_circulation = new clsField("mehari_date_circulation", ccsDate, $this->DateFormat);
$this->departement_id = new clsField("departement_id", ccsInteger, "");
$this->recensement_adherent = new clsField("recensement_adherent", ccsText, "");
$this->recensement_qui = new clsField("recensement_qui", ccsText, "");
$this->recensement_email = new clsField("recensement_email", ccsText, "");
$this->mehari_enac = new clsField("mehari_enac", ccsText, "");
$this->mehari_immatriculation = new clsField("mehari_immatriculation", ccsText, "");
$this->mehari_couleur = new clsField("mehari_couleur", ccsInteger, "");
$this->mehari_place = new clsField("mehari_place", ccsInteger, "");
$this->modele_id = new clsField("modele_id", ccsInteger, "");
$this->recensement_note = new clsField("recensement_note", ccsMemo, "");
$this->lblDernierRecensement = new clsField("lblDernierRecensement", ccsText, "");
$this->last_update = new clsField("last_update", ccsText, "");
$this->txtPseudo = new clsField("txtPseudo", ccsText, "");
$this->mehari_pseudo_ok = new clsField("mehari_pseudo_ok", ccsInteger, "");
$this->mehari_post_forum = new clsField("mehari_post_forum", ccsText, "");
$this->recensement_actif = new clsField("recensement_actif", ccsInteger, "");
$this->mehari_numero_serie_id = new clsField("mehari_numero_serie_id", ccsInteger, "");
$this->InsertFields["mehari_id"] = array("Name" => "mehari_id", "Value" => "", "DataType" => ccsInteger, "OmitIfEmpty" => 1);
$this->InsertFields["saisie"] = array("Name" => "saisie", "Value" => "", "DataType" => ccsDate, "OmitIfEmpty" => 1);
$this->InsertFields["mehari_an"] = array("Name" => "mehari_an", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
$this->InsertFields["mehari_type"] = array("Name" => "mehari_type", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
$this->InsertFields["mehari_numero_serie"] = array("Name" => "mehari_numero_serie", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
$this->InsertFields["mehari_date_circulation"] = array("Name" => "mehari_date_circulation", "Value" => "", "DataType" => ccsDate, "OmitIfEmpty" => 1);
$this->InsertFields["departement_id"] = array("Name" => "departement_id", "Value" => "", "DataType" => ccsInteger, "OmitIfEmpty" => 1);
$this->InsertFields["recensement_adherent"] = array("Name" => "recensement_adherent", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
$this->InsertFields["recensement_qui"] = array("Name" => "recensement_qui", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
$this->InsertFields["recensement_email"] = array("Name" => "recensement_email", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
$this->InsertFields["mehari_enac"] = array("Name" => "mehari_enac", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
$this->InsertFields["mehari_immatriculation"] = array("Name" => "mehari_immatriculation", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
$this->InsertFields["mehari_couleur"] = array("Name" => "mehari_couleur", "Value" => "", "DataType" => ccsInteger, "OmitIfEmpty" => 1);
$this->InsertFields["mehari_place"] = array("Name" => "mehari_place", "Value" => "", "DataType" => ccsInteger, "OmitIfEmpty" => 1);
$this->InsertFields["modele_id"] = array("Name" => "modele_id", "Value" => "", "DataType" => ccsInteger, "OmitIfEmpty" => 1);
$this->InsertFields["recensement_note"] = array("Name" => "recensement_note", "Value" => "", "DataType" => ccsMemo, "OmitIfEmpty" => 1);
$this->InsertFields["last_update"] = array("Name" => "last_update", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
$this->InsertFields["mehari_pseudo_forum"] = array("Name" => "mehari_pseudo_forum", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
$this->InsertFields["mehari_pseudo_ok"] = array("Name" => "mehari_pseudo_ok", "Value" => "", "DataType" => ccsInteger);
$this->InsertFields["mehari_post_forum"] = array("Name" => "mehari_post_forum", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
$this->InsertFields["recensement_actif"] = array("Name" => "recensement_actif", "Value" => "", "DataType" => ccsInteger, "OmitIfEmpty" => 1);
$this->InsertFields["mehari_numero_serie_id"] = array("Name" => "mehari_numero_serie_id", "Value" => "", "DataType" => ccsInteger, "OmitIfEmpty" => 1);
$this->UpdateFields["mehari_id"] = array("Name" => "mehari_id", "Value" => "", "DataType" => ccsInteger, "OmitIfEmpty" => 1);
$this->UpdateFields["saisie"] = array("Name" => "saisie", "Value" => "", "DataType" => ccsDate, "OmitIfEmpty" => 1);
$this->UpdateFields["mehari_an"] = array("Name" => "mehari_an", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
$this->UpdateFields["mehari_type"] = array("Name" => "mehari_type", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
$this->UpdateFields["mehari_numero_serie"] = array("Name" => "mehari_numero_serie", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
$this->UpdateFields["mehari_date_circulation"] = array("Name" => "mehari_date_circulation", "Value" => "", "DataType" => ccsDate, "OmitIfEmpty" => 1);
$this->UpdateFields["departement_id"] = array("Name" => "departement_id", "Value" => "", "DataType" => ccsInteger, "OmitIfEmpty" => 1);
$this->UpdateFields["recensement_adherent"] = array("Name" => "recensement_adherent", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
$this->UpdateFields["recensement_qui"] = array("Name" => "recensement_qui", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
$this->UpdateFields["recensement_email"] = array("Name" => "recensement_email", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
$this->UpdateFields["mehari_enac"] = array("Name" => "mehari_enac", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
$this->UpdateFields["mehari_immatriculation"] = array("Name" => "mehari_immatriculation", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
$this->UpdateFields["mehari_couleur"] = array("Name" => "mehari_couleur", "Value" => "", "DataType" => ccsInteger, "OmitIfEmpty" => 1);
$this->UpdateFields["mehari_place"] = array("Name" => "mehari_place", "Value" => "", "DataType" => ccsInteger, "OmitIfEmpty" => 1);
$this->UpdateFields["modele_id"] = array("Name" => "modele_id", "Value" => "", "DataType" => ccsInteger, "OmitIfEmpty" => 1);
$this->UpdateFields["recensement_note"] = array("Name" => "recensement_note", "Value" => "", "DataType" => ccsMemo, "OmitIfEmpty" => 1);
$this->UpdateFields["last_update"] = array("Name" => "last_update", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
$this->UpdateFields["mehari_pseudo_forum"] = array("Name" => "mehari_pseudo_forum", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
$this->UpdateFields["mehari_pseudo_ok"] = array("Name" => "mehari_pseudo_ok", "Value" => "", "DataType" => ccsInteger);
$this->UpdateFields["mehari_post_forum"] = array("Name" => "mehari_post_forum", "Value" => "", "DataType" => ccsText, "OmitIfEmpty" => 1);
$this->UpdateFields["recensement_actif"] = array("Name" => "recensement_actif", "Value" => "", "DataType" => ccsInteger, "OmitIfEmpty" => 1);
$this->UpdateFields["mehari_numero_serie_id"] = array("Name" => "mehari_numero_serie_id", "Value" => "", "DataType" => ccsInteger, "OmitIfEmpty" => 1);
}
//End DataSourceClass_Initialize Event
//Prepare Method @140-35B33087
function Prepare()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->wp = new clsSQLParameters($this->ErrorBlock);
$this->wp->AddParameter("1", "urlid", ccsInteger, "", "", $this->Parameters["urlid"], "", false);
$this->AllParametersSet = $this->wp->AllParamsSet();
$this->wp->Criterion[1] = $this->wp->Operation(opEqual, "id", $this->wp->GetDBValue("1"), $this->ToSQL($this->wp->GetDBValue("1"), ccsInteger),false);
$this->Where =
$this->wp->Criterion[1];
}
//End Prepare Method
//Open Method @140-C21840C8
function Open()
{
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
$this->SQL = "SELECT * \n\n" .
"FROM rec_mehari {SQL_Where} {SQL_OrderBy}";
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect", $this->Parent);
$this->PageSize = 1;
$this->query($this->OptimizeSQL(CCBuildSQL($this->SQL, $this->Where, $this->Order)));
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect", $this->Parent);
}
//End Open Method
//SetValues Method @140-5BA7489C
function SetValues()
{
$this->mehari_id->SetDBValue(trim($this->f("mehari_id")));
$this->saisie->SetDBValue(trim($this->f("saisie")));
$this->mehari_an->SetDBValue($this->f("mehari_an"));
$this->mehari_type->SetDBValue($this->f("mehari_type"));
$this->mehari_numero_serie->SetDBValue($this->f("mehari_numero_serie"));
$this->mehari_date_circulation->SetDBValue(trim($this->f("mehari_date_circulation")));
$this->departement_id->SetDBValue(trim($this->f("departement_id")));
$this->recensement_adherent->SetDBValue($this->f("recensement_adherent"));
$this->recensement_qui->SetDBValue($this->f("recensement_qui"));
$this->recensement_email->SetDBValue($this->f("recensement_email"));
$this->mehari_enac->SetDBValue($this->f("mehari_enac"));
$this->mehari_immatriculation->SetDBValue($this->f("mehari_immatriculation"));
$this->mehari_couleur->SetDBValue(trim($this->f("mehari_couleur")));
$this->mehari_place->SetDBValue(trim($this->f("mehari_place")));
$this->modele_id->SetDBValue(trim($this->f("modele_id")));
$this->recensement_note->SetDBValue($this->f("recensement_note"));
$this->last_update->SetDBValue($this->f("last_update"));
$this->txtPseudo->SetDBValue($this->f("mehari_pseudo_forum"));
$this->mehari_pseudo_ok->SetDBValue(trim($this->f("mehari_pseudo_ok")));
$this->mehari_post_forum->SetDBValue($this->f("mehari_post_forum"));
$this->recensement_actif->SetDBValue(trim($this->f("recensement_actif")));
$this->mehari_numero_serie_id->SetDBValue(trim($this->f("mehari_numero_serie_id")));
}
//End SetValues Method
//Insert Method @140-646E805B
function Insert()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->CmdExecution = true;
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildInsert", $this->Parent);
$this->InsertFields["mehari_id"]["Value"] = $this->mehari_id->GetDBValue(true);
$this->InsertFields["saisie"]["Value"] = $this->saisie->GetDBValue(true);
$this->InsertFields["mehari_an"]["Value"] = $this->mehari_an->GetDBValue(true);
$this->InsertFields["mehari_type"]["Value"] = $this->mehari_type->GetDBValue(true);
$this->InsertFields["mehari_numero_serie"]["Value"] = $this->mehari_numero_serie->GetDBValue(true);
$this->InsertFields["mehari_date_circulation"]["Value"] = $this->mehari_date_circulation->GetDBValue(true);
$this->InsertFields["departement_id"]["Value"] = $this->departement_id->GetDBValue(true);
$this->InsertFields["recensement_adherent"]["Value"] = $this->recensement_adherent->GetDBValue(true);
$this->InsertFields["recensement_qui"]["Value"] = $this->recensement_qui->GetDBValue(true);
$this->InsertFields["recensement_email"]["Value"] = $this->recensement_email->GetDBValue(true);
$this->InsertFields["mehari_enac"]["Value"] = $this->mehari_enac->GetDBValue(true);
$this->InsertFields["mehari_immatriculation"]["Value"] = $this->mehari_immatriculation->GetDBValue(true);
$this->InsertFields["mehari_couleur"]["Value"] = $this->mehari_couleur->GetDBValue(true);
$this->InsertFields["mehari_place"]["Value"] = $this->mehari_place->GetDBValue(true);
$this->InsertFields["modele_id"]["Value"] = $this->modele_id->GetDBValue(true);
$this->InsertFields["recensement_note"]["Value"] = $this->recensement_note->GetDBValue(true);
$this->InsertFields["last_update"]["Value"] = $this->last_update->GetDBValue(true);
$this->InsertFields["mehari_pseudo_forum"]["Value"] = $this->txtPseudo->GetDBValue(true);
$this->InsertFields["mehari_pseudo_ok"]["Value"] = $this->mehari_pseudo_ok->GetDBValue(true);
$this->InsertFields["mehari_post_forum"]["Value"] = $this->mehari_post_forum->GetDBValue(true);
$this->InsertFields["recensement_actif"]["Value"] = $this->recensement_actif->GetDBValue(true);
$this->InsertFields["mehari_numero_serie_id"]["Value"] = $this->mehari_numero_serie_id->GetDBValue(true);
$this->SQL = CCBuildInsert("rec_mehari", $this->InsertFields, $this);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteInsert", $this->Parent);
if($this->Errors->Count() == 0 && $this->CmdExecution) {
$this->query($this->SQL);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteInsert", $this->Parent);
}
}
//End Insert Method
//Update Method @140-16EAA93B
function Update()
{
global $CCSLocales;
global $DefaultDateFormat;
$this->CmdExecution = true;
$Where = "";
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildUpdate", $this->Parent);
$this->UpdateFields["mehari_id"]["Value"] = $this->mehari_id->GetDBValue(true);
$this->UpdateFields["saisie"]["Value"] = $this->saisie->GetDBValue(true);
$this->UpdateFields["mehari_an"]["Value"] = $this->mehari_an->GetDBValue(true);
$this->UpdateFields["mehari_type"]["Value"] = $this->mehari_type->GetDBValue(true);
$this->UpdateFields["mehari_numero_serie"]["Value"] = $this->mehari_numero_serie->GetDBValue(true);
$this->UpdateFields["mehari_date_circulation"]["Value"] = $this->mehari_date_circulation->GetDBValue(true);
$this->UpdateFields["departement_id"]["Value"] = $this->departement_id->GetDBValue(true);
$this->UpdateFields["recensement_adherent"]["Value"] = $this->recensement_adherent->GetDBValue(true);
$this->UpdateFields["recensement_qui"]["Value"] = $this->recensement_qui->GetDBValue(true);
$this->UpdateFields["recensement_email"]["Value"] = $this->recensement_email->GetDBValue(true);
$this->UpdateFields["mehari_enac"]["Value"] = $this->mehari_enac->GetDBValue(true);
$this->UpdateFields["mehari_immatriculation"]["Value"] = $this->mehari_immatriculation->GetDBValue(true);
$this->UpdateFields["mehari_couleur"]["Value"] = $this->mehari_couleur->GetDBValue(true);
$this->UpdateFields["mehari_place"]["Value"] = $this->mehari_place->GetDBValue(true);
$this->UpdateFields["modele_id"]["Value"] = $this->modele_id->GetDBValue(true);
$this->UpdateFields["recensement_note"]["Value"] = $this->recensement_note->GetDBValue(true);
$this->UpdateFields["last_update"]["Value"] = $this->last_update->GetDBValue(true);
$this->UpdateFields["mehari_pseudo_forum"]["Value"] = $this->txtPseudo->GetDBValue(true);
$this->UpdateFields["mehari_pseudo_ok"]["Value"] = $this->mehari_pseudo_ok->GetDBValue(true);
$this->UpdateFields["mehari_post_forum"]["Value"] = $this->mehari_post_forum->GetDBValue(true);
$this->UpdateFields["recensement_actif"]["Value"] = $this->recensement_actif->GetDBValue(true);
$this->UpdateFields["mehari_numero_serie_id"]["Value"] = $this->mehari_numero_serie_id->GetDBValue(true);
$this->SQL = CCBuildUpdate("rec_mehari", $this->UpdateFields, $this);
$this->SQL .= strlen($this->Where) ? " WHERE " . $this->Where : $this->Where;
if (!strlen($this->Where) && $this->Errors->Count() == 0)
$this->Errors->addError($CCSLocales->GetText("CCS_CustomOperationError_MissingParameters"));
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteUpdate", $this->Parent);
if($this->Errors->Count() == 0 && $this->CmdExecution) {
$this->query($this->SQL);
$this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteUpdate", $this->Parent);
}
}
//End Update Method
} //End frmMehariDataSource Class @140-FCB6E20C
//Initialize Page @1-BBAC5B15
// Variables
$FileName = "";
$Redirect = "";
$Tpl = "";
$TemplateFileName = "";
$BlockToParse = "";
$ComponentName = "";
$Attributes = "";
// Events;
$CCSEvents = "";
$CCSEventResult = "";
$TemplateSource = "";
$FileName = FileName;
$Redirect = "";
$TemplateFileName = "recensement_index.html";
$BlockToParse = "main";
$TemplateEncoding = "UTF-8";
$ContentType = "text/html";
$PathToRoot = "./";
$PathToRootOpt = "";
$Scripts = "|js/jquery/jquery.js|js/jquery/event-manager.js|js/jquery/selectors.js|";
$Charset = $Charset ? $Charset : "utf-8";
//End Initialize Page
//Include events file @1-944CB6F2
include_once("./recensement_index_events.php");
//End Include events file
//Before Initialize @1-E870CEBC
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeInitialize", $MainPage);
//End Before Initialize
//Initialize Objects @1-95BD7E98
$DBcnxRecensement = new clsDBcnxRecensement();
$MainPage->Connections["cnxRecensement"] = & $DBcnxRecensement;
$Attributes = new clsAttributes("page:");
$Attributes->SetValue("pathToRoot", $PathToRoot);
$MainPage->Attributes = & $Attributes;
// Controls
$srcMehari = new clsRecordsrcMehari("", $MainPage);
$grdMehari = new clsGridgrdMehari("", $MainPage);
$top = new clstop("", "top", $MainPage);
$top->Initialize();
$frmMehari = new clsRecordfrmMehari("", $MainPage);
$lblDossierPhoto = new clsControl(ccsLabel, "lblDossierPhoto", "lblDossierPhoto", ccsText, "", CCGetRequestParam("lblDossierPhoto", ccsGet, NULL), $MainPage);
$lblDossierPhoto->HTML = true;
$MainPage->srcMehari = & $srcMehari;
$MainPage->grdMehari = & $grdMehari;
$MainPage->top = & $top;
$MainPage->frmMehari = & $frmMehari;
$MainPage->lblDossierPhoto = & $lblDossierPhoto;
$grdMehari->Initialize();
$frmMehari->Initialize();
$ScriptIncludes = "";
$SList = explode("|", $Scripts);
foreach ($SList as $Script) {
if ($Script != "") $ScriptIncludes = $ScriptIncludes . "<script src=\"" . $PathToRoot . $Script . "\" type=\"text/javascript\"></script>\n";
}
$Attributes->SetValue("scriptIncludes", $ScriptIncludes);
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-28F2FDD6
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView", $MainPage);
$Tpl = new clsTemplate($FileEncoding, $TemplateEncoding);
if (strlen($TemplateSource)) {
$Tpl->LoadTemplateFromStr($TemplateSource, $BlockToParse, "UTF-8");
} else {
$Tpl->LoadTemplate(PathToCurrentPage . $TemplateFileName, $BlockToParse, "UTF-8");
}
$Tpl->SetVar("CCS_PathToRoot", $PathToRoot);
$Tpl->block_path = "/$BlockToParse";
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow", $MainPage);
$Attributes->SetValue("pathToRoot", "");
$Attributes->Show();
//End Initialize HTML Template
//Execute Components @1-8BF6E115
$frmMehari->Operation();
$top->Operations();
$srcMehari->Operation();
//End Execute Components
//Go to destination page @1-98AFDB7E
if($Redirect)
{
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
$DBcnxRecensement->close();
header("Location: " . $Redirect);
unset($srcMehari);
unset($grdMehari);
$top->Class_Terminate();
unset($top);
unset($frmMehari);
unset($Tpl);
exit;
}
//End Go to destination page
//Show Page @1-E09B6A61
$srcMehari->Show();
$grdMehari->Show();
$top->Show();
$frmMehari->Show();
$lblDossierPhoto->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-A1CD6C20
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
$DBcnxRecensement->close();
unset($srcMehari);
unset($grdMehari);
$top->Class_Terminate();
unset($top);
unset($frmMehari);
unset($Tpl);
//End Unload Page
?>