<center>

<?php
if(isset($_POST['motcle'])) {
$base_01net = 'http://www.clubic.com/r/';

$motcle = stripslashes($_POST['motcle']);
// on remplace les caractères spéciaux
$motcle = str_replace(array('à','á','â','ã','ä','å'),'a',$motcle);
$motcle = str_replace(array('ò','ó','ô','õ','ö','ø'),'o',$motcle);
$motcle = str_replace(array('è','é','ê','ë'),'e',$motcle);
$motcle = str_replace('ç','c',$motcle);
$motcle = str_replace(array('ì','í','î','ï'),'i',$motcle);
$motcle = str_replace(array('ù','ú','û','ü'),'u',$motcle);
$motcle = str_replace('ÿ','y',$motcle);
$motcle = str_replace('ñ','n',$motcle);
// passage des majuscule en minuscule
$motcle = strtolower($motcle);

$search_list = explode("\n", htmlentities($motcle));
$tmp = 0;

foreach($search_list as $search_string) {

	$url_01net = $base_01net . $search_string . '/telecharger/';
	$url_01net = str_replace(" ","-",$url_01net);

	list($logs,$erreur) = getListLog01net($url_01net);

	if(!empty($logs)) {
		foreach($logs as $unlog)
		{
			echo '<form name="toocharger" id="info" action="index.php?page=Clubic&action=info" method="post">';
			echo '<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">';
			echo '<tr>';
			echo '<td height="91" valign="bottom" background="./images/img_log/f_log_h.png"><table width="200" border="0" cellspacing="0" cellpadding="0">';
			echo '<tr>';
			echo '<td width="170" height="33" align="center"><input type="hidden" name="loginfo[' . $tmp . '][titre]" value="' . $unlog['titre'] . '" />';
			echo '<input type="hidden" name="loginfo[' . $tmp . '][id]" value="' . $unlog['id'] . '" />';
			echo '<input type="image" src="./images/fiche_valid.png" border="0" name="go" title="Selectionner cette Fiche" onmouseover="javascript:this.src=\'./images/fiche_valid1.png\';" onmouseout="javascript:this.src=\'./images/fiche_valid.png\';" /></td>';
			echo '<td align="center"><a href="http://www.clubic.com/' . $unlog['id'] . '.html" target="_blank"><img src="./images/cub.png" title="Voir la Fiche Complète sur Clubic.com" width="38" height="26" border="0" onmouseover="javascript:this.src=\'./images/cub1.png\';" onmouseout="javascript:this.src=\'./images/cub.png\';" /></a></td>';
			echo '</tr><tr><td height="33"></td><td></td></tr></table></td></tr><tr><td background="./images/img_log/f_log_c.png">';

echo '<div class="logiciels" ><table border="0" cellspacing="0" cellpadding="0">';
echo '<tr><td width="10"></td><td rowspan="2">';
echo '<div style="background:url(./images/list/jewel1.png); ">
<img src="' . $unlog['affiche'] . '" width="60" height="50" style="border: 15px solid transparent;" title="Affiche de ' . $unlog['titre'] . '" /></div></td><td width="30"></td><td width="550"><div style="border:#000000 1px solid; background:url(./images/list_log.gif); background-repeat: repeat-x;">';
            echo '<strong>Titre :</strong> <span><u>' . $unlog['titre'] . ' ( ' . $unlog['os'] . ' )</u></span><br>';
	    echo '<strong>Détail :</strong> ' . $unlog['detail'] . '<br />';
            echo '<strong>Date :</strong> ' . $unlog['date'] . '<br />';
            echo '<strong>Compatible :</strong> ' . $unlog['station'] . '</span>';

			echo '</div></td>';
			echo '</tr>';
			echo '</table>';
			echo '</div></td></tr><tr><td height="13" background="./images/img_log/f_log_b.png"></td></tr>';
			echo '</table></form><br />';
		   $tmp++;
		}
	}else{
		if(!empty($erreur)) {
			echo '<center><meta http-equiv="refresh" content="5; url='.$PHP_SELF.'?page=Clubic" />
			<div style="background-color:#FFCCCC; border:#000000 1px double; width:100%;">
			<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
			<tr>
			<td align="center" valign="middle"><img src="./images/Panneauattention.png" hspace="10" vspace="10" border="0" alt="VisualPreZZ" /></td>
			<td width="100%" align="center" valign="middle"><p>! --- ### ATTENTION ### --- !</p>
			<p>Une erreur s\'est produite, Veuillez nous en escuser ....</p>
			<p>( Redirection dans 5 secondes)</p></td>
			<td align="center" valign="middle"><img src="./images/Panneauattention.png" hspace="10" vspace="10" border="0" alt="VisualPreZZ" /></td>
			</tr></table></div><br /><a href="?page=Clubic"><input name="manuel" value="manuel" type="hidden" /><img src="./images/err.png" title="Erreur de recherche" border="0" onmouseover="javascript:this.src=\'./images/err1.png\';" onmouseout="javascript:this.src=\'./images/err.png\';" alt="VisualPreZZ" /></a><br />
<script language="javascript" type="text/javascript">
//<![CDATA[
google_ad_client = "pub-5294692897836007";
google_ad_slot = "7634590533";
google_ad_width = "468";
google_ad_height = "60";
//]]>
</script>
<script language="JavaScript" type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></center>';
		}else{
			echo '<center><meta http-equiv="refresh" content="6; url='.$PHP_SELF.'?page=Clubic" />
			<div style="background-color:#FFCCCC; border:#000000 1px dashed; width:100%;">
			<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
			<tr>
			<td align="center" valign="middle"><img src="./images/Aide.png" hspace="10" vspace="10" border="0" alt="VisualPreZZ" /></td>
			<td width="100%" align="center" valign="middle"><p>! --- ### ATTENTION ### --- !</p>
			<p>&quot; Vous avez specifié un mot clé incorrect , ou il n\'existe pas &quot;</p>
			<p>Veuillez retaper un mot clé svp ...</p>
			<p>( Redirection dans 6 secondes)</p></td>
			<td align="center" valign="middle"><img src="./images/Aide.png" hspace="10" vspace="10" border="0" alt="VisualPreZZ" /></td>
			</tr></table></div><br /><a href="?page=Clubic"><input name="manuel" value="manuel" type="hidden" /><img src="./images/err.png" title="Erreur de recherche" border="0" onmouseover="javascript:this.src=\'./images/err1.png\';" onmouseout="javascript:this.src=\'./images/err.png\';" alt="VisualPreZZ" /></a><br />
<script language="javascript" type="text/javascript">
//<![CDATA[
google_ad_client = "pub-5294692897836007";
google_ad_slot = "7634590533";
google_ad_width = "468";
google_ad_height = "60";
//]]>
</script>
<script language="JavaScript" type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></center>';
		}
	}


}
}else{
	echo '<meta http-equiv="refresh" content="0; url='.$PHP_SELF.'?page=Clubic" />';
	}
?>

</center>