getSize() > 1)/*52428800*/) { if (!isset($_SERVER['PHP_AUTH_USER'])) { setcookie("ddl", "", time()-3600*24); //setcookie("ddc", "", time()-3600); header("WWW-Authenticate: Basic realm=\"Login\""); header("HTTP/1.0 401 Unathorized"); //session_destroy(); die("
No login passed!
"); } else { require_once('./class-phpass.php'); $hasher = new PasswordHash(8, true); $auth = fopen('.htpasswd', 'r'); $content = fread($auth, filesize(".htpasswd")); fclose($auth); preg_match("/".$_SERVER['PHP_AUTH_USER']."\:(.*)$/m", $content, $matches); if (!$hasher->CheckPassword($_SERVER['PHP_AUTH_PW'], trim($matches[1]))) { setcookie("ddl", "", time()-3600*24); //setcookie("ddc", "", time()-3600); header("WWW-Authenticate: Basic realm=\"Login\""); header("HTTP/1.0 401 Unathorized"); //session_destroy(); die("
Try again.
"); } else { //setcookie("direct-dl", md5($_SERVER['PHP_AUTH_USER']), time()+3600); /*if(!my_session_start()) { session_regenerate_id(true); session_start(); }*/ //$ddc = ($t+2)*3; setcookie("ddl", "$cp", time()+3600*24); //setcookie("ddc", "$ddc", time()+3600); redirect_post($ac); } } } else { //die("yes"); //$ddc = ($t+2)*3; setcookie("ddl", "$cp", time()+3600*24, '/'); //setcookie("ddc", "$ddc", time()+3600, '/'); redirect_post($ac); } ?>