<?php
/****************************************************************************************
SMI (Services Maintenance Interventions) est une gestion libre de maintenance et de SAV

Version 0.9.7

Copyright (C) 2006-2007  Sylvain FATOME
This program is free software; you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation; 
either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program
(in the directory docs); 
if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
Boston, MA  02110-1301, USA.

Contact : galawa@free.fr

Web : http://smitst.homelinux.com
****************************************************************************************/


// Vérification des tentatives de hack
$pos=strpos($_SERVER['PHP_SELF'],"inc.php");
if ($pos===FALSE)
	$ok_inc=TRUE;
else
	$ok_inc=FALSE;
if ($ok_inc==FALSE) header("Location: ../index.php");

if (($lst_sta == TRUE) OR ($lst_vac == TRUE) OR ($lst_lic == TRUE) OR ($lst_ferm == TRUE) OR ($lst_ttot == TRUE) OR ($lst_ttard == TRUE) OR ($lst_sig == TRUE)  OR ($lst_fini == TRUE))
{
?>
<!--- Pied sur affichages des listes -->
<p align="center">
<span class="annot_gras_it">
<?PHP 
	// Légende statut comptabilité (1 ligne)
	if ($lst_sta == TRUE) 
	{ 
		for ($i=1; $i <= 3; $i++) 
		{
			echo "<img src=\"../img/".$ico_cpta[$i]."\" title =\"".$mess_cpta[$i]."\" width=\"".$hl_vign."\" height=\"".$hl_vign."\" border=\"0\" align=\"absmiddle\">";
		}
		echo " Problème en cours";
		$slash = TRUE;
	}
	
	// Légende vacances, licencié, fermé (1 ligne)
	$slash = FALSE;
	
	if ($lst_vac == TRUE) 
	{ 
		if ($slash == TRUE)
			echo " / ";
		echo"<img src=\"../img/vac.png\" width=\"".$hl_vign."\"  height=\"".$hl_vign."\" align=\"absmiddle\">";
		echo " En vacances";
		$slash = TRUE;
	}
	
	if ($lst_lic == TRUE) 
	{ 
		if ($slash == TRUE)
			echo " / ";
		echo " <img src=\"../img/out.gif\" width=\"".$hl_vign."\"  height=\"".$hl_vign."\" align=\"absmiddle\">";
		echo " N'est plus salarié";
		$slash = TRUE;
	}
	
	if ($lst_ferm == TRUE) 
	{ 
		if ($slash == TRUE)
			echo " / ";
		echo " <img src=\"../img/out.gif\" width=\"".$hl_vign."\"  height=\"".$hl_vign."\" align=\"absmiddle\">";
		echo " Est fermée";
		$slash = TRUE;
	}
	
	// Légende "trop tôt", "trop tard"
	if ($lst_ttot == TRUE) 
	{ 
		if ($slash == TRUE)
			echo " / ";
		echo " <img src=\"../img/tot.gif\" width=\"".$hl_vign."\"  height=\"".$hl_vign."\" align=\"absmiddle\">";
		echo " Trop tôt";
		$slash = TRUE;
	}
	
	if ($lst_ttard == TRUE) 
	{ 
		if ($slash == TRUE)
			echo " / ";
		echo " <img src=\"../img/tard.gif\" width=\"".$hl_vign."\"  height=\"".$hl_vign."\" align=\"absmiddle\">";
		echo " Trop tard";
		$slash = TRUE;
	}
	
	// Légende "contrat signé"
	if ($lst_sig == TRUE) 
	{ 
		if ($slash == TRUE)
			echo " / ";
		echo " <img src=\"../img/ok.gif\" width=\"".$hl_vign."\"  height=\"".$hl_vign."\" align=\"absmiddle\">";
		echo " Contrat signé";
		$slash = TRUE;
	}
	
	// Légende "contrat terminé"
	if ($lst_fini == TRUE) 
	{ 
		if ($slash == TRUE)
			echo " / ";
		echo " <img src=\"../img/warn.gif\" width=\"".$hl_vign."\"  height=\"".$hl_vign."\" align=\"absmiddle\">";
		echo " Contrat terminé";
		$slash = TRUE;
	}
	
	echo "    (Passer la souris sur les icônes pour le détail)";
	echo "<hr align=\"center\" width=\"20%\"><br>";
?>
</span>
</p>
<?PHP 
}

if ($taille_piedla == "small")
{
	$hl_legende = $hl_vign - 4;
?>
<p align="center">
<span class="annot_petit">
<?PHP 
} 
else 
{ 
	$hl_legende = $hl_vign;

?>
<p align="center">
<?PHP 
} 

// Légende détail, Mettre à jour, Email, Modèle, Intervention, Contrat, Supprimer, Imprimer (1 ligne)
$slash = FALSE;

if ($lst_voir == TRUE)
{
	echo "<img src=\"../img/detail.gif\" width=\"".$hl_legende."\" height=\"".$hl_legende."\" border=\"0\" align=\"absmiddle\">";
	echo " Voir le détail";
	$slash = TRUE;
}

