<?php
// this defines some of your basic setup
include_once 'config.php';
// the facebook client library
include_once $BIB.'facebook.php';
include_once $BIB.'bib_generic.php3';
include_once $BIB.'bib_quiz_facebook.php3';
include_once $BIB.'bib_facebook_user.php3';


include 'header.php';


?>

	
	<div id="quiz">
		<h2>LISTE DES QUIZFOOT :</h2>
		<div id="questions">
			<ul>
			<?php
			//on va lister les themes
			$query = "SELECT * FROM Qcm_Themes";
			$rows = main_db_query($query);
			while($row = db_fetch_assoc($rows))
			{
				echo "\t<li class='question'>\n";
					
					echo "\t\t<h3>".$row["Nom"]."</h3>\n";
					echo "\t\t<table><tr><td><a href='".$QUIZ_PAGE."?Id=".$row["Id"]."'><img src='".$IMAGES_DIR."Themes/".$row["Image"]."' border=0></a></td>\n";
					echo "\t\t<td  valign=top>".$row["Description"]."</td></tr></table><br />\n";				
					echo "\t\t>> <a href='".$QUIZ_PAGE."?Id=".$row["Id"]."'>Jouer ce quiz</a><br />\n";
					echo "\t\t<br /><div class='resultats'>Joué ".getNbTimesTheme($row["Id"])." fois | ";
					echo "Score moyen ".getMoyenneTheme($row["Id"])." %</div>\n";					
				echo "\t</li>\n";
			}
			?>
			</ul>
		</div>
	</div>
	

	<div id="promo_right">
		<a href="http://www.kestufoot.com/trck_bannieres.php3?code=FACEBOOK_243" target="_blank"><img src="<?php echo $IMAGES_DIR?>sky_promo.gif" border=0></a>
	</div>
	

<?php
include 'footer.php';
?>