Public feed #887585

Untitled

public php v1 · immutable
Raw Edit
·published 2008-02-01 13:05 UTC
rendered paste body
	function draw_cats() {		echo '<div class="mlmenu vertical blackwhite"><ul>';		for($i=1;$i<=count($this->cats);$i++) {			echo '<li><a style="padding-left:20px; font-weight:bold;" href="javascript:;">'.$this->cats[$i].'</a>';			$data=$this->query("select * from sport_main_cat where mother='$i' and active='1' order by id asc");			if($data->num_rows >0) {				echo '<ul>';				while($main=$data->fetch_object()) {					echo '<li style="z-index: '.(100000*$i).'"><a href="javascript:;">'.$main->name.'</a>';						$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 '<ul>';							while($sub=$data2->fetch_object()) {								echo '<li><a href="javascript:;">'.$sub->name.'</a>';									$data3=$this->query("select * from sport_stage where mother='$sub->id' and active='1' order by id asc");									if($data3->num_rows >0) {										echo '<ul>';										while($stage=$data3->fetch_object()) {											echo '<li><a href="javascript:;" onclick="show_page(\'content\',\'sports&amp;subcatid='.$stage->id.'&amp;galpage=1\',\'Sports :: '.htmlspecialchars($sub->name).'\');">'.$stage->name.'</a>';											echo '</li>';										}										echo '</ul>';									}								echo '</li>';							}							echo '</ul>';						}					echo '</li>';				}				echo '</ul>';			}			echo '</li>';		}		echo '</ul></div>';	}