<?php include("includes/variables.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="eng">
<head>
<title>
<?php echo("$titre"); ?>
</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="Jennifer Edmondson" />
<link rel="STYLESHEET" href="includes/template.css" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="640" align="center">
<tr>
<td colspan="2">
<center><a href="index.php"><img src="<?php echo("$banner"); ?>" alt="Return to the
main page" border="0" /></a></center>
<div id="linksbar"><?php echo("$links"); ?></div>
</td>
</tr>
<?php include("includes/inc_outside.php"); ?>
<?php
if ($cat=="home")
{
?>
<tr>
<td align="left" valign="top"> <?php
//Box on the left-hand side
$result = mysql_query("SELECT
count(news_id),news_id,news_edittext,news_title,news_post,news_username,news_time,news_views
FROM news WHERE news_type='1' GROUP BY news_id ORDER BY news_id DESC LIMIT $lc");
if (!$result)
{echo('<p>Error performing query: '.mysql_error().'</p>');
exit();
}
else
{$k="0";
while ($row = mysql_fetch_array($result))
{$news_edittext=$row[2];
if(!$news_edittext=="")
{$news_edittext='<br /><div class="edit">[ Last edited '."$news_edittext".'
]</div>';
}
$newsid = $row[1];
$views = $row[7];
$views = $views+1;
$sql="UPDATE news SET news_views='$views' WHERE news_id='$newsid'";
mysql_query($sql);
($views==1) ? $viewstext="time" : $viewstext="times";
echo('<div class="half"><div class="title">'.$row[6].': '.$row[3].'</div><br
/>'.ereg_replace("/(\015\012)|(\015)|(\012)/","<br />",$row[4]).'<br /><br
/><span class="footer">[ <span class="lightbrown">'.$row[5].'</span>
]'."$news_edittext".'</div>');
$k++;
}
}
if ($k==0)
{echo("<div class='half'>No news item yet.</div>");
}
?> </td>
<td align="right" valign="top">
<?php
//Box on the right-hand side
$result = @mysql_query("SELECT
count(news_id),news_id,news_edittext,news_title,news_post,news_username,news_time,news_views
FROM news WHERE news_type='2' GROUP BY news_id ORDER BY news_id DESC LIMIT $rc");
if (!$result)
{echo('<p>Error performing query: '.mysql_error().'</p>');
exit();
}
$k="0";
while ($row = mysql_fetch_array($result))
{
{$news_edittext=$row[2];
if(!$news_edittext=="")
{$news_edittext='<br /><div class="edit">[ Last edited '."$news_edittext".'
]</div>';
}
$newsid = $row[1];
$views = $row[7];
$views = $views+1;
$sql="UPDATE news SET news_views='$views' WHERE news_id='$newsid'";
mysql_query($sql);
($views==1) ? $viewstext="time" : $viewstext="times";
echo('<div class="half"><div class="title">'.$row[6].': '.$row[3].'</div><br
/>'.ereg_replace("/(\015\012)|(\015)|(\012)/","<br />",$row[4]).'<br /><br
/><span class="footer">[ <span class="lightbrown">'.$row[5].'</span>
]'."$news_edittext".'</div>');
$k++;
}
}
if ($k==0)
{echo("<div class='half'><i>No news item yet</i></div>");
}
?> </td>
</tr>
<?php
}
elseif ($cat==admin)
{include("includes/admin.php");
}
else
{
?>
<tr>
<td colspan="2">
<div id="all">
<?php
if((isset($adm)) and($cat=="admin"))
{
if(file_exists("includes/adm_$adm.php"))
{include("includes/adm_$adm.php");
}
else
{include("includes/404.php");
echo("<br /><br />Please supply the following information to the webmaster:<br
/>Error stage 1, adm is $adm and cat is $cat");
}
}
else
{
if(file_exists("includes/$cat.php"))
{include("includes/$cat.php");
}
else
{include("includes/404.php");
echo("<br /><br />Please supply the following information to the webmaster:<br
/>Error stage 2, cat is $cat");
}
}
?>
</div>
</td>
</tr>
<?php
}
?> <?php include("includes/inc_outside.php"); ?> <tr>
<td colspan="2">
<div id="copyright">
# Page designed and &copy; Jennifer Edmondson < <a
href="mailto:webmaster@bootlog.com" title="email me">webmaster@bootlog.com</a> > #

<!-- to be checked
This site is <a href="http://validator.w3.org/check/referer" title="W3C declares
this document valid xhtml 1.0" target="_blank">valid XHTML 1.01</a> #
-->
</div>
</td>
</tr>
</table> </body>
</html>