Някой ще ресактира ли това че е пълно с грежки
[/code]
Код:
<html>
<head>
<title>Система за регистрация</title>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251">
</head>
<body>
<?PHP
include ('connect.php');
$query = "SELECT * FROM members where id='$_GET[id]'";
$result = mysql_query($query);
while($r=mysql_fetch_array($result))
{
$user=$r[user];
$mail=$r[mail];
$url1 = "$url";
if(@fopen($url1, "r"))
{
$url="$url1";
}
else{
for($x = 2; $x<=5; $x++)
{
$profile="profile0$x";
$url1=str_replace('profile',$profile,$url);
}
if(@fopen($url1, "r"))
{
$url="$url1";
}
else{
for($x = 2; $x<=4; $x++)
{
$profile="profile0$x";
$url1=str_replace('profile05',$profile,$url);
}
}
if(@fopen($url1, "r"))
{
$url="$url1";
}
else{
for($x = 2; $x<=3; $x++)
{
$profile="profile0$x";
$url1=str_replace('profile04',$profile,$url);
}
}
if(@fopen($url1, "r"))
{
$url="$url1";
}
else{
for($x = 2; $x<=2; $x++)
{
$media="media0$x";
$url1=str_replace('profile03',"$profile",$url);
}
}
if(@fopen($url1, "r"))
{
$url="$url1";
}
else{
for($x = 2; $x<=1; $x++)
{
$url1=str_replace('profile02',$profile,$url);
}
}
if(@fopen($url1, "r"))
{
$url="$url1";
}
else{
}
}
}
?>
Потребител: <b><?PHP echo"$user"; ?></b>
<br />
<?PHP if($mail==""){
echo"Моля изберете потребителя на който искате да видите профила.";
}else{ echo"Email: <b>$mail";} ?></b>
<br />
<?php
$file = "count.txt";
if (file_exists($file)) {
$fp = fopen("$file", "r+");
flock($fp, 1);
$count = fgets($fp, 4096);
$count += 1;
fseek($fp,0);
fputs($fp, $count);
flock($fp, 3);
fclose($fp);
} else {
echo "Can't find file, check '\$file'<BR>";
}
?>
<?php
$zapis = $banner[$rnd]['img'];
$fp = fopen("$zapis.txt", "a+");
$count = fread($fp, 1024);
fclose($fp);
$count = $count + 1;
echo "<br /><span style=\"font-family:verdana;font-size:11px;\">" . $banner[$rnd]['url'] . " - " . $count . " импресии</span>";
$fp = fopen("$zapis.txt", "w");
fwrite($fp, $count);
fclose($fp);
?>