Ext.onReady(function(){ Ext.QuickTips.init(); Ext.BLANK_IMAGE_URL = "extlib/resources/images/default/s.gif"; if(Ext.form.ComboBox){ Ext.form.ComboBox.prototype.resizable = true; } if(Ext.grid.GridPanel) Ext.grid.GridPanel.prototype.stripeRows = true; Ext.namespace("PremisLiveTime"); PremisLiveTime = function(){ var ajareq = Ext.Ajax.request({ url: 'cplogintime.php', method: 'POST', success: function (response, options){ var o = Ext.decode(response.responseText); if(!o.success){ window.location.href = "index.php"; } }, failure: function(response, options){ Ext.Ajax.request({ url:'cplogout.php' , method: 'POST' , success: function(){ window.location.href = "index.php"; } , failure: function(){ window.location.href = "index.php"; } }); } }); setTimeout("PremisLiveTime();", 1000*60); }; Ext.namespace("CMS.TabItemHeight"); Ext.namespace("Ext.example.shortBogusMarkup"); Ext.example.shortBogusMarkup = '

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed metus nibh, sodales a, porta at, vulputate eget, dui. Pellentesque ut nisl. Maecenas tortor turpis, interdum non, sodales non, iaculis ac, lacus. Vestibulum auctor, tortor quis iaculis malesuada, libero lectus bibendum purus, sit amet tincidunt quam turpis vel lacus. In pellentesque nisl non sem. Suspendisse nunc sem, pretium eget, cursus a, fringilla vel, urna.'; //CMS.TabItemHeight = "auto"; CMS.TabItemHeight = document.body.offsetHeight-130; CMS.TabItemWidth = document.body.offsetWidth; // Create Form of property of User for window var myFromLogin= new Ext.FormPanel({ title:'Login', frame:true, labelAlign: 'right', bodyStyle:'padding:5px', width: 300, waitMsgTarget: true, renderTo: 'logining', iconCls:'login', items: [{ layout:'column', border:false, resizable:false, width: 300, items:[{ layout: 'form', columnWidth:1.0, border:false, items: [ {name: 'UserName',id: 'UserName', xtype:'textfield', fieldLabel: 'User Name'}, {name: 'UserPass',id: 'UserPass', xtype:'textfield', inputType:'password', fieldLabel: 'Password'} ] }] }], buttons: [{ text:'Login',handler: function(){ var RegCheck2 = new Ext.data.JsonStore({ url: 'cplogin.php', baseParams: { UserName: Ext.get('UserName').dom.value, UserPass: Ext.get('UserPass').dom.value, FormLogin: true}, root: 'data', totalProperty: 'count', fields: ['suscess', 'text'] }); RegCheck2.on('load', function(){ if (RegCheck2.getTotalCount()>0) { var rres=RegCheck2.getAt(0).get('suscess'); if (rres!=='TRUE') { Ext.MessageBox.show({ title: 'WARNING', msg: RegCheck2.getAt(0).get('text'), buttons: Ext.MessageBox.OK, icon: Ext.MessageBox.WARNING}); }else{ window.location.href = "index.php"; } } }); RegCheck2.load(); } }] }); });