$msg[alerte_transferts_validation]";
//pour les envois
if (cpt_transferts ( "etat_transfert=0 AND etat_demande=1 AND num_location_source =" . $deflt_docs_location ) != 0)
$tmpAff.= "$msg[alerte_transferts_envoi]";
//pour les receptions
if (cpt_transferts ( "etat_transfert=0 AND etat_demande=2 AND num_location_dest =" . $deflt_docs_location ) != 0)
$tmpAff.= "$msg[alerte_transferts_reception]";
//pour les retours
if (cpt_transferts ( "etat_transfert=0 AND type_transfert=1 AND etat_demande=3 AND num_location_dest =" . $deflt_docs_location . " AND DATE_ADD(date_retour,INTERVAL -" . $transferts_nb_jours_alerte . " DAY)<=CURDATE()") != 0)
$tmpAff.= "$msg[alerte_transferts_retours]";
//pour les refus
if (cpt_transferts ( "etat_transfert=0 AND type_transfert=1 AND etat_demande=4 AND num_location_dest =" . $deflt_docs_location) != 0)
$tmpAff.= "$msg[alerte_transferts_refus]";
//affichage des alertes si besoin
if ($tmpAff)
$aff_alerte.= "".$msg ["alerte_avis_transferts"] . $tmpAff."
";
//fonction pour compter les transferts
function cpt_transferts($clause_where) {
global $deflt_docs_location;
global $msg;
$rqt = "SELECT 1 " .
"FROM transferts " .
"INNER JOIN transferts_demande ON id_transfert = num_transfert " .
"WHERE " . $clause_where . " " .
"LIMIT 1";
//echo $rqt."
";
$req = mysql_query ( $rqt ) or die ( $msg ["err_sql"] . "
" . $rqt . "
" . mysql_error () );
$nb_limite = mysql_num_rows ( $req );
return $nb_limite;
}
?>