Ser ikke godt ud i mozilla
HejJeg har understående cms system som ser fint ud i explorer, men ser ikke særlig godt ud i firefox og netscape.
Hvad skal ændres før det ser bedre ud?
Scripts ser sådan ud:
index.php:
<?php
session_start();
include("config.php");
$id = $_REQUEST["id"];
$indexs = mysql_query("SELECT * FROM ".$prefix."main WHERE `id` = '$id'") or die(mysql_error());
$index = mysql_fetch_array($indexs);
$sub = $index["name"];
?>
<html>
<style type="text/css">
<!--
body {
background-image: url();
margin-top: 0px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
}
-->
</style></head>
<body>
<table width="100%" height="100%" border="0">
<tr valign="top">
<td height="182" colspan="4"><img src="images/bar.gif" width="1280" height="149"></td>
</tr>
<tr>
<td width="1%" valign="top"> </td>
<td width="17%" valign="top"><?php include("menu.php"); ?> </td>
<td width="60%" valign="top" class="content"><?php include("main.php"); ?></td>
<td width="22%" valign="top" class="content"> <br>
</td>
</tr>
<tr valign="bottom">
<td height="50" colspan="4"><img src="images/underbar.gif" width="1280" height="52"></td>
</tr>
</table>
</body>
</html>
main.php:
<table width="600" border="0" class="content">
<tr>
<td>
<span class="content">
<?php
// $id from index.php
$main_query = mysql_query("SELECT * FROM ".$prefix."main WHERE `id`='$id'") or die(mysql_error());
$main = mysql_fetch_array($main_query);
if ($main["id"]) {
if ($main["doctype"] == 1) {
eval(" ?" . ">" . $main["content"] . "<" . "?php ");
} else {
echo nl2br($main["content"]);
}
} else {
$close_query = mysql_query("SELECT * FROM ".$prefix."menu WHERE `category`='0' ORDER BY `orderby`") or die(mysql_error());
$close = mysql_fetch_array($close_query);
$main_query = mysql_query("SELECT * FROM ".$prefix."main WHERE `id`='".$close["link"]."'") or die(mysql_error());
$main = mysql_fetch_array($main_query);
if ($main["doctype"] == 1) {
eval(" ?" . ">" . $main["content"] . "<" . "?php ");
} else {
echo nl2br ($main["content"]);
}
}
?>
</span>
</td>
</tr>
</table>
menu.php:
<?php
$categories = mysql_query("SELECT * FROM ".$prefix."categories ORDER BY `id`") or die(mysql_error());
while ($cate = mysql_fetch_array($categories)) {
echo "
<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">
<tr>
<td class=\"category\">".$cate["name"]."</td>
</tr>
</table>
";
$menu_query = mysql_query("SELECT * FROM ".$prefix."menu WHERE `category`='".$cate["id"]."' ORDER BY `id`") or die(mysql_error());
while ($menu = mysql_fetch_array($menu_query)) {
if (ereg("^[0-9]+$",$menu["link"])) {
echo "<img src=\"images/arrow.gif\" alt=\"\"> <a href=\"index.php?id=".$menu["link"]."\" title=\"".$menu["description"]."\" target=\"".$menu["target"]."\">".$menu["name"]."</a><br>";
} else {
echo "<img src=\"images/arrow.gif\" alt=\"\"> <a href=\"".$menu["link"]."\" title=\"".$menu["description"]."\" target=\"".$menu["target"]."\">".$menu["name"]."</a><br>";
}
}
echo "<br>";
}
?>
