debug->ips->toArray()) ) { die('Debug mode is forbidden for your ip ' . $_SERVER['REMOTE_ADDR']); } ?> DEBUG debug->cookie, '1'); header('Location: ' . $baseUrl); break; case 'debugOff': setcookie($config->debug->cookie, '0', time() - 3600 * 24); header('Location: ' . $baseUrl); break; case 'clearCache': echo 'Back

'; foreach (glob(BASE_PATH . '/tmp/cache/*') as $filename) { $ok = unlink($filename); echo '

' . htmlspecialchars(($ok ? 'DONE' : 'FAIL') . ' ' . $filename) . '

' . PHP_EOL; } break; case 'clearMerge': echo 'Back

'; foreach ([WWW_PATH . '/css/*.pack.merge.css', WWW_PATH . '/js/*.pack.merge.js'] as $mask) { foreach (glob($mask) as $filename) { $ok = unlink($filename); echo '

' . htmlspecialchars(($ok ? 'DONE' : 'FAIL') . ' ' . $filename) . '

' . PHP_EOL; } } break; case 'updateRev': $revFile = WWW_PATH . '/rev'; $rev = isset($_GET['rev']) ? $_GET['rev'] : ''; if ($rev) { file_put_contents($revFile, $rev); } else { unlink($revFile); } header('Location: ' . $baseUrl); break; default: header('Location: ' . $baseUrl); break; } if (isset($_COOKIE[$config->debug->cookie]) && $_COOKIE[$config->debug->cookie] == '1') { echo 'Debug ENABLED'; echo ' - '; echo 'disable'; } else { echo 'Debug DISABLED'; echo ' - '; echo 'enable'; } });