Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var conn;
- function checkAuth(){
- Ext.Ajax.request({
- url: '<?php echo Zend_Registry::get('config1')->site->url; ?>admin/index/checkauth',
- success: function(response){
- auth = Ext.util.JSON.decode(unescape(response.responseText)).success;
- if(auth) return;
- else document.location.href= "<?php echo Zend_Registry::get('config1')->site->url; ?>";
- }
- });
- }
- Ext.onReady(function(){
- var appMask;
- appMask = new Ext.LoadMask(Ext.getBody(), {msg:'Loading...'});
- appMask.show();
- conn = new Ext.data.Connection();
- conn.addListener('beforerequest', function(con){
- //Ext.util.JSON.decode(unescape(response)).success;
- checkAuth();
- });
Add Comment
Please, Sign In to add comment