get_db($rub); # On vérifie les paramètres, ˆ tout hasard if ($categories->id == -1) { $rub = 1; $categories->get_db($rub); $page = 1; } # Les constantes $percolumn = 17 ; # 17 liens $nbcolumn = 3 ; # sur 3 colonnes $linksresults = $percolumn * $nbcolumn; $maxipages = 17; # Le nombre maximum de pages pour la barre de nav $current_color_page = sprintf("fond_%02d.gif", $current_page); $sql = "SELECT l.id, l.title FROM links_links as l, links_categories as c WHERE actif = 'Y' AND l.cid = c.id AND ( ((c.id = '". $rub ."') and (c.sid = 0)) OR ((c.sid = '". $rub ."')) ) ORDER BY c.sid, l.title "; $result = mysql_db_query($GLOBALS["dbname"], $sql ); $nrows = mysql_num_rows($result); $nbpages = ( $nrows / $linksresults) ; # Vérification du nombre de page... if ($page > ($nbpages +1)) $page = 1; $min = ($page * $linksresults) - $linksresults ; if (!isset($min)) $min=0; if (!isset($max)) $max=$min+$linksresults; $current_page = $page ; $cp = sprintf("%02d", ((($current_page -1) % 6) +1) ); $icono = "/Img_Links/Icono/". sprintf("%02d.gif", $rub) ; $resultbonus = mysql_db_query($GLOBALS["dbname"], $sql . " LIMIT ". (($min + ($percolumn * 3))-$linksresults) .", ". $linksresults); $bonus_keywords = ""; while ($r= mysql_fetch_array($resultbonus)) { $bonus_keywords.= ", ". $r["title"] ; } // print "WORK IN PROGRESS : ". $bonus_keywords ."
"; } ?> <? if ($categories->meta_title == '') { include ("links_titre.txt") ; } else { print $categories->meta_title ; } ?>

'; print "
"; print ""; print ""; print '
'; # Titre de la rubrique if ($categories->description != "") $rubrik = $categories->description; else $rubrik = $categories->title; print ""; print "
"; print '
'; print "
"; # Mise en place du nombre de page print ''; $imagename=86; for ($lespages = 1; $lespages <= ($nbpages + 1); $lespages++) { $curnum = sprintf ("%02d", $lespages); $curimagename = "Image". $imagename ; $imagename++; print ""; print ""; } print ""; print "
"; ?>


« (ALT+0180) mais peut s'étendre par la suite $valeur = ereg_replace ("'", "«", $valeur); $valeur = str_replace ("\"", '««', $valeur); $valeur = ereg_replace ("\r\n", " ", $valeur); $valeur = ereg_replace ("\n\r", " ", $valeur); $valeur = ereg_replace ("\r", " ", $valeur); $valeur = ereg_replace ("\n", " ", $valeur); $valeur = addslashes($valeur); return $valeur; } # On initialise a vide... for ($i = 1; $i <= $max; $i ++) $shout[$i] = "\"\""; $sql2 = "SELECT id FROM links_links WHERE actif = 'Y' AND cid = '". $rub ."' AND bestof = 'Y' "; $overlib = " TEXTCOLOR, '#666666', TEXTSIZE, 2, WIDTH, 519, HEIGHT, 33, BACKGROUND, '/img/overlib_01.gif', PADX, 50, 14, PADY, 20, 20) "; $overlib = " FIXY, '345', FIXX, '322') "; /* var ol_bgcolor = "#E5E5E5"; var ol_textcolor = "#666666"; var ol_capcolor = "#666666"; var ol_textfont = "Geneva, Arial, Helvetica, san-serif"; var ol_captionfont = "Geneva, Arial, Helvetica, san-serif"; var ol_textsize = "1"; var ol_captionsize = "2"; var ol_fixy = 322; var ol_fixx = 327; var ol_width = 430; var ol_height = 22; */ mysql_select_db ($GLOBALS["dbname"]) ; $bresult = mysql_query($sql2); $numrows = mysql_num_rows($bresult); $numrows = $numrows-1; mt_srand((double)microtime()*1000000); # Init du rand $hasard[] = ""; if ($numrows>=$max) { for ($i = 1; $i <= $max; $i ++) { $bannum = mt_rand(1, $numrows); while (in_array ($bannum, $hasard)) $bannum = mt_rand(1, $numrows); array_push ($hasard, $bannum); $trash = mysql_data_seek ($bresult, $bannum); $r2 = mysql_fetch_object ($bresult) ; $links2 = new links_links(); $links2->get_db($r2->id); if ($links2->description != "") { $shout[$i] = "id . " "; $shout[$i].= " onmouseover=\"changeIt('". class_rc_encode(first_only (150, $links2->description)) ."')\" "; $shout[$i].= " onMouseout=\"changeIt('')\" "; /* $shout[$i].= " onmouseover=\"return overlib('". class_rc_encode(first_only (150, $links2->description)) ."', ". $overlib .";\" "; $shout[$i].= " onmouseout=\"return nd();\" "; */ $shout[$i].= ' target='. $zetarget .'>'; } else { $shout[$i] = "id . " target=". $zetarget .">"; } $chemin = "Links/Img/" . $links2->id; if((file_exists($chemin.".jpg"))||(file_exists($chemin.".gif"))) { if(file_exists($chemin.".jpg")) { $shout[$i].= "\"".title) ."\">"; } else { $shout[$i].= "\"".title) ."\">"; } } else { $shout[$i].= "\"".title) ."\">"; } $shout[$i].= ""; } } ?>
" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image139','','/Img_Links/titre_shoutout_-02.gif',1)">






register

get_db($r["id"]); print " "; if ($links->description != "") { print "id . " "; # print " onmouseover=\"return overlib('". class_rc_encode(first_only (150, $links->description)) ."', ". $overlib .";\" onmouseout=\"return nd();\" "; print " onmouseover=\"changeIt('". class_rc_encode(first_only (150, $links->description)) ."')\" "; print " onMouseout=\"changeIt('')\" "; print ' target='. $zetarget .'>'; } else { print "id ."\" target=\"". $zetarget ."\">"; } print class_rc_encode($links->title) .""; # Test NEW / UPDT / Rien... $cejourunix = mktime(date("H"),date("i"),date("s"), date("m"), date("d"), date("Y")); $datecreation = datemysql2unix($links->date); $datemodifunix = datemysql2unix($links->date_modification); $diff_new = $cejourunix - $datecreation ; $diff_upt = $cejourunix - $datemodifunix ; $jours_update = 30 ; $limite_new = (86400 * $jours_update) ; # 86400 * XXX jours $limite_upt = (86400 * $jours_update) ; # 86400 * XXX jours if ($diff_new < $limite_new) { print "  \"Addeddate) ."\">
\n"; } elseif (($diff_upt < $limite_upt) and ($datemodifunix > $datecreation)) { print "  \"Updateddate) ."\">
\n"; } else { print "
"; } } if ($current_column < $nbcolumn) { ?>