コード例 #1
0
ファイル: post.php プロジェクト: kaantunc/MYK-BOR
/**
 * Checks if a user has postpermission in given thread
 * @param database object
 * @param int
 * @param int
 * @param boolean
 * @param boolean
 */
function hasPostPermission($kunena_db, $catid, $id, $userid, $pubwrite, $ismod)
{
    $fbConfig =& CKunenaConfig::getInstance();
    $topicLock = 0;
    if ($id != 0) {
        $kunena_db->setQuery("SELECT thread FROM #__fb_messages WHERE id='{$id}'");
        $topicID = $kunena_db->loadResult();
        $lockedWhat = _GEN_TOPIC;
        if ($topicID != 0) {
            $sql = "SELECT locked FROM #__fb_messages WHERE id='{$topicID}'";
        } else {
            $sql = "SELECT locked FROM #__fb_messages WHERE id='{$id}'";
        }
        $kunena_db->setQuery($sql);
        $topicLock = $kunena_db->loadResult();
    }
    if ($topicLock == 0) {
        //topic not locked; check if forum is locked
        $kunena_db->setQuery("SELECT locked FROM #__fb_categories WHERE id='{$catid}'");
        $topicLock = $kunena_db->loadResult();
        $lockedWhat = _GEN_FORUM;
    }
    if (($userid != 0 || $pubwrite) && ($topicLock == 0 || $ismod)) {
        return 1;
    } else {
        //user is not allowed to write a post
        if ($topicLock) {
            echo "<p align=\"center\">{$lockedWhat} " . _POST_LOCKED . "<br />";
            echo _POST_NO_NEW . "<br /><br /></p>";
        } else {
            echo "<p align=\"center\">";
            echo _POST_NO_PUBACCESS1 . "<br />";
            echo _POST_NO_PUBACCESS2 . "<br /><br />";
            if ($fbConfig->fb_profile == 'cb') {
                echo '<a href="' . CKunenaCBProfile::getRegisterURL() . '">' . _POST_NO_PUBACCESS3 . '</a><br /></p>';
            } else {
                echo '<a href="' . JRoute::_('index.php?option=com_registration&amp;task=register') . '">' . _POST_NO_PUBACCESS3 . '</a><br /></p>';
            }
        }
        return 0;
    }
}
コード例 #2
0
ファイル: userlist.php プロジェクト: kaantunc/MYK-BOR
    function showlist($ulrows, $total_results, $pageNav, $limitstart, $query_ext, $search = "")
    {
        $app =& JFactory::getApplication();
        $fbConfig =& CKunenaConfig::getInstance();
        $kunena_db =& JFactory::getDBO();
        if ($search == "") {
            $search = _KUNENA_USRL_SEARCH;
        }
        ?>

        <script type = "text/javascript">
            <!--
            function validate()
            {
                if ((document.usrlform.search == "") || (document.usrlform.search.value == ""))
                {
                    alert('<?php 
        echo _KUNENA_USRL_SEARCH_ALERT;
        ?>
');
                    return false;
                }
                else
                {
                    return true;
                }
            }
                    //-->
        </script>

        <?php 
        if ($fbConfig->joomlastyle < 1) {
            $boardclass = "fb_";
        }
        ?>
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr1">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr2">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr3">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr4">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr5">
        <table class = "fb_blocktable" id ="fb_userlist" border = "0" cellspacing = "0" cellpadding = "0" width="100%">
            <thead>
                <tr>
                    <th>
                        <table width = "100%" border = "0" cellspacing = "0" cellpadding = "0">
                            <tr>
                                <td align = "left">
                                    <div class = "fb_title_cover  fbm">
                                        <span class="fb_title fbl"> <?php 
        echo _KUNENA_USRL_USERLIST;
        ?>
</span>

                                        <?php 
        printf(_KUNENA_USRL_REGISTERED_USERS, $app->getCfg('sitename'), $total_results);
        ?>
                                    </div>
                                </td>

                                <td align = "right">
                                    <form name = "usrlform" method = "post" action = "<?php 
        echo CKunenaLink::GetUserlistURL();
        ?>
" onsubmit = "return validate()">
                                        <input type = "text"
                                            name = "search"
                                            class = "inputbox"
                                            style = "width:150px"
                                            maxlength = "100" value = "<?php 
        echo $search;
        ?>
" onblur = "if(this.value=='') this.value='<?php 
        echo $search;
        ?>
';" onfocus = "if(this.value=='<?php 
        echo $search;
        ?>
') this.value='';" />

                                        <input type = "image" src = "<?php 
        echo KUNENA_TMPLTMAINIMGURL . '/images/usl_search_icon.gif';
        ?>
" alt = "<?php 
        echo _KUNENA_USRL_SEARCH;
        ?>
" align = "top" style = "border: 0px;"/>
                                    </form>
                                </td>
                            </tr>
                        </table>
                    </th>
                </tr>
            </thead>

            <tbody>
                <tr>
                    <td class = "<?php 
        echo $boardclass;
        ?>
fb-userlistinfo">
                        <!-- Begin: Listing -->
                        <table width = "100%" border = "0" cellspacing = "0" cellpadding = "0">
                            <tr class = "fb_sth  fbs">
                                <th class = "th-1 frst <?php 
        echo $boardclass;
        ?>
sectiontableheader" align="center">
                                </th>

                                <?php 
        if ($fbConfig->userlist_online) {
            ?>

                                    <th class = "th-2 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_ONLINE;
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_avatar) {
            ?>

                                    <th class = "th-3 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_AVATAR;
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_name) {
            ?>

                                    <th class = "th-4 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_NAME;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=name&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=name&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_username) {
            ?>

                                    <th class = "th-5 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_USERNAME;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=username&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=username&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_group) {
            ?>

                                    <th class = "th-6 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_GROUP;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=group_id&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=group_id&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_posts) {
            ?>

                                    <th class = "th-7 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_POSTS;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=posts&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=posts&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_karma) {
            ?>

                                    <th class = "th-7 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_KARMA;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=karma&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=karma&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_email) {
            ?>

                                    <th class = "th-8 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_EMAIL;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=email&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=email&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_usertype) {
            ?>

                                    <th class = "th-9 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_USERTYPE;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=usertype&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=usertype&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_joindate) {
            ?>

                                    <th class = "th-10 <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_JOIN_DATE;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=registerDate&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=registerDate&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                     </th>

                                <?php 
        }
        ?>

                                <?php 
        if ($fbConfig->userlist_lastvisitdate) {
            ?>

                                    <th class = "th-11  <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_LAST_LOGIN;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=lastvisitDate&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=lastvisitDate&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
                                    </th>

                                <?php 
        }
        ?>

								  <?php 
        if ($fbConfig->userlist_userhits) {
            ?>
								<th class = "th-12 lst <?php 
            echo $boardclass;
            ?>
sectiontableheader" align="center">
<?php 
            echo _KUNENA_USRL_HITS;
            echo CKunenaLink::GetUserlistLink('&amp;orderby=uhits&amp;direction=ASC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/down.gif" border="0" alt="' . _KUNENA_USRL_ASC . '" />');
            echo CKunenaLink::GetUserlistLink('&amp;orderby=uhits&amp;direction=DESC', '<img src="' . KUNENA_TMPLTMAINIMGURL . '/images/up.gif" border="0" alt="' . _KUNENA_USRL_DESC . '" />');
            ?>
								</th>
                                <?php 
        }
        ?>

                            </tr>

                            <?php 
        $i = 1;
        foreach ($ulrows as $ulrow) {
            $evenodd = $i % 2;
            if ($evenodd == 0) {
                $usrl_class = "sectiontableentry1";
            } else {
                $usrl_class = "sectiontableentry2";
            }
            $nr = $i + $limitstart;
            // Avatar
            $uslavatar = '';
            if ($fbConfig->avatar_src == "clexuspm") {
                $uslavatar = '<img  border="0" class="usl_avatar" src="' . MyPMSTools::getAvatarLinkWithID($ulrow->id, "s") . '" alt="" />';
            } else {
                if ($fbConfig->avatar_src == "cb") {
                    $kunenaProfile =& CKunenaCBProfile::getInstance();
                    $uslavatar = $kunenaProfile->showAvatar($ulrow->id);
                } else {
                    $kunena_db->setQuery("SELECT avatar FROM #__fb_users WHERE userid='{$ulrow->id}'");
                    $avatar = $kunena_db->loadResult();
                    if ($avatar != '') {
                        if (!file_exists(KUNENA_PATH_UPLOADED . DS . 'avatars/s_' . $avatar)) {
                            $uslavatar = '<img  border="0" class="usl_avatar" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/' . $avatar . '" alt="" />';
                        } else {
                            $uslavatar = '<img  border="0" class="usl_avatar" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/s_' . $avatar . '" alt="" />';
                        }
                    } else {
                        $uslavatar = '<img  border="0" class="usl_avatar" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/s_nophoto.jpg" alt="" />';
                    }
                }
            }
            //
            ?>

                                <tr class = "<?php 
            echo $boardclass;
            echo $usrl_class;
            ?>
  fbm">
                                    <td class = "td-1 frst fbs" align="center">
<?php 
            echo $nr;
            ?>
                                    </td>

                                    <?php 
            if ($fbConfig->userlist_online) {
                ?>

                                        <td class = "td-2">
                                            <?php 
                // online - ofline status
                $sql = "SELECT COUNT(userid) FROM #__session WHERE userid='{$ulrow->id}'";
                $kunena_db->setQuery($sql);
                $isonline = $kunena_db->loadResult();
                if ($isonline && $ulrow->showOnline == 1) {
                    echo isset($fbIcons['onlineicon']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['onlineicon'] . '" border="0" alt="' . _MODLIST_ONLINE . '" />' : '  <img src="' . KUNENA_URLEMOTIONSPATH . 'onlineicon.gif" border="0"  alt="' . _MODLIST_ONLINE . '" />';
                } else {
                    echo isset($fbIcons['offlineicon']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['offlineicon'] . '" border="0" alt="' . _MODLIST_OFFLINE . '" />' : '  <img src="' . KUNENA_URLEMOTIONSPATH . 'offlineicon.gif" border="0"  alt="' . _MODLIST_OFFLINE . '" />';
                }
                ?>
                                        </td>

                                    <?php 
            }
            ?>

                                    <?php 
            if ($fbConfig->userlist_avatar) {
                ?>

                                        <td class = "td-3" align="center">
                                      <?php 
                if (strlen($uslavatar)) {
                    echo CKunenaLink::GetProfileLink($fbConfig, $ulrow->id, $uslavatar);
                } else {
                    echo '&nbsp;';
                }
                ?>
                                        </td>

                                    <?php 
            }
            ?>

                                    <?php 
            if ($fbConfig->userlist_name) {
                ?>

                                        <td class = "td-4  fbm" align="center">
						<?php 
                echo CKunenaLink::GetProfileLink($fbConfig, $ulrow->id, $ulrow->name);
                ?>
                                        </td>

                                    <?php 
            }
            ?>

                                    <?php 
            if ($fbConfig->userlist_username) {
                ?>

                                        <td class = "td-5  fbm" align="center">
						<?php 
                echo CKunenaLink::GetProfileLink($fbConfig, $ulrow->id, $ulrow->username);
                ?>
                                        </td>

                                    <?php 
            }
            ?>

                                    <?php 
            if ($fbConfig->userlist_group) {
                ?>

                                        <td class = "td-6  fbs" align="center">
                                            <span class = "view-group_<?php 
                echo $ulrow->group_id;
                ?>
"> <?php 
                echo $ulrow->title;
                ?>
 </span>
                                        </td>

                                    <?php 
            }
            ?>

                                    <?php 
            if ($fbConfig->userlist_posts) {
                ?>

                                        <td class = "td-7  fbs" align="center">
<?php 
                echo $ulrow->posts;
                ?>
                                        </td>

                                    <?php 
            }
            ?>

                                    <?php 
            if ($fbConfig->userlist_karma) {
                ?>

                                        <td class = "td-7 fbs" align="center">
<?php 
                echo $ulrow->karma;
                ?>
                                        </td>

                                    <?php 
            }
            ?>

                                    <?php 
            if ($fbConfig->userlist_email) {
                echo "\t\t<td class=\"td-8 fbs\"  align=\"center\"><a href=\"mailto:{$ulrow->email}\">{$ulrow->email}</a></td>\n";
            }
            if ($fbConfig->userlist_usertype) {
                echo "\t\t<td  class=\"td-9 fbs\"  align=\"center\">{$ulrow->usertype}</td>\n";
            }
            if ($fbConfig->userlist_joindate) {
                echo "\t\t<td  class=\"td-10 fbs\"  align=\"center\">" . convertDate($ulrow->registerDate) . "</td>\n";
            }
            if ($fbConfig->userlist_lastvisitdate) {
                echo "\t\t<td  class=\"td-11 fbs\"  align=\"center\">" . convertDate($ulrow->lastvisitDate) . "</td>\n";
            }
            ?>

                                    <td class = "td-12 lst fbs" align="center">
									 <?php 
            if ($fbConfig->userlist_userhits) {
                ?>
									<?php 
                echo $ulrow->uhits;
                ?>

                                    <?php 
            }
            ?>
									 </td>

                            <?php 
            echo "\t</tr>\n";
            $i++;
        }
        ?>

        </table>

		<form name = "usrlform" method = "post" action = "<?php 
        echo CKunenaLink::GetUserlistURL();
        ?>
" onsubmit = "return false;">
        <table width = "100%"  class="fb_userlist_pagenav" border = "0" cellspacing = "0" cellpadding = "0">
            <tr class = "fb_sth  fbs">
                <th class = "th-1  fbm" align = "center" style = "text-align:center;">

                            <?php 
        // TODO: fxstein - Need to perform SEO cleanup
        echo $pageNav->getPagesLinks(CKunenaLink::GetUserlistURL($query_ext));
        ?>
                </th>
            </tr>
        </table>



        <table class = "fb_blocktable" id="fb_userlist_bottom" style="border-bottom:0px;margin:0;" border = "0" cellspacing = "0" cellpadding = "0" width="100%">
                <tr>
                    <th  class = "th-right  fbs" align="right" style="text-align:right">
                     <?php 
        echo $pageNav->getPagesCounter();
        ?>
 | <?php 
        echo _KUNENA_USRL_DISPLAY_NR;
        ?>
 <?php 
        echo $pageNav->getLimitBox(CKunenaLink::GetUserlistURL($query_ext));
        ?>
                </th>
            </tr>
        </table>
		</form>

        </td>
	</tr>
  </tbody>
</table>
        <!-- Finish: Listing -->

</div>
</div>
</div>
</div>
</div>
        <?php 
        //(JJ) BEGIN: WHOISONLINE
        if (file_exists(KUNENA_ABSTMPLTPATH . '/plugin/who/whoisonline.php')) {
            include KUNENA_ABSTMPLTPATH . '/plugin/who/whoisonline.php';
        } else {
            include KUNENA_PATH_TEMPLATE_DEFAULT . DS . 'plugin/who/whoisonline.php';
        }
        //(JJ) FINISH: WHOISONLINE
        ?>
        <!-- Begin: Forum Jump -->
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr1">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr2">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr3">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr4">
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr5">
        <table class = "fb_blocktable" id="fb_bottomarea"   border = "0" cellspacing = "0" cellpadding = "0">
            <thead>
                <tr>
                    <th  class = "th-right">
                        <?php 
        //(JJ) FINISH: CAT LIST BOTTOM
        if ($fbConfig->enableforumjump) {
            require_once KUNENA_PATH_LIB . DS . 'kunena.forumjump.php';
        }
        ?>
                    </th>
                </tr>
            </thead>
			<tbody><tr><td></td></tr></tbody>
		</table>
        </div>
</div>
</div>
</div>
</div>
        <!-- Finish: Forum Jump -->

<?php 
    }
コード例 #3
0
ファイル: myprofile.php プロジェクト: kaantunc/MYK-BOR
     if ($fbConfig->fb_profile == 'cb') {
         $forumtab_url = CKunenaCBProfile::getForumTabURL();
         $app->redirect(JRoute::_($forumtab_url));
     } else {
         $app->redirect(JRoute::_(KUNENA_LIVEURLREL . '&amp;func=myprofile&amp;do=showfav'));
     }
     break;
 case "unfavoriteitem":
     $kunena_db->setQuery("DELETE from #__fb_favorites where userid={$kunena_my->id} and thread={$thread}");
     if (!$kunena_db->query()) {
         $app->enqueueMessage(_USER_UNFAVORITE_A . _USER_UNFAVORITE_B . _USER_UNFAVORITE_C, 'notice');
     } else {
         $app->enqueueMessage(_USER_UNFAVORITE_YES);
     }
     if ($fbConfig->fb_profile == 'cb') {
         $forumtab_url = CKunenaCBProfile::getForumTabURL();
         $app->redirect(JRoute::_($forumtab_url));
     } else {
         $app->redirect(JRoute::_(KUNENA_LIVEURLREL . '&amp;func=myprofile&amp;do=showfav'));
     }
     break;
     //
 //
 case "userdetails":
     /* We don't need
     					// security check to see if link exists in a menu
                         $link = 'index.php?option=com_user&amp;task=UserDetails';
     
                         $query = "SELECT id" . "\n FROM #__menu" . "\n WHERE link LIKE '%$link%'" . "\n AND published = 1";
                         $kunena_db->setQuery($query);
                         $exists = $kunena_db->loadResult();
コード例 #4
0
ファイル: view.php プロジェクト: kaantunc/MYK-BOR
                 $msg_msn = "<a href=\"" . JRoute::_('index.php?option=com_mypms&amp;task=showprofile&amp;user='******'cb' && $userinfo->userid > 0) {
         $msg_prflink = CKunenaCBProfile::getProfileURL($userinfo->userid);
         $msg_profile = "<a href=\"" . $msg_prflink . "\">                                              <img src=\"";
         if ($fbIcons['userprofile']) {
             $msg_profile .= KUNENA_URLICONSPATH . $fbIcons['userprofile'];
         } else {
             $msg_profile .= KUNENA_JLIVEURL . "/components/com_comprofiler/images/profiles.gif";
         }
         $msg_profile .= "\" alt=\"" . _VIEW_PROFILE . "\" border=\"0\" title=\"" . _VIEW_PROFILE . "\" /></a>";
     }
 } else {
     if ($fbConfig->fb_profile == "clexuspm") {
         //mypms pro profile link
         $msg_prflink = MyPMSTools::getProfileLink($userinfo->userid);
         $msg_profile = "<a href=\"" . MyPMSTools::getProfileLink($userinfo->userid) . "\"><img src=\"";
         if ($fbIcons['userprofile']) {
             $msg_profile .= KUNENA_URLICONSPATH . $fbIcons['userprofile'];
コード例 #5
0
ファイル: view.php プロジェクト: kaantunc/MYK-BOR
                 $msg_msn = "<a href=\"" . JRoute::_('index.php?option=com_mypms&amp;task=showprofile&amp;user='******'cb' && $fmessage->userid > 0) {
         $msg_prflink = CKunenaCBProfile::getProfileURL($fmessage->userid);
         $msg_profile = "<a href=\"" . $msg_prflink . "\">                                              <img src=\"";
         if ($fbIcons['userprofile']) {
             $msg_profile .= KUNENA_URLICONSPATH . $fbIcons['userprofile'];
         } else {
             $msg_profile .= KUNENA_JLIVEURL . "/components/com_comprofiler/images/profiles.gif";
         }
         $msg_profile .= "\" alt=\"" . _VIEW_PROFILE . "\" border=\"0\" title=\"" . _VIEW_PROFILE . "\" /></a>";
     }
 } else {
     if ($fbConfig->fb_profile == "clexuspm") {
         //mypms pro profile link
         $msg_prflink = MyPMSTools::getProfileLink($fmessage->userid);
         $msg_profile = "<a href=\"" . MyPMSTools::getProfileLink($fmessage->userid) . "\"><img src=\"";
         if ($fbIcons['userprofile']) {
             $msg_profile .= KUNENA_URLICONSPATH . $fbIcons['userprofile'];
コード例 #6
0
ファイル: stats.php プロジェクト: kaantunc/MYK-BOR
* @copyright (C) 2000 - 2004 TSMF / Jan de Graaff / All Rights Reserved
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @author TSMF & Jan de Graaff
**/
// Dont allow direct linking
defined('_JEXEC') or die('Restricted access');
$fbConfig =& CKunenaConfig::getInstance();
$document =& JFactory::getDocument();
$document->setTitle(_STAT_FORUMSTATS . ' - ' . stripslashes($fbConfig->board_title));
if ($fbConfig->showstats) {
    $forumurl = 'index.php?option=com_kunena';
    if ($fbConfig->fb_profile == "jomsocial") {
        $userlist = JRoute::_('index.php?option=com_community&amp;view=search&amp;task=browse');
    } else {
        if ($fbConfig->fb_profile == 'cb') {
            $userlist = CKunenaCBProfile::getUserListURL();
        } else {
            $userlist = JRoute::_(KUNENA_LIVEURLREL . '&amp;func=userlist');
        }
    }
    ?>

        <!-- BEGIN: GENERAL STATS -->
<?php 
    if ($fbConfig->showgenstats) {
        ?>
<div class="<?php 
        echo $boardclass;
        ?>
_bt_cvr1">
<div class="<?php 
コード例 #7
0
 function GetProfileURL($userid)
 {
     $fbConfig =& CKunenaConfig::getInstance();
     // Only create links for valid users
     if ($userid > 0) {
         if ($fbConfig->fb_profile == 'cb') {
             $kunenaProfile =& CKunenaCBProfile::getInstance();
             return $kunenaProfile->getProfileURL($userid);
         } elseif ($fbConfig->fb_profile == 'jomsocial') {
             return CRoute::_('index.php?option=com_community&view=profile&userid=' . $userid);
         } elseif ($fbConfig->fb_profile == 'aup') {
             $api_AUP = JPATH_SITE . DS . 'components' . DS . 'com_alphauserpoints' . DS . 'helper.php';
             if (file_exists($api_AUP)) {
                 $useridAUP = AlphaUserPointsHelper::getAnyUserReferreID($userid);
                 return JRoute::_(KUNENA_PROFILE_LINK_SUFFIX . $useridAUP);
             }
         } else {
             return JRoute::_(KUNENA_PROFILE_LINK_SUFFIX . $userid);
         }
     }
     return '';
 }
コード例 #8
0
ファイル: userprofile.php プロジェクト: kaantunc/MYK-BOR
                } else {
                    echo _USER_RETURN_A . " <a href=\"" . JRoute::_(KUNENA_LIVEURLREL . '&amp;func=userprofile&amp;do=show') . "\">" . _USER_RETURN_B . "</a><br /><br />";
                    echo CKunenaLink::GetAutoRedirectHTML(JRoute::_(KUNENA_LIVEURLREL . '&amp;func=userprofile&amp;do=show'), 3500);
                }
            } else {
                if ($do == "unfavorite") {
                    //ergo, ergo delete
                    $kunena_db->setQuery("DELETE from #__fb_favorites where userid={$kunena_my->id} and thread={$thread}");
                    if (!$kunena_db->query()) {
                        echo _USER_UNFAVORITE_A . " <strong><font color=\"red\">" . _USER_UNFAVORITE_B . "</font></strong> " . _USER_UNFAVORITE_C . ".<br /><br />";
                    } else {
                        echo _USER_UNFAVORITE_YES . ".<br /><br />";
                    }
                    if ($fbConfig->fb_profile == 'cb') {
                        echo _USER_RETURN_A . ' <a href="' . CKunenaCBProfile::getForumTabURL() . '">' . _USER_RETURN_B . "</a><br /><br />";
                        echo CKunenaLink::GetAutoRedirectHTML(CKunenaCBProfile::getForumTabURL(), 3500);
                    } else {
                        echo _USER_RETURN_A . " <a href=\"index.php?option=com_kunena&amp;Itemid={$Itemid}&amp;func=userprofile&amp;do=show\">" . _USER_RETURN_B . "</a><br /><br />";
                        echo CKunenaLink::GetAutoRedirectHTML(JRoute::_(KUNENA_LIVEURLREL . '&amp;func=userprofile&amp;do=show'), 3500);
                    }
                } else {
                    //you got me there... don't know what to $do
                    echo _USER_ERROR_A;
                    echo _USER_ERROR_B . "<br /><br />";
                    echo _USER_ERROR_C . "<br /><br />" . _USER_ERROR_D . ": <code>fb001-up-02NoDO</code><br /><br />";
                }
            }
        }
    }
} else {
    //get outa here, you fraud!
コード例 #9
0
ファイル: profilebox.php プロジェクト: kaantunc/MYK-BOR
        $jr_profilelink = '<a href="' . JRoute::_(KUNENA_LIVEURLREL . '&amp;func=myprofile') . '" >' . _PROFILEBOX_MYPROFILE . '</a>';
    } else {
        $jr_profilelink = '<a href="' . JRoute::_(KUNENA_LIVEURLREL . '&amp;func=myprofile') . '" >' . _PROFILEBOX_MYPROFILE . '</a>';
    }
}
$jr_myposts = '<a href="' . JRoute::_(KUNENA_LIVEURLREL . '&amp;func=showauthor&amp;task=showmsg&amp;auth=' . $kunena_my->id . '') . '" >' . _PROFILEBOX_SHOW_MYPOSTS . '</a>';
$jr_latestpost = JRoute::_(KUNENA_LIVEURLREL . '&amp;func=latest');
?>

