<?php
include_once("inclydings/sql.php");
$stop_injection = new InitVars();
$stop_injection->checkVars();
function anti_hacker($txt){
$txt=str_replace("|","I",$txt); 
$txt=str_replace("../",",,/",$txt);
$txt=str_replace("||","I",$txt);               
$txt=str_replace("\"","",$txt);
$txt=str_replace("\""," ",$txt);
$txt=str_replace("/\\\$/","",$txt);
$txt=str_replace("$","",$txt);          
$txt=str_replace("\\","",$txt);
$txt=str_replace("\\","",$txt);
$txt=str_replace("`","",$txt);  
$txt=str_replace("^","",$txt);
$txt=str_replace("%","",$txt);
$txt=htmlspecialchars($txt);  
$txt=stripslashes(trim($txt));
return $txt;}
if(isset($_GET)){foreach($_GET as $key=>$value){$_GET[$key]=anti_hacker($value);}}
if(isset($_POST)){foreach($_POST as $key=>$value){$_POST[$key]=anti_hacker($value);}}
if(isset($_SESSION)){foreach($_SESSION as $key=>$value){$_SESSION[$key]=anti_hacker($value);}}
if(isset($_COOKIE)){foreach($_COOKIE as $key=>$value){$_COOKIE[$key]=anti_hacker($value);}}
session_save_path($_SERVER['DOCUMENT_ROOT'].'/log');
session_start();
if(isset($telecod_ip)){
$t=((int)((time()-$telecod_ip)));
if($t<1) die("Нельзя обращаться чаще, чем раз в секунду!");
} elseif(isset($_GET['telcod'])){
die("Включите куки для работы!");     }
$_SESSION['telecod_ip']=time();
?>