error_reporting(0);
$u="kx";
$pas="kx";
$h="localhost";
$db="kxfo";
$con=mysql_connect ($h, $u, $pas);
mysql_select_db ($db);
$show_fo_per_page = 7;
$br=0;
$q = mysql_query("SELECT COUNT(*) FROM fo where br_vizit > $br ");
$pages_count = mysql_result($q, 0);
$x = $pages_count/$show_fo_per_page;
$y = sprintf("%3d", $x);
$pages_count = $y;
if (($x - $y) > 0){
$y++;
$pages_count = $y;
}
$cur_page = round($_GET['p']);
if (($cur_page < 0) || ($cur_page > $pages_count)) {
$cur_page = 0;
}
?>
�����
|
���� � �������� ����� ��� ������� |
$start = $cur_page*$show_fo_per_page;
?>
�� |
�������� |
���� |
�������� |
��������� |
$r= mysql_db_query ($db, "select * from fo WHERE br_vizit > $br ORDER BY `br_vizit` DESC LIMIT $start, $show_fo_per_page ");
while ($z = mysql_fetch_row ($r)){
$i=$z[0];
$t = mysql_query("select sum(br) from post where fo_id = '$i'");
$a = mysql_result ($t, 0);
$brv=$z[5] ;
if (($brv > $br) and ( $a > $br)) {
?>
print (" $z[1]"); ?> |
print (" $z[2]"); ?> |
print (" $z[4]"); ?> |
/* $i=$z[0];
$t = mysql_query("select sum(br) from post where fo_id = '$i' ");
$a = mysql_result ($t, 0);
*/
?>
print ($a);?>
�� |
print (" $z[5]"); ?> ���� |
|
|
|
|
|
}
}
?>
������� |
if ($cur_page > 0) {
print(" [<<] ");
}
for ($i = 0; $i < $pages_count; $i++) {
if ($i == $cur_page) {
print(" [".($i+1)."] ");
} else {
print(" [".($i+1)."] ");
}
}
if ($cur_page < ($pages_count-1)) {
print(" [>>] ");
}
?>
|
|