<?php 
// AFTER LOGIN AREA
if ($fbConfig->fb_profile == 'cb') {
    $loginlink = CKunenaCBProfile::getLoginURL();
    $logoutlink = CKunenaCBProfile::getLogoutURL();
    $registerlink = CKunenaCBProfile::getRegisterURL();
    $lostpasslink = CKunenaCBProfile::getLostPasswordURL();
} else {
    if ($fbConfig->fb_profile == 'jomsocial') {
        $loginlink = JRoute::_('index.php?option=com_community&amp;view=frontpage');
        $logoutlink = JRoute::_('index.php?option=com_community&amp;view=frontpage');
        $registerlink = JRoute::_('index.php?option=com_community&amp;view=register');
        $lostpasslink = JRoute::_('index.php?option=com_community&amp;view=frontpage');
    } else {
        $loginlink = JRoute::_('index.php?option=com_user&amp;view=login');
        $logoutlink = JRoute::_('index.php?option=com_user&amp;view=login');
        $registerlink = JRoute::_('index.php?option=com_user&amp;view=register&amp;Itemid=' . $Itemid);
        $lostpasslink = JRoute::_('index.php?option=com_user&amp;view=reset&amp;Itemid=' . $Itemid);
    }
}
if ($kunena_my->id) {
    ?>
コード例 #10
0
 function GetProfileLink($fbConfig, $userid, $name, $rel = 'nofollow', $class = '')
 {
     $fbConfig =& CKunenaConfig::getInstance();
     // Only create links for valid users
     if ($userid > 0) {
         if ($fbConfig->fb_profile == 'cb') {
             $kunenaProfile =& CKunenaCBProfile::getInstance();
             if ($link = $kunenaProfile->getProfileURL($userid)) {
                 return CKunenaLink::GetSefHrefLink($link, $name, '', $rel, $class);
             } else {
                 return $name;
             }
         } else {
             return CKunenaLink::GetSefHrefLink(KUNENA_PROFILE_LINK_SUFFIX . $userid, $name, '', $rel, $class);
         }
     } else {
         return $name;
     }
 }
コード例 #11
0
ファイル: fbprofile.php プロジェクト: kaantunc/MYK-BOR
function showprf($userid, $page)
{
    $fbConfig =& CKunenaConfig::getInstance();
    $kunena_acl =& JFactory::getACL();
    $kunena_my =& JFactory::getUser();
    $kunena_db =& JFactory::getDBO();
    // ERROR: mixed global $fbIcons
    global $fbIcons;
    //Get userinfo needed later on, this limits the amount of queries
    unset($userinfo);
    $kunena_db->setQuery("SELECT a.*, b.* FROM #__fb_users AS a LEFT JOIN #__users AS b ON b.id=a.userid WHERE a.userid='{$userid}'");
    $userinfo = $kunena_db->loadObject();
    check_dberror('Unable to get user profile info.');
    if (!$userinfo) {
        $kunena_db->setQuery("SELECT * FROM #__users WHERE id='{$userid}'");
        $userinfo = $kunena_db->loadObject();
        check_dberror('Unable to get user profile info.');
        if (!$userinfo) {
            echo '<h3>' . _KUNENA_PROFILE_NO_USER . '</h3>';
            return;
        } else {
            // Check moderator status (admin is moderator)
            $aro_group = $kunena_acl->getAroGroup($userid);
            $is_admin = strtolower($aro_group->name) == 'super administrator' || strtolower($aro_group->name) == 'administrator';
            // there's no profile; set userid and moderator status.
            $kunena_db->setQuery("INSERT INTO #__fb_users (userid,moderator) VALUES ('{$userid}','{$is_admin}')");
            $kunena_db->query();
            check_dberror('Unable to create user profile.');
            $kunena_db->setQuery("SELECT a.*, b.* FROM #__fb_users AS a LEFT JOIN #__users AS b ON b.id=a.userid WHERE a.userid='{$userid}'");
            $userinfo = $kunena_db->loadObject();
            check_dberror('Unable to get user profile info.');
            // TODO: For future use
            // echo '<h3>' . _KUNENA_PROFILE_NOT_FOUND . '</h3>';
            // return;
        }
    }
    // User Hits
    $kunena_db->setQuery('UPDATE #__fb_users SET uhits=uhits+1 WHERE userid=' . $userid);
    $kunena_db->query() or trigger_dberror("Unable to update user hits.");
    // get userprofile hits
    $msg_userhits = $userinfo->uhits;
    //get the username:
    $fb_username = "";
    if ($fbConfig->username) {
        $fb_queryName = "username";
    } else {
        $fb_queryName = "name";
    }
    $fb_username = $userinfo->{$fb_queryName};
    $lists["userid"] = $userid;
    $msg_username = $fb_username;
    // $msg_username = ($fmessage->email != "" && $kunena_my->id > 0 && $fbConfig->showemail == '1') ? "<a href=\"mailto:" . $fmessage->email . "\">" . $fb_username . "</a>" : $fb_username;
    if ($fbConfig->allowavatar) {
        $Avatarname = $userinfo->username;
        if ($fbConfig->avatar_src == "jomsocial") {
            // Get CUser object
            $user =& CFactory::getUser($userid);
            $msg_avatar = '<span class="fb_avatar"><img src="' . $user->getAvatar() . '" alt="" /></span>';
        } else {
            if ($fbConfig->avatar_src == "clexuspm") {
                $msg_avatar = '<span class="fb_avatar"><img src="' . MyPMSTools::getAvatarLinkWithID($userid, "b") . '" alt="" /></span>';
            } else {
                if ($fbConfig->avatar_src == "cb") {
                    $kunenaProfile = CKunenaCBProfile::getInstance();
                    $msg_avatar = '<span class="fb_avatar">' . $kunenaProfile->showAvatar($userid, '', 0) . '</span>';
                } else {
                    $avatar = $userinfo->avatar;
                    if ($avatar != '') {
                        if (!file_exists(KUNENA_PATH_UPLOADED . DS . 'avatars/l_' . $avatar)) {
                            $msg_avatar = '<span class="fb_avatar"><img border="0" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/' . $avatar . '"  alt="" style="max-width: ' . $fbConfig->avatarwidth . 'px; max-height: ' . $fbConfig->avatarheight . 'px;" /></span>';
                        } else {
                            $msg_avatar = '<span class="fb_avatar"><img border="0" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/' . $avatar . '"  alt="" /></span>';
                        }
                    } else {
                        $msg_avatar = '<span class="fb_avatar"><img  border="0" src="' . KUNENA_LIVEUPLOADEDPATH . '/avatars/nophoto.jpg"  alt="" /></span>';
                    }
                }
            }
        }
    }
    if ($fbConfig->showuserstats) {
        //user type determination
        $ugid = $userinfo->gid;
        $uIsMod = 0;
        $uIsAdm = 0;
        if ($ugid > 0) {
            //only get the groupname from the ACL if we're sure there is one
            $agrp = strtolower($kunena_acl->get_group_name($ugid, 'ARO'));
        }
        if ($ugid == 0) {
            $msg_usertype = _VIEW_VISITOR;
        } else {
            if (strtolower($agrp) == "administrator" || strtolower($agrp) == "superadministrator" || strtolower($agrp) == "super administrator") {
                $msg_usertype = _VIEW_ADMIN;
                $uIsAdm = 1;
            } elseif ($uIsMod) {
                $msg_usertype = _VIEW_MODERATOR;
            } else {
                $msg_usertype = _VIEW_USER;
            }
        }
        //done usertype determination, phew...
        //Get the max# of posts for any one user
        $kunena_db->setQuery("SELECT MAX(posts) FROM #__fb_users");
        $maxPosts = $kunena_db->loadResult();
        //# of post for this user and ranking
        $numPosts = (int) $userinfo->posts;
        //ranking
        if ($fbConfig->showranking) {
            if ($userinfo->rank != '0') {
                //special rank
                $kunena_db->setQuery("SELECT * FROM #__fb_ranks WHERE rank_id='{$userinfo->rank}'");
                $getRank = $kunena_db->loadObjectList();
                check_dberror("Unable to load ranks.");
                $rank = $getRank[0];
                $rText = $rank->rank_title;
                $rImg = KUNENA_URLRANKSPATH . $rank->rank_image;
            }
            if ($userinfo->rank == '0') {
                //post count rank
                $kunena_db->setQuery("SELECT * FROM #__fb_ranks WHERE ((rank_min <= '{$numPosts}') AND (rank_special = '0')) ORDER BY rank_min DESC", 0, 1);
                $getRank = $kunena_db->loadObjectList();
                check_dberror("Unable to load ranks.");
                $rank = $getRank[0];
                $rText = $rank->rank_title;
                $rImg = KUNENA_URLRANKSPATH . $rank->rank_image;
            }
            if ($uIsMod) {
                $rText = _RANK_MODERATOR;
                $rImg = KUNENA_URLRANKSPATH . 'rankmod.gif';
            }
            if ($uIsAdm) {
                $rText = _RANK_ADMINISTRATOR;
                $rImg = KUNENA_URLRANKSPATH . 'rankadmin.gif';
            }
            if ($fbConfig->rankimages) {
                $msg_userrankimg = '<img src="' . $rImg . '" alt="" />';
            }
            $msg_userrank = $rText;
            $useGraph = 0;
            //initialization
            if (!$fbConfig->poststats) {
                $msg_posts = '<div class="viewcover">' . "<strong>" . _POSTS . " {$numPosts}" . "</strong>" . "</div>";
                $useGraph = 0;
            } else {
                $myGraph = new phpGraph();
                //$myGraph->SetGraphTitle(_POSTS);
                $myGraph->AddValue(_POSTS, $numPosts);
                $myGraph->SetRowSortMode(0);
                $myGraph->SetBarImg(KUNENA_URLGRAPHPATH . "col" . $fbConfig->statscolor . "m.png");
                $myGraph->SetBarImg2(KUNENA_URLEMOTIONSPATH . "graph.gif");
                $myGraph->SetMaxVal($maxPosts);
                $myGraph->SetShowCountsMode(2);
                $myGraph->SetBarWidth(4);
                //height of the bar
                $myGraph->SetBorderColor("#333333");
                $myGraph->SetBarBorderWidth(0);
                $myGraph->SetGraphWidth(120);
                //should match column width in the <TD> above -5 pixels
                //$myGraph->BarGraphHoriz();
                $useGraph = 1;
            }
        }
    }
    //karma points and buttons
    if ($fbConfig->showkarma && $userid != '0') {
        $karmaPoints = $userinfo->karma;
        $karmaPoints = (int) $karmaPoints;
        $msg_karma = "<strong>" . _KARMA . ":</strong> {$karmaPoints}";
        $msg_karmaminus = '';
        $msg_karmaplus = '';
        if ($kunena_my->id != '0' && $kunena_my->id != $userid) {
            $msg_karmaminus .= "<a href=\"" . JRoute::_(KUNENA_LIVEURLREL . '&amp;func=karma&amp;do=decrease&amp;userid=' . $userid) . "\"><img src=\"";
            if (isset($fbIcons['karmaminus'])) {
                $msg_karmaminus .= KUNENA_URLICONSPATH . $fbIcons['karmaminus'];
            } else {
                $msg_karmaminus .= KUNENA_URLEMOTIONSPATH . "karmaminus.gif";
            }
            $msg_karmaminus .= "\" alt=\"Karma-\" border=\"0\" title=\"" . _KARMA_SMITE . "\" align=\"middle\" /></a>";
            $msg_karmaplus .= "<a href=\"" . JRoute::_(KUNENA_LIVEURLREL . '&amp;func=karma&amp;do=increase&amp;userid=' . $userid) . "\"><img src=\"";
            if (isset($fbIcons['karmaplus'])) {
                $msg_karmaplus .= KUNENA_URLICONSPATH . $fbIcons['karmaplus'];
            } else {
                $msg_karmaplus .= KUNENA_URLEMOTIONSPATH . "karmaplus.gif";
            }
            $msg_karmaplus .= "\" alt=\"Karma+\" border=\"0\" title=\"" . _KARMA_APPLAUD . "\" align=\"middle\" /></a>";
        }
    }
    /*let's see if we should use uddeIM integration */
    if ($fbConfig->pm_component == "uddeim" && $userid && $kunena_my->id) {
        //we should offer the user a PMS link
        //first get the username of the user to contact
        $PMSName = $userinfo->username;
        $msg_pms = "<a href=\"" . JRoute::_('index.php?option=com_uddeim&amp;task=new&recip=' . $userid) . "\"><img src=\"";
        if ($fbIcons['pms']) {
            $msg_pms .= KUNENA_URLICONSPATH . $fbIcons['pms'];
        } else {
            $msg_pms .= KUNENA_URLEMOTIONSPATH . "sendpm.gif";
        }
        $msg_pms .= "\" alt=\"" . _VIEW_PMS . "\" border=\"0\" title=\"" . _VIEW_PMS . "\" /></a>";
    }
    /*let's see if we should use myPMS2 integration */
    if ($fbConfig->pm_component == "pms" && $userid && $kunena_my->id) {
        //we should offer the user a PMS link
        //first get the username of the user to contact
        $PMSName = $userinfo->username;
        $msg_pms = "<a href=\"" . JRoute::_('index.php?option=com_pms&amp;page=new&amp;id=' . $PMSName . '&title=' . $fmessage->subject) . "\"><img src=\"";
        if ($fbIcons['pms']) {
            $msg_pms .= KUNENA_URLICONSPATH . $fbIcons['pms'];
        } else {
            $msg_pms .= KUNENA_URLEMOTIONSPATH . "sendpm.gif";
        }
        $msg_pms .= "\" alt=\"" . _VIEW_PMS . "\" border=\"0\" title=\"" . _VIEW_PMS . "\" /></a>";
    }
    // online - ofline status
    if ($userid > 0) {
        $sql = "SELECT COUNT(userid) FROM #__session WHERE userid='{$userid}'";
        $kunena_db->setQuery($sql);
        $isonline = $kunena_db->loadResult();
        if ($isonline && $userinfo->showOnline == 1) {
            $msg_online = isset($fbIcons['onlineicon']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['onlineicon'] . '" border="0" alt="' . _MODLIST_ONLINE . '" />' : '  <img src="' . KUNENA_URLEMOTIONSPATH . 'onlineicon.gif" border="0"  alt="' . _MODLIST_ONLINE . '" />';
        } else {
            $msg_online = isset($fbIcons['offlineicon']) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons['offlineicon'] . '" border="0" alt="' . _MODLIST_OFFLINE . '" />' : '  <img src="' . KUNENA_URLEMOTIONSPATH . 'offlineicon.gif" border="0"  alt="' . _MODLIST_OFFLINE . '" />';
        }
    }
    /* ClexusPM integration */
    if ($fbConfig->pm_component == "clexuspm") {
        //we should offer the user a PMS link
        //first get the username of the user to contact
        $PMSName = $userinfo->aid;
        $msg_pms = "<a href=\"" . JRoute::_('index.php?option=com_mypms&amp;task=new&amp;to=' . $userid . '' . $fmessage->subject) . "\"><img src=\"";
        if ($fbIcons['pms']) {
            $msg_pms .= KUNENA_URLICONSPATH . $fbIcons['pms'];
        } else {
            $msg_pms .= KUNENA_JLIVEURL . "/components/com_mypms/images/icons/message_12px.gif";
        }
        $msg_pms .= "\" alt=\"" . _VIEW_PMS . "\" border=\"0\" title=\"" . _VIEW_PMS . "\" /></a>";
        //mypms pro profile link
        $msg_profile = "<a href=\"" . MyPMSTools::getProfileLink($userid) . "\"><img src=\"";
        if ($fbIcons['userprofile']) {
            $msg_profile .= KUNENA_URLICONSPATH . $fbIcons['userprofile'];
        } else {
            $msg_profile .= KUNENA_JLIVEURL . "/components/com_mypms/images/managecontact_icon.gif";
        }
        $msg_profile .= "\" alt=\"" . _VIEW_PROFILE . "\" border=\"0\" title=\"" . _VIEW_PROFILE . "\" /></a>";
        //mypms add buddy link
        $msg_buddy = "<a href=\"" . JRoute::_('index.php?option=com_mypms&amp;user='******'&amp;task=addbuddy') . "\"><img src=\"";
        if ($fbIcons['pms2buddy']) {
            $msg_buddy .= KUNENA_URLICONSPATH . $fbIcons['pms2buddy'];
        } else {
            $msg_buddy .= KUNENA_JLIVEURL . "/components/com_mypms/images/messages/addbuddy.gif";
        }
        $msg_buddy .= "\" alt=\"" . _VIEW_ADDBUDDY . "\" border=\"0\" title=\"" . _VIEW_ADDBUDDY . "\" /></a>";
        $kunena_db->setQuery("SELECT icq, ym, msn, aim, website, location FROM #__mypms_profiles WHERE user='******'");
        $profileitems = $kunena_db->loadObjectList();
        check_dberror("Unable to load mypms_profiles.");
        foreach ($profileitems as $profileitems) {
            if ($profileitems->aim) {
                $msg_aim = "<a href=\"aim:goim?screenname=" . str_replace(" ", "+", $profileitems->aim) . "\"><img src=\"" . KUNENA_URLEMOTIONSPATH . "aim.png\" border=0 alt=\"\" /></a>";
            }
            if ($profileitems->icq) {
                $msg_icq = "<a href=\"http://www.icq.com/whitepages/wwp.php?uin=" . $profileitems->icq . "\"><img src=\"" . KUNENA_URLEMOTIONSPATH . "icq.png\" border=0 alt=\"\" /></a>";
            }
            if ($profileitems->msn) {
                $msg_msn = "<a href=\"" . JRoute::_('index.php?option=com_mypms&amp;task=showprofile&amp;user='******'/plugin/fbprofile/userinfos.php')) {
        include KUNENA_ABSTMPLTPATH . '/plugin/fbprofile/userinfos.php';
    } else {
        include KUNENA_PATH_TEMPLATE_DEFAULT . DS . 'plugin/fbprofile/userinfos.php';
    }
    ?>

            <!-- /Kunena Profile -->
            </td>

            <td class = "<?php 
    echo $boardclass;
    ?>
profile-right" valign="top" width="74%">
            <!-- User Messages -->



            <?php 
    if (file_exists(KUNENA_ABSTMPLTPATH . '/plugin/fbprofile/summary.php')) {
        include KUNENA_ABSTMPLTPATH . '/plugin/fbprofile/summary.php';
    } else {
        include KUNENA_PATH_TEMPLATE_DEFAULT . DS . 'plugin/fbprofile/summary.php';
    }
    ?>

                <?php 
    if (file_exists(KUNENA_ABSTMPLTPATH . '/plugin/fbprofile/forummsg.php')) {
        include KUNENA_ABSTMPLTPATH . '/plugin/fbprofile/forummsg.php';
    } else {
        include KUNENA_PATH_TEMPLATE_DEFAULT . DS . 'plugin/fbprofile/forummsg.php';
    }
    ?>
            </td>
        </tr>
    </table>

    <?php 
    /*    end of function        */
}