-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwhen.php
35 lines (35 loc) · 1.6 KB
/
when.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
<?php require "functions.php" ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link href='https://fonts.googleapis.com/css?family=Josefin+Sans' rel='stylesheet' type='text/css'>
<link rel="stylesheet" type="text/css" href="dine.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script type="text/javascript">
function update_hour(){
var hours = $("input[name='duration']")[0].value;
if(hours > 1) {
$("#hours").html("hours");
}
else {
$("#hours").html("hour");
}
}
</script>
</head>
<body id="plate">
<div id="text">
<form method="get" action="validate_when.php">
Hmm, not really believable. But, whatever. What date and time are we meeting up?<br/>
<input type="text" name="when" placeholder="Datetime, e.g Tomorrow 1pm"><br/>
For <input style="width: 100px;" type="number" name="duration" onchange="update_hour()" onkeyup="update_hour()" onkeydown="update_hour()" placeholder="1">
<span id="hours">hour</span>
<input type="hidden" name="why" value="<?php echo reason(); ?>"/>
<input type="hidden" name="who" value="<?php echo name(); ?>"/>
<input type="hidden" name="where" value="<?php echo place(); ?>"/>
<br/>
<input class="submit" type="submit" value="Next">
</form>
</div>
</body>
</html>