<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<fmt:setBundle basename="param1" var="p1"/>
<fmt:message key="common.date.pattern.dateZH" var="dateZH" bundle="${p1}"/>
<fmt:message key="common.date.pattern.date_1" var="date_1" bundle="${p1}"/>
<fmt:message key="common.date.pattern.datetimeZH" var="datetimeZH" bundle="${p1}"/>
<fmt:message key="common.date.pattern.datetime_1" var="datetime_1" bundle="${p1}"/>
<style>
<!--
A:link {
    text-decoration: none;
    color: #003366;
}
-->
</style>

<%
    String localPath = request.getContextPath();

 %>
 <LINK rel=stylesheet type=text/css href="<%=localPath %>/jwapp/common/css/content_table.css">
 <script type="text/javascript" src="<%=localPath %>/jwapp/pages/user/js/jwAppUserModule.js"></script> 
  <table width="100%" height="75" border="0" leftmargin="0" bottommargin="0" topmargin="0" rightmargin="0">
    <tr>
     <td width="60%">
     
     </td>
     <td align="right" valign="bottom" style="color:#ffffff;">
     <div style="float:right; padding:10px;">
  
     <div class="divcss5" id="top_password"   style="display:inline;cursor:pointer;" onclick="doModifyPass();" onmouseover="this.style.background='#ccc';" onmouseout="this.style.background=''">
     <img src="<%=localPath %>/images/main/top-icon2.png"  style="height:16px;vertical-align:middle;text-align:center;"/>
              <span style="background-url:<%=localPath %>/images/main/top-icon2.png;font-size:12px;color:#fff;">密码修改</span>
     </div>&nbsp;
     <div class="divcss5" id="top_user"   style="display:inline;cursor:pointer;"  onmouseover="this.style.background='#ccc';" onmouseout="this.style.background=''">
     <img src="<%=localPath %>/images/main/top-icon1.png"  style="height:16px;vertical-align:middle;text-align:center;"/>
              <span style="font-size:12px;color:#fff;"><s:property value="#session.userInfo['EMNAME']"/></span>
     </div>&nbsp;
<!--      <div class="divcss5"   style="display:inline" onclick="showHelp(this);" onmouseover="this.style.background='#ccc';" onmouseout="this.style.background=''"> -->
<!--      <img src="<%=localPath %>/gaowj/images/icons/(08,09).png"  style="height:16px;vertical-align:middle;text-align:center;"/> -->
<!--               <span style="font-size:12px;color:#fff;">帮助</span> -->
<!--      </div>&nbsp; -->
     <div class="divcss5"   style="display:inline;cursor:pointer;" onclick="doMain('quit');" onmouseover="this.style.background='#ccc';" onmouseout="this.style.background=''">
     <img src="<%=localPath %>/images/main/top-icon3.png"  style="height:16px;vertical-align:middle;text-align:center;"/>
              <span style="font-size:12px;color:#fff;">退出</span>
     </div>

     </div>
     </td>
    </tr>
  </table>
  <div id="SendProduct" >  </div>
  <div id="modifypassDialog">
    <form id="modifypassForm" method="post">
		<table  align="center"  style="margin-top:10px;">
			<tr>
				<td style="border-bottom:1px solid #ccc;height:30px;">
					<label>原来密码:</label>
					<input class="easyui-textbox" style="width:133px;margin-left:10px;" type="password" id="OLDPASS" name="USER0_OLDPASS" data-options="required:true" />
				</td>
		    </tr>
			<tr>
				<td style="border-bottom:1px solid #ccc;height:30px;">
					<label>新的密码:</label>
					<input class="easyui-textbox" style="width:133px;margin-left:10px;" type="password" id="NEWPASS" name="USER0_NEWPASS" data-options="required:true" />
				</td>
		    </tr>
			<tr>
				<td style="border-bottom:1px solid #ccc;height:30px;">
					<label>再次输入:</label>
					<input class="easyui-textbox" style="width:133px;margin-left:10px;" type="password" id="AGAINNEWPASS" name="USER0_AGAINNEWPASS" data-options="required:true" />
				</td>
			</tr>
		</table>
	</form>
  </div>
  <div id="personInfo" style="left: 0px; top: 35px;">
            <div class="arrow"></div>
            <table border="0" cellpadding="0" cellspacing="0" class="tableStyle"
		style="width: 300px;line-height:25px;">
		<tr>
			<td colspan="2" align="center" style="text-align:center;font-size:13px;">
			  <span>用户信息</span>
			</td>
		</tr>
		<tr>
		   <td style="width:100px" class="tableStyleLable">
		     <span>操作人员:</span>
		   </td>
		   <td>
		    <span id="p_session_userName"><s:property value="#session.userInfo['EMNAME']"/></span>
		   </td>
		</tr>
		<tr>
		   <td style="width:100px" class="tableStyleLable">
		     <span>所属单位:</span>
		   </td>
		   <td>
		    <span id="p_session_userDepart"><s:property value="#session.userInfo['EMDEPARTNAME']"/></span>
		   </td>
		</tr>
		<tr>
		   <td style="width:100px" class="tableStyleLable">
		     <span>登录账户:</span>
		   </td>
		   <td>
		    <span id="p_session_userLoginid"><s:property value="#session.userInfo['EMID']"/></span>
		   </td>
		</tr>
		<tr>
		   <td style="width:100px" class="tableStyleLable">
		     <span>登录人IP:</span>
		   </td>
		   <td>
		    <span id="p_session_userLoginip"><s:property value="#session.userInfo['LOGINIP']"/></span>
		   </td>
		</tr>
		<tr>
		   <td style="width:100px" class="tableStyleLable">
		     <span>上次登录时间:</span>
		   </td>
		   <td>
		    <span id="p_session_userBeforetime"><s:property value="#session.userInfo['BEFORETIME']"/></span>
		   </td>
		</tr>
	</table>
            
        </div>
        <script type="text/javascript" src="<%=localPath %>/jwapp/common/js/jwAppCommonModule.js"></script>
