Hi All
i have script in my site http://www.tarae3o.com
i want change my page numbers view
see this pic .
i want to do it same as this pic .
haw can me make this change in my site , i don't good in php language
this is my index code
Code:
<?
include "head1.php"?>
<?
include "config.php"?>
<title><?
echo "$site_title , $site_desc"?></title>
<META name="keywords" content="<?
echo "$site_keywords"?>">
<META NAME="description" content="<?
echo "$site_content"?>">
<?
include "head.php"?>
<tr>
<td>
<div id="content">
<p align="center"><iframe name="I1" src="http://www.tarae3o.com/a.php" width="800" height="35" scrolling="no" align="top" border="0" frameborder="0">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe><br></p>
<?
if (! isset ( $_GET ['page'] )) {
$page = "1";
} else {
$page = $_GET ['page'];
}
$from = ($page * $max) - $max;
$query_all = mysql_query ( "select * from `topics` order by `id` DESC limit $from,$max " );
$query_n = mysql_query ( "select * from `topics`" );
$ggg_2 = mysql_num_rows ( $query_n );
$pppp = ceil ( $ggg_2 / $max );
while ( $result_all = mysql_fetch_array ( $query_all ) ) {
$string = "$result_all[name]";
$patterns [0] = '/ /';
$replacements [2] = '-';
$new_topic_name = preg_replace ( $patterns, $replacements, $string );
$query_in_cat = mysql_query ( "select * from `cats` where `id`=$result_all[in_cat] " );
$result_in_cat = mysql_fetch_array ( $query_in_cat );
echo "
<div id='topic'>
<a href='$site_url/$result_in_cat[link]/t$result_all[id]/$new_topic_name.html' title='$result_all[name]'alt='$result_all[name]'><h1>$result_all[name]</h1></a>
<a href='$site_url/go.php?id=$result_all[id]'><img width='250' height='200' border='0' src='$result_all[image]' title='$result_all[name]'alt='$result_all[name]'></a>
<p>$result_all[description]</p>
<div class='url'><a href='$site_url/go.php?id=$result_all[id]' title='$result_all[name]'alt='$result_all[name]'><b>$result_in_cat[name]</b> -التحميل: $result_all[clicks] مرة</a></div>
</div>
";
}
?>
</div>
<div class="pagi">
<?
$sabeq = $page - 1;
$taly = $page + 1;
if ($page > 1) {
echo " <a class='paginate' href='$site_url/p$sabeq'> « السابق </a> ";
}
?>
<?
$nh = 1;
while ( $nh <= $pppp ) {
$dddd = $nh;
if ($dddd == $page) {
echo "<span class='current'> $dddd </span> ";
} else {
echo "<a class='paginate' href='$site_url/p$dddd'> $dddd </a> ";
}
$nh ++;
}
?>
<?
if ($page < $pppp) {
echo " <a class='paginate' href='$site_url/p$taly'> التالي» </a> ";
}
?>
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td></td>
</tr>
</table>
<?
include "footer.php"
?>
i wait your comments ..
thanks ..
|