upload
This commit is contained in:
@@ -1,59 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
|
||||
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
|
||||
crossorigin="anonymous" referrerpolicy="no-referrer">
|
||||
<link rel="stylesheet" href="/global/global.css">
|
||||
<script src="/global/global.js"></script>
|
||||
<title>Slovanská mytológia</title>
|
||||
</head>
|
||||
<nav class="topnav container_menu" id="myTopnav">
|
||||
<a href="/David">Dávid</a>
|
||||
<a href="/Dano" class="active">Daniel</a>
|
||||
<a href="javascript:void(0);" class="icon" onclick="myFunction()">☰</a>
|
||||
</nav>
|
||||
<body>
|
||||
<table border="5px" align="right">
|
||||
<tr>
|
||||
<th>Názov súboru</th>
|
||||
<th>Download</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<a href="#"><td>SuperSubor</td></a>
|
||||
<td><img src="#" alt="image"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<a href="#"><td>SuperSubor</td></a>
|
||||
<td><img src="#" alt="image"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<a href="#"><td>SuperSubor</td></a>
|
||||
<td><img src="#" alt="image"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<a href="#"><td>SuperSubor</td></a>
|
||||
<td><img src="#" alt="image"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<a href="#"><td>SuperSubor</td></a>
|
||||
<td><img src="#" alt="image"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<a href="#"><td>SuperSubor</td></a>
|
||||
<td><img src="#" alt="image"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="tabulka"></table>
|
||||
|
||||
<form action="upload.php" method="post" enctype="multipart/form-data">
|
||||
Vyber si súbor na nahratie:
|
||||
<input type="file" name="fileToUpload" id="fileToUpload">
|
||||
<input type="submit" value="Nahrať súbor" name="submit">
|
||||
</form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
<form action="/upload.php" method="post" enctype="multipart/form-data">
|
||||
Vyber súbor na nahratie:
|
||||
<input type="file" name="fileToUpload" id="fileToUpload">
|
||||
<input type="submit" value="Nahrať súbor" name="submit">
|
||||
</form>
|
@@ -1,61 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
|
||||
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
|
||||
crossorigin="anonymous" referrerpolicy="no-referrer">
|
||||
<link rel="stylesheet" href="/global/global.css">
|
||||
<script src="/global/global.js"></script>
|
||||
<title>Slovanská mytológia</title>
|
||||
</head>
|
||||
<nav class="topnav container_menu" id="myTopnav">
|
||||
<a href="/David" class="active">Dávid</a>
|
||||
<a href="stranky/Dano.html">Daniel</a>
|
||||
<a href="javascript:void(0);" class="icon" onclick="myFunction()">☰</a>
|
||||
</nav>
|
||||
<body>
|
||||
<main>
|
||||
<table border="5px" align="right">
|
||||
<tr>
|
||||
<th>Názov súboru</th>
|
||||
<th>Download</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<a href="#"><td>SuperSubor</td></a>
|
||||
<td><a href="#" download="white-download-icon-21"><img src="white-download-icon-21.jpg" alt="image" width="50px" height="50px"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<a href="#"><td>SuperSubor</td></a>
|
||||
<td><a href="#" download="white-download-icon-21"><img src="white-download-icon-21.jpg" alt="image" width="50px" height="50px"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<a href="#"><td>SuperSubor</td></a>
|
||||
<td><a href="#" download="white-download-icon-21"><img src="white-download-icon-21.jpg" alt="image" width="50px" height="50px"></a></td>
|
||||
<tr>
|
||||
<a href="#"><td>SuperSubor</td></a>
|
||||
<td><a href="#" download="white-download-icon-21"><img src="white-download-icon-21.jpg" alt="image" width="50px" height="50px"></a></td>
|
||||
<tr>
|
||||
<a href="#"><td>SuperSubor</td></a>
|
||||
<td><a href="#" download="white-download-icon-21"><img src="white-download-icon-21.jpg" alt="image" width="50px" height="50px"></a></td>
|
||||
<tr>
|
||||
<a href="#"><td>SuperSubor</td></a>
|
||||
<td><a href="#" download="white-download-icon-21"><img src="white-download-icon-21.jpg" alt="image" width="50px" height="50px"></a></td>
|
||||
</table>
|
||||
|
||||
<form action="/david.html" method="post" enctype="multipart/form-data">
|
||||
Vyber súbor na nahratie:
|
||||
<input type="file" name="fileToUpload" id="fileToUpload">
|
||||
<input type="submit" value="Nahrať súbor" name="submit">
|
||||
</form>
|
||||
</form>
|
||||
</main>
|
||||
<footer>
|
||||
<p>Kontakt:</p><br>
|
||||
<p>d94778894@gmail.com</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
@@ -1,65 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
|
||||
integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
|
||||
crossorigin="anonymous" referrerpolicy="no-referrer">
|
||||
<link rel="stylesheet" href="/global/global.css">
|
||||
<script src="/global/global.js"></script>
|
||||
<title>Slovanská mytológia</title>
|
||||
</head>
|
||||
<nav class="topnav container_menu" id="myTopnav">
|
||||
<a href="/David" class="active">Dávid</a>
|
||||
<a href="stranky/Dano.html">Daniel</a>
|
||||
<a href="javascript:void(0);" class="icon" onclick="myFunction()">☰</a>
|
||||
</nav>
|
||||
<body>
|
||||
<main>
|
||||
<table border="5px" align="right">
|
||||
<tr>
|
||||
<th>Názov súboru</th>
|
||||
<th>Download</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<a href="#"><td>SuperSubor</td></a>
|
||||
<td><a href=""><img src="white-download-icon-21.jpg" alt="image" width="50px" height="50px"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<a href="#"><td>SuperSubor</td></a>
|
||||
<td><img src="white-download-icon-21.jpg" alt="image" width="50px" height="50px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<a href="#"><td>SuperSubor</td></a>
|
||||
<td><img src="white-download-icon-21.jpg" alt="image" width="50px" height="50px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<a href="#"><td>SuperSubor</td></a>
|
||||
<td><img src="white-download-icon-21.jpg" alt="image" width="50px" height="50px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<a href="#"><td>SuperSubor</td></a>
|
||||
<td><img src="white-download-icon-21.jpg" alt="image" width="50px" height="50px"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<a href="#"><td>SuperSubor</td></a>
|
||||
<td><img src="white-download-icon-21.jpg" alt="image" width="50px" height="50px"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<form action="upload.php" method="post" enctype="multipart/form-data">
|
||||
Vyber súbor na nahratie:
|
||||
<input type="file" name="fileToUpload" id="fileToUpload">
|
||||
<input type="submit" value="Nahrať súbor" name="submit">
|
||||
</form>
|
||||
</form>
|
||||
</main>
|
||||
<footer>
|
||||
<p>Kontakt:</p><br>
|
||||
<p>d94778894@gmail.com</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
@@ -1,57 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>upload</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
$conn = mysqli_connect('localhost','root','','example');
|
||||
if(isset($_POST['submit'])){
|
||||
$fileName = $_FILES['file']['name'];
|
||||
$fileTmpName = $_FILES['file']['tmp_name'];
|
||||
$path = "files/".$fileName;
|
||||
|
||||
$query = "INSERT INTO filedownload(filename) VALUES ('$fileName')";
|
||||
$run = mysqli_query($conn,$query);
|
||||
|
||||
if($run){
|
||||
move_uploaded_file($fileTmpName,$path);
|
||||
echo "success";
|
||||
}
|
||||
else{
|
||||
echo "error".mysqli_error($conn);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<table border="1px" align="center">
|
||||
<tr>
|
||||
<td>
|
||||
<form action="Upload.html" method="post" enctype="multipart/form-data">
|
||||
<input type="file" name="file">
|
||||
<button type="submit" name="submit"> Upload</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?php
|
||||
$query2 = "SELECT * FROM filedownload ";
|
||||
$run2 = mysqli_query($conn,$query2);
|
||||
|
||||
while($rows = mysqli_fetch_assoc($run2)){
|
||||
?>
|
||||
<a href="download.php?file=<?php echo $rows['filename'] ?>">Download</a><br>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user