| Current Path : /var/www/cesa.co.za/ccmadmin/ |
| Current File : /var/www/cesa.co.za/ccmadmin/cstArchivedStudentsinfo.php |
<?php
// Global variable for table object
$cstArchivedStudents = NULL;
//
// Table class for cstArchivedStudents
//
class ccstArchivedStudents {
var $TableVar = 'cstArchivedStudents';
var $TableName = 'cstArchivedStudents';
var $TableType = 'CUSTOMVIEW';
var $Archived;
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 $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 $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 ccstArchivedStudents() {
global $Language;
// Archived
$this->Archived = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_Archived', 'Archived', 'CCMStudents.Archived', 16, -1, FALSE, 'CCMStudents.Archived', FALSE);
$this->Archived->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
$this->fields['Archived'] =& $this->Archived;
// CCMStudentID
$this->CCMStudentID = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_CCMStudentID', 'CCMStudentID', 'CCMStudents.CCMStudentID', 3, -1, FALSE, 'CCMStudents.CCMStudentID', FALSE);
$this->CCMStudentID->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
$this->fields['CCMStudentID'] =& $this->CCMStudentID;
// SelectionCategory
$this->SelectionCategory = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_SelectionCategory', 'SelectionCategory', 'CCMStudents.SelectionCategory', 200, -1, FALSE, 'CCMStudents.SelectionCategory', FALSE);
$this->fields['SelectionCategory'] =& $this->SelectionCategory;
// Title
$this->Title = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_Title', 'Title', 'CCMStudents.Title', 200, -1, FALSE, 'CCMStudents.Title', FALSE);
$this->fields['Title'] =& $this->Title;
// Initials
$this->Initials = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_Initials', 'Initials', 'CCMStudents.Initials', 200, -1, FALSE, 'CCMStudents.Initials', FALSE);
$this->fields['Initials'] =& $this->Initials;
// FirstName
$this->FirstName = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_FirstName', 'FirstName', 'CCMStudents.FirstName', 200, -1, FALSE, 'CCMStudents.FirstName', FALSE);
$this->fields['FirstName'] =& $this->FirstName;
// Surname
$this->Surname = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_Surname', 'Surname', 'CCMStudents.Surname', 200, -1, FALSE, 'CCMStudents.Surname', FALSE);
$this->fields['Surname'] =& $this->Surname;
// KnownAs
$this->KnownAs = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_KnownAs', 'KnownAs', 'CCMStudents.KnownAs', 200, -1, FALSE, 'CCMStudents.KnownAs', FALSE);
$this->fields['KnownAs'] =& $this->KnownAs;
// IDNumber
$this->IDNumber = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_IDNumber', 'IDNumber', 'CCMStudents.IDNumber', 200, -1, FALSE, 'CCMStudents.IDNumber', FALSE);
$this->fields['IDNumber'] =& $this->IDNumber;
// Telephone
$this->Telephone = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_Telephone', 'Telephone', 'CCMStudents.Telephone', 200, -1, FALSE, 'CCMStudents.Telephone', FALSE);
$this->fields['Telephone'] =& $this->Telephone;
// Cellphone
$this->Cellphone = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_Cellphone', 'Cellphone', 'CCMStudents.Cellphone', 200, -1, FALSE, 'CCMStudents.Cellphone', FALSE);
$this->fields['Cellphone'] =& $this->Cellphone;
// EmailAddress
$this->EmailAddress = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_EmailAddress', 'EmailAddress', 'CCMStudents.EmailAddress', 200, -1, FALSE, 'CCMStudents.EmailAddress', FALSE);
$this->fields['EmailAddress'] =& $this->EmailAddress;
// WorkAddress
$this->WorkAddress = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_WorkAddress', 'WorkAddress', 'CCMStudents.WorkAddress', 201, -1, FALSE, 'CCMStudents.WorkAddress', FALSE);
$this->fields['WorkAddress'] =& $this->WorkAddress;
// PostalAddress
$this->PostalAddress = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_PostalAddress', 'PostalAddress', 'CCMStudents.PostalAddress', 201, -1, FALSE, 'CCMStudents.PostalAddress', FALSE);
$this->fields['PostalAddress'] =& $this->PostalAddress;
// Department
$this->Department = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_Department', 'Department', 'CCMStudents.Department', 200, -1, FALSE, 'CCMStudents.Department', FALSE);
$this->fields['Department'] =& $this->Department;
// Organisation
$this->Organisation = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_Organisation', 'Organisation', 'CCMStudents.Organisation', 200, -1, FALSE, 'CCMStudents.Organisation', FALSE);
$this->fields['Organisation'] =& $this->Organisation;
// VATNo
$this->VATNo = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_VATNo', 'VATNo', 'CCMStudents.VATNo', 200, -1, FALSE, 'CCMStudents.VATNo', FALSE);
$this->fields['VATNo'] =& $this->VATNo;
// JobTitle
$this->JobTitle = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_JobTitle', 'JobTitle', 'CCMStudents.JobTitle', 200, -1, FALSE, 'CCMStudents.JobTitle', FALSE);
$this->fields['JobTitle'] =& $this->JobTitle;
// DateofBirth
$this->DateofBirth = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_DateofBirth', 'DateofBirth', 'CCMStudents.DateofBirth', 133, 5, FALSE, 'CCMStudents.DateofBirth', FALSE);
$this->DateofBirth->FldDefaultErrMsg = str_replace("%s", "/", $Language->Phrase("IncorrectDateYMD"));
$this->fields['DateofBirth'] =& $this->DateofBirth;
// PlaceofBirth
$this->PlaceofBirth = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_PlaceofBirth', 'PlaceofBirth', 'CCMStudents.PlaceofBirth', 200, -1, FALSE, 'CCMStudents.PlaceofBirth', FALSE);
$this->fields['PlaceofBirth'] =& $this->PlaceofBirth;
// CountryofBirth
$this->CountryofBirth = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_CountryofBirth', 'CountryofBirth', 'CCMStudents.CountryofBirth', 200, -1, FALSE, 'CCMStudents.CountryofBirth', FALSE);
$this->fields['CountryofBirth'] =& $this->CountryofBirth;
// Province
$this->Province = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_Province', 'Province', 'CCMStudents.Province', 200, -1, FALSE, 'CCMStudents.Province', FALSE);
$this->fields['Province'] =& $this->Province;
// MaleorFemale
$this->MaleorFemale = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_MaleorFemale', 'MaleorFemale', 'CCMStudents.MaleorFemale', 200, -1, FALSE, 'CCMStudents.MaleorFemale', FALSE);
$this->fields['MaleorFemale'] =& $this->MaleorFemale;
// RaceGroup
$this->RaceGroup = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_RaceGroup', 'RaceGroup', 'CCMStudents.RaceGroup', 200, -1, FALSE, 'CCMStudents.RaceGroup', FALSE);
$this->fields['RaceGroup'] =& $this->RaceGroup;
// Disability
$this->Disability = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_Disability', 'Disability', 'CCMStudents.Disability', 200, -1, FALSE, 'CCMStudents.Disability', FALSE);
$this->fields['Disability'] =& $this->Disability;
// DisabilityNature
$this->DisabilityNature = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_DisabilityNature', 'DisabilityNature', 'CCMStudents.DisabilityNature', 200, -1, FALSE, 'CCMStudents.DisabilityNature', FALSE);
$this->fields['DisabilityNature'] =& $this->DisabilityNature;
// DisabilityCertificate
$this->DisabilityCertificate = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_DisabilityCertificate', 'DisabilityCertificate', 'CCMStudents.DisabilityCertificate', 200, -1, TRUE, 'CCMStudents.DisabilityCertificate', FALSE);
$this->DisabilityCertificate->UploadPath = "uploads";
$this->fields['DisabilityCertificate'] =& $this->DisabilityCertificate;
// ProfessionalCouncil
$this->ProfessionalCouncil = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_ProfessionalCouncil', 'ProfessionalCouncil', 'CCMStudents.ProfessionalCouncil', 200, -1, FALSE, 'CCMStudents.ProfessionalCouncil', FALSE);
$this->fields['ProfessionalCouncil'] =& $this->ProfessionalCouncil;
// CategoryReg
$this->CategoryReg = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_CategoryReg', 'CategoryReg', 'CCMStudents.CategoryReg', 200, -1, FALSE, 'CCMStudents.CategoryReg', FALSE);
$this->fields['CategoryReg'] =& $this->CategoryReg;
// CouncilRegNumber
$this->CouncilRegNumber = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_CouncilRegNumber', 'CouncilRegNumber', 'CCMStudents.CouncilRegNumber', 200, -1, FALSE, 'CCMStudents.CouncilRegNumber', FALSE);
$this->fields['CouncilRegNumber'] =& $this->CouncilRegNumber;
// LengthCandidateReg
$this->LengthCandidateReg = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_LengthCandidateReg', 'LengthCandidateReg', 'CCMStudents.LengthCandidateReg', 200, -1, FALSE, 'CCMStudents.LengthCandidateReg', FALSE);
$this->fields['LengthCandidateReg'] =& $this->LengthCandidateReg;
// YearsToProfReg
$this->YearsToProfReg = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_YearsToProfReg', 'YearsToProfReg', 'CCMStudents.YearsToProfReg', 200, -1, FALSE, 'CCMStudents.YearsToProfReg', FALSE);
$this->fields['YearsToProfReg'] =& $this->YearsToProfReg;
// FirstJobStart
$this->FirstJobStart = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_FirstJobStart', 'FirstJobStart', 'CCMStudents.FirstJobStart', 200, -1, FALSE, 'CCMStudents.FirstJobStart', FALSE);
$this->fields['FirstJobStart'] =& $this->FirstJobStart;
// VolAssociations
$this->VolAssociations = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_VolAssociations', 'VolAssociations', 'CCMStudents.VolAssociations', 200, -1, FALSE, 'CCMStudents.VolAssociations', FALSE);
$this->fields['VolAssociations'] =& $this->VolAssociations;
// BelongsTo
$this->BelongsTo = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_BelongsTo', 'BelongsTo', 'CCMStudents.BelongsTo', 200, -1, FALSE, 'CCMStudents.BelongsTo', FALSE);
$this->fields['BelongsTo'] =& $this->BelongsTo;
// CESA_SABTACO_MemNum
$this->CESA_SABTACO_MemNum = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_CESA_SABTACO_MemNum', 'CESA_SABTACO_MemNum', 'CCMStudents.CESA_SABTACO_MemNum', 200, -1, FALSE, 'CCMStudents.CESA_SABTACO_MemNum', FALSE);
$this->fields['CESA_SABTACO_MemNum'] =& $this->CESA_SABTACO_MemNum;
// AreaDiscipline
$this->AreaDiscipline = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_AreaDiscipline', 'AreaDiscipline', 'CCMStudents.AreaDiscipline', 200, -1, FALSE, 'CCMStudents.AreaDiscipline', FALSE);
$this->fields['AreaDiscipline'] =& $this->AreaDiscipline;
// AreaSubDiscipline
$this->AreaSubDiscipline = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_AreaSubDiscipline', 'AreaSubDiscipline', 'CCMStudents.AreaSubDiscipline', 200, -1, FALSE, 'CCMStudents.AreaSubDiscipline', FALSE);
$this->fields['AreaSubDiscipline'] =& $this->AreaSubDiscipline;
// Salary
$this->Salary = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_Salary', 'Salary', 'CCMStudents.Salary', 200, -1, FALSE, 'CCMStudents.Salary', FALSE);
$this->fields['Salary'] =& $this->Salary;
// Payslip
$this->Payslip = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_Payslip', 'Payslip', 'CCMStudents.Payslip', 200, -1, TRUE, 'CCMStudents.Payslip', FALSE);
$this->Payslip->UploadPath = "uploads";
$this->fields['Payslip'] =& $this->Payslip;
// BankAccountName
$this->BankAccountName = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_BankAccountName', 'BankAccountName', 'CCMStudents.BankAccountName', 200, -1, FALSE, 'CCMStudents.BankAccountName', FALSE);
$this->fields['BankAccountName'] =& $this->BankAccountName;
// BankAccountBank
$this->BankAccountBank = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_BankAccountBank', 'BankAccountBank', 'CCMStudents.BankAccountBank', 200, -1, FALSE, 'CCMStudents.BankAccountBank', FALSE);
$this->fields['BankAccountBank'] =& $this->BankAccountBank;
// BankAccountBranch
$this->BankAccountBranch = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_BankAccountBranch', 'BankAccountBranch', 'CCMStudents.BankAccountBranch', 200, -1, FALSE, 'CCMStudents.BankAccountBranch', FALSE);
$this->fields['BankAccountBranch'] =& $this->BankAccountBranch;
// BankAccountNo
$this->BankAccountNo = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_BankAccountNo', 'BankAccountNo', 'CCMStudents.BankAccountNo', 200, -1, FALSE, 'CCMStudents.BankAccountNo', FALSE);
$this->fields['BankAccountNo'] =& $this->BankAccountNo;
// BankAccountProof
$this->BankAccountProof = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_BankAccountProof', 'BankAccountProof', 'CCMStudents.BankAccountProof', 200, -1, TRUE, 'CCMStudents.BankAccountProof', FALSE);
$this->BankAccountProof->UploadPath = "uploads";
$this->fields['BankAccountProof'] =& $this->BankAccountProof;
// Funding
$this->Funding = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_Funding', 'Funding', 'CCMStudents.Funding', 200, -1, FALSE, 'CCMStudents.Funding', FALSE);
$this->fields['Funding'] =& $this->Funding;
// CWDTP
$this->CWDTP = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_CWDTP', 'CWDTP', 'CCMStudents.CWDTP', 200, -1, FALSE, 'CCMStudents.CWDTP', FALSE);
$this->fields['CWDTP'] =& $this->CWDTP;
// BookedByName
$this->BookedByName = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_BookedByName', 'BookedByName', 'CCMStudents.BookedByName', 200, -1, FALSE, 'CCMStudents.BookedByName', FALSE);
$this->fields['BookedByName'] =& $this->BookedByName;
// BookedByDesignation
$this->BookedByDesignation = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_BookedByDesignation', 'BookedByDesignation', 'CCMStudents.BookedByDesignation', 200, -1, FALSE, 'CCMStudents.BookedByDesignation', FALSE);
$this->fields['BookedByDesignation'] =& $this->BookedByDesignation;
// BookedByTelNo
$this->BookedByTelNo = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_BookedByTelNo', 'BookedByTelNo', 'CCMStudents.BookedByTelNo', 200, -1, FALSE, 'CCMStudents.BookedByTelNo', FALSE);
$this->fields['BookedByTelNo'] =& $this->BookedByTelNo;
// BookedByFaxNo
$this->BookedByFaxNo = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_BookedByFaxNo', 'BookedByFaxNo', 'CCMStudents.BookedByFaxNo', 200, -1, FALSE, 'CCMStudents.BookedByFaxNo', FALSE);
$this->fields['BookedByFaxNo'] =& $this->BookedByFaxNo;
// BookedByCellNo
$this->BookedByCellNo = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_BookedByCellNo', 'BookedByCellNo', 'CCMStudents.BookedByCellNo', 200, -1, FALSE, 'CCMStudents.BookedByCellNo', FALSE);
$this->fields['BookedByCellNo'] =& $this->BookedByCellNo;
// BookedByEmail
$this->BookedByEmail = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_BookedByEmail', 'BookedByEmail', 'CCMStudents.BookedByEmail', 200, -1, FALSE, 'CCMStudents.BookedByEmail', FALSE);
$this->fields['BookedByEmail'] =& $this->BookedByEmail;
// MentorID
$this->MentorID = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_MentorID', 'MentorID', 'CCMStudents.MentorID', 3, -1, FALSE, 'CCMStudents.MentorID', FALSE);
$this->MentorID->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
$this->fields['MentorID'] =& $this->MentorID;
// EmployerID
$this->EmployerID = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_EmployerID', 'EmployerID', 'CCMStudents.EmployerID', 3, -1, FALSE, 'CCMStudents.EmployerID', FALSE);
$this->EmployerID->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
$this->fields['EmployerID'] =& $this->EmployerID;
// HRManagerName
$this->HRManagerName = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_HRManagerName', 'HRManagerName', 'CCMStudents.HRManagerName', 200, -1, FALSE, 'CCMStudents.HRManagerName', FALSE);
$this->fields['HRManagerName'] =& $this->HRManagerName;
// HRManagerDesignation
$this->HRManagerDesignation = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_HRManagerDesignation', 'HRManagerDesignation', 'CCMStudents.HRManagerDesignation', 200, -1, FALSE, 'CCMStudents.HRManagerDesignation', FALSE);
$this->fields['HRManagerDesignation'] =& $this->HRManagerDesignation;
// HRManagerTelNo
$this->HRManagerTelNo = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_HRManagerTelNo', 'HRManagerTelNo', 'CCMStudents.HRManagerTelNo', 200, -1, FALSE, 'CCMStudents.HRManagerTelNo', FALSE);
$this->fields['HRManagerTelNo'] =& $this->HRManagerTelNo;
// HRManagerCellNo
$this->HRManagerCellNo = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_HRManagerCellNo', 'HRManagerCellNo', 'CCMStudents.HRManagerCellNo', 200, -1, FALSE, 'CCMStudents.HRManagerCellNo', FALSE);
$this->fields['HRManagerCellNo'] =& $this->HRManagerCellNo;
// HRManagerEmail
$this->HRManagerEmail = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_HRManagerEmail', 'HRManagerEmail', 'CCMStudents.HRManagerEmail', 200, -1, FALSE, 'CCMStudents.HRManagerEmail', FALSE);
$this->fields['HRManagerEmail'] =& $this->HRManagerEmail;
// SupervisorName
$this->SupervisorName = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_SupervisorName', 'SupervisorName', 'CCMStudents.SupervisorName', 200, -1, FALSE, 'CCMStudents.SupervisorName', FALSE);
$this->fields['SupervisorName'] =& $this->SupervisorName;
// SupervisorDesig
$this->SupervisorDesig = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_SupervisorDesig', 'SupervisorDesig', 'CCMStudents.SupervisorDesig', 200, -1, FALSE, 'CCMStudents.SupervisorDesig', FALSE);
$this->fields['SupervisorDesig'] =& $this->SupervisorDesig;
// SupervisorProfRegNo
$this->SupervisorProfRegNo = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_SupervisorProfRegNo', 'SupervisorProfRegNo', 'CCMStudents.SupervisorProfRegNo', 200, -1, FALSE, 'CCMStudents.SupervisorProfRegNo', FALSE);
$this->fields['SupervisorProfRegNo'] =& $this->SupervisorProfRegNo;
// SupervisorTelNo
$this->SupervisorTelNo = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_SupervisorTelNo', 'SupervisorTelNo', 'CCMStudents.SupervisorTelNo', 200, -1, FALSE, 'CCMStudents.SupervisorTelNo', FALSE);
$this->fields['SupervisorTelNo'] =& $this->SupervisorTelNo;
// SupervisorCellNo
$this->SupervisorCellNo = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_SupervisorCellNo', 'SupervisorCellNo', 'CCMStudents.SupervisorCellNo', 200, -1, FALSE, 'CCMStudents.SupervisorCellNo', FALSE);
$this->fields['SupervisorCellNo'] =& $this->SupervisorCellNo;
// SupervisorEmail
$this->SupervisorEmail = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_SupervisorEmail', 'SupervisorEmail', 'CCMStudents.SupervisorEmail', 200, -1, FALSE, 'CCMStudents.SupervisorEmail', FALSE);
$this->fields['SupervisorEmail'] =& $this->SupervisorEmail;
// EducationalInst
$this->EducationalInst = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_EducationalInst', 'EducationalInst', 'CCMStudents.EducationalInst', 200, -1, FALSE, 'CCMStudents.EducationalInst', FALSE);
$this->fields['EducationalInst'] =& $this->EducationalInst;
// Qualifications
$this->Qualifications = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_Qualifications', 'Qualifications', 'CCMStudents.Qualifications', 201, -1, FALSE, 'CCMStudents.Qualifications', FALSE);
$this->fields['Qualifications'] =& $this->Qualifications;
// DateFinalExam
$this->DateFinalExam = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_DateFinalExam', 'DateFinalExam', 'CCMStudents.DateFinalExam', 200, -1, FALSE, 'CCMStudents.DateFinalExam', FALSE);
$this->fields['DateFinalExam'] =& $this->DateFinalExam;
// IDFile
$this->IDFile = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_IDFile', 'IDFile', 'CCMStudents.IDFile', 200, -1, TRUE, 'CCMStudents.IDFile', FALSE);
$this->IDFile->UploadPath = "uploads";
$this->fields['IDFile'] =& $this->IDFile;
// CVFile
$this->CVFile = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_CVFile', 'CVFile', 'CCMStudents.CVFile', 200, -1, TRUE, 'CCMStudents.CVFile', FALSE);
$this->CVFile->UploadPath = "uploads";
$this->fields['CVFile'] =& $this->CVFile;
// QualCertificate1
$this->QualCertificate1 = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_QualCertificate1', 'QualCertificate1', 'CCMStudents.QualCertificate1', 200, -1, TRUE, 'CCMStudents.QualCertificate1', FALSE);
$this->QualCertificate1->UploadPath = "uploads";
$this->fields['QualCertificate1'] =& $this->QualCertificate1;
// QualCertificate2
$this->QualCertificate2 = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_QualCertificate2', 'QualCertificate2', 'CCMStudents.QualCertificate2', 200, -1, TRUE, 'CCMStudents.QualCertificate2', FALSE);
$this->QualCertificate2->UploadPath = "uploads";
$this->fields['QualCertificate2'] =& $this->QualCertificate2;
// QualCertificate3
$this->QualCertificate3 = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_QualCertificate3', 'QualCertificate3', 'CCMStudents.QualCertificate3', 200, -1, TRUE, 'CCMStudents.QualCertificate3', FALSE);
$this->QualCertificate3->UploadPath = "uploads";
$this->fields['QualCertificate3'] =& $this->QualCertificate3;
// MentorUndertaking
$this->MentorUndertaking = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_MentorUndertaking', 'MentorUndertaking', 'CCMStudents.MentorUndertaking', 200, -1, TRUE, 'CCMStudents.MentorUndertaking', FALSE);
$this->MentorUndertaking->UploadPath = "uploads";
$this->fields['MentorUndertaking'] =& $this->MentorUndertaking;
// CandUUndertaking
$this->CandUUndertaking = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_CandUUndertaking', 'CandUUndertaking', 'CCMStudents.CandUUndertaking', 200, -1, TRUE, 'CCMStudents.CandUUndertaking', FALSE);
$this->CandUUndertaking->UploadPath = "uploads";
$this->fields['CandUUndertaking'] =& $this->CandUUndertaking;
// CompanyCandidatePolicy
$this->CompanyCandidatePolicy = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_CompanyCandidatePolicy', 'CompanyCandidatePolicy', 'CCMStudents.CompanyCandidatePolicy', 200, -1, TRUE, 'CCMStudents.CompanyCandidatePolicy', FALSE);
$this->CompanyCandidatePolicy->UploadPath = "uploads";
$this->fields['CompanyCandidatePolicy'] =& $this->CompanyCandidatePolicy;
// ResidenceProof
$this->ResidenceProof = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_ResidenceProof', 'ResidenceProof', 'CCMStudents.ResidenceProof', 200, -1, TRUE, 'CCMStudents.ResidenceProof', FALSE);
$this->ResidenceProof->UploadPath = "uploads";
$this->fields['ResidenceProof'] =& $this->ResidenceProof;
// SignedAppForm
$this->SignedAppForm = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_SignedAppForm', 'SignedAppForm', 'CCMStudents.SignedAppForm', 200, -1, TRUE, 'CCMStudents.SignedAppForm', FALSE);
$this->SignedAppForm->UploadPath = "uploads";
$this->fields['SignedAppForm'] =& $this->SignedAppForm;
// Photograph
$this->Photograph = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_Photograph', 'Photograph', 'CCMStudents.Photograph', 200, -1, TRUE, 'CCMStudents.Photograph', FALSE);
$this->Photograph->UploadPath = "uploads";
$this->fields['Photograph'] =& $this->Photograph;
// StudentNumber
$this->StudentNumber = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_StudentNumber', 'StudentNumber', 'CCMStudents.StudentNumber', 200, -1, FALSE, 'CCMStudents.StudentNumber', FALSE);
$this->fields['StudentNumber'] =& $this->StudentNumber;
// WebUsername
$this->WebUsername = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_WebUsername', 'WebUsername', 'CCMStudents.WebUsername', 200, -1, FALSE, 'CCMStudents.WebUsername', FALSE);
$this->fields['WebUsername'] =& $this->WebUsername;
// WebPassword
$this->WebPassword = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_WebPassword', 'WebPassword', 'CCMStudents.WebPassword', 200, -1, FALSE, 'CCMStudents.WebPassword', FALSE);
$this->fields['WebPassword'] =& $this->WebPassword;
// BlockAccess
$this->BlockAccess = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_BlockAccess', 'BlockAccess', 'CCMStudents.BlockAccess', 200, -1, FALSE, 'CCMStudents.BlockAccess', FALSE);
$this->fields['BlockAccess'] =& $this->BlockAccess;
// SABTACO
$this->SABTACO = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_SABTACO', 'SABTACO', 'CCMStudents.SABTACO', 16, -1, FALSE, 'CCMStudents.SABTACO', FALSE);
$this->SABTACO->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
$this->fields['SABTACO'] =& $this->SABTACO;
// CESA
$this->CESA = new cField('cstArchivedStudents', 'cstArchivedStudents', 'x_CESA', 'CESA', 'CCMStudents.CESA', 16, -1, FALSE, 'CCMStudents.CESA', FALSE);
$this->CESA->FldDefaultErrMsg = $Language->Phrase("IncorrectInteger");
$this->fields['CESA'] =& $this->CESA;
}
// 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 "cstArchivedStudents_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 CCMStudents.Archived, CCMStudents.CCMStudentID, CCMStudents.SelectionCategory, CCMStudents.Title, CCMStudents.Initials, CCMStudents.FirstName, CCMStudents.Surname, CCMStudents.KnownAs, CCMStudents.IDNumber, CCMStudents.Telephone, CCMStudents.Cellphone, CCMStudents.EmailAddress, CCMStudents.WorkAddress, CCMStudents.PostalAddress, CCMStudents.Department, CCMStudents.Organisation, CCMStudents.VATNo, CCMStudents.JobTitle, CCMStudents.DateofBirth, CCMStudents.PlaceofBirth, CCMStudents.CountryofBirth, CCMStudents.Province, CCMStudents.MaleorFemale, CCMStudents.RaceGroup, CCMStudents.Disability, CCMStudents.DisabilityNature, CCMStudents.DisabilityCertificate, CCMStudents.ProfessionalCouncil, CCMStudents.CategoryReg, CCMStudents.CouncilRegNumber, CCMStudents.LengthCandidateReg, CCMStudents.YearsToProfReg, CCMStudents.FirstJobStart, CCMStudents.VolAssociations, CCMStudents.BelongsTo, CCMStudents.CESA_SABTACO_MemNum, CCMStudents.AreaDiscipline, CCMStudents.AreaSubDiscipline, CCMStudents.Salary, CCMStudents.Payslip, CCMStudents.BankAccountName, CCMStudents.BankAccountBank, CCMStudents.BankAccountBranch, CCMStudents.BankAccountNo, CCMStudents.BankAccountProof, CCMStudents.Funding, CCMStudents.CWDTP, CCMStudents.BookedByName, CCMStudents.BookedByDesignation, CCMStudents.BookedByTelNo, CCMStudents.BookedByFaxNo, CCMStudents.BookedByCellNo, CCMStudents.BookedByEmail, CCMStudents.MentorID, CCMStudents.EmployerID, CCMStudents.HRManagerName, CCMStudents.HRManagerDesignation, CCMStudents.HRManagerTelNo, CCMStudents.HRManagerCellNo, CCMStudents.HRManagerEmail, CCMStudents.SupervisorName, CCMStudents.SupervisorDesig, CCMStudents.SupervisorProfRegNo, CCMStudents.SupervisorTelNo, CCMStudents.SupervisorCellNo, CCMStudents.SupervisorEmail, CCMStudents.EducationalInst, CCMStudents.Qualifications, CCMStudents.DateFinalExam, CCMStudents.IDFile, CCMStudents.CVFile, CCMStudents.QualCertificate1, CCMStudents.QualCertificate2, CCMStudents.QualCertificate3, CCMStudents.MentorUndertaking, CCMStudents.CandUUndertaking, CCMStudents.CompanyCandidatePolicy, CCMStudents.ResidenceProof, CCMStudents.SignedAppForm, CCMStudents.Photograph, CCMStudents.StudentNumber, CCMStudents.WebUsername, CCMStudents.WebPassword, CCMStudents.BlockAccess, CCMStudents.SABTACO, CCMStudents.CESA FROM " . $this->SqlFrom();
}
function SqlWhere() { // Where
$sWhere = "CCMStudents.Archived = 1";
$this->TableFilter = "";
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, FirstName";
}
// 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 "CCMStudents.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 "cstArchivedStudentslist.php";
}
}
function setReturnUrl($v) {
$_SESSION[EW_PROJECT_NAME . "_" . $this->TableVar . "_" . EW_TABLE_RETURN_URL] = $v;
}
// List URL
function ListUrl() {
return "cstArchivedStudentslist.php";
}
// View URL
function ViewUrl() {
return $this->KeyUrl("cstArchivedStudentsview.php", $this->UrlParm());
}
// Add URL
function AddUrl() {
$AddUrl = "cstArchivedStudentsadd.php";
$sUrlParm = $this->UrlParm();
if ($sUrlParm <> "")
$AddUrl .= "?" . $sUrlParm;
return $AddUrl;
}
// Edit URL
function EditUrl() {
return $this->KeyUrl("cstArchivedStudentsedit.php", $this->UrlParm());
}
// Inline edit URL
function InlineEditUrl() {
return $this->KeyUrl(ew_CurrentPage(), $this->UrlParm("a=edit"));
}
// Copy URL
function CopyUrl() {
return $this->KeyUrl("cstArchivedStudentsadd.php", $this->UrlParm());
}
// Inline copy URL
function InlineCopyUrl() {
return $this->KeyUrl(ew_CurrentPage(), $this->UrlParm("a=copy"));
}
// Delete URL
function DeleteUrl() {
return $this->KeyUrl("cstArchivedStudentsdelete.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=cstArchivedStudents" : "";
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->Archived->setDbValue($rs->fields('Archived'));
$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->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'));
}
// 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"
}
// 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;
}
}
?>