• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP htmlspecialchars_adv函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中htmlspecialchars_adv函数的典型用法代码示例。如果您正苦于以下问题:PHP htmlspecialchars_adv函数的具体用法?PHP htmlspecialchars_adv怎么用?PHP htmlspecialchars_adv使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: serviceKeywordsCloud

 /**
  * Get keywords cloud.
  * @param $sObject metatgs object to get keywords cloud for
  * @param $mixedSection search section to refer when keyword is clicked, set the same as $sObject to show content withing the module only, it can be one value or array of values, leave empty to show all possible content upon keyword click
  * @param $iMaxCount number of tags in keywords cloud, by default @see BX_METATAGS_KEYWORDS_IN_CLOUD
  * @return tags cloud HTML string
  */
 public function serviceKeywordsCloud($sObject, $mixedSection, $iMaxCount = BX_METATAGS_KEYWORDS_IN_CLOUD)
 {
     $o = BxDolMetatags::getObjectInstance($sObject);
     $aKeywords = $o->keywordsPopularList($iMaxCount);
     if (!$aKeywords) {
         return '';
     }
     ksort($aKeywords, SORT_LOCALE_STRING);
     $iFontDiff = floor($this->_iKeywordsCloudFontSizeMax - $this->_iKeywordsCloudFontSizeMin);
     $iMinRating = min($aKeywords);
     $iMaxRating = max($aKeywords);
     $iRatingDiff = $iMaxRating - $iMinRating;
     $iRatingDiff = $iRatingDiff == 0 ? 1 : $iRatingDiff;
     $sSectionPart = '';
     if (is_array($mixedSection)) {
         $sSectionPart = '&section[]=' . implode('&section[]=', $mixedSection);
     } elseif (is_string($mixedSection)) {
         $sSectionPart = '&section[]=' . $mixedSection;
     }
     $aUnits = array();
     foreach ($aKeywords as $sKeyword => $iCount) {
         $aUnits[] = array('size' => $this->_iKeywordsCloudFontSizeMin + floor($iFontDiff * (($iCount - $iMinRating) / $iRatingDiff)), 'href' => BX_DOL_URL_ROOT . 'searchKeyword.php?type=keyword&keyword=' . rawurlencode($sKeyword) . $sSectionPart, 'count' => $iCount, 'keyword' => htmlspecialchars_adv($sKeyword));
     }
     $aVars = array('bx_repeat:units' => $aUnits);
     $this->addCssJs();
     return BxDolTemplate::getInstance()->parseHtmlByName('metatags_keywords_cloud.html', $aVars);
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:34,代码来源:BxBaseServiceMetatags.php


示例2: getCategoriesView

 function getCategoriesView($aTotalCategories, $sHrefTempl, $iColumns)
 {
     global $oSysTemplate;
     if (empty($aTotalCategories)) {
         return MsgBox(_t('_Empty'));
     }
     if (!$iColumns) {
         $iColumns = 1;
     }
     $iCount = count($aTotalCategories);
     $iRowCount = floor($iCount / $iColumns) + ($iCount % $iColumns ? 1 : 0);
     $iWidthPr = floor(100 / $iColumns);
     $i = 0;
     $sCode = '<div class="categories_wrapper bx-def-bc-margin bx-def-font-large">';
     foreach ($aTotalCategories as $sCategory => $iCatCount) {
         if (!($i % $iRowCount)) {
             if ($i) {
                 $sCode .= '</div>';
             }
             $sCode .= '<div class="categories_col" style="width: ' . $iWidthPr . '%">';
         }
         $aUnit['catHref'] = str_replace('{tag}', rawurlencode(title2uri($sCategory)), $sHrefTempl);
         $aUnit['category'] = htmlspecialchars_adv($sCategory);
         $aUnit['count'] = $iCatCount;
         if ($this->_sCategTmplContent) {
             $sCode .= $oSysTemplate->parseHtmlByContent($this->_sCategTmplContent, $aUnit);
         } else {
             $sCode .= $oSysTemplate->parseHtmlByName($this->_sCategTmplName, $aUnit);
         }
         $i++;
     }
     $sCode .= '</div></div>';
     return $sCode;
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:34,代码来源:BxBaseCategories.php


示例3: getTagsView

 function getTagsView($aTotalTags, $sHrefTempl)
 {
     global $oTemplConfig;
     global $oSysTemplate;
     if (empty($aTotalTags)) {
         return MsgBox(_t('_Empty'));
     }
     $iMinFontSize = $oTemplConfig->iTagsMinFontSize;
     $iMaxFontSize = $oTemplConfig->iTagsMaxFontSize;
     $iFontDiff = $iMaxFontSize - $iMinFontSize;
     $iMinRating = min($aTotalTags);
     $iMaxRating = max($aTotalTags);
     $iRatingDiff = $iMaxRating - $iMinRating;
     $iRatingDiff = $iRatingDiff == 0 ? 1 : $iRatingDiff;
     $sCode = '<div class="tags_wrapper">';
     $aUnit = array();
     foreach ($aTotalTags as $sTag => $iCount) {
         $aUnit['tagSize'] = $iMinFontSize + round($iFontDiff * (($iCount - $iMinRating) / $iRatingDiff));
         $aUnit['tagHref'] = str_replace('{tag}', urlencode(title2uri($sTag)), $sHrefTempl);
         $aUnit['countCapt'] = _t('_Count');
         $aUnit['countNum'] = $iCount;
         $aUnit['tag'] = htmlspecialchars_adv($sTag);
         if ($this->_sTagTmplContent) {
             $sCode .= $oSysTemplate->parseHtmlByContent($this->_sTagTmplContent, $aUnit);
         } else {
             $sCode .= $oSysTemplate->parseHtmlByName($this->_sTagTmplName, $aUnit);
         }
     }
     $sCode .= '</div>';
     $sCode .= '<div class="clear_both"></div>';
     return $sCode;
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:32,代码来源:BxBaseTags.php


示例4: DesignBoxAdmin

function DesignBoxAdmin($sTitle, $sContent, $mixedTopItems = '', $sBottomItems = '', $iIndex = 1)
{
    if (is_array($mixedTopItems)) {
        $mixedButtons = array();
        foreach ($mixedTopItems as $sId => $aAction) {
            $mixedButtons[] = array('id' => $sId, 'title' => htmlspecialchars_adv(_t($aAction['title'])), 'class' => isset($aAction['class']) ? ' class="' . $aAction['class'] . '"' : '', 'icon' => isset($aAction['icon']) ? '<img' . $sClass . ' src="' . $aAction['icon'] . '" />' : '', 'href' => isset($aAction['href']) ? ' href="' . htmlspecialchars_adv($aAction['href']) . '"' : '', 'target' => isset($aAction['target']) ? ' target="' . $aAction['target'] . '"' : '', 'on_click' => isset($aAction['onclick']) ? ' onclick="' . $aAction['onclick'] . '"' : '', 'bx_if:hide_active' => array('condition' => !isset($aAction['active']) || $aAction['active'] != 1, 'content' => array()), 'bx_if:hide_inactive' => array('condition' => isset($aAction['active']) && $aAction['active'] == 1, 'content' => array()));
        }
    } else {
        $mixedButtons = $mixedTopItems;
    }
    return $GLOBALS['oAdmTemplate']->parseHtmlByName('design_box_' . (int) $iIndex . '.html', array('title' => $sTitle, 'bx_repeat:actions' => $mixedButtons, 'content' => $sContent, 'bottom_items' => $sBottomItems));
}
开发者ID:dalinhuang,项目名称:shopexts,代码行数:12,代码来源:admin_design.inc.php


示例5: getBuilderPage

 function getBuilderPage()
 {
     $aPagesForTemplate = array(array('value' => '', 'title' => _t('_adm_txt_pb_select_page'), 'selected' => empty($this->_sPage) ? 'selected="selected"' : ''));
     $aPages = $this->_getPages();
     foreach ($aPages as $r) {
         $aPagesForTemplate[] = array('value' => $r['page'], 'title' => htmlspecialchars_adv(_t($r['title'])), 'selected' => $r['page'] == $this->_sPage ? 'selected="selected"' : '');
     }
     $sPagesSelector = $GLOBALS['oAdmTemplate']->parseHtmlByName('mobile_builder_pages_selector.html', array('bx_repeat:pages' => $aPagesForTemplate, 'url' => bx_html_attribute(BX_DOL_URL_ADMIN . 'mobileBuilder.php')));
     $sPagesSelector = $GLOBALS['oAdmTemplate']->parseHtmlByName('designbox_top_controls.html', array('top_controls' => $sPagesSelector));
     if (empty($this->_sPage)) {
         $this->addExternalResources();
     }
     return $sPagesSelector . (!empty($this->_sPage) ? parent::getBuilderPage() : MsgBox(_t('_Empty')));
 }
开发者ID:boonex,项目名称:dolphin.pro,代码行数:14,代码来源:mobileBuilder.php


示例6: PageCodeTemplates

function PageCodeTemplates($sResult)
{
    $a = get_templates_array(true);
    $aTemplates = array();
    foreach ($a as $k => $r) {
        $aTemplates[] = array('key' => $k, 'name' => htmlspecialchars_adv($r['name']), 'ver' => htmlspecialchars_adv($r['ver']), 'vendor' => htmlspecialchars_adv($r['vendor']), 'desc' => $r['desc'], 'bx_if:preview' => array('condition' => (bool) $r['preview'], 'content' => array('img' => $r['preview'])), 'bx_if:no_preview' => array('condition' => !$r['preview'], 'content' => array()), 'bx_if:default' => array('condition' => $k == getParam('template'), 'content' => array()), 'bx_if:make_default' => array('condition' => $k != getParam('template'), 'content' => array('key' => $k)), 'bx_if:delete' => array('condition' => $k != getParam('template') && $k != 'uni' && $k != 'alt', 'content' => array('key' => $k)));
    }
    $s = $sResult ? MsgBox($sResult, 10) : '';
    $s .= $GLOBALS['oAdmTemplate']->parseHtmlByName('templates.html', array('bx_repeat:templates' => $aTemplates));
    $sCode = DesignBoxAdmin($GLOBALS['sPageTitle'], $s, $GLOBALS['aTopItems'], '', 11);
    if ('on' == getParam('feeds_enable')) {
        $sCode = $sCode . DesignBoxAdmin(_t('_adm_box_cpt_design_templates'), '<div class="RSSAggrCont" rssid="boonex_unity_market_templates" rssnum="5" member="0">' . $GLOBALS['oFunctions']->loadingBoxInline() . '</div>');
    }
    $GLOBALS['oAdmTemplate']->addJsTranslation(array('_Are_you_sure'));
    return $sCode;
}
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:16,代码来源:templates.php


示例7: saveMemSettings

function saveMemSettings()
{
    $aDigit = array('expire_notification_days', 'promotion_membership_days');
    $aCheck = array('expire_notify_once', 'enable_promotion_membership', 'free_mode');
    foreach ($aDigit as $i => $sVal) {
        if ($_POST[$sVal]) {
            setparam($sVal, htmlspecialchars_adv($_POST[$sVal]));
        }
    }
    foreach ($aCheck as $i => $sVal) {
        if ('on' == $_POST[$sVal]) {
            setparam($sVal, 'on');
        } else {
            setparam($sVal, '');
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:17,代码来源:memb_levels.php


示例8: getGeneral

 protected function getGeneral()
 {
     $sJsObject = $this->getPageJsObject();
     $oTemplate = BxDolStudioTemplate::getInstance();
     $sResult = '';
     $sTemplate = getParam('template');
     $aTemplates = get_templates_array(true, false);
     $aTmplVarsTemplates = array();
     foreach ($aTemplates as $sUri => $aTemplate) {
         $sIcon = $this->getModuleIcon($aTemplate, 'store');
         $bIcon = strpos($sIcon, '.') === false;
         $aTmplVarsTemplates[] = array('uri' => $sUri, 'title' => htmlspecialchars_adv($aTemplate['title']), 'version' => htmlspecialchars_adv($aTemplate['version']), 'vendor' => htmlspecialchars_adv($aTemplate['vendor']), 'bx_if:icon' => array('condition' => $bIcon, 'content' => array('icon' => $sIcon)), 'bx_if:image' => array('condition' => !$bIcon, 'content' => array('icon_url' => $sIcon)), 'bx_if:default' => array('condition' => $sUri == $sTemplate, 'content' => array()), 'bx_if:make_default' => array('condition' => $sUri != $sTemplate, 'content' => array('js_object' => $sJsObject, 'uri' => $sUri)));
     }
     $sContent = $sResult ? MsgBox($sResult, 10) : '';
     $sContent .= $oTemplate->parseHtmlByName('templates.html', array('bx_repeat:templates' => $aTmplVarsTemplates));
     return $oTemplate->parseHtmlByName('designer.html', array('js_object' => $this->getPageJsObject(), 'content' => $sContent));
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:17,代码来源:BxBaseStudioDesigner.php


示例9: get

 /**
  * Get member info
  */
 public function get($aData)
 {
     switch ($this->_sObject) {
         case 'sys_username':
             return $aData['NickName'];
         case 'sys_full_name':
             return htmlspecialchars_adv($aData['FullName'] ? $aData['FullName'] : $aData['NickName']);
         case 'sys_first_name':
             return $aData['FirstName'] ? $aData['FirstName'] : $aData['NickName'];
         case 'sys_first_name_last_name':
             return $aData['FirstName'] || $aData['LastName'] ? $aData['FirstName'] . ' ' . $aData['LastName'] : $aData['NickName'];
         case 'sys_last_name_firs_name':
             return $aData['FirstName'] || $aData['LastName'] ? $aData['LastName'] . ' ' . $aData['FirstName'] : $aData['NickName'];
         case 'sys_status_message':
             return $aData['UserStatusMessage'];
         case 'sys_age_sex':
             $s = ('0000-00-00' == $aData['DateOfBirth'] ? '' : _t('_y/o', age($aData['DateOfBirth'])) . ' ') . _t('_' . $aData['Sex']);
             if ($aData['Couple'] > 0) {
                 $aData2 = getProfileInfo($aData['Couple']);
                 $s .= '<br />' . ('0000-00-00' == $aData2['DateOfBirth'] ? '' : _t('_y/o', age($aData2['DateOfBirth'])) . ' ') . _t('_' . $aData2['Sex']);
             }
             return $s;
         case 'sys_location':
             return (empty($aData['City']) ? '' : htmlspecialchars_adv($aData['City']) . ', ') . _t($GLOBALS['aPreValues']['Country'][$aData['Country']]['LKey']);
         case 'sys_avatar_2x':
             if (!$aData || !@(include_once BX_DIRECTORY_PATH_MODULES . 'boonex/avatar/include.php')) {
                 return false;
             }
             return $aData['Avatar'] ? BX_AVA_URL_USER_AVATARS . $aData['Avatar'] . 'b' . BX_AVA_EXT : '';
         case 'sys_avatar':
         case 'sys_avatar_icon_2x':
             if (!$aData || !@(include_once BX_DIRECTORY_PATH_MODULES . 'boonex/avatar/include.php')) {
                 return false;
             }
             return $aData['Avatar'] ? BX_AVA_URL_USER_AVATARS . $aData['Avatar'] . BX_AVA_EXT : '';
         case 'sys_avatar_icon':
             if (!$aData || !@(include_once BX_DIRECTORY_PATH_MODULES . 'boonex/avatar/include.php')) {
                 return false;
             }
             return $aData['Avatar'] ? BX_AVA_URL_USER_AVATARS . $aData['Avatar'] . 'i' . BX_AVA_EXT : '';
     }
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:45,代码来源:BxDolMemberInfo.php


示例10: serviceIsSpam

 /**
  * Check text for spam.
  * First it check if IP is whitelisted(or under cron execution or user is admin) - for whitelisted IPs check for spam isn't performed,
  * then it checks URLs found in text for DNSURI black lists (@see BxAntispamDNSURIBlacklists),
  * then it checks text in Akismet service (@see BxAntispamAkismet).
  * It can send report if spam is found or tries to inform caller to block the content (depending on configuration).
  *
  * @param $sContent content to check for spam
  * @param $sIp IP address of content poster
  * @param $isStripSlashes slashes parameter:
  *          BX_SLASHES_AUTO - automatically detect magic_quotes_gpc setting
  *          BX_SLASHES_NO_ACTION - do not perform any action with slashes
  * @return true if spam detected and content shouln't be recorded, false if content should be processed as usual.
  */
 public function serviceIsSpam($sContent, $sIp = '', $isStripSlashes = BX_SLASHES_AUTO)
 {
     if (defined('BX_DOL_CRON_EXECUTE') || isAdmin()) {
         return false;
     }
     if ($this->serviceIsIpWhitelisted($sIp)) {
         return false;
     }
     if (get_magic_quotes_gpc() && $isStripSlashes == BX_SLASHES_AUTO) {
         $sContent = stripslashes($sContent);
     }
     $bRet = false;
     if ('on' == $this->_oConfig->getAntispamOption('uridnsbl_enable')) {
         $oDNSURIBlacklists = bx_instance('BxAntispamDNSURIBlacklists', array(), $this->_aModule);
         if ($oDNSURIBlacklists->isSpam($sContent)) {
             $oDNSURIBlacklists->onPositiveDetection($sContent);
             $bRet = true;
         }
     }
     if (!$bRet && 'on' == $this->_oConfig->getAntispamOption('akismet_enable')) {
         $oAkismet = bx_instance('BxAntispamAkismet', array(), $this->_aModule);
         if ($oAkismet->isSpam($sContent)) {
             $oAkismet->onPositiveDetection($sContent);
             $bRet = true;
         }
     }
     if ($bRet && 'on' == $this->_oConfig->getAntispamOption('antispam_report')) {
         $oProfile = BxDolProfile::getInstance();
         $aPlus = array('SpammerUrl' => $oProfile->getUrl(), 'SpammerNickName' => $oProfile->getDisplayName(), 'Page' => htmlspecialchars_adv($_SERVER['PHP_SELF']), 'Get' => print_r($_GET, true), 'Post' => print_r($_POST, true), 'SpamContent' => htmlspecialchars_adv($sContent));
         bx_import('BxDolEmailTemplates');
         $aTemplate = BxDolEmailTemplates::getInstance()->parseTemplate('bx_antispam_spam_report', $aPlus);
         if (!$aTemplate) {
             trigger_error('Email template or translation missing: bx_antispam_spam_report', E_USER_ERROR);
         }
         sendMail(getParam('site_email'), $aTemplate['Subject'], $aTemplate['Body']);
     }
     if ($bRet && 'on' == $this->_oConfig->getAntispamOption('antispam_block')) {
         return true;
     }
     return false;
 }
开发者ID:blas-dmx,项目名称:trident,代码行数:55,代码来源:BxAntispamModule.php


示例11: table

 function table($a, $sHighlight = '')
 {
     if ($this->_isAjaxOutput) {
         $table = array();
         foreach ($a as $r) {
             if (!$table) {
                 $table[] = array_keys($r);
             }
             $rr = array_values($r);
             if (false !== strpos($rr[0], '&#160;')) {
                 $rr[0] = str_replace('&#160;', '-', $rr[0]);
             }
             $table[] = $rr;
         }
         return $table;
     }
     $sId = md5(time() . rand());
     $s = '<table id="' . $sId . '" class="bx_profiler_table">';
     $th = '';
     foreach ($a as $r) {
         if (!$th) {
             foreach ($r as $k => $v) {
                 $th .= "<th>{$k}</th>";
             }
             $s .= "<thead><tr>{$th}</tr></thead><tbody>";
         }
         $s .= '<tr>';
         foreach ($r as $k => $v) {
             $sClass = '';
             if ($sHighlight && $k == $sHighlight) {
                 $sClass = ' class="highlight" ';
             }
             $s .= "<td {$sClass}>" . htmlspecialchars_adv($v) . "</td>";
         }
         $s .= '</tr>';
     }
     $s .= '</tbody></table>';
     $s .= '<script type="text/javascript">$(\'#' . $sId . '\').tablesorter();</script>';
     return $s;
 }
开发者ID:Prashank25,项目名称:dolphin.pro,代码行数:40,代码来源:BxProfilerTemplate.php


示例12: showEditForm

function showEditForm($aItem)
{
    ?>
<form
  onsubmit="if( this.form_input_html ) tinyMCE.execCommand('mceRemoveControl', false, 'form_input_html'); saveItemByPost( <?php 
    echo $aItem['ID'];
    ?>
 ); return false;"
  onreset="if( this.form_input_html ) tinyMCE.execCommand('mceRemoveControl', false, 'form_input_html'); hideEditForm(); return false;"
  name="formItemEdit" id="formItemEdit">
	<table class="popup_form_wrapper">
		<tr>
			<td class="corner"><img src="images/op_cor_tl.png" /></td>
			<td class="side_ver"><img src="images/spacer.gif" /></td>
			<td class="corner"><img src="images/op_cor_tr.png" /></td>
		</tr>
		<tr>
			<td class="side"><img src="images/spacer.gif" /></td>
			
			<td class="container">
				<div class="edit_item_table_cont">
				
					<table class="edit_item_table" id="tmp_id_name" >
						<tr>
							<td class="form_label">System Name:</td>
							<td>
								<input type="text" class="form_input_text" name="Title" value="<?php 
    echo $aItem['Title'];
    ?>
" />
							</td>
						</tr>
						<tr>
							<td class="form_label">Description:</td>
							<td><?php 
    echo $aItem['Desc'];
    ?>
</td>
						</tr>
						<tr>
							<td class="form_label">Language Key:</td>
							<td>
								<input type="text" class="form_input_text" name="Caption" value="<?php 
    echo $aItem['Caption'];
    ?>
" />
							</td>
						</tr>
						<tr>
							<td class="form_label">Default Name:</td>
							<td>
								<input type="text" class="form_input_text" name="LangCaption" value="<?php 
    echo _t($aItem['Caption']);
    ?>
" />
							</td>
						</tr>
						<tr>
							<td class="form_label">Visible for:</td>
							<td>
								<input type="checkbox" name="Visible_non"  value="on" <?php 
    echo strpos($aItem['Visible'], 'non') === false ? '' : 'checked="checked"';
    ?>
 /> Guest
								<input type="checkbox" name="Visible_memb" value="on" <?php 
    echo strpos($aItem['Visible'], 'memb') === false ? '' : 'checked="checked"';
    ?>
 /> Member
							</td>
						</tr>
	<?php 
    if ($aItem['Func'] == 'Echo') {
        ?>
						<tr>
							<td class="form_label">HTML-content:</td>
							<td>&nbsp;</td>
						</tr>
						<tr>
							<td class="form_colspan" colspan="2">
								<textarea class="form_input_html" id="form_input_html" name="Content"><?php 
        echo htmlspecialchars_adv($aItem['Content']);
        ?>
</textarea>
							</td>
						</tr>
		<?php 
    } elseif ($aItem['Func'] == 'RSS') {
        list($sUrl, $iNum) = explode('#', $aItem['Content']);
        $iNum = (int) $iNum;
        ?>
						<tr>
							<td class="form_label">Url of RSS feed:</td>
							<td><input type="text" class="form_input_text" name="Url" value="<?php 
        echo $sUrl;
        ?>
" /></td>
						</tr>
						<tr>
							<td class="form_label">Number of RSS items (0 - all):</td>
							<td><input type="text" class="form_input_text" name="Num" value="<?php 
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:dolphin-dwbn-svn,代码行数:101,代码来源:pageComposer.php


示例13: GenPostPage

 /**
  * Generate User`s Blog Post Page
  *
  * @return HTML presentation of data
  */
 function GenPostPage($iParamPostID = 0)
 {
     $this->iViewingPostID = $iParamPostID > 0 ? $iParamPostID : $this->iViewingPostID;
     list($sCode, $bShowBlocks) = $this->getViewingPostInfo();
     if (empty($this->aViewingPostInfo)) {
         header("HTTP/1.1 404 Not Found");
         $sMsg = _t('_sys_request_page_not_found_cpt');
         $GLOBALS['oTopMenu']->setCustomSubHeader($sMsg);
         return DesignBoxContent($sMsg, MsgBox($sMsg), 1);
     }
     $iBlogLimitChars = (int) getParam('max_blog_preview');
     $sPostText = htmlspecialchars_adv(mb_substr(trim(strip_tags($this->aViewingPostInfo['PostText'])), 0, $iBlogLimitChars));
     $this->_oTemplate->setPageDescription($sPostText);
     if (mb_strlen($this->aViewingPostInfo['Tags']) > 0) {
         $this->_oTemplate->addPageKeywords($this->aViewingPostInfo['Tags']);
     }
     $sRetHtml .= $sCode;
     if ($bShowBlocks) {
         $oBPV = new BxDolBlogsPageView($this);
         $sRetHtml .= $oBPV->getCode();
     }
     return $sRetHtml;
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:28,代码来源:BxBlogsModule.php


示例14: actionBrowse

 function actionBrowse($sParamName = '', $sParamValue = '', $sParamValue1 = '', $sParamValue2 = '', $sParamValue3 = '')
 {
     $bAlbumView = false;
     if ($sParamName == 'album' && $sParamValue1 == 'owner') {
         $bAlbumView = true;
         $aAlbumInfo = $this->oAlbums->getAlbumInfo(array('fileUri' => $sParamValue, 'owner' => getID($sParamValue2)));
         if (empty($aAlbumInfo)) {
             $this->_oTemplate->displayPageNotFound();
         } else {
             if (!$this->oAlbumPrivacy->check('album_view', $aAlbumInfo['ID'], $this->_iProfileId)) {
                 $sKey = _t('_' . $this->_oConfig->getMainPrefix() . '_access_denied');
                 $sCode = DesignBoxContent($sKey, MsgBox($sKey), 1);
                 $this->aPageTmpl['header'] = $sKey;
                 $this->_oTemplate->pageCode($this->aPageTmpl, array('page_main_code' => $sCode));
                 return;
             }
             $GLOBALS['oTopMenu']->setCustomSubHeader(_t('_sys_album_x', $aAlbumInfo['Caption']));
             $GLOBALS['oTopMenu']->setCustomSubHeaderUrl(BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'browse/album/' . $aAlbumInfo['Uri'] . '/owner/' . $sParamValue2);
             $GLOBALS['oTopMenu']->setCustomBreadcrumbs(array(_t('_' . $this->_oConfig->getMainPrefix()) => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'home/', $aAlbumInfo['Caption'] => ''));
             if ($aAlbumInfo['Owner'] == $this->_iProfileId && $sParamValue2 === getUsername($this->_iProfileId)) {
                 $this->actionAlbumsViewMy('main_objects', $sParamValue, $sParamValue1, $sParamValue2, $sParamValue3);
                 return;
             }
         }
     }
     if ('calendar' == $sParamName) {
         $sParamValue = (int) $sParamValue;
         $sParamValue1 = (int) $sParamValue1;
         $sParamValue2 = (int) $sParamValue2;
     }
     $sClassName = $this->_oConfig->getClassPrefix() . 'Search';
     bx_import('Search', $this->_aModule);
     $oSearch = new $sClassName($sParamName, $sParamValue, $sParamValue1, $sParamValue2);
     $sRss = bx_get('rss');
     if ($sRss !== false && $sRss) {
         $oSearch->aCurrent['paginate']['perPage'] = 10;
         header('Content-Type: text/xml; charset=UTF-8');
         echo $oSearch->rss();
         exit;
     }
     $sTopPostfix = isset($oSearch->aCurrent['restriction'][$sParamName]) || $oSearch->aCurrent['sorting'] == $sParamName ? $sParamName : 'all';
     $sCaption = _t('_' . $this->_oConfig->getMainPrefix() . '_top_menu_' . $sTopPostfix);
     if (!empty($sParamValue) && isset($oSearch->aCurrent['restriction'][$sParamName])) {
         $sParamValue = $this->getBrowseParam($sParamName, $sParamValue);
         $oSearch->aCurrent['restriction'][$sParamName]['value'] = $sParamValue;
         $sCaption = _t('_' . $this->_oConfig->getMainPrefix() . '_browse_by_' . $sParamName, htmlspecialchars_adv(process_pass_data($sParamValue)));
     }
     if ($bAlbumView) {
         $oSearch->aCurrent['restriction']['allow_view']['value'] = array($aAlbumInfo['AllowAlbumView']);
         $sCaption = _t('_' . $this->_oConfig->getMainPrefix() . '_browse_by_' . $sParamName, $aAlbumInfo['Caption']);
         $this->_oTemplate->setPageDescription(substr(strip_tags($aAlbumInfo['Description']), 0, 255));
     } else {
         $oSearch->aCurrent['restriction']['not_allow_view']['value'] = array(BX_DOL_PG_HIDDEN);
     }
     $oSearch->aCurrent['paginate']['perPage'] = (int) $this->_oConfig->getGlParam('number_all');
     $sCode = $oSearch->displayResultBlock();
     if ($oSearch->aCurrent['paginate']['totalNum'] > 0) {
         $sCode = $GLOBALS['oFunctions']->centerContent($sCode, '.sys_file_search_unit');
         $sCode = $this->_oTemplate->parseHtmlByName('default_padding_thd.html', array('content' => $sCode));
         $aAdd = array($sParamName, $sParamValue, $sParamValue1, $sParamValue2, $sParamValue3);
         foreach ($aAdd as $sValue) {
             if (strlen($sValue) > 0) {
                 $sArg .= '/' . rawurlencode($sValue);
             } else {
                 break;
             }
         }
         $sLink = $this->_oConfig->getBaseUri() . 'browse' . $sArg;
         $oPaginate = new BxDolPaginate(array('page_url' => $sLink . '&page={page}&per_page={per_page}', 'count' => $oSearch->aCurrent['paginate']['totalNum'], 'per_page' => $oSearch->aCurrent['paginate']['perPage'], 'page' => $oSearch->aCurrent['paginate']['page'], 'on_change_per_page' => 'document.location=\'' . BX_DOL_URL_ROOT . $sLink . '&page=1&per_page=\' + this.value;'));
         $sPaginate = $oPaginate->getPaginate();
     } else {
         $sCode = MsgBox(_t('_Empty'));
     }
     if ($sParamName == 'calendar') {
         $sCaption = _t('_' . $this->_oConfig->getMainPrefix() . '_caption_browse_by_day') . ': ' . getLocaleDate(strtotime("{$sParamValue}-{$sParamValue1}-{$sParamValue2}"), BX_DOL_LOCALE_DATE_SHORT);
     }
     $aMenu = array();
     $sCode = DesignBoxContent($sCaption, $sCode . $sPaginate, 1, $this->_oTemplate->getExtraTopMenu($aMenu, BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri()));
     if ($bAlbumView) {
         $sCode = $this->getAlbumPageView($aAlbumInfo, $sCode);
     }
     $this->aPageTmpl['css_name'] = array('browse.css');
     $this->aPageTmpl['header'] = $sCaption;
     $this->_oTemplate->pageCode($this->aPageTmpl, array('page_main_code' => $sCode));
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:85,代码来源:BxDolFilesModule.php


示例15: _error

 function _error($sType, $sParam1 = '', $sParam2 = '')
 {
     header('Status: 404 Not Found');
     header('HTTP/1.0 404 Not Found');
     global $_page;
     global $_page_cont;
     $iIndex = 13;
     $_page['name_index'] = $iIndex;
     $_page['header'] = _t("_sys_request_" . $sType . "_not_found_cpt");
     $_page_cont[$iIndex]['page_main_code'] = MsgBox(_t("_sys_request_" . $sType . "_not_found_cnt", htmlspecialchars_adv($sParam1), htmlspecialchars_adv($sParam2)));
     PageCode();
     exit;
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:13,代码来源:BxDolRequest.php


示例16: 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


示例17: actionUpload

 function actionUpload($sType, $aFile, $aFtpInfo)
 {
     $sLogin = htmlspecialchars_adv(clear_xss($aFtpInfo['login']));
     $sPassword = htmlspecialchars_adv(clear_xss($aFtpInfo['password']));
     $sPath = htmlspecialchars_adv(clear_xss($aFtpInfo['path']));
     setParam('sys_ftp_login', $sLogin);
     setParam('sys_ftp_password', $sPassword);
     setParam('sys_ftp_dir', $sPath);
     $sErrMsg = false;
     $sName = mktime();
     $sAbsolutePath = BX_DIRECTORY_PATH_ROOT . "tmp/" . $sName . '.zip';
     $sPackageRootFolder = false;
     if (!class_exists('ZipArchive')) {
         $sErrMsg = '_adm_txt_modules_zip_not_available';
     }
     if (!$sErrMsg && $this->_isArchive($aFile['type']) && move_uploaded_file($aFile['tmp_name'], $sAbsolutePath)) {
         // extract uploaded zip package into tmp folder
         $oZip = new ZipArchive();
         if ($oZip->open($sAbsolutePath) !== TRUE) {
             $sErrMsg = '_adm_txt_modules_cannot_unzip_package';
         }
         if (!$sErrMsg) {
             $sPackageRootFolder = $oZip->numFiles > 0 ? $oZip->getNameIndex(0) : false;
             if (file_exists(BX_DIRECTORY_PATH_ROOT . 'tmp/' . $sPackageRootFolder)) {
                 // remove existing tmp folder with the same name
                 bx_rrmdir(BX_DIRECTORY_PATH_ROOT . 'tmp/' . $sPackageRootFolder);
             }
             if ($sPackageRootFolder && !$oZip->extractTo(BX_DIRECTORY_PATH_ROOT . 'tmp/')) {
                 $sErrMsg = '_adm_txt_modules_cannot_unzip_package';
             }
             $oZip->close();
         }
         // upload files to the correct folder via FTP
         if (!$sErrMsg && $sPackageRootFolder) {
             $oFtp = new BxDolFtp($_SERVER['HTTP_HOST'], $sLogin, $sPassword, $sPath);
             if (!$oFtp->connect()) {
                 $sErrMsg = '_adm_txt_modules_cannot_connect_to_ftp';
             }
             if (!$sErrMsg && !$oFtp->isDolphin()) {
                 $sErrMsg = '_adm_txt_modules_destination_not_valid';
             }
             if (!$sErrMsg) {
                 $sConfigPath = BX_DIRECTORY_PATH_ROOT . "tmp/" . $sPackageRootFolder . $this->_aTypesConfig[$sType]['configfile'];
                 if (file_exists($sConfigPath)) {
                     include $sConfigPath;
                     $sConfigVar = !empty($this->_aTypesConfig[$sType]['configvarindex']) ? ${$this->_aTypesConfig[$sType]['configvar']}[$this->_aTypesConfig[$sType]['configvarindex']] : ${$this->_aTypesConfig[$sType]['configvar']};
                     $sSubfolder = $this->_aTypesConfig[$sType]['subfolder'];
                     $sSubfolder = str_replace('{configvar}', $sConfigVar, $sSubfolder);
                     $sSubfolder = str_replace('{packagerootfolder}', $sPackageRootFolder, $sSubfolder);
                     if (!$oFtp->copy(BX_DIRECTORY_PATH_ROOT . "tmp/" . $sPackageRootFolder . '/', $this->_aTypesConfig[$sType]['folder'] . $sSubfolder)) {
                         $sErrMsg = '_adm_txt_modules_ftp_copy_failed';
                     }
                 } else {
                     $sErrMsg = '_adm_txt_modules_wrong_package_format';
                 }
             }
         } else {
             $sErrMsg = '_adm_txt_modules_cannot_unzip_package';
         }
         // remove temporary files
         bx_rrmdir(BX_DIRECTORY_PATH_ROOT . 'tmp/' . $sPackageRootFolder);
         unlink($sAbsolutePath);
     } else {
         $sErrMsg = '_adm_txt_modules_cannot_upload_package';
     }
     return $sErrMsg ? $sErrMsg : '_adm_txt_modules_success_upload';
 }
开发者ID:Gotgot59,项目名称:dolphin.pro,代码行数:67,代码来源:BxDolInstallerUi.php


示例18: popupBox

 /**
  * Get standard popup box.
  *
  * @param  string $sTitle   - translated title
  * @param  string $sContent - content of the box
  * @param  array  $aActions - an array of actions. See an example below.
  * @return string HTML of Standard Popup Box
  *
  * @see Example of actions
  *      $aActions = array(
  *          'a1' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript: changeType(this)', 'class' => 'wall-ptype-ctl', 'icon' => 'post_text.png', 'title' => _t('_title_a1'), 'active' => 1),
  *          'a2' => array('href' => 'javascript:void(0)', 'onclick' => 'javascript: changeType(this)', 'class' => 'wall-ptype-ctl', 'icon' => 'post_text.png', 'title' => _t('_title_a2'))
  *      );
  */
 function popupBox($sName, $sTitle, $sContent, $aActions = array())
 {
     $iId = !empty($sName) ? $sName : mktime();
     $aButtons = array();
     foreach ($aActions as $sId => $aAction) {
         $aButtons[] = array('id' => $sId, 'title' => htmlspecialchars_adv(_t($aAction['title'])), 'class' => isset($aAction['class']) ? ' class="' . $aAction['class'] . '"' : '', 'icon' => isset($aAction['icon']) ? '<img src="' . $aAction['icon'] . '" />' : '', 'href' => isset($aAction['href']) ? ' href="' . htmlspecialchars_adv($aAction['href']) . '"' : '', 'target' => isset($aAction['target']) ? ' target="' . $aAction['target'] . '"' : '', 'on_click' => isset($aAction['onclick']) ? ' onclick="' . $aAction['onclick'] . '"' : '', 'bx_if:hide_active' => array('condition' => !isset($aAction['active']) || $aAction['active'] != 1, 'content' => array()), 'bx_if:hide_inactive' => array('condition' => isset($aAction['active']) && $aAction['active'] == 1, 'content' => array()));
     }
     return $GLOBALS['oSysTemplate']->parseHtmlByName('popup_box.html', array('id' => $iId, 'title' => $sTitle, 'bx_repeat:actions' => $aButtons, 'content' => $sContent));
 }
开发者ID:robbie778,项目名称:dolphin.pro,代码行数:23,代码来源:BxBaseFunctions.php


示例19: genRSSHtmlOut

function genRSSHtmlOut($sUrl, $iNum = 0)
{
    $php_date_format = getParam('php_date_format');
    $oRSS = new BxRSS($sUrl);
    if (!$oRSS) {
        return '';
    }
    ob_start();
    ?>
		<div class="rss_feed_wrapper">
	<?php 
    $iCounter = 0;
    foreach ($oRSS->items as $oItem) {
        $sDate = date($php_date_format, strtotime($oItem->pubDate));
        ?>
			<div class="rss_item_wrapper">
				<div class= 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP htmlspecialchars_decode函数代码示例发布时间:2022-05-15
下一篇:
PHP htmlspecialchars__recursive函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap