Refactored the website

Renamed "includes" to "templates"
Added .htaccess to redirect requests to index.php
Added function to split request URL into array
Corrected locations in scripts and pages
This commit is contained in:
Bryan Pedini committed 2019-02-07 12:36:44 +01:00
1 parent 9210890eda
commit 7acb2ca533
8 files changed
+173 -138

No files matched your search

+2 -2
View File
@@ -1,7 +1,7 @@
function urlinsert() {
var url = document.getElementById ( "form-url" ).value;
var xhr = new XMLHttpRequest ( );
xhr.open ( "POST", 'index.php', true );
xhr.open ( "POST", 'insert', true );
xhr.onreadystatechange = function ( ) {
if ( xhr.readyState == XMLHttpRequest.DONE && xhr.status == 200 ) {
if (xhr.status == 200) {
@@ -28,5 +28,5 @@ function urlinsert() {
xhr.send( data );
}
function logout ( ) {
window.location.href = script_name+"?logout";
window.location.href = script_name+"/logout";
}
+1 -1
View File
@@ -3,7 +3,7 @@ function login() {
var password = document.getElementById ( "form-password" ).value;
password = SHA512 ( password );
var xhr = new XMLHttpRequest ( );
xhr.open ( "POST", 'index.php', true );
xhr.open ( "POST", 'login', true );
xhr.onreadystatechange = function ( ) {
if ( xhr.readyState == XMLHttpRequest.DONE && xhr.status == 200 ) {
if (xhr.status == 200) {