Hello
Merci de bien vouloir aider un pur amateur !!!
J'ai modifié une source trouvé sur le site pour un faire une sorte de fichier client chez nous. Tout est fonctionnel sauf que je n'arrive pas à faire marcher mes bouttons de tri alphabethique !!! Help please et si une bonne âme voudrait aussi bien m'aider à n'afficher que 15 résultat par page je serai au anges !!! Voici le code que j'ai :
<?php
session_start();
#########################################
#PhpMyclients Système de gestion de clients sous licence GNU/GPL #
#Version 0.2 #
#By Baal baal.jam@gmail.com #
#########################################
/*Connexion à la BDD et inclusion des fichiers*/
require('./config.php');
require('./fonction.php');
require('./class.php');
/*Traitement du login*/
if(isset($_POST['log'])) //connexion
{
authentify($_POST['login'], $_POST['pass']);
echo '<meta http-equiv="refresh" content="0">';
}
if(isset($_POST['quit'])) //déconnexion
{
unset($_SESSION['admin']);
echo '<meta http-equiv="refresh" content="0">';
}
/*Vérification de l'identité*/
if(isset($_SESSION['admin']))
{
/*Traitement des informations d'ajout*/
if(isset($_POST['enregistrer']))
{
$client=new client ($_POST['nom']);
$client->ajouter_client ($_POST['secteur'], $_POST['nom'], $_POST['adresse'], $_POST['telephone'], $_POST['portable'], $_POST['fax'], $_POST['ca'], $_POST['objectif']);
}
/*Traitement des informations de modification*/
if(isset($_POST['modifier']))
{
$client=new client ($_POST['nom']);
$client->modifier_client ($_POST['secteur'], $_POST['nom'], $_POST['adresse'], $_POST['telephone'], $_POST['portable'], $_POST['fax'], $_POST['ca'], $_POST['objectif']);
}
/*Traitement des informations de suppression*/
if(isset($_GET['suppr']))
{
$client=new client ($_GET['suppr']);
$client->supprimer_client();
}
/*Traitement des informations de tri*/
if(isset($_POST['trier']))
{
$donnees=tri($_POST['tri'], $_POST['ordre']);
}
else
{
$donnees=tri('secteur', 'asc');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<div align="center">
<p><img src="http://www.speedy-cash.ch/images/logo.jpg" width="240" height="100" /></p>
<p><em><strong>Liste de clients $$$ Speedy-Cash $$$ interdits</strong></em><br />
</p>
</div>
<form method="post" action="<?=$_SERVER['PHP_SELF']?>">
<label>Trier par: </label>
<select name="tri">
<option value="nom" selected="selected">Nom</option>
<option value="secteur">Secteur</option>
<option value="ca">CA</option>
</select>
<select name="ordre">
<option value="ASC" selected="selected">Croissant</option>
<option value="DESC">Décroissant</option>
</select>
<input type="submit" name="trier" value="Trier" />   
<input type="submit" name="quit" value="Quitter" />
</form>
<p><a href="ajout.php" title="ajouter un client">Ajouter un client</a></p>
<table>
<caption></caption>
<tr>
<th>Filiale</th>
<th>Nom</th>
<th>Prénom</th>
<th>Code+Ville</th>
<th>Date Naissance</th>
<th>Bloque</th>
<th>Qui</th>
<th>Raison</th>
</tr>
<?php
while($value=mysql_fetch_array($donnees))
{
echo '<tr><td>'.$value['secteur'].'</td><td><a href="profil.php?nom='.$value['nom'].'">'.$value['nom'].'</a></td><td>'.$value['adresse'].'</td><td>'.$value['telephone'].'</td><td>'.$value['portable'].'</td><td>'.$value['fax'].'</td><td>'.$value['ca'].'</td><td>'.$value['objectif'].'</td></tr>';
}
mysql_free_result($donnees);
mysql_close();
?>
</table>
</body>
</html>
<?php
}
else
{
echo '<a href="./index.php">Vous devez vous autentifier</a>';
}
?>