rendered paste body<?php
/* bmwboy.com scriptz0rz, I am uberleet. */
ob_start();
session_start();
$path = substr(str_replace('\\', '/', getcwd()), 2);
$page = array();
foreach($_GET as $key => $value) $page[] = htmlentities(stripslashes($key));
// allowed pages
$pages = array('index');
// the first element in the $page array
$tpage = in_array($page[0], $pages) ? $page[0] : null;
// writes color to session if isset
if(isset($_GET['c'])) $_SESSION['c'] = $_GET['c'];
// index if the page is null
function index(){
$bodytext = "Welcome to my page!";
}
if($tpage == null) index();
else{
// if called page is in array, then show that page.. else show index
if(in_array($tpage, $pages)) $tpage();
else index();
}
function head(){
?>
<html>
<head>
<title>bmwboy.com - brandon's piece of the web</title>
</head>
<link rel="stylesheet" type="text/css" href="style.css" />
<table border="0" cellpadding="0" cellspacing="0" width="100%" align="center">
<tr bgcolor="#000000">
<td width="100%">
<table border="0" width="100%" align="centeR">
<tr bgcolor="#333333">
<td valign="bottom" colspan="2">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="middle">
<td>
<div align="left"> <font size="1" face="Arial, Helvetica, sans-serif"><b>
<a href="index.php">home</a>
| <a href="mailto:hacking4food@gmail.com">e-mail</a> </b></font>
</div>
</td>
<td>
<div align="right"><font color="#FFFFFF" size="2" face="Tahoma">
<strong><a href="index.html">bmwboy's junk</a></strong> </font>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<table border="0" cellpadding="0" cellspacing="0" width="100%" align="center">
<tr>
<td>
<font size="1" face="Tahoma"><br> </font>
</td>
<td valign="top" width="25%">
<table border="0" cellpadding="2" cellspacing="1" width="100%">
<tr bgcolor="#000000">
<td align="center">
<table border="0" cellpadding="3" cellspacing="0" width="100%" bgcolor="#333333">
<tr>
<td>
<div align="center"> <font color="#FFFFFF" size="1" face="Tahoma">
<b>welcome to my corner of the web</b></font></div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="#000000">
<table border="0" cellpadding="3" cellspacing="0" width="100%" bgcolor="#333333">
<tr>
<td>
<div align="left"><font size="1" face="Tahoma">you really probably won't find anything you want here, I hardly ever finish anything I start...</font></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<table border="0" cellpadding="2" cellspacing="1" width="100%">
<tr bgcolor="#000000">
<td align="center">
<table border="0" cellpadding="3" cellspacing="0" width="100%" bgcolor="#333333">
<tr>
<td>
<div align="center"> <font color="#FFFFFF" size="1" face="Tahoma">
<b>random crap i like</b></font> </div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="#000000">
<table border="0" cellpadding="3" cellspacing="0" width="100%" bgcolor="#333333">
<tr>
<td>
<div align="left">
<font size="1" face="Tahoma">
<a href="http://www.digg.com/">Digg</a><br>
<a href="http://www.kryptn.com">Kryptn, another dude from school</a><br>
<a href="http://www.phpbuilder.com">PHPBuilder - good for all you newbs</a><br?
</font> </div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<?php }
function content(){
?>
<td>
<font size="1" face="Tahoma"> </font>
</td>
<td valign="top" width="75%">
<table border="0" cellpadding="2" cellspacing="1" width="100%">
<tr bgcolor="#000000">
<td>
<table border="0" cellpadding="3" cellspacing="0" width="100%">
<tr>
<td bgcolor="#333333"> <font size="1" face="Tahoma"> <strong>11.03.07 - I'm back </strong></font><br>
<font color="#909090" size="1" face="Tahoma"> </font><font size="1" face="Tahoma">
<br>
<!-- begin body content, powered by my crappy makeshift script; bascially, I coded this in 30 minutes -->
<?php echo $bodytext; ?>
</tr>
<tr bgcolor="#444444">
<td>
<div align="center"> <font face="Tahoma" size="1"> <b>© 2006-2007 brandonw, some rights reserved.</b> </font> </div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td>
<font size="1" face="Tahoma"> </font>
</td>
</tr>
</table>
</body>
</html>
<?php }
head();
content();
?>