slt , aidez moi pour comprendre ce code php
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
 <?php
$groupId_planing1 = "-1";
if (isset($_GET['idgroupe'])) {
  $groupId_planing1 = (get_magic_quotes_gpc()) ? $_GET['idgroupe'] : addslashes($_GET['idgroupe']);
}
mysql_select_db($database_vice, $vice);
$query_planing1 = sprintf("SELECT * FROM planing, groupe, `user`, `module` WHERE planing.moduleID = `module`.idmodule  AND planing.groupeID = groupe.idgroupe AND planing.planingEnsUserID = `user`.iduser  AND groupe.idgroupe = %s ORDER BY planing.planingJour ASC", $groupId_planing1);
$planing1 = mysql_query($query_planing1, $vice) or die(mysql_error());
$row_planing1 = mysql_fetch_assoc($planing1);
$totalRows_planing1 = mysql_num_rows($planing1);
 
mysql_select_db($database_vice, $vice);
$query_groupe = "SELECT * FROM groupe, special WHERE groupe.specialID = special.idspecial";
$groupe = mysql_query($query_groupe, $vice) or die(mysql_error());
$row_groupe = mysql_fetch_assoc($groupe);
$totalRows_groupe = mysql_num_rows($groupe);
 
 
?>
  <div id="contenue">
    <form action="" method="get">
	<fieldset><legend>Selectioné le Groupe</legend>
 
 
 
	  <select name="idgroupe"  onChange="javascript:goToPage(options[selectedIndex].value)">
	    <option>Selectioné le groupe</option>
		<?php do { ?>
		<option value="Emploit-du-temps.php?idgroupe=<?php echo $row_groupe['idgroupe']; ?>">Spécialité<?php echo $row_groupe['specialNom']; ?> / Groupe: <?php echo $row_groupe['groupeNum']; ?></option>
			  <?php } while ($row_groupe = mysql_fetch_assoc($groupe)); ?>
	        </select>
 
 
	</form>
	<?php if(isset($_GET['idgroupe'])){?>
    <table width="100%" border="0" style="color:#222;">
 
      <tr bgcolor="#9FDEF7" >
        <td  class="tr-planing">Jour</td>
        <td  class="tr-planing">Module</td>
        <td  class="tr-planing">Lesson</td>
        <td  class="tr-planing">A partir de</td>
        <td  class="tr-planing">Jusque a</td>
        <td  class="tr-planing">L'ensegnent</td>
      </tr>
	  <?php do { ?>
      <tr  
	  <?php 
	  if($row_planing1['planingJour'] == 1){ echo ' bgcolor="#F80"';}
	  if($row_planing1['planingJour'] == 2){ echo ' bgcolor="#F90"';}
	  if($row_planing1['planingJour'] == 3){ echo ' bgcolor="#FA0"';}
	  if($row_planing1['planingJour'] == 4){ echo ' bgcolor="#FB0"';}
	  if($row_planing1['planingJour'] == 5){ echo ' bgcolor="#FC0"';}
 
	  ?>
 
 
	  >
	  <?php 
	  if($row_planing1['planingJour'] == 1){$jour = 'Dimanche';} else{$jour = '';}
	  if($row_planing1['planingJour'] == 2){$jour = 'Landi';}else{$jour = '';}
	  if($row_planing1['planingJour'] == 3){$jour = 'Mardi';}else{$jour = '';}
	  if($row_planing1['planingJour'] == 4){$jour = 'Mercredi';}else{$jour = '';}
	  if($row_planing1['planingJour'] == 5){$jour = 'Jeudi';}else{$jour = '';}
	  ?>
        <td class="tr-planing" ><?php echo $jour; ?></td>
        <td  class="tr-planing"><?php echo $row_planing1['moduleNom']; ?></td>
        <td  class="tr-planing"><?php echo $row_planing1['typeModule']; ?></td>
        <td  class="tr-planing"><?php echo $row_planing1['planingTimeD']; ?></td>
        <td  class="tr-planing"><?php echo $row_planing1['planingTimeF']; ?></td>
        <td  class="tr-planing"><?php echo $row_planing1['nom']; ?> <?php echo $row_planing1['prenom']; ?></td>
      </tr>
	    <?php } while ($row_planing1 = mysql_fetch_assoc($planing1)); ?>
      </table>
 
	  <?php }?>