PageRenderTime 24ms CodeModel.GetById 9ms app.highlight 10ms RepoModel.GetById 1ms app.codeStats 0ms

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