This is just something that I'm working on for my own website. Could someone please check this over real quick to see if I have any major errors in it?
<?php
/*
index.php
created by Suetan
Start Date: Wednesday January 9, 2008
Project: RPGCMS
Version: 0.0.1a
*/
define('IN_RPGCMS', true);
$root = './../';
include($root . 'functions.' .$phpEx);
include($root . '/includes/common.' .$phpEx);
echo('<html>
<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<title>Final Fantasy Heaven</title>
<meta name="title" content="Final Fantasy Heaven" />
<meta name="description" content="Only the best game information on the web" />
<meta name="keywords" content="Final Fantasy, FF, Final Fantasy II, Final Fantasy 2, FF2, Final Fantasy III, Final Fantasy 3, FF3, Final Fantasy IV, Final Fantasy V, Final Fantasy 5, FF5, Final Fantasy VI, Final Fantasy 6, FF6, Final Fantasy VII, Final Fantasy 7, FF7, Final Fantasy VIII, Final Fantasy 8, FF8, Final Fantasy IX, Final Fantasy 9, FF9, Final Fantasy X, Final Fantasy 10, FF10, Final Fantasy XI, Final Fantasy 11, FF11, Final Fantasy XII, Final Fantasy 12, FF12, Final Fantasy Crystal Chronicles, FFCC, Final Fantasy Tactics, FFT, Final Fantasy Movies, FF Movies" />
<meta name="author" content="Suetan" />
<link rel="icon" href="images/favicon.ico" />
<link rel="stylesheet" type="text/css" href="style.css" />
<bgsound src="#" id="soundeffect" autostart="false" />
<script type="text/javascript">
var soundfile="sounds/menu.wav"
function playsound(soundfile){
if (document.all && document.getElementById){
document.getElementById("soundeffect").src=""
document.getElementById("soundeffect").src=soundfile
}
}
function bindsound(tag, soundfile, masterElement){
if (!window.event) return
var source=event.srcElement
while (source!=masterElement && source.tagName!="HTML"){
if (source.tagName==tag.toUpperCase()){
playsound(soundfile)
break
}
source=source.parentElement
}
}
</script>
</head>
</head>
<body>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td><img src="images/nav_top_left_elbow.gif" alt=""></td>
<td class="topborder" width="100%"></td>
<td><img src="images/nav_top_right_elbow.gif" alt=""></td>
</tr>
<tr>
<td class="leftborder" width="1%"></td>
<td width="90%" align="center" class="logo"><img src="images/logo.gif" alt="" border="0"></td>
<td class="rightborder" width="1%"></td>
</tr>
<tr>
<td><img src="images/nav_bottom_left_elbow.gif" alt=""></td>
<td class="bottomborder" width="100%"></td>
<td><img src="images/nav_bottom_right_elbow.gif" alt=""></td>
</tr>
</table>'
);
$sql = "SELECT 'w.welcome_title'
FROM ' . WELCOME_TABLE . ' w";
$result = mysql_query($sql);
$message_title = $result;
$sql2 = "SELECT 'w.welcome_text'
FROM ' . WELCOME_TABLE . ' w";
$result_text = mysql_query($sql2);
$message_text = $result_text;
echo('<table width="90%" cellspacing="0" cellpadding="0" border="0" align="left">
<tr>
<td><img src="images/nav_top_left_elbow.gif" alt=""></td>
<td class="topborder" width="100%"></td>
<td><img src="images/nav_top_right_elbow.gif" alt=""></td>
</tr>
<tr>
<td class="leftborder" width="1%"></td>
<td width="100%" align="center">');
echo($message_title);
echo('</td>
<td class="rightborder" width="1%"></td>
</tr>
<tr>
<td><img src="images/nav_bottom_left_elbow.gif" alt=""></td>
<td class="bottomborder" width="100%"></td>
<td><img src="images/nav_bottom_right_elbow.gif" alt=""></td>
</tr>
</table>');
echo('<table width="90%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td><img src="images/nav_top_left_elbow.gif" alt=""></td>
<td class="topborder" width="100%"></td>
<td><img src="images/nav_top_right_elbow.gif" alt=""></td>
</tr>
<tr>
<td class="leftborder" width="1%"></td>
<td width="100%" align="center">');
echo($message_text);
echo('</td>
<td class="rightborder" width="1%"></td>
</tr>
<tr>
<td><img src="images/nav_bottom_left_elbow.gif" alt=""></td>
<td class="bottomborder" width="100%"></td>
<td><img src="images/nav_bottom_right_elbow.gif" alt=""></td>
</tr>
</table>');
// get the latest site news
$i = "0";
while ($i <= 5)
{
$sql = "SELECT * FROM ' . NEWS_TABLE . ' n
WHERE n.news_title = $news_title
AND n.news_id = $news_id
AND n.news_date = $news_date
ORDER BY $news_date desc'";
$result = mysql_query($sql);
$title = $result->n.news_title;
$text = $result->n.news_text;
echo('<table width="90%" cellspacing="0" cellpadding="0" border="0" align="left">
<tr>
<td><img src="images/nav_top_left_elbow.gif" alt=""></td>
<td class="topborder" width="100%"></td>
<td><img src="images/nav_top_right_elbow.gif" alt=""></td>
</tr>
<tr>
<td class="leftborder" width="1%"></td>
<td width="100%" align="center">');
echo($title);
echo('</td>
<td class="rightborder" width="1%"></td>
</tr>
<tr>
<td><img src="images/nav_bottom_left_elbow.gif" alt=""></td>
<td class="bottomborder" width="100%"></td>
<td><img src="images/nav_bottom_right_elbow.gif" alt=""></td>
</tr>
</table>
<br />
<table width="90%" cellspacing="0" cellpadding="0" border="0" align="left">
<tr>
<td><img src="images/nav_top_left_elbow.gif" alt=""></td>
<td class="topborder" width="100%"></td>
<td><img src="images/nav_top_right_elbow.gif" alt=""></td>
</tr>
<tr>
<td class="leftborder" width="1%"></td>
<td width="100%" align="center">');
echo($text);
echo('</td>
<td class="rightborder" width="1%"></td>
</tr>
<tr>
<td><img src="images/nav_bottom_left_elbow.gif" alt=""></td>
<td class="bottomborder" width="100%"></td>
<td><img src="images/nav_bottom_right_elbow.gif" alt=""></td>
</tr>
</table>
<br />');
$i++;
}
// main menu and site stats
mainmenu();
$sql = 'SELECT COUNT(game_id) FROM ' . GAMES_TABLE . '';
$result = mysql_query->($sql);
echo('<table width="10%" align="right" valign="top" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><img src="images/nav_top_left_elbow.gif" alt=""></td>
<td class="topborder" width="100%"></td>
<td><img src="images/nav_top_right_elbow.gif" alt=""></td>
</tr>
<tr>
<td class="leftborder" width="1%"></td>
<td>We have detailed information on');
echo($result);
echo('games.</td>
<td class="rightborder" width="1%"></td>
</tr>
<tr>
<td><img src="images/nav_bottom_left_elbow.gif" alt=""></td>
<td class="bottomborder" width="100%"></td>
<td><img src="images/nav_bottom_right_elbow.gif" alt=""></td>
</tr>
</table>
</body>
</html>');
?>