forked from captjt/smipo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathabout.php
More file actions
executable file
·230 lines (212 loc) · 9.05 KB
/
Copy pathabout.php
File metadata and controls
executable file
·230 lines (212 loc) · 9.05 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
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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<!DOCTYPE html>
<html lang="en">
<?php
require("connect.php");
?>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>About - SMIPO</title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/smipo.css" rel="stylesheet">
<!-- Fonts -->
<link href="http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=Josefin+Slab:100,300,400,600,700,100italic,300italic,400italic,600italic,700italic" rel="stylesheet" type="text/css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<?php require_once("navigation.php"); ?>
<div class="container">
<div class="row">
<div class="box">
<div class="col-lg-12">
<hr>
<h2 class="intro-text text-center">
About <strong>SMIPO</strong>
</h2>
<hr>
<p class="text-center">
<a href="../smipo/misc/October-2015.pdf">Montly Newsletter</a>
</p>
<hr>
</div>
<div class="col-md-6">
<img class="img-responsive img-border img-center" src="../smipo/img/smipo-logo.jpg" alt="">
</div>
<div class="col-md-6">
<p>
Our goal is to allow students at Radford University
an opportunity to gain practical experience in the
management and decision-making processes of a corporate
structured organization by participating in hands-on management
of the funds of Radford University Foundation’s endowment to
the Student Managed Investment Portfolio Organization.
</p>
</div>
<div class="clearfix"></div>
</div>
</div>
<div class="row">
<div class="box">
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
<div class="text-center">
<button type="button" class="btn btn-primary" id="executive_button" onClick="toggleExec()">Excecutive Board</button>
<button type="button" class="btn btn-primary" id="faculty_button" onClick="toggleFaculty()">Faculty Advisors</button>
<button type="button" class="btn btn-primary" id="investment_button" onClick="toggleInvestments()">Investments Division</button>
<button type="button" class="btn btn-primary" id="operations_button" onClick="toggleOperations()">Operations Division</button>
</div>
</div>
<div class="col-md-2"></div>
</div>
<div class="col-lg-12">
<hr>
<h2 class="intro-text text-center">
Our <strong>Team</strong>
</h2>
<hr>
</div>
<!-- script toggles for button press. Php only activates in GET/POST requests to server so we must use JS.
There is probably a better way to do this, to much repeated code.
-->
<script>
var toggleExec = function() {
var mydiv = document.getElementById('execSQL'); // if clicked others shouldn't show up either.
var facdiv = document.getElementById('facSQL');
var invdiv = document.getElementById('invSQL');
var oprdiv = document.getElementById('oprSQL');
if (mydiv.style.display === 'block' || mydiv.style.display === '')
mydiv.style.display = 'none';
else
mydiv.style.display = 'block';
facdiv.style.display = 'none';
invdiv.style.display = 'none';
oprdiv.style.display = 'none';
}
var toggleFaculty = function() {
var mydiv = document.getElementById('facSQL'); // if clicked others shouldn't show up either.
var execdiv = document.getElementById('execSQL');
var invdiv = document.getElementById('invSQL');
var oprdiv = document.getElementById('oprSQL');
if (mydiv.style.display === 'block' || mydiv.style.display === '')
mydiv.style.display = 'none';
else
mydiv.style.display = 'block';
execdiv.style.display = 'none';
invdiv.style.display = 'none';
oprdiv.style.display = 'none';
}
var toggleInvestments = function() {
var mydiv = document.getElementById('invSQL'); // if clicked others shouldn't show up either.
var facdiv = document.getElementById('facSQL');
var execdiv = document.getElementById('execSQL');
var oprdiv = document.getElementById('oprSQL');
if (mydiv.style.display === 'block' || mydiv.style.display === '')
mydiv.style.display = 'none';
else
mydiv.style.display = 'block';
execdiv.style.display = 'none';
facdiv.style.display = 'none';
oprdiv.style.display = 'none';
}
var toggleOperations = function() {
var mydiv = document.getElementById('oprSQL'); // if clicked others shouldn't show up either.
var execdiv = document.getElementById('execSQL');
var invdiv = document.getElementById('invSQL');
var facdiv = document.getElementById('facSQL');
if (mydiv.style.display === 'block' || mydiv.style.display === '')
mydiv.style.display = 'none';
else
mydiv.style.display = 'block';
execdiv.style.display = 'none';
invdiv.style.display = 'none';
facdiv.style.display = 'none';
}
</script>
<div class="row">
<?php
//display
function displayLoop($preparedSQL) {
require("connect.php");
$counter = 0;
$result = $db->query($preparedSQL);
while ($row = $result->fetchRow()) {
// 3 users per line.
if ($counter >= 3) {
$counter = 0;
echo "<div class='clearfix'></div>";
}
echo "<div class='col-sm-4 text-center'>";
echo "<center>";
if ($row[img_source] == null) {
echo "<img class='img-responsive' src='img/smipo-logo.jpg' alt='' width='125' height='125'>";
}
else {
echo "<img class='img-responsive' src=" . 'img/' . $row[img_source] . " alt='img/smipo-logo.jpg' width='125' height='125'>";
}
echo "<h3>" . $row['firstname'] . ' ' . $row['lastname'] . "<br /> <small>" . $row['position'] . "</small></h3></center></div>";
$counter = $counter + 1;
}
}
?>
<!-- Various divs based on division -->
<div id="execSQL" style="display:none">
<?php
$sql = 'SELECT * FROM members INNER JOIN department_assignment ON members.member_id = department_assignment.member_id WHERE department_id = 1';
displayLoop($sql);
?>
<div class="clearfix"></div>
</div>
<div id="facSQL" style="display:none">
<?php
$sql = 'SELECT * FROM members INNER JOIN department_assignment ON members.member_id = department_assignment.member_id WHERE department_id = 2';
displayLoop($sql);
?>
<div class="clearfix"></div>
</div>
<div id="invSQL" style="display:none">
<?php
$sql = 'SELECT * FROM members INNER JOIN department_assignment ON members.member_id = department_assignment.member_id WHERE department_id = 3';
displayLoop($sql);
?>
<div class="clearfix"></div>
</div>
<div id="oprSQL" style="display:none">
<?php
$sql = 'SELECT * FROM members INNER JOIN department_assignment ON members.member_id = department_assignment.member_id WHERE department_id = 4';
displayLoop($sql);
?>
<div class="clearfix"></div>
</div>
<!-- end divisional divs -->
</div>
</div>
</div>
</div>
<!-- /.container -->
<footer>
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<p>Copyright © Radford SMIPO 2015</p>
</div>
</div>
</div>
</footer>
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>