<?php
// Xinfeng Chen, 2002.11.06
// require_once('base_array_file.php');
// require_once('class_forum_base.php');

class CMailbox extends CBaseArrayFile {
 var $id,$flag,$from,$to,$time,$content;

 function _explodeRecord($a_line){
  list($this->id,$this->flag,$this->from,$this->to,$this->time,$this->content)
   =explode(SP, $a_line);
 }

 function _composeRecord($a_line){
  $a_line=$this->id.SP.$this->flag.SP.$this->from.SP.$this->to.SP.$this->time.SP.$this->content;
 }

 function _compareRecord($a_key){ return ($a_key==$this->id); }

 function load($a_name){
  $fname=CForumBase::getFilePath('MAILBOX',$a_name);
  return $this->readFile($fname);
 }

 function store($a_name){
  $fname=CForumBase::getFilePath('MAILBOX',$a_name);
  return $this->writeFile($fname);
 }

 function destroy($a_name){
  $fname=CForumBase::getFilePath('MAILBOX',$a_name);
  return $this->destroyFile($fname);
 }

}
?>