Location: PHPKode > projects > EmploiNet : a timetable web manager > EmploiNet/v0.8.0/Liste/liste_semaine.php
<?
	print("          <input type=\"hidden\" name=\"s_semaine\" ");
    if (isset($s_semaine)) print("value=\"$s_semaine\">\n");
    else print("value=\"-1\">\n");

    print("<table bgcolor=\"#C0C000\" cellspacing=1 valign=top align=center><tr>\n");
    if (isset($id_periode))
	{
	    $request = "SELECT numero_semaine_debut,nb_semaines FROM periode WHERE id_periode = $id_periode";
	    $result = mysql_query($request);
	    $a_record = mysql_fetch_array($result);
	    $max2 = $a_record["numero_semaine_debut"] + $a_record["nb_semaines"] - 1;
        if (isset($s_semaine)) print("<td bgcolor=white><a href=\"javascript:document.form1.s_semaine.value=".($s_semaine-1)."; document.form1.choice.value=-4; document.form1.submit();\"><font size=5><b><</b></font></a></td>");       
        else print("<td bgcolor=\"white\"><font size=\"5\"><b><</b></font></td>");
	    for ($i = $a_record["numero_semaine_debut"];$i <= $max2; $i++)
	    {
	        $s = ($i>52)?$i-52:$i;
		  if ($s_semaine == $s) print("<td bgcolor=white><font color=black size=3><b>$s</b></font></td>");
	        else print("<td bgcolor=yellow><a href=\"javascript:document.form1.s_semaine.value=$s; document.form1.choice.value=-4; document.form1.submit();\"><font size=2><i>$s</i></font></a></td>");
            print("\n");
        }
        if (isset($s_semaine)) print("<td bgcolor=white><a href=\"javascript:document.form1.s_semaine.value=".($s_semaine+1)."; document.form1.choice.value=-4; document.form1.submit();\"><font size=5><b>></b></font></a></td>");       
        else print("<td bgcolor=white><font size=5><b>></b></font></td>");       
        print("</i></font>");
	}
    print("</tr></table>\n");
?>
Return current item: EmploiNet : a timetable web manager