* Time: 11:40 AM */ $minUserLevel = 1; $cfgProgDir = '../security/'; include $cfgProgDir . "secure.php"; include 'ManageDatabase.php'; require 'EntryCheck.php'; $TITLE = 'New Email Account'; include_once INC_PATH . 'header.php'; if (isset($_SERVER['REQUEST_METHOD'])) { if ($_SERVER['REQUEST_METHOD'] == 'POST') { $email = $_POST['email']; $password = $_POST['password']; $re_password = $_POST['re_password']; $checks = new EntryCheck(); if (!$checks->CheckEmail($email) || !$checks->CheckForSamePassword($password, $re_password)) { ?> <script>ShowAlert('#FormAlert');</script> <?php } else { if ($conn = new ManageDatabase()) { if ($conn->InsertToDatabase($email, $password)) { ?> <script>ShowAlert('#FormInfo');</script> <?php } else { ?> <script>ShowAlert('#DatabaseError');</script> <?php } $conn->Close();
* User: Habibzadeh * Date: 01/05/2015 * Time: 11:41 AM */ $minUserLevel = 2; $cfgProgDir = '../security/'; include $cfgProgDir . "secure.php"; include 'ManageDatabase.php'; require 'EntryCheck.php'; $TITLE = 'Delete Email Account.'; include_once INC_PATH . 'header.php'; if (isset($_SERVER['REQUEST_METHOD'])) { if ($_SERVER['REQUEST_METHOD'] == 'POST') { $email = $_POST['email']; $checks = new EntryCheck(); if (!$checks->CheckEmail($email)) { ?> <script>ShowAlert('#FormAlert');</script> <?php } else { if ($conn = new ManageDatabase()) { if (($record_id = $conn->CheckForEmailRecord($email)) > 0) { ?> <script> if(confirm("Are you sure ?")){ <?php if ($conn->DeleteEmail($record_id)) { ?> ShowAlert('#FormInfo'); <?php } else {
*/ $minUserLevel = 3; $cfgProgDir = '../security/'; include $cfgProgDir . "secure.php"; include 'ManageUserDatabase.php'; require 'EntryCheck.php'; $TITLE = 'Edit User'; include_once INC_PATH . 'header.php'; if (isset($_SERVER['REQUEST_METHOD'])) { if ($_SERVER['REQUEST_METHOD'] == 'POST') { $email = $_POST['email']; $password = $_POST['password']; $re_password = $_POST['re_password']; $level = $_POST['level']; $checks = new EntryCheck(); if (!$checks->CheckEmail($email) || !$checks->CheckForSamePassword($password, $re_password) || !$checks->CheckUserAccessLevel($level)) { ?> <script>ShowAlert('#FormAlert');</script> <?php } else { if ($conn = new ManageUserDatabase()) { $record_id = $conn->CheckForExistingUser($email); if ($record_id > 0) { if ($conn->UpdateUser($record_id, $password, $level)) { ?> <script>ShowAlert('#FormInfo');</script> <?php } else { ?> <script>ShowAlert('#UnSuccess');</script> <?php