-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.php
66 lines (56 loc) · 1.78 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
session_start();
$classList = " hidden";
$message = "";
if (isset($_SESSION['success']) && $_SESSION['success'] === false) {
if (isset($_SESSION['error'])) {
$classList = " error";
$message = "<strong>Fehler:</strong> " . $_SESSION['error'];
} else if (isset($_SESSION['warning'])) {
$classList = " warning";
$message = "<strong>Warnung:</strong> " . $_SESSION['warning'];
} else if (isset($_SESSION['info'])) {
$classList = " info";
$message = "<strong>Hinweis:</strong> " . $_SESSION['info'];
} else {
$message = $_SESSION['message'] ?? "";
if (!empty($message)) {
$classList = " secondary";
}
}
// Cleanup
session_destroy();
}
?>
<html lang="de">
<head>
<meta charset="utf-8">
<title>Winmail.dat-Umwandler</title>
<meta name="description" content="Small web application to extract attachments from winmail.dat files">
<meta name="author" content="Kevin Köllmann <[email protected]>">
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<section id="wrapper">
<div class="container">
<div class="rectangle">
<h2>Winmail.dat-Umwandler</h2>
<div class="left_cor"></div>
<div class="right_cor"></div>
</div>
<div class="content">
<div class="message<?php echo $classList; ?>"><?php echo $message; ?></div>
<form enctype="multipart/form-data" action="convert.php" method="POST" onSubmit="return checkUploadForm();">
<!-- Der Name des Input-Felds bestimmt den Namen im $_FILES-Array -->
<p>
Diese Datei hochladen:<br/>
<input name="userfile" id="userfile" type="file" accept=".dat" />
</p>
<p><input type="submit" value="Datei hochladen" /></p>
</form>
</div>
</div>
</section>
<script src="js/checkUploadForm.fn.js"></script>
</body>
</html>