/
form.php
51 lines (48 loc) · 2.24 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
<?php
require 'conf.php';
$handled = false;
if (isset($_POST['key'])) {
$handled = FormHandler::getInstance()->handle();
}
$key = FormHandler::getKey();
?>
<!DOCTYPE html>
<html>
<head>
<title>vo-tee form</title>
<link rel="stylesheet" href="style.css" type="text/css" />
<meta charset="UTF-8">
<meta name="author" content="Yet Another Visual Artist - www.y-a-v-a.org">
</head>
<body>
<h1><a href="http://gli.tc/h" target="_blank"><img src="img/GLITCH_2112_small.gif" alt="GLITCH" /></a> <img src="error.jpg" alt="error" /><br>Vo-tee submission form</h1>
<h2><a href="index.php">Go to overview</a></h2>
<div class="container">
<?php if ($handled === true): ?>
<h2>Thanks for submitting the form!</h2>
<?php endif; ?>
<?php if(null !== Session::getSession()->getValue('msg')): ?>
<?php echo Session::getSession()->getValue('msg'); ?>
<?php endif; ?>
<form id="application" method="post" enctype="multipart/form-data">
<input type="hidden" name="key" value="<?=$key?>" />
Your design: <input class="required" type="file" name="design" accept="image/jpeg,image/tiff,image/vnd.adobe.photoshop,application/pdf,application/postscript" /><br>
Allowed filetypes: jpg, psd, tiff, pdf, eps, ai<br>
<input type="text" class="required" name="name" placeholder="Your name" /><br>
<input type="text" class="url" name="url" placeholder="Your website" /><br>
<input type="text" class="required email" name="email" placeholder="Your email address" /><br>
<input type="text" class="required" name="hometown" placeholder="Your hometown" /><br>
<input type="submit" value="Submit design!" />
</form>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<script src="http://jzaefferer.github.com/jquery-validation/jquery.validate.js"></script>
<script>
jQuery('#application').validate();
</script>
<address>• COpyLEft 2012 • Yet Another Visual Artist • <a href="http://www.y-a-v-a.org" target="_blank">y-a-v-a.org</a> • <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/" target="_blank">by-nc-sa</a> • <a href="https://github.com/y-a-v-a/vo-tee" target="_blank">code on github</a> •</address>
</body>
</html>
<?php
Session::getSession()->unsetValue('msg');
?>