码迷,mamicode.com
首页 > 其他好文 > 详细

fxxcode

时间:2020-01-01 23:47:13      阅读:79      评论:0      收藏:0      [点我收藏+]

标签:submit   widget   dom   gets   gem   drop   result   aci   dialog   

  1 <fmt:setLocale value="zh-CN"/>
  2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  4 <head>
  5 <OBJECT id="iTrusPTA" codeBase="PTAExt.CAB#version=2,4,3,1" classid="clsid:1E0DFFCF-27FF-4574-849B-55007349FEDA">
  6 </OBJECT>
  7 <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
  8 <meta name="keywords" content="单点登录中心SSO,PICC" />
  9 <link rel="stylesheet" type="text/css" media="screen" href="/casserver/style/index.css" />
 10 <link rel="stylesheet" type="text/css" media="screen" href="/casserver/style/layout_index.css" /><link rel="stylesheet" href="/casserver/style/home.css" type="text/css" media="all" />
 11 <link rel="stylesheet" href="/casserver/style/jasig.css" type="text/css" media="all" />
 12 
 13 
 14 
 15 
 16 <script language="javascript" src="/casserver/common/dwr/engine.js"></script>
 17 <script language="javascript" src="/casserver/common/dwr/util.js"></script>  
 18 <script language=‘javascript‘ src=‘/casserver/dwr/interface/FaceCheckSystem.js‘></script>
 19 
 20 
 21 
 22 <script type="text/javascript" src="/casserver/js/common_rosters.js"></script>
 23 <script type="text/javascript" src="/casserver/js/softkeyboard.js"></script>
 24 <script language="javascript" src="/casserver/widgets/yui/yahoo-dom-event/yahoo-dom-event.js"></script>
 25 <script language="javascript" src="/casserver/widgets/yui/dragdrop/dragdrop-min.js"></script> 
 26 <script language="javascript" src="/casserver/widgets/yui/container/container-min.js"></script>
 27 <script language="javascript" src="/casserver/widgets/yui/datasource/datasource-beta-min.js"></script>
 28 <script language="javascript" src="/casserver/js/AjaxCommon.js"></script>
 29 <script language="javascript" src="/casserver/js/prototype.js"></script>
 30 <script language="javascript" src="/casserver/js/pta.js"></script>
 31 <script language="javascript" src="/casserver/common/dwr/engine.js"></script>
 32 <script language="javascript" src="/casserver/common/dwr/util.js"></script>
 33 <script language=‘javascript‘ src=‘/casserver/dwr/interface/Ims.js‘></script>
 34 <script src="js/pta.js" type="text/javascript"></script>
 35 
 36 <title>PICC-承保业务处理系统-登录中心</title>
 37 <link href="/casserver/style/style_all.css" rel="stylesheet" type="text/css" />
 38 <link href="/casserver/style/Standard.css"  rel="stylesheet" type="text/css" />
 39  <script language="javascript">
 40 
 41 YAHOO.util.Event.addListener(window,"load",frame);
 42 function frame(){
 43    var submitDlg;
 44    submitDlg = new YAHOO.widget.Dialog("submitDlg",{iframe:true, visible:true, width:460, height:300, underlay:"shadow", constraintoviewport:true, fixedcenter:false, modal:false,close:true, zIndex:120});
 45    submitDlg.setHeader("PICC-公告信息");
 46    submitDlg.setBody("<iframe name=‘submitFrame‘ frameborder=‘0‘ style=‘margin:0; padding:0; width:100%; height: 100%‘ src=‘/casserver/notes.jsp?systemCode=prpall‘></iframe>");
 47    submitDlg.render(document.body);
 48    var dialogpropertyX =  (document.body.clientWidth - 1024)/2 + 15;
 49    submitDlg.cfg.setProperty("x",dialogpropertyX);
 50    submitDlg.cfg.setProperty("y",20);
 51    submitDlg.show();
 52    return false;
 53 }
 54     
 55 </script> 
 56 <!--201503220-002 关于在车险业务系统增加用户代码和mac地址采集功能的需求    MODIFY BY LIUDAN,UPD,2015-06-25,获取用户mac地址---- start-->
 57 <!-- <script language="JScript" event="OnCompleted(hResult,pErrorObject, pAsyncContext)" for="foo" type="text/javascript">
 58 document.getElementById("userMac").value=unescape(MACAddr);
 59 </script>
 60 <script language="JScript" event="OnObjectReady(objObject,objAsyncContext)" for="foo" type="text/javascript">
 61    if(objObject.IPEnabled != null && objObject.IPEnabled != "undefined" && objObject.IPEnabled == true)
 62    {
 63     if(objObject.MACAddress != null && objObject.MACAddress != "undefined")
 64     MACAddr = objObject.MACAddress;
 65     }
 66 </script> -->
 67 <OBJECT id="locator" classid="CLSID:76A64158-CB41-11D1-8B02-00600806D9B6"></OBJECT>
 68 <OBJECT id="foo" classid="CLSID:75718C9A-F029-11d1-A1AC-00C04FB6C223"></OBJECT>
 69 <!-- <script language="JScript" type="text/javascript">
 70    var service = locator.ConnectServer();
 71    var MACAddr ;
 72    service.Security_.ImpersonationLevel=3;
 73    service.InstancesOfAsync(foo, ‘Win32_NetworkAdapterConfiguration‘);
 74 </script> -->
 75 <!--201503220-002 关于在车险业务系统增加用户代码和mac地址采集功能的需求    MODIFY BY LIUDAN,UPD,2015-06-25,获取用户mac地址---- end-->
 76 </head>     
 77 <body class="logon" onload="init();"> <!-- checkCode(objSystemName ); -->
 78 
 79 
 80 
 81 
 82 <form id="fm" method="post" action="/casserver/login?service=http%3A%2F%2F10.134.134.144%3A8000%2Fprpall%2Findex.jsp%3F__sys__%3D2&amp;r=0.3991680778231843" onsubmit="return submitForm();">
 83 <input name="PTAVersion" type="hidden"/>
 84 <input name="toSign" id="toSign" type="hidden"/>
 85 <input name="Signature" id="Signature" type="hidden"/>
 86 <input name="rememberFlag" id="rememberFlag" type="hidden" value="0"/>
 87 <input name="userMac" id="userMac" type="hidden" />
 88 <input name="key" id="key" type="hidden" value="yes" />
 89 <input name="errorKey" id="errorKey" type="hidden" value="no" />
 90 <table width="1004" height="100%" border="0" cellpadding="0" cellspacing="0">
 91 <tr>
 92     <td rowspan="2" valign="top" class="bgleft"><img src="/casserver/images/imglogon_1.jpg" /></td>
 93     <td valign="top"><img src="/casserver/images/imglogon_2.jpg" /></td>
 94     <td rowspan="2" valign="top" class="bgright"><img src="/casserver/images/imglogon_3.jpg"/></td>
 95 </tr>
 96 <tr>
 97     <td height="285" bgcolor="#f8f8f8" class="bg">
 98     <table width="358" border="0" cellspacing="0" cellpadding="0" >
 99     <tr>
