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 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
| <?php
header("Pragma:no-cache");
require_once '../params/config.php';
if (isset($_POST['per']))
{
$connexion = mysql_connect (DB_SERVER, DB_USER, DB_PASSWORD);
mysql_select_db (DB_NAME);
$per=(int)$_POST['per'];
$requete = sprintf("SELECT * FROM a_transtb WHERE id_periode ='%d' ORDER BY id_aff, libelle_aff",mysql_real_escape_string($per));
$resultat = mysql_query ($requete);
?>
<STYLE type=text/css>
body { /* Modifications : la couleur de fond de page - la police - l'unité utilisée pour la taille de la police */
background-color :#FFFFFF;
/*border:1px solid #9cbdff;*/
font-family: Arial, Sans-Serif;
font-size: 12px;
}
.odd {
/*#eaf1dd, #d6e3bc, #c2d69b, #4e6128; #dbe5f1, #b8cce4, #95b3d7, #243f60*/
/*background-color: #CCFFFF;*/
background-color: #eaf1dd;
}
.even {
background-color: #d6e3bc;
}
/* Input */
#table_results
{
/*margin-left : auto;margin-right: auto;*/
}
#table_results thead
{
border: #CCC 1px solid;
background-color: #c2d69b;
font-family: verdana, Arial, Sans-Serif;
font-size: 12px;
}
/* Input */
#table_results tr
{
/*margin-left: 1%;
width: 58%;*/
border: #CCC 1px solid;
/*background-color: #FFCC66;*/
font-family: verdana, Arial, Sans-Serif;
font-size: 12px;
}
#table_results tr:hover, #table_results tr:focus
{
border: #999 1px solid;
/*background-color: #DDEEFF;*/
background-color: #c2d69b;
}
</STYLE>
<table id="table_results" class="data" border="0">
<thead>
<tr style="background-color:#060237; color:white;">
<th style="width: 15px;padding-left:5px;font-weight : bold;">N. ordre</th>
<th style="width: 350px;padding-left:5px;font-weight : bold;">Libellé de l'affaire</th>
<th style="width: 300px;padding-left:5px;font-weight : bold;">Observation</th>
<th colspan="3" style="width: 30px;padding-left:5px;font-weight : bold;margin :3px">Actions</th>
</tr>
</thead>
<tbody>
<?php
if ( mysql_num_rows ($resultat) > 0 ) // si la requête n'est pas vide
{
$i = 0;
while ( $ligne=mysql_fetch_row($resultat) ) // tant qu'il y des lignes de résultat
{
// Decode le base 64
$data = base64_decode($ligne[5]);
//$data = gzdecode($data);
$edit = unserialize($data);
$i++;
if (($i%2)!=0) {
echo"<tr class='odd'>";
}
else
echo"<tr class='even'>";
echo"<td class='' align=\"center\">".$i."</td>";
echo"<td class=''>".$a."</td>";
echo"<td class=''>".$b."</td>";
echo "<td align=\"center\"><input type=\"checkbox\" id=\"id_rows_to_delete".$i."\" value=\"".$ligne[2]."\" checked/></td>";
echo"</tr>";
echo '<pre>';
print_r($edit);
echo '<pre>';
}
?>
</tbody>
<?php } ?>
</tbody>
</table>
<?php } ?> |
Partager