Code: Select all
include("database.php");
ob_start();
$pages = mysql_query("select max(ID) from swarm_wiki");
echo <<<END
<head>
<title>Crimson Swarm</title>
</head>
END;
echo <<<end
<div style = "overflow:scroll;height:100%;width:200px;">
end;
$p = 0;
for ($i = 3; $i <= $pages; $i++) {
$p = $p+1;
${note.$p."title"} = mysql_fetch_object(mysql_query("select Name from swarm_wiki where ID = '$p'")) ->Name;
${note.$p."text"} = mysql_fetch_object(mysql_query("select Text from swarm_wiki where ID = '$p'")) ->Text;
$title = ${note.$p."title"};
$text = ${note.$p."text"};
$pos = 50*($p-1);
$submit = "Submit".$p;
echo <<<END
<div style = "height:50px;width:100%;position:inherit;left:0px;top:$pos;background-color:#3399FF;">
<INPUT style = "position:inherit;height:100%;width:100%;background-color:#3399FF;top:0px;left:0px;" value = "$title" name = "$submit" type="Submit">
<div style = "position:inherit;height:50%;left:0px;top:50%;width:100%;">
<p>$desc</p>
</div>
</div>
END;
}
echo "</div>";[text]Full texts ID Name describe Text In
1 Home The homepage echo "<html><head></head><body><p>Hello, welcome t... 1
2 Places To Go echo "<html> <head> </head> <body> <i3>On The Crim... 1[/text]
(Not sure how well that came out)
And the output of it is:
[text] <head>
<title>Crimson Swarm</title>
</head>
<body>
<div style = "overflow:scroll;height:100%;width:200px;">
<div style = "height:50px;width:100%;position:inherit;left:0px;top:0;background-color:#3399FF;">
<INPUT style = "position:inherit;height:100%;width:100%;background-color:#3399FF;top:0px;left:0px;" value = "Home" name = "Submit1" type="Submit">
<div style = "position:inherit;height:50%;left:0px;top:50%;width:100%;">
<p></p>
</div>
</div>
</div>
</div>
<div style = 'left:210px;right:0px;height:100%;top:0px;bottom:0px;position:absolute;'>
<h1>Crimson Wiki</h1>
<div style="overflow:scroll;top:150px;position:absolute;left:0px;bottom:0px;right:0px">
<html>
<head>
</head>
<body>
<p>Hello, </p>
</body>
</html>
<div style="height:150px;width:100%;top:0px;left:0px;">
<h2>Home</h2>
</div>
<div style="top:150px;left:0px;width:100%;">
</div>
</div>[/text]