case "updatepassword": $message["update"] = updatePassword($conn, $userID, $_POST["password"], $_POST["newpassword"], $passwordSalt); break; case "wordlist": $filter = "%"; if (isset($_POST["filter"])) { $filter = $_POST["filter"]; } $message["wordcount"] = getWordsCount($conn, $_POST["lists"], $userID, $filter); $message["words"] = getWordsList($conn, $userID, $_POST["lists"], $_POST["first"], $_POST["last"], $filter); break; case "wordcount": $message["wordcount"] = getWordsCount($conn, $_GET["list"], $userID); break; case "logout": $message["logout"] = logUserOut($conn, $_GET["token"]); // remove all session variables session_unset(); // destroy the session session_destroy(); case "practicelist": $lists = array(-1); if (isset($_POST["lists"])) { $lists = $_POST["lists"]; if (!is_array($lists)) { $lists = array($lists); } } if (isset($_GET["count"])) { $message["list"] = getPracticeList($conn, $userID, $lists, $_GET["count"]); } else {
// // // // // Start the session session_start(); // Get the installation directory include '../installation-configs/ins-directory.php'; // Make sure the installation directory is loaded. if (!isset($INS_DIR)) { die('We could not load the installation directory.'); } // Load the API include $_SERVER['DOCUMENT_ROOT'] . $INS_DIR . 'load.php'; if (isset($_GET['action']) && $_GET['action'] == 'logout') { logUserOut(); } ?> <!DOCTYPE html> <html> <head> <title>myPersonalWebsite</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"> <link rel="stylesheet" type="text/css" href="./theme-assets/CSS/admin.css"/> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script type="text/javascript" src="./theme-assets/JS/admin.js"></script> </head> <body> <?php include $_SERVER['DOCUMENT_ROOT'] . $INS_DIR . 'admin/theme-assets/admin-header.php';