-
Notifications
You must be signed in to change notification settings - Fork 0
/
area_survey.php
210 lines (180 loc) · 4.32 KB
/
area_survey.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
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
<?php
require(__DIR__.'/source/main.php');
class ConfigLocal extends data\Common
{
private $id_guid;
private $filter_area_code;
// Accessors
public function get_id_guid()
{
return $this->id_guid;
}
public function get_filter_area_code()
{
return $this->filter_area_code;
}
// Mutators
public function set_filter_area_code($value)
{
$this->filter_area_code = $value;
}
}
// Start page cache.
$page_obj = new \dc\cache\PageCache();
// Get request variables.
$config = new ConfigLocal();
$config->populate_from_request();
$id_ext = $config->get_id_guid();
$option_list = NULL;
// --Accounts (Inspector)
$yukon_database->set_sql('{call area_survey(@sort_field = ?,
@sort_order = ?,
@param_filter_id = ?,
@param_filter_id_key = ?,
@param_filter_code = ?)}');
$params = array(array(NULL, SQLSRV_PARAM_IN),
array(NULL, SQLSRV_PARAM_IN),
array(NULL, SQLSRV_PARAM_IN),
array(NULL, SQLSRV_PARAM_IN),
array($config->get_filter_area_code(), SQLSRV_PARAM_IN));
$yukon_database->set_param_array($params);
$yukon_database->query_run();
$yukon_database->get_line_config()->set_class_name('\data\Area');
$_obj_data_main = new \data\Area;
if($yukon_database->get_row_exists() === TRUE) $_obj_data_main = $yukon_database->get_line_object();
// Prepare human readable building code.
$building_code_display = NULL;
if($_obj_data_main->get_room_code())
{
$building_code_display = trim(trim($_obj_data_main->get_room_id()).', '.$_obj_data_main->get_building_name());
?>
<table class="table table-striped table-condensed">
<thead>
</thead>
<tfoot>
</tfoot>
<tbody id="tbody_room_data" class="">
<tr>
<td>Area</td>
<td><a href = "area.php?id=<?php echo $_obj_data_main->get_room_code(); ?>"
data-toggle = ""
title = "View location detail."
target = "_new"
><?php echo $building_code_display; ?></a></td>
</tr>
<tr>
<td>Biosafety Level</td>
<td><?php
if($_obj_data_main->get_biosafety_level())
{
echo $_obj_data_main->get_biosafety_level();
}
else
{
?>
<span class="glyphicon glyphicon-remove alert-info"></span>
<?php
}
?></td>
</tr>
<tr>
<td>Chemical Lab Class</td>
<td><?php
if($_obj_data_main->get_chemical_lab_class())
{
echo $_obj_data_main->get_chemical_lab_class();
}
else
{
?>
<span class="glyphicon glyphicon-remove alert-info"></span>
<?php
}
?>
</td>
</tr>
<tr>
<td>Chemical Operations Class</td>
<td><?php
if($_obj_data_main->get_chemical_operations_class())
{
echo $_obj_data_main->get_chemical_operations_class();
}
else
{
?>
<span class="glyphicon glyphicon-remove alert-info"></span>
<?php
}
?></td>
</tr>
<tr>
<td>Department</td>
<td><?php echo $_obj_data_main->get_department(); ?></td>
</tr>
<tr>
<td>Hazardous Waste</td>
<td><?php
if($_obj_data_main->get_hazardous_waste_generated())
{
?>
<span class="glyphicon glyphicon-ok alert-warning"></span>
<?php
}
else
{
?>
<span class="glyphicon glyphicon-remove alert-info"></span>
<?php
}
?></td>
</tr>
<tr>
<td>Radiation Usage</td>
<td><?php
if($_obj_data_main->get_radiation_usage())
{
?>
<span class="glyphicon glyphicon-ok alert-warning"></span>
<?php
}
else
{
?>
<span class="glyphicon glyphicon-remove alert-info"></span>
<?php
}
?></td>
</tr>
<tr>
<td>X-ray Usage</td>
<td><?php
if($_obj_data_main->get_x_ray_usage())
{
?>
<span class="glyphicon glyphicon-ok alert-warning"></span>
<?php
}
else
{
?>
<span class="glyphicon glyphicon-remove alert-info"></span>
<?php
}
?></td>
</tr>
</tbody>
</table>
<?php
}
else
{
?>
<span class ="alert-success">No location information available. Please enter a valid area code.</span>
<?php
}
// So the loading bar doesn't look like a glitch when loading is fast.
sleep(1);
// Collect and output page markup.
echo $page_obj->markup_and_flush();
?>