diff --git a/index.php b/index.php
index 67e2444..6c7d596 100644
--- a/index.php
+++ b/index.php
@@ -14,40 +14,16 @@
-
Загрузки: 📥
-
- Авторизован';
- } else {
- echo '
- ';
- }
- ?>
-
+
Файлы: 📥
+
+
+
\n";
}
}
- echo "
🗑";
+ echo "
🗑";
echo "\n";
}
}
diff --git a/login.php b/login.php
deleted file mode 100644
index d2cb6b2..0000000
--- a/login.php
+++ /dev/null
@@ -1,10 +0,0 @@
-
\ No newline at end of file
diff --git a/main.js b/main.js
index 6cd0ffd..7accf0f 100644
--- a/main.js
+++ b/main.js
@@ -4,7 +4,7 @@ $(document).on('click', 'div.dropdown-menu', function (e) {
const buttons = document.querySelectorAll('.delete-button')
buttons.forEach((button) => {
- button.addEventListener("click", async function(event) {
+ button.addEventListener("click", async function (event) {
const response = await fetch("delete.php", {
method: 'POST',
headers: {
@@ -14,4 +14,12 @@ buttons.forEach((button) => {
body: `file=${event.target.dataset.file}`
});
})
+});
+
+const fileInput = document.getElementById('upload');
+fileInput.addEventListener('change', async function (event) {
+ const file = event.target.files[0];
+ let formData = new FormData();
+ formData.append("file", file);
+ fetch('upload.php', { method: "POST", body: formData });
});
\ No newline at end of file
diff --git a/sendpass.php b/sendpass.php
deleted file mode 100644
index bd5ef6f..0000000
--- a/sendpass.php
+++ /dev/null
@@ -1,13 +0,0 @@
- 'no-reply@radner.ru',
- 'X-Mailer' => 'PHP/' . phpversion()
- );
-
- mail($to, $subject, $message, $headers);
-
- header('Location: index.php');
-?>
\ No newline at end of file
diff --git a/upload.php b/upload.php
new file mode 100644
index 0000000..a18a26e
--- /dev/null
+++ b/upload.php
@@ -0,0 +1,20 @@
+
\ No newline at end of file