read()) if (is_file("$cache_dir/$entry")) unlink("$cache_dir/$entry"); }else if (!strstr($_SERVER['REQUEST_URI'], '.php') && !strstr($_SERVER['REQUEST_URI'], '?') && !in_array($_REQUEST['dir'], $dont_cache)) { clearstatcache(); $cachefile = $cache_dir.'/'.str_replace('/', '_', $_SERVER['REQUEST_URI']).'.txt'; if (file_exists($cachefile) && filemtime($cachefile) > time() - ($hours * 60 * 60)) { readfile($cachefile); echo "\n"; if ($_SESSION['speed']) echo '
'.round(microtime(true) - $_SESSION['speed'], 4).' sec. cache
'; exit; }else{ ob_start(); } } } # cache END include_once 'functions.php'; # sanitize BEGIN if (!is_admin()) { $_REQUEST = sanitize($_REQUEST); $_POST = sanitize($_POST); $_GET = sanitize($_GET); } # sanitize END include_once 'item_functions.php'; setup_session_vars(); $full_path = "content/pages/$_REQUEST[lang]/$_REQUEST[dir]"; # 404 kluda if (!file_exists($full_path)) { if (!is_admin()) { header('HTTP/1.0 404 Not Found'); define('NOTFOUND', '1'); } if (!in_array($_REQUEST['lang'], other_languages())) $_REQUEST['lang'] = DEFAULT_LANG; $_REQUEST['dir'] = DEFAULT_PAGE; $full_path = "content/pages/$_REQUEST[lang]/$_REQUEST[dir]"; } #saglaba lapas saturu no spaw2.php formas $edited_file = "$full_path/$_REQUEST[editfile]"; if (is_admin() && $_REQUEST['saglabat'] && file_exists($edited_file)) { #saglaba editora saturu un SEO file_put_contents($edited_file, eregi_replace('', '', stripslashes($_POST['spaw1']))); if ($_POST['header']) { file_put_contents("$full_path/header.txt", trim(stripslashes($_POST['header']))); } else { unlink("$full_path/header.txt"); } if ($_POST['name']) { file_put_contents("$full_path/name.txt", trim(stripslashes($_POST['name']))); } else { unlink("$full_path/name.txt"); } if ($_POST['template']) { file_put_contents("$full_path/template.php", " <br /> <b>Fatal error</b>: Uncaught Error: Call to undefined function title() in /var/www/vhosts/ondulat.lv/httpdocs/index.php:138 Stack trace: #0 {main} thrown in <b>/var/www/vhosts/ondulat.lv/httpdocs/index.php</b> on line <b>138</b><br />