index.jsp 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <%@ page contentType="text/html;charset=GBK"%>
  2. <html>
  3. <head>
  4. <title>F1jFrameWork Java快速业务实现平台-控制台</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=GBK">
  6. <link rel="stylesheet" type="text/css" href="/shares/resources/css/easyui/themes/default/easyui.css">
  7. <link rel="stylesheet" type="text/css" href="/shares/resources/css/easyui/themes/icon.css">
  8. <script src="/shares/js/jquery.js" type="text/javascript"></script>
  9. <script src="/shares/js/jquery.cookie.js" type="text/javascript"></script>
  10. <script type="text/javascript" src="/shares/js/constant.js"></script>
  11. <SCRIPT LANGUAGE="JavaScript" SRC="/shares/js/chkutil.js"></SCRIPT>
  12. <SCRIPT LANGUAGE="JavaScript" SRC="/shares/js/strUtil.js"></SCRIPT>
  13. <SCRIPT LANGUAGE="JavaScript" SRC="/shares/js/form-zh-CN.js"></SCRIPT>
  14. <SCRIPT LANGUAGE="JavaScript" SRC="/shares/js/form.js"></SCRIPT>
  15. <script type="text/javascript" src="/shares/js/plug-in/jquery.easyui.min.js"></script>
  16. <script type="text/javascript">
  17. $(function() {
  18. if( $.cookie('username') ){
  19. $("#login_no").val( $.cookie('username') );
  20. }
  21. if( $.cookie('cssfile') ){
  22. //$("#mySel").val( $.cookie('cssfile') );
  23. }
  24. });
  25. </script>
  26. <script language="JavaScript">
  27. var loginwin=null;
  28. function openWin() {
  29. var url = window.location.href;
  30. url = url.substring(0, url.lastIndexOf("/"));
  31. url = url+"/main.jsp";
  32. window.location.href = url;
  33. }
  34. function checkButton() {
  35. if(event.keyCode==13)
  36. submitForm();
  37. }
  38. function login(){
  39. $.ajax({
  40. type:'GET',
  41. dataType:'string',
  42. url:'Login.do?user='+$("#user").val()+'&pass='+$("#pass").val()+"&code="+$("#verify_code").val()+"&mySel="+$("#mySel").val(),
  43. cache:false,
  44. error:function(data){
  45. $("#msg").html("登录失败!");
  46. },
  47. success:function(data){
  48. if (data=="ok")
  49. {
  50. $("#msg").html("登录成功!系统正在打开窗口...,本页5秒后自动关闭");
  51. $("#pass").val("");
  52. openWin();
  53. if($("#check")[0].checked){
  54. $.cookie('username', $("#login_no").val() , { path: '/', expires: 10 });
  55. $.cookie('cssfile', $("#mySel").val() , { path: '/', expires: 10 });
  56. }else{
  57. $.cookie('username', null, { path: '/' });
  58. $.cookie('cssfile', null, { path: '/' });
  59. }
  60. //window.close();
  61. }
  62. else
  63. {
  64. $("#msg").html("登录失败!");
  65. }
  66. }
  67. })
  68. }
  69. function submitForm(){
  70. if (!validForm())
  71. {
  72. return "";
  73. }
  74. else
  75. {
  76. login();
  77. }
  78. }
  79. //-->
  80. </script>
  81. <style type="css/text">
  82. body{background:#73CFF1 url(index-bg.jpg) no-repeat;}
  83. </style>
  84. </head>
  85. <body onkeypress="checkButton(); if(event.keyCode==13) return(false);">
  86. <form name="login_form" id="login_form" method="post" action="Login.do" target="f1jeeadmin">
  87. <input name="forward" type="hidden" value="main.html">
  88. <div class="easyui-layout" style="margin: auto;width:100%;height:100%;">
  89. <div region="north" border="false" style="overflow:hidden;height:100px;color:#fff;background:#000;">
  90. <h2>F1jFrameWork Java快速业务实现平台->控制台->登录</h2>
  91. </div>
  92. <div region="south" style="height:60px;color:#fff;background:#000;">
  93. <li>快船,版权所有,Copyright2009-2010</li>
  94. <li>基于F1JEEFrameWork平台构建</li>
  95. <li>技术支持f1jee.com.cn</li>
  96. </div>
  97. <div region="west" border="false" style="width:400px;">
  98. <div style="margin-left:300px;">
  99. <li>
  100. <img src="login.png"></img>
  101. </li>
  102. <li>
  103. </li>
  104. </div>
  105. </div>
  106. <div region="center" border="false" style="overflow:hidden;border-left:1px solid #eee;">
  107. <div style="margin:10px;">
  108. <table border="0" cellpadding="0" cellspacing="0" margin="10px;">
  109. <tr>
  110. <td><label>用 户</label></td>
  111. <td><div align="left">
  112. <input type="text" name="user" id="user" maxlength="20" value="" style="width:160px;height:28px;font-size:14px" required="true" validType="length[4,10]" >
  113. </div></td>
  114. </tr>
  115. <tr>
  116. <td><label>口 令</div></label></td>
  117. <td><div align="left">
  118. <input type="password" name="pass" id="pass" value="" style="width:160px;height:28px;font-size:14px" required="true" validType="length[4,10]" >
  119. </div></td>
  120. </tr>
  121. <tr>
  122. <td><label>验证码</label></td>
  123. <td><div align="left">
  124. <input name="verify_code" type="text" id="verify_code" value="0000" style="width:160px;height:28px;font-size:14px" required="true" validType="length[4,10]" >
  125. </div>
  126. <div align="left">
  127. <img src="${pageContext.request.contextPath}/verifycode" border="0"/>
  128. </div>
  129. </td>
  130. </tr>
  131. <tr>
  132. <td><label>外 观</label></td>
  133. <td><div align="left">
  134. <select name="mySel" id="mySel">
  135. <option selected value=1>缺省外观偏好</option>
  136. <option value=1>蓝-天台</option>
  137. <option value=2>绿-绿野</option>
  138. <option value=3>黄-甜蜜橙</option>
  139. </select>
  140. &nbsp;&nbsp;
  141. </div></td>
  142. </tr>
  143. <tr>
  144. <td><label>记住我</label></td>
  145. <td><input type="checkbox" name="check" id="check"/></td>
  146. </tr>
  147. <tr><td></td><td><div><input type='button' value="立即登录" onclick="javascript:submitForm();return(false);" style="font:bold 12pt;height:40px;"></div></td></tr>
  148. <tr><td colspan=2><div id="msg"></div></td></tr>
  149. </table>
  150. </div>
  151. </div>
  152. </div>
  153. </form>
  154. </body>