$wo="main.php";
include ("counter.php");
require ("_functions.php");
require ("_data.php");
require ("_header.php");
$sql="SELECT
*
FROM
internetseiten";
$result=mysql_query($sql) OR die(mysql_error());
$anzahl = mysql_num_rows($result)-1;
mysql_free_result($result);
srand(microtime()*1000005);
$zufall1 = rand(1,$anzahl);
srand(microtime()*1000009);
$zufall2 = rand(1,$anzahl);
srand(microtime()*1000009);
$zufall3 = rand(1,$anzahl);
srand(microtime()*1000008);
$zufall4 = rand(1,$anzahl);
while ($zufall1==$zufall2)
{
srand(microtime()*1000007);
$zufall2 = rand(1,$anzahl);
}
while (($zufall1==$zufall3)or($zufall2==$zufall3))
{
srand(microtime()*1000003);
$zufall3 = rand(1,$anzahl);
}
while (($zufall1==$zufall4)or($zufall2==$zufall4)or($zufall3 == $zufall4))
{
srand(microtime()*1000002);
$zufall4 = rand(1,$anzahl);
}
$sql="SELECT
number
FROM
zufall
WHERE
id LIKE $zufall1 or
id LIKE $zufall2 or
id LIKE $zufall3 or
id LIKE $zufall4";
$result=mysql_query($sql) OR die(mysql_error());
$count=1;
while ($row=mysql_fetch_assoc($result))
{
$number[$count] = $row['number'];
$count++;
}
mysql_free_result($result);
$count=1;
while($count<5)
{
srand(microtime()*1000002);
$zufall[$count] = rand(1,4);
if($count==2)
{
while ($zufall[$count]==$zufall[1])
{
srand(microtime()*1000002);
$zufall[$count] = rand(1,4);
}
}
elseif($count==3)
{
while (($zufall[$count]==$zufall[1])or ($zufall[$count]==$zufall[2]))
{
srand(microtime()*1000002);
$zufall[$count] = rand(1,4);
}
}
elseif($count==4)
{
while (($zufall[$count]==$zufall[1])or ($zufall[$count]==$zufall[2])or ($zufall[$count]==$zufall[3]))
{
srand(microtime()*1000002);
$zufall[$count] = rand(1,4);
}
}
$jetzt=$zufall[$count];
$sql="SELECT
bild,
titel,
kurzbe,
id
FROM
internetseiten
WHERE
id = '".$number[$jetzt]."'";
$result = mysql_query($sql) OR die(mysql_error());
$row=mysql_fetch_assoc($result);
$sitez[$count] = $row['bild'];
$beschrz[$count] = $row['titel'];
$kurzz[$count] = $row['kurzbe'];
$linkz[$count] = "internetseite.php?s=".$row['id'];
$count++;
}
$verzeichnis="";
$stadtfuehrung="";
$sql="Select
name,
nummer
From
kategorien";
$result=mysql_query($sql) or die(mysql_error());
while($row=mysql_fetch_assoc($result))
{
$verzeichnis.="".$row['name']."\n";
}
$sql="Select
kateg,
name
From
kateg_stadt
Where
kateg>0
Order By
kateg asc";
$result=mysql_query($sql) or die(mysql_error());
while($row=mysql_fetch_assoc($result))
{
$stadtfuehrung.="".$row['name']."\n";
}
eval("dooutput(\"".gethtml("main")."\");");
?>