<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort();
	//生成一个Date实例
	java.util.Date now = new java.util.Date();
	//将该Date实例设置成一个pageContext里的属性
	pageContext.setAttribute("now", now);
%>
 
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>车辆监控平台</title>
		<link rel="stylesheet"
			href="http://192.168.1.120:8088/OpenLayers/theme/default/style.css"
			type="text/css" />
		<link rel="stylesheet" type="text/css"
			href="<%=path%>/css/themes/gray/easyui.css" />
		<link rel="stylesheet" type="text/css"
			href="<%=path%>/css/themes/icon.css"/> 
		<link rel="stylesheet" type="text/css"
			href="<%=path%>/css/index/index.css" />
		
		<script type="text/javascript" src="<%=path%>/js/jquery-1.4.4.min.js"></script>
		<script type="text/javascript" src="<%=path%>/js/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="<%=path%>/js/easyui-lang-zh_CN.js"></script>
		<script type="text/javascript" src="<%=path%>/js/jquery.cookie.js"></script>
		<script type="text/javascript" src="<%=path%>/js/index/login.js"></script>
		<script type="text/javascript" src="<%=path%>/js/index/list.js"></script>
		<script type="text/javascript" src="<%=path%>/js/index/table.js"></script>
		<script type="text/javascript" src="<%=path%>/js/index/map.js"></script>
	
		<script src="http://192.168.1.120:8088/OpenLayers/lib/OpenLayers.js"></script>
		<script src="http://192.168.1.120:8088/OpenLayers/MapUtils.js"></script>
		
		<!-- playBack -->
		<script type="text/javascript" src="<%=path%>/js/playBack/playBack.js"></script>

		<script type="text/javascript">
		 var cutVehicle=new Object();
		     cutVehicle.id=10001;
		     cutVehicle.vhcName="陕A123456";
		  $(function(){
				  $('#sb').splitbutton({
					    menu:'#mm'
					});
				  $('#gjhftitle').splitbutton({
					   
					});
		  <% if(session.getAttribute("user")==null){%>

		    login();
		  <%}else{%>
		     getGroup(); 
		     $("#loginmenu").hide();
		     $("#login").hide(); 
		     $("#time").text($("#ss").val());
		     $("#login").window('close');
		  <%}%>
		  });  
		</script>
	</head>
	<body >
	
		<!-- 登录窗口开始 -->
		<div id="login" title="用户登录" style="width: 300px; height: 200px;display:none;">
				<div class="easyui-layout" fit="true">
					   <div region="center" border="false" style="padding:10px;background:#fff;">
							<table>
								<tr align="center">
									<th align="center">
										类型:
									</th>
									<td align="center">
										
										<select id="userType" name="userType" style="width:153px;">
										    <option value="100">企业用户</option>
										    <option value="-100">个人用户</option>
										   
										</select>
									</td>
								</tr>
								<tr align="center">
									<th align="center">
										帐号:
									</th>
									<td align="center">
										<input id="username" type="text"/>
									</td>
								</tr>
								<tr align="center">
									<th align="center">
										密码:
									</th>
									<td align="center">
										<input id="password" type="password" />
									</td>
								</tr>
								<tr align="center">
									<th>										
									</th>
									<td align="center">
										<span id="logmes" style="color:#FF0000"></span>
									</td>
								</tr>								
							</table>					
				      </div>
				  <div region="south" border="false" style="text-align:center;height:25px;line-height:25px;background:#fff;">
					<a class="easyui-linkbutton" iconCls="icon-ok" href="javascript:void(0)" onclick="logincheck()">登陆</a>
				  </div>			
			    </div>
		</div>
		<!-- 登录窗口结束 -->
		
		<!-- 系统设置窗口开始-->
		<div id="loadTypeSet" title="系统设置"
			style="display:none;">
		  <div class="easyui-layout" fit="true">
			   <div region="center" border="false" style="padding:10px;background:#fff;border:1px solid #ccc;">
					<table align="center">
						<tr>
							<td align="left">
						       <input type="radio" name="loadtype" checked="checked"  value="1"/>&nbsp;车辆和组一起加载
							<br></td>
						</tr>
						<tr>
							<td align="left">
				                     <input name="loadtype" id="loadGroup" type="radio" value="0"/>&nbsp;加载组
							<br></td>
						</tr>
					</table>
				</div>
				<div region="south" border="false" style="text-align:right;height:25px;line-height:25px;background:#fff;">
					<a class="easyui-linkbutton" iconCls="icon-ok" href="javascript:void(0)" onclick="setLoadType()">确定</a>
				</div>				
		  </div>
		</div>
		<!-- 系统设置窗口开始结束-->

   <div id="cc" class="easyui-layout" style="width:1200px;height:700px;">

		    <div region="north" title="" split="false"  style="height:40px;" >		    
		         <a href="javascript:void(0)" id="sb" iconCls="icon-ok">系统</a>
		         <div id="mm" style="width:100px;">
				    <div iconCls="icon-ok" onclick="loadTypeSet()">系统设置</div>
				    <div  iconCls="icon-cancel" onclick="outSys()">退出</div>
			     </div>
		    	 剩余时间:<span id="time"></span>秒<input id="ss" value="15" style="width:80px;"></input>
		    	     <img id="refersh" src="css/themes/icons/reload.png" />&nbsp;
		    	            用户名: <span id="name">${sessionScope.user.userName}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
		    	    <s:set name="utlist" value="#{0:'系统管理员',1:'一级管理员',2:'二级管理员',-1:'普通监控员',10:'演示账号',-100:'个人用户'}"></s:set>       
		    	            用户类型:<span id="userType"><s:iterator var="ut" value="#utlist" id="ut" status="index"  >
		    	               <s:if test="%{#ut.key-#session.user.userType==0}"> <s:property value="#ut.value"/></s:if>
		    	            </s:iterator></span>		    	            		    	           		    	         

		    </div>
		    <div region="south" title="" split="false" style="height:250px;width:1200px;" >
		    	<table id="table"></table>
		    </div>
		    <!-- 轨迹回放列表 -->
		    <div id="guiji" region="south" title="" split="false"  style="height:250px;width:1200px;display:none;" >
		    	<table id="gtable"></table>
		    </div>
		    <!-- 轨迹回放列表结束 -->
		    <div  region="center" title=""  style="width:1200px;height:500px;" >
			     <div class="easyui-layout" fit="true">			        
			        <div region="center" title="">
			            <div class="easyui-layout" fit="true">
			         <!--轨迹回放地图  -->

			         <div id="guijimappanel" region="center" title="轨迹回放地图" iconCls="icon-reload" title="East" split="true" style="width:800px;" >
			            <div id="guijimap"></div>
			         </div>


			         <!--轨迹回放地图结束 -->


			               <div id="mappanel" region="center" title="地图窗" iconCls="icon-reload" title="East" split="true" style="width:800px;" >
			                 <div id="map"></div>
			               </div>
			               <div region="south" title="" split="true"  style="height:40px;">
			                     <form  id="gjhf_form_id" method="post" novalidate>
			                   <a href="javascript:void(0)" id="gjhftitle" iconCls="icon-ok">轨迹回放</a>
			             
			                车辆:<span id="vehName" style="display:inline-block;width:80px;">&nbsp;</span>
			                  
			            <input id="vhcid" name="vhcid" type="hidden" value=""/>       
			            <input id="vehicle" name="vehicle" type="hidden" value=""/>  
			            <input name="datatype" type="hidden" value="1"/>       
			            <input name="intermin" type="hidden" value="5"/>       
			            <input name="timeorder" type="hidden" value="0"/>       
			            <input name="ip" type="hidden" value=""/>       
			            <input name="port" type="hidden" value=""/>       
			            <input name="cret" type="hidden" value=""/>
			            <input name="key" type="hidden" value="e617a19e0b2621bffb239dc0eb836bdf"/>       
			            <input id="b_time_gjhf_v" name="begin_time" type="hidden" value=""/>       
			            <input id="e_time_gjhf_v" name="end_time" type="hidden" value=""/>       
			                   选择日期:<input id="date_gjhf" class="easyui-datebox" type="text" value="<s:date  name="#attr.now" format="yyyy-MM-dd"></s:date>"/>
			                   开始时间:<input  id="b_time_gjhf"    type="text" value="00:00:00" class="easyui-timespinner" style="width:75px;" showSeconds="true" onkeydown="return false" onkeyup="return false" oncontextmenu="return false"/>
			                   结束时间:<input  id="e_time_gjhf"   type="text" value="23:59:59"  class="easyui-timespinner" style="width:75px;" showSeconds="true" onkeydown="return false" onkeyup="return false" oncontextmenu="return false"/>				  
				   <a id="OpenPlay" href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-search'">回放</a>
				   
				      <a href="javascript:void(0);" id="close" class="easyui-linkbutton" style="display: none;" data-options="plain:true,iconCls:'icon-back'">返回</a>
				</form>

			               </div>
			            </div>
			        </div>
			        
			         
				     <div region="west" id="tt2" title="车辆分组" split="false" title="West" style="width:200px;" ></div>
			    </div>

		    
		    </div>
   </div>
   
  
	</body>
</html>