Location: PHPKode > projects > paperasse > paperasse/liste_dossiers.php
<?php
# ---------------------------------------
# Paperasse (c) 2006 Guillaume BETTAYEB
# mail and documents management web page
# hide@address.com
# ---------------------------------------

if(isset($HTTP_GET_VARS['ListeDossiersRows'])){
	list($ListeDossiersRows) = $HTTP_GET_VARS['ListeDossiersRows'];
}
else{
	$ListeDossiersRows = 1;
}

function ListeDossiers(){
	global $ListeDossiersRows;
	$sql 	= 'SELECT * FROM `dossiers` ORDER BY `nom`';
	$query	= mysql_query($sql) OR die(mysql_error());
	$startsum	= 0;
	$incsum 	= $ListeDossiersRows;
	while($array = mysql_fetch_array($query)){
		extract($array);
		echo "<td class=\"texte\">[<a href=\"index.php?page=ajouter_dossier&id=$id\"><font color=\"$couleur\">$nom</font></a>]</td>";
		$startsum++; 
		if($startsum==$incsum){
			echo '</tr><tr>';
			$incsum = $incsum+$ListeDossiersRows;
		}
	}
}
?>
Return current item: paperasse