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
|
?>
<SCRIPT LANGUAGE="JavaScript">
var checkflag = false;
var message = "Tout décocher";
function check(field) {
for (r = 0; r < field.length; r++) {
field[r].checked = !checkflag;
}
checkflag = !checkflag;
message = message=="Tout décocher"?"Tout cocher":"Tout décocher";
return message;
}
</script>
<?php
//---------------------------------------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------Fonction récapitulatif général-----------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------------------
function gpoint_recap_general(){
$requete="select * from departement order by dept asc;";
$r=mysql_query($requete);
$nb=mysql_num_rows($r);
echo "<form name='formulaire'1' method='POST' action='modules.php?name=GPOINT&func=gpoint_choix_deux_dates'>";
echo "<div align='center'>";
echo "<table cellspacing='1' width='60%'>";
echo "<tr bgcolor='#B0C4DE' ALIGN='center' valign='middle' >";
echo "<td >";
echo "<h6>Lettre</h6>";
echo "</td>";
echo "<td>";
echo "<h6>Descriptif</h6>";
echo "</td>";
echo "<td>";
echo "<h6>Voir</h6>";
echo "</td>";
echo "</tr>";
while ($row = mysql_fetch_array($r))
{
$descriptif=$row['descriptif'];
$id1 = $row['dept'];
if($couleur==1){echo "<tr bgcolor='#DDDDDD' ALIGN='center'>";$couleur=0;}
else{echo "<tr bgcolor='#FFEBCD' ALIGN='center'>";$couleur=1;}
echo "<td>";
echo "$id1";
echo "</td>";
echo "<td>";
echo "$descriptif";
echo "</td>";
echo "<td>";
echo '<input type="checkbox" name="suite1[]" value="' .$id1 .'"/>';
echo "</td>";
echo "</tr>";
}
echo "</table>";
echo "<form>";
echo "<input type='button' value='Tout cocher' onClick='this.value=check(this.form.elements['suite1[]'])>";
echo "</form> ";
echo "<br /><input type='submit' name='submit1' value='Suite'>";
echo "</div>";
echo "</form>";
} |