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

Version 0.9.9

Copyright (C) 2006-2009  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");
?>
<div class="annot_petit" align="center">
<?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) OR ($lst_env == TRUE) OR ($lst_envs == TRUE) OR ($lst_retps == TRUE))
{
?>
<!--- Pied sur affichages des listes -->
<?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]."\" border=\"0\" align=\"absmiddle\">";
		}
		echo " Probl&egrave;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\" align=\"absmiddle\">";
		echo " En vacances";
		$slash = TRUE;
	}
	
	if ($lst_lic == TRUE) 
	{ 
		if ($slash == TRUE)
			echo " / ";
		echo " <img src=\"../img/out.png\" align=\"absmiddle\">";
		echo " N'est plus salari&eacute;";
		$slash = TRUE;
	}
	
	if ($lst_ferm == TRUE) 
	{ 
		if ($slash == TRUE)
			echo " / ";
		echo " <img src=\"../img/out.png\" align=\"absmiddle\">";
		echo " Est ferm&eacute;e";
		$slash = TRUE;
	}
	
	// Légende "trop tôt", "trop tard"
	if ($lst_ttot == TRUE) 
	{ 
		if ($slash == TRUE)
			echo " / ";
		echo " <img src=\"../img/tot.png\" align=\"absmiddle\">";
		echo " Trop t&ocirc;t";
		$slash = TRUE;
	}
	
	if ($lst_ttard == TRUE) 
	{ 
		if ($slash == TRUE)
			echo " / ";
		echo " <img src=\"../img/tard.png\" align=\"absmiddle\">";
		echo " Trop tard";
		$slash = TRUE;
	}
	
	// Légende "contrat signé"
	if ($lst_sig == TRUE) 
	{ 
		if ($slash == TRUE)
			echo " / ";
		echo " <img src=\"../img/ok.png\" align=\"absmiddle\">";
		echo " Contrat sign&eacute;";
		$slash = TRUE;
	}
	
	// Légende "contrat terminé"
	if ($lst_fini == TRUE) 
	{ 
		if ($slash == TRUE)
			echo " / ";
		echo " <img src=\"../img/warn.png\" align=\"absmiddle\">";
		echo " Contrat termin&eacute;";
		$slash = TRUE;
	}
	
	// Légende "fiche retour soldée"
	if ($lst_retps == TRUE) 
	{ 
		if ($slash == TRUE)
			echo " / ";
		echo " <img src=\"../img/ok.png\" align=\"absmiddle\">";
		echo " Retour sold&eacute;";
		$slash = TRUE;
	}
	
	// Légende "renvoi effectué"
	if ($lst_env == TRUE) 
	{ 
		if ($slash == TRUE)
			echo " / ";
		echo " <img src=\"../img/ok.png\" align=\"absmiddle\">";
		echo " Renvoi effectu&eacute;";
		$slash = TRUE;
	}
	
	// Légende "renvoi soldé"
	if ($lst_envs == TRUE) 
	{ 
		if ($slash == TRUE)
			echo " / ";
		echo " <img src=\"../img/ok.png\" align=\"absmiddle\">";
		echo " Tous les &eacute;changes ont &eacute;t&eacute; effectu&eacute;s";
		$slash = TRUE;
	}
	
	echo "    (Passer la souris sur les ic&ocirc;nes pour le d&eacute;tail)";
	echo "<hr align=\"center\" width=\"20%\"><br>";
}
?>
<br />
<?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/eye.png\" border=\"0\" align=\"absmiddle\">";
	echo " Voir le d&eacute;tail";
	$slash = TRUE;
}

if ($lst_voire == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/retr.png\" border=\"0\" align=\"absmiddle\">";
	echo " Saisir traitements retours";
	$slash = TRUE;
}

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

if ($lst_clore == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/clore.png\" border=\"0\" align=\"absmiddle\">";
	echo " Clore";
	$slash = TRUE;
}

if (($lst_sfact == TRUE) OR ($lst_sfacta == TRUE))
{
	if ($slash == TRUE)
		echo " / ";
	if ($lst_sfact == TRUE)
		echo "<img src=\"../img/sfact.png\" border=\"0\" align=\"absmiddle\">";
	if ($lst_sfacta == TRUE)
	{
		if ($lst_sfact == TRUE)
			echo " - ";
		echo "<img src=\"../img/sfact_add.png\" border=\"0\" align=\"absmiddle\">";
	}
	echo " Suivi Facturation";
	$slash = TRUE;
}

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

if ($lst_dem == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/dem.png\" border=\"0\" align=\"absmiddle\">";
	echo " D&eacute;m&eacute;nager";
	$slash = TRUE;
}

if ($lst_recup == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/recup.png\" border=\"0\" align=\"absmiddle\">";
	echo " Utiliser comme mod&egrave;le";
	$slash = TRUE;
} 

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

