当前位置: 首页>>代码示例>>PHP>>正文


PHP BxTemplVotingView::getVoteCount方法代码示例

本文整理汇总了PHP中BxTemplVotingView::getVoteCount方法的典型用法代码示例。如果您正苦于以下问题:PHP BxTemplVotingView::getVoteCount方法的具体用法?PHP BxTemplVotingView::getVoteCount怎么用?PHP BxTemplVotingView::getVoteCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BxTemplVotingView的用法示例。


在下文中一共展示了BxTemplVotingView::getVoteCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: genLeaderPack

    function genLeaderPack($aMTypes, $sSex = 'male')
    {
        $sSLeaders = '';
        if (is_array($aMTypes) and count($aMTypes) > 0) {
            $sVacantC = _t('_Vacant');
            $sOfflineC = _t('_Offline');
            $sMaleIcon = getTemplateIcon('male.png');
            $sFemaleIcon = getTemplateIcon('female.png');
            $sSpacerIcon = getTemplateImage('spacer.gif');
            $sOfflineIcon = getTemplateIcon('sys_status_offline.png');
            $sSexIcon = $sThumbType = '';
            switch ($sSex) {
                case 'male':
                    $sSexIcon = $sMaleIcon;
                    $sThumbType = 'man';
                    break;
                case 'female':
                    $sSexIcon = $sFemaleIcon;
                    $sThumbType = 'woman';
                    break;
            }
            $sSexThumbIcon = getTemplateIcon($sThumbType . '_medium.gif');
            foreach ($aMTypes as $sTopType => $iMembID) {
                $sTypeName = $sTopType;
                $sTypeNameUcf = ucfirst($sTopType);
                $sLabel = _t('_' . $sTypeNameUcf);
                $oMembVoting = new BxTemplVotingView('profile', $iMembID);
                $sVotingVal = '<div class="rate_block_position">' . $oMembVoting->getJustVotingElement(0) . '</div>';
                $iVotesCnt = $oMembVoting->getVoteCount();
                $sMembThumb = $sProfileLink = '';
                if ($iMembID > 0) {
                    $sMembThumb = get_member_thumbnail($iMembID, 'none', false);
                    $sMemberName = getNickname($iMembID);
                    $sMemberLink = getProfileLink($iMembID);
                    $sProfileLink = <<<EOF
<a href="{$sMemberLink}">{$sMemberName}</a>
EOF;
                } else {
                    $sMembThumb = <<<EOF
<div class="thumbnail_image" style="width: 68px; height: 68px;">
    <a href="javascript:void(0)">
        <img title="{$sVacantC}" alt="{$sVacantC}" style="background-image: url({$sSexThumbIcon}); width: 64px; height: 64px;" src="{$sSpacerIcon}" />
        <img class="sys-online-offline" title="{$sOfflineC}" alt="{$sOfflineC}" src="{$sOfflineIcon}" />
    </a>
</div>
EOF;
                    $sProfileLink = <<<EOF
<a class="vacant" href="javascript: void(0);">{$sVacantC}</a>
EOF;
                }
                $sVotes = _t('_{0} votes', $iVotesCnt);
                $sSLeaders .= <<<EOF
<div id="prof_of_{$sTypeName}" class="featured_block_1">
\t<div class="top_rated_head">
\t\t<div class="sex_icon" style="background:url({$sSexIcon}) center 2px no-repeat;">&nbsp;</div>
\t\t<div class="type_vote">
\t\t\t{$sLabel}<br />
\t\t\t<font style="font-size:9px;color:#999;">{$sVotes}</font>
\t\t</div>
\t\t<div class="clear_both"></div>
\t</div>
\t{$sMembThumb}
\t{$sVotingVal}
\t<div class="thumb_username">{$sProfileLink}</div>
\t<div class="clear_both"></div>
</div>
EOF;
            }
            return $sSLeaders;
        }
    }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:71,代码来源:BxBaseIndexPageView.php


注:本文中的BxTemplVotingView::getVoteCount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。