Added Iframe detection and themeing.
This commit is contained in:
parent
e9cc87c021
commit
4c17be62b3
23
index.html
23
index.html
@ -25,9 +25,9 @@
|
|||||||
<button type="button" title="Other Options" onclick="tgglElmView('popOutControls')">⚙</button>
|
<button type="button" title="Other Options" onclick="tgglElmView('popOutControls')">⚙</button>
|
||||||
<button type="button" title="Refresh" onclick="getDir('./')">↻</button>
|
<button type="button" title="Refresh" onclick="getDir('./')">↻</button>
|
||||||
<button type="button" title="Back" onclick="getDir('../')">⇐</button>
|
<button type="button" title="Back" onclick="getDir('../')">⇐</button>
|
||||||
<input type="text" title="Search" placeholder="Search..." id="searchField" onkeyup="searchPage(this)" value="">
|
<input type="text" placeholder="Search..." onkeyup="searchPage(this)" name="" value="">
|
||||||
<button type="button" title="Clears Search Field" onclick="clearSearch()" >Clear Search</button>
|
<button type="button" onclick="clearSearch()" title="Clears search..." >Clear Search</button>
|
||||||
<button type="button" title="Faves List Toggle" onclick="getFavesList(); tgglElmView('favesList')">Faves List ↕</button>
|
<button onclick="getFavesList(); tgglElmView('favesList')">Faves List ↕</button>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<h2 id="fullPathHeader">
|
<h2 id="fullPathHeader">
|
||||||
@ -66,6 +66,23 @@
|
|||||||
<div id="serverMsgView" style="display:none;">
|
<div id="serverMsgView" style="display:none;">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
if (window.self !== window.top) {
|
||||||
|
setTimeout(function () {
|
||||||
|
let elm = document.getElementById("bg");
|
||||||
|
elm.parentElement.removeChild(elm);
|
||||||
|
|
||||||
|
// Stylesheet for iframe views
|
||||||
|
var link = document.createElement("link");
|
||||||
|
link.href = "resources/css/iframe.css";
|
||||||
|
link.type = "text/css";
|
||||||
|
link.rel = "stylesheet";
|
||||||
|
document.getElementsByTagName("head")[0].appendChild(link);
|
||||||
|
}, 1500);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<script type="text/javascript" src="resources/js/favorites.js" charset="utf-8"></script>
|
<script type="text/javascript" src="resources/js/favorites.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript" src="resources/js/passwordFieldInsert.js" charset="utf-8"></script>
|
<script type="text/javascript" src="resources/js/passwordFieldInsert.js" charset="utf-8"></script>
|
||||||
<script type="text/javascript" src="resources/js/cookieHandler.js" charset="utf-8"></script>
|
<script type="text/javascript" src="resources/js/cookieHandler.js" charset="utf-8"></script>
|
||||||
|
4
resources/css/iframe.css
Normal file
4
resources/css/iframe.css
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#controls, #fullPathHeader, #dynDiv,
|
||||||
|
.errorStyling, .dirStyle, .movieStyle, .fileStyle {
|
||||||
|
background-color: rgba(0,0,0,0.2);
|
||||||
|
}
|
@ -119,4 +119,9 @@ const downloadItem = () => {
|
|||||||
|
|
||||||
const clearDlList = () => { document.getElementById("CLEARBTTN").click(); }
|
const clearDlList = () => { document.getElementById("CLEARBTTN").click(); }
|
||||||
const onloadSetBG = () => { updateBG("resources/images/backgrounds/000.jpg"); }
|
const onloadSetBG = () => { updateBG("resources/images/backgrounds/000.jpg"); }
|
||||||
const updateBG = (bgImg) => { document.getElementById("bg").src = bgImg; }
|
|
||||||
|
const updateBG = (bgImg) => {
|
||||||
|
try {
|
||||||
|
document.getElementById("bg").src = bgImg;
|
||||||
|
} catch (e) { }
|
||||||
|
}
|
||||||
|
10
resources/php/connection.php
Normal file
10
resources/php/connection.php
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
include_once 'serverMessenger.php';
|
||||||
|
|
||||||
|
chdir("../../");
|
||||||
|
$db = new SQLite3('resources/db/webfm.db');
|
||||||
|
if($db === false){
|
||||||
|
$message = "Server: [Error] --> Database connection failed!";
|
||||||
|
serverMessage("error", $message);
|
||||||
|
}
|
||||||
|
?>
|
@ -1,15 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
include_once 'serverMessanger.php';
|
include_once 'connection.php';
|
||||||
|
include_once 'serverMessenger.php';
|
||||||
|
|
||||||
function getTabLinks() {
|
function getTabLinks() {
|
||||||
$db = new SQLite3('resources/db/webfm.db');
|
GLOBAL $db;
|
||||||
|
|
||||||
if($db === false){
|
|
||||||
$message = "Server: [Error] --> Database connection failed!";
|
|
||||||
serverMessage("error", $message);
|
|
||||||
die("ERROR: Could not connect to db.");
|
|
||||||
}
|
|
||||||
|
|
||||||
$res = $db->query('Select * FROM faves');
|
$res = $db->query('Select * FROM faves');
|
||||||
$GeneratedXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><FAVES_LIST>";
|
$GeneratedXML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><FAVES_LIST>";
|
||||||
while ($row = $res->fetchArray(SQLITE3_ASSOC)) {
|
while ($row = $res->fetchArray(SQLITE3_ASSOC)) {
|
||||||
@ -20,15 +14,9 @@ function getTabLinks() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function manageLink($ACTION, $PATH) {
|
function manageLink($ACTION, $PATH) {
|
||||||
$db = new SQLite3('resources/db/webfm.db');
|
GLOBAL $db;
|
||||||
$ACTION_TYPE = "";
|
$ACTION_TYPE = "";
|
||||||
|
|
||||||
if($db === false){
|
|
||||||
$message = "Server: [Error] --> Database connection failed!";
|
|
||||||
serverMessage("error", $message);
|
|
||||||
die("ERROR: Could not connect to db.");
|
|
||||||
}
|
|
||||||
|
|
||||||
// If action isn't true then we add else we delete or exit.
|
// If action isn't true then we add else we delete or exit.
|
||||||
if ($ACTION == "false") {
|
if ($ACTION == "false") {
|
||||||
$stmt = $db->prepare('INSERT INTO faves VALUES(:link)');
|
$stmt = $db->prepare('INSERT INTO faves VALUES(:link)');
|
||||||
@ -44,6 +32,7 @@ function manageLink($ACTION, $PATH) {
|
|||||||
|
|
||||||
$stmt->bindValue(":link", $PATH, SQLITE3_TEXT);
|
$stmt->bindValue(":link", $PATH, SQLITE3_TEXT);
|
||||||
$stmt->execute();
|
$stmt->execute();
|
||||||
|
$stmt->close();
|
||||||
|
|
||||||
$message = "Server: [Success] --> Fave link: " .
|
$message = "Server: [Success] --> Fave link: " .
|
||||||
$PATH . " " . $ACTION_TYPE . " the database!";
|
$PATH . " " . $ACTION_TYPE . " the database!";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
include_once 'serverMessanger.php';
|
include_once 'serverMessenger.php';
|
||||||
|
|
||||||
// Create file or folder
|
// Create file or folder
|
||||||
function createItem($FILE, $TYPE) {
|
function createItem($FILE, $TYPE) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
include_once 'serverMessanger.php';
|
include_once 'serverMessenger.php';
|
||||||
|
|
||||||
// Start of retrieving dir data
|
// Start of retrieving dir data
|
||||||
function startListing($NEWPATH, $MERGESEASSONS, $PASSWD) {
|
function startListing($NEWPATH, $MERGESEASSONS, $PASSWD) {
|
||||||
|
Loading…
Reference in New Issue
Block a user