﻿Ext.onReady(function(){ 

   Ext.QuickTips.init(); 

   doIt() 

});           

        

doIt = function (){ 

 
  var win = new Ext.Window({ 

      layout:'fit', 

      modal: true, 

      width:363,

      height:345, 

      shadow: true, 

	  title:'Işın Kariyer - Üye Girşi',

	  resizable:false,

		
      closeAction:'hide', 

      plain: true, 

	  closable:true,

      bodyBorder: true,
	  
	  buttonAlign:'center',

      layout: 'form', 

      border: true,
	  
	  buttons: [{  

            text: 'Giriş',  

            type: 'submit',  

            name: 'send',

			handler: function(){ 

             simple.getForm().submit({

url:'data.inc/cpu.v2.inc.php?act=lgn', 

waitMsg:'Bilgileriniz kontrol ediliyor...',

success: function(form, action) {

	Ext.MessageBox.alert('Giriş Yapildi', 'Giris yaptiginiz icin tesekkur ederiz.');

	location.href="home.php";

},

failure: function(form, action) {
	Ext.MessageBox.alert('Giriş Başarısız.', 'Kullanıcı adınızı veya Parolanızı kontrol edin!');

}

});

 

            }

            

        },{

			 text: 'Ziyaretçi',  

            type: 'button',  

            name: 'mx',  

            disabled: false,  

			handler: function(){ 

            location.href="home.php"; 

            }

			}] 


  }); 

  var pan = new Ext.Panel({ 

      layout:'fit', 

      modal: true, 

      width:363, 

      height:170, 

      shadow: true, 

      closeAction:'hide', 

      plain: true, 

      bodyBorder: false, 

      layout: 'form', 

	  contentEl:'logo',

      border: false 

  }); 



    var simple = new Ext.FormPanel({ 

        labelWidth: 75, 

        method: 'POST', 

        frame:true, 

        title: 'Üye Girişi',


        bodyStyle:'padding:5px 5px 0', 

        width: 346,
		
		height: 105,

        layout: 'form', 

        defaults: {width: 230}, 



        items: [ 

           {            

                xtype: 'textfield', 

                fieldLabel: 'Kullanıcı Adi', 

                name: 'kadi', 

                allowBlank:false 

            },{ 

                xtype: 'textfield', 

                fieldLabel: 'Parola', 

                name: 'pass', 

                inputType: 'password',

				  allowBlank:false 

            }]

      
    }); 

     win.add(pan); 
    win.add(simple); 
    win.show();        
   
 }
