<?php include_once 'config.php'; include_once '../checkAdminPagePermissions.php'; $dbBean = new DatabaseBean(); $general = new General($dbBean); $menu_id = empty($_REQUEST['menu_id']) ? $_SESSION['menu_id'] : $_REQUEST['menu_id']; $heading = $general->getPageHeading($menu_id); $query = "SELECT * FROM admins where id=" . $_REQUEST['id']; if (!$dbBean->Query($query)) { $dbBean->Kill(); } $result = $dbBean->RowArray(); ?> <!DOCTYPE html> <!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]--> <!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]--> <!--[if !IE]><!--> <html lang="en"> <!--<![endif]--> <!-- BEGIN HEAD --> <head> <?php include '../common.php'; ?> <!-- BEGIN PAGE LEVEL STYLES --> <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_URL; ?> /assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css"/> <!-- END PAGE LEVEL STYLES -->
<?php include_once 'config.php'; include_once '../checkAdminPagePermissions.php'; $dbBean = new DatabaseBean(); $general = new General($dbBean); $menu_id = empty($_REQUEST['menu_id']) ? $_SESSION['menu_id'] : $_REQUEST['menu_id']; $heading = $general->getPageHeading($menu_id); $query = "SELECT * FROM menu where id=" . $_REQUEST['id']; if (!$dbBean->Query($query)) { $dbBean->Kill(); } $rows = $dbBean->RowArray(); ?> <!DOCTYPE html> <!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]--> <!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]--> <!--[if !IE]><!--> <html lang="en"> <!--<![endif]--> <!-- BEGIN HEAD --> <head> <?php include '../common.php'; ?> <!-- BEGIN PAGE LEVEL STYLES --> <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_URL; ?> /assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css"/>
<?php include 'config.php'; $dbBean = new DatabaseBean(); $general = new General($dbBean); $Customer = new Customer($dbBean); if ($_REQUEST['FLAG'] == 'ADD_CUSTOMER') { if (trim($_REQUEST['name']) == "") { $_SESSION['msg'] = 'Please enter name.'; $num = 'danger'; $url = ADMIN_URL . "/customers/add.php"; $general->redirectUrl($url, $num); exit; } if (trim($_REQUEST['emailid']) == "") { $_SESSION['msg'] = 'Please enter email.'; $num = 'danger'; $url = ADMIN_URL . "/customers/add.php"; $general->redirectUrl($url, $num); exit; } else { if (!filter_var(trim($_REQUEST['emailid']), FILTER_VALIDATE_EMAIL)) { $_SESSION['msg'] = 'Please enter valid email.'; $num = 'danger'; $url = ADMIN_URL . "/customers/add.php"; $general->redirectUrl($url, $num); exit; } else { $rowdata = $Customer->getCustomerByEmail($_REQUEST['emailid'], $id = ''); if ($rowdata > 0) { $_SESSION['msg'] = 'Email address already exist.';
<?php require_once "config.php"; require_once "functions.inc.php"; $dbBean = new DatabaseBean(); $general = new General($dbBean); $name = isset($_POST['user']) ? $_POST['user'] : ""; $password = isset($_POST['pw']) ? $_POST['pw'] : ""; $name = stripQuotes(removeBadChars($name)); $password = stripQuotes(removeBadChars($password)); $sql = "SELECT count(*) as ct FROM action_recorder WHERE user_name = '" . $name . "' AND success=0 AND DATE_SUB(NOW(), INTERVAL 15 MINUTE) <= date_added"; if (!$dbBean->Query($sql)) { $dbBean->Kill(); } $row = $dbBean->RowArray(); $failattempts = $row['ct']; if ($failattempts > 5) { $_SESSION['msg'] = 'The maximum number of login attempts has been reached. Please try again in 15 minutes.'; $num = 'danger'; $url = ADMIN_URL . "/login.php"; $general->redirectUrl($url, $num); exit; } $sql = "SELECT * FROM admins WHERE username = '******' AND binary password='******' ;"; if (!$dbBean->Query($sql)) { $dbBean->Kill(); } $row = $dbBean->RowArray(); if ($row) { $_SESSION['adm_logged'] = true; $_SESSION['adm_user_id'] = $row['id'];
<?php include 'config.php'; $dbBean = new DatabaseBean(); $general = new General($dbBean); include '../generalFunctions.php'; if ($_REQUEST['FLAG'] == 'CHPWD') { $cond = array("id" => $_REQUEST['id']); $fieldvalues = array('password' => md5($_REQUEST['password'])); $updated = $dbBean->UpdateRows("admins", $fieldvalues, $cond); if ($updated) { $general->addLogAction($_SESSION['adm_user_id'], 'Changed', $_REQUEST['id'], 'Admin Password', $_SESSION['adm_status']); $error = 'success'; $_SESSION['msg'] = 'Password successfully changed.'; } else { $error = 'danger'; $_SESSION['msg'] = 'Error changing password.'; } $url = ADMIN_URL . "/admins/index.php"; $general->redirectUrl($url, $error); exit; } /***************************************************************************/ if ($_REQUEST['FLAG'] == 'EDIT') { $cond = array("id" => $_REQUEST['id']); $fieldvalues = array('username' => $_REQUEST['txtuser'], 'last_name' => $_REQUEST['txtlname'], 'first_name' => $_REQUEST['txtfname'], 'email' => $_REQUEST['txtemail'], 'status' => $_REQUEST['status']); $updated = $dbBean->UpdateRows("admins", $fieldvalues, $cond); if ($updated) { $general->addLogAction($_SESSION['adm_user_id'], 'Edited', $_REQUEST['id'], 'Admin Management', $_SESSION['adm_status']); $error = 'success'; $_SESSION['msg'] = 'Record updated successfully.';
<?php include_once 'config.php'; include_once '../checkAdminPagePermissions.php'; $dbBean = new DatabaseBean(); $general = new General($dbBean); $menu_id = empty($_REQUEST['menu_id']) ? $_SESSION['menu_id'] : $_REQUEST['menu_id']; $heading = $general->getPageHeading($menu_id); ?> <!DOCTYPE html> <!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]--> <!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]--> <!--[if !IE]><!--> <html lang="en"> <!--<![endif]--> <!-- BEGIN HEAD --> <head> <?php include '../common.php'; ?> <!-- BEGIN PAGE LEVEL STYLES --> <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_URL; ?> /assets/global/plugins/select2/select2.css"/> <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_URL; ?> /assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css"/> <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_URL;
<?php $dbBean = new DatabaseBean(); $sqlmgrp = "SELECT * FROM menu WHERE is_menu_group = 1 AND is_hidden = 0 and is_dashboard_icon=1 ORDER BY order_index, name ASC"; $menurowArray = $dbBean->QueryArray($sqlmgrp); if (!$menurowArray) { $dbBean->Kill(); } ?> <!-- BEGIN SIDEBAR --> <div class="page-sidebar-wrapper"> <!-- DOC: Set data-auto-scroll="false" to disable the sidebar from auto scrolling/focusing --> <!-- DOC: Change data-auto-speed="200" to adjust the sub menu slide up/down speed --> <div class="page-sidebar navbar-collapse collapse"> <!-- BEGIN SIDEBAR MENU --> <!-- DOC: Apply "page-sidebar-menu-light" class right after "page-sidebar-menu" to enable light sidebar menu style(without borders) --> <!-- DOC: Apply "page-sidebar-menu-hover-submenu" class right after "page-sidebar-menu" to enable hoverable(hover vs accordion) sub menu mode --> <!-- DOC: Apply "page-sidebar-menu-closed" class right after "page-sidebar-menu" to collapse("page-sidebar-closed" class must be applied to the body element) the sidebar sub menu mode --> <!-- DOC: Set data-auto-scroll="false" to disable the sidebar from auto scrolling/focusing --> <!-- DOC: Set data-keep-expand="true" to keep the submenues expanded --> <!-- DOC: Set data-auto-speed="200" to adjust the sub menu slide up/down speed --> <ul class="page-sidebar-menu page-sidebar-menu-hover-submenu" data-keep-expanded="false" data-auto-scroll="true" data-slide-speed="200"> <!-- DOC: To remove the sidebar toggler from the sidebar you just need to completely remove the below "sidebar-toggler-wrapper" LI element --> <li class="sidebar-toggler-wrapper"> <!-- BEGIN SIDEBAR TOGGLER BUTTON --> <div class="sidebar-toggler"> </div> <!-- END SIDEBAR TOGGLER BUTTON --> </li> <li <?php echo basename($_SERVER['PHP_SELF']) == "index.php" && basename(dirname($_SERVER['PHP_SELF']), "/") == "backend" ? "class='start active open'" : '';