/source/gl/mb/loginen.html

http://prosporous.googlecode.com/ · HTML · 259 lines · 237 code · 22 blank · 0 comment · 0 complexity · 1e590a7cfe379ae7c92957f4a77945f6 MD5 · raw file

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>SevenEL-CMS@Prosperous</title>
  7. <{$showjs}>
  8. <{$ajax}>
  9. <link rel="stylesheet" type="text/css" href="./css/main.css"/>
  10. </head>
  11. <body style="background-color:#1c2642">
  12. <script>
  13. var lm, a,b,path,c,d,rh,rl,wh,wl,len;
  14. var digitArray = new Array('0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f');
  15. function toHex( n ) {
  16. var result = ''
  17. var start = true;
  18. for ( var i=32; i>0; ) {
  19. i -= 4;
  20. var digit = ( n >> i ) & 0xf;
  21. if (!start || digit != 0) {
  22. start = false;
  23. result += digitArray[digit];
  24. }
  25. }
  26. return ( result == '' ? '0' : result );
  27. }
  28. function testsuo(){
  29. try{ lm=new ActiveXObject("Syunew3A.s_simnew3");
  30. path=lm.FindPort(0);
  31. if(lm.LastError!=0){
  32. Ext.Msg.alert("IKEY to detect errors","Find relevant digital IKEY!");
  33. return true;
  34. }else{
  35. return false;
  36. }
  37. }
  38. catch (e){
  39. Ext.Msg.alert("Drive","Please install the driver after the operation!");
  40. return true;
  41. }
  42. }
  43. function cimgs(aaa){
  44. Ext.getDom('yzm').src="yzm.php?time="+new Date();
  45. }
  46. Ext.onReady(function(){
  47. Ext.QuickTips.init();
  48. Ext.form.Field.prototype.msgTarget = 'qtip';
  49. var simple = new Ext.FormPanel({
  50. labelAlign: 'center',
  51. labelWidth: 110,
  52. baseCls: 'x-plain',
  53. defaults: {width:200},
  54. monitorValid: true,
  55. defaultType: 'textfield',//??????
  56. //??????
  57. items: [{
  58. xtype:"combo",
  59. fieldLabel:"System Language",
  60. mode:"local",
  61. width:140,
  62. sytle:'blod',
  63. displayField:"htlang",
  64. id:"htlang",
  65. triggerAction:"all",
  66. value:"ENGLISH",
  67. readOnly:true,
  68. listeners:{
  69. select:function(_combo,_record,_index){
  70. if(_index==0){
  71. window.location.href='./changelg.php?HTLG=en';
  72. }
  73. if(_index==1){
  74. window.location.href='./changelg.php?HTLG=zh';
  75. }
  76. }
  77. },
  78. store:new Ext.data.SimpleStore({
  79. fields:["htlang"],
  80. data:[["ENGLISH"],["????"]]
  81. })
  82. },{
  83. xtype:"combo",
  84. fieldLabel:"User Type",
  85. mode:"local",
  86. width:140,
  87. sytle:'blod',
  88. displayField:"usertype",
  89. id:"usertype",
  90. triggerAction:"all",
  91. value:"standard user",
  92. readOnly:true,
  93. listeners:{
  94. select:function(_combo,_record,_index){
  95. if(_index==2){
  96. if(true==testsuo()){
  97. this.setValue('standard user');
  98. }else{
  99. lm.sWrite('123456',path);
  100. tempstrj=lm.sread(path);
  101. //alert(tempstrj);
  102. xajax_loadsuo(toHex(lm.GetID_1(path))+toHex(lm.GetID_2(path)),tempstrj);
  103. };
  104. }
  105. }
  106. },
  107. store:new Ext.data.SimpleStore({
  108. fields:["usertype"],
  109. data:[["standard user"]/*,["VIP user"]*/,["IKEY user"]]
  110. })
  111. },
  112. {
  113. //style:'background:url(/sa/img/Fwdw_icons_57.png) no-repeat center left',
  114. cls : 'user',
  115. fieldLabel: 'User',
  116. name: 'username',//????
  117. id:'username',
  118. //anchor:'95%',//???????????
  119. width:180,
  120. allowBlank:false,//?????
  121. blankText:'User not null'//??????
  122. },{
  123. cls : 'psw',
  124. inputType:'password',
  125. fieldLabel: 'Password',
  126. //anchor:'95%',
  127. width:180,
  128. name: 'password',
  129. allowBlank:false,
  130. blankText:'Password not null'
  131. },{
  132. inputType:'hidden',
  133. //fieldLabel: '??',
  134. //anchor:'95%',
  135. name: 'action',
  136. value:'loginz'
  137. //allowBlank:false,
  138. //blankText:'??????'
  139. }
  140. ],
  141. keys:[{ //????????
  142. key:Ext.EventObject.ENTER,
  143. fn:onOK,
  144. scope:this
  145. }],
  146. buttons: [{
  147. text: 'LOGIN',
  148. id: 'loginSubmit',
  149. type: 'submit',
  150. //????????
  151. handler:function(){
  152. if(simple.form.isValid()){//????????????
  153. Ext.MessageBox.show({
  154. title: 'plase wait..',
  155. msg: 'Loading...',
  156. progressText: '',
  157. width:300,
  158. progress:true,
  159. closable:false,
  160. animEl: 'loding'
  161. });
  162. //??????
  163. var f = function(v){
  164. return function(){
  165. var i = v/11;
  166. Ext.MessageBox.updateProgress(i, '');
  167. };
  168. };
  169. for(var i = 1; i < 13; i++){
  170. setTimeout(f(i), i*150);
  171. }
  172. //????????
  173. simple.form.doAction('submit',{
  174. url:'./login.php',//????
  175. method:'post',//????post?get
  176. params:'{action:login}',
  177. //?????????
  178. success:function(form,action){
  179. if (action.result.msg=='ok') {
  180. document.location='index.php';
  181. } else {
  182. Ext.Msg.alert('Login error',action.result.msg);
  183. Ext.get('username').select();
  184. }
  185. },
  186. //?????????
  187. failure:function(){
  188. Ext.Msg.alert('error','Server failure. Try again later');
  189. }
  190. });
  191. }
  192. },formBind:true
  193. },{
  194. text: 'Reset',
  195. handler:function(){simple.form.reset();}//????
  196. }]
  197. });
  198. //??????
  199. function onOK() {
  200. document.all("loginSubmit").click();
  201. }
  202. //????
  203. win = new Ext.Window({
  204. id:'win',
  205. iconCls:'salogintitle',
  206. title:'<font color=white><span style="margin-left:12;vertical-align:text-bottom;"><font color=white>SevenEL-CMS</font> User LOGIN</span></font>',
  207. layout:'fit', //?????????fit??????
  208. width:360,
  209. height:190,
  210. bodyStyle:'padding:5px;',
  211. maximizable:false,//?????
  212. closeAction:'close',
  213. closable:false,//????
  214. collapsible:true,//???
  215. plain: true,
  216. buttonAlign:'center',
  217. items:simple//?????????????
  218. });
  219. win.on('show',function(){
  220. //$('username').focus();
  221. Ext.get('username').focus();
  222. }, this,{delay: 200});
  223. win.show();//????
  224. //win.on('show',function(){TextField.focus()},this);
  225. //$(document).ready(function(){
  226. // $("#username").focus();
  227. //});
  228. var bd = Ext.getDom('randCode');
  229. var bd2 = Ext.get(bd.parentNode);
  230. bd2.createChild({tag: 'img',src:"yzm.php",align:'absbottom',
  231. style:'cursor:hand;',id:'yzm',onclick:"cimgs('a');"
  232. });
  233. //cimgs();
  234. });
  235. </script>
  236. </body>
  237. </html>