forked from InfoSeeking/Coagmento
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontact.php
131 lines (90 loc) · 4.6 KB
/
contact.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
<?php
require_once("header.php");
?>
<!-- Highlighted region -->
<div id="highlighted-region">
<div id="google-map-block" class="block">
<div class="row-fluid">
<div class="span12">
<div id="map_canvas" class="google-map"></div>
</div> <!-- /span12 -->
</div> <!-- /row-fluid -->
</div> <!-- /google-map-block -->
</div> <!-- /highlighted-region -->
<!-- End of Highlighted region -->
<!-- Content region -->
<div id="main-content">
<div class="row-fluid wrapper">
<div class="span12">
<h1 class="page-title">Contact</h1>
</div>
</div>
<div class="row-fluid wrapper">
<!-- Sidebar First -->
<div id="sidebar-first-region" class="span3">
<div id="contact-info-side-block" class="block">
<h2 class="block-title">Contact info</h2>
<div class="content">
<strong>InfoSeeking Lab</strong><br />
4 Huntington St<br />
New Brunswick, NJ 08901<br /><br />
<b>Email:</b> <a href="mailto:chirags@rutgers.edu" >chirags@rutgers.edu</a><br />
</div> <!-- /content -->
</div> <!-- /contact-info-side-block -->
</div> <!-- /sidebar-first-region -->
<!-- End of Sidebar First -->
<!-- Main content -->
<div id="contact-content-region" class="span6">
<?php
require_once("connect.php");
date_default_timezone_set('America/New_York');
$datetime = getdate();
$date = date('Y-m-d', $datetime[0]);
$time = date('H:i:s', $datetime[0]);
if ($_POST['name']) {
$name = addslashes($_POST['name']);
$email = addslashes($_POST['email']);
$message = addslashes($_POST['message']);
$query = "INSERT INTO contact VALUES('','$date','$time','$name','$email','$message')";
$results = mysql_query($query) or die(" ". mysql_error());
echo "Thank you for your message. We will do our best to get back to you with a response if needed.<br/>If you have a support question, please email us directly at <a href=\"mailto:[email protected]\">[email protected]</a>.";
}
else {
?>
<div id="contact-content-block" class="block">
<p>We would love to hear from you; please drop us a line and we will get back to you soon.</p>
</div> <!-- /contact-content-block -->
<div id="contact-form-messages-block" class="block">
</div> <!-- /contact-form-messages-block -->
<div id="contact-form-block" class="block">
<form action="contact.php" method="post" id="contact-site-form" accept-charset="UTF-8" />
<div class="form-item">
<label for="name">Your name <small> (required)</small></label>
<input class="large-input" type="text" id="name" name="name" value="" size="60" maxlength="255" />
</div> <!-- /form-item -->
<div class="form-item">
<label for="mail">Your e-mail address <small> (required)</small></label>
<input class="large-input" type="text" id="email" name="email" value="" size="60" maxlength="255" />
</div> <!-- /form-item -->
<div class="form-item">
<label for="message">Message <small> (required)</small></label>
<textarea id="message" name="message" cols="60" rows="5" class="input-xxlarge"></textarea>
</div> <!-- /form-item -->
<div class="form-actions" id="edit-actions">
<input class="btn btn-primary form-submit" type="submit" id="submit" name="submit" value="Send message" />
</div>
</form>
</div> <!-- /contact-form-block -->
</div> <!-- /content-region -->
<!-- End of the main content -->
<!-- Sidebar Second -->
<!-- End of Sidebar First -->
<?php
}
?>
</div> <!-- /wrapper -->
</div> <!-- /main-content -->
<!-- End of Content region -->
<?php
require_once("footer.php");
?>