<?php
//require_once("class_basic_record_file.php");

class CBookList extends CBasicRecordFile {
 var $name='',$pass='',$email='',$url='',$title='',$urlname='';
 var $regtime='',$htmlt='',$htmlb='',$desc='';

 function _explodeRecord($a_line){
  list($this->name,$this->pass,$this->email,$this->url,$this->title,$this->urlname,
       $this->regtime,$this->htmlt,$this->htmlb,$this->desc)
       = explode("\r",$a_line);
 }

 function _composeRecord($a_line){
  $a_line=$this->name."\r".$this->pass."\r".$this->email."\r".$this->url."\r".$this->title
    ."\r".$this->urlname."\r".$this->regtime."\r".$this->htmlt."\r".$this->htmlb."\r".$this->desc."\r";
 }

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

 function create(){
  global $filepath;
  return parent::createFile("$filepath/book.lst",256);  
 }

 function open(){
  global $filepath;
  return parent::open("$filepath/book.lst");  
 }

 function checkSystem(){
  global $filepath;

  if (!file_exists($filepath)) mkdir("$filepath",0777);
  if (!file_exists("$filepath/book.lst")){
    $this->create();
  }
 }
}

?>