-
Notifications
You must be signed in to change notification settings - Fork 1
/
form.php
52 lines (38 loc) · 1.01 KB
/
form.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
<?php
include('lib.php');
$filename = $_GET['filename'];
if (!isset($filename)) {
exit("Expected filename= param\n");
}
$filename = sanitize($filename);
$body = <<<EOF
<form action="resize" method="GET">
<table>
<tr>
<td>Image Name</td>
<td><input type="text" name="name" value="$filename" /></td>
</tr>
<tr>
<td>Max Width</td>
<td><input type="text" name="max-width" value="600" /></td>
</tr>
<tr>
<td>Rotation (counter-clockwise)</td>
<td><input type="text" name="rotation"/></td>
</tr>
<tr>
<td>Serve Slowly Through PHP (to copy URL)</td>
<td><input type="checkbox" name="serve-slowly-through-php" value="1"/></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="Show Image" /></td>
</tr>
</table>
EOF;
header("Content-type: text/html", $replace = true, 200);
html_header();
echo($body);
echo('<p><a href=".">Back to home page</a></p>');
html_footer();
?>