?> <div id="site_content"> <?php if (isset($_COOKIE['app_session_id']) && $_COOKIE["app_session_id"] != "") { include "sidebar_menu.inc"; } else { include "common_sidebar.php"; } $user_id = 0; $user_name = ""; if (isset($_COOKIE['app_session_id']) && $_COOKIE['app_session_id'] != '') { include_once "/var/www/includes/session.php"; $s = new user_session(); if ($s->decode_session($_COOKIE['app_session_id'])) { $user_name = $s->get_uname(); $user_id = $s->get_uid(); } } include_once "/var/www/includes/game.php"; ?> <div class="content"> <h3><font color="red">Scoreboard has been modified to remove discrepancies due to flag sharing</font></h3> <?php if ($user_id != 0) { $my_g = new game(); $my_result = $my_g->get_my_scoreboard($user_id); if (count($my_result) != 0) { ?> <table width="80%">
if ($old_pwd === "" || $new_pwd === '' || $con_pwd === '') { $msg = "None of the field should be empty"; } else { if ($new_pwd != $con_pwd) { $msg = "New and confirm password are mismatch"; } elseif (isset($_COOKIE['app_session_id']) && $_COOKIE['app_session_id'] != '') { try { include_once "/var/www/includes/user.php"; include_once "/var/www/includes/session.php"; include_once "/var/www/includes/crypt.php"; $cr = new crypto(); $password = $cr->one_way_crypt($new_pwd); $old_pwd = $cr->one_way_crypt($old_pwd); $cookie_token = $_COOKIE['app_session_id']; $s = new user_session(); if ($s->decode_session($cookie_token)) { $u = new user(); if (!$u->update_password($s->get_uid(), $old_pwd, $password)) { throw new Exception("Password Mismacth: Try Again"); } $msg = "Password Updated Successfully"; } else { $msg = "Session Expired"; } } catch (Exception $e) { $msg = $e->getMesage(); } } else { $msg = "Session Expired"; } }