This repository has been archived by the owner on Mar 29, 2024. It is now read-only.
forked from tjk911/lohud-pensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
retire_form_2014.php
349 lines (344 loc) · 11.3 KB
/
retire_form_2014.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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
<?php
// ini_set('display_errors', 1);
// ini_set('display_startup_errors', 1);
// error_reporting(E_ALL);
// header("Location: http://data.lohud.com/tools/pensions/retire_form_2014.php");
// die();
require('mysql_connect2.php');
function selectDistinct ($connection, $tableName, $attributeName, $counties = 0, $pulldownName, $alltext,$selected) {
$defaultWithinResultSet = FALSE;
// Query to find distinct values of $attributeName in $tableName
$distinctQuery = "SELECT DISTINCT {$attributeName} FROM {$tableName} WHERE 1";
if($counties&&is_array($counties)) {
$distinctQuery .=" and ccde in (\"" . implode('", "', $counties) . "\")";
}
elseif(strlen($counties)==2) {
$distinctQuery .=" and ccde = \"" . $counties . "\"";
}
$distinctQuery .= " and {$attributeName} IS NOT NULL AND LENGTH({$attributeName})>0 ORDER BY 1";
//for debugging only
//echo $distinctQuery;
// Run the distinctQuery on the databaseName
$resultId = mysql_query ($distinctQuery) or die ("\n<select name=\"{$pulldownName}\" id=\"id_{$pulldownName}\" ><option selected = 1 value =\"all\">No records found</option>");
// Start the select widget
print "\n<select name=\"{$pulldownName}\" id=\"id_{$pulldownName}\" ><option value =\"all\">All {$alltext}</option>";
// Retrieve each row from the query
while ($row = @ mysql_fetch_array($resultId)){
// Get the value for the attribute to be displayed
$result = addslashes($row[$attributeName]);
// Check if a defaultValue is set and, if so, is it the
// current database value?
print "\n\t<option";
if ($result == $selected) {
print " selected = \"yes\"";
}
print " value=\"{$result}\">{$result}";
print "</option>";
}
print "\n</select>";
} //ends function
//include("header.html");
$pageref = "NYS Retirement 2014" ;
include('header.php')
?>
<div id='banner' style="height:77px;"></div>
<script>
if(window.self==window.top) {
var banner = document.getElementById("banner");
banner.style.backgroundColor = "black";
banner.innerHTML = "<a href='http://www.lohud.com'><img src='http://data.lohud.com/lohud%20logos/site-masthead-logo.png' width='300' /></a><br>";
}
</script>
<div class="row" style="padding-top:20px; padding-bottom:20px;">
<div class="large-12 columns">
<h3 class="pcase">Find NY state and local pensions (2014)</h3>
<p>See records for all 383,583 retirees from agencies and municipalities whose pensions were calculated by the end of the fiscal year March 31.</p>
<p>School districts are included but list only non-professional employees. Teachers and administrators use a different retirement system.</p>
<form action="see_retire_2014.php" id="searchform" method="get" name="searchform" target="dataframe" class="callout primary">
<table valign="top">
<tr>
<td>
<fieldset>
<legend>Search options</legend>
<label for="id_frmcounty"">County:</label>
<select id="id_frmcounty" name="county">
<option value="lohud">
Lower Hudson Valley
</option>
<option value="all">
Statewide
</option>
<option>
Westchester
</option>
<option>
Rockland
</option>
<option>
Putnam
</option>
<option>
Albany
</option>
<option>
Allegany
</option>
<option>
Bronx
</option>
<option>
Broome
</option>
<option>
Cattaraugus
</option>
<option>
Cayuga
</option>
<option>
Chautauqua
</option>
<option>
Chemung
</option>
<option>
Chenango
</option>
<option>
Clinton
</option>
<option>
Columbia
</option>
<option>
Cortland
</option>
<option>
Delaware
</option>
<option>
Dutchess
</option>
<option>
Erie
</option>
<option>
Essex
</option>
<option>
Franklin
</option>
<option>
Fulton
</option>
<option>
Genesee
</option>
<option>
Greene
</option>
<option>
Hamilton
</option>
<option>
Herkimer
</option>
<option>
Jefferson
</option>
<option>
Kings
</option>
<option>
Lewis
</option>
<option>
Livingston
</option>
<option>
Madison
</option>
<option>
Monroe
</option>
<option>
Montgomery
</option>
<option>
Nassau
</option>
<option>
New York
</option>
<option>
Niagara
</option>
<option>
Oneida
</option>
<option>
Onondaga
</option>
<option>
Ontario
</option>
<option>
Orange
</option>
<option>
Orleans
</option>
<option>
Oswego
</option>
<option>
Otsego
</option>
<option>
Queens
</option>
<option>
Rensselaer
</option>
<option>
Richmond
</option>
<option>
Saratoga
</option>
<option>
Schenectady
</option>
<option>
Schoharie
</option>
<option>
Schuyler
</option>
<option>
Seneca
</option>
<option>
St Lawrence
</option>
<option>
Steuben
</option>
<option>
Suffolk
</option>
<option>
Sullivan
</option>
<option>
Tioga
</option>
<option>
Tompkins
</option>
<option>
Ulster
</option>
<option>
Warren
</option>
<option>
Washington
</option>
<option>
Wayne
</option>
<option>
Wyoming
</option>
<option>
Yates
</option>
<option>
Unknown
</option>
</select>
<label for="id_frm_muni"">Employer:</label>
<select id="id_frm_muni" name="frm_muni">
<option selected="yes" value='all'>
Choose county to see employers
</option>
</select>
<label for="id_frm_name"">Retiree name:</label>
<input id="id_frm_name" name="frm_name" size="25" type="text">
<legend>Advanced options</legend>
<div class="large-6 columns">
<label for="id_frm_100k"">Pensions over $100k only</label>
<input checked id="id_frm_100k" name="frm_100k" type="checkbox" value="yes">
</div>
<div class="large-6 columns">
<label for="id_frm_local"">Local(non-state) employers only</label>
<input checked id="id_frm_local" name="frm_local" type="checkbox" value="yes">
</div>
<label for="id_frmyear"">Retirement year:</label>
<select id="id_frmyear" name="year">
<option value="all">
All
</option>
<option>
2014
</option>
<option>
2013
</option>
<option>
2012
</option>
<option>
2011
</option>
<option>
2010
</option>
<option>
2009
</option>
<option>
2008
</option>
<option>
2007
</option>
<option>
2006
</option>
<option>
2005
</option>
<option>
2004
</option>
<option>
2003
</option>
<option>
2002
</option>
<option>
2001
</option>
<option>
2000
</option>
</select>
</fieldset>
<input type="submit" class="button" value="SUBMIT">
<input onclick="location.href='retire_form_2014.php'" class="button" type="button" value="NEW SEARCH">
<input type="reset" class="button" value="RESET FORM">
</td>
</tr>
</table>
</form>
</div>
<div class="large-12 columns">
<iframe frameborder="0" height="700" id="dataframe" name="dataframe" src="see_retire_2014.php?county=lohud&frm_100k=yes&frm_local=yes" width="100%"></iframe>
</div>
</div>
<?php
include('footer.php')
?>