Beispiel #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 || 0 != strcasecmp($_SERVER['REQUEST_METHOD'], 'POST')) {
         return '<ret>0</ret>';
     }
     $db = new DbAdmin();
     $cat = $db->getCatByForumId($forum_id);
     if ($db->deleteForumAll((int) $forum_id)) {
         return '<root><cat_uri>' . $cat['cat_uri'] . '</cat_uri><cat_id>' . $cat['cat_id'] . '</cat_id></root>';
     } else {
         return '<root><cat_id>0</cat_id></root>';
     }
 }
 /**
  * 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 = $db->getCatByForumId($forum_id);
     if ($db->deleteForumAll((int) $forum_id)) {
         return '<root><cat_uri>' . $cat['cat_uri'] . '</cat_uri><cat_id>' . $cat['cat_id'] . '</cat_id></root>';
     } else {
         return '<root><cat_id>0</cat_id></root>';
     }
 }