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


PHP BxTemplVotingView::isEnabled方法代码示例

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


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

示例1: array

 function getBlockCode_ViewImage()
 {
     $sSiteUrl = $this->_aSite['url'];
     $aFile = BxDolService::call('photos', 'get_photo_array', array($this->_aSite['photo'], 'file'), 'Search');
     $sImage = $aFile['no_image'] ? '' : $aFile['file'];
     // BEGIN STW INTEGRATION
     if (getParam('bx_sites_account_type') != 'No Automated Screenshots') {
         if ($sImage == '') {
             $aSTWOptions = array();
             bx_sites_import('STW');
             $sThumbHTML = getThumbnailHTML($sSiteUrl, $aSTWOptions, false, false);
         }
     }
     // END STW INTEGRATION
     $sVote = '';
     if (strncasecmp($sSiteUrl, 'http://', 7) != 0 && strncasecmp($sSiteUrl, 'https://', 8) != 0) {
         $sSiteUrl = 'http://' . $sSiteUrl;
     }
     if ($this->_oConfig->isVotesAllowed() && $this->_oSites->oPrivacy->check('rate', $this->_aSite['id'], $this->_oSites->iOwnerId)) {
         bx_import('BxTemplVotingView');
         $oVotingView = new BxTemplVotingView('bx_sites', $this->_aSite['id']);
         if ($oVotingView->isEnabled()) {
             $sVote = $oVotingView->getBigVoting();
         }
     }
     $sContent = $this->_oTemplate->parseHtmlByName('view_image.html', array('title' => $this->_aSite['title'], 'site_url' => $sSiteUrl, 'site_url_view' => $this->_aSite['url'], 'bx_if:is_image' => array('condition' => $sThumbHTML == false, 'content' => array('image' => $sImage ? $sImage : $this->_oTemplate->getImageUrl('no-image-thumb.png'))), 'bx_if:is_thumbhtml' => array('condition' => $sThumbHTML != '', 'content' => array('thumbhtml' => $sThumbHTML)), 'vote' => $sVote, 'view_count' => $this->_aSite['views']));
     return array($sContent, array(), array(), false);
 }
开发者ID:Arvindvi,项目名称:dolphin,代码行数:28,代码来源:BxSitesPageView.php

