test
This commit is contained in:
parent
05517b9144
commit
0013a2e283
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
$target_dir = "uploads/";
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] == "POST" && isset($_POST["submit"])) {
|
||||
$target_dir = "uploads/";
|
||||
$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
|
||||
$uploadOk = 1;
|
||||
|
||||
@ -23,7 +23,8 @@ if ($_SERVER['REQUEST_METHOD'] == "POST" && isset($_POST["submit"])) {
|
||||
// if everything is ok, try to upload file
|
||||
} else {
|
||||
if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) {
|
||||
$out = "The file " . htmlspecialchars(basename($_FILES["fileToUpload"]["name"])) . " has been uploaded.";
|
||||
echo "The file " . htmlspecialchars(basename($_FILES["fileToUpload"]["name"])) . " has been uploaded.";
|
||||
header("Location: https://slovania.adlerka.top/index.php?dano");
|
||||
} else {
|
||||
echo "Sorry, there was an error uploading your file.";
|
||||
}
|
||||
@ -60,7 +61,7 @@ if ($_SERVER['REQUEST_METHOD'] == "POST" && isset($_POST["submit"])) {
|
||||
$out = str_replace('__TEMPLATE_STRANKA__', $stranka_obsah, $out);
|
||||
|
||||
$cesta_k_skriptu = "scripty/$nazov_stranky.js";
|
||||
$script_obsah = "<script src=\"$cesta_k_skriptu\"></script>";
|
||||
$script_obsah = "<script defer src=\"$cesta_k_skriptu\"></script>";
|
||||
if (!file_exists($cesta_k_skriptu)) {
|
||||
$script_obsah = '';
|
||||
}
|
||||
|
@ -1,5 +1,3 @@
|
||||
document.onload = function () {
|
||||
const response = fetch("/index.php?listfiles=1");
|
||||
const tabulka = document.getElementById("tabulka");
|
||||
tabulka.innerHTML = response.text;
|
||||
}
|
||||
const response = fetch("/index.php?listfiles=1");
|
||||
const tabulka = document.getElementById("tabulka");
|
||||
tabulka.innerHTML = response.text;
|
Loading…
Reference in New Issue
Block a user