Location: PHPKode > projects > EmploiNet : a timetable web manager > EmploiNet/v0.8.0/Salle/FormulaireSalle.php3
<?
	include("../edt/fonctions_edt.php3");
	
	include("../BarreDeMenu.php3");
	
    include("../Session/security.php");
// Entete
    buildHeader("Emploi du temps salle");
// Verification de la session
	$autorisation_list[0]=0; // Administrateur
	$autorisation_list[1]=3; // Gestionnaire
	$user_type = validateSession($id_session);
	if ($user_type == -1 || !security($id_session,$autorisation_list)) print("Accès refusé");
    else
    {
// Barre de menu
		buildMenuBar($id_session,$user_type,"FormulaireSalle.php3",false);
// Ouverture de la connexion avec la base de donnees
	    $connection = openConnection($databaseName);
  // *************** DEBUT DU FORMULAIRE ***************
    print("<FORM name=form1 ACTION=\"EmploiSalle.php3\">\n");
    print("      <input type=\"hidden\" name=\"login\" value=\"$login\">\n");
    print("      <input type=\"hidden\" name=\"id_session\" value=\"$id_session\">\n");
    print("      <input type=\"hidden\" name=\"user_type\" value=\"$user_type\">\n");
    print("      <input type=\"hidden\" name=\"user_id\" value=\"$user_id\">\n");
    print("      <input type=\"hidden\" name=\"display\" value=\"$display\">\n");
    print("  <table align=center border=0 cellspacing=0 cellpading=0 bgcolor=\"#C0C000\">\n");
    print("<TR>\n");
    print("<TD rowspan=4>&nbsp;</TD>\n");
    print("<TD>&nbsp;</TD>\n");
    print("<TD>&nbsp;</TD>\n");
    print("<TD rowspan=4>&nbsp;</TD>\n");
    print("</TR>\n");
  // *************** CHAMP SEMAINE ***************
    print("<TR>\n");
    print("<TD><font size=3><i>Semaine :</i></font></TD>\n");
    print("<TD><INPUT NAME=\"ma_semaine\" ></TD>\n");
    print("</TR>\n");
    print("<TR>\n");
	print("<td><font size=3><i><div align=left>Salle :</i></font></td>");
	print("<td><select tabindex=-1 name=\"id_salle\" size=1 width=200>\n");
	print("<option value=-1>\n");
  	$request = "SELECT id_salle,numero FROM salle ORDER BY numero";
	$result = mysql_query($request);
    $G_nb_salles = mysql_num_rows($result); 
	for ($i=0;$i<$G_nb_salles;$i++)
	{
		$a_record = mysql_fetch_array($result);
		print("  <option value=".$a_record["id_salle"].">");
		print($a_record["numero"]."\n");
	}
	print("</select></div></td>\n");
    print("</TR>\n");
    print("<TR>\n");
    print("<TD>&nbsp;</TD>\n");
    print("<TD>&nbsp;</TD>\n");
    print("</TR>\n");
	print("</TABLE>\n");
	print("  <table align=center border=0 cellspacing=0 cellpading=0>\n");
	print("  <tr valign=bottom>\n");
	print("    <td align=center colspan=3>\n");
	print("	 <table border=1 cellpading=0 cellspacing=0><tr><td>\n");
	print("      <table border=0 cellspacing=1 cellpading=0 align=center bgcolor=\"#FFFFD0\">\n");
	print("        <tr valign=middle align=center>\n");
	print("          <td width=40><input type=\"image\" src=\"../img/NewButton.gif\" border=0 alt=\"Valider\" OnClick=\"submit();\"></td>\n");
	print("          <td width=40></td>\n");
    print("          <td width=40><input type=\"image\" src=\"../img/EraseButton.gif\" border=0 alt=\"Effacer\" OnClick=\"reset();\"></td>\n");
    print("        </tr>\n");
    print("      </table>\n");
    print("    </td></tr></table>\n");
    print("    </td>\n");
    print("  </tr>\n");
	print("</table>\n");
	}

	buildEndOfPage();
?>







Return current item: EmploiNet : a timetable web manager