1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
| <?php
$TITRE .= 'Derniers ajouts';
require_once 'haut.php'; if($is_include == true)
{
if(empty($_GET['nbre'])) $page = 0;
else $page = mysql_real_escape_string($_GET['nbre']);
$count_page = 2100; // 20 pages
$reponse = mysql_query('SELECT L.id,L.id_series,L.episode,L.lien,L.saison,L.langue,L.password,L.uploader,L.date, (SELECT S.principale FROM series S WHERE S.id = L.id_series) AS principale, (SELECT S.titre FROM series S WHERE S.id = L.id_series) AS titre, (SELECT S.apache FROM series S WHERE S.id = L.id_series) AS apache FROM liens_series L ORDER BY L.date DESC, L.id DESC, titre ASC, L.saison ASC, L.episode ASC LIMIT '.$page.',100');
echo '<div class="post post-top type-post hentry category-non-classe topPost">
<h2 class="topTitle">Derniers ajouts</h2>';
$arrondi = ceil($count_page / 100)-1;
$i = 0;
$abc = null;
while($i < $arrondi) { $abc .= '<a href="http://'.$_SERVER['HTTP_HOST'].'/derniers-ajouts-'.($i * 100).'.html">'.(((($i * 100) == $page) ? '<span style="color:white;">'.($i+1).'</span>' : ($i+1))).'</a> - '; $i++; }
$wxyz = 'Page : '.substr($abc,0,-2).'<br/>';
echo $wxyz;
$pageb = $page + 100;
$f = null;
$t = null;
$princip = array();
$ze = null;
echo '<p><b><i>Légende :</i></b> <span style="font-weight:bold;color:green;">récent (- 24h)</span> <span style="text-decoration:underline;">série populaire</span> </p>';
while($donnees = mysql_fetch_array($reponse))
{
if($f != $donnees['id_series'])
{
$ze .= '<br/><div class="arrondi" style="border:1px solid #333333;background:#333333;text-align:center;margin:auto;width:100%;font-family:arial">
<h3 style="font-family:Arial;font-size:14px;font-weight:bold;padding:5px;width:100%;margin:0px;"><a href="http://'.$_SERVER['HTTP_HOST'].'/'.EncodeUrl($donnees['apache']).'/" target="_blank">'.$donnees['titre'].'</a></h3></div>';
$f = $donnees['id_series'];
}
$langue = strtolower($donnees['langue']);
if($donnees['langue'] == 'VF') $donnees['langue'] = 'http://'.$_SERVER['HTTP_HOST'].'/images/fr.gif" title="VF" style="vertical-align:bottom;text-align:left;padding-left:10px;padding-right:10px;';
elseif($donnees['langue'] == 'VF/VOSTFR') $donnees['langue'] = 'http://'.$_SERVER['HTTP_HOST'].'/images/vfvo.gif" title="VF/VOSTFR" style="vertical-align:bottom;text-align:left;padding-left:10px;padding-right:10px;';
elseif($donnees['langue'] == 'VOSTFR') $donnees['langue'] = 'http://'.$_SERVER['HTTP_HOST'].'/images/vost.gif" title="VOSTFR" style="vertical-align:bottom;text-align:left;padding-left:10px;';
elseif($donnees['langue'] == 'VO') $donnees['langue'] = 'http://'.$_SERVER['HTTP_HOST'].'/images/en.gif" title="VO" style="vertical-align:bottom;text-align:left;padding-left:10px;padding-right:10px;';
$ze .= '<table style="width:100%;margin:auto;text-align:left;" style=""><tr class="gris">
<td width="300" style="vertical-align:middle;text-align:left;">
<img src="'.$donnees['langue'].'" align="absmiddle" />
<a href="http://'.$_SERVER['HTTP_HOST'].'/'.EncodeUrl($donnees['apache']).'/#s'.$donnees['saison'].'-'.$langue.'" class="info" style="'.(($donnees['principale'] == 'oui') ? 'text-decoration:underline;' : '').(((time() - 86400) < $donnees['date']) ? 'font-weight:bold;color:green;' : '').'">
Saison '.$donnees['saison'].' - Episode '.$donnees['episode'];
$ze .= '<span style="font-weight:normal;">par <i>'.$donnees['uploader'].'</i></span>';
if(!empty($_SESSION['pseudo'])) $ze .= '</a> <a href="'.$donnees['lien'].'"><i>'.$donnees['lien'].'</i></a>';
else $ze .= '</a> <a href="http://'.$_SERVER['HTTP_HOST'].'/link.php?id='.$donnees['id'].'"><i>http://'.$_SERVER['HTTP_HOST'].'/link.php?id='.$donnees['id'].'</i></a>';
if(!empty($donnees['password'])) $ze .= '<span style="color:red;padding-left:10px;"><b>Infos : </b> '.substr($donnees['password'],0,15).((strlen($donnees['password']) > 15) ? ' [...]' : '').'</span>';
$ze .= '</td></tr></table>';
}
mysql_free_result($reponse);
echo $ze.'<br/><br/>'.$wxyz;
echo '<div class="cleared"></div></div></div>';
require_once 'menu.php';
}
?> |
Partager