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 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
| <?php session_start(); ?>
<?php include('../login.html'); ?>
<?php
// Tri sur colonne
$tri_autorises = array('ui','adresse','client','tel','urs','nature','arrivee','reponse');
$order_by = (isset($_GET['order']) && in_array($_GET['order'],$tri_autorises)) ? $_GET['order'] : 'reponse';
// Sens du tri
$order_dir = isset($_GET['inverse']) ? 'DESC' : 'ASC';
// Préparation de la requête
$sql = "
SELECT *
FROM preetude
ORDER BY {$order_by} {$order_dir}
";
$result = mysql_query($sql);
// Notre fonction qui affiche les liens
function sort_link($text, $order=false)
{
global $order_by, $order_dir;
if(!$order)
$order = $text;
$link = '<a href="?order=' . $order;
if($order_by==$order && $order_dir=='ASC')
$link .= '&inverse=true';
$link .= '"';
if($order_by==$order && $order_dir=='ASC')
$link .= ' class="order_asc"';
elseif($order_by==$order && $order_dir=='DESC')
$link .= ' class="order_desc"';
$link .= '>' . $text . '</a>';
return $link;
}
?>
<?php include('../doctype.html'); ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<!-- Titre
************************************************************-->
<?php include('../titre.html'); ?>
<!-- Feuille de style
************************************************************-->
<style type="text/css" media="screen">
@import url(../styles/style.css);
</style>
<style type="text/css">
a.order_asc,
a.order_desc:hover {
padding-right:15px;
background:transparent url(../styles/s_asc.png) right no-repeat;
}
a.order_desc,
a.order_asc:hover {
padding-right:15px;
background:transparent url(../styles/s_desc.png) right no-repeat;
}
</style>
<script type="text/javascript" src="functions.js"></script>
</head>
<body id="principal">
<!-- Conteneur
************************************************************-->
<div id="conteneur">
<!-- En-tete
************************************************************-->
<h1 id="header">
<?php include("../titrepage.html"); ?>
</h1>
<!-- Barre verticale
************************************************************-->
<div id="navigation">
<div id="styles">
<?php include('../menu.html'); ?>
</div>
<div id="informations">
<h2>Informations</h2>
<?php include('../maj.html'); ?>
</div>
</div>
<!-- Contenu
************************************************************-->
<div id="contenu">
<div id="main">
<div id="projet">
<h2><span>Listing Pré-Etudes</span></h2>
<p></p>
</div>
<div id="base">
<h3><span>Base de Données Complètes des Pré-Etudes<u></u></span></h3>
<h4><span>Pour rechercher une Pré-Etude, un simple Ctrl+F suffit.</span></h4>
<p><a href="archannul.php">- Voir les Pré-Etudes Annulées -</a></p><br>
<p>
<!-- Données de la table
************************************************************-->
<table id="tab1">
<thead>
<tr>
<th><?php echo sort_link('UI', 'ui') ?></th>
<th><?php echo sort_link('Adresse', 'adresse') ?></th>
<th><?php echo sort_link('Client', 'client') ?></th>
<th><?php echo sort_link('Tel', 'tel') ?></th>
<th><?php echo sort_link('Nature<br>Etude', 'nature') ?></th>
<th><?php echo sort_link('Nom<br>Demandeur', 'urs') ?></th>
<th><?php echo sort_link('AS/CAFF', 'ascaff') ?></th>
<th><?php echo sort_link('ARRIVEE', 'arrivee') ?></th>
<th><?php echo sort_link('Réponse<br>Demandeur', 'reponse') ?></th>
<th>Comm<br>Etude</th>
<th>Etat</th>
<th>MOD</th>
<th>DEL</th>
<th>ANN</th>
</tr>
</thead>
<tbody>
<?php while( $row=mysql_fetch_assoc($result) ) : ?>
<tr
<?php
if ($row['reponse'] == "0000-00-00") {
echo "style=\"background: #E1E1E1\"";
} else {
echo "";
}
?>
>
<td><?php echo $row['ui']; ?></td>
<td><?php echo $row['adresse']; ?></td>
<td><?php echo $row['client']; ?></td>
<td><?php echo $row['tel']; ?></td>
<td><?php echo $row['nature']; ?></td>
<td><?php echo $row['urs']; ?></td>
<td><?php echo $row['ascaff']; ?></td>
<td><?php echo $row['arrivee']; ?></td>
<td><?php
if ($row['reponse'] == "0000-00-00") {
echo "";
} else {
echo $row['reponse'];
}
?></td>
<td ><?php
$com = $row['id_etu'];
echo "<a href=comm.php?id=$com target=wclose onclick=window.open('comm.php?id=$com','wclose','width=600,height=800,scrollbars=yes,toolbar=no,status=no,left=20,top=30')><img src=\"../styles/comm.gif\" alt=\"Modifier la ligne\" /></a>";
?></td>
<td>
<?php
if ($row['reponse'] == "0000-00-00") {
echo "En Cours";
} else {
echo "Terminée";
}
?></td>
<td><a href="modifier.php?id=<?php echo $row['id_etu']; ?>" onclick="return confirm('Êtes-vous sur de vouloir modifier ?')"><img src="../styles/icoMod.gif" alt="Modifier la ligne" /></a></td>
<td><a href="delete.php?id=<?php echo $row['id_etu']; ?>" onclick="return confirm('Êtes-vous sur de vouloir supprimer ?')"><img src="../styles/icoSup.png" alt="Supprimer la ligne" /></a></td>
<td><a href="annul.php?id=<?php echo $row['id_etu']; ?>" onclick="return confirm('Pré-Etude Annulée ? (Manipulation Irreversible)')"><img src="../styles/annul.png" alt="Annuler la Pré Etude" /></a></td>
</tr>
<?php endwhile ?>
</tbody>
</table>
</p>
</div>
<!-- Bloc pour mettre des informations en bas de page
************************************************************-->
<div id="infostyle"><span></span></div>
<!-- /Fin Contenu
************************************************************-->
</div>
</div>
<!-- Pied de page
************************************************************-->
<p id="footer">
<?php include('../foot.html'); ?>
</p>
<!-- /Fin Conteneur
************************************************************-->
</div>
<!-- Blocs supplémentaires pour ajouter des images
************************************************************-->
<div id="imgbloc1"><span></span></div>
<div id="imgbloc2"><span></span></div>
<div id="imgbloc3"><span></span></div>
<div id="imgbloc4"><span></span></div>
<div id="imgbloc5"><span></span></div>
<!-- Balises de fermeture
************************************************************-->
</body>
</html> |
Partager