mirror of
https://github.com/Clortox/SimpleFileRepository.git
synced 2025-01-09 10:28:00 +00:00
Add javascript for hidden folders
This commit is contained in:
parent
50422e28bb
commit
85cf6e309f
29
index.php
29
index.php
@ -18,6 +18,20 @@
|
|||||||
<title><?php echo $site_name ?></title>
|
<title><?php echo $site_name ?></title>
|
||||||
<link rel="icon" href="<?php echo $site_image ?>">
|
<link rel="icon" href="<?php echo $site_image ?>">
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
<!-- add onclick function -->
|
||||||
|
function makeLink(){
|
||||||
|
var host = "<?php echo $_SERVER['HTTP_HOST'] ?>";
|
||||||
|
|
||||||
|
var folder = document.getElementById("folderName").value;
|
||||||
|
var password = document.getElementById("password").value;
|
||||||
|
|
||||||
|
var link = "/hiddenlisting.php?folder=" + folder +"&psk=" + password;
|
||||||
|
open(link);
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body style="background-color: black">
|
<body style="background-color: black">
|
||||||
<?php
|
<?php
|
||||||
@ -106,13 +120,20 @@
|
|||||||
cardtop;
|
cardtop;
|
||||||
|
|
||||||
if($useJavascript){
|
if($useJavascript){
|
||||||
echo '<p>The server admin has enabled javascript. Type the name and key and hit enter!</p>';
|
echo <<< javascriptbox
|
||||||
|
<p>The server admin has enabled javascript. Type the name and password and click Goto Folder!</p>
|
||||||
|
<div class="form-group">
|
||||||
|
<span>Folder Name: </span><input type="text" id="folderName">
|
||||||
|
<span>Password : </span><input type="text" id="password">
|
||||||
|
<button onclick="makeLink();">Goto Folder</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
javascriptbox;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
echo '<p>The server admin has disabled javascript. Please type the link in the URL and replace <name> with the directory name, and <password> with the password</p>';
|
echo '<p>The server admin has disabled javascript, therefore this is not dynamic. Please type the link in the URL and replace <name> with the directory name, and <password> with the password</p>';
|
||||||
echo '<p>The link to copy is:</p>';
|
echo '<p>The link to copy is:</p>';
|
||||||
echo $_SERVER['HTTP_HOST'];
|
echo $_SERVER['HTTP_HOST'] . "/hiddenlisting.php?folder=<name>&psk=<password>";
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user