Пример #1
0
 /**
  * delete forum
  *	@param $forum_id	forum id
  *	@param return		xml (<ret>0</ret>|<ret>1</ret>)
  */
 function deleteForum($forum_id)
 {
     if (!$this->_admin) {
         return '<ret>0</ret>';
     }
     $db = new DbAdmin();
     $cat_id = $db->getCatIdByForumId($forum_id);
     if ($db->deleteForumAll((int) $forum_id)) {
         return '<ret>' . $cat_id . '</ret>';
     } else {
         return '<ret>0</ret>';
     }
 }