Location: PHPKode > projects > paperasse > paperasse/MenuSelection.fc.php
<?php
# ---------------------------------------
# Paperasse (c) 2006 Guillaume BETTAYEB
# mail and documents management web page
# hide@address.com
# ---------------------------------------
//variables des fonctions
$ListeSelectionDossiers		= false;
$ListeSelectionUtilisateurs = false;
$ListeSelectionContacts		= false;

function ListeSelectionDossiers(){
	$ListeSelectionDossiers = false;
	$sql 	= 'SELECT `id`,`nom`, `couleur` FROM `dossiers` ORDER BY `nom`';
	$query	= mysql_query($sql) OR die(mysql_error());
	while($array = mysql_fetch_array($query)){
		extract($array);
		$ListeSelectionDossiers.="<option style=\"color: $couleur;\" value=\"$id\">$nom</option> \n";
	}
	return $ListeSelectionDossiers;
}

function ListeSelectionUtilisateurs(){
	$ListeSelectionUtilisateurs = false;
	$sql 	= 'SELECT * FROM `utilisateurs`';
	$query	= mysql_query($sql) OR die(mysql_error());
	while($array = mysql_fetch_array($query)){
		extract($array);
		$ListeSelectionUtilisateurs.="<option value=\"$id\">$nom</option> \n";
	}
	return $ListeSelectionUtilisateurs;
}

function ListeSelectionContacts(){
	$ListeSelectionContacts = false;
	$sql 	= 'SELECT * FROM `contacts` ORDER BY `nom`';
	$query	= mysql_query($sql) OR die(mysql_error());
	while($array = mysql_fetch_array($query)){
		extract($array);
		$ListeSelectionContacts.="<option value=\"$id\">$nom</option> \n";
	}
	return $ListeSelectionContacts;
}
?>
Return current item: paperasse