HTML interesse |
|
Ik heb net een download systeem aangepast tot verslagen systeem, alleen nu komen de verslagen niet meer onder elkaar maar naast elkaar te staan. En ik kom er niet uit. Wie ziet er toevallig wat ik fout heb gedaan. Sorry voor de grote lap tekst maar het kon niet anders.
<?
if(isset($_GET["actie"]) and $_GET["actie"] == "bekijk") {
if(!isset($_GET["id"]) or empty($_GET["id"]) or !is_numeric($_GET["id"])) {
echo "<meta http-equiv=\"refresh\" content=\"0; url=".$_SERVER["PHP_SELF"].";\">";
exit;
}
$s_download = mysql_query("SELECT * FROM dc_downloads WHERE id = '".$_GET["id"]."' LIMIT 0,1") or die(mysql_error());
$f_download = mysql_fetch_assoc($s_download);
echo "<table class=\"listtable\" cellspacing=\"1\" width=\"400\">\n".
"<tr><td class=\"listtop\" colspan=\"2\" width=\"100%\"><b>Verslagen › ".$f_download["titel"]."</b></td></tr>".
"<tr class=\"list0\"><td class=\"list0\">Datum:</td><td class=\"list0\">".$f_download["omschrijving"]."</td></tr>\n".
"<tr class=\"list0\"><td class=\"list0\">Auteur:</td><td class=\"list0\">".$f_download["auteur"]."</td></tr>\n".
"<tr class=\"list0\"><td class=\"list0\">Verslag:</td><td class=\"list0\">".$f_download["versie"]."</td></tr>\n".
"<tr class=\"list0\"><td class=\"list0\">Uitslag:</td><td class=\"list0\">".$f_download["grootte"]."</td></tr>\n";
$s_screenshots = explode(",", $f_download["screenshots"]);
$a_screenshots = count($s_screenshots);
$i = "0";
foreach($s_screenshots as $screenshot) {
$screenshots .= "<a href=\"".$screenshot."\" target=\"_blank\">".$i."</b></a>";
if($i < $a_screenshots - "1") {
$screenshots .= " | ";
}
$i++;
}
echo "<tr class=\"list0\"><td class=\"list0\">Foto's:</td><td class=\"list0\">".$screenshots."</td></tr>\n".
"</table>";
} elseif(isset($_GET["actie"]) and $_GET["actie"] == "download") {
if(!isset($_GET["id"]) or empty($_GET["id"]) or !is_numeric($_GET["id"])) {
echo "<meta http-equiv=\"refresh\" content=\"0; url=".$_SERVER["PHP_SELF"].";\">";
exit;
}
$s_download = mysql_query("SELECT * FROM dc_downloads WHERE id = '".$_GET["id"]."' LIMIT 0,1") or die(mysql_error());
$f_download = mysql_fetch_assoc($s_download);
$u_download = mysql_query("UPDATE dc_downloads SET downloads = downloads + 1 WHERE id = '".$_GET["id"]."'") or die(mysql_error());
echo "<meta http-equiv=\"refresh\" content=\"0; url=".$f_download["url"].";\">";
exit;
} elseif(isset($_GET["actie"]) and $_GET["actie"] == "cat") {
$s_cat = mysql_query("SELECT * FROM dc_categorie WHERE id = '".$_GET["id"]."'") or die(mysql_error());
$f_cat = mysql_fetch_assoc($s_cat);
$s_cats = mysql_query("SELECT * FROM dc_categorie ORDER BY naam DESC, id ASC") or die(mysql_error());
$s_download = mysql_query("SELECT * FROM dc_downloads WHERE categorie = '".$f_cat["id"]."'") or die(mysql_error());
$a_download = mysql_num_rows($s_download);
if($a_download < "1") {
echo "<tr class=\"list0\"><td class=\"list0\">Er zijn mommenteel nog geen verslagen.</tr>\n";
} else {
while($f_download = mysql_fetch_assoc($s_download)) {
echo "<tr class=\"list0\"><td class=\"list0\">".$f_download["omschrijving"]."</td> | <td><a href=\"?actie=bekijk&id=".$f_download["id"]."\" target=\"_blank\">".$f_download["titel"]."</td></a> | <td><a href=\"?actie=bekijk&id=".$f_download["id"]."\" target=\"_blank\">".$f_download["grootte"]."</a></td></tr>\n";
}
}
echo "</table>";
} else {
$s_cat = mysql_query("SELECT * FROM dc_categorie ORDER BY naam DESC, id ASC") or die(mysql_error());
$a_cat = mysql_num_rows($s_cat);
echo "<table class=\"listtable\" cellspacing=\"1\" width=\"400\">\n";
echo "<tr><td class=\"listtop\" width=\"100%\"><b>Selecteer een categorie</b></td></tr>";
if($a_cat < "1") {
echo "<tr class=\"list0\"><td class=\"list0\">Er zijn momenteel nog geen verslag categorieën.</td>";
} else {
while($f_cat = mysql_fetch_assoc($s_cat)) {
echo "<tr class=\"list0\"><td class=\"list0\"><a href=\"?actie=cat&id=".$f_cat["id"]."\">".$f_cat["naam"]."</a></td></tr>";
}
}
echo "</table><br>";
}
?>
<? if(isset($_GET["actie"]) and $_GET["actie"] == "bekijk") { echo "<meta http-equiv=\"refresh\" content=\"0; url=".$_SERVER["PHP_SELF"].";\">"; } echo "<table class=\"listtable\" cellspacing=\"1\" width=\"400\">\n". "<tr><td class=\"listtop\" colspan=\"2\" width=\"100%\"><b>Verslagen › ".$f_download["titel"]."</b></td></tr>". "<tr class=\"list0\"><td class=\"list0\">Datum:</td><td class=\"list0\">".$f_download["omschrijving"]."</td></tr>\n". "<tr class=\"list0\"><td class=\"list0\">Auteur:</td><td class=\"list0\">".$f_download["auteur"]."</td></tr>\n". "<tr class=\"list0\"><td class=\"list0\">Verslag:</td><td class=\"list0\">".$f_download["versie"]."</td></tr>\n". "<tr class=\"list0\"><td class=\"list0\">Uitslag:</td><td class=\"list0\">".$f_download["grootte"]."</td></tr>\n"; $s_screenshots = explode(",", $f_download["screenshots"]); $a_screenshots = count($s_screenshots); $i = "0"; foreach($s_screenshots as $screenshot) { $screenshots .= "<a href=\"".$screenshot."\" target=\"_blank\">".$i."</b></a>"; if($i < $a_screenshots - "1") { $screenshots .= " | "; } $i++; } echo "<tr class=\"list0\"><td class=\"list0\">Foto's:</td><td class=\"list0\">".$screenshots."</td></tr>\n". "</table>"; } elseif(isset($_GET["actie"]) and $_GET["actie"] == "download") { echo "<meta http-equiv=\"refresh\" content=\"0; url=".$_SERVER["PHP_SELF"].";\">"; } $u_download = mysql_query("UPDATE dc_downloads SET downloads = downloads + 1 WHERE id = '".$_GET["id"]."'") or die(mysql_error()); echo "<meta http-equiv=\"refresh\" content=\"0; url=".$f_download["url"].";\">"; } elseif(isset($_GET["actie"]) and $_GET["actie"] == "cat") { if($a_download < "1") { echo "<tr class=\"list0\"><td class=\"list0\">Er zijn mommenteel nog geen verslagen.</tr>\n"; } else { echo "<tr class=\"list0\"><td class=\"list0\">".$f_download["omschrijving"]."</td> | <td><a href=\"?actie=bekijk&id=".$f_download["id"]."\" target=\"_blank\">".$f_download["titel"]."</td></a> | <td><a href=\"?actie=bekijk&id=".$f_download["id"]."\" target=\"_blank\">".$f_download["grootte"]."</a></td></tr>\n"; } } } else { echo "<table class=\"listtable\" cellspacing=\"1\" width=\"400\">\n"; echo "<tr><td class=\"listtop\" width=\"100%\"><b>Selecteer een categorie</b></td></tr>"; if($a_cat < "1") { echo "<tr class=\"list0\"><td class=\"list0\">Er zijn momenteel nog geen verslag categorieën.</td>"; } else { echo "<tr class=\"list0\"><td class=\"list0\"><a href=\"?actie=cat&id=".$f_cat["id"]."\">".$f_cat["naam"]."</a></td></tr>"; } } } ?>
|