Location: PHPKode > projects > EmploiNet : a timetable web manager > EmploiNet/v0.8.0/edt/ModifRapide/modifie_suppression_matiere.php3
<?
	    // ***************************************************************************************************
	    // ************************************ Suppression d'une matiere ************************************
	    // ***************************************************************************************************
	        $n = count($id_promotion);
			print("<table align=center border=0 cellspacing=0 cellpading=0 width=700 bgcolor=\"#ffcc33\">\n");
		    print("<tr>\n");

// Liste des promotions	
	print("          <td valign=top width=100 nowrap ><font size=3><i>Promotion :</i></font></td>\n");
	print("          <td width=250 valign=top>\n");
    include("../../Liste/liste_promotion.php");
	print("          </td>\n");

// Liste des groupes associes a la promotion selectionnee
	print("          <td valign=top width=100 nowrap><font size=3><i>Groupe :</i></font></td>\n");
	print("          <td valign=top width=250>\n");
    include("../../Liste/liste_groupe.php");
	print("          </td>\n");
	print("  </tr>\n");

			if(isset($id_promotion[0]))
			{
				print("<td colspan=\"2\" align=center><a href=\"choix_modif.php3?id_session=$id_session&user_type=$user_type&user_id=$user_id\">Autres&nbsp;modifications</a></td>\n");
				print("<td colspan=\"2\" align=center><a href=\"javascript:document.form1.choice.value=1;document.form1.submit();\">Supprimer</a></td>\n");
			}				
			else
			{
				print("<td colspan=\"4\" align=center><a href=\"choix_modif.php3?id_session=$id_session&user_type=$user_type&user_id=$user_id\">Autres&nbsp;modifications</a></td>\n");
			}
			print("	</tr>");
			print("</table><br>\n");
			if(isset($id_promotion[0]))
			{
				$request = "SELECT m.id_matiere, m.nom
		                      FROM matiere m, suiviparpromotion spp, suivipargroupe spg, groupe g, promotion pr, associer a
	             	         WHERE ";
				$where_suite="";
				if (isset($id_groupe) && $id_groupe!=-1)
					$where_suite=" g.id_groupe=$id_groupe 
					           AND spg.id_groupe=g.id_groupe 
							   AND spg.id_matiere=m.id_matiere
							   AND a.id_groupe=g.id_groupe
							   AND a.id_promotion=pr.id_promotion
							   AND pr.id_promotion=$id_promotion[0]";
				else
					$where_suite=" pr.id_promotion=$id_promotion[0] 
					           AND pr.id_promotion=spp.id_promotion
							   AND m.id_matiere=spp.id_matiere";
				$groupby=" GROUP BY m.nom";
				$request=$request.$where_suite.$groupby;
		        $result = mysql_query($request);
				$nb_mat=mysql_num_rows($result);
				print("<p align=center><b><i>Choisissez la (ou les) matière(s) à supprimer ...</i></b><p><p>\n");
				print("<table border=1 CELLSPACING=0 align=center bordercolor=black>\n");
				print("<tr align=center><td bgcolor=#C0C0C0 width=30><b>-</b></td><td bgcolor=#C0C0C0><b>Matiere</b></td><td bgcolor=#C0C0C0 width=30><b>-</b></td><td bgcolor=#C0C0C0><b>Matiere</b></td></tr>\n");
				print("<tr>\n");
				$NombreDeNiveau=0;
				while($une_matiere=mysql_fetch_row($result))
				{
					print("<script language=\"JavaScript\">\n");
					print(" document.form1.tableau1.value='0'+document.form1.tableau1.value\n;");
					print("</script>\n\n");       
					$NombreDeNiveau++;
					print("<td align=center><a href=\"javascript:changerImage('ImageSelection$NombreDeNiveau');modifierChaineMult($NombreDeNiveau-1,$nb_mat);\" ><IMG SRC=\"img/ellipse.gif\"  NAME=\"ImageSelection$NombreDeNiveau\" border=0 border=no></a></td>");
			    	print("<input type=\"hidden\" name=\"ValId[$NombreDeNiveau]\" value=\"$une_matiere[0]\">\n");
					print("<td>\n");
					print($une_matiere[1]."\n");
					print("</td>\n");
					if($NombreDeNiveau%2==0)
					{
						print("</tr>\n");
						print("<tr>\n");
					}
				}
				if($NombreDeNiveau%2!=0)
				{
					print("<td>&nbsp");
					print("</td>\n");
					print("<td>&nbsp");
					print("</td>\n");
				}
				print("</tr>\n");
				print("</table>\n");
			}
			print("</form>\n");
?>
Return current item: EmploiNet : a timetable web manager