Guest User

Untitled

a guest
Oct 23rd, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.34 KB | None | 0 0
  1. <h1>Gestion des notes : /* Professeur */</h1>
  2. <?php
  3. include "connexion_data.php";
  4. /*mysql_connect($host,$login,"");
  5. mysql_select_db($database) or die( "Unable to select database");*/
  6. $sql = "select nom from note where id = 1;";
  7. mysql_connect($host,$login,"");
  8. mysql_select_db($database) or die( "Unable to select database");
  9. $sql = "select NOTE_NOTE from note where NUM_NOTE = 1;";
  10. $resultat = mysql_query($sql);
  11. //echo mysql_result($resultat,0);
  12. echo mysql_fetch_array($resultat);
  13. ?>
  14. <table id="one-column-emphasis" summary="Notes élèves, LaMache">
  15. <colgroup>
  16. <col class="oce-first" />
  17. <col/>
  18. <col/>
  19. <col/>
  20. <col/>
  21. <col/>
  22. <col class="oce-last" />
  23. </colgroup>
  24. <thead>
  25. <tr>
  26. <th scope="col">Eleves</th>
  27. <?php
  28. $matiere = "select INTITULE_MATIERE from matiere;";
  29. $result = mysql_query($matiere);
  30. while($row = mysql_fetch_array($result))
  31. {
  32. $matiere = $row[0];
  33. echo "<th scope='col'>".$matiere."</th>";
  34. }
  35. ?>
  36. </tr>
  37. </thead>
  38. <tbody>
  39. <?php
  40.  
  41. $reqnb = "select count(*) from note";
  42.  
  43. $nb_col = mysql_query($reqnb);
  44. echo mysql_result($nb_col,0);
  45. //select count(*) from note
  46.  
  47. $name = "select NOM_ETUDIANT, PRENOM_ETUDIANT from etudiant";
  48. $matiere = "select NUM_MATIERE from matiere;";
  49. $result = mysql_query($name);
  50. while($row = mysql_fetch_array($result))
  51. {
  52. $nom = $row[0];
  53. $prenom = $row[1];
  54. echo "<tr><td>".$nom." ".$prenom."</td></td>";
  55. $result = mysql_query($matiere);
  56. while($rox = mysql_fetch_array($result))
  57. {
  58. $matiere = $rox[0];
  59.  
  60. //$id_etu = "Select NUM_ETUDIANT, NUM_FORMATION from etudiant";
  61. //$id_note = "Select NUM_NOTE from posseder where NUM_ETUDIANT =".id_etudiant."AND NUM_FORMATION=".id_formation.";";
  62.  
  63. //$note = "Select NOTE_NOTE from note where
  64. echo "<td>
  65.  
  66. <input type='text' name=".$matiere."_".$nom."/></td>";
  67. }
  68. }
  69. //$reqmat = "select note from note where nom = ".mysql_result($valuename,0).";";
  70. echo "</tr>";
  71. //$reqmat = "select note from note where nom = ".mysql_result($valuename,0).";";
  72. //var_dump($nom);
  73. //$querymat = mysql_query($reqmat);
  74.  
  75.  
  76. ?>
  77. </tbody>
  78. <tfoot>
  79. <tr>
  80. <td>Moyenne classe</td>
  81. <?php
  82. $matiere = "select INTITULE_MATIERE from matiere;";
  83. $result = mysql_query($matiere);
  84. while($row = mysql_fetch_array($result))
  85. {
  86.  
  87. $var_test = 4;
  88. $matiere = $row[0];
  89. echo "<td>".$var_test."</td>";
  90. }
  91. ?>
  92. </tr>
  93. </tfoot>
  94. </table>
  95. <?php
  96. //Database Logins
  97. $user="root";
  98. $password="";
  99. $serv="localhost";
  100. $database="iri";
  101. //Connection Db
  102. mysql_connect($serv,$user,$password);
  103. @mysql_select_db($database) or die( "Unable to select database");
  104. ?>
  105. <form name="formulaire" method="post" action="notes_script.php">
  106. <select name="id_etudiant" size="1" >";
  107. <?php
  108. $dip = "select num_etudiant,nom_etudiant from etudiant";
  109. $dip2=mysql_query($dip);
  110. while ($donnees = mysql_fetch_array($dip2) )
  111. {
  112. echo"<option value='".$donnees['num_etudiant']."'>".$donnees['nom_etudiant']."</option>";
  113. }
  114. ?>
  115. </select>
  116.  
  117. <select name="id_matiere" size="1" >";
  118. <?php
  119. $dip = "select NUM_MATIERE,INTITULE_MATIERE from MATIERE";
  120. $dip2=mysql_query($dip);
  121. while ($donnees = mysql_fetch_array($dip2) )
  122. {
  123. echo"<option value='".$donnees['NUM_MATIERE']."'>".$donnees['INTITULE_MATIERE']."</option>";
  124. }
  125. ?>
  126. </select>
  127.  
  128. <table width="313" height="86" border="1">
  129. <td width="161">note<input name="note" type="text" id="note" value=""></td>
  130. <td width="161">type<input name="type" type="text" id="type" value=""></td>
  131. <td width="161">coef<input name="coef" type="text" id="coef" value=""></td>
  132. <tr>
  133. <td height="44" colspan="2"><div align="center"> <input type="submit" name="Submit" value="Envoyer"> </div> </td>
  134. </tr>
  135. </table>
  136.  
  137.  
  138. </tbody>
  139. <tfoot>
  140. <tr>
  141. <td>Moyenne classe</td>
  142. <?php
  143. $matiere = "select INTITULE_MATIERE from matiere;";
  144. $result = mysql_query($matiere);
  145. while($row = mysql_fetch_array($result))
  146. {
  147.  
  148. $var_test = 4;
  149. $matiere = $row[0];
  150. echo "<td>".$var_test."</td>";
  151. }
  152. ?>
  153. </tr>
  154. </tfoot>
  155.  
  156. </table>
  157.  
  158. <input type="submit" name="submit" value="SUBMIT"/>
  159. <input type="reset" name="reset" value="RESET"/>
  160. <span id="useradd">Ajouter un élève : <input type="text" id="neweleve" value="Nom élève ?"/>
  161. <a href="javascript:ajout_eleve()"><img src="images/add.png"/></a>
  162. </span>
  163.  
  164. <span class="parents"><h1>Gestion des notes : /* Parents/élèves */</h1>
  165. Bonjour Jean-Broche Poulet,<br/>
  166. Vous êtes sur la page d'acces au notes de vôtre enfant : &nbsp;
  167. <SELECT name="fonction">
  168. <OPTION VALUE="Martin.Poulet">Martin Poulet</OPTION>
  169. <OPTION VALUE="Cuisse.Poulet">Cuisse Poulet</OPTION>
  170. </SELECT><br /></span>
  171. <a href="#"><img src="images/downloadbt.png"/><a>
Add Comment
Please, Sign In to add comment