示例2: getViewFile

 function getViewFile(&$aInfo)
 {
     $oVotingView = new BxTemplVotingView('bx_' . $this->_oConfig->getUri(), $aInfo['medID']);
     $iWidth = (int) $this->_oConfig->getGlParam('file_width');
     if ($aInfo['prevItem'] > 0) {
         $aPrev = $this->_oDb->getFileInfo(array('fileId' => $aInfo['prevItem']), true, array('medUri', 'medTitle'));
     }
     if ($aInfo['nextItem'] > 0) {
         $aNext = $this->_oDb->getFileInfo(array('fileId' => $aInfo['nextItem']), true, array('medUri', 'medTitle'));
     }
     $aUnit = array('file' => $this->getFileConcept($aInfo['medID'], array('ext' => $aInfo['medExt'], 'source' => $aInfo['medSource'])), 'width_ext' => $iWidth + 2, 'width' => $iWidth, 'fileUrl' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aInfo['medUri'], 'fileTitle' => $aInfo['medTitle'], 'rate' => $oVotingView->isEnabled() ? $oVotingView->getBigVoting(1, $aInfo['Rate']) : '', 'favInfo' => isset($aInfo['favCount']) ? $aInfo['favCount'] : '', 'viewInfo' => $aInfo['medViews'], 'albumUri' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'browse/album/' . $aInfo['albumUri'] . '/owner/' . $aInfo['NickName'], 'albumCaption' => $aInfo['albumCaption'], 'bx_if:prev' => array('condition' => $aInfo['prevItem'] > 0, 'content' => array('linkPrev' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aPrev['medUri'], 'titlePrev' => $aPrev['medTitle'], 'percent' => $aInfo['nextItem'] > 0 ? 50 : 100)), 'bx_if:next' => array('condition' => $aInfo['nextItem'] > 0, 'content' => array('linkNext' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aNext['medUri'], 'titleNext' => $aNext['medTitle'], 'percent' => $aInfo['prevItem'] > 0 ? 50 : 100)));
     return $this->parseHtmlByName('view_unit.html', $aUnit);
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:13,代码来源:BxVideosTemplate.php

示例3: checkAction

 function getBlockCode_RateObject()
 {
     $sMainPrefix = $this->oConfig->getMainPrefix();
     $this->oMedia->oModule->_defineActions();
     $aCheck = checkAction($this->iViewer, $this->oMedia->oModule->_defineActionName('view'));
     if ($aCheck[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED) {
         $sCode = MsgBox(_t('_' . $sMainPrefix . '_forbidden'));
     } else {
         $aData = $this->getRateObject();
         if (count($aData) > 0) {
             $oVotingView = new BxTemplVotingView($this->sType, $aData[0]['id']);
             $aUnit = array('url' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'rate', 'fileBody' => $this->getRateFile($aData), 'ratePart' => $oVotingView->isEnabled() ? $oVotingView->getBigVoting() : '', 'fileTitle' => $aData[0]['title'], 'fileUri' => $this->oMedia->getCurrentUrl('file', $aData[0]['id'], $aData[0]['uri']), 'fileWhen' => defineTimeInterval($aData[0]['date']), 'fileFrom' => getNickName($aData[0]['ownerId']), 'fileFromLink' => getProfileLink($aData[0]['ownerId']));
             $sCode = $this->oMedia->oTemplate->parseHtmlByName('rate_object.html', $aUnit);
             checkAction($this->iViewer, $this->oMedia->oModule->_defineActionName('view'), true);
         } else {
             $sCode = MsgBox(_t('_' . $sMainPrefix . '_no_file_for_rate'));
         }
     }
     return array($sCode, array(), array(), false);
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:20,代码来源:BxDolFilesRate.php

示例4: checkAction

 function getBlockCode_RateObject()
 {
     $this->oMedia->oModule->_defineActions();
     $aCheck = checkAction($this->iViewer, $this->oMedia->oModule->_defineActionName('view'));
     if ($aCheck[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED) {
         $sCode = MsgBox(_t('_' . $this->sType . '_forbidden'));
     } else {
         $aData = $this->getRateObject();
         if (count($aData) > 0) {
             $oFile =& $this->oMedia->oModule;
             $oFile->_oTemplate->addCss('rate_object.css');
             $iInfoWidth = (int) getParam($this->sType . '_file_width');
             $oVotingView = new BxTemplVotingView($this->sType, $aData[0]['id']);
             $aUnit = array('url' => BX_DOL_URL_ROOT . $oFile->_oConfig->getBaseUri() . 'rate', 'fileBody' => $this->oMedia->oTemplate->getFileConcept($aData[0]['id']), 'ratePart' => $oVotingView->isEnabled() ? $oVotingView->getBigVoting() : '', 'fileTitle' => $aData[0]['title'], 'fileUri' => $this->oMedia->getCurrentUrl('file', $aData[0]['id'], $aData[0]['uri']), 'fileWhen' => defineTimeInterval($aData[0]['date']), 'fileFrom' => $aData[0]['ownerName'], 'fileFromLink' => getProfileLink($aData[0]['ownerId']), 'infoWidth' => $iInfoWidth > 0 ? $iInfoWidth + 2 : '');
             $sCode = $this->oMedia->oTemplate->parseHtmlByName('rate_object.html', $aUnit);
             checkAction($this->iViewer, $this->oMedia->oModule->_defineActionName('view'), true);
         } else {
             $sCode = MsgBox(_t('_bx_sounds_no_file_for_rate'));
         }
     }
     return $sCode;
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:22,代码来源:BxSoundsRate.php

示例5: ActionPrintAdvertisement

    /**
     * Generate presentation Advertisement code with images and other
     *
     * @param $iID	ID of Advertisement
     * @return HTML presentation of data
     */
    function ActionPrintAdvertisement($iID)
    {
        global $site;
        global $aPreValues;
        $iAdvertisementID = (int) $iID;
        $sRetHtml = '';
        $sSiteUrl = BX_DOL_URL_ROOT;
        if ($this->bAdminMode && $iAdvertisementID > 0) {
            $iFeaturedStatus = $this->_oDb->getFeaturedStatus($iAdvertisementID);
            $iNewStatus = $iFeaturedStatus == 1 ? 0 : 1;
            if (bx_get('do') == 'cfs') {
                $this->_oDb->UpdateFeatureStatus($iAdvertisementID, $iNewStatus);
            }
        }
        $aSqlResStr = $this->_oDb->getAdInfo($iAdvertisementID);
        if ($aSqlResStr) {
            $iOwnerID = (int) $aSqlResStr['IDProfile'];
            $bPossibleToView = $this->oPrivacy->check('view', $iAdvertisementID, $this->_iVisitorID);
            if ($this->isAllowedView($iOwnerID, true) == false || $bPossibleToView == false) {
                return $this->_oTemplate->displayAccessDenied();
            }
            bx_import('BxDolViews');
            new BxDolViews('ads', $iAdvertisementID);
            $aNameRet = getProfileInfo($aSqlResStr['IDProfile']);
            $sCountryName = $aSqlResStr['Country'];
            $sCountryPic = $sCountryName == '' ? '' : ' <img alt="' . $sCountryName . '" src="' . ($site['flags'] . strtolower($sCountryName)) . '.gif"/>';
            $sCountryName = _t($aPreValues['Country'][$sCountryName]['LKey']);
            $sPostedByC = _t('_bx_ads_Posted_by');
            $sPhoneC = _t('_Phone');
            $sDetailsC = _t('_bx_ads_Details');
            $sUserOtherListC = _t('_bx_ads_Users_other_listing');
            $sActionsC = _t('_Actions');
            $sSureC = _t('_Are_you_sure');
            $sPostedBy .= '<div class="cls_res_info">';
            $sPostedBy .= $sPostedByC . ': <span style="color:#333333;"><a href="' . getProfileLink($aNameRet['ID']) . '">' . $aNameRet['NickName'] . '</a></span>';
            $sPostedBy .= '</div>';
            if ($aNameRet['Phone'] != "") {
                $sPostedBy .= '<div class="cls_res_info">';
                $sPostedBy .= $sPhoneC . ": <div class=\"clr3\">{$aNameRet['Phone']}</div>";
                $sPostedBy .= '</div>';
            }
            $sTimeAgo = defineTimeInterval($aSqlResStr['DateTime_UTS'], false);
            $aTags = array();
            $aTagsLinks = array();
            $aTags = preg_split("/[;,]/", $aSqlResStr['Tags']);
            foreach ($aTags as $sTag) {
                $sSubLink = $this->bUseFriendlyLinks ? "ads/tag/" : $this->sHomeUrl . "classifieds_tags.php?tag=";
                $sTagS = htmlspecialchars(title2uri($sTag));
                $aTagsLinks[] = '<a href="' . "{$sSubLink}{$sTagS}" . '">' . $sTag . '</a>';
            }
            $sTags .= implode(", ", $aTagsLinks);
            $sMemberActionForms = '';
            if ($this->_iVisitorID > 0 && $this->_iVisitorID != $aNameRet['ID']) {
                //print Send PM button and other actions
                if (getParam('bx_ads_enable_paid') == 'on') {
                    $sMemberActionForms .= <<<EOF
<form action="{$this->sCurrBrowsedFile}" name="BuyNowForm" method="post">
    <input type="hidden" name="BuyNow" value="BuyNow" />
    <input type="hidden" name="IDAdv" value="{$iAdvertisementID}" />
    <input type="hidden" name="IDSeller" value="{$aSqlResStr['IDProfile']}" />
</form>
EOF;
                }
                $sMemberActionForms .= <<<EOF
<form action="{$sSiteUrl}mail.php" name="post_pm" id="post_pm" method="get">
    <input type="hidden" name="mode" value="compose" />
    <input type="hidden" name="recipient_id" value="{$aSqlResStr['IDProfile']}" />
    <input type="hidden" name="subject" value="{$aSqlResStr['Subject']}" />
</form>
EOF;
            }
            $sEntryUrl = $this->genUrl($iAdvertisementID, $aSqlResStr['EntryUri'], 'entry');
            $sMediaIDs = $this->_oDb->getMediaOfAd($iAdvertisementID);
            if ($sMediaIDs != '') {
                $aReadyMedia = explode(',', $sMediaIDs);
                $sPictureSectContent = $this->_blockPhoto($aReadyMedia, $iOwnerID);
            }
            $sPictureSect = $sPictureSectContent != '' ? DesignBoxContent(_t('_bx_ads_Ad_photos'), $sPictureSectContent, 1) : '';
            $this->sTAPhotosContent = $sPictureSectContent;
            bx_import('BxDolSubscription');
            $oSubscription = BxDolSubscription::getInstance();
            $aButton = $oSubscription->getButton($this->_iVisitorID, $this->_oConfig->getUri(), '', $iAdvertisementID);
            $aActionKeys = array('BaseUri' => $this->_oConfig->getBaseUri(), 'visitor_id' => $this->_iVisitorID, 'owner_id' => $aNameRet['ID'], 'admin_mode' => "'" . $this->bAdminMode . "'", 'ads_id' => $iAdvertisementID, 'ads_status' => $aSqlResStr['Status'], 'ads_act_type' => $aSqlResStr['Status'] == 'active' ? 'inactive' : 'active', 'ads_featured' => (int) $aSqlResStr['Featured'], 'sure_label' => $sSureC, 'ads_entry_url' => $sEntryUrl, 'only_menu' => 0, 'sbs_ads_title' => $aButton['title'], 'sbs_ads_script' => $aButton['script'], 'TitleShare' => $this->isAllowedShare($aSqlResStr) ? _t('_Share') : '');
            $sActionsTable = $GLOBALS['oFunctions']->genObjectsActions($aActionKeys, 'bx_ads', false);
            $sSubsAddon = $oSubscription->getData();
            $sActionsSectContent = $sSubsAddon . $sMemberActionForms . $sActionsTable;
            $sActionsSect = $this->_iVisitorID > 0 || $this->bAdminMode ? DesignBoxContent($sActionsC, $sActionsSectContent, 1) : '';
            $this->sTAActionsContent = $this->_iVisitorID > 0 || $this->bAdminMode ? $sActionsSectContent : '';
            bx_import('Cmts', $this->_aModule);
            $this->oCmtsView = new BxAdsCmts($this->_oConfig->getCommentSystemName(), $iAdvertisementID);
            $sCommentsSectContent = $this->oCmtsView->getExtraCss();
            $sCommentsSectContent .= $this->oCmtsView->getExtraJs();
            $sCommentsSectContent .= !$this->oCmtsView->isEnabled() ? '' : $this->oCmtsView->getCommentsFirst();
            $this->sTACommentsContent = $sCommentsSectContent;
//.........这里部分代码省略.........
开发者ID:newton27,项目名称:dolphin.pro,代码行数:101,代码来源:BxAdsModule.php

示例6: getRate

 function getRate($iFile)
 {
     $iFile = (int) $iFile;
     $sCode = '<center>' . _t('_rating not enabled') . '</center>';
     $oVotingView = new BxTemplVotingView($this->_oConfig->getMainPrefix(), $iFile);
     if ($oVotingView->isEnabled()) {
         $sCode = $oVotingView->getBigVoting();
     }
     return $sCode;
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:10,代码来源:BxDolFilesTemplate.php

示例7: BxTemplVotingView

 function getBlockCode_ViewFile()
 {
     $oVotingView = new BxTemplVotingView('bx_files', $this->aFileInfo['medID']);
     if ($this->aFileInfo['prevItem'] > 0) {
         $aPrev = $this->oDb->getFileInfo(array('fileId' => $this->aFileInfo['prevItem']), true, array('medUri', 'medTitle'));
     }
     if ($this->aFileInfo['nextItem'] > 0) {
         $aNext = $this->oDb->getFileInfo(array('fileId' => $this->aFileInfo['nextItem']), true, array('medUri', 'medTitle'));
     }
     //icon
     $sIcon = $this->oDb->getTypeIcon($this->aFileInfo['Type']);
     if (!$sIcon) {
         $sIcon = 'default.png';
     }
     $aUnit = array('pic' => $this->oTemplate->getIconUrl($sIcon), 'fileTitle' => $this->aFileInfo['medTitle'], 'fileSize' => (int) $this->aFileInfo['medSize'] > 0 ? _t_format_size((int) $this->aFileInfo['medSize']) : 0, 'fileExt' => $this->aFileInfo['medExt'], 'fileDescription' => $this->aFileInfo['medDesc'], 'rate' => $oVotingView->isEnabled() ? $oVotingView->getBigVoting(1, $this->aFileInfo['Rate']) : '', 'favInfo' => $this->oDb->getFavoritesCount($this->aFileInfo['medID']), 'viewInfo' => $this->aFileInfo['medViews'], 'albumUri' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'browse/album/' . $this->aFileInfo['albumUri'] . '/owner/' . $this->aFileInfo['NickName'], 'albumCaption' => $this->aFileInfo['albumCaption'], 'bx_if:prev' => array('condition' => $this->aFileInfo['prevItem'] > 0, 'content' => array('linkPrev' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'view/' . $aPrev['medUri'], 'titlePrev' => $aPrev['medTitle'], 'percent' => $this->aFileInfo['nextItem'] > 0 ? 50 : 100)), 'bx_if:next' => array('condition' => $this->aFileInfo['nextItem'] > 0, 'content' => array('linkNext' => BX_DOL_URL_ROOT . $this->oConfig->getBaseUri() . 'view/' . $aNext['medUri'], 'titleNext' => $aNext['medTitle'], 'percent' => $this->aFileInfo['prevItem'] > 0 ? 50 : 100)));
     $sCode = $this->oTemplate->parseHtmlByName('view_unit.html', $aUnit);
     return array($sCode, array(), array(), false);
 }
开发者ID:noormcs,项目名称:studoro,代码行数:18,代码来源:BxFilesPageView.php

示例8: getConditionArray

 function getConditionArray($logged)
 {
     $aWhere = array();
     $aWhere[] = '1';
     $iUser = 0;
     if (isset($_GET['ownerName'])) {
         $sName = process_db_input($_GET['ownerName']);
         $iUser = (int) db_value("SELECT `ID` FROM `Profiles` WHERE `NickName`='{$sName}'");
     } elseif (isset($_GET['userID'])) {
         $iUser = (int) $_GET['userID'];
     }
     if ($iUser) {
         $aWhere[] = "`{$this->sMainTable}`.`{$this->aTableFields['medProfId']}`={$iUser}";
     }
     if (isset($_GET['tag'])) {
         $sTag = htmlspecialchars_adv($_GET['tag']);
         $aWhere[] = "`{$this->sMainTable}`.`{$this->aTableFields['medTags']}` like '%{$sTag}%'";
     }
     if (isset($_GET['action'])) {
         $sAct = htmlspecialchars_adv($_GET['action']);
         switch ($sAct) {
             case 'fav':
                 $sAddon = $this->getFavoriteCondition($this->iViewer);
                 break;
             case 'del':
                 $sAddon = '';
                 if (isset($_GET['fileID'])) {
                     $this->deleteMedia($_GET['fileID'], $logged);
                 }
                 break;
         }
     }
     $aSqlQuery['sqlWhere'] = "WHERE " . implode(' AND ', $aWhere) . $sAddon . " AND `Approved`= 'true'";
     $iTotalNum = db_value("SELECT COUNT( * ) FROM `{$this->sMainTable}` {$aSqlQuery['sqlWhere']}");
     if (!$iTotalNum) {
         return false;
     }
     $iPerPage = (int) $_GET['per_page'];
     if (!$iPerPage) {
         $iPerPage = 10;
     }
     $iTotalPages = ceil($iTotalNum / $iPerPage);
     $iCurPage = (int) $_GET['page'];
     if ($iCurPage > $iTotalPages) {
         $iCurPage = $iTotalPages;
     }
     if ($iCurPage < 1) {
         $iCurPage = 1;
     }
     $sLimitFrom = ($iCurPage - 1) * $iPerPage;
     $aSqlQuery['sqlLimit'] = "LIMIT {$sLimitFrom}, {$iPerPage}";
     $aSqlQuery['sqlOrder'] = 'ORDER BY `medDate` DESC';
     if (isset($_GET['rate'])) {
         $oVotingView = new BxTemplVotingView('g' . $this->sType, 0, 0);
         $aSql = $oVotingView->getSqlParts('`' . $this->sMainTable . '`', '`' . $this->aTableFields['medID'] . '`');
         $sHow = $_GET['rate'] == 'top' ? "DESC" : "ASC";
         $aSqlQuery['sqlOrder'] = $oVotingView->isEnabled() ? "ORDER BY `voting_rate` {$sHow}, `voting_count` {$sHow}, `medDate` {$sHow}" : $aSqlQuery['sqlOrder'];
         $aSqlQuery['rateFields'] = $aSql['fields'];
         $aSqlQuery['rateJoin'] = $aSql['join'];
     }
     return array('query' => $aSqlQuery, 'total' => $iTotalPages, 'per_page' => $iPerPage, 'cur_page' => $iCurPage);
 }
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:62,代码来源:BxDolSharedMedia.php

示例9: showPreviousRated

function showPreviousRated($iPhotoID)
{
    global $site;
    global $oTemplConfig;
    global $max_thumb_width;
    global $max_thumb_height;
    $iBarWidth = $oTemplConfig->iRateSmallRatingBar;
    $iBarNum = $oTemplConfig->iRateSmallRatingBarNum;
    $query = "\r\n\t\tSELECT\r\n\t\t\t`media`.`med_id`,\r\n\t\t\t`med_prof_id`,\r\n\t\t\t`med_file`,\r\n\t\t\t`med_title`,\r\n\t\t\t`med_rating_count`,\r\n\t\t\t`med_rating_sum`,\r\n\t\t\t`Profiles`.`NickName`\r\n\t\tFROM `media`\r\n\t\tLEFT JOIN `media_rating` USING (`med_id`)\r\n\t\tLEFT JOIN `Profiles` ON\r\n\t\t\t(`Profiles`.`ID`=`media`.`med_prof_id`)\r\n\t\tWHERE\r\n\t\t\t`med_status` = 'active'\r\n\t\t\tAND `media`.`med_id` = {$iPhotoID}\r\n\t\t";
    $ph_arr = db_arr($query);
    if (!$ph_arr) {
        return '';
    }
    $urlImg = "{$site['profileImage']}{$ph_arr['med_prof_id']}/thumb_{$ph_arr['med_file']}";
    $urlSpacer = getTemplateIcon('spacer.gif');
    $sProfLink = getProfileLink($ph_arr['med_prof_id']);
    $sRatingBar = '';
    $oVotingView = new BxTemplVotingView('media', (int) $iPhotoID);
    if ($oVotingView->isEnabled()) {
        $sRatingBar = $oVotingView->getSmallVoting(false);
    }
    $ret .= <<<EOJ
\t<div class="rate_prev_photo_block">
\t\t<div class="thumbnail_block" style="float:none;">
\t\t\t<a href="{$site['url']}photos_gallery.php?ID={$ph_arr['med_prof_id']}&amp;photoID={$ph_arr['med_id']}" title="{$ph_arr['med_title']}">
\t\t\t\t<img style="width:{$max_thumb_width}px;height:{$max_thumb_height}px;background-image:url({$urlImg});" src="{$urlSpacer}" />
\t\t\t</a>
\t\t</div>
\t\t<div class="rate_prev_photo_nickname">
\t\t\t<a href="{$sProfLink}">{$ph_arr['NickName']}</a>
\t\t</div>
\t\t<div style="position:relative; width:50%; height:30px; overflow:visible; margin-top:10px;">
\t\t\t<div style="position:absolute; right:-94px; width:400px; height:30px;">
\t\t\t\t{$sRatingBar}
\t\t\t</div>\t\t\t
\t\t</div>

\t</div>
EOJ;
    return DesignBoxContent(_t('_Previous rated'), $ret, 1);
}
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:41,代码来源:rate.php

示例10: array

 function getBlockCode_ViewImage()
 {
     $aFile = BxDolService::call('photos', 'get_photo_array', array($this->_aSite['photo'], 'file'), 'Search');
     $sImage = $aFile['no_image'] ? '' : $aFile['file'];
     $sVote = '';
     $sSiteUrl = $this->_aSite['url'];
     if (strncasecmp($sSiteUrl, 'http://', 7) != 0) {
         $sSiteUrl = 'http://' . $sSiteUrl;
     }
     if ($this->_oConfig->isVotesAllowed() && $this->_oSites->oPrivacy->check('rate', $this->_aSite['id'], $this->_oSites->iOwnerId)) {
         bx_import('BxTemplVotingView');
         $oVotingView = new BxTemplVotingView('bx_sites', $this->_aSite['id']);
         if ($oVotingView->isEnabled()) {
             $sVote = $oVotingView->getBigVoting();
         }
     }
     return $this->_oTemplate->parseHtmlByName('view_image.html', array('title' => $this->_aSite['title'], 'site_url' => $sSiteUrl, 'site_url_view' => $this->_aSite['url'], 'image' => $sImage ? $sImage : $this->_oTemplate->getIconUrl('no-photo-110.png'), 'image_fave' => $this->_oTemplate->getIconUrl('action_fave.png'), 'image_view' => $this->_oTemplate->getIconUrl('eye.png'), 'vote' => $sVote, 'view_count' => $this->_aSite['views']));
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:18,代码来源:BxSitesPageView.php

示例11: getMediaBlock

    function getMediaBlock($iMediaID = 0, $bCouple = false)
    {
        global $site;
        global $votes_pic;
        $ret = '';
        if ($this->iMediaCount > 0) {
            $iMediaID = $iMediaID > 0 ? $iMediaID : $this->aMedia['0']['PrimPhoto'];
            $aCurPhoto = $this->getElementArrayByID($iMediaID);
            if (empty($aCurPhoto)) {
                $sPhotoUrl = getTemplateIcon($this->sSexPic);
            } else {
                $iPhotoID = $aCurPhoto['med_id'];
                $sPhotoUrl = $this->sMediaUrl . 'photo_' . $aCurPhoto['med_file'];
            }
        } else {
            $sPhotoUrl = getTemplateIcon($this->sSexPic);
        }
        $bUseFeature = getParam("profile_gallery_feature") == "on" ? true : false;
        //$bUseFeature = true;
        $bSUseFeature = $bUseFeature ? 'true' : 'false';
        $ret .= $this->getJSCode($aCurPhoto, $bSUseFeature);
        $sFeature = '';
        if ($bUseFeature) {
            for ($i = 0; $i < $this->aMediaConfig['max']['photo']; $i++) {
                $sIconSrc = $this->sMediaDir . 'photo_' . $this->aMedia[$i]['med_file'];
                if (extFileExists($sIconSrc)) {
                    $sIconUrl = $this->sMediaUrl . 'photo_' . $this->aMedia[$i]['med_file'];
                    //$atrib = "'{$this -> aMedia[$i]['med_id']}'";
                    //$sFeatImgs .= '<a href="' . $site['url'] . 'photos_gallery.php?ID=' .  $this -> iProfileID . '">';
                    $sFeatImgs .= '<img src="' . getTemplateIcon('spacer.gif') . '" style="width:' . $this->aMediaConfig['size']['photoWidth'] . 'px; height:' . $this->aMediaConfig['size']['photoHeight'] . 'px; background-image:url(' . $sIconUrl . ');position:absolute;"  alt="" class="icons" />';
                    //$sFeatImgs .= '</a>';
                }
            }
            $sFeatTotalHeight = $this->aMediaConfig['size']['photoHeight'] + 30;
            $sFeature = <<<EOF
<script type="text/javascript" src="{$site['url']}inc/js/jquery.dolPromoT.js"></script>
<script type="text/javascript">
\t\$(document).ready( function() {
\t\t\$( '#iiPPhoto' ).dolPromo( 3000, 1 );
\t} );
</script>
<div style="position:relative;width:100%;height:{$sFeatTotalHeight}px;overflow:hidden;">
\t<div id="iiPPhoto">
\t\t{$sFeatImgs}
\t</div>
</div>
EOF;
            $ret .= $sFeature;
        } else {
            $ret .= '<div class="photoBlock" id="photoKeeper">';
            $style = 'width:' . $this->aMediaConfig['size']['photoWidth'] . 'px;' . 'height:' . $this->aMediaConfig['size']['photoHeight'] . 'px;' . 'background-image:url(' . $sPhotoUrl . ');';
            $ret .= '<a href="' . $site['url'] . 'photos_gallery.php?ID=' . $this->iProfileID . '" id="temThumbLink">';
            $ret .= '<img src="' . getTemplateIcon('spacer.gif') . '" style="' . $style . '" class="photo" alt="" id="temThumbID" />';
            //$ret .= '<img src="' . getTemplateIcon('spacer.gif') . '" style="' . $style . '" class="photo" alt="" onload="return setThumb();" id="temThumbID" />';
            $ret .= '</a>';
            $ret .= '</div>';
        }
        $ret .= '<div id="temPhotoTitle" class="photo_title">' . stripslashes($aCurPhoto['med_title']) . '</div>';
        if ($bCouple) {
            return $ret . '<div class="clear_both"></div>';
        }
        $sJsIconsArray = '';
        $iCountPhotos = 0;
        $sIcons = $this->_getIconsList2($sJsIconsArray, $iCountPhotos);
        $oVotingView = new BxTemplVotingView('media', (int) $aCurPhoto['med_id']);
        if ($iCountPhotos && $votes_pic && $oVotingView->isEnabled()) {
            $ret .= $oVotingView->getSmallVoting();
        }
        $ret .= '<div class="clear_both"></div>';
        if (strlen($sIcons)) {
            $ret .= '<div class="scrollIconContainer">';
            $ret .= '<div class="scrollCont" id="scrollCont">';
            $ret .= '<div class="scrollLeft"  onmouseover="moveScrollLeftAuto(  \'iconBlock\', 1 );" onmouseout="moveScrollLeftAuto(  \'iconBlock\', 0 );"><img src="' . getTemplateIcon('left_arrow.gif') . '"/></div>';
            $ret .= '<div class="scrollRight" onmouseover="moveScrollRightAuto( \'iconBlock\', 1 );" onmouseout="moveScrollRightAuto( \'iconBlock\', 0 );"><img src="' . getTemplateIcon('right_arrow.gif') . '"/></div>';
            $ret .= '<div class="clear_both"></div>';
            $ret .= '</div>';
            $ret .= '<div class="iconBlockCont">';
            $ret .= '<div id="iconBlock" class="iconBlock">';
            $ret .= $sIcons;
            $ret .= '</div>';
            $ret .= '</div>';
            $ret .= '</div>';
        }
        $ret .= '<script type="text/javascript">' . $sJsIconsArray . '</script>';
        return $ret;
    }
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:86,代码来源:profilePhotos.php

示例12: PageCompLastFiles

function PageCompLastFiles()
{
    global $site;
    global $aFile;
    $iLimit = 2;
    $sQuery = "SELECT `medID`,\r\n\t\t\t\t\t  `medTitle`,\r\n\t\t\t\t\t  UNIX_TIMESTAMP(`medDate`) as `medDate`,\r\n\t\t\t\t\t  `medExt`,\r\n\t\t\t\t\t  `medViews`\r\n\t\t\t\t\t  FROM `sharePhotoFiles` \r\n\t\t\t\t\t  WHERE `medProfId`='{$aFile['medProfId']}' \r\n\t\t\t\t\t  AND `medID`<>'{$aFile['medID']}' AND `Approved`='true' ORDER BY `medDate` DESC LIMIT {$iLimit}";
    $rLast = db_res($sQuery);
    $sLinkMore = '';
    if ($aFile['medCount'] - 1 > $iLimit) {
        $sLinkMore = '<a href="browsePhoto.php?userID=' . $aFile['medProfId'] . '">' . _t("_See all photos of this user") . '</a>';
    }
    $sCode = '<div id="lastFiles">';
    while ($aLast = mysql_fetch_array($rLast)) {
        $sImage = $site['sharingImages'] . $aLast['medID'] . '_t.' . $aLast['medExt'];
        $sTitle = strlen($aLast['medTitle']) > 0 ? $aLast['medTitle'] : _t("_Untitled");
        $oVotingView = new BxTemplVotingView('gphoto', $aLast['medID']);
        if ($oVotingView->isEnabled()) {
            $sRate = $oVotingView->getSmallVoting(0);
            $sShowRate = '<div class="galleryRate">' . $sRate . '</div>';
        }
        $sCode .= '<div class="lastFileUnit">';
        $sCode .= '<a href="' . $site['url'] . 'viewPhoto.php?fileID=' . $aLast['medID'] . '">';
        $sCode .= '<img class="lastFilesPic" style="background-image: url(\'' . $sImage . '\');" src="' . getTemplateIcon('spacer.gif') . '" />';
        $sCode .= '</a>';
        $sCode .= '<div><a href="' . $site['url'] . 'viewPhoto.php?fileID=' . $aLast['medID'] . '"><b>' . $sTitle . '</b></a></div>';
        $sCode .= '<div>' . _t("_Added") . ': <b>' . defineTimeInterval($aLast['medDate']) . '</b></div>';
        $sCode .= '<div>' . _t("_Views") . ': <b>' . $aLast['medViews'] . '</b></div>';
        $sCode .= $sShowRate;
        $sCode .= '</div>';
        $sCode .= '<div class="clear_both"></div>';
    }
    $sCode .= '<div class="lastFilesLink">' . $sLinkMore . '</div>';
    $sCode .= '</div>';
    return $sCode;
}
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:35,代码来源:viewPhoto.php

示例13: getMediaBlock

 function getMediaBlock($iMediaID = 0)
 {
     global $site;
     global $votes_pic;
     $ret = '';
     if ($this->iMediaCount > 0) {
         $iMediaID = $iMediaID > 0 ? $iMediaID : $this->aMedia['0']['PrimPhoto'];
         $aCurPhoto = $this->getElementArrayByID($iMediaID);
         if (empty($aCurPhoto)) {
             $sPhotoUrl = getTemplateIcon($this->sSexPic);
         } else {
             $iPhotoID = $aCurPhoto['med_id'];
             $sPhotoUrl = $this->sMediaUrl . 'photo_' . $aCurPhoto['med_file'];
         }
     } else {
         $sPhotoUrl = getTemplateIcon($this->sSexPic);
     }
     $ret .= $this->getJSCode($aCurPhoto);
     $ret .= '<div class="photoBlock" id="photoKeeper">';
     $style = 'width:' . $this->aMediaConfig['size']['photoWidth'] . 'px;' . 'height:' . $this->aMediaConfig['size']['photoHeight'] . 'px;' . 'background-image:url(' . $sPhotoUrl . ');';
     $ret .= '<a href="' . $site['url'] . 'photos_gallery.php?ID=' . $this->iProfileID . '" id="temThumbLink">';
     $ret .= '<img src="' . getTemplateIcon('spacer.gif') . '" style="' . $style . '" class="photo" alt="" id="temThumbID" />';
     //$ret .= '<img src="' . getTemplateIcon('spacer.gif') . '" style="' . $style . '" class="photo" alt="" onload="return setThumb();" id="temThumbID" />';
     $ret .= '</a>';
     $ret .= '</div>';
     $ret .= '<div id="temPhotoTitle" class="photo_title">' . stripslashes($aCurPhoto['med_title']) . '</div>';
     $sJsIconsArray = '';
     $iCountPhotos = 0;
     $sIcons = $this->_getIconsList2($sJsIconsArray, $iCountPhotos);
     $oVotingView = new BxTemplVotingView('media', (int) $aCurPhoto['med_id']);
     if ($iCountPhotos && $votes_pic && $oVotingView->isEnabled()) {
         $ret .= $oVotingView->getSmallVoting();
     }
     $ret .= '<div class="clear_both"></div>';
     if (strlen($sIcons)) {
         $ret .= '<div class="scrollIconContainer">';
         $ret .= '<div class="scrollCont" id="scrollCont">';
         $ret .= '<div class="scrollLeft"  onmouseover="moveScrollLeftAuto(  \'iconBlock\', 1 );" onmouseout="moveScrollLeftAuto(  \'iconBlock\', 0 );"><img src="' . getTemplateIcon('left_arrow.gif') . '"/></div>';
         $ret .= '<div class="scrollRight" onmouseover="moveScrollRightAuto( \'iconBlock\', 1 );" onmouseout="moveScrollRightAuto( \'iconBlock\', 0 );"><img src="' . getTemplateIcon('right_arrow.gif') . '"/></div>';
         $ret .= '<div class="clear_both"></div>';
         $ret .= '</div>';
         $ret .= '<div class="iconBlockCont">';
         $ret .= '<div id="iconBlock" class="iconBlock">';
         $ret .= $sIcons;
         $ret .= '</div>';
         $ret .= '</div>';
         $ret .= '</div>';
     }
     $ret .= '<script type="text/javascript">' . $sJsIconsArray . '</script>';
     return $ret;
 }
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:51,代码来源:profilePhotos.php

示例14: getRateBlock

 function getRateBlock()
 {
     if ($this->iPostViewType == 3 && $this->iViewingPostID > 0) {
         bx_import('BxTemplVotingView');
         $bPossibleToRate = $this->oPrivacy->check('rate', $this->iViewingPostID, $this->_iVisitorID);
         $oVotingView = new BxTemplVotingView('blogposts', $this->iViewingPostID);
         if ($oVotingView && $oVotingView->isEnabled() && $bPossibleToRate) {
             $sVotePostRating = $oVotingView->getBigVoting(1);
         } else {
             $sVotePostRating = $oVotingView->getBigVoting(0);
         }
         return $sVotePostRating;
     }
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:14,代码来源:BxBlogsModule.php

示例15: PageCompPageMainCode

function PageCompPageMainCode()
{
    global $site;
    global $rData;
    global $iTotalPages;
    global $iCurPage;
    global $iPerPage;
    global $member;
    $sCode = '<div style="position: relative; float: left;">';
    if (mysql_num_rows($rData)) {
        while ($aData = mysql_fetch_array($rData)) {
            $sImage = $site['sharingImages'] . $aData['medID'] . '_t.' . $aData['medExt'];
            $sProfLink = '<div>' . _t("_By") . ': <a href="' . getProfileLink($aData['medProfId']) . '">' . $aData['NickName'] . '</a></div>';
            $oVotingView = new BxTemplVotingView('gphoto', $aData['medID']);
            if ($oVotingView->isEnabled()) {
                $sRate = $oVotingView->getSmallVoting(0);
                $sShowRate = '<div class="galleryRate">' . $sRate . '</div>';
            }
            $sHref = $site['url'] . 'viewPhoto.php?fileID=' . $aData['medID'];
            $sImg = '<div class="lastFilesPic" style="background-image: url(\'' . $sImage . '\');">
					  <a href="' . $sHref . '"><img src="' . $site['images'] . 'spacer.gif" width="110" height="110"></a></div>';
            $sPicTitle = strlen($aData['medTitle']) > 0 ? $aData['medTitle'] : _t("_Untitled");
            $sDelLink = $member['ID'] == $aData['medProfId'] ? '<div><a href="' . $_SERVER['PHP_SELF'] . '?action=del&fileID=' . $aData['medID'] . '"
			onClick="return confirm( \'' . _t("_are you sure?") . '\');">' . _t("_Delete") . '</a></div>' : "";
            $sCode .= '<div class="browseUnit">';
            $sCode .= $sImg;
            $sCode .= '<div><a href="' . $sHref . '"><b>' . $sPicTitle . '</b></a></div>';
            $sCode .= $sProfLink;
            $sCode .= '<div>' . _t("_Added") . ': <b>' . defineTimeInterval($aData['medDate']) . '</b></div>';
            $sCode .= '<div>' . _t("_Views") . ': <b>' . $aData['medViews'] . '</b></div>';
            $sCode .= $sShowRate;
            $sCode .= $sDelLink;
            $sCode .= '</div>';
        }
    }
    $sCode .= '<div class="clear_both"></div>';
    // generate pagination
    if ($iTotalPages > 1) {
        $sRequest = $_SERVER['PHP_SELF'] . '?';
        $aFields = array('userID', 'tag', 'rate');
        foreach ($aFields as $field) {
            if (isset($_GET[$field])) {
                $sRequest .= "&amp;{$field}=" . htmlentities(process_pass_data($_GET[$field]));
            }
        }
        $pagination = '<div style="text-align: center; position: relative;">' . _t("_Results per page") . ':
				<select name="per_page" onchange="window.location=\'' . $sRequest . '&amp;per_page=\' + this.value;">
					<option value="10"' . ($iPerPage == 10 ? ' selected="selected"' : '') . '>10</option>
					<option value="20"' . ($iPerPage == 20 ? ' selected="selected"' : '') . '>20</option>
					<option value="50"' . ($iPerPage == 50 ? ' selected="selected"' : '') . '>50</option>
					<option value="100"' . ($iPerPage == 100 ? ' selected="selected"' : '') . '>100</option>
				</select></div>' . genPagination($iTotalPages, $iCurPage, $sRequest . '&amp;page={page}&amp;per_page=' . $iPerPage);
    } else {
        $pagination = '';
    }
    return $sCode . $pagination . '</div>';
}
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:57,代码来源:browsePhoto.php


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