list_Array= array(); $this->listname = $listname; $this->style_link = $style1; $this->style_subtext = $style2; $this->num_to_display = $x; $this->style_linkpad = $pad1; $this->style_subpad = $pad2; $this->path = $path; $this->read_list(); } function build_Display() { echo ''; foreach ($this->list_Array as $index => $news) { if (trim($news[0]) != '') { // if the title text area is blank, then dont display anything if (trim($news[1]) != '') echo ''; //echo '
'; } } echo '
'.$this->style_linkpad.' '.$news[0].''; else echo '
'.$this->style_linkpad.''.$news[0].''; if (trim($news[2]) != '') { //$wrapped = $this->style_subpad.wordwrap($news[2],25,'
'.$this->style_subpad); echo '
style_subtext.'>'.$news[2].'
'; } else echo '
'; echo '
'; } function read_List() { if (file_exists($this->path.$this->listname.'.txt')) { $filestring=file_get_contents($this->path.$this->listname.'.txt'); $fileArray = preg_split("/\r|\n/",trim($filestring)); } else { $fileArray[0] = "::::";$fileArray[1] = "::::";$fileArray[2] = "::::";$fileArray[3] = "::::";$fileArray[4] = "::::"; } if ($this->num_to_display != 'all') $fileArray = array_slice($fileArray, 0, $this->num_to_display); foreach($fileArray as $k => $y) { if ($fileArray[$k] != '') { $fileArrayTemp= split("::",$fileArray[$k]); $this->list_Array[] = $fileArrayTemp; } } } function getList() { return $this->list_Array; } } ?> the Beat Broker - DJ set at Public Works SF April 2011