<?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");
?>
<br>
<!--- Formulaire de Recherche -->
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="GET" name="formr" id="formr">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
	<td nowrap>
	<input type="text" name="search" value="<?php echo @$_GET['search']; ?>"> 
	<input name="rech" type="submit" class="bton_fmarr_std" id="rech" value="Rechercher">
	<input type="submit" class="bton_fmarr_std" value="R&eacute;initialiser" onClick="document.formr.search.value='';">
	<?PHP
	if (isset($_GET['ord']) && !empty($_GET['ord']))
	{
	?>
	<input type="hidden" name="ord" id="ord" value="<?php echo @$_GET['ord']; ?>">
	<?PHP
	}
	
	if (isset($_GET['tri']) && !empty($_GET['tri']))
	{
	?>
	<input type="hidden" name="tri" id="tri" value="<?php echo @$_GET['tri']; ?>">
	<?PHP
	}
	
	if (isset($_GET['ta']) && !empty($_GET['ta']))
	{
	?>
	<input type="hidden" name="ta" id="ta" value="<?php echo @$_GET['ta']; ?>">
	<?PHP
	}
	
	if (isset($_GET['td']) && !empty($_GET['td']))
	{
	?>
	<input type="hidden" name="td" id="td" value="<?php echo $_GET['td']; ?>">
	<?PHP
	}
	
	if (isset($_GET['cc']) && !empty($_GET['cc']))
	{
	?>
	<input type="hidden" name="cc" id="cc" value="<?php echo @$_GET['cc']; ?>">
	<?PHP
	}
	
	if (isset($_GET['ci']) && !empty($_GET['ci']))
	{
	?>
	<input type="hidden" name="ci" id="ci" value="<?php echo @$_GET['ci']; ?>">
	<?PHP
	}

	if (isset($_GET['ca']) && !empty($_GET['ca']))
	{
	?>
	<input type="hidden" name="ca" id="ca" value="<?php echo @$_GET['ca']; ?>">
	<?PHP
	}

	if (isset($_GET['tx']) && !empty($_GET['tx']))
	{
	?>
	<input type="hidden" name="tx" id="tx" value="<?php echo @$_GET['tx']; ?>">
	<?PHP
	}
	$urlimp = $fic_imp."?".$_SERVER['QUERY_STRING'];
	?>	    
	</td>
	<td nowrap>
	<?PHP if ((@$_GET['ta'] <> "i") AND ($fic_imp <>"")) { ?>
	<div align="right">
	<a href="javascript:;" onclick="lanceimp('<?PHP echo $urlimp; ?>');")><img src="../img/print.gif" title="Imprimer dernière Recherche" width="22" height="22" border="0" align="absmiddle"></a>
	<a href="javascript:;" onclick="lanceimp('<?PHP echo $urlimp; ?>');")> Imprimer la derni&egrave;re recherche</a>
	</div>
	<?PHP } ?>
	</td>
</tr>
</table>
  <table width="100%"  border="0" cellpadding="0" cellspacing="0">
  	<tr>
	  <td width="80%">
		<p><span class="annot_petit_it"> Nota :<br>
		  Pour voir la signification d'une ic&ocirc;ne, laissez le pointeur de la souris dessus. </span><span class="annot_petit_it"><br>
	      </span>
          <span class="annot_petit_it">Vous pouvez &eacute;galement effectuer des recherches sur les dates &quot;sous&quot; les ic&ocirc;nes et sur les codes ou libell&eacute;s &quot;sous&quot; les ic&ocirc;nes de statuts/lieux. </span>
          <br>
          <br>
        </p>
	  </td>
	  <td>
		  <div align="right">
		  <a href="javascript:;" onclick="self.location.reload();"><img src="../img/reload.gif" title="Rafraîchir l'affichage" width="22" height="22" border="0" align="absmiddle"></a>
		  <a href="javascript:;" onclick="self.location.reload();")>Rafra&icirc;chir l'affichage</a>
		  </div>
	  </td>
	</tr>
  </table>
  <table width="100%"  border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td width="50%">
	  	<span class="annot_petit_gras"><img src="../img/dn.gif" width="16" height="16" align="absmiddle"> : Tri ascendant / <img src="../img/up.gif" width="16" height="16" align="absmiddle"> : Tri descendant</span>
		<?php 
		if (!empty($_GET['tri']))
		{
		?>
			<span class="annot_petit_it">
			<?PHP 
				echo "(Actuellement trié sur ";
				echo $_GET['tri']; 
				if ($_GET['ord'] == "ASC")
					echo ", ascendant";
				else
					echo ", descendant";
				echo ")";
			?>
			</span>
		<?PHP
		} else echo "&nbsp;";
		?>
	  </td>
      <td width="50%">
	  <?PHP if (($url_add <> "") AND (@$_GET['ta'] <> "i")){ ?>
	  <div align="right">
	  <a href="<?PHP echo $url_add; ?>"><img src="../img/add.gif" title ="Ajouter enregistrement" width="<?PHP echo $hl_vign ?>"  border="0" align="absmiddle"></a>
	  <a href="<?PHP echo $url_add; ?>"> Ajouter</a>
	  </div>
	  <?PHP } else {?>
	  &nbsp;
	  <?PHP } ?>
	  </td>
    </tr>
  </table>
</form>
<!--- Fin du Formulaire de Recherche -->