100         <td height="8"><img src="/casserver/images/bglogontop.gif" /></td>
101     </tr>
102     <tr>
103         <td height="151" align="center" background="/casserver/images/bglogon_2.gif">
104         <table width="90%"  border="0" cellspacing="0" cellpadding="5">
105             <tr>
106             <td align="right">
107             <table width="100%" border="0" cellspacing="0" cellpadding="5">
108             <tr>
109                  <td width="250" align="left" valign="top">
110                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
111                  
112                  <select onchange="chooseMethod();" name="loginMethod" id="loginMethod">
113                       <option value="nameAndPwd">用户名密码</option>
114                       <option value="usbkey">USBKEY</option>
115                   </select>         
116                   <table width="100%" border="0" cellspacing="0" cellpadding="5" id="table2" style="display:" >
117                   <tr><td height="15"></td></tr>
118                     <tr> 
119                   <td width="30%" height="30" align="right"><img src="/casserver/images/imgusername.gif" ></td>
120                   <td width="70%">
121                     <input id="username1" name="username" class="logon" tabindex="1" type="text" value="1214011441" maxlength="10" autocomplete="on"/>
122                     </td>
123                   </tr>
124                   <tr> 
125                      <td width="30%" height="30" align="right">
126                          <img src="/casserver/images/imgpassword.gif"></td>
127                      <td width="70%">
128                         <input id="password1" name="password" class="logon" tabindex="2" type="password" value="" size="25" autocomplete="off"/>
129                            
130                     </td>
131                   </tr>
132                   <tr>
133                     <td colspan="2" align="center">
134                     <div id="message">
135                         <div id="status" class="errors">用户名或密码错误,请重新输入!</div>
136                     </div>
137                     <input type="hidden" name="lt" value="_c8DDD1914-D899-EAF9-474E-A35FAD4564C8_kEA47804F-3951-B86A-320E-A920E6E670A2" />
138                     <input type="hidden" name="_eventId" value="submit" />         
139                     </td>
140                  </tr>
141                     </table> 
142                   <table width="100%" border="0" cellspacing="0" cellpadding="5" id="table1" style="display:none" disabled="true">
143                  <tr style="display:none" id="Cer">
144                     <td>
145                     <select class=‘logon‘ name="CertList" id="CertList" align="right" tabindex="3" onchange="getAccCode();">
146                     </select>
147                     <input type="hidden" id="username2" name="username" value="" />
148                     <input type="hidden" id="usbkey" name="usbkey" value="USBKEY" />
149                     <input type="hidden" id="password2" name="password" value="1111" />
150                     <input type="hidden" name="lt" value="_c8DDD1914-D899-EAF9-474E-A35FAD4564C8_kEA47804F-3951-B86A-320E-A920E6E670A2" />
151                     <input type="hidden" name="_eventId" value="submit" />      
152                     </td>
153                 </tr>
154                 </table>
155                 <table width="100%" border="0" cellspacing="0" cellpadding="5" id="table3" style="display:none" disabled="true">
156                      <tr style="display:none" id="Cer">
157                         <td>
158                             <input type="hidden" id="username3" name="username" value="null" />
159                             <input type="hidden" id="usbkey" name="usbkey" value="CROSS" />
160                             <input type="hidden" id="password3" name="password" value="1111" />
161                             <input type="hidden" name="lt" value="_c8DDD1914-D899-EAF9-474E-A35FAD4564C8_kEA47804F-3951-B86A-320E-A920E6E670A2" />
162                             <input type="hidden" name="_eventId" value="submit" />      
163                         </td>
164                     </tr>
165                 </table>
166                 </tr>
167                   
168                 </tr>
169             </table>            
170         </td>
171         <td align="left" valign="bottom" >
172         <input type="image" id="button" name="button" accesskey="l"  
173             src="/casserver/images/btn_login.gif" class="btn" tabindex="3" onsubmit="return submitForm();"/>
174         </td>
175            
176     </tr>
177     </table>
178     <br/>
179     <!--MODIFY BEGIN WANGHAIBO ADD(新增是ADD,修改是UPD,删除是DEL)204-06-10  
180         PICC2014051401 用户系统密码忘记自动取回需求
181     -->
182     <table>
183         <tr>
184             <td align="left" width="100"> <a href="#" onclick="changePassword()" >修改密码</a></td>
185             <td align="center" width="100"> <a href="#" onclick="bindlingEmail()" >绑定邮箱</a></td>
186             <td align="right" width="100"> <a href="#" onclick="forgotPassword()" >忘记密码</a></td>
187         </tr>
188     </table>
189 </td>
190 </tr>
191 <tr>
192 
193 <td height="7"><img src="/casserver/images/bglogondown.gif" /></td>
194 </tr>
195 </table>
196 <div id="notsetup"></div>
197 <tr>
198   <td class="bgleft">&nbsp;</td>
199   <td height="100%" bgcolor="#F8F8F8"></td>
200   <td class="bgright">&nbsp;</td>
201 </tr>
202 <div id="pcguiddis">
203     <input id="pcguid" name="pcguid" class="logon" tabindex="3" type="text" value="" autocomplete="off" readonly="true" />
204 </div>
205 </form>
206 
207 
208 
209 <div id="disPCGUID"></div>
210 </body>
211 </html>
212 <!--新建的js代码开始  -->
213 <script>
214 (function(){
215 var usercode = document.getElementById("username3").value;
216 //当自动跳转出错时跳转回正常登录页面,且登录方式改为用户名密码登录方式
217     var errorKey = document.getElementById("errorKey").value;
218     if(errorKey=="no"){
219         document.getElementById("key").value="no";
220     }
221     if(usercode != null && "" != usercode && "null" != usercode&&("null"==errorKey||errorKey==null)){
222         document.getElementById("table3").style.display="";
223         document.getElementById("table3").disabled=false;
224         document.getElementById("table1").style.display="none";
225         document.getElementById("table1").disabled=true;
226         document.getElementById("table2").style.display="none";
227         document.getElementById("table2").disabled=true;
228         fm.submit();   
229     }
230 })()
231 
232 </script>
233 <script language="javascript"> 
234     // PICC2014021701 健康险专项平台跳转非车承保系统打开页面方式调整。
235     
236          if (self!=top){
237             top.location=self.location;
238           }
239       
240 </script>
241 <script language="javascript">  
242     
243        
244     function submitForm(){
245         verifyLogin();
246         var method = document.getElementById("loginMethod").value;
247         if(method==nameAndPwd){
248             var username = document.getElementById("username1").value;
249             var password = document.getElementById("password1").value;
250             if(username == null || username == ""){
251                 alert("请输入用户名!"); 
252                 return false;
253             }
254             if(password == null || password == ""){
255                 alert("请输入密码!"); 
256                 return false;
257             }
258             return true;
259         }else if(method==usbkey){
260               fm.toSign.value = new Date().getTime();
261               var signature = DoLogonSign(issuerDN, serialNumber, fm.CertList, fm.toSign);
262               if(signature.length > 0){
263                   fm.Signature.value = signature;
264                   return true;
265                 } else {
266                     return false;
267                 }
268             }else {
269                 alert("请选择登陆方式");
270                 return false;
271             }
272         }
273 </script>
274 <script>
275 
276 YAHOO.util.Event.addListener(window,"load",frame);
277 function frame(){
278    var submitDlg;
279    submitDlg = new YAHOO.widget.Dialog("submitDlg",{iframe:true, visible:true, width:460, height:300, underlay:"shadow", constraintoviewport:true, fixedcenter:false, modal:false,close:true, zIndex:120});
280    submitDlg.setHeader("PICC-公告信息");
281    //submitDlg.setBody("<iframe name=‘submitFrame‘ frameborder=‘0‘ style=‘margin:0; padding:0; width:100%; height: 100%‘ src=‘/casserver/notes.jsp?systemCode=prpall‘></iframe>");
282    submitDlg.render(document.body);
283    var dialogpropertyX =  (document.body.clientWidth - 1024)/2 + 15;
284    submitDlg.cfg.setProperty("x",dialogpropertyX);
285    submitDlg.cfg.setProperty("y",20);
286    submitDlg.show();
287    return false;
288 }
289     
290 </script>
291 <!--201503220-002 关于在车险业务系统增加用户代码和mac地址采集功能的需求    MODIFY BY LIUDAN,UPD,2015-06-25,获取用户mac地址---- start-->
292 <script language="JScript" event="OnCompleted(hResult,pErrorObject, pAsyncContext)" for="foo" type="text/javascript">
293 document.getElementById("userMac").value=unescape(MACAddr);
294 </script>
295 <script language="JScript" event="OnObjectReady(objObject,objAsyncContext)" for="foo" type="text/javascript">
296    if(objObject.IPEnabled != null && objObject.IPEnabled != "undefined" && objObject.IPEnabled == true)
297    {
298     if(objObject.MACAddress != null && objObject.MACAddress != "undefined")
299     MACAddr = objObject.MACAddress;
300     }
301 </script>
302 <script language="JScript" type="text/javascript">
303    var service = locator.ConnectServer();
304    var MACAddr ;
305    service.Security_.ImpersonationLevel=3;
306    service.InstancesOfAsync(foo, Win32_NetworkAdapterConfiguration);
307 </script>
308 
309 
310 
311 
312 <!-- 新建的js代码结束 -->
313 
314 <script type="text/javascript">
315     document.getElementById("pcguiddis").style.display="none";//隐藏
316 </script>
317 
318 <script type="text/javascript">
319 
320 /* 201505253-002  不容许客户端浏览器启用缓存用户名、密码等账户信息
321  * MODIFY BY LIUDAN,UPD,20160523
322  */
323 //    var cvalue = GetCookie("prpall");
324 //    if(cvalue != ""){
325 //        document.getElementById("username1").value = cvalue;
326 //     }
327     function GetCookie(name) {  
328         var cookies = document.cookie.split( ; );  
329         var cookie = ‘‘;  
330         for(var i=0; i<cookies.length; i++) {    
331             cookie = cookies[i].split(=);    
332             if(cookie[0].replace(/^\s+|\s+$/g, ‘‘) == name) 
333             {      
334                 return (cookie.length <= 1) ? "" : unescape(cookie[1].replace(/^\s+|\s+$/g, ‘‘));    
335             }  
336         }  
337         return "";
338     }
339 
340     function DeleteCookie (name) {   
341         var exp = new Date();
342         exp.setTime (exp.getTime() - 1);
343         var cval = GetCookie (name);
344         document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
345     }
346 
347     function verifyLogin(){   
348         if(fm.username1.value != GetCookie("prpall"))
349         {
350             DeleteCookie ("costctrl"); 
351             document.getElementById("rememberFlag").value = "1";
352         }
353     }
354 </script>
355 <script type="text/javascript">
356   issuerDN = "C=CN, O=PICC Property and Casualty, OU=CA Center, CN=PICC Property and Casualty User CA";// 该部分内容根据实际证书信息进行调整
357   var cre = ListValidCerts(issuerDN, serialNumber, fm.CertList);
358   if(cre.count==0){
359       issuerDN = "C=CN, O=PICC Property and Casualty new, OU=CA Center, CN=PICC Property and Casualty User CA new";// 该部分内容根据实际证书信息进行调整
360       cre=ListValidCerts(issuerDN, serialNumber, fm.CertList);
361   }
362 </script>
363 <script type="text/javascript"> 
364     function (v){
365         alert(1);
366         var vsplit = v.responseText.split(",");
367         if(vsplit[0] == 1){
368             alert("非常抱歉的通知您的密码将在"+vsplit[1]+"失效,为保证您的正常使用请及时更新密码!");
369             return true;
370         }
371         if(vsplit[0] == 2){
372             alert("抱歉的通知您,您的密码已于"+vsplit[1]+"失效,请联系总公司信科部延长密码使用期限!");
373             return true;
374         }
375     }
376     function errorCheck(){
377         return true;
378     }
379     function chooseMethod(){
380         var method = document.getElementById("loginMethod").value;
381         if(method=="0"){
382             document.getElementById("table1").style.display="none";
383             document.getElementById("table1").disabled=true;
384             document.getElementById("table2").style.display="none";
385             document.getElementById("table2").disabled=true;
386             document.getElementById("CertList").value = cre.count;
387         }else
388         if(method=="usbkey"){
389             document.getElementById("table1").style.display="";
390             document.getElementById("table1").disabled=false;
391             document.getElementById("table2").style.display="none";
392             document.getElementById("table2").disabled=true;
393             document.getElementById("Cer").style.display="none";
394             document.getElementById("CertList").value = cre.count;
395             getAccCode();
396         }else
397         if(method=="nameAndPwd"){
398             document.getElementById("table1").style.display="none";
399             document.getElementById("table1").disabled=true;
400             document.getElementById("table2").style.display="";
401             document.getElementById("table2").disabled=false;
402             document.getElementById("CertList").value = cre.count;
403             document.getElementById("username1").value="";
404             document.getElementById("password1").value="";
405             document.getElementById("message").innerHTML="";
406         }
407     }
408     function getAccCode(){
409         var value = document.getElementById("CertList").value;
410         //fm.toSign.value="1234567890"; 
411         fm.toSign.value = new Date().getTime();
412         var Signature = DoLogonSign(issuerDN, serialNumber, fm.CertList, fm.toSign);
413         if(Signature.length > 0){
414               Ims.getAccList(fm.toSign.value,Signature,callBack);
415               return true;
416             } else {
417                 return false;
418             }
419     }
420     function callBack(data){
421         var method = document.getElementById("loginMethod").value;
422         if(method=="usbkey"){
423             var value = document.getElementById("CertList").value;
424             if(data==null){
425                 if(value=="0"){
426                     
427                 }else{
428                     alert("该证书不包含账户");
429                     document.getElementById("CertList").value = "0";
430                 }
431             }else{
432                 if(data.length > 0){
433                     document.getElementById("username2").value = data[0];
434                 }
435                 fm.submit();
436             }
437         }
438     }
439   /*   var usercode = document.getElementById("username3").value;
440     alert(111111111111); */
441 //当自动跳转出错时跳转回正常登录页面,且登录方式改为用户名密码登录方式
442 /*     var errorKey = document.getElementById("errorKey").value;
443     if(errorKey=="no"){
444         document.getElementById("key").value="no";
445     }
446     if(usercode != null && "" != usercode && "null" != usercode&&("null"==errorKey||errorKey==null)){
447         document.getElementById("table3").style.display="";
448         document.getElementById("table3").disabled=false;
449         document.getElementById("table1").style.display="none";
450         document.getElementById("table1").disabled=true;
451         document.getElementById("table2").style.display="none";
452         document.getElementById("table2").disabled=true;
453         alert("wosdfersdfsdf");
454         fm.submit();   
455     } */
456 
457     function changePassword(){
458         var width=400;
459         var height=300;
460         var left, top;
461         left = (window.screen.availWidth - width) / 2;
462         top = (window.screen.availHeight - height) / 2;
463         var per = " ,width=" + width + ",height=" + height + ",left=" + left + ",top=" + top +,screenX= + left + ,screenY= + top;
464         window.open("changePassword.jsp", "newwindow", "alwaysRaised,status,scrollbars,resizable"+per) ;
465     }
466     function bindlingEmail(){
467         var width=400;
468         var height=300;
469         var left, top;
470         left = (window.screen.availWidth - width) / 2;
471         top = (window.screen.availHeight - height) / 2;
472         var per = " ,width=" + width + ",height=" + height + ",left=" + left + ",top=" + top +,screenX= + left + ,screenY= + top;
473         window.open("bindingEmail.jsp", "newwindow", "alwaysRaised,status,scrollbars,resizable"+per) ;
474     }
475     function forgotPassword(){
476         var width=400;
477         var height=300;
478         var left, top;
479         left = (window.screen.availWidth - width) / 2;
480         top = (window.screen.availHeight - height) / 2;
481         var per = " ,width=" + width + ",height=" + height + ",left=" + left + ",top=" + top +,screenX= + left + ,screenY= + top;
482         window.open("forgotPassword.jsp", "newwindow", "alwaysRaised,status,scrollbars,resizable"+per) ;
483     }
484 </script>

 

fxxcode

标签:submit   widget   dom   gets   gem   drop   result   aci   dialog   

原文地址:https://www.cnblogs.com/yasepix/p/12130409.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!