Many improvement
This commit is contained in:
@@ -41,16 +41,15 @@ session_start();
|
||||
<?php include "../common/header.html"; ?>
|
||||
|
||||
<body>
|
||||
<center>
|
||||
|
||||
<div class="cont">
|
||||
<h1>Filopplasting</h1>
|
||||
<p>
|
||||
<h1 class="center-txt">Filopplasting</h1>
|
||||
<p class="center-txt">
|
||||
Her kan du laste opp filer for å dele med andre. Filene kan være maks 5GB.<br /> Serveren ligger i Kristiansand og har 500/500 internet <br />
|
||||
All opplasting skjer på eget ansvar.
|
||||
</p>
|
||||
<div>
|
||||
<a class="btn btn-info" href="http://trygve.me/filopplasting/filer/">Se alle filer</a>
|
||||
<a class="center-txt" href="http://trygve.me/filopplasting/filer/">Se alle filer</a>
|
||||
</div>
|
||||
<hr class="my-4">
|
||||
<div>
|
||||
@@ -58,12 +57,46 @@ session_start();
|
||||
<div class="form-group">
|
||||
<input type="hidden" name="<?php echo ini_get("session.upload_progress.name"); ?>" value="123" />
|
||||
<input type="file" name="file" class="" >
|
||||
<button type="submit" class="btn btn-raised btn-primary">Last opp </button>
|
||||
<button type="submit" class="btn btn-primary">Last opp </button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
$errorMSG = '
|
||||
<div class="alert alert-warning" role="alert">
|
||||
Hmmmm 🤔 Her var det visst noe som gikk galt.
|
||||
</div>';
|
||||
|
||||
$bannedMSG = '
|
||||
<div class="alert alert-warning" role="alert">
|
||||
Denne filtypen er ikke tillatt.
|
||||
</div>';
|
||||
|
||||
|
||||
if(isset($_SESSION['fileupload-response'])) {
|
||||
if($_SESSION['fileupload-response'] == "success") {
|
||||
|
||||
$successMSG = '
|
||||
<div class="alert alert-primary center" role="alert">
|
||||
'
|
||||
. $_SESSION['linkData'] .
|
||||
'
|
||||
<button type="button" class="btn btn-primary" onclick="copyToClipboard(\'' . $_SESSION['link'] . '\')">Kopier lenke</button>
|
||||
</div>
|
||||
';
|
||||
|
||||
echo($successMSG);
|
||||
}
|
||||
elseif ($_SESSION['fileupload-response'] == "failed") {
|
||||
echo($errorMSG);
|
||||
}
|
||||
elseif ($_SESSION['fileupload-response'] == "banned") {
|
||||
echo($bannedMSG);
|
||||
}
|
||||
session_destroy();
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user