예제 #1
0
 function getBlockCode_ShortIndex()
 {
     global $gConf;
     $s = '<div class="forums_index_short">';
     $ac = $GLOBALS['f']->fdb->getCategs();
     foreach ($ac as $c) {
         $s .= '<div class="forums_index_short_cat bx-def-font-large"><a href="' . $gConf['url']['base'] . sprintf($gConf['rewrite']['cat'], $c['cat_uri'], 0) . '" onclick="return f.selectForumIndex(\'' . $c['cat_uri'] . '\')">' . $c['cat_name'] . '</a></div>';
         $af = $GLOBALS['f']->fdb->getForumsByCatUri(filter_to_db($c['cat_uri']));
         foreach ($af as $ff) {
             $s .= '<div class="forums_index_short_forum bx-def-padding-sec-left"><a href="' . $gConf['url']['base'] . sprintf($gConf['rewrite']['forum'], $ff['forum_uri'], 0) . '" onclick="return f.selectForum(\'' . $ff['forum_uri'] . '\', 0)">' . $ff['forum_title'] . '</a></div>';
         }
     }
     $s .= '</div>';
     return array($s);
 }
예제 #2
0
 /**
  * profile xml
  *
  * @param    $u     username
  * @param    $wp    return whole page XML
  */
 function showProfile($u, $wp)
 {
     $a = $this->_getUserInfo($u);
     $as = $this->fdb->getUserStat(filter_to_db($u));
     $a['username'] = $u;
     $a['posts'] = (int) $as['posts'];
     $a['user_last_post'] = orca_format_date($as['user_last_post']);
     $a['last_online'] = orca_format_date($this->fdb->getUserLastOnlineTime(filter_to_db($u)));
     encode_post_text($as['role']);
     $a['role'] = $as['role'];
     $p = array2xml($a);
     if ($wp) {
         if ($a) {
             $this->setTitle("<![CDATA[{$u}]]>");
         }
         $li = $this->_getLoginInfo();
         return $this->addHeaderFooter($li, "<profile>{$p}</profile>");
     } else {
         $cu = $this->getUrlsXml();
         return "<root>{$cu}<profile>{$p}</profile></root>";
     }
 }
예제 #3
0
 function _checkUniqEmail($s)
 {
     $db = new DbLogin();
     return $db->getUserByEmail(filter_to_db($s)) == $s ? false : true;
 }