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
| <?php
/.../
case "modifier";
$ligne = array();
$fd2 = fopen($_REQUEST['repertoire'].$_REQUEST['fichier'],"r");
while (!feof($fd2)) {
$contenu = fgets ($fd2);
$ligne[substr($contenu,102,16)] = $contenu;
}
fclose($fd2);
ksort($ligne);
echo "<form action=\"Fct_compte_rendu.php\" method=\"POST\" name=\"Fct_compte_rendu\">";
echo "<div style=\"position: absolute; top: 0; left: 0;\">";
echo "<h2><br>Contenu du fichier virement :".$_REQUEST['fichier']."</h2>";
echo "</div>";
echo "<div style=\"position: absolute; top: 80; left: 620;\">";
echo "<input name=\"tous\" onclick=\"cocheTous('ligne', this.checked);\" type=\"radio\"/ checked>Tout sélectionner<br>";
echo "<input name=\"tous\" onclick=\"cocheTous('ligne', '');\" type=\"radio\"/>Tout désélectionner<br>";
echo "<br><br><br>";
echo "<a href=\"#\" OnClick=\"javascript:window.open('Fct_compte_rendu.php?action=validermodifier&repertoire=".addslashes($_REQUEST['repertoire'])."&fichier=".$_REQUEST['fichier']."&valeur=$ligne', 'Modification', 'width=600,height=200,top=250,left=200,scrollbars=no,resizable=no,status=no')\"><img galleryimg=\"no\" src=\"..\images\up_modifier.png\" border=\"0\"></a><br>";
echo "<a href=\"#\" OnClick=\"javascript:self.close();\"><img galleryimg=\"no\" src=\"..\images\up_annuler.png\" border=\"0\"></a><br>";
echo "</div>";
echo "<div style=\"position: absolute; top: 80; left: 0;\">";
echo "<table width=\"70%\" border=\"1\">";
foreach ($ligne as $cle => $valeur) {
if (substr($valeur,0,4) == "0602") {
echo "<tr>";
echo "<td width=\"5%\"><input name=\"ligne\" type=\"checkbox\" checked value=\"$valeur\"></td>";
echo "<td width=\"10%\">".substr($valeur,18,10)."</td>";
echo "<td width=\"50%\">".substr($valeur,30,24)."</td>";
echo "<td width=\"35%\" align=\"right\">".sprintf("%14.2f",(substr($valeur,102,16)) / 100)."</td>";
echo "</tr>";
}
}
echo "</table>";
echo "</div>";
echo "</form>";
break;
case "validermodifier";
foreach ($ligne as $_REQUEST['valeur']){
echo "*$ligne*<br>";
}
break;
} |
Partager