prepare('SELECT en, hors_cat, groupe, nbsite, popularite, en_abs FROM categories WHERE id = :categorie'); $reponse->execute(array('categorie' => $c)); } catch (PDOException $e) { require($real.'/requires/php/PDOerror.php'); } while ($donnees = $reponse->fetch()) { $ifr = $donnees['en']; $hors = $donnees['hors_cat']; $groupe = $donnees['groupe']; $nbsc = $donnees['nbsite']; $popula = $donnees['popularite']; $nom_abs= $donnees['en_abs']; } $popula++; try { $reponse = $bdd->prepare('UPDATE categories SET popularite = :popularite WHERE id = :categorie'); $reponse->execute(array('popularite' => $popula, 'categorie' => $c )); } catch (PDOException $e) { require($real.'/requires/php/PDOerror.php'); } $ce_jour = date("j"); if ($ce_jour<6){ $ordre_affichage = 'cotation DESC'; }else{ $ordre_affichage = 'popularite DESC, cotation DESC'; } switch($hors) { case "members": $req_where = "etat='A' AND date_ajout <= '$tnow' AND members='y' ORDER BY ".$ordre_affichage.", titre ASC"; break; case "blog": $req_where = "etat='A' AND date_ajout <= '$tnow' AND blog='y' ORDER BY ".$ordre_affichage.", titre ASC"; break; case "webcam": $req_where = "etat='A' AND date_ajout <= '$tnow' AND webcam='y' ORDER BY ".$ordre_affichage.", titre ASC"; break; case "forums": $req_where = "etat='A' AND date_ajout <= '$tnow' AND forums='y' ORDER BY ".$ordre_affichage.", titre ASC"; break; case "shop_vet": $req_where = "etat='A' AND date_ajout <= '$tnow' AND shop_vet='y' ORDER BY ".$ordre_affichage.", titre ASC"; break; case "shop_shoe": $req_where = "etat='A' AND date_ajout <= '$tnow' AND shop_shoe='y' ORDER BY ".$ordre_affichage.", titre ASC"; break; case "shop_shoep": $req_where = "etat='A' AND date_ajout <= '$tnow' AND shop_shoep='y' ORDER BY ".$ordre_affichage.", titre ASC"; break; case "dvd": $req_where = "etat='A' AND date_ajout <= '$tnow' AND dvd='y' ORDER BY ".$ordre_affichage.", titre ASC"; break; case "chat": $req_where = "etat='A' AND date_ajout <= '$tnow' AND chat='y' ORDER BY ".$ordre_affichage.", titre ASC"; break; case "story": $req_where = "etat='A' AND date_ajout <= '$tnow' AND story='y' ORDER BY ".$ordre_affichage.", titre ASC"; break; case "close": $req_where = "etat='F' ORDER BY url ASC, titre ASC"; break; case "validation": $req_where = "etat='T' ORDER BY url ASC, titre ASC"; break; case "francais": $req_where = "etat='A' AND date_ajout <= '$tnow' AND lg_fr='y' ORDER BY ".$ordre_affichage.", titre ASC"; break; case "italien": $req_where = "etat='A' AND date_ajout <= '$tnow' AND lg_it='y' ORDER BY ".$ordre_affichage.", titre ASC"; break; case "espagnol": $req_where = "etat='A' AND date_ajout <= '$tnow' AND lg_sp='y' ORDER BY ".$ordre_affichage.", titre ASC"; break; case "allemand": $req_where = "etat='A' and date_ajout <= '$tnow' and lg_de='y' ORDER BY ".$ordre_affichage.", titre ASC"; break; case "chinois": $req_where = "etat='A' and date_ajout <= '$tnow' and lg_jp='y' ORDER BY ".$ordre_affichage.", titre ASC"; break; case "ppv": $req_where = "etat='A' and date_ajout <= '$tnow' and (ppv='1' or ppv='2') ORDER BY ".$ordre_affichage.", titre ASC"; break; default: //categorie classique $req_where = "etat='A' AND date_ajout <= '$tnow' AND (c1=$c or c2=$c or c3=$c) ORDER BY ".$ordre_affichage.", titre ASC "; } $req_sqlx = "SELECT id_site, titre, date_ajout, date_upd, etat, url, url_pub, c1, c2, c3, description_en, url_www, plus1 FROM sites WHERE ".$req_where; try { $reponse = $bdd->query('SELECT COUNT(id_site) FROM sites WHERE '.$req_where); } catch (PDOException $e) { require($real.'/requires/php/PDOerror.php'); } while ($donnees = $reponse->fetch()) { $nbpic = $donnees[0]; } $b=20; //bas $h=21; //haut $e=20; //page $ch=1; $h=$h+$e; if ($nbpic>$b){ $ch=2; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=3; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=4; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=5; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=6; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=7; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=8; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=9; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=10; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=11; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=12; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=13; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=14; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=15; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=16; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=17; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=18; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=19; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=20; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=21; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=22; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=23; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=24; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=25; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=26; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=27; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=28; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=29; } $b=$b+$e; $h=$h+$e; if ($nbpic>$b){ $ch=30; } if ($pg!=''){ $lim = ($pg-1)*$e; $limite = "limit $lim,$e"; }else{ $pg=1; $limite = "limit 0,$e"; } $req_sqlx .= " $limite"; ?> Category - <?php echo "$ifr - page $pg"; ?> - Ducks Feet Links

Category -

query($req_sqlx); } catch (PDOException $e) { require($real.'/requires/php/PDOerror.php'); } while ($donnees = $reponse->fetch()) { $id_site = $donnees['id_site']; $sname = $donnees['titre']; $date_ajout = $donnees['date_ajout']; $date_upd = $donnees['date_upd']; $etat = $donnees['etat']; $url = $donnees['url']; $url_pub = $donnees['url_pub']; $c1 = $donnees['c1']; $c2 = $donnees['c2']; $c3 = $donnees['c3']; $des_en = $donnees['description_en']; $url_www = $donnees['url_www']; $plus1 = $donnees['plus1']; /* if ($url_pub != '') { $iurl = $url_pub; $iurl = str_replace('&','&',$iurl); }else{ $iurl = $url; } */ $new_img = ''; if ($date_ajout >= $new_date){ $new_img = ' new'; } if ($date_upd >= $new_date){ $new_img = ' new'; } if ($plus1 == 'y'){ $new_img = ' new'; } $url_image = $url; //retirer le http:// $nbc = strlen($url_image); $url_image = substr($url_image,7,$nbc); //retirer le www. $nbc = strlen($url_image); $www = substr($url_image,0,4); if ($www=='www.') { $url_image = substr($url_image,4,$nbc); } $url_image = str_replace('.','-',"$url_image"); $url_image = str_replace('/','-',"$url_image"); $url_image = str_replace('~','-',"$url_image"); ?>