-
Notifications
You must be signed in to change notification settings - Fork 94
/
index.jsp
204 lines (165 loc) · 7.31 KB
/
index.jsp
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
<%@ page language="java" import="java.util.*, java.text.*,java.io.*,gov.nysenate.openleg.*,gov.nysenate.openleg.model.*" pageEncoding="UTF-8"%>
<%
session.setAttribute("term","");
session.removeAttribute("mobile");
String appPath = request.getContextPath();
if (appPath.equals("/openleg"))
{
String newUri = request.getRequestURI();
newUri = newUri.replace("/openleg","/legislation");
response.sendRedirect(newUri);
return;
}
String userAgent = request.getHeader("user-agent").toLowerCase();
if (userAgent.indexOf("mobile") != -1 || userAgent.indexOf("wap") != -1 || userAgent.indexOf("blackberry")!=-1
|| userAgent.indexOf("wml")!=-1 || userAgent.indexOf("nokia")!=-1|| userAgent.indexOf("midp")!=-1 ||userAgent.indexOf("mobi")!=-1)
{
response.sendRedirect(appPath + "/mobile");
return;
}
%>
<%
Bill bill = null;
String last = null;
DateFormat df = SimpleDateFormat.getDateInstance(SimpleDateFormat.MEDIUM);
%>
<%
String title = request.getParameter("title");
if (title == null)
title = "The New York Senate Open Legislation Service";
String term = (String)session.getAttribute("term");
if (term == null)
term = "";
String billkey = request.getParameter("billkey");
if (billkey == null)
billkey = "";
%>
<html>
<head>
<script type="text/javascript">var _sf_startpt=(new Date()).getTime()</script>
<title><%=title%></title>
<link rel="shortcut icon" href="<%=appPath%>/img/nys_favicon_0.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" media="screen" href="<%=appPath%>/style.css"/>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=0;" />
<meta name="apple-mobile-web-app-capable" content="YES">
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<%=appPath%>/feed" />
<script type="text/javascript" src="<%=appPath%>/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="<%=appPath%>/js/search.js"></script>
</head>
<body>
<div id="header-home" style="margin-top:0px">
<div style="float:left;">
<a href="http://nysenate.gov">NYSenate.gov</a>:
<a href="http://nysenate.gov/senators">Senators</a> |
<a href="http://nysenate.gov/committees">Committees</a> |
<a href="http://nysenate.gov/issues-initiatives">Issues & Initiatives</a> |
<!--
<a href="http://nysenate.gov/legislation-open-senate">Open Senate</a> |
<a href="http://nysenate.gov/about-us">About</a> |
<a href="http://nysenate.gov/media">Photos & Videos</a> |
-->
<a href="http://nysenate.gov/newsroom">Newsroom</a>
</div>
<div style="float:right;">
<a href="<%=appPath%>/feedback">FEEDBACK</a> |
<a href="<%=appPath%>/mobile/info">Mobile Access</a> |
<a href="<%=appPath%>/developers">Developers</a>
</div>
</div>
<br/><br/>
<center>
<div style="width:750px;text-align:left;">
<div><a href="<%=appPath%>"><img src="<%=appPath%>/img/openleglogo.gif" /></a></div>
</div>
<div style="text-align:left;width:500px;">
<h2 class="homeText">Browse, search and share legislative<br/>
information from the New York State Senate</h2>
</div>
<div style="text-align:left;width:500px;margin-top:20px;">
<form method="get" action="<%=appPath%>/search/">
<input type="text" id="txtSearchBox" style="width:300px" name="search" autocomplete="off" value="<%=term%>">
<input type="submit" value="Search"/>
<span style="color:#999;margin:3px;font-size:12px;">
<a href="<%=appPath%>/advanced/">Advanced</a>
</span>
<div id="quickresult"></div>
<div style="color:#999;margin:3px;font-size:12px;">
<!-- Search by bill, sponsor, committee or keyword from the 2009-2010 session -->
Browse Bills:
<a href="<%=appPath%>/senators">by Sponsor</a>,
<a href="<%=appPath%>/committees">by Committee</a>
<br/>
View Recent:
<a href="<%=appPath%>/bills/">Bills</a>,
<a href="<%=appPath%>/calendars/">Calendars</a>,
<a href="<%=appPath%>/meetings/">Meetings</a>,
<a href="<%=appPath%>/transcripts/">Transcripts</a>,
<a href="<%=appPath%>/actions/" title="Actions on Bills from the Floor of the Senate">Actions</a>,
<a href="<%=appPath%>/votes/">Votes</a>
<br/>
Community: <a href="<%=appPath%>/comments">View and respond to recent comments</a>
<br/> <br/><br/>
</div>
</form>
</div>
<br style="clear:both;"/><br/>
</center>
<center>
<div id="footer" style="width:500px;text-align:left;font-size:8pt;line-height:14px">
<em>You are using Open Legislation v1.8.4, an <a href="<%=appPath%>/license">open-source project</a></em>
<div style="height:400px;float:left;padding:0px;width:96px;">
<a rel="license" href="http://www.nysenate.gov/copyright-policy"><img class="cc-logo" alt="Creative Commons License" src="http://i.creativecommons.org/l/by-nc-nd/3.0/us/88x31.png" align='left' /></a>
</div>
<div id="footer-message" style="width:370px;float:left;">
<p>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Creative Commons License</a>.
<br/> Permissions beyond the scope of this license are available <a cc="http://creativecommons.org/ns#" href="http://www.nysenate.gov/copyright-policy" rel="morePermissions">here</a>.
</p>
</div>
</div>
<!--
<div id="footer" style="width:700px;text-align:left;line-height:12px;">
<div style="height:400px;float:left;padding:0px;width:96px;">
<a rel="license" href="http://www.nysenate.gov/copyright-policy"><img class="cc-logo" alt="Creative Commons License" src="http://i.creativecommons.org/l/by-nc-nd/3.0/us/88x31.png" align='left' /></a>
</div>
<div id="footer-message" style="width:370px;line-height:9px;padding-top:3px;float:left;margin-right:10px;">
<p>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/us/">Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License</a>.
<br/><br/>
Permissions beyond the scope of this license are available at <a cc="http://creativecommons.org/ns#" href="http://www.nysenate.gov/copyright-policy" rel="morePermissions">http://www.nysenate.gov/copyright-policy</a>.
<br/><br/>
The software and services provided under this site are offered under the BSD License and the GPL v3 License.<br/>
</p>
</div>
</div>
-->
</center>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8171983-6");
pageTracker._trackPageview();
} catch(err) {}</script>
<br/><br/>
<script type="text/javascript">
var _sf_async_config={uid:2873,domain:"open.nysenate.gov"};
(function(){
function loadChartbeat() {
window._sf_endpt=(new Date()).getTime();
var e = document.createElement('script');
e.setAttribute('language', 'javascript');
e.setAttribute('type', 'text/javascript');
e.setAttribute('src',
(("https:" == document.location.protocol) ? "https://s3.amazonaws.com/" : "http://") +
"static.chartbeat.com/js/chartbeat.js");
document.body.appendChild(e);
}
var oldonload = window.onload;
window.onload = (typeof window.onload != 'function') ?
loadChartbeat : function() { oldonload(); loadChartbeat(); };
})();
</script>
</body>
</html>