Compare commits
No commits in common. "ecad8d90d695dff07c708952f58d7a7f316f1e6f" and "4e582d96e1183949aadc1264c3a20733c699136a" have entirely different histories.
ecad8d90d6
...
4e582d96e1
14
header.php
14
header.php
|
|
@ -17,38 +17,38 @@ if ( php_sapi_name() != "cli" ) {
|
|||
// This session variable is TRUE when successfully logged in
|
||||
// If set to true, and using default authentication, no login will be required
|
||||
if ( !isset($_SESSION['validated']) ) {
|
||||
$_SESSION['validated'] = false;
|
||||
$_SESSION['validated'] = false;
|
||||
}
|
||||
|
||||
// This session variable is set to the current browsing folder.
|
||||
// It is relative to the COMICSDIR constant defined in variables.php
|
||||
if ( !isset($_SESSION['compath']) ) {
|
||||
$_SESSION['compath'] = '/';
|
||||
$_SESSION['compath'] = '/';
|
||||
}
|
||||
if ( $_SESSION['compath'] == "" ) $_SESSION['compath'] = "/";
|
||||
|
||||
// This session variable is set to the current comic in Base64
|
||||
if ( !isset($_SESSION['comfile']) ) {
|
||||
$_SESSION['comfile'] = "";
|
||||
$_SESSION['comfile'] = "";
|
||||
}
|
||||
|
||||
// Initialize the hash session variable used for SSO
|
||||
// Set the hash to the passed in value if it exists
|
||||
if ( !isset($_SESSION['hash']) ) {
|
||||
$_SESSION['hash'] = "";
|
||||
$_SESSION['hash'] = "";
|
||||
}
|
||||
if ( isset($_REQUEST['hash']) ) {
|
||||
$_SESSION['hash'] = $_REQUEST['hash'];
|
||||
$_SESSION['hash'] = $_REQUEST['hash'];
|
||||
}
|
||||
|
||||
// Sorting for folders.
|
||||
// Valid values (from constants): SORTBYNAME, SORTBYDATE
|
||||
if ( !isset($_SESSION['sortorder']) ) {
|
||||
$_SESSION['sortorder'] = SORTBYDATE;
|
||||
$_SESSION['sortorder'] = SORTBYDATE;
|
||||
}
|
||||
}
|
||||
|
||||
// Make our PDO database connection which will be used in all scripts
|
||||
$globaldbh = new PDO("mysql:host=" . DBHOST . ";dbname=" . DBNAME, DBUSER, DBPASS);
|
||||
|
||||
// vim: sw=4 ts=4 et ai mouse-=a:
|
||||
?>
|
||||
|
|
|
|||
32
js/comics.js
32
js/comics.js
|
|
@ -38,10 +38,6 @@ function getSortOrder(refresh = true) {
|
|||
$("#sortorder").html(data.order);
|
||||
if ( refresh ) getFolderContents();
|
||||
}
|
||||
},
|
||||
error : function(xhr, stat, err) {
|
||||
console.log(xhr.status);
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -63,10 +59,6 @@ function cycleSortOrder() {
|
|||
$("#sortorder").html(data.order);
|
||||
getFolderContents();
|
||||
}
|
||||
},
|
||||
error : function(xhr, stat, err) {
|
||||
console.log(xhr.status);
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -105,11 +97,7 @@ function getFolderContents() {
|
|||
$(".folder").click(function() { changeFolder($(this).data("name"), $(this).data("path")); });
|
||||
$(".issue").click(function() { $(this).parent().addClass("readborder"); showComic($(this).data("relcomic"), $(this).data("comname")); });
|
||||
toastr.remove();
|
||||
},
|
||||
error : function(xhr, stat, err) {
|
||||
console.log(xhr.status);
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -153,11 +141,7 @@ function changeFolder(name, path) {
|
|||
foldername = data.foldername;
|
||||
toastr.remove();
|
||||
getFolderContents();
|
||||
},
|
||||
error : function(xhr, stat, err) {
|
||||
console.log(xhr.status);
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -182,11 +166,7 @@ function updateCurrentPage() {
|
|||
return;
|
||||
}
|
||||
console.log(data.message);
|
||||
},
|
||||
error : function(xhr, stat, err) {
|
||||
console.log(xhr.status);
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -216,11 +196,7 @@ function showComic(comic, name) {
|
|||
startAt: data.startindex,
|
||||
beforeSetContent: updateCurrentPage
|
||||
});
|
||||
},
|
||||
error : function(xhr, stat, err) {
|
||||
console.log(xhr.status);
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user