'.$this->cats[$i].'';
$data=$this->query("select * from sport_main_cat where mother='$i' and active='1' order by id asc");
if($data->num_rows >0) {
echo '
';
while($main=$data->fetch_object()) {
echo '
'.$main->name.'';
$data2=$this->query("select * from sport_sub_cat where mother='$main->id' and active='1' order by id asc");
if($data2->num_rows >0) {
echo '
';
while($sub=$data2->fetch_object()) {
echo '
'.$sub->name.'';
$data3=$this->query("select * from sport_stage where mother='$sub->id' and active='1' order by id asc");
if($data3->num_rows >0) {
echo '