<?php
// Xinfeng Chen, 2002.11.07
// require_once('base_index_file.php');
// require_once('class_forum_base.php');

class CTopicIndex extends CBaseIndexFile {
 var $bid;

 function open($a_bid, $a_idx=0){
  $fname=CForumBase::getFilePath('TINDEX',$a_bid);
  if($this->openFile($fname)){
   $this->bid=$a_bid; $this->selectIndex($a_idx);
   return true;
  }else{
   return false;
  }
 }

 function close(){
  if($this->bid!=''){$this->closeFile();}
 }

 function activateTopic($a_refid){
  return $this->setLinkAfter($a_refid,0);
 }

 function deleteTopic($a_refid){
  return $this->removeLink($a_refid);
 }

 function locateTopic($a_refid){
  return $this->setRecord($a_refid);
 }

}
?>