plugins/SpecialAdmin.php
changeset 1126 e2addf0bd2f4
parent 1122 e1606c85e937
child 1170 71cb87b7dc3f
equal deleted inserted replaced
1125:367768040a61 1126:e2addf0bd2f4
  2577             exit;
  2577             exit;
  2578           }
  2578           }
  2579           $cache->purge('anon_sidebar');
  2579           $cache->purge('anon_sidebar');
  2580           if(isset($_GET['ajax']))
  2580           if(isset($_GET['ajax']))
  2581           {
  2581           {
  2582             ob_end_clean();
       
  2583             die('GOOD');
  2582             die('GOOD');
  2584           }
  2583           }
  2585           echo '<div class="error-box" style="margin: 10px 0;">' . $lang->get('sbedit_msg_block_deleted') . '</div>';
  2584           echo '<div class="error-box" style="margin: 10px 0;">' . $lang->get('sbedit_msg_block_deleted') . '</div>';
  2586           break;
  2585           break;
  2587         case 'disenable';
  2586         case 'disenable';
  2602             $template->footer();
  2601             $template->footer();
  2603             exit;
  2602             exit;
  2604           }
  2603           }
  2605           if(isset($_GET['ajax']))
  2604           if(isset($_GET['ajax']))
  2606           {
  2605           {
  2607             @ob_end_clean();
       
  2608             die('GOOD');
  2606             die('GOOD');
  2609           }
  2607           }
  2610           break;
  2608           break;
  2611         case 'rename';
  2609         case 'rename';
  2612           $newname = $db->escape($_POST['newname']);
  2610           $newname = $db->escape($_POST['newname']);
  2617             $template->footer();
  2615             $template->footer();
  2618             exit;
  2616             exit;
  2619           }
  2617           }
  2620           if(isset($_GET['ajax']))
  2618           if(isset($_GET['ajax']))
  2621           {
  2619           {
  2622             ob_end_clean();
       
  2623             die('GOOD');
  2620             die('GOOD');
  2624           }
  2621           }
  2625           break;
  2622           break;
  2626         case 'getsource':
  2623         case 'getsource':
  2627           $q = $db->sql_query('SELECT block_content,block_type FROM '.table_prefix.'sidebar WHERE item_id=' . intval($_GET['id']) . ';');
  2624           $q = $db->sql_query('SELECT block_content,block_type FROM '.table_prefix.'sidebar WHERE item_id=' . intval($_GET['id']) . ';');
  2629           {
  2626           {
  2630             echo $db->get_error();
  2627             echo $db->get_error();
  2631             $template->footer();
  2628             $template->footer();
  2632             exit;
  2629             exit;
  2633           }
  2630           }
  2634           ob_end_clean();
       
  2635           $r = $db->fetchrow();
  2631           $r = $db->fetchrow();
  2636           $db->free_result();
  2632           $db->free_result();
  2637           $cache->purge('anon_sidebar');
  2633           $cache->purge('anon_sidebar');
  2638           
  2634           
  2639           if($r['block_type'] == BLOCK_PLUGIN) die('HOUSTON_WE_HAVE_A_PLUGIN');
  2635           if($r['block_type'] == BLOCK_PLUGIN) die('HOUSTON_WE_HAVE_A_PLUGIN');