if ($lst_maj == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/edit.png\" width=\"".$hl_legende."\" height=\"".$hl_legende."\" border=\"0\" align=\"absmiddle\">";
	echo " Voir ou Mettre à jour";
	$slash = TRUE;
}

if ($lst_name == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/edit.png\" width=\"".$hl_legende."\" height=\"".$hl_legende."\" border=\"0\" align=\"absmiddle\">";
	echo " Nommer ou Renommer";
	$slash = TRUE;
}

if ($lst_dem == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/dem.gif\" width=\"".$hl_legende."\" height=\"".$hl_legende."\" border=\"0\" align=\"absmiddle\">";
	echo " Déménager";
	$slash = TRUE;
}

if ($lst_mail == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/mail.png\" width=\"".$hl_legende."\" height=\"".$hl_legende."\" border=\"0\" align=\"absmiddle\">";
	echo " Renvoyer email";
	$slash = TRUE;
} 

if ($lst_recup == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/recup.gif\" width=\"".$hl_legende."\" height=\"".$hl_legende."\" border=\"0\" align=\"absmiddle\">";
	echo " Utiliser comme modèle";
	$slash = TRUE;
} 

if ($lst_int == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/int.gif\" width=\"".$hl_legende."\" height=\"".$hl_legende."\" border=\"0\" align=\"absmiddle\">";
	if ($ta == "i")
		echo " Choisir pour l'intervention en cours";
	else
		echo " Saisir Intervention";	
	$slash = TRUE;
} 

if ($lst_cocl == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/contrat.gif\" width=\"".$hl_legende."\" height=\"".$hl_legende."\" border=\"0\" align=\"absmiddle\">";
	if ($ta == "i")
		echo " Choisir pour le contrat en cours";
	else
		echo " Saisir Contrat";	
	$slash = TRUE;
} 

if ($lst_relexist == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/relexist.gif\" width=\"".$hl_legende."\" height=\"".$hl_legende."\" border=\"0\" align=\"absmiddle\">";
	echo " Editer Relevé";
	$slash = TRUE;
} 

if ($lst_relcreer == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/rel.gif\" width=\"".$hl_legende."\" height=\"".$hl_legende."\" border=\"0\" align=\"absmiddle\">";
	echo " Créer Relevé";
	$slash = TRUE;
} 

if ($lst_pbmrel == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/addpbm.gif\" width=\"".$hl_legende."\" height=\"".$hl_legende."\" border=\"0\" align=\"absmiddle\">";
	echo " Déclarer un problème";
	$slash = TRUE;
} 

if ($lst_imp == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/print.gif\" width=\"".$hl_legende."\" height=\"".$hl_legende."\" border=\"0\" align=\"absmiddle\">";
	echo " Imprimer";
	$slash = TRUE;
}

if ($lst_reopen == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/reopen.png\" width=\"".$hl_legende."\" height=\"".$hl_legende."\" border=\"0\" align=\"absmiddle\">";
	echo " Rèouvrir";
	$slash = TRUE;
}

	// Légende "synthèse"
	if ($lst_histo == TRUE) 
	{ 
		if ($slash == TRUE)
			echo " / ";
		echo "<img src=\"../img/histo.png\" width=\"".$hl_vign."\"  height=\"".$hl_vign."\" align=\"absmiddle\">";
		echo " Synth&egrave;se";
		$slash = TRUE;
	}
	
if ($lst_impc == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/printc.gif\" width=\"".$hl_legende."\" height=\"".$hl_legende."\" border=\"0\" align=\"absmiddle\">";
	echo " Imprimer (avec CGV)";
	$slash = TRUE;
}

if ($lst_impp == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/printc.gif\" width=\"".$hl_legende."\" height=\"".$hl_legende."\" border=\"0\" align=\"absmiddle\">";
	echo " Imprimer (avec détail problèmes)";
	$slash = TRUE;
}


if ($lst_rel == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/mailren.gif\" width=\"".$hl_legende."\" height=\"".$hl_legende."\" border=\"0\" align=\"absmiddle\">";
	echo " Relancer";
	$slash = TRUE;
}

if ($lst_ren == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/renouv.png\" width=\"".$hl_legende."\" height=\"".$hl_legende."\" border=\"0\" align=\"absmiddle\">";
	echo " Renouveler contrat";
	$slash = TRUE;
}

if ($lst_del == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/del.gif\" width=\"".$hl_legende."\" height=\"".$hl_legende."\" border=\"0\" align=\"absmiddle\">";
	echo " Supprimer";
	$slash = TRUE;
}

if ($lst_grab == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/main.gif\" width=\"".$hl_legende."\" height=\"".$hl_legende."\" border=\"0\" align=\"absmiddle\">";
	echo " S'approprier";
	$slash = TRUE;
}

if ($lst_mve == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/fmve.png\" width=\"".$hl_legende."\" height=\"".$hl_legende."\" border=\"0\" align=\"absmiddle\">";
	echo " D&eacute;placer";
	$slash = TRUE;
}

if ($taille_piedla == "small")
{
?>
</p></span>

<?PHP
}
else
{
?>
</p>
<?PHP
}
?>
