<?php
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/user.php';
$set['title']='Кактусомания';
include_once '../sys/inc/thead.php';
title();
aut();

if(!isset($user)){
  header("Location:/index.php");
  break;
}
$kaktuz_kol=mysql_result(mysql_query("SELECT COUNT(*) FROM `kaktuz`"),0);
$k_page=k_page($kaktuz_kol,10);
$page=page($k_page);
$start=10*$page-10;
$all_kaktuz=mysql_query("SELECT * FROM `kaktuz` ORDER BY `rost` DESC LIMIT $start,10");
while($arr=mysql_fetch_array($all_kaktuz)){
echo "Хозяин : <a href='/info.php?id=".$arr['id_u']."'>".mysql_result(mysql_query("SELECT `nick` FROM `user` WHERE `id`='".$arr['id_u']."'"),0)."</a><br/>
Рост : ".$arr['rost']." cм<br/>";
echo "Стоимость : ".intval($arr['rost']*5)." балла<br/>[<a href='kaktuz.php?id=".$arr['id']."'>посмотреть кактус</a>]<hr/>";
}
if($k_page>1)str('?',$k_page,$page);

echo "<div class='aut'><a href='index.php'>Назад</a></div>";



include_once '../sys/inc/tfoot.php';
?>