-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
180 lines (164 loc) · 5.32 KB
/
index.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
172
173
174
175
176
177
178
179
180
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Webinar Library</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="language" content="en-US">
<link rel="stylesheet" href="css/960grid.css">
<link rel="stylesheet" href="css/960screen.css">
<link rel="stylesheet" href="css/typography.css">
<link rel="stylesheet" href="css/webinar-library.css">
<script type="text/javascript" src="js/jquery-1.10.2.js"></script>
<style type="text/css">
/* DIV Stick */
div#sticker {
padding: 0 0 10px 0;
margin: 0 0 20px 0;
background: #FFF;
width: 220px;
z-index: 4;
}
.stick {
position:fixed;
top:0px;
z-index: 4;
}
.unstick{
position: absolute;
top: 0;
}
#about {
position: relative;
z-index: 2;
}
#footer {
background:#FFF;
z-index: 3;
position: relative
}
#main {
position:relative;
z-index: 1
}
</style>
<script type="text/javascript">
/*$(window).ready(function() {
const s = $("#sticker");
const abtOffset = $("#about").offset();
let $window = $(window);
let spos = s.offset();
$window.scroll(function() {
let windowpos = $(window).scrollTop();
if (windowpos >= spos.top && (windowpos+s.height()) < abtOffset.top) {
s.removeClass("unstick");
s.addClass("stick");
$(".stick").css({"margin-top": 0});
}else if((windowpos+s.height()) > abtOffset.top){
s.removeClass("stick");
s.addClass("unstick");
$(".unstick").css({"margin-top": abtOffset.top - s.height() - 50});
} else {
s.removeClass("stick");
s.addClass("unstick");
$(".unstick").css({"margin-top": 0});
}
});
});*/
$(window).ready(function() {
const $about = $("#about");
const s = $("#sticker");
window.setTimeout(function(){
sticker(s, $about);
}, 600);
function sticker(stick, e){
stick.removeClass();
let spos = stick.offset();
let sheight = s.outerHeight();
$(window).scroll(function() {
let windowpos = $(this).scrollTop();
if (windowpos >= spos.top && (windowpos+sheight) < $about.position().top) {
stick.removeClass();
stick.addClass("stick");
$(".stick").css({"margin-top": 0});
return false;
}else if((windowpos+sheight) > $about.position().top){
stick.removeClass();
stick.addClass("unstick");
$(".unstick").css({"margin-top": $("#main").height() - sheight});
return false;
}else {
s.removeClass();
stick.css('margin', '5px 0 20px 0');
return false;
}
});
}
});
</script>
</head>
<body>
<noscript class="text-center"><h2>****Javascript is disabled - Functionality may be limited.****</h2></noscript>
<?php
$xml = simplexml_load_file('xml/webinar-library.xml') or die ("Error: Unable to load library");
$record = $xml->record;
$headers = $xml->record->children();
?>
<div class="container_12">
<div id=head style='height:250px; background:blue;'></div>
<div class="grid_3" id="feature">
<div id="sticker">
<div id="checkboxes">
<div class="fixed">
<div class="uncheck">
<button>Uncheck/Check All</button>
</div>
</div>
</div>
</div>
<div style="height:300px; width:220px;"> </div>
</div>
<div class="grid_9 alpha" id="main">
<h1>Webinar Library</h1>
<p>Many organizations use webinars to provide training, share information, and promote agroforestry. Use the table below to review archived webinars related to agroforestry practices and related issues. If you know of additional webinars that should be added to this list, please contact <a href="mailto:kdmacfarland@fs.fed.us">Kate MacFarland</a> at (402) 437-5178, x.4012.</p>
<table id="Webinar-Library" style="display:block" class="tablesorter" >
<thead>
<tr id="headers">
<?php
foreach ($headers as $column)
if ($column->getName() !== 'Link'){
echo "<th>" . preg_replace('/([A-Z])/' ,' $1', $column->getName()) . "</th>";
}
?>
</tr>
</thead>
<tbody id="webinar">
<?php
foreach ($record as $webinar)
echo "<tr class='webinar' data-category='" . $webinar->Date . " " . preg_replace('/\s+/', '-', strtolower($webinar->AgroforestryPractice)) . " " . preg_replace('/\s+/', '-', strtolower($webinar->WebinarHost)) . "'>",
"<td class='practice'>" . $webinar->AgroforestryPractice . "</td>",
"<td><a href='" . $webinar->Link . "'>" . $webinar->WebinarTitle . "</a></td>",
"<td>" . $webinar->Presenter . "</td>",
"<td class='year'>" . $webinar->Date . "</td>",
"<td class='host'>" . $webinar->WebinarHost . "</td>",
"</tr>";
?>
<tr class="make-selection">
<td colspan="5">
<h2>Please make a selection</h2>
</td>
</tr>
<tr class="no-results">
<td colspan="5">
<h2>No results found</h2>
<p>Please update your selection.</p>
</td></tr>
</tbody>
</table>
</div>
<div class="clear"> </div>
<div id='about' style='height:500px; background:rgba(0,0,0,0.5)'></div>
</div>
<script type="text/javascript" src="js/jquery.tablesorter.js" ></script>
<script type="text/javascript" src="js/webinar-library-method.js"></script>
</body>
</html>