<script type="text/javascript">
 $("#personInfo").hide();
 $("#modifypassDialog").hide();
 function doMain(idx){
		  
	  if(idx=='quit'){
		  if(window.confirm('<fmt:message key="common.quit.click" bundle="${p1}"/>?')){
              window.top.location = "<%=localPath %>/logout";
              //window.top.location = WebContextPath + "/logoutcas.jsp";
//               window.top.location = "<%=localPath %>/logoutcas.jsp"
             return true;
           }else{
             return false;
         }
	  }else{
		  window.top.location = "<%=localPath %>/login"; 
	  }
  }
  
  function doModifyPass(){


      $("#modifypassDialog").show();
      $("#modifypassForm")[0].reset();
      $('#modifypassDialog')
			.dialog(
					{
						iconCls : 'icon-ext-password',
						title : '密码修改',
						width : 300,
						height : 200,
						closed : false,
						cache : false,
						minimizable : false,
						maximizable : false,
						resizable : true,
						modal : true,
						buttons : [
								{
									text : '保存',
									iconCls : 'icon-ok',
									handler : function() {
										if (!($("#modifypassForm").validateSubmit()))
											return;
										if ($('#modifypassForm').form('validate')) {
											var v_entity = $("#modifypassForm").getFormVal();
											//var v_result = jwAppCommonModel.jwAppsCommonActAction.modifyPass(v_entity);//原来是改接口用户的密码
											var v_result = jwAppUserModel.jwAppsUserActAction.modifyPass(v_entity);
											$('#modifypassDialog').dialog("close");
											$.messager.alert('提示',v_result.VALUE, "info");
										}
									}
								},
								{
									text : '返回',
									iconCls : 'icon-back',
									handler : function() {
										$('#modifypassDialog').dialog('close');
									}
								} ]

					});
    }

$('#top_user').tooltip( {
	content : $('#personInfo').html(),
	showEvent : 'click',
	onShow : function() {
		var t = $(this);
		t.tooltip('tip').css( {
			backgroundColor : '#ffffff'
		//borderColor: '#666'
				}).unbind().bind('mouseenter', function() {
			t.tooltip('show');
		}).bind('mouseleave', function() {
			t.tooltip('hide');
		});
	}

});

</script>
