-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustom.php
More file actions
executable file
·112 lines (74 loc) · 2.75 KB
/
custom.php
File metadata and controls
executable file
·112 lines (74 loc) · 2.75 KB
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
<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>D-Day.in, your personal countdown timer</title>
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/date.css">
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="js/libs/modernizr-2.0.6.min.js"></script>
<script src="js/functions.js"></script>
</head>
<body>
<div id="container">
<div id="clock"></div>
<div id="main" role="main">
<?php
if(!$_POST){
?>
<form class="hiddenForm" action="index.php" method="post">
<p>Event name:</p>
<p><input type="text" name="name" /></p>
<p>Date:</p>
<p><input id="datepicker" type="date" name="date" /></p>
<input type="submit" />
</form>
<?php
} else {
?>
<?php
$dbhost = "localhost";
$dbname = "countdown";
$dbuser = "root";
$dbpassword = "";
$con = mysql_connect($dbhost,$dbuser,$dbpassword);
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db($dbname, $con);
$sql = "INSERT INTO counters (EventName, EventDate)
VALUES (".$_POST['name'].", ".$_POST['date'].")";
mysql_query($sql,$con);
mysql_close($con);
?>
Welcome <?php echo $_POST["name"]; ?>!<br />
You are <?php echo $_POST["date"]; ?> years old.
<?php
}
?>
</div>
</div> <!--! end of #container -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\/script>')</script>
<!-- scripts concatenated and minified via ant build script-->
<script src="js/plugins.js"></script>
<script src="js/date.js"></script>
<script src="js/script.js"></script>
<!-- end scripts-->
<script>
var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']]; // Change UA-XXXXX-X to be your site's ID
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>
</body>
</html>