| <?php |
| |
| class MailingLists { |
| var $_mailinglists; |
| |
| function MailingLists(){ |
| $this->_mailinglists = Array(); |
| } |
| |
| function setMailingLists($mailinglists){ |
| $elements = explode(",",$mailinglists); |
| while(count($elements)){ |
| $element = array_pop($elements); |
| if ($element != "") |
| array_push($this->_mailinglists,$element); |
| } |
| } |
| |
| function getMailingLists(){ |
| return $this->_mailinglists; |
| } |
| |
| function numberOfMailingLists(){ |
| return count($this->_mailinglists); |
| } |
| |
| function mailingListAt($position){ |
| return $this->_mailinglists[$position]; |
| } |
| |
| function findMailingList($mailinglistname){ |
| $num = $this->numberOfMailingLists(); |
| for($i=0;$i<$num;$i++) |
| if ($this->mailingListAt($i) == $mailinglistname) |
| return 1; |
| |
| return 0; |
| } |
| |
| } |
| |
| ?> |