forked from txm5586/academytimbrature
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·196 lines (168 loc) · 4.46 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Timbrature Hours</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<style type="text/css">
body {
margin: 0;
font-size: 19;
}
tab1 { padding-left: 4em; }
#main_info {
margin-left: 10px;
margin-bottom: 25px;
margin-top: 0px;
}
#topdiv {
text-align: center;
background: #EB3349; /* fallback for old browsers */
background: -webkit-linear-gradient(to right, #F45C43, #EB3349); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to right, #F45C43, #EB3349); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
color: white;
top: 0;
height: 50px;
vertical-align: middle;
line-height: 50px;
font-weight: bold;
}
#labelfile {
font-size: 14px;
}
input[type=submit] {
padding:5px 15px;
background: #2196F3; /* fallback for old browsers */
border:0 none;
color: white;
cursor:pointer;
-webkit-border-radius: 5px;
border-radius: 5px;
font-size: 14px;
}
input[type='file'] {
display: none;
}
.input-wrapper label {
background-color: #2196F3;
border-radius: 5px;
color: #fff;
margin: 10px;
padding: 6px 20px
}
.input-wrapper label:hover {
background-color: #2980b9
}
/* The container */
.container {
display: block;
position: relative;
padding-left: 35px;
margin-bottom: 12px;
cursor: pointer;
font-size: 20px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
/* Hide the browser's default radio button */
.container input {
position: absolute;
opacity: 0;
cursor: pointer;
}
/* Create a custom radio button */
.checkmark {
position: absolute;
top: 0;
left: 0;
height: 25px;
width: 25px;
background-color: #eee;
border-radius: 50%;
}
/* On mouse-over, add a grey background color */
.container:hover input ~ .checkmark {
background-color: #ccc;
}
/* When the radio button is checked, add a blue background */
.container input:checked ~ .checkmark {
background-color: #2196F3;
}
/* Create the indicator (the dot/circle - hidden when not checked) */
.checkmark:after {
content: "";
position: absolute;
display: none;
}
/* Show the indicator (dot/circle) when checked */
.container input:checked ~ .checkmark:after {
display: block;
}
/* Style the indicator (dot/circle) */
.container .checkmark:after {
top: 9px;
left: 9px;
width: 8px;
height: 8px;
border-radius: 50%;
background: white;
}
</style>
</head>
<body>
<?php
if (!empty($_GET["error"]) && $_GET["error"] == "nofile") {
?>
<div id="topdiv">
Please, select a file before.
</div>
<?php } ?>
<div id="main_info">
<br>
Get your timbrature: <a href="http://143.225.200.247/iostimbrature" target="_blank">http://143.225.200.247/iostimbrature</a>
<br><br>
Save it as a PDF.
<br>
<form action="checkpdf.php" method="post" enctype="multipart/form-data">
<p>
Cohort:
<p/>
<p>
<label class="container">Morning
<input type="radio" checked="checked" name="cohort" value="Morning">
<span class="checkmark"></span>
</label>
<label class="container">Afternoon
<input type="radio" name="cohort" value="Afternoon">
<span class="checkmark"></span>
</label>
<label class="container">Master
<input type="radio" name="cohort" value="Master">
<span class="checkmark"></span>
</label>
</p>
Upload the PDF here:
<p>
<div class='input-wrapper'>
<label for='input-file' id="labelfile">
Select a file
</label>
<input id='input-file' type='file' value='' name="file" />
<span id='file-name'></span>
</div>
</p>
<br>
<p><input type="submit" value="Upload" style="height: 30px;" /></p>
</form>
</div>
</body>
</html>
<script type="text/javascript">
$('#topdiv').delay(4000).fadeOut('slow');
var $input = document.getElementById('input-file'),
$fileName = document.getElementById('file-name');
$input.addEventListener('change', function(){
$fileName.textContent = this.value;
});
</script>