if ($lst_bar == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/barloc.png\" border=\"0\" align=\"absmiddle\">";
	switch ($ta)
	{
		case "p" :
			echo " Cr&eacute;er un br&ecirc;me avec cette p&eacute;riode type";
			break;
		default :
			break;
	}
	$slash = TRUE;
} 

if ($lst_retp == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/retp.png\" border=\"0\" align=\"absmiddle\">";
	echo " Saisir produit &agrave; retourner";	
	$slash = TRUE;
} 

if ($lst_retd == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/retd.png\" border=\"0\" align=\"absmiddle\">";
	echo " Demande de retour";	
	$slash = TRUE;
} 

if ($lst_rete == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/rete.png\" border=\"0\" align=\"absmiddle\">";
	echo " Cr&eacute;er bon de renvoi";
	$slash = TRUE;
} 

if ($lst_retee == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/rete.png\" border=\"0\" align=\"absmiddle\">";
	echo " Ajouter au renvoi";
	$slash = TRUE;
} 

if ($lst_reteex == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/retns.png\" border=\"0\" align=\"absmiddle\">";
	echo " Il existe des renvois en attente (cliquer)";
	$slash = TRUE;
} 

if ($lst_retr == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/retr.png\" border=\"0\" align=\"absmiddle\">";
	echo " Traiter retour";
	$slash = TRUE;
} 

if ($lst_taxe == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/taxe.png\" border=\"0\" align=\"absmiddle\">";
	switch ($ta)
	{
		case "p" :
			echo " Appliquer la taxe au produit";
			break;
		case "i" :
			echo " Appliquer la taxe &agrave; l'intervention";
			break;
		default :
			break;
	}
	$slash = TRUE;
} 

if ($lst_pen == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/pen.png\" border=\"0\" align=\"absmiddle\">";
	echo " Appliquer une p&eacute;nalit&eacute; au produit";
	$slash = TRUE;
} 

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

if ($lst_dos == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/dossier.png\" border=\"0\" align=\"absmiddle\">";
	if ($ta == "i")
		echo " Choisir pour le dossier en cours";
	else
		echo " Saisir dossier de suivi";	
	$slash = TRUE;
} 

if ($lst_coloc == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/coloc.png\" border=\"0\" align=\"absmiddle\">";
	if ($ta == "l")
		echo " Choisir pour le contrat en cours";
	else
		echo " Saisir contrat location";	
	$slash = TRUE;

} 

if ($lst_relexist == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/relexist.png\" border=\"0\" align=\"absmiddle\">";
	echo " Editer relev&eacute;";
	$slash = TRUE;
} 

if ($lst_relcreer == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/rel.png\" border=\"0\" align=\"absmiddle\">";
	echo " Cr&eacute;er relev&eacute;";
	$slash = TRUE;
} 

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

if ($lst_otadd == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/ot_add.png\" border=\"0\" align=\"absmiddle\">";
	echo " Ajouter bon de travail";
	$slash = TRUE;
}

if ($lst_otlnk == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/ot_lnkadd.png\" border=\"0\" align=\"absmiddle\">";
	$tx="m";
	if (isset($_GET["tx"]))
		$tx = strip_tags(trim($_GET['tx'])); // Source de l'appel m:depuis le menu, i:depuis l'intervention
	switch ($tx)
	{
		case "i";
			echo " Rattacher &agrave; cette intervention";
			break;
		case "m" :
			echo " Cr&eacute;er une intervention pour r&eacute;gulariser";
			break;
	}			
	$slash = TRUE;
}

if ($lst_otulnk == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/ot_lnkdel.png\" border=\"0\" align=\"absmiddle\">";
	echo " Dissocier de cette intervention";
	$slash = TRUE;
}

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

if ($lst_impcl == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/printcl.png\" border=\"0\" align=\"absmiddle\">";
	echo " Imprimer (version client)";
	$slash = TRUE;
}

if ($lst_mail == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/mail.png\" border=\"0\" align=\"absmiddle\">";
	if (@$_SESSION["niv_log"] <> 1)
		echo " Envoyer par email";
	else
		echo " Recevoir par email";
	$slash = TRUE;
}

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

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

if ($lst_impp == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/printc.png\" border=\"0\" align=\"absmiddle\">";
	echo " Imprimer (avec d&eacute;tail probl&egrave;mes)";
	$slash = TRUE;
}


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

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

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

if ($lst_grab == TRUE)
{
	if ($slash == TRUE)
		echo " / ";
	echo "<img src=\"../img/get.png\" border=\"0\" align=\"absmiddle\">";
	echo " S'approprier";
	$slash = TRUE;
}

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