-
Notifications
You must be signed in to change notification settings - Fork 2
/
page-cyber19.php
171 lines (98 loc) · 3.97 KB
/
page-cyber19.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
165
166
167
168
169
170
171
<?php
// TODO - Put this in utilities
// TODO - Surface this to editors
$deadline = new DateTime("2019-12-02 23:59:59", new DateTimeZone('America/Los_Angeles'));
$currentTime = new DateTime('',new DateTimeZone('America/Los_Angeles'));
if ($currentTime > $deadline)
{
header("Location: ". get_site_url() ."/membership", FALSE, 301);
die();
}
$UWAA->Memberchecker->getSession();
get_header();
wp_enqueue_script(array('responsiveFrame', 'responsiveFrameHelper'));
$rawParentQueryStringParams = strtoupper($_SERVER['QUERY_STRING']);
parse_str($rawParentQueryStringParams, $parentPageParams);
$childPageParams = array();
?>
<div class="cyber-header uw-homepage-slider-container">
<?php
include(locate_template('content-cyber-superhero.php'));
?>
</div>
<div class="container uw-body">
<div class="row">
<div class="col-md-8 uw-content" role='main'>
<div class="row uwaa-home-branding-row">
<?php include(locate_template( 'partials/sidebar-single-breadcrumbs.php')); ?>
</div>
<div class="uw-body-copy">
<?php
// Start the Loop.
while ( have_posts() ) : the_post();
/*
* Include the post format-specific template for the content. If you want to
* use this in a child theme, then include a file called called content-___.php
* (where ___ is the post format) and that will be used instead.
*/
?>
<?php if(uw_list_pages()){ ?>
<div id="mobile-sidebar">
<button id="mobile-sidebar-menu" class="visible-xs" aria-hidden="true" tabindex="1">
<div aria-hidden="true" id="ham">
<span></span>
<span></span>
<span></span>
<span></span>
</div>
<div id="mobile-sidebar-title" class="page_item"> Close Menu </div>
</button>
<div id="mobile-sidebar-links" aria-hidden="true" class="visible-xs"> <?php uw_sidebar_menu(); ?></div>
</div>
<?php } ?>
<?php the_content(); ?>
<?php
endwhile;
?>
</div>
<!-- Ending us-body-copy -->
<?php // The Store
$frameURL = "https://secure.gifts.washington.edu/membership/uwaa";
$childPageParams['MEMBCODES'] = "CMS,CMJ";
$countOfParentParams = count($parentPageParams);
if ($countOfParentParams > 0 ) {
if(array_key_exists("JOIN", $parentPageParams)) {
$childPageParams['JOIN'] = $parentPageParams['JOIN'];
}
if(array_key_exists("RENEW", $parentPageParams)) {
$childPageParams['RENEW'] = $parentPageParams['RENEW'];
}
if(array_key_exists("NEWGRAD", $parentPageParams)) {
$childPageParams['NEWGRAD'] = $parentPageParams['NEWGRAD'];
}
if(array_key_exists("APPEALCODE", $parentPageParams)) {
$childPageParams['appealCode'] = $parentPageParams['APPEALCODE'];
}
if(array_key_exists("UTM_SOURCE", $parentPageParams)) {
$childPageParams['UTM_SOURCE'] = $parentPageParams['UTM_SOURCE'];
}
if(array_key_exists("UTM_MEDIUM", $parentPageParams)) {
$childPageParams['UTM_MEDIUM'] = $parentPageParams['UTM_MEDIUM'];
}
if(array_key_exists("UTM_CAMPAIGN", $parentPageParams)) {
$childPageParams['UTM_CAMPAIGN'] = $parentPageParams['UTM_CAMPAIGN'];
}
}
$childPageQueryString = http_build_query($childPageParams);
$frameURL .= "?" . $childPageQueryString;
?>
<iframe id="MembershipStoreFrame" src="<?php echo $frameURL; ?>" width="100%" height="3250px" frameborder="0" scrolling="no" style="margin-top:10px;"></iframe>
</div>
<div class="col-md-4 uw-sidebar">
<?php
the_widget("UWAA\Widgets\SidebarFeaturedPost");
?>
</div>
</div>
</div>
<?php get_footer(); ?>