Bonjour voila j´ai cree un top site mais enfaite il n´a pas de limite donc les site von saficheé infiniment je vourdrai que par exemple au 20 eme ou au 25 eme qu´il le mettent sur une nouvelle page et pas comme cela
SITE 1
SITE 2
3
4
5
6
...
999
Donc voila merci pour vos reponce ^^ (I´M NOOB !)
voila mon code pour l´instant
<?php
?>
<TITLE>TOP-Blog</TITLE>
<?php
include "./inc/header.php";
include "./inc/template.php";
$act = $_GET[´act´];
if ( $u != "" ) {
if ( file_exists( "./sites/session/$u.session.php" ) ){
include "./sites/session/$u.session.php";
include "./sites/$u.php";
if ( $s == $session ) {
$home = "index.php?u=$u&s=$s";
$link = "db.php?u=$u&s=$session";
$reg = "Register";
$reg_link = "?act=reg&u=$u&s=$session";
$log = "Logout";
$log_link = "?act=logout&u=$u&s=$session";
$con_link = "contact.php?u=$u&s=$session";
$rMsg = "Return to <a href=´?u=$u&s=$session´>Members´ Area</a>";
} else {
print "<script>
window.location=´index.php´;
</script>";
}
} else {
print "<script>
window.location=´index.php´;
</script>";
}
} else {
$home = "index.php";
$page_title = "Error";
$sub_title = "Error found while trying to access Members´ Area";
$link = "db.php";
$reg = "Register";
$reg_link = "reg.php";
$log = "Login";
$log_link = "login.php";
$con_link = "contact.php";
}
if ( $act == "dbcheck" ) {
if ( file_exists( "regKey.php" ) ) {
include "regKey.php";
}
}
?>
<tr style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
<td class="subbar" align="left" background="./img/subbar_bg.gif" valign="middle" colSpan="2" height="28" width="748">
<p align="center"> <?php nav( "Home", "$home", "$reg", "$reg_link", "$log", "$log_link", "Members Area", "$link", "Contact", "$con_link" ); ?>
</td>
</tr>
</table>
<?php body( " <br>Bonjour et bienvenue sur TOP-Blog, le classement des meilleurs blogs francophones. <br>Venez vous inscrire en cliquant <a href=´reg.php´>ici</a><br>" );
if ( file_exists( "regKey.php" && act == "dbcheck" ) ) {
$reg = explode( "-", $regKey );
$regKey = "<b>Registered to:</b> ".base64_decode( $reg[0] ).", ".base64_decode( $reg[1] );
}
?>
<table cellSpacing="0" cellPadding="4" width="100%" align="center" border="0" style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
<tr style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
<td vAlign="bottom" align="left" style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
</td>
<td vAlign="bottom" align="right" style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
</td>
</tr>
</table>
<!-- Start Top Bar -->
<table cellSpacing="0" cellPadding="0" width="100%" align="center" border="0" style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
<tr style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
<td class="topbar" align="left" width="30" height="30"><img src=´./img/topbar_left.gif´></td>
<td class="topbar" align="left" height="30" background="./img/topbar_bg.gif">Le Top !< /td>
<td class="topbar" align="right" width="150" height="30" background="./img/topbar_bg.gif"> </td>
</tr>
</table>
<!-- End Top Bar -->
<?php
$dir = "./sites/hitz";
$verDir = "./sites/verify";
$dh = opendir( $dir ) or die( "Cannot open site directory" );
$total = 0;
while ( ! ( ( $file = readdir ( $dh ) ) === false ) ) {
if ( is_dir( $dir."/".$file ) ){
print "";
} else {
$verFile = $file;
$verFile = str_replace( ".txt", ".ver", $verFile );
if ( !f ile_exists( "$verDir/$verFile" ) ) {
// RATING
$fp = fopen( $dir."/".$file, "r" );
$voteData = fread( $fp, 1024 );
fclose( $fp );
// TOTAL VOTES
$fp = fopen( "./sites/totalz/".$file, "r" );
$totalz = fread( $fp, 1024 );
fclose( $fp );
$total++;
$file = str_replace( ".txt", "", $file );
@$newRating = $voteData/$totalz;
$newRating = sprintf ( "%.2f", $newRating );
$vote[$file] = $newRating;
}
}
}
function compare( $a, $b){
if ( $a[´$val´] < $b[´$val´] )
return 0;
if ( $a[´$val´] > $b[´$val´] )
return -1;
return 1;
}
@arsort ( $vote );
$place = 1;
if ( $total != 0 ) {
?>
<!-- Start Sub Bar -->
<table cellSpacing="0" cellPadding="0" width="100%" align="center" border="0" style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
<tr style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
<td class="subbar" width="30" height="28"
background="./img/subbar_bg.gif"> Position</t
d>
<td class="subbar" width="100%" height="28">
<table cellSpacing="0" cellPadding="4" width="100%" align="center" border="0" style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
<tr style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
<td class="subbar" align="left" width="55%" height="28" background="./img/subbar_bg.gif"> </td>
<td class="subbar" align="middle" width="10%" height="28" background="./img/subbar_bg.gif">Note</td>
<td class="subbar" align="middle" width="10%" height="28" background="./img/subbar_bg.gif">Visiter</td>
<td class="subbar" align="left" width="27%" height="28" background="./img/subbar_bg.gif">
<p align="center">Autres informations</td>
</tr>
</table>
</td>
</tr>
<?php
foreach( $vote as $key => $val ) {
// Cut down to top 10 only!
if ( $place <=9999999 ) {
include "./sites/".$key.".php";
$newKey = base64_encode( $key );
$fp = fopen( "./sites/clickz/".$key.".txt", "r" );
$clickz = fread( $fp, 1024 );
fclose ( $fp );
$fp = fopen( "./sites/totalz/".$key.".txt", "r" );
$totalz = fread( $fp, 1024 );
fclose( $fp );
$val1 = $val;
if ( $val > "4.49" ) {
$val = " <img src=´./img/star.gif´><img src=´./img/star.gif´><img src=´./img/star.gif´><img src=´./img/star.gif´><img src=´./img/star.gif´>";
} elseif ( $val > "4.35" && $val <= "4.49" ) {
$val = " <img src=´./img/star.gif´><img src=´./img/star.gif´><img src=´./img/star.gif´><img src=´./img/star.gif´><img src=´./img/star_h.gif´>";
} elseif ( $val > "3.99" && $val <= "4.35" ) {
$val = " <img src=´./img/star.gif´><img src=´./img/star.gif´><img src=´./img/star.gif´><img src=´./img/star.gif´>";
} elseif ( $val > "3.49" && $val <= "3.99" ) {
$val = " <img src=´./img/star.gif´><img src=´./img/star.gif´><img src=´./img/star.gif´><img src=´./img/star_h.gif´>";
} elseif ( $val > "2.99" && $val <= "3.49" ) {
$val = " <img src=´./img/star.gif´><img src=´./img/star.gif´><img src=´./img/star.gif´>";
} elseif ( $val > "2.49" && $val <= "2.99" ) {
$val = " <img src=´./img/star.gif´><img src=´./img/star.gif´><img src=´./img/star_h.gif´>";
} elseif ( $val > "1.99" && $val <= "2.49" ) {
$val = " <img src=´./img/star.gif´><img src=´./img/star.gif´>";
} elseif ( $val > "1.49" && $val <= "1.99" ) {
$val = " <img src=´./img/star.gif´><img src=´./img/star_h.gif´>";
} elseif ( $val > "0.99" && $val < "1.49" ) {
$val = " <img src=´./img/star.gif´>";
} elseif ( $val > "0.49" && $val <= "0.99" ) {
$val = " <img src=´./img/star_h.gif´>";
} else {
$val = "<i>Not rated yet!</i>";
}
?>
<!-- Forum 1 entry -->
<tr style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
<td class="forum1" vAlign="center" align="middle" width="30"><?php print "$place"; ?> </td>
<td class="forum1" vAlign="top" align="left">
<table cellSpacing="0" cellPadding="4" width="100%" align="center" border="0" style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
<tr style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
<td class="forum1" vAlign="center" align="left" width="55%"><?php print "$key :: <a href=´click.php?u=$newKey´ target=´_blank´>$url</a>"; ?> </td>
<td class="forum1" vAlign="center" align="middle" width="10%">[ <?php print "<a href=´vote.php?u=$newKey´ target=´_blank´>Vote</a>"; ?> ]</td>
<td class="forum1" vAlign="center" align="middle" width="10%">[ <?php print "<a href=´click.php?u=$newKey´ target=´_blank´>Visit</a>"; ?> ]</td>
<td class="forum1" vAlign="center" align="left" width="27%"><?php print "<b>Rating:</B> $val1 $val<br><b>Clicks to site:</b> $clickz<br><b>Total Votes:</b> $totalz"; ?> </td>
</tr>
</table>
</td>
</tr>
<?php
$place++;
}
}
echo pages(nb,$debut,20);$total_msg = "<b>Total Sites:</b> $total ";
} else {
?>
<!-- Start Sub Bar -->
<table cellSpacing="0" cellPadding="0" width="100%" align="center" border="0" style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
<tr style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
<td class="subbar" width="30" height="28" background="./img/subbar_bg.gif">Position</td>
<td class="subbar" width="100%" height="28">
<table cellSpacing="0" cellPadding="4" width="100%" align="center" border="0" style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
<tr style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
<td class="subbar" align="left" width="59%" height="28" background="./img/subbar_bg.gif"> </td>
<td class="subbar" align="middle" width="7%" height="28" background="./img/subbar_bg.gif">Note</td>
<td class="subbar" align="middle" width="7%" height="28" background="./img/subbar_bg.gif">Visiter</td>
<td class="subbar" align="left" width="27%" height="28" background="./img/subbar_bg.gif">
<p align="center">Autres informations</td>
</tr>
</table>
</td>
</tr>
<!-- Forum 1 entry -->
<tr style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
<td class="forum1" vAlign="center" align="middle" width="30"></td>
<td class="forum1" vAlign="top" align="left">
<table cellSpacing="0" cellPadding="4" width="100%" align="center" border="0" style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
<tr style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
<td class="forum1" vAlign="center" align="left" width="59%"><?php error( "<br>No site information found. Register your site now!<br><br>" ); ?> </td>
<td class="forum1" vAlign="center" align="middle" width="7%"></td>
<td class="forum1" vAlign="center" align="middle" width="7%"></td>
<td class="forum1" vAlign="center" align="left" width="27%"></td>
</tr>
</table>
</td>
</tr>
<?php
}
}
$texte .= "</p>";
return $texte;
}
?>
<!-- End of Forum 1 entry -->
</table>
<table cellSpacing="0" cellPadding="0" width="100%" align="center" border="0" style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
<tr style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
<td class="subbar" align="right" height="28" background="./img/subbar_bg.gif"><?php print $total_msg; ?> </td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<table cellSpacing="0" cellPadding="3" width="80%" align="center" style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
<tr style="font-family: Verdana, Tahoma, Arial; font-size: 8pt; color: #333333">
<td class="copyright" vAlign="center" align="middle">
<?php
include "./inc/footer.php";
print "$regKey";
?>
</td>
</tr>
</table>