-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage-aboutus.php
164 lines (139 loc) · 6.73 KB
/
page-aboutus.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
<?php
/*
Template Name: AboutUs
*/
get_header();
?>
<div><h2 class="grid_14 prefix_1"><?php the_title(); ?></h2></div>
<div id="content" class="grid_14 prefix_1">
<div id="about_us" class="grid_14 alpha">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<div class="page">
<p class="subtitle grid_14 alpha"><?php outputcustom('subtitle'); ?></p>
<?php
$main_img = getcustom('main_img');
if ($main_img) { ?>
<img id="hero" src="<?php echo $main_img; ?>" />
<?php }?>
<div class="clear"></div>
<div class="grid_8 alpha">
<p><?php outputcustom('main'); ?></p>
<div class="grid_8 alpha">
<h3>The Council</h3>
<div>
<?php
$council_img = getcustom('council_img');
if ($council_img) { ?>
<img src="<?php echo $council_img; ?>"/>
<?php }?>
<p class="shortinfo"><?php outputcustom('council'); ?></p>
</div>
</div>
<div class="grid_4 alpha">
<h3>Our Alumni Advisors</h3>
<div>
<?php
$advisors_img = getcustom('advisors_img');
if ($advisors_img) { ?>
<img class="advisor" src="<?php echo $advisors_img; ?>"/>
<?php }?>
<p><?php outputcustom('advisors'); ?></p>
</div>
</div>
<div class="grid_4 omega">
<h3>Looking for a church?</h3>
<p class="shortinfo"><?php outputcustom('church'); ?></p>
</div>
<!--
<div class="grid_5 omega">
<h3 class="advisor">Rick Yi</h3>
<div class="info clearfix">
<span class="grid_2 alpha info-label">Major</span>
<span class="grid_3 omega info-desc">Cognitive Science</span>
</div>
<div class="info clearfix">
<span class="grid_2 alpha info-label">Hometown</span>
<span class="grid_3 omega info-desc">Hawaii</span>
</div>
<div class="info clearfix">
<span class="grid_2 alpha info-label">Likes</span>
<span class="grid_3 omega info-desc">Indian food</span>
</div>
<div class="info clearfix">
<span class="grid_2 alpha info-label">Special Traits</span>
<span class="grid_3 omega info-desc">Awesomeness</span>
</div>
<h3 class="advisor">Sue Yi</h3>
<div class="info clearfix">
<span class="grid_2 alpha info-label">Major</span>
<span class="grid_3 omega info-desc">Sociology</span>
</div>
<div class="info clearfix">
<span class="grid_2 alpha info-label">Hometown</span>
<span class="grid_3 omega info-desc">West LA, CA</span>
</div>
<div class="info clearfix">
<span class="grid_2 alpha info-label">Likes</span>
<span class="grid_3 omega info-desc">Dark chocolate, warm weather</span>
</div>
<div class="info clearfix">
<span class="grid_2 alpha info-label">Special Traits</span>
<span class="grid_3 omega info-desc">Sneezes real loud</span>
</div>
</div>
-->
</div>
<div class="grid_5 prefix_1 omega">
<h3 id="contact-header">Contact Us</h3>
<?php
$submitted = $_POST['send_email'];
if (!isset($submitted)) {
// form has NOT been submitted yet
?>
<p><?php outputcustom('contact'); ?></p>
<div id="form">
<?//php the_content(); ?>
<form method="post" id="msgform">
<p><label for="your-name">Name</label>
<br /><input type="text" name="your-name" value="" id="your-name" class="required"></p>
<p><label for="your-email">Email <small>(for us to contact you)</small></label>
<br /><input type="text" name="your-email" value="" id="your-email" class="required email"></p>
<p><label for="your-phone">Phone <small>(optional)</small></label>
<br /><input type="text" name="your-phone" value="" id="your-phone"></p>
<p><label for="your-message">Comments or questions?</label>
<br /><textarea name="your-message" id="your-message" rows="10" cols="40" class="required"></textarea></p>
<p><input type="submit" name="send_email" value="Contact Us"></p>
</form>
</div>
<?php
}
else {
// form has been submitted
$from = $_POST['your-name'] . '<' . $_POST['your-email'] . '>';
$to = 'nelsonwong@gmail.com';
$subject = 'message from a2f Berkeley website';
$msg = $_POST['your-message'] . "\r\n\r\n" . 'Phone: ' . $_POST['your-phone'];
date_default_timezone_set('America/Los_Angeles'); // Abe: is this necessary?
$headers = "From: $from\r\n";
$headers .= "To: $to\r\n";
$headers .= "Content-Type: text/html";
if ( mail('',$subject,$msg,$headers) ) {
echo "The message has been sent!";
} else {
echo "The message has failed!";
}
}
?>
</div>
</div><!-- end entry -->
</div><!-- end post -->
</div class="clear"></div>
<?php endwhile; endif; ?>
</div>
</div><!-- end content -->
<script src="<?php bloginfo('stylesheet_directory'); ?>/js/jquery.validate.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$("#msgform").validate();
</script>
<?php get_footer(); ?>