Code: Select all
<?php
include("database.php");
ob_start();
$pagetest = mysql_query("select count(*) as count from swarm_wiki");
$pages = mysql_fetch_object($pagetest)->count;
$pagenum = intval($pages);
echo <<<END
<head>
<title>Crimson Swarm</title>
<style type="text/css">
body {
background:url('images/backgroundNew.jpg') no-repeat;
z-index:-1;
background-size:100%;
}
</style>
</head>
END;
echo <<<end
<div style = "overflow:auto;height:60px;right:0px;left:0px;bottom:0px;position:absolute;background:url('images/grassNew.jpg') no-repeat; background-size:100%;z-index:1;">
end;
$p = 0;
$times = 5-$pagetest;
for ($i = 1; $i <= $pagenum; $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 = 200*($p-1);
$submit = "Submit".$p;
echo <<<END
<FORM NAME ="form1" METHOD ="POST" ACTION = "beta.php">
<div style = "height:50px;width:200px;position:absolute;left:$pos;bottom:0px;">
<INPUT style = "position:inherit;height:100%;width:100%;background:url('images/buttonNew.jpg') no-repeat;background-size:100%;top:0px;left:0px;" value = "$title" name = "$submit" type="Submit">
</div>
END;
}
$p = 0;
$times = 5-$pagetest;
for ($i = 1; $i <= $pagenum; $i++) {
$p = $p+1;
$submit = "Submit".$p;
if (isset($_POST[$submit])) {
setcookie("page", $p, time()+60*60*24*10, "", "");
echo <<<end
<head>
<meta HTTP-EQUIV="REFRESH" content="0; url='beta.php'">
</head>
end;
}
}
echo "</div>";
echo "</div>";
echo "<div style = 'left:0px;right:0px;height:100%;top:0px;bottom:0px;position:absolute;'>";
echo "<img src = 'images/messageNew.jpg' style='width:80%;left:10%;right:10%;top:0px;height:100%;position:absolute;z-index:-1;'></img>";
echo "<div style = 'left:20%;overflow: auto;width:80%;top:0px;bottom:60px;position:absolute;background:url('images/messageNew.jpg') no-repeat;background-size:100%;z-index=1;'>";
echo "<img src='images/TheCrimsonSwarm.png' style='left:25%;top:0px;position:inherit;width:304px;height:150px;'></img>";
echo <<<END
</div>
<div style="overflow:auto;top:150px;position:absolute;left:10%;bottom:60px;right:10%;">
END;
if (isset($_COOKIE['page'])) {
$p = $_COOKIE['page'];
$text = eval(${note.$p."text"});
$title = ${note.$p."title"};
echo <<<END
<div style="top:150px;left:0px;right:0px;width:100%;position:inherit;background:url('images/messageNew.jpg') no-repeat;background-size:100%;">
$text
</div>
END;
} else {
$text = eval($note1text);
$title = $note1title;
echo <<<END
<div style="top:150px;left:0px;right:0px;width:100%;position:inherit;background:url('images/messageNew.jpg') no-repeat;background-size:100%;">
$text
</div>
END;
}
echo "</div>";
ob_flush();
?>