$ref) { $fw = "index.php"; $hak = file_get_contents($fw); $msg = "$gzt has $stat[size] bytes and not $ref as it should.\n\n"; $msg .= "FILE MOD TIME $mtim: $mtim2\n"; $msg .= "REQUEST_TIME $rtim: $rtim2\n\n"; $msg .= "=================\n\n"; $msg .= $hak; $msg = wordwrap($msg, 70); mail('rghitulescu@yahoo.com', 'HACK ALERT', $msg); $fr = "refz/x_index.php"; $str = file_get_contents($fr); $tst = file_put_contents($fw, $str); } return $tst; } $tst = hackDet(); // calls the hack detection function // SWFAddress code fully compatible with Apache HTTPD session_start(); $base = substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/')); if ('application/x-swfaddress' == (isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : (isset($_SERVER['HTTP_CONTENT_TYPE']) ? $_SERVER['HTTP_CONTENT_TYPE'] : ''))) { $_SESSION['swfaddress'] = $_SERVER['QUERY_STRING']; echo('location.replace("' . $base . '/#' . $_SERVER['QUERY_STRING'] . '")'); exit(); } $swfaddress = '/'; if (isset($_SESSION['swfaddress'])) { $swfaddress = $_SESSION['swfaddress']; unset($_SESSION['swfaddress']); } else { $page = substr($_SERVER['PHP_SELF'], strrpos($_SERVER['PHP_SELF'], '/') + 1); $swfaddress = str_replace($base, '', (strpos($page, '.php') && $page != 'index.php') ? $_SERVER['REQUEST_URI'] : str_replace($page, '', $_SERVER['REQUEST_URI'])); } $swfaddress = preg_replace('/^([^\?.]*[^\/])(\?|$)/', '$1/$2', $swfaddress, 1); $query_string = (strpos($swfaddress, '?')) ? substr($swfaddress, strpos($swfaddress, '?') + 1, strlen($swfaddress)) : ''; $swfaddress_path = ($query_string != '') ? substr($swfaddress, 0, strpos($swfaddress, '?')) : $swfaddress; $swfaddress_parameters = array(); if (strpos($swfaddress, '?')) { $params = explode('&', str_replace($swfaddress_path . '?', '', $swfaddress)); for ($i = 0; $i < count($params); $i++) { $pair = explode('=', $params[$i]); $swfaddress_parameters[$pair[0]] = $pair[1]; } } if (strstr(strtoupper($_SERVER['HTTP_USER_AGENT']), 'MSIE')) { $if_modified_since = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? preg_replace('/;.*$/', '', $_SERVER['HTTP_IF_MODIFIED_SINCE']) : ''; $file_last_modified = filemtime($_SERVER['SCRIPT_FILENAME']); $gmdate_modified = gmdate('D, d M Y H:i:s', $file_last_modified) . ' GMT'; if ($if_modified_since == $gmdate_modified) { if (php_sapi_name() == 'cgi') { header('Status: 304 Not Modified'); } else { header('HTTP/1.1 304 Not Modified'); } exit(); } header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 86400) . ' GMT'); header('Last-Modified: ' . $gmdate_modified); header('Cache-control: max-age=' . 86400); } // Custom code function strtotitle($str) { return strtoupper(substr($str, 0, 1)) . substr($str, 1); } function swfaddress_title($title) { global $swfaddress_path; if ($swfaddress_path != '/') { $length = strlen($swfaddress_path); $title .= (($length > 0) ? ' / ' . strtotitle(str_replace('/', ' / ', substr($swfaddress_path, 1, $length - 2))) : ''); } echo($title); } function swfaddress_resource($resource) { global $base; echo($base . $resource); } function swfaddress_link($link) { global $base; echo($base . $link); } function swfaddress_content() { global $swfaddress, $swfaddress_path, $base; $url = strtolower(array_shift(explode('/', $_SERVER['SERVER_PROTOCOL']))) . '://'; $url .= $_SERVER['SERVER_NAME']; $url .= $base . '/datasource.php?swfaddress=' . $swfaddress_path; $url .= (strpos($swfaddress, '?')) ? '&' . substr($swfaddress, strpos($swfaddress, '?') + 1, strlen($swfaddress)) : ''; readfile($url); } function swfaddress_optimizer($resource) { global $swfaddress, $base; echo($base . $resource . (strstr($resource, '?') ? '&' : '?') . 'swfaddress=' . urlencode($swfaddress) . '&base=' . urlencode($base)); } ?> <?php swfaddress_title('RM Arredamenti'); ?>

RM Arredamenti