Init EZParkingGPRS project into Coding.net

This commit is contained in:
qwsun
2015-12-21 13:35:57 +08:00
commit 9b40bb35c9
51 changed files with 2195 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,122 @@
<HTML>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<title>EZParking</title>
<script language="JavaScript" type="text/javascript">
var searchReq = createAjaxObj();
function createAjaxObj()
{
var httprequest = false;
if (window.XMLHttpRequest)
{
httprequest = new XMLHttpRequest()
if (httprequest.overrideMimeType)
httprequest.overrideMimeType('text/xml')
}
else if (window.ActiveXObject)
{
try
{
httprequest = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httprequest = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
}
}
}
return httprequest
}
function searchSuggest()
{
searchReq.open("POST", 'jqueryEZParkingStatus', true);
searchReq.onreadystatechange = handleEZParkingStatus;
searchReq.send(null);
}
function handleEZParkingStatus()
{
if (searchReq.readyState == 4)
{
var str = searchReq.responseText.split(",");
for (var i = 0; i <= str.length - 1; i++)
{
alert(str[i])
var parkingIdStatus = str[i].split("_");
if(parkingIdStatus[1] == "1")
{
document.getElementById("position"+parkingIdStatus[0]).style.background = "#FF0000";
}
if(parkingIdStatus[1] == "0")
{
document.getElementById("position"+parkingIdStatus[0]).style.background = "#00FF40";
}
}
}
}
setInterval("searchSuggest()",60000);
</script>
</head>
<Body>
<p>东园小区停车位地图</p>
<div style="width:9px;height:20px;">
<div id="position226" style="background:#00FF40;width:9px;height:20px;position:relative;left:310px;top:171px"></div>
<div id="position227" style="background:#00FF40;width:9px;height:20px;position:relative;margin-top:-21px;left:310px;top:194px"></div>
<div id="position228" style="background:#00FF40;width:9px;height:20px;position:relative;margin-top:-21px;left:310px;top:217px"></div>
<div id="position229" style="background:#00FF40;width:9px;height:20px;position:relative;margin-top:-21px;left:310px;top:271px"></div>
<div id="position230" style="background:#00FF40;width:9px;height:20px;position:relative;margin-top:-21px;left:310px;top:304px"></div>
<div id="position231" style="background:#00FF40;width:9px;height:19px;position:relative;margin-top:-21px;left:310px;top:338px"></div>
<div id="position232" style="background:#00FF40;width:19px;height:9px;position:relative;margin-top:-10px;left:299px;top:357px"></div>
<div id="position233" style="background:#00FF40;width:9px;height:20px;position:relative;margin-top:-21px;left:310px;top:389px"></div>
<div id="position234" style="background:#00FF40;width:9px;height:19px;position:relative;margin-top:-21px;left:310px;top:412px"></div>
<div id="position235" style="background:#00FF40;width:19px;height:9px;position:relative;margin-top:-10px;left:290px;top:424px"></div>
<div id="position236" style="background:#00FF40;width:19px;height:9px;position:relative;margin-top:-10px;left:290px;top:434px"></div>
<div id="position237" style="background:#00FF40;width:19px;height:9px;position:relative;margin-top:-10px;left:290px;top:444px"></div>
<div id="position238" style="background:#00FF40;width:19px;height:9px;position:relative;margin-top:-10px;left:290px;top:454px"></div>
<div id="position239" style="background:#00FF40;width:9px;height:20px;position:relative;margin-top:-21px;left:310px;top:483px"></div>
<div id="position240" style="background:#00FF40;width:9px;height:20px;position:relative;margin-top:-21px;left:310px;top:505px"></div>
<div id="position241" style="background:#00FF40;width:9px;height:20px;position:relative;margin-top:-21px;left:310px;top:528px"></div>
<div id="position242" style="background:#00FF40;width:9px;height:20px;position:relative;margin-top:-20px;left:336px;top:159px"></div>
<div id="position243" style="background:#00FF40;width:9px;height:20px;position:relative;margin-top:-20px;left:336px;top:181px"></div>
<div id="position244" style="background:#00FF40;width:9px;height:20px;position:relative;margin-top:-20px;left:336px;top:203px"></div>
<div id="position245" style="background:#00FF40;width:9px;height:20px;position:relative;margin-top:-20px;left:336px;top:225px"></div>
<div id="position246" style="background:#00FF40;width:19px;height:9px;position:relative;margin-top:-10px;left:347px;top:238px"></div>
<div id="position247" style="background:#00FF40;width:19px;height:9px;position:relative;margin-top:-10px;left:377px;top:239px"></div>
<div id="position248" style="background:#00FF40;width:20px;height:9px;position:relative;margin-top:-10px;left:399px;top:240px"></div>
<div id="position249" style="background:#00FF40;width:9px;height:20px;position:relative;margin-top:-20px;left:337px;top:283px"></div>
<div id="position250" style="background:#00FF40;width:9px;height:20px;position:relative;margin-top:-20px;left:337px;top:305px"></div>
<div id="position251" style="background:#00FF40;width:9px;height:20px;position:relative;margin-top:-20px;left:337px;top:339px"></div>
<div id="position252" style="background:#00FF40;width:9px;height:20px;position:relative;margin-top:-20px;left:337px;top:361px"></div>
<div id="position253" style="background:#00FF40;width:9px;height:20px;position:relative;margin-top:-20px;left:337px;top:428px"></div>
<div id="position254" style="background:#00FF40;width:9px;height:20px;position:relative;margin-top:-20px;left:337px;top:450px"></div>
<div id="position255" style="background:#00FF40;width:9px;height:20px;position:relative;margin-top:-20px;left:337px;top:482px"></div>
<div id="position256" style="background:#00FF40;width:9px;height:20px;position:relative;margin-top:-20px;left:337px;top:504px"></div>
<div id="position257" style="background:#00FF40;width:20px;height:9px;position:relative;margin-top:-10px;left:412px;top:318px"></div>
<div id="position258" style="background:#00FF40;width:20px;height:9px;position:relative;margin-top:-10px;left:434px;top:319px"></div>
<div id="position259" style="background:#00FF40;width:20px;height:9px;position:relative;margin-top:-10px;left:456px;top:320px"></div>
<div id="position260" style="background:#00FF40;width:20px;height:9px;position:relative;margin-top:-10px;left:478px;top:321px"></div>
<div id="position261" style="background:#00FF40;width:20px;height:9px;position:relative;margin-top:-10px;left:501px;top:322px"></div>
<div id="position262" style="background:#00FF40;width:20px;height:9px;position:relative;margin-top:-10px;left:524px;top:323px"></div>
<div id="position263" style="background:#00FF40;width:19px;height:9px;position:relative;margin-top:-10px;left:438px;top:404px"></div>
<div id="position264" style="background:#00FF40;width:20px;height:9px;position:relative;margin-top:-10px;left:458px;top:405px"></div>
<div id="position265" style="background:#00FF40;width:20px;height:9px;position:relative;margin-top:-10px;left:480px;top:406px"></div>
<div id="position266" style="background:#00FF40;width:20px;height:9px;position:relative;margin-top:-10px;left:503px;top:407px"></div>
</div>
<div class="div">
<img src="dongyuan.bmp" border="0" usemap="#planetmap" alt="Parking" />
<map name="planetmap" id="planetmap"></map>
</div>
</Body>
</HTML>

