- initial steps on frame location separation
This commit is contained in:
parent
6a07654267
commit
be7513be2f
@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
//require_once "frames_common.php";
|
||||
|
||||
require_once "globals.php";
|
||||
require_once "autologin.php";
|
||||
|
||||
|
5
frames/frames_common.php
Normal file
5
frames/frames_common.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?php
|
||||
// Add root dir to the include path and also switch working directory
|
||||
const ROOT_DIR = __DIR__ . DIRECTORY_SEPARATOR . "..";
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . ROOT_DIR);
|
||||
chdir(ROOT_DIR);
|
31
js/main.js
31
js/main.js
@ -7,37 +7,6 @@ function logout() {
|
||||
});
|
||||
}
|
||||
|
||||
function change_password() {
|
||||
let oldpassF = document.getElementById("old_password");
|
||||
let newpass1F = document.getElementById("new_password_1");
|
||||
let newpass2F = document.getElementById("new_password_2");
|
||||
|
||||
let oldpass = oldpassF.value;
|
||||
let newpass1 = newpass1F.value;
|
||||
let newpass2 = newpass2F.value;
|
||||
|
||||
if (newpass1 !== newpass2) {
|
||||
alert("Az új jelszavak nem egyeznek!");
|
||||
} else {
|
||||
let req = {
|
||||
action: "change_password",
|
||||
oldpass: oldpass,
|
||||
newpass: newpass1
|
||||
}
|
||||
request(req).then(resp => {
|
||||
if (resp === "OK") {
|
||||
alert("Sikeres jelszóváltoztatás!");
|
||||
hide("change_password_window");
|
||||
oldpassF.value = "";
|
||||
newpass1F.value = "";
|
||||
newpass2F.value = "";
|
||||
} else {
|
||||
alert("Sikertelen jelszóváltoztatás!");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function change_password() {
|
||||
let oldpassF = document.getElementById("old_password");
|
||||
let newpass1F = document.getElementById("new_password_1");
|
||||
|
@ -17,8 +17,10 @@ function login() {
|
||||
});
|
||||
}
|
||||
|
||||
function open_in_content_frame(url) {
|
||||
document.getElementById("content_frame").src = url;
|
||||
const FRAME_RELATIVE_LOCATION = "";
|
||||
|
||||
function open_in_content_frame(url, isFrame = true) {
|
||||
document.getElementById("content_frame").src = (isFrame ? FRAME_RELATIVE_LOCATION : "") + url;
|
||||
}
|
||||
|
||||
var USERDATA = {};
|
||||
|
Loading…
x
Reference in New Issue
Block a user