HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-31-18-78 6.17.0-1017-aws #17~24.04.1-Ubuntu SMP Tue May 26 21:09:53 UTC 2026 aarch64
User: ubuntu (1000)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /var/www/content-sp/work-sp/header.php
<?php session_start(); ?>
<!DOCTYPE html>
<html>

<head>

    <!-- Title -->
    <title>Editors Admin | GEPL</title>

    <meta content="width=device-width, initial-scale=1" name="viewport" />
    <meta charset="UTF-8">
    <meta name="description" content="Admin Dashboard" />
    <meta name="keywords" content="admin,dashboard" />
    <meta name="author" content="GEPL" />
    <META NAME="robots" CONTENT="noindex,nofollow">
    <link rel="icon" href="assets/images/favicon.png" type="image/x-icon">
    <!-- Styles -->
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,600' rel='stylesheet' type='text/css'>
    <link href="assets/plugins/pace-master/themes/blue/pace-theme-flash.css" rel="stylesheet" />
    <link href="assets/plugins/uniform/css/uniform.default.min.css" rel="stylesheet" />
    <link href="assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="assets/plugins/fontawesome/css/font-awesome.css" rel="stylesheet" type="text/css" />
    <link href="assets/plugins/line-icons/simple-line-icons.css" rel="stylesheet" type="text/css" />
    <link href="assets/plugins/offcanvasmenueffects/css/menu_cornerbox.css" rel="stylesheet" type="text/css" />
    <link href="assets/plugins/waves/waves.min.css" rel="stylesheet" type="text/css" />
    <link href="assets/plugins/switchery/switchery.min.css" rel="stylesheet" type="text/css" />
    <link href="assets/plugins/3d-bold-navigation/css/style.css" rel="stylesheet" type="text/css" />
    <link href="assets/plugins/slidepushmenus/css/component.css" rel="stylesheet" type="text/css" />
    <link href="assets/plugins/nestable/nestable.css" rel="stylesheet" type="text/css" />
    <link href="assets/plugins/weather-icons-master/css/weather-icons.min.css" rel="stylesheet" type="text/css" />
    <link href="assets/plugins/metrojs/MetroJs.min.css" rel="stylesheet" type="text/css" />
    <link href="assets/plugins/toastr/toastr.min.css" rel="stylesheet" type="text/css" />

    <!-- Theme Styles -->
    <link href="assets/css/modern.css" rel="stylesheet" type="text/css" />
    <link href="assets/css/themes/white.css" class="theme-color" rel="stylesheet" type="text/css" />
    <link href="assets/css/custom.css" rel="stylesheet" type="text/css" />

    <script src="assets/plugins/3d-bold-navigation/js/modernizr.js"></script>
    <script src="assets/plugins/offcanvasmenueffects/js/snap.svg-min.js"></script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
        <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
        <![endif]-->
    <script src="assets/plugins/jquery/jquery-2.1.3.min.js"></script>
    <style>
        .checkbox input[type="checkbox"], .checkbox-inline input[type="checkbox"], .radio input[type="radio"], .radio-inline input[type="radio"] {
            margin-left: -8px !important;
        }
        div.radio span {
            transform: scale(1.5) !important;
        }
        div.radio {
            margin-right: 10px !important;
        }
    </style>
</head>

<?php
include_once('config.php');
include_once('functions.php');

if (empty($_SESSION['editor'])) {
    $pageArray = array();
    header('Location:' . '/work-sp/login');
} else {
    $editorArray = json_decode($_SESSION['editor']);
    $editor_name = $editorArray->e_name;
    $editor_id = $editorArray->eId;
    $editor_role = $editorArray->e_role;

    $pageLink = $_SERVER['PHP_SELF'];
    $link_array = explode('/', $pageLink);
    $pageName = end($link_array);

    if (isset($_POST['pssSub'])) {
        $old_password = $_REQUEST['oldP'];
        $new_password = $_REQUEST['newP'];
        $confirm_password = $_REQUEST['confP'];
        if ($editor_id != '' && $editor_id != '0') {
            if ($new_password == $confirm_password) {

                $checkOld = $conn->query("SELECT editor_password from csp_editors where editor_id='$editor_id'");
                $fold = $checkOld->fetch_assoc();
                $oldEpwd = $fold['editor_password'];

                if (md5($old_password) == $oldEpwd) {
                    $c_newpwd = md5($new_password);
                    $h_updatePwd = "UPDATE csp_editors set editor_password='$c_newpwd' where editor_id='$editor_id'";
                    if ($conn->query($h_updatePwd)) {
                        unset($_SESSION['editor']);
                        session_destroy();

?>
                        <script>
                            alert("Password changed successfully Login again");
                            window.location.href = "/work-sp/login";
                        </script>
                    <?php
                    } else {
                    ?>
                        <script>
                            alert("Enter correct old password");
                        </script>
                    <?php
                    }
                } else {
                    ?>
                    <script>
                        alert("Enter correct old password");
                    </script>
                <?php
                }
            } else {
                ?>
                <script>
                    alert("Please enter new password and confirm password same");
                </script>
            <?php
            }
        } else {
            ?>
            <script>
                alert("something went wrong");
            </script>
    <?php
        }
    }

    ?>
    <style>
        #toast-container {
            display: none;
        }
    </style>

    <body class="page-header-fixed">
        <div class="overlay"></div>
        <nav class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-right" id="cbp-spmenu-s1">
            <h3><span class="pull-left">Enquiry</span><a href="javascript:void(0);" class="pull-right" id="closeRight"><i class="fa fa-times"></i></a></h3>

            <div class="slimscroll">
                coming soon...
            </div>
        </nav>


        <nav class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-right" id="cbp-spmenu-s2">
            <h3><span class="pull-left"></span> <a href="javascript:void(0);" class="pull-right" id="closeRight2"><i class="fa fa-angle-right"></i></a></h3>
            <div class="chat-write">
                <form class="form-horizontal" action="" method="post">
                    <input type="text" name="oldP" class="form-control passInp" placeholder="Enter old password" required>
                    <input type="text" name="newP" class="form-control passInp" placeholder="Enter new password" required>
                    <input type="text" name="confP" class="form-control passInp" placeholder="Enter new password again" required>
                    <input type="submit" name="pssSub" value="Change" class="form-control passBtn" />
                </form>
            </div>
        </nav>
        <style>
            .passInp {
                margin-bottom: 10px;
            }

            .passBtn {
                background: #009688;
                color: #fff;
                font-weight: bold;
            }

            .chat-write {
                position: relative;
            }
        </style>
        <main class="page-content content-wrap">

            <?php include_once('topheader.php'); ?>

            <?php include_once('sidebar.php'); ?>

        <?php } ?>