/source/gl/mb/loginen.html
http://prosporous.googlecode.com/ · HTML · 259 lines · 237 code · 22 blank · 0 comment · 0 complexity · 1e590a7cfe379ae7c92957f4a77945f6 MD5 · raw file
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>SevenEL-CMS@Prosperous</title>
-
- <{$showjs}>
- <{$ajax}>
- <link rel="stylesheet" type="text/css" href="./css/main.css"/>
- </head>
- <body style="background-color:#1c2642">
- <script>
- var lm, a,b,path,c,d,rh,rl,wh,wl,len;
- var digitArray = new Array('0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f');
- function toHex( n ) {
- var result = ''
- var start = true;
- for ( var i=32; i>0; ) {
- i -= 4;
- var digit = ( n >> i ) & 0xf;
- if (!start || digit != 0) {
- start = false;
- result += digitArray[digit];
- }
- }
- return ( result == '' ? '0' : result );
- }
- function testsuo(){
- try{ lm=new ActiveXObject("Syunew3A.s_simnew3");
- path=lm.FindPort(0);
-
- if(lm.LastError!=0){
- Ext.Msg.alert("IKEY to detect errors","Find relevant digital IKEY!");
- return true;
- }else{
- return false;
- }
- }
- catch (e){
- Ext.Msg.alert("Drive","Please install the driver after the operation!");
- return true;
- }
- }
-
- function cimgs(aaa){
- Ext.getDom('yzm').src="yzm.php?time="+new Date();
- }
-
- Ext.onReady(function(){
- Ext.QuickTips.init();
- Ext.form.Field.prototype.msgTarget = 'qtip';
- var simple = new Ext.FormPanel({
- labelAlign: 'center',
- labelWidth: 110,
- baseCls: 'x-plain',
- defaults: {width:200},
- monitorValid: true,
- defaultType: 'textfield',//??????
-
- //??????
- items: [{
- xtype:"combo",
- fieldLabel:"System Language",
- mode:"local",
- width:140,
- sytle:'blod',
- displayField:"htlang",
- id:"htlang",
- triggerAction:"all",
- value:"ENGLISH",
- readOnly:true,
- listeners:{
- select:function(_combo,_record,_index){
- if(_index==0){
- window.location.href='./changelg.php?HTLG=en';
- }
- if(_index==1){
- window.location.href='./changelg.php?HTLG=zh';
- }
- }
- },
- store:new Ext.data.SimpleStore({
- fields:["htlang"],
- data:[["ENGLISH"],["????"]]
- })
- },{
- xtype:"combo",
- fieldLabel:"User Type",
- mode:"local",
- width:140,
- sytle:'blod',
- displayField:"usertype",
- id:"usertype",
- triggerAction:"all",
- value:"standard user",
- readOnly:true,
- listeners:{
- select:function(_combo,_record,_index){
- if(_index==2){
- if(true==testsuo()){
- this.setValue('standard user');
- }else{
- lm.sWrite('123456',path);
- tempstrj=lm.sread(path);
- //alert(tempstrj);
- xajax_loadsuo(toHex(lm.GetID_1(path))+toHex(lm.GetID_2(path)),tempstrj);
-
- };
- }
- }
- },
- store:new Ext.data.SimpleStore({
- fields:["usertype"],
- data:[["standard user"]/*,["VIP user"]*/,["IKEY user"]]
- })
- },
- {
- //style:'background:url(/sa/img/Fwdw_icons_57.png) no-repeat center left',
- cls : 'user',
- fieldLabel: 'User',
- name: 'username',//????
- id:'username',
- //anchor:'95%',//???????????
- width:180,
- allowBlank:false,//?????
- blankText:'User not null'//??????
- },{
- cls : 'psw',
- inputType:'password',
- fieldLabel: 'Password',
- //anchor:'95%',
- width:180,
- name: 'password',
- allowBlank:false,
- blankText:'Password not null'
- },{
- inputType:'hidden',
- //fieldLabel: '??',
- //anchor:'95%',
- name: 'action',
- value:'loginz'
- //allowBlank:false,
- //blankText:'??????'
- }
- ],
-
- keys:[{ //????????
- key:Ext.EventObject.ENTER,
- fn:onOK,
- scope:this
- }],
-
- buttons: [{
- text: 'LOGIN',
- id: 'loginSubmit',
- type: 'submit',
-
- //????????
- handler:function(){
- if(simple.form.isValid()){//????????????
- Ext.MessageBox.show({
- title: 'plase wait..',
- msg: 'Loading...',
- progressText: '',
- width:300,
- progress:true,
- closable:false,
- animEl: 'loding'
- });
- //??????
- var f = function(v){
- return function(){
- var i = v/11;
- Ext.MessageBox.updateProgress(i, '');
- };
- };
-
- for(var i = 1; i < 13; i++){
- setTimeout(f(i), i*150);
- }
-
- //????????
- simple.form.doAction('submit',{
- url:'./login.php',//????
- method:'post',//????post?get
- params:'{action:login}',
- //?????????
- success:function(form,action){
- if (action.result.msg=='ok') {
- document.location='index.php';
- } else {
- Ext.Msg.alert('Login error',action.result.msg);
- Ext.get('username').select();
- }
- },
- //?????????
- failure:function(){
- Ext.Msg.alert('error','Server failure. Try again later');
- }
- });
- }
- },formBind:true
- },{
- text: 'Reset',
- handler:function(){simple.form.reset();}//????
- }]
- });
-
-
-
- //??????
- function onOK() {
- document.all("loginSubmit").click();
- }
-
-
- //????
- win = new Ext.Window({
- id:'win',
- iconCls:'salogintitle',
- title:'<font color=white><span style="margin-left:12;vertical-align:text-bottom;"><font color=white>SevenEL-CMS</font> User LOGIN</span></font>',
- layout:'fit', //?????????fit??????
- width:360,
- height:190,
- bodyStyle:'padding:5px;',
- maximizable:false,//?????
- closeAction:'close',
- closable:false,//????
- collapsible:true,//???
- plain: true,
- buttonAlign:'center',
- items:simple//?????????????
- });
-
- win.on('show',function(){
- //$('username').focus();
- Ext.get('username').focus();
- }, this,{delay: 200});
-
- win.show();//????
-
- //win.on('show',function(){TextField.focus()},this);
- //$(document).ready(function(){
- // $("#username").focus();
- //});
-
-
- var bd = Ext.getDom('randCode');
- var bd2 = Ext.get(bd.parentNode);
- bd2.createChild({tag: 'img',src:"yzm.php",align:'absbottom',
- style:'cursor:hand;',id:'yzm',onclick:"cimgs('a');"
- });
- //cimgs();
-
- });
- </script>
- </body>
- </html>