Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //browser refresh code
- if((localStorage.getItem('is_Reloaded_admin')==true))
- {
- $.ajax({
- type:'Post',
- cache: true,
- url: 'adminnew.php',
- success:function(html)
- {
- $('#dummy_div').html(html);
- }
- });
- }
- if((localStorage.getItem('is_Reloaded_super')==true))
- {
- $.ajax({
- type:'Post',
- cache: true,
- url: 'superadmin.php',
- success:function(html)
- {
- $('#dummy_div').html(html);
- }
- });
- }
- if((localStorage.getItem('is_Reloaded_normal')==true))
- {
- $.ajax({
- type:'Post',
- cache:true,
- url: 'dash.php',
- success:function(html)
- {
- $('#dummy_div').html(html);
- }
- });
- }
- //Based on the conditions given in ny_scripte file
- $('#dash_button').click(function()
- {
- var username = $('#username').val();
- var password = $('#password').val();
- $('#dummy_div').empty();
- $.ajax({
- type:'Post',
- cache: false,
- url: 'ajax_check.php',
- data: {username:username,password:password},
- success:function(html)
- {
- if(html=="ADMIN")
- {
- $.ajax({
- type:'Post',
- cache: false,
- url: 'adminnew.php',
- success:function(html)
- {
- localStorage.setItem('is_Reloaded_admin',true);
- $('#dummy_div').html(html);
- }
- });
- }
- if(html=="SUPERADMIN")
- {
- $.ajax({
- type:'Post',
- cache: false,
- url: 'superadmin.php',
- success:function(html)
- {
- localStorage.setItem('is_Reloaded_super', true);
- $('#dummy_div').html(html);
- }
- });
- }
- if(html=="Normal User")
- {
- $.ajax({
- type:'Post',
- cache: false,
- url: 'dash.php',
- success:function(html)
- {
- localStorage.setItem('is_Reloaded_normal',true);
- $('#dummy_div').html(html);
- }
- });
- }
- }
- });
- });
- });
Add Comment
Please, Sign In to add comment