//---------------------------- function rec($all,$unic) { $user = "scorpions"; $password = "scorpions1401"; $host="gorodok.net"; $connect=ftp_connect($host); $result = ftp_login($connect, $user, $password); if($result) { $remote_file = "count.txt"; @ftp_delete($connect,$remote_file); $f = fopen("ftp://$user:$password@scorpions.gorodok.net/count.txt","w"); if($f) { fwrite($f,$all." ".$unic); fclose($f); } } } function cuka_continue() { global $mday_old; global $month_old; global $year_old; global $minute_old; $mday_old = $_COOKIE["mday"]; $month_old = $_COOKIE["month"]; $year_old = $_COOKIE["year"]; $hour_old = $_COOKIE["hours"]; $minute_old = $_COOKIE["minutes"]; global $mday; global $month; global $year; global $hour; global $minute; $today = getdate(); $mday = $today["mday"]; $month = $today["month"]; $year = $today["year"]; $hour = $today["hours"]; $minute = $today["minutes"]; setcookie("mday", $mday, time()+36000000); setcookie("month", $month, time()+36000000); setcookie("year", $year, time()+36000000); setcookie("hours",$hour,time()+36000000); setcookie("minutes",$minute,time()+36000000); global $check; $check = 0; } function new_cuka() { global $mday; global $month; global $year; global $hour; global $minute; $today = getdate(); $mday = $today["mday"]; $month = $today["month"]; $year = $today["year"]; $hour = $today["hours"]; $minute = $today["minutes"]; setcookie("mday", $mday, time()+36000000); setcookie("month", $month, time()+36000000); setcookie("year", $year, time()+36000000); setcookie("hours",$hour,time()+36000000); setcookie("minutes",$minute,time()+36000000); global $check; $check = 1; } //---------------------------- $fp = fopen($SYSTEM_PREFIX."count.txt","r"); if($fp) { $flag = 1; $current = ""; while(!feof($fp)) { $current = fread($fp,1); if($current == " ") { $flag++; } if($flag == 1 && $current != " ") { $all = $all.$current; } if($flag == 2 && $current != " ") { $unic = $unic.$current; } } fclose($fp); } session_name("cok"); session_start(); session_register("cokie_flag") ; session_register("check_q") ; session_register("naeb"); if( isset($_COOKIE["mday"]) || isset($_COOKIE["month"]) || isset($_COOKIE["hours"]) ) { cuka_continue(); $cokie_flag = "on"; if( isset($_COOKIE["ch"]) ) { $check_q = 1; } else { $check_q = 0; } $check = 0; if($naeb == 0) { $all++; rec($all,$unic); $naeb++; } } else { if(!$cookie) { header("Location: $PHP_SELF?cookie=1"); setcookie("test","1"); } else { if(!$test) { // куки выключены $cokie_flag = "off"; } else { $cokie_flag = "on"; new_cuka(); if($naeb == 0) { $all++; $unic++; rec($all,$unic); $naeb++; } $check = 1; } } } ?>
|
|||||||||||||||||||||
ИСТОРИЯ ПЕРЕВОДЫ ТАБУЛАТУРА ГЛАВНАЯ ССЫЛКИ ЛИРИКА РЕЦЕНЗИИ Добро пожаловать на сайт SCORPIONS.GORODOK.NET
|