1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
|
<?php
session_start();
if(!isset($_SESSION['session_login']) || $_SESSION['session_login'] == "")
header("Location:loginform.php?errFlag=1");
/** SETTING TOTAL MARKS VALUE ***********************/
$_SESSION['tot_marks']=0;
?>
<html><head>
<title>:: QCM en Ligne :: </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="admin/include/style.css" rel="stylesheet" type="text/css">
<? require("admin/include/conn.php");?>
<? require("admin/include/functions.php");?>
<? require("admin/include/logcheck.php");?>
<script language="JavaScript" type="text/javascript" src="include/javasc.js"></script>
</head>
<body bgcolor="#EAE3EB">
<div align="center">
<table width="778" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr align="center" valign="middle" bgcolor="#B6A5B5">
<td height="100" colspan="2">
<? require("admin/include/header.php");?></td>
</tr>
<tr>
<td height="417" valign="top" width="170"><? require("include/left.php");?></td>
<td align="center" valign="top" class="leftlinks" width="608">
<br>
<br>
<div align="center">
<table width="98%" border="0" cellpadding="2" cellspacing="0" class="brd">
<tr bgcolor="#B6A5B5">
<td width="50%" align="left" class="blacktxt"><font color="#FFFFFF">Modules Présents
</font> </td>
<td width="24%" align="left" class="blacktxt"><font color="#FFFFFF">Démarrer Module
</font> </td>
<td width="14%" align="left" class="blacktxt"><font color="#FFFFFF">Nb Quest.
</font> </td>
<td width="10%" align="left" class="blacktxt"><font color="#FFFFFF">Durée
</font> </td>
</tr>
<tr align="left" class="leftlinks">
<td height="5" colspan="2"></td>
</tr>
<?
//Recherche par Module Actif
$tests = "SELECT * FROM test WHERE test_status= 1 ORDER BY test_id DESC";
$res_test = mysql_query($tests) or die(mysql_error());
if(mysql_num_rows($res_test) > 0) { /// correction
while( $r1 = mysql_fetch_assoc($res_test) ) { /// correction
//Recherche du Nombre de Questions par Module
$questions = "SELECT COUNT(question) AS nbrQ FROM questions WHERE q_id = '".$r1["test_id"]."'"; /// correction
$res_quest = mysql_query($questions) or die(mysql_error());
if(mysql_num_rows($res_quest) > 0) { /// correction
$r2 = mysql_fetch_assoc($res_quest); /// correction
?>
<tr align="center" class="leftlinks">
<td colspan="2">Pas d'enregistrement trouvé.... </td>
</tr>
<?
}else{
// Tableau qui doit s'afficher
while($test= mysql_fetch_array($res_test)){
$test_id = $test['test_id'];
$test_name = $test['test_name'];
$nb_quest = $r2["nbrQ"]; /// correction
$duree = $test['question_time'];
?>
<tr align="left" class="leftlinks2">
<td><?=$test_name?></td>
<td><a href="start_test.php?tid=<?=$test_id?>" class="text">
<span style="font-weight: 400">Demarrer le Module</span></a></td>
<td><?=$nb_quest?></td>
<td><?=$duree?></td>
</tr>
<?
}
}
?>
</table>
</div>
<br>
<br>
<br>
<br></td>
</tr>
<tr bgcolor="#B6A5B5">
<td colspan="2">
<? require("admin/include/footer.php");?>
</td>
</tr>
</table>
</div>
</body>
</html> |
Partager