Lid |
|
Hey , ik ben bezig met zo een game systeem ,
http://tibbeh.habitantsduty.info/Games (bijna klaar)
Maar ik heb nog wat vragen over hij ik bij bv:
http://tibbeh.h...enavontuur
waar de games dus allemaal onder elkaar staan , deze in 2 kolommen vlak naast elkaar kan plaatsen voordat de pagina niet te lang wordt.
Dit is de code
<?
include('config.php');
include('boven.php');
if($categorie == sport) {
$game = mysql_query("SELECT * from spellen WHERE genre='sport' ORDER BY id");
}
else if($categorie == actieenavontuur) {
$game = mysql_query("SELECT * from spellen WHERE genre='actieenavontuur' ORDER BY id");
}
else if($categorie == puzzelendenk) {
$game = mysql_query("SELECT * from spellen WHERE genre='puzzelendenk' ORDER BY id");
}
else if($categorie == behendigheid) {
$game = mysql_query("SELECT * from spellen WHERE genre='behendigheid' ORDER BY id");
}
else if($categorie == fun) {
$game = mysql_query("SELECT * from spellen WHERE genre='fun' ORDER BY id");
}
else if($categorie == sex) {
$game = mysql_query("SELECT * from spellen WHERE genre='sex' ORDER BY id");
}
else if($categorie == multiplayer) {
$game = mysql_query("SELECT * from spellen WHERE genre='multiplayer' ORDER BY id");
}
else if($categorie == overige) {
$game = mysql_query("SELECT * from spellen WHERE genre='overige' ORDER BY id");
}
else {
$game = mysql_query("SELECT * from spellen ORDER BY id DESC LIMIT 0");
?>
<p><b>Categorieën</b> :<br>
<a href="games.php?categorie=actieenavontuur">Actie en Avontuur</a></a><br>
<a href="games.php?categorie=sport">Sport en Race</a><br>
<a href="games.php?categorie=puzzelendenk">Puzzel/Denk</a><br>
<a href="games.php?categorie=behendigheid">Behendigheid</a><br>
<a href="games.php?categorie=fun">Fun</a><br>
<a href="games.php?categorie=sex">18 +</a><br>
<a href="games.php?categorie=multiplayer">Multiplayer</a><br>
<a href="games.php?categorie=overige">Overige</a></p>
<?
}
while($game2 = mysql_fetch_object($game)) {
?>
<table border="0" cellspacing="0" width="100%" id="AutoNumber1">
<tr>
<td width=70 rowspan=2 valign=top><a class="afb" href="game.php?game=<? print"$game2->id";?>"><img src="<? print"$game2->afbeeldingurl";?>" width="70" height="54" border=0></a></td>
<td width=400 rowspan=2 valign=top><p class=info><a href="game.php?game=<? print"$game2->id";?>"><? print"$game2->naam";?><br>
</a><? print"$game2->info";?><br>
</p></td>
<td width=130 valign=top><p class=klein>Hits :<? print"$game2->gespeeld";?></p></td><tr>
<td width=130 valign=top><p class=klein>Rating : <?php
$totaal = round(($game2->punten / $game2->stemmen),"2");
print "<b>$totaal</b>/ 5"; ?></p></td>
</tr>
</table>
<?
}
include("onder.php");
?>
<? include('config.php'); include('boven.php'); if($categorie == sport) { $game = mysql_query("SELECT * from spellen WHERE genre='sport' ORDER BY id"); } else if($categorie == actieenavontuur) { $game = mysql_query("SELECT * from spellen WHERE genre='actieenavontuur' ORDER BY id"); } else if($categorie == puzzelendenk) { $game = mysql_query("SELECT * from spellen WHERE genre='puzzelendenk' ORDER BY id"); } else if($categorie == behendigheid) { $game = mysql_query("SELECT * from spellen WHERE genre='behendigheid' ORDER BY id"); } else if($categorie == fun) { $game = mysql_query("SELECT * from spellen WHERE genre='fun' ORDER BY id"); } else if($categorie == sex) { $game = mysql_query("SELECT * from spellen WHERE genre='sex' ORDER BY id"); } else if($categorie == multiplayer) { $game = mysql_query("SELECT * from spellen WHERE genre='multiplayer' ORDER BY id"); } else if($categorie == overige) { $game = mysql_query("SELECT * from spellen WHERE genre='overige' ORDER BY id"); } else { $game = mysql_query("SELECT * from spellen ORDER BY id DESC LIMIT 0"); ?> <p><b>Categorieën</b> :<br> <a href="games.php?categorie=actieenavontuur">Actie en Avontuur</a></a><br> <a href="games.php?categorie=sport">Sport en Race</a><br> <a href="games.php?categorie=puzzelendenk">Puzzel/Denk</a><br> <a href="games.php?categorie=behendigheid">Behendigheid</a><br> <a href="games.php?categorie=fun">Fun</a><br> <a href="games.php?categorie=sex">18 +</a><br> <a href="games.php?categorie=multiplayer">Multiplayer</a><br> <a href="games.php?categorie=overige">Overige</a></p> <? } ?> <table border="0" cellspacing="0" width="100%" id="AutoNumber1"> <tr> <td width=70 rowspan=2 valign=top><a class="afb" href="game.php?game= <? print"$game2->id";? >"><img src=" <? print"$game2->afbeeldingurl";? >" width="70" height="54" border=0></a></td> <td width=400 rowspan=2 valign=top><p class=info><a href="game.php?game= <? print"$game2->id";? >"> <? print"$game2->naam";? ><br> </a> <? print"$game2->info";? ><br> </p></td> <td width=130 valign=top><p class=klein>Hits : <? print"$game2->gespeeld";? ></p></td><tr> <td width=130 valign=top><p class=klein>Rating : <?php $totaal = round(($game2->punten / $game2->stemmen),"2"); print "<b>$totaal</b>/ 5"; ?></p></td> </tr> </table> <? } include("onder.php"); ?>
(Alles zelf gemaakt , niets geript ....)
Greetz Tibbe
|