list[sizeof($this->list)]=array($what,$who); } function random() { $rnd=mt_rand(0,sizeof($this->list)-1); return "

".$this->list[$rnd][0]."

\n

- ".$this->list[$rnd][1]."

"; } } $type=0; class linksarray { private $list=array(); private $cats=array(); private $type; function linksarray() { global $type; $this->type=$type; $type++; } function add($page) { $this->list[sizeof($this->list)]=$page; } function cat($title) { $this->cats[sizeof($this->cats)]=array($title,sizeof($this->list)); } function size() { return sizeof($this->list); } function generate($split="") { global $pagetype,$pagesite,$title; $list_size=sizeof($this->list); $cats_size=sizeof($this->cats); $current_cat=0; $output=""; $i=array(); for ($i[0]=0;$i[0]<$list_size;$i[0]++) { for ($i[1]=$current_cat;$i[1]<$cats_size;$i[1]++) { if ($this->cats[$i[1]][1]==$i[0]) $output.="\n
".$this->cats[$i[1]][0]."
\n"; } if ($pagetype==$this->type && $pagesite==$i[0]) { $container[0]="
"; $container[1]="
"; $title=$this->list[$i[0]]; } else { if ($this->type==0 && $i[0]==0) $link="."; else $link="?t=".$this->type."&s=".$i[0]; $container[0]=""; $container[1]=""; } $output.=$container[0].$this->list[$i[0]].$container[1]."\n".$split; } return $output; } } ?>