s_summary = ""; $this->a_entries = array(); $this->cols = 0; } function setHeight($h){ $this->height=$h; } function AddEntry($a_entriedata) { $this->a_entries[] = $a_entriedata; } function DrawList(){ $s_return = ""; $s_return .= "
\n"; $s_return .= "
height.";width:100%\">\n"; $s_return .= "
height)."px;\">\n"; $s_return .= "\n"; $s_return.=$this->_generatePage(); $s_return.= "
"; return ($s_return); } function _numentries(){ $cnt = count($this->a_entries); return $cnt; } function SetSummary($msg){ $this->s_summary = $msg; } function _generatePage(){ $s_value = ""; $s_key = ""; $s_return = ""; $i_alternate=0; $str = ""; /* If divlist is empty, append a single white entry */ if(count($this->a_entries)==0){ $str.=" "; return($str); } $i = $this->_numEntries(); foreach($this->a_entries as $s_key => $s_value){ $i--; if($i_alternate!=0){ $i_alternate=0; } else { $i_alternate=1; } $s_return .= "\n"; $cnt = 0; foreach($s_value as $s_key2 => $s_value2 ){ $this->cols = count($s_value) ; $cnt++; if(!isset($s_value2['class'])){ $class = "list".$i_alternate; } else { $class = $s_value2['class']; } if(!isset($s_value2['attach'])){ $style = ""; } else { $style = " ".$s_value2['attach']." " ; } $s_return .= "\n"; $s_return .= $s_value2['string']; $s_return .= ""; } $s_return.="\n"; } $s_return.="\n"; for($i = 0 ; $i < ($this->cols) ; $i ++){ if($i >= ($this->cols-1)){ $s_return .= "
 
"; }else{ $s_return .= "
 
"; } } $s_return.=""; return $s_return; } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?>