View File

@ -0,0 +1,88 @@
<HTML>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<title>EZParking Update Position</title>
<script language="JavaScript" type="text/javascript">
var searchReq = createAjaxObj();
function createAjaxObj()
{
var httprequest = false;
if (window.XMLHttpRequest)
{
httprequest = new XMLHttpRequest()
if (httprequest.overrideMimeType)
httprequest.overrideMimeType('text/xml')
}
else if (window.ActiveXObject)
{
try
{
httprequest = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
httprequest = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{
}
}
}
return httprequest
}
function createQueryString()
{
var moduleID=document.getElementById("moduleID").value;
var statusAry = document.getElementsByName("statusId");
for(var i=0; i<statusAry.length; i++)
{
if(statusAry[i].checked)
{
var status=statusAry[i].value;
}
}
var queryString="moduleID=" + moduleID + "&status=" + status;
return queryString;
}
function updateStatus()
{
var queryString=createQueryString();
searchReq.open("POST", 'jqueryUpdateStatus', true);
searchReq.onreadystatechange = handleEZParkingStatus;
searchReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
searchReq.send(queryString);
}
function handleEZParkingStatus()
{
if (searchReq.readyState == 4)
{
alert("Update Successfully");
}
}
</script>
</head>
<Body>
<div class="div">
ModuleID:<input type="text" id="moduleID">
<br/>
Have Car:<input id="statusRadio" name="statusId" type="radio" value="1" />
&nbsp;&nbsp;
No Car:<input id="statusRadio" name="statusId" type="radio" value="0" />
<br/>
<button type="button" onClick="updateStatus()">Update</button>
<br/><br/>
<img src="position.jpg" width="600" height="700" />
</div>
</body>
</html>

View File

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>parking</servlet-name>
<servlet-class>com.ezparking.gprs.EZParkingMap</servlet-class>
</servlet>
<servlet>
<servlet-name>updatePage</servlet-name>
<servlet-class>com.ezparking.gprs.EZParkingUpdatePage</servlet-class>
</servlet>
<servlet>
<servlet-name>ezparkingList</servlet-name>
<servlet-class>com.ezparking.gprs.EZParkingList</servlet-class>
</servlet>
<servlet>
<servlet-name>ezparkingServlet</servlet-name>
<servlet-class>com.ezparking.gprs.EZParkingServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>send</servlet-name>
<servlet-class>com.ezparking.gprs.EZParkingSend</servlet-class>
</servlet>
<servlet>
<servlet-name>jqueryEZParkingStatus</servlet-name>
<servlet-class>com.ezparking.gprs.EZParkingStatusServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>jqueryUpdateStatus</servlet-name>
<servlet-class>com.ezparking.gprs.EZParkingUpdateServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>parking</servlet-name>
<url-pattern>/parking</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>updatePage</servlet-name>
<url-pattern>/updatePage</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ezparkingList</servlet-name>
<url-pattern>/ezparkingList</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ezparkingServlet</servlet-name>
<url-pattern>/ezparking</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>send</servlet-name>
<url-pattern>/send</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>jqueryEZParkingStatus</servlet-name>
<url-pattern>/jqueryEZParkingStatus</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>jqueryUpdateStatus</servlet-name>
<url-pattern>/jqueryUpdateStatus</url-pattern>
</servlet-mapping>
</web-app>