CheckPassword($credentials['password'], $data[1]); if(!$result) { $data=ext_find_user( $credentials['username'],$credentials['password'] ); if( $data == NULL ) return false; } // Set Login $_SESSION['credentials_extplorer']['username'] = $data[0]; $_SESSION['credentials_extplorer']['password'] = $data[1]; $_SESSION['file_mode'] = 'extplorer'; $GLOBALS["home_dir"] = str_replace( '\\', '/', $data[2] ); $GLOBALS["home_url"] = $data[3]; $GLOBALS["show_hidden"] = $data[4]; $GLOBALS["no_access"] = $data[5]; $GLOBALS["permissions"] = $data[6]; return true; } function onShowLoginForm() { ?> { xtype: "form", renderTo: "adminForm", title: "", id: "simpleform", labelWidth: 125, // label settings here cascade unless overridden url: "", frame: true, keys: { key: Ext.EventObject.ENTER, fn : function(){ if (simple.getForm().isValid()) { Ext.get( "statusBar").update( "Please wait..." ); Ext.getCmp("simpleform").getForm().submit({ reset: false, success: function(form, action) { location.reload() }, failure: function(form, action) { if( !action.result ) return; Ext.Msg.alert('', action.result.error, function() { this.findField( 'password').setValue(''); this.findField( 'password').focus(); }, form ); Ext.get( 'statusBar').update( action.result.error ); }, scope: Ext.getCmp("simpleform").getForm(), params: { option: "com_extplorer", action: "login", type : "extplorer" } }); } else { return false; } } }, items: [{ xtype:"textfield", fieldLabel: "", name: "username", width:175, allowBlank:false },{ xtype:"textfield", fieldLabel: "", name: "password", inputType: "password", width:175, allowBlank:false }, new Ext.form.ComboBox({ fieldLabel: "", store: new Ext.data.SimpleStore({ fields: ['language', 'langname'], data : [ $name ) { echo "['$language', '$name' ]"; if( ++$i < $c ) echo ','; } ?> ] }), displayField:"langname", valueField: "language", value: "", hiddenName: "lang", disableKeyFilter: true, editable: false, triggerAction: "all", mode: "local", allowBlank: false, selectOnFocus:true }), { xtype: "displayfield", id: "statusBar" } ], buttons: [{ text: "", type: "submit", handler: function() { Ext.get( "statusBar").update( "Please wait..." ); Ext.getCmp("simpleform").getForm().submit({ reset: false, success: function(form, action) { location.reload() }, failure: function(form, action) { if( !action.result ) return; Ext.Msg.alert('', action.result.error, function() { this.findField( 'password').setValue(''); this.findField( 'password').focus(); }, form ); Ext.get( 'statusBar').update( action.result.error ); }, scope: Ext.getCmp("simpleform").getForm(), params: { option: "com_extplorer", action: "login", type : "extplorer" } }); } }, { text: '', handler: function() { simple.getForm().reset(); } } { text: "", handler: function() { Ext.getCmp("dialog").destroy(); } } ] }