| Current Path : /var/www/cesa.co.za/ccmadmin/ |
| Current File : /var/www/cesa.co.za/ccmadmin/CCMStudentsinfo.php |
<?php
// Global variable for table object
$CCMStudents = NULL;
//
// Table class for CCMStudents
//
class cCCMStudents {
var $TableVar = 'CCMStudents';
var $TableName = 'CCMStudents';
var $TableType = 'TABLE';
var $CCMStudentID;
var $SelectionCategory;
var $Title;
var $Initials;
var $FirstName;
var $Surname;
var $KnownAs;
var $IDNumber;
var $Telephone;
var $Cellphone;
var $EmailAddress;
var $WorkAddress;
var $PostalAddress;
var $Department;
var $Organisation;
var $VATNo;
var $JobTitle;
var $DateofBirth;
var $PlaceofBirth;
var $CountryofBirth;
var $Province;
var $MaleorFemale;
var $RaceGroup;
var $Disability;
var $DisabilityNature;
var $DisabilityCertificate;
var $ProfessionalCouncil;
var $CategoryReg;
var $CouncilRegNumber;
var $LengthCandidateReg;
var $YearsToProfReg;
var $FirstJobStart;
var $VolAssociations;
var $BelongsTo;
var $CESA_SABTACO_MemNum;
var $AreaDiscipline;
var $AreaSubDiscipline;
var $Salary;
var $Payslip;
var $BankAccountName;
var $BankAccountBank;
var $BankAccountBranch;
var $BankAccountNo;
var $BankAccountProof;
var $Funding;
var $CWDTP;
var $BookedByName;
var $BookedByDesignation;
var $BookedByTelNo;
var $BookedByFaxNo;
var $BookedByCellNo;
var $BookedByEmail;
var $MentorID;
var $MentorName;
var $MentorDesig;
var $MentorProfRegNo;
var $MentorRegNo;
var $MentorTel;
var $MentorCell;
var $MentorEmail;
var $EmployerID;
var $HRManagerName;
var $HRManagerDesignation;
var $HRManagerTelNo;
var $HRManagerCellNo;
var $HRManagerEmail;
var $SupervisorName;
var $SupervisorDesig;
var $SupervisorProfRegNo;
var $SupervisorTelNo;
var $SupervisorCellNo;
var $SupervisorEmail;
var $EducationalInst;
var $Qualifications;
var $DateFinalExam;
var $IDFile;
var $CVFile;
var $QualCertificate1;
var $QualCertificate2;
var $QualCertificate3;
var $MentorUndertaking;
var $CandUUndertaking;
var $CompanyCandidatePolicy;
var $ResidenceProof;
var $SignedAppForm;
var $Photograph;
var $StudentNumber;
var $WebUsername;
var $WebPassword;
var $BlockAccess;
var $SABTACO;
var $CESA;
var $Archived;
var $fields = array();
var $UseTokenInUrl = EW_USE_TOKEN_IN_URL;
var $Export; // Export
var $ExportOriginalValue = EW_EXPORT_ORIGINAL_VALUE;
var $ExportAll = TRUE;
var $SendEmail; // Send email
var $TableCustomInnerHtml; // Custom inner HTML
var $BasicSearchKeyword; // Basic search keyword
var $BasicSearchType; // Basic search type
var $CurrentFilter; // Current filter
var $CurrentOrder; // Current order
var $CurrentOrderType; // Current order type
var $RowType; // Row type
var $CssClass; // CSS class
var $CssStyle; // CSS style
var $RowAttrs = array(); // Row custom attributes
var $TableFilter = "";
var $CurrentAction; // Current action
var $UpdateConflict; // Update conflict
var $EventName; // Event name
var $EventCancelled; // Event cancelled
var $CancelMessage; // Cancel message
//
// Table class constructor
//
function cCCMStudents() {
global $Language;
// CCMStudentID
$this->CCMStudentID = new cField('CCMStudents', 'CCMStudents', 'x_CCMStudentID', 'CCMStudentID', '`CCMStudentID`', 3, -1, FALSE, '`CCMStudentID`', FALSE);
$this->CCMStudentID->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
$this->fields['CCMStudentID'] =& $this->CCMStudentID;
// SelectionCategory
$this->SelectionCategory = new cField('CCMStudents', 'CCMStudents', 'x_SelectionCategory', 'SelectionCategory', '`SelectionCategory`', 200, -1, FALSE, '`SelectionCategory`', FALSE);
$this->fields['SelectionCategory'] =& $this->SelectionCategory;
// Title
$this->Title = new cField('CCMStudents', 'CCMStudents', 'x_Title', 'Title', '`Title`', 200, -1, FALSE, '`Title`', FALSE);
$this->fields['Title'] =& $this->Title;
// Initials
$this->Initials = new cField('CCMStudents', 'CCMStudents', 'x_Initials', 'Initials', '`Initials`', 200, -1, FALSE, '`Initials`', FALSE);
$this->fields['Initials'] =& $this->Initials;
// FirstName
$this->FirstName = new cField('CCMStudents', 'CCMStudents', 'x_FirstName', 'FirstName', '`FirstName`', 200, -1, FALSE, '`FirstName`', FALSE);
$this->fields['FirstName'] =& $this->FirstName;
// Surname
$this->Surname = new cField('CCMStudents', 'CCMStudents', 'x_Surname', 'Surname', '`Surname`', 200, -1, FALSE, '`Surname`', FALSE);
$this->fields['Surname'] =& $this->Surname;
// KnownAs
$this->KnownAs = new cField('CCMStudents', 'CCMStudents', 'x_KnownAs', 'KnownAs', '`KnownAs`', 200, -1, FALSE, '`KnownAs`', FALSE);
$this->fields['KnownAs'] =& $this->KnownAs;
// IDNumber
$this->IDNumber = new cField('CCMStudents', 'CCMStudents', 'x_IDNumber', 'IDNumber', '`IDNumber`', 200, -1, FALSE, '`IDNumber`', FALSE);
$this->fields['IDNumber'] =& $this->IDNumber;
// Telephone
$this->Telephone = new cField('CCMStudents', 'CCMStudents', 'x_Telephone', 'Telephone', '`Telephone`', 200, -1, FALSE, '`Telephone`', FALSE);
$this->fields['Telephone'] =& $this->Telephone;
// Cellphone
$this->Cellphone = new cField('CCMStudents', 'CCMStudents', 'x_Cellphone', 'Cellphone', '`Cellphone`', 200, -1, FALSE, '`Cellphone`', FALSE);
$this->fields['Cellphone'] =& $this->Cellphone;
// EmailAddress
$this->EmailAddress = new cField('CCMStudents', 'CCMStudents', 'x_EmailAddress', 'EmailAddress', '`EmailAddress`', 200, -1, FALSE, '`EmailAddress`', FALSE);
$this->fields['EmailAddress'] =& $this->EmailAddress;
// WorkAddress
$this->WorkAddress = new cField('CCMStudents', 'CCMStudents', 'x_WorkAddress', 'WorkAddress', '`WorkAddress`', 201, -1, FALSE, '`WorkAddress`', FALSE);
$this->fields['WorkAddress'] =& $this->WorkAddress;
// PostalAddress
$this->PostalAddress = new cField('CCMStudents', 'CCMStudents', 'x_PostalAddress', 'PostalAddress', '`PostalAddress`', 201, -1, FALSE, '`PostalAddress`', FALSE);
$this->fields['PostalAddress'] =& $this->PostalAddress;
// Department
$this->Department = new cField('CCMStudents', 'CCMStudents', 'x_Department', 'Department', '`Department`', 200, -1, FALSE, '`Department`', FALSE);
$this->fields['Department'] =& $this->Department;
// Organisation
$this->Organisation = new cField('CCMStudents', 'CCMStudents', 'x_Organisation', 'Organisation', '`Organisation`', 200, -1, FALSE, '`Organisation`', FALSE);
$this->fields['Organisation'] =& $this->Organisation;
// VATNo
$this->VATNo = new cField('CCMStudents', 'CCMStudents', 'x_VATNo', 'VATNo', '`VATNo`', 200, -1, FALSE, '`VATNo`', FALSE);
$this->fields['VATNo'] =& $this->VATNo;
// JobTitle
$this->JobTitle = new cField('CCMStudents', 'CCMStudents', 'x_JobTitle', 'JobTitle', '`JobTitle`', 200, -1, FALSE, '`JobTitle`', FALSE);
$this->fields['JobTitle'] =& $this->JobTitle;
// DateofBirth
$this->DateofBirth = new cField('CCMStudents', 'CCMStudents', 'x_DateofBirth', 'DateofBirth', '`DateofBirth`', 133, 5, FALSE, '`DateofBirth`', FALSE);
$this->DateofBirth->FldDefaultErrMsg = str_replace("%s", "/", $Language->Phrase("IncorrectDateYMD"));
$this->fields['DateofBirth'] =& $this->DateofBirth;
// PlaceofBirth
$this->PlaceofBirth = new cField('CCMStudents', 'CCMStudents', 'x_PlaceofBirth', 'PlaceofBirth', '`PlaceofBirth`', 200, -1, FALSE, '`PlaceofBirth`', FALSE);
$this->fields['PlaceofBirth'] =& $this->PlaceofBirth;
// CountryofBirth
$this->CountryofBirth = new cField('CCMStudents', 'CCMStudents', 'x_CountryofBirth', 'CountryofBirth', '`CountryofBirth`', 200, -1, FALSE, '`CountryofBirth`', FALSE);
$this->fields['CountryofBirth'] =& $this->CountryofBirth;
// Province
$this->Province = new cField('CCMStudents', 'CCMStudents', 'x_Province', 'Province', '`Province`', 200, -1, FALSE, '`Province`', FALSE);
$this->fields['Province'] =& $this->Province;
// MaleorFemale
$this->MaleorFemale = new cField('CCMStudents', 'CCMStudents', 'x_MaleorFemale', 'MaleorFemale', '`MaleorFemale`', 200, -1, FALSE, '`MaleorFemale`', FALSE);
$this->fields['MaleorFemale'] =& $this->MaleorFemale;
// RaceGroup
$this->RaceGroup = new cField('CCMStudents', 'CCMStudents', 'x_RaceGroup', 'RaceGroup', '`RaceGroup`', 200, -1, FALSE, '`RaceGroup`', FALSE);
$this->fields['RaceGroup'] =& $this->RaceGroup;
// Disability
$this->Disability = new cField('CCMStudents', 'CCMStudents', 'x_Disability', 'Disability', '`Disability`', 200, -1, FALSE, '`Disability`', FALSE);
$this->fields['Disability'] =& $this->Disability;
// DisabilityNature
$this->DisabilityNature = new cField('CCMStudents', 'CCMStudents', 'x_DisabilityNature', 'DisabilityNature', '`DisabilityNature`', 200, -1, FALSE, '`DisabilityNature`', FALSE);
$this->fields['DisabilityNature'] =& $this->DisabilityNature;
// DisabilityCertificate
$this->DisabilityCertificate = new cField('CCMStudents', 'CCMStudents', 'x_DisabilityCertificate', 'DisabilityCertificate', '`DisabilityCertificate`', 200, -1, TRUE, '`DisabilityCertificate`', FALSE);
$this->DisabilityCertificate->UploadPath = "uploads";
$this->fields['DisabilityCertificate'] =& $this->DisabilityCertificate;
// ProfessionalCouncil
$this->ProfessionalCouncil = new cField('CCMStudents', 'CCMStudents', 'x_ProfessionalCouncil', 'ProfessionalCouncil', '`ProfessionalCouncil`', 200, -1, FALSE, '`ProfessionalCouncil`', FALSE);
$this->fields['ProfessionalCouncil'] =& $this->ProfessionalCouncil;
// CategoryReg
$this->CategoryReg = new cField('CCMStudents', 'CCMStudents', 'x_CategoryReg', 'CategoryReg', '`CategoryReg`', 200, -1, FALSE, '`CategoryReg`', FALSE);
$this->fields['CategoryReg'] =& $this->CategoryReg;
// CouncilRegNumber
$this->CouncilRegNumber = new cField('CCMStudents', 'CCMStudents', 'x_CouncilRegNumber', 'CouncilRegNumber', '`CouncilRegNumber`', 200, -1, FALSE, '`CouncilRegNumber`', FALSE);
$this->fields['CouncilRegNumber'] =& $this->CouncilRegNumber;
// LengthCandidateReg
$this->LengthCandidateReg = new cField('CCMStudents', 'CCMStudents', 'x_LengthCandidateReg', 'LengthCandidateReg', '`LengthCandidateReg`', 200, -1, FALSE, '`LengthCandidateReg`', FALSE);
$this->fields['LengthCandidateReg'] =& $this->LengthCandidateReg;
// YearsToProfReg
$this->YearsToProfReg = new cField('CCMStudents', 'CCMStudents', 'x_YearsToProfReg', 'YearsToProfReg', '`YearsToProfReg`', 200, -1, FALSE, '`YearsToProfReg`', FALSE);
$this->fields['YearsToProfReg'] =& $this->YearsToProfReg;
// FirstJobStart
$this->FirstJobStart = new cField('CCMStudents', 'CCMStudents', 'x_FirstJobStart', 'FirstJobStart', '`FirstJobStart`', 200, -1, FALSE, '`FirstJobStart`', FALSE);
$this->fields['FirstJobStart'] =& $this->FirstJobStart;
// VolAssociations
$this->VolAssociations = new cField('CCMStudents', 'CCMStudents', 'x_VolAssociations', 'VolAssociations', '`VolAssociations`', 200, -1, FALSE, '`VolAssociations`', FALSE);
$this->fields['VolAssociations'] =& $this->VolAssociations;
// BelongsTo
$this->BelongsTo = new cField('CCMStudents', 'CCMStudents', 'x_BelongsTo', 'BelongsTo', '`BelongsTo`', 200, -1, FALSE, '`BelongsTo`', FALSE);
$this->fields['BelongsTo'] =& $this->BelongsTo;
// CESA_SABTACO_MemNum
$this->CESA_SABTACO_MemNum = new cField('CCMStudents', 'CCMStudents', 'x_CESA_SABTACO_MemNum', 'CESA_SABTACO_MemNum', '`CESA_SABTACO_MemNum`', 200, -1, FALSE, '`CESA_SABTACO_MemNum`', FALSE);
$this->fields['CESA_SABTACO_MemNum'] =& $this->CESA_SABTACO_MemNum;
// AreaDiscipline
$this->AreaDiscipline = new cField('CCMStudents', 'CCMStudents', 'x_AreaDiscipline', 'AreaDiscipline', '`AreaDiscipline`', 200, -1, FALSE, '`AreaDiscipline`', FALSE);
$this->fields['AreaDiscipline'] =& $this->AreaDiscipline;
// AreaSubDiscipline
$this->AreaSubDiscipline = new cField('CCMStudents', 'CCMStudents', 'x_AreaSubDiscipline', 'AreaSubDiscipline', '`AreaSubDiscipline`', 200, -1, FALSE, '`AreaSubDiscipline`', FALSE);
$this->fields['AreaSubDiscipline'] =& $this->AreaSubDiscipline;
// Salary
$this->Salary = new cField('CCMStudents', 'CCMStudents', 'x_Salary', 'Salary', '`Salary`', 200, -1, FALSE, '`Salary`', FALSE);
$this->fields['Salary'] =& $this->Salary;
// Payslip
$this->Payslip = new cField('CCMStudents', 'CCMStudents', 'x_Payslip', 'Payslip', '`Payslip`', 200, -1, TRUE, '`Payslip`', FALSE);
$this->Payslip->UploadPath = "uploads";
$this->fields['Payslip'] =& $this->Payslip;
// BankAccountName
$this->BankAccountName = new cField('CCMStudents', 'CCMStudents', 'x_BankAccountName', 'BankAccountName', '`BankAccountName`', 200, -1, FALSE, '`BankAccountName`', FALSE);
$this->fields['BankAccountName'] =& $this->BankAccountName;
// BankAccountBank
$this->BankAccountBank = new cField('CCMStudents', 'CCMStudents', 'x_BankAccountBank', 'BankAccountBank', '`BankAccountBank`', 200, -1, FALSE, '`BankAccountBank`', FALSE);
$this->fields['BankAccountBank'] =& $this->BankAccountBank;
// BankAccountBranch
$this->BankAccountBranch = new cField('CCMStudents', 'CCMStudents', 'x_BankAccountBranch', 'BankAccountBranch', '`BankAccountBranch`', 200, -1, FALSE, '`BankAccountBranch`', FALSE);
$this->fields['BankAccountBranch'] =& $this->BankAccountBranch;
// BankAccountNo
$this->BankAccountNo = new cField('CCMStudents', 'CCMStudents', 'x_BankAccountNo', 'BankAccountNo', '`BankAccountNo`', 200, -1, FALSE, '`BankAccountNo`', FALSE);
$this->fields['BankAccountNo'] =& $this->BankAccountNo;
// BankAccountProof
$this->BankAccountProof = new cField('CCMStudents', 'CCMStudents', 'x_BankAccountProof', 'BankAccountProof', '`BankAccountProof`', 200, -1, TRUE, '`BankAccountProof`', FALSE);
$this->BankAccountProof->UploadPath = "uploads";
$this->fields['BankAccountProof'] =& $this->BankAccountProof;
// Funding
$this->Funding = new cField('CCMStudents', 'CCMStudents', 'x_Funding', 'Funding', '`Funding`', 200, -1, FALSE, '`Funding`', FALSE);
$this->fields['Funding'] =& $this->Funding;
// CWDTP
$this->CWDTP = new cField('CCMStudents', 'CCMStudents', 'x_CWDTP', 'CWDTP', '`CWDTP`', 200, -1, FALSE, '`CWDTP`', FALSE);
$this->fields['CWDTP'] =& $this->CWDTP;
// BookedByName
$this->BookedByName = new cField('CCMStudents', 'CCMStudents', 'x_BookedByName', 'BookedByName', '`BookedByName`', 200, -1, FALSE, '`BookedByName`', FALSE);
$this->fields['BookedByName'] =& $this->BookedByName;
// BookedByDesignation
$this->BookedByDesignation = new cField('CCMStudents', 'CCMStudents', 'x_BookedByDesignation', 'BookedByDesignation', '`BookedByDesignation`', 200, -1, FALSE, '`BookedByDesignation`', FALSE);
$this->fields['BookedByDesignation'] =& $this->BookedByDesignation;
// BookedByTelNo
$this->BookedByTelNo = new cField('CCMStudents', 'CCMStudents', 'x_BookedByTelNo', 'BookedByTelNo', '`BookedByTelNo`', 200, -1, FALSE, '`BookedByTelNo`', FALSE);
$this->fields['BookedByTelNo'] =& $this->BookedByTelNo;
// BookedByFaxNo
$this->BookedByFaxNo = new cField('CCMStudents', 'CCMStudents', 'x_BookedByFaxNo', 'BookedByFaxNo', '`BookedByFaxNo`', 200, -1, FALSE, '`BookedByFaxNo`', FALSE);
$this->fields['BookedByFaxNo'] =& $this->BookedByFaxNo;
// BookedByCellNo
$this->BookedByCellNo = new cField('CCMStudents', 'CCMStudents', 'x_BookedByCellNo', 'BookedByCellNo', '`BookedByCellNo`', 200, -1, FALSE, '`BookedByCellNo`', FALSE);
$this->fields['BookedByCellNo'] =& $this->BookedByCellNo;
// BookedByEmail
$this->BookedByEmail = new cField('CCMStudents', 'CCMStudents', 'x_BookedByEmail', 'BookedByEmail', '`BookedByEmail`', 200, -1, FALSE, '`BookedByEmail`', FALSE);
$this->fields['BookedByEmail'] =& $this->BookedByEmail;
// MentorID
$this->MentorID = new cField('CCMStudents', 'CCMStudents', 'x_MentorID', 'MentorID', '`MentorID`', 3, -1, FALSE, '`MentorID`', FALSE);
$this->MentorID->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
$this->fields['MentorID'] =& $this->MentorID;
// MentorName
$this->MentorName = new cField('CCMStudents', 'CCMStudents', 'x_MentorName', 'MentorName', '`MentorName`', 200, -1, FALSE, '`MentorName`', FALSE);
$this->fields['MentorName'] =& $this->MentorName;
// MentorDesig
$this->MentorDesig = new cField('CCMStudents', 'CCMStudents', 'x_MentorDesig', 'MentorDesig', '`MentorDesig`', 200, -1, FALSE, '`MentorDesig`', FALSE);
$this->fields['MentorDesig'] =& $this->MentorDesig;
// MentorProfRegNo
$this->MentorProfRegNo = new cField('CCMStudents', 'CCMStudents', 'x_MentorProfRegNo', 'MentorProfRegNo', '`MentorProfRegNo`', 200, -1, FALSE, '`MentorProfRegNo`', FALSE);
$this->fields['MentorProfRegNo'] =& $this->MentorProfRegNo;
// MentorRegNo
$this->MentorRegNo = new cField('CCMStudents', 'CCMStudents', 'x_MentorRegNo', 'MentorRegNo', '`MentorRegNo`', 200, -1, FALSE, '`MentorRegNo`', FALSE);
$this->fields['MentorRegNo'] =& $this->MentorRegNo;
// MentorTel
$this->MentorTel = new cField('CCMStudents', 'CCMStudents', 'x_MentorTel', 'MentorTel', '`MentorTel`', 200, -1, FALSE, '`MentorTel`', FALSE);
$this->fields['MentorTel'] =& $this->MentorTel;
// MentorCell
$this->MentorCell = new cField('CCMStudents', 'CCMStudents', 'x_MentorCell', 'MentorCell', '`MentorCell`', 200, -1, FALSE, '`MentorCell`', FALSE);
$this->fields['MentorCell'] =& $this->MentorCell;
// MentorEmail
$this->MentorEmail = new cField('CCMStudents', 'CCMStudents', 'x_MentorEmail', 'MentorEmail', '`MentorEmail`', 200, -1, FALSE, '`MentorEmail`', FALSE);
$this->fields['MentorEmail'] =& $this->MentorEmail;
// EmployerID
$this->EmployerID = new cField('CCMStudents', 'CCMStudents', 'x_EmployerID', 'EmployerID', '`EmployerID`', 3, -1, FALSE, '`EmployerID`', FALSE);
$this->EmployerID->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
$this->fields['EmployerID'] =& $this->EmployerID;
// HRManagerName
$this->HRManagerName = new cField('CCMStudents', 'CCMStudents', 'x_HRManagerName', 'HRManagerName', '`HRManagerName`', 200, -1, FALSE, '`HRManagerName`', FALSE);
$this->fields['HRManagerName'] =& $this->HRManagerName;
// HRManagerDesignation
$this->HRManagerDesignation = new cField('CCMStudents', 'CCMStudents', 'x_HRManagerDesignation', 'HRManagerDesignation', '`HRManagerDesignation`', 200, -1, FALSE, '`HRManagerDesignation`', FALSE);
$this->fields['HRManagerDesignation'] =& $this->HRManagerDesignation;
// HRManagerTelNo
$this->HRManagerTelNo = new cField('CCMStudents', 'CCMStudents', 'x_HRManagerTelNo', 'HRManagerTelNo', '`HRManagerTelNo`', 200, -1, FALSE, '`HRManagerTelNo`', FALSE);
$this->fields['HRManagerTelNo'] =& $this->HRManagerTelNo;
// HRManagerCellNo
$this->HRManagerCellNo = new cField('CCMStudents', 'CCMStudents', 'x_HRManagerCellNo', 'HRManagerCellNo', '`HRManagerCellNo`', 200, -1, FALSE, '`HRManagerCellNo`', FALSE);
$this->fields['HRManagerCellNo'] =& $this->HRManagerCellNo;
// HRManagerEmail
$this->HRManagerEmail = new cField('CCMStudents', 'CCMStudents', 'x_HRManagerEmail', 'HRManagerEmail', '`HRManagerEmail`', 200, -1, FALSE, '`HRManagerEmail`', FALSE);
$this->fields['HRManagerEmail'] =& $this->HRManagerEmail;
// SupervisorName
$this->SupervisorName = new cField('CCMStudents', 'CCMStudents', 'x_SupervisorName', 'SupervisorName', '`SupervisorName`', 200, -1, FALSE, '`SupervisorName`', FALSE);
$this->fields['SupervisorName'] =& $this->SupervisorName;
// SupervisorDesig
$this->SupervisorDesig = new cField('CCMStudents', 'CCMStudents', 'x_SupervisorDesig', 'SupervisorDesig', '`SupervisorDesig`', 200, -1, FALSE, '`SupervisorDesig`', FALSE);
$this->fields['SupervisorDesig'] =& $this->SupervisorDesig;
// SupervisorProfRegNo
$this->SupervisorProfRegNo = new cField('CCMStudents', 'CCMStudents', 'x_SupervisorProfRegNo', 'SupervisorProfRegNo', '`SupervisorProfRegNo`', 200, -1, FALSE, '`SupervisorProfRegNo`', FALSE);
$this->fields['SupervisorProfRegNo'] =& $this->SupervisorProfRegNo;
// SupervisorTelNo
$this->SupervisorTelNo = new cField('CCMStudents', 'CCMStudents', 'x_SupervisorTelNo', 'SupervisorTelNo', '`SupervisorTelNo`', 200, -1, FALSE, '`SupervisorTelNo`', FALSE);
$this->fields['SupervisorTelNo'] =& $this->SupervisorTelNo;
// SupervisorCellNo
$this->SupervisorCellNo = new cField('CCMStudents', 'CCMStudents', 'x_SupervisorCellNo', 'SupervisorCellNo', '`SupervisorCellNo`', 200, -1, FALSE, '`SupervisorCellNo`', FALSE);
$this->fields['SupervisorCellNo'] =& $this->SupervisorCellNo;
// SupervisorEmail
$this->SupervisorEmail = new cField('CCMStudents', 'CCMStudents', 'x_SupervisorEmail', 'SupervisorEmail', '`SupervisorEmail`', 200, -1, FALSE, '`SupervisorEmail`', FALSE);
$this->fields['SupervisorEmail'] =& $this->SupervisorEmail;
// EducationalInst
$this->EducationalInst = new cField('CCMStudents', 'CCMStudents', 'x_EducationalInst', 'EducationalInst', '`EducationalInst`', 200, -1, FALSE, '`EducationalInst`', FALSE);
$this->fields['EducationalInst'] =& $this->EducationalInst;
// Qualifications
$this->Qualifications = new cField('CCMStudents', 'CCMStudents', 'x_Qualifications', 'Qualifications', '`Qualifications`', 201, -1, FALSE, '`Qualifications`', FALSE);
$this->fields['Qualifications'] =& $this->Qualifications;
// DateFinalExam
$this->DateFinalExam = new cField('CCMStudents', 'CCMStudents', 'x_DateFinalExam', 'DateFinalExam', '`DateFinalExam`', 200, -1, FALSE, '`DateFinalExam`', FALSE);
$this->fields['DateFinalExam'] =& $this->DateFinalExam;
// IDFile
$this->IDFile = new cField('CCMStudents', 'CCMStudents', 'x_IDFile', 'IDFile', '`IDFile`', 200, -1, TRUE, '`IDFile`', FALSE);
$this->IDFile->UploadPath = "uploads";
$this->fields['IDFile'] =& $this->IDFile;
// CVFile
$this->CVFile = new cField('CCMStudents', 'CCMStudents', 'x_CVFile', 'CVFile', '`CVFile`', 200, -1, TRUE, '`CVFile`', FALSE);
$this->CVFile->UploadPath = "uploads";
$this->fields['CVFile'] =& $this->CVFile;
// QualCertificate1
$this->QualCertificate1 = new cField('CCMStudents', 'CCMStudents', 'x_QualCertificate1', 'QualCertificate1', '`QualCertificate1`', 200, -1, TRUE, '`QualCertificate1`', FALSE);
$this->QualCertificate1->UploadPath = "uploads";
$this->fields['QualCertificate1'] =& $this->QualCertificate1;
// QualCertificate2
$this->QualCertificate2 = new cField('CCMStudents', 'CCMStudents', 'x_QualCertificate2', 'QualCertificate2', '`QualCertificate2`', 200, -1, TRUE, '`QualCertificate2`', FALSE);
$this->QualCertificate2->UploadPath = "uploads";
$this->fields['QualCertificate2'] =& $this->QualCertificate2;
// QualCertificate3
$this->QualCertificate3 = new cField('CCMStudents', 'CCMStudents', 'x_QualCertificate3', 'QualCertificate3', '`QualCertificate3`', 200, -1, TRUE, '`QualCertificate3`', FALSE);
$this->QualCertificate3->UploadPath = "uploads";
$this->fields['QualCertificate3'] =& $this->QualCertificate3;
// MentorUndertaking
$this->MentorUndertaking = new cField('CCMStudents', 'CCMStudents', 'x_MentorUndertaking', 'MentorUndertaking', '`MentorUndertaking`', 200, -1, TRUE, '`MentorUndertaking`', FALSE);
$this->MentorUndertaking->UploadPath = "uploads";
$this->fields['MentorUndertaking'] =& $this->MentorUndertaking;
// CandUUndertaking
$this->CandUUndertaking = new cField('CCMStudents', 'CCMStudents', 'x_CandUUndertaking', 'CandUUndertaking', '`CandUUndertaking`', 200, -1, TRUE, '`CandUUndertaking`', FALSE);
$this->CandUUndertaking->UploadPath = "uploads";
$this->fields['CandUUndertaking'] =& $this->CandUUndertaking;
// CompanyCandidatePolicy
$this->CompanyCandidatePolicy = new cField('CCMStudents', 'CCMStudents', 'x_CompanyCandidatePolicy', 'CompanyCandidatePolicy', '`CompanyCandidatePolicy`', 200, -1, TRUE, '`CompanyCandidatePolicy`', FALSE);
$this->CompanyCandidatePolicy->UploadPath = "uploads";
$this->fields['CompanyCandidatePolicy'] =& $this->CompanyCandidatePolicy;
// ResidenceProof
$this->ResidenceProof = new cField('CCMStudents', 'CCMStudents', 'x_ResidenceProof', 'ResidenceProof', '`ResidenceProof`', 200, -1, TRUE, '`ResidenceProof`', FALSE);
$this->ResidenceProof->UploadPath = "uploads";
$this->fields['ResidenceProof'] =& $this->ResidenceProof;
// SignedAppForm
$this->SignedAppForm = new cField('CCMStudents', 'CCMStudents', 'x_SignedAppForm', 'SignedAppForm', '`SignedAppForm`', 200, -1, TRUE, '`SignedAppForm`', FALSE);
$this->SignedAppForm->UploadPath = "uploads";
$this->fields['SignedAppForm'] =& $this->SignedAppForm;
// Photograph
$this->Photograph = new cField('CCMStudents', 'CCMStudents', 'x_Photograph', 'Photograph', '`Photograph`', 200, -1, TRUE, '`Photograph`', FALSE);
$this->Photograph->UploadPath = "uploads";
$this->fields['Photograph'] =& $this->Photograph;
// StudentNumber
$this->StudentNumber = new cField('CCMStudents', 'CCMStudents', 'x_StudentNumber', 'StudentNumber', '`StudentNumber`', 200, -1, FALSE, '`StudentNumber`', FALSE);
$this->fields['StudentNumber'] =& $this->StudentNumber;
// WebUsername
$this->WebUsername = new cField('CCMStudents', 'CCMStudents', 'x_WebUsername', 'WebUsername', '`WebUsername`', 200, -1, FALSE, '`WebUsername`', FALSE);
$this->fields['WebUsername'] =& $this->WebUsername;
// WebPassword
$this->WebPassword = new cField('CCMStudents', 'CCMStudents', 'x_WebPassword', 'WebPassword', '`WebPassword`', 200, -1, FALSE, '`WebPassword`', FALSE);
$this->fields['WebPassword'] =& $this->WebPassword;
// BlockAccess
$this->BlockAccess = new cField('CCMStudents', 'CCMStudents', 'x_BlockAccess', 'BlockAccess', '`BlockAccess`', 200, -1, FALSE, '`BlockAccess`', FALSE);
$this->fields['BlockAccess'] =& $this->BlockAccess;
// SABTACO
$this->SABTACO = new cField('CCMStudents', 'CCMStudents', 'x_SABTACO', 'SABTACO', '`SABTACO`', 16, -1, FALSE, '`SABTACO`', FALSE);
$this->SABTACO->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
$this->fields['SABTACO'] =& $this->SABTACO;
// CESA
$this->CESA = new cField('CCMStudents', 'CCMStudents', 'x_CESA', 'CESA', '`CESA`', 16, -1, FALSE, '`CESA`', FALSE);
$this->CESA->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
$this->fields['CESA'] =& $this->CESA;
// Archived
$this->Archived = new cField('CCMStudents', 'CCMStudents', 'x_Archived', 'Archived', '`Archived`', 16, -1, FALSE, '`Archived`', FALSE);
$this->Archived->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
$this->fields['Archived'] =& $this->Archived;
}
// Table caption
function TableCaption() {
global $Language;
return $Language->TablePhrase($this->TableVar, "TblCaption");
}
// Page caption
function PageCaption($Page) {
global $Language;
$Caption = $Language->TablePhrase($this->TableVar, "TblPageCaption" . $Page);
if ($Caption == "") $Caption = "Page " . $Page;
return $Caption;
}
// Export return page
function ExportReturnUrl() {
$url = @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_EXPORT_RETURN_URL];
return ($url <> "") ? $url : ew_CurrentPage();
}
function setExportReturnUrl($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_EXPORT_RETURN_URL] = $v;
}
// Records per page
function getRecordsPerPage() {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_REC_PER_PAGE];
}
function setRecordsPerPage($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_REC_PER_PAGE] = $v;
}
// Start record number
function getStartRecordNumber() {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_START_REC];
}
function setStartRecordNumber($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_START_REC] = $v;
}
// Search highlight name
function HighlightName() {
return "CCMStudents_Highlight";
}
// Advanced search
function getAdvancedSearch($fld) {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ADVANCED_SEARCH . "_" . $fld];
}
function setAdvancedSearch($fld, $v) {
if (@$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ADVANCED_SEARCH . "_" . $fld] <> $v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ADVANCED_SEARCH . "_" . $fld] = $v;
}
}
// Basic search keyword
function getSessionBasicSearchKeyword() {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_BASIC_SEARCH];
}
function setSessionBasicSearchKeyword($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_BASIC_SEARCH] = $v;
}
// Basic search type
function getSessionBasicSearchType() {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_BASIC_SEARCH_TYPE];
}
function setSessionBasicSearchType($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_BASIC_SEARCH_TYPE] = $v;
}
// Search WHERE clause
function getSearchWhere() {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_SEARCH_WHERE];
}
function setSearchWhere($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_SEARCH_WHERE] = $v;
}
// Multiple column sort
function UpdateSort(&$ofld, $ctrl) {
if ($this->CurrentOrder == $ofld->FldName) {
$sSortField = $ofld->FldExpression;
$sLastSort = $ofld->getSort();
if ($this->CurrentOrderType == "ASC" || $this->CurrentOrderType == "DESC") {
$sThisSort = $this->CurrentOrderType;
} else {
$sThisSort = ($sLastSort == "ASC") ? "DESC" : "ASC";
}
$ofld->setSort($sThisSort);
if ($ctrl) {
$sOrderBy = $this->getSessionOrderBy();
if (strpos($sOrderBy, $sSortField . " " . $sLastSort) !== FALSE) {
$sOrderBy = str_replace($sSortField . " " . $sLastSort, $sSortField . " " . $sThisSort, $sOrderBy);
} else {
if ($sOrderBy <> "") $sOrderBy .= ", ";
$sOrderBy .= $sSortField . " " . $sThisSort;
}
$this->setSessionOrderBy($sOrderBy); // Save to Session
} else {
$this->setSessionOrderBy($sSortField . " " . $sThisSort); // Save to Session
}
} else {
if (!$ctrl) $ofld->setSort("");
}
}
// Session WHERE clause
function getSessionWhere() {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_WHERE];
}
function setSessionWhere($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_WHERE] = $v;
}
// Session ORDER BY
function getSessionOrderBy() {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ORDER_BY];
}
function setSessionOrderBy($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_ORDER_BY] = $v;
}
// Session key
function getKey($fld) {
return @$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_KEY . "_" . $fld];
}
function setKey($fld, $v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_KEY . "_" . $fld] = $v;
}
// Table level SQL
function SqlFrom() { // From
return "`CCMStudents`";
}
function SqlSelect() { // Select
return "SELECT * FROM " . $this->SqlFrom();
}
function SqlWhere() { // Where
$sWhere = "";
$this->TableFilter = "`Archived`=0";
if ($this->TableFilter <> "") {
if ($sWhere <> "") $sWhere .= "(" . $sWhere . ") AND (";
$sWhere .= "(" . $this->TableFilter . ")";
}
return $sWhere;
}
function SqlGroupBy() { // Group By
return "";
}
function SqlHaving() { // Having
return "";
}
function SqlOrderBy() { // Order By
return "`Surname` ASC,`FirstName` ASC";
}
// Check if Anonymous User is allowed
function AllowAnonymousUser() {
switch (EW_PAGE_ID) {
case "add":
case "register":
case "addopt":
return FALSE;
case "edit":
case "update":
return FALSE;
case "delete":
return FALSE;
case "view":
return FALSE;
case "search":
return FALSE;
default:
return FALSE;
}
}
// Apply User ID filters
function ApplyUserIDFilters($sFilter) {
return $sFilter;
}
// Get SQL
function GetSQL($where, $orderby) {
return ew_BuildSelectSql($this->SqlSelect(), $this->SqlWhere(),
$this->SqlGroupBy(), $this->SqlHaving(), $this->SqlOrderBy(),
$where, $orderby);
}
// Table SQL
function SQL() {
$sFilter = $this->CurrentFilter;
$sFilter = $this->ApplyUserIDFilters($sFilter);
$sSort = $this->getSessionOrderBy();
return ew_BuildSelectSql($this->SqlSelect(), $this->SqlWhere(),
$this->SqlGroupBy(), $this->SqlHaving(), $this->SqlOrderBy(),
$sFilter, $sSort);
}
// Table SQL with List page filter
function SelectSQL() {
$sFilter = $this->getSessionWhere();
if ($this->CurrentFilter <> "") {
if ($sFilter <> "") $sFilter = "(" . $sFilter . ") AND ";
$sFilter .= "(" . $this->CurrentFilter . ")";
}
$sFilter = $this->ApplyUserIDFilters($sFilter);
$sSort = $this->getSessionOrderBy();
return ew_BuildSelectSql($this->SqlSelect(), $this->SqlWhere(), $this->SqlGroupBy(),
$this->SqlHaving(), $this->SqlOrderBy(), $sFilter, $sSort);
}
// Try to get record count
function TryGetRecordCount($sSql) {
global $conn;
$cnt = -1;
if ($this->TableType == 'TABLE' || $this->TableType == 'VIEW') {
$sSql = "SELECT COUNT(*) FROM" . substr($sSql, 13);
} else {
$sSql = "SELECT COUNT(*) FROM (" . $sSql . ") EW_COUNT_TABLE";
}
if ($rs = $conn->Execute($sSql)) {
if (!$rs->EOF && $rs->FieldCount() > 0) {
$cnt = $rs->fields[0];
$rs->Close();
}
}
return intval($cnt);
}
// Get record count based on filter (for detail record count in master table pages)
function LoadRecordCount($sFilter) {
$origFilter = $this->CurrentFilter;
$this->CurrentFilter = $sFilter;
$this->Recordset_Selecting($this->CurrentFilter);
$sSql = $this->SQL();
$cnt = $this->TryGetRecordCount($sSql);
if ($cnt == -1) {
if ($rs = $this->LoadRs($this->CurrentFilter)) {
$cnt = $rs->RecordCount();
$rs->Close();
}
}
$this->CurrentFilter = $origFilter;
return intval($cnt);
}
// Get record count (for current List page)
function SelectRecordCount() {
global $conn;
$origFilter = $this->CurrentFilter;
$this->Recordset_Selecting($this->CurrentFilter);
$sSql = $this->SelectSQL();
$cnt = $this->TryGetRecordCount($sSql);
if ($cnt == -1) {
if ($rs = $conn->Execute($this->SelectSQL())) {
$cnt = $rs->RecordCount();
$rs->Close();
}
}
$this->CurrentFilter = $origFilter;
return intval($cnt);
}
// INSERT statement
function InsertSQL(&$rs) {
global $conn;
$names = "";
$values = "";
foreach ($rs as $name => $value) {
$names .= $this->fields[$name]->FldExpression . ",";
$values .= ew_QuotedValue($value, $this->fields[$name]->FldDataType) . ",";
}
if (substr($names, -1) == ",") $names = substr($names, 0, strlen($names)-1);
if (substr($values, -1) == ",") $values = substr($values, 0, strlen($values)-1);
return "INSERT INTO `CCMStudents` ($names) VALUES ($values)";
}
// UPDATE statement
function UpdateSQL(&$rs) {
global $conn;
$SQL = "UPDATE `CCMStudents` SET ";
foreach ($rs as $name => $value) {
$SQL .= $this->fields[$name]->FldExpression . "=";
$SQL .= ew_QuotedValue($value, $this->fields[$name]->FldDataType) . ",";
}
if (substr($SQL, -1) == ",") $SQL = substr($SQL, 0, strlen($SQL)-1);
if ($this->CurrentFilter <> "") $SQL .= " WHERE " . $this->CurrentFilter;
return $SQL;
}
// DELETE statement
function DeleteSQL(&$rs) {
$SQL = "DELETE FROM `CCMStudents` WHERE ";
$SQL .= ew_QuotedName('CCMStudentID') . '=' . ew_QuotedValue($rs['CCMStudentID'], $this->CCMStudentID->FldDataType) . ' AND ';
if (substr($SQL, -5) == " AND ") $SQL = substr($SQL, 0, strlen($SQL)-5);
if ($this->CurrentFilter <> "") $SQL .= " AND " . $this->CurrentFilter;
return $SQL;
}
// Key filter WHERE clause
function SqlKeyFilter() {
return "`CCMStudentID` = @CCMStudentID@";
}
// Key filter
function KeyFilter() {
$sKeyFilter = $this->SqlKeyFilter();
if (!is_numeric($this->CCMStudentID->CurrentValue))
$sKeyFilter = "0=1"; // Invalid key
$sKeyFilter = str_replace("@CCMStudentID@", ew_AdjustSql($this->CCMStudentID->CurrentValue), $sKeyFilter); // Replace key value
return $sKeyFilter;
}
// Return page URL
function getReturnUrl() {
$name = EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_RETURN_URL;
// Get referer URL automatically
if (ew_ServerVar("HTTP_REFERER") <> "" && ew_ReferPage() <> ew_CurrentPage() && ew_ReferPage() <> "login.php") // Referer not same page or login page
$_SESSION[$name] = ew_ServerVar("HTTP_REFERER"); // Save to Session
if (@$_SESSION[$name] <> "") {
return $_SESSION[$name];
} else {
return "CCMStudentslist.php";
}
}
function setReturnUrl($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_RETURN_URL] = $v;
}
// List URL
function ListUrl() {
return "CCMStudentslist.php";
}
// View URL
function ViewUrl() {
return $this->KeyUrl("CCMStudentsview.php", $this->UrlParm());
}
// Add URL
function AddUrl() {
$AddUrl = "CCMStudentsadd.php";
$sUrlParm = $this->UrlParm();
if ($sUrlParm <> "")
$AddUrl .= "?" . $sUrlParm;
return $AddUrl;
}
// Edit URL
function EditUrl() {
return $this->KeyUrl("CCMStudentsedit.php", $this->UrlParm());
}
// Inline edit URL
function InlineEditUrl() {
return $this->KeyUrl(ew_CurrentPage(), $this->UrlParm("a=edit"));
}
// Copy URL
function CopyUrl() {
return $this->KeyUrl("CCMStudentsadd.php", $this->UrlParm());
}
// Inline copy URL
function InlineCopyUrl() {
return $this->KeyUrl(ew_CurrentPage(), $this->UrlParm("a=copy"));
}
// Delete URL
function DeleteUrl() {
return $this->KeyUrl("CCMStudentsdelete.php", $this->UrlParm());
}
// Add key value to URL
function KeyUrl($url, $parm = "") {
$sUrl = $url . "?";
if ($parm <> "") $sUrl .= $parm . "&";
if (!is_null($this->CCMStudentID->CurrentValue)) {
$sUrl .= "CCMStudentID=" . urlencode($this->CCMStudentID->CurrentValue);
} else {
return "javascript:alert(ewLanguage.Phrase(\"InvalidRecord\"));";
}
return $sUrl;
}
// Sort URL
function SortUrl(&$fld) {
if ($this->CurrentAction <> "" || $this->Export <> "" ||
in_array($fld->FldType, array(128, 204, 205))) { // Unsortable data type
return "";
} elseif ($fld->Sortable) {
$sUrlParm = $this->UrlParm("order=" . urlencode($fld->FldName) . "&ordertype=" . $fld->ReverseSort());
return ew_CurrentPage() . "?" . $sUrlParm;
} else {
return "";
}
}
// Add URL parameter
function UrlParm($parm = "") {
$UrlParm = ($this->UseTokenInUrl) ? "t=CCMStudents" : "";
if ($parm <> "") {
if ($UrlParm <> "")
$UrlParm .= "&";
$UrlParm .= $parm;
}
return $UrlParm;
}
// Load rows based on filter
function &LoadRs($sFilter) {
global $conn;
// Set up filter (SQL WHERE clause) and get return SQL
$this->CurrentFilter = $sFilter;
$sSql = $this->SQL();
return $conn->Execute($sSql);
}
// Load row values from recordset
function LoadListRowValues(&$rs) {
$this->CCMStudentID->setDbValue($rs->fields('CCMStudentID'));
$this->SelectionCategory->setDbValue($rs->fields('SelectionCategory'));
$this->Title->setDbValue($rs->fields('Title'));
$this->Initials->setDbValue($rs->fields('Initials'));
$this->FirstName->setDbValue($rs->fields('FirstName'));
$this->Surname->setDbValue($rs->fields('Surname'));
$this->KnownAs->setDbValue($rs->fields('KnownAs'));
$this->IDNumber->setDbValue($rs->fields('IDNumber'));
$this->Telephone->setDbValue($rs->fields('Telephone'));
$this->Cellphone->setDbValue($rs->fields('Cellphone'));
$this->EmailAddress->setDbValue($rs->fields('EmailAddress'));
$this->WorkAddress->setDbValue($rs->fields('WorkAddress'));
$this->PostalAddress->setDbValue($rs->fields('PostalAddress'));
$this->Department->setDbValue($rs->fields('Department'));
$this->Organisation->setDbValue($rs->fields('Organisation'));
$this->VATNo->setDbValue($rs->fields('VATNo'));
$this->JobTitle->setDbValue($rs->fields('JobTitle'));
$this->DateofBirth->setDbValue($rs->fields('DateofBirth'));
$this->PlaceofBirth->setDbValue($rs->fields('PlaceofBirth'));
$this->CountryofBirth->setDbValue($rs->fields('CountryofBirth'));
$this->Province->setDbValue($rs->fields('Province'));
$this->MaleorFemale->setDbValue($rs->fields('MaleorFemale'));
$this->RaceGroup->setDbValue($rs->fields('RaceGroup'));
$this->Disability->setDbValue($rs->fields('Disability'));
$this->DisabilityNature->setDbValue($rs->fields('DisabilityNature'));
$this->DisabilityCertificate->Upload->DbValue = $rs->fields('DisabilityCertificate');
$this->ProfessionalCouncil->setDbValue($rs->fields('ProfessionalCouncil'));
$this->CategoryReg->setDbValue($rs->fields('CategoryReg'));
$this->CouncilRegNumber->setDbValue($rs->fields('CouncilRegNumber'));
$this->LengthCandidateReg->setDbValue($rs->fields('LengthCandidateReg'));
$this->YearsToProfReg->setDbValue($rs->fields('YearsToProfReg'));
$this->FirstJobStart->setDbValue($rs->fields('FirstJobStart'));
$this->VolAssociations->setDbValue($rs->fields('VolAssociations'));
$this->BelongsTo->setDbValue($rs->fields('BelongsTo'));
$this->CESA_SABTACO_MemNum->setDbValue($rs->fields('CESA_SABTACO_MemNum'));
$this->AreaDiscipline->setDbValue($rs->fields('AreaDiscipline'));
$this->AreaSubDiscipline->setDbValue($rs->fields('AreaSubDiscipline'));
$this->Salary->setDbValue($rs->fields('Salary'));
$this->Payslip->Upload->DbValue = $rs->fields('Payslip');
$this->BankAccountName->setDbValue($rs->fields('BankAccountName'));
$this->BankAccountBank->setDbValue($rs->fields('BankAccountBank'));
$this->BankAccountBranch->setDbValue($rs->fields('BankAccountBranch'));
$this->BankAccountNo->setDbValue($rs->fields('BankAccountNo'));
$this->BankAccountProof->Upload->DbValue = $rs->fields('BankAccountProof');
$this->Funding->setDbValue($rs->fields('Funding'));
$this->CWDTP->setDbValue($rs->fields('CWDTP'));
$this->BookedByName->setDbValue($rs->fields('BookedByName'));
$this->BookedByDesignation->setDbValue($rs->fields('BookedByDesignation'));
$this->BookedByTelNo->setDbValue($rs->fields('BookedByTelNo'));
$this->BookedByFaxNo->setDbValue($rs->fields('BookedByFaxNo'));
$this->BookedByCellNo->setDbValue($rs->fields('BookedByCellNo'));
$this->BookedByEmail->setDbValue($rs->fields('BookedByEmail'));
$this->MentorID->setDbValue($rs->fields('MentorID'));
$this->MentorName->setDbValue($rs->fields('MentorName'));
$this->MentorDesig->setDbValue($rs->fields('MentorDesig'));
$this->MentorProfRegNo->setDbValue($rs->fields('MentorProfRegNo'));
$this->MentorRegNo->setDbValue($rs->fields('MentorRegNo'));
$this->MentorTel->setDbValue($rs->fields('MentorTel'));
$this->MentorCell->setDbValue($rs->fields('MentorCell'));
$this->MentorEmail->setDbValue($rs->fields('MentorEmail'));
$this->EmployerID->setDbValue($rs->fields('EmployerID'));
$this->HRManagerName->setDbValue($rs->fields('HRManagerName'));
$this->HRManagerDesignation->setDbValue($rs->fields('HRManagerDesignation'));
$this->HRManagerTelNo->setDbValue($rs->fields('HRManagerTelNo'));
$this->HRManagerCellNo->setDbValue($rs->fields('HRManagerCellNo'));
$this->HRManagerEmail->setDbValue($rs->fields('HRManagerEmail'));
$this->SupervisorName->setDbValue($rs->fields('SupervisorName'));
$this->SupervisorDesig->setDbValue($rs->fields('SupervisorDesig'));
$this->SupervisorProfRegNo->setDbValue($rs->fields('SupervisorProfRegNo'));
$this->SupervisorTelNo->setDbValue($rs->fields('SupervisorTelNo'));
$this->SupervisorCellNo->setDbValue($rs->fields('SupervisorCellNo'));
$this->SupervisorEmail->setDbValue($rs->fields('SupervisorEmail'));
$this->EducationalInst->setDbValue($rs->fields('EducationalInst'));
$this->Qualifications->setDbValue($rs->fields('Qualifications'));
$this->DateFinalExam->setDbValue($rs->fields('DateFinalExam'));
$this->IDFile->Upload->DbValue = $rs->fields('IDFile');
$this->CVFile->Upload->DbValue = $rs->fields('CVFile');
$this->QualCertificate1->Upload->DbValue = $rs->fields('QualCertificate1');
$this->QualCertificate2->Upload->DbValue = $rs->fields('QualCertificate2');
$this->QualCertificate3->Upload->DbValue = $rs->fields('QualCertificate3');
$this->MentorUndertaking->Upload->DbValue = $rs->fields('MentorUndertaking');
$this->CandUUndertaking->Upload->DbValue = $rs->fields('CandUUndertaking');
$this->CompanyCandidatePolicy->Upload->DbValue = $rs->fields('CompanyCandidatePolicy');
$this->ResidenceProof->Upload->DbValue = $rs->fields('ResidenceProof');
$this->SignedAppForm->Upload->DbValue = $rs->fields('SignedAppForm');
$this->Photograph->Upload->DbValue = $rs->fields('Photograph');
$this->StudentNumber->setDbValue($rs->fields('StudentNumber'));
$this->WebUsername->setDbValue($rs->fields('WebUsername'));
$this->WebPassword->setDbValue($rs->fields('WebPassword'));
$this->BlockAccess->setDbValue($rs->fields('BlockAccess'));
$this->SABTACO->setDbValue($rs->fields('SABTACO'));
$this->CESA->setDbValue($rs->fields('CESA'));
$this->Archived->setDbValue($rs->fields('Archived'));
}
// Render list row values
function RenderListRow() {
global $conn, $Security;
// Call Row Rendering event
$this->Row_Rendering();
// Common render codes
// SelectionCategory
$this->SelectionCategory->CellCssStyle = ""; $this->SelectionCategory->CellCssClass = "";
$this->SelectionCategory->CellAttrs = array(); $this->SelectionCategory->ViewAttrs = array(); $this->SelectionCategory->EditAttrs = array();
// FirstName
$this->FirstName->CellCssStyle = ""; $this->FirstName->CellCssClass = "";
$this->FirstName->CellAttrs = array(); $this->FirstName->ViewAttrs = array(); $this->FirstName->EditAttrs = array();
// Surname
$this->Surname->CellCssStyle = ""; $this->Surname->CellCssClass = "";
$this->Surname->CellAttrs = array(); $this->Surname->ViewAttrs = array(); $this->Surname->EditAttrs = array();
// KnownAs
$this->KnownAs->CellCssStyle = ""; $this->KnownAs->CellCssClass = "";
$this->KnownAs->CellAttrs = array(); $this->KnownAs->ViewAttrs = array(); $this->KnownAs->EditAttrs = array();
// IDNumber
$this->IDNumber->CellCssStyle = ""; $this->IDNumber->CellCssClass = "";
$this->IDNumber->CellAttrs = array(); $this->IDNumber->ViewAttrs = array(); $this->IDNumber->EditAttrs = array();
// Telephone
$this->Telephone->CellCssStyle = ""; $this->Telephone->CellCssClass = "";
$this->Telephone->CellAttrs = array(); $this->Telephone->ViewAttrs = array(); $this->Telephone->EditAttrs = array();
// Cellphone
$this->Cellphone->CellCssStyle = ""; $this->Cellphone->CellCssClass = "";
$this->Cellphone->CellAttrs = array(); $this->Cellphone->ViewAttrs = array(); $this->Cellphone->EditAttrs = array();
// EmailAddress
$this->EmailAddress->CellCssStyle = ""; $this->EmailAddress->CellCssClass = "";
$this->EmailAddress->CellAttrs = array(); $this->EmailAddress->ViewAttrs = array(); $this->EmailAddress->EditAttrs = array();
// Organisation
$this->Organisation->CellCssStyle = ""; $this->Organisation->CellCssClass = "";
$this->Organisation->CellAttrs = array(); $this->Organisation->ViewAttrs = array(); $this->Organisation->EditAttrs = array();
// Province
$this->Province->CellCssStyle = ""; $this->Province->CellCssClass = "";
$this->Province->CellAttrs = array(); $this->Province->ViewAttrs = array(); $this->Province->EditAttrs = array();
// ProfessionalCouncil
$this->ProfessionalCouncil->CellCssStyle = ""; $this->ProfessionalCouncil->CellCssClass = "";
$this->ProfessionalCouncil->CellAttrs = array(); $this->ProfessionalCouncil->ViewAttrs = array(); $this->ProfessionalCouncil->EditAttrs = array();
// CategoryReg
$this->CategoryReg->CellCssStyle = ""; $this->CategoryReg->CellCssClass = "";
$this->CategoryReg->CellAttrs = array(); $this->CategoryReg->ViewAttrs = array(); $this->CategoryReg->EditAttrs = array();
// BelongsTo
$this->BelongsTo->CellCssStyle = ""; $this->BelongsTo->CellCssClass = "";
$this->BelongsTo->CellAttrs = array(); $this->BelongsTo->ViewAttrs = array(); $this->BelongsTo->EditAttrs = array();
// SelectionCategory
$this->SelectionCategory->ViewValue = $this->SelectionCategory->CurrentValue;
$this->SelectionCategory->CssStyle = "";
$this->SelectionCategory->CssClass = "";
$this->SelectionCategory->ViewCustomAttributes = "";
// FirstName
$this->FirstName->ViewValue = $this->FirstName->CurrentValue;
$this->FirstName->CssStyle = "";
$this->FirstName->CssClass = "";
$this->FirstName->ViewCustomAttributes = "";
// Surname
$this->Surname->ViewValue = $this->Surname->CurrentValue;
$this->Surname->CssStyle = "";
$this->Surname->CssClass = "";
$this->Surname->ViewCustomAttributes = "";
// KnownAs
$this->KnownAs->ViewValue = $this->KnownAs->CurrentValue;
$this->KnownAs->CssStyle = "";
$this->KnownAs->CssClass = "";
$this->KnownAs->ViewCustomAttributes = "";
// IDNumber
$this->IDNumber->ViewValue = $this->IDNumber->CurrentValue;
$this->IDNumber->CssStyle = "";
$this->IDNumber->CssClass = "";
$this->IDNumber->ViewCustomAttributes = "mso-number-format:General";
// Telephone
$this->Telephone->ViewValue = $this->Telephone->CurrentValue;
$this->Telephone->CssStyle = "";
$this->Telephone->CssClass = "";
$this->Telephone->ViewCustomAttributes = "mso-number-format:General";
// Cellphone
$this->Cellphone->ViewValue = $this->Cellphone->CurrentValue;
$this->Cellphone->CssStyle = "";
$this->Cellphone->CssClass = "";
$this->Cellphone->ViewCustomAttributes = "mso-number-format:General";
// EmailAddress
$this->EmailAddress->ViewValue = $this->EmailAddress->CurrentValue;
$this->EmailAddress->CssStyle = "";
$this->EmailAddress->CssClass = "";
$this->EmailAddress->ViewCustomAttributes = "";
// Organisation
$this->Organisation->ViewValue = $this->Organisation->CurrentValue;
$this->Organisation->CssStyle = "";
$this->Organisation->CssClass = "";
$this->Organisation->ViewCustomAttributes = "";
// Province
if (strval($this->Province->CurrentValue) <> "") {
$sFilterWrk = "`LookupValue` = '" . ew_AdjustSql($this->Province->CurrentValue) . "'";
$sSqlWrk = "SELECT `LookupValue` FROM `Lookups`";
$sWhereWrk = "";
if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
$sWhereWrk .= "(" . "LookupName='Province'" . ")";
if ($sFilterWrk <> "") {
if ($sWhereWrk <> "") $sWhereWrk .= " AND ";
$sWhereWrk .= "(" . $sFilterWrk . ")";
}
if ($sWhereWrk <> "") $sSqlWrk .= " WHERE " . $sWhereWrk;
$sSqlWrk .= " ORDER BY `LookupValue`";
$rswrk = $conn->Execute($sSqlWrk);
if ($rswrk && !$rswrk->EOF) { // Lookup values found
$this->Province->ViewValue = $rswrk->fields('LookupValue');
$rswrk->Close();
} else {
$this->Province->ViewValue = $this->Province->CurrentValue;
}
} else {
$this->Province->ViewValue = NULL;
}
$this->Province->CssStyle = "";
$this->Province->CssClass = "";
$this->Province->ViewCustomAttributes = "";
// ProfessionalCouncil
$this->ProfessionalCouncil->ViewValue = $this->ProfessionalCouncil->CurrentValue;
$this->ProfessionalCouncil->CssStyle = "";
$this->ProfessionalCouncil->CssClass = "";
$this->ProfessionalCouncil->ViewCustomAttributes = "";
// CategoryReg
$this->CategoryReg->ViewValue = $this->CategoryReg->CurrentValue;
$this->CategoryReg->CssStyle = "";
$this->CategoryReg->CssClass = "";
$this->CategoryReg->ViewCustomAttributes = "";
// BelongsTo
$this->BelongsTo->ViewValue = $this->BelongsTo->CurrentValue;
$this->BelongsTo->CssStyle = "";
$this->BelongsTo->CssClass = "";
$this->BelongsTo->ViewCustomAttributes = "";
// SelectionCategory
$this->SelectionCategory->HrefValue = "";
$this->SelectionCategory->TooltipValue = "";
// FirstName
$this->FirstName->HrefValue = "";
$this->FirstName->TooltipValue = "";
// Surname
$this->Surname->HrefValue = "";
$this->Surname->TooltipValue = "";
// KnownAs
$this->KnownAs->HrefValue = "";
$this->KnownAs->TooltipValue = "";
// IDNumber
$this->IDNumber->HrefValue = "";
$this->IDNumber->TooltipValue = "";
// Telephone
$this->Telephone->HrefValue = "";
$this->Telephone->TooltipValue = "";
// Cellphone
$this->Cellphone->HrefValue = "";
$this->Cellphone->TooltipValue = "";
// EmailAddress
$this->EmailAddress->HrefValue = "";
$this->EmailAddress->TooltipValue = "";
// Organisation
$this->Organisation->HrefValue = "";
$this->Organisation->TooltipValue = "";
// Province
$this->Province->HrefValue = "";
$this->Province->TooltipValue = "";
// ProfessionalCouncil
$this->ProfessionalCouncil->HrefValue = "";
$this->ProfessionalCouncil->TooltipValue = "";
// CategoryReg
$this->CategoryReg->HrefValue = "";
$this->CategoryReg->TooltipValue = "";
// BelongsTo
$this->BelongsTo->HrefValue = "";
$this->BelongsTo->TooltipValue = "";
// Call Row Rendered event
$this->Row_Rendered();
}
// Aggregate list row values
function AggregateListRowValues() {
}
// Aggregate list row (for rendering)
function AggregateListRow() {
}
// Row styles
function RowStyles() {
$sAtt = "";
$sStyle = trim($this->CssStyle);
if (@$this->RowAttrs["style"] <> "")
$sStyle .= " " . $this->RowAttrs["style"];
$sClass = trim($this->CssClass);
if (@$this->RowAttrs["class"] <> "")
$sClass .= " " . $this->RowAttrs["class"];
if (trim($sStyle) <> "")
$sAtt .= " style=\"" . trim($sStyle) . "\"";
if (trim($sClass) <> "")
$sAtt .= " class=\"" . trim($sClass) . "\"";
return $sAtt;
}
// Row attributes
function RowAttributes() {
$sAtt = $this->RowStyles();
if ($this->Export == "") {
foreach ($this->RowAttrs as $k => $v) {
if ($k <> "class" && $k <> "style" && trim($v) <> "")
$sAtt .= " " . $k . "=\"" . trim($v) . "\"";
}
}
return $sAtt;
}
// Field object by name
function fields($fldname) {
return $this->fields[$fldname];
}
// Table level events
// Recordset Selecting event
function Recordset_Selecting(&$filter) {
// Enter your code here
}
// Recordset Selected event
function Recordset_Selected(&$rs) {
//echo "Recordset Selected";
}
// Recordset Search Validated event
function Recordset_SearchValidated() {
// Example:
//$this->MyField1->AdvancedSearch->SearchValue = "your search criteria"; // Search value
}
// Recordset Searching event
function Recordset_Searching(&$filter) {
// Enter your code here
}
// Row_Selecting event
function Row_Selecting(&$filter) {
// Enter your code here
}
// Row Selected event
function Row_Selected(&$rs) {
//echo "Row Selected";
}
// Row Rendering event
function Row_Rendering() {
// Enter your code here
}
// Row Rendered event
function Row_Rendered() {
// To view properties of field class, use:
//var_dump($this-><FieldName>);
}
// Row Inserting event
function Row_Inserting(&$rs) {
// Enter your code here
// To cancel, set return value to FALSE
return TRUE;
}
// Row Inserted event
function Row_Inserted(&$rs) {
//echo "Row Inserted"
global $conn;
$sStudentNumber = "CCM".str_pad($rs["CCMStudentID"], 6, "0", STR_PAD_LEFT);
$WebUsername = $sStudentNumber;
$WebPassword = GenPassword();
$sql = "UPDATE CCMStudents SET StudentNumber='".$sStudentNumber."',
WebUsername='".$WebUsername."', WebPassword='".$WebPassword."'
WHERE CCMStudentID=".$rs["CCMStudentID"];
$conn->Execute($sql);
}
// Row Updating event
function Row_Updating(&$rsold, &$rsnew) {
// Enter your code here
// To cancel, set return value to FALSE
return TRUE;
}
// Row Updated event
function Row_Updated(&$rsold, &$rsnew) {
//echo "Row Updated";
}
// Row Update Conflict event
function Row_UpdateConflict(&$rsold, &$rsnew) {
// Enter your code here
// To ignore conflict, set return value to FALSE
return TRUE;
}
// Row Deleting event
function Row_Deleting(&$rs) {
// Enter your code here
// To cancel, set return value to False
return TRUE;
}
// Row Deleted event
function Row_Deleted(&$rs) {
//echo "Row Deleted";
}
// Email Sending event
function Email_Sending(&$Email, &$Args) {
//var_dump($Email); var_dump($Args); exit();
return TRUE;
}
}
?>