Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

base-forum-threads.inc.php

Go to the documentation of this file.
00001 <?
00008 class BaseForumThreads extends MyManager
00009 {
00013     public function __construct($class = 'Thread')
00014     {
00015         parent::__construct($class, 30);
00016     }
00017     
00021     public function getSearchParamXml()
00022     {
00023         $xml = parent::getSearchParamXml();
00024 
00025         $xml .= '<param name="forum_id" type="int" />';
00026 
00027         return $xml;
00028     }
00029 
00033     public function getSearchWhere($params)
00034     {
00035         $sql = parent::getSearchWhere($params);
00036 
00037         if ($params['forum_id'])
00038             $sql .= " AND forum_id = '$params[forum_id]' ";
00039 
00040         return $sql;
00041     }
00042 
00046     public function getSearchOrder($params)
00047     {
00048         if (!$params['sort'])
00049         {
00050             $params['sort'] = 'edit_date';
00051             $params['order'] = 'desc';
00052         }
00053         return parent::getSearchOrder($params);
00054     }
00055 
00059     public function drawRows($rs)
00060     {
00061         if (count($rs))
00062         {
00063             echo "<table class=\"forumThreads\">";
00064             $this->object->drawHeaderRow();
00065 
00066             foreach ($rs AS $obj)
00067                 $obj->drawRow();
00068             
00069             echo "</table>";
00070         }
00071         else
00072             echo "<p>No threads found.";
00073     }
00074 }
00075 ?>

Generated on Fri Oct 27 12:26:40 2006 for BaseJumper by doxygen 1.3.9.1