Пример #1
0
 /** 
  * profile xml
  * @param	$u	username
  * @param	$wp	return whole page XML
  */
 function showProfile($u, $wp)
 {
     $fdb = new DbForum();
     $a = $this->_getUserInfo($u);
     $as = $fdb->getUserStat($u);
     $a['username'] = $u;
     $a['posts'] = (int) $as['posts'];
     $a['user_last_post'] = $as['user_last_post'];
     $a['last_online'] = $fdb->getUserLastOnlineTime($u);
     $p = array2xml($a);
     if ($wp) {
         $li = $this->_getLoginInfo();
         return $this->addHeaderFooter($li, "<profile>{$p}</profile>");
     } else {
         $cu = $this->getUrlsXml();
         return "<root>{$cu}<profile>{$p}</profile></root>";
     }
 }