本文整理汇总了PHP中PageCode函数的典型用法代码示例。如果您正苦于以下问题:PHP PageCode函数的具体用法?PHP PageCode怎么用?PHP PageCode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PageCode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pageCode
function pageCode($aPage = array(), $aPageCont = array(), $aCss = array(), $aJs = array(), $bAdminMode = false, $isSubActions = true)
{
if (!empty($aPage)) {
foreach ($aPage as $sKey => $sValue) {
$GLOBALS['_page'][$sKey] = $sValue;
}
}
if (!empty($aPageCont)) {
foreach ($aPageCont as $sKey => $sValue) {
$GLOBALS['_page_cont'][$aPage['name_index']][$sKey] = $sValue;
}
}
if (!empty($aCss)) {
$this->addCss($aCss);
}
if (!empty($aJs)) {
$this->addJs($aJs);
}
if ($isSubActions) {
$aVars = array('BaseUri' => $this->_oConfig->getBaseUri());
$GLOBALS['oTopMenu']->setCustomSubActions($aVars, $this->_oConfig->getMainPrefix() . '_title', false);
}
if (!$bAdminMode) {
PageCode($this);
} else {
PageCodeAdmin();
}
}
示例2: _page
function _page($sTitle, $sContent)
{
global $_page, $_page_cont;
$this->addCss('main.css');
$_page['name_index'] = 0;
$_page['header'] = $_page['header_text'] = $sTitle;
$_page_cont[0]['page_main_code'] = $sContent;
PageCode();
exit;
}
示例3: defaultPage
function defaultPage($sTitle, $sContent, $iPageIndex = 7)
{
global $_page;
global $_page_cont;
$_page['name_index'] = $iPageIndex;
$_page['header'] = $sTitle ? $sTitle : $GLOBALS['site']['title'];
$_page['header_text'] = $sTitle;
$_page_cont[$_page['name_index']]['page_main_code'] = $sContent;
PageCode();
}
示例4: getPage
/**
* Function will generate default dolphin's page;
*
* @param : $sPageCaption (string) - page's title;
* @param : $sPageContent (string) - page's content;
* @return : (text) html presentation data;
*/
function getPage($sPageCaption, $sPageContent)
{
global $_page;
global $_page_cont;
$_page['name_index'] = 0;
// set module's icon;
$GLOBALS['oTopMenu']->setCustomSubIconUrl(false === strpos($this->_sPageIcon, '.') ? $this->_sPageIcon : $this->getIconUrl($this->_sPageIcon));
$GLOBALS['oTopMenu']->setCustomSubHeader($sPageCaption);
$_page['header'] = $sPageCaption;
$_page['header_text'] = $sPageCaption;
$_page_cont[0]['page_main_code'] = $sPageContent;
PageCode($this);
exit;
}
示例5: pageCode
function pageCode($sTitle, $isDesignBox = true, $isWrap = true)
{
global $_page;
global $_page_cont;
$_page['name_index'] = $isDesignBox ? 0 : $this->_iPageIndex;
$_page['header'] = $sTitle ? $sTitle : $GLOBALS['site']['title'];
$_page['header_text'] = $sTitle;
$_page_cont[$_page['name_index']]['page_main_code'] = $this->pageEnd();
if ($isWrap) {
$aVars = array('content' => $_page_cont[$_page['name_index']]['page_main_code']);
$_page_cont[$_page['name_index']]['page_main_code'] = $this->parseHtmlByName('default_padding', $aVars);
}
$GLOBALS['oSysTemplate']->addDynamicLocation($this->_oConfig->getHomePath(), $this->_oConfig->getHomeUrl());
PageCode($GLOBALS['oSysTemplate']);
}
示例6: getPage
/**
* Function will generate default dolphin's page;
*
* @param : $sPageCaption (string) - page's title;
* @param : $sPageContent (string) - page's content;
* @param : $sPageIcon (string) - page's icon;
* @return : (text) html presentation data;
*/
function getPage($sPageCaption, $sPageContent, $sPageIcon = 'facebook-small-logo.png')
{
global $_page;
global $_page_cont;
$iIndex = 54;
$_page['name_index'] = $iIndex;
// set module's icon;
$GLOBALS['oTopMenu']->setCustomSubIconUrl($this->getIconUrl($sPageIcon));
$GLOBALS['oTopMenu']->setCustomSubHeader($sPageCaption);
$_page['header'] = $sPageCaption;
$_page['header_text'] = $sPageCaption;
$_page['css_name'] = 'face_book_connect.css';
$_page_cont[$iIndex]['page_main_code'] = $sPageContent;
PageCode($this);
}
示例7: getPage
/**
* Function will generate default dolphin's page;
*
* @param : $sPageCaption (string) - page's title;
* @param : $sPageContent (string) - page's content;
* @param : $sPageIcon (string) - page's icon;
* @return : (text) html presentation data;
*/
function getPage($sPageCaption, $sPageContent, $sPageIcon = 'facebook')
{
global $_page;
global $_page_cont;
$iIndex = 55;
$_page['name_index'] = $iIndex;
// set module's icon;
$GLOBALS['oTopMenu']->setCustomSubIconUrl(false === strpos($sPageIcon, '.') ? $sPageIcon : $this->getIconUrl($sPageIcon));
$GLOBALS['oTopMenu']->setCustomSubHeader($sPageCaption);
$_page['header'] = $sPageCaption;
$_page['header_text'] = $sPageCaption;
$_page['css_name'] = 'face_book_connect.css';
$_page_cont[$iIndex]['page_main_code'] = DesignBoxContent($sPageCaption, $sPageContent, 11);
PageCode($this);
}
示例8: pageCode
function pageCode($sTitle, $isDesignBox = true, $isWrap = true, $isSubActions = true)
{
global $_page;
global $_page_cont;
if (null == $this->_oMain) {
$this->_oMain = BxDolModule::getInstance('BxSitesModule');
}
$_page['name_index'] = $isDesignBox ? 0 : $this->_iPageIndex;
$_page['header'] = $sTitle ? $sTitle : $GLOBALS['site']['title'];
$_page['header_text'] = $sTitle;
if ($isWrap) {
$aVars = array('content' => $this->pageEnd());
$_page_cont[$_page['name_index']]['page_main_code'] = $this->parseHtmlByName('default_padding.html', $aVars);
} else {
$_page_cont[$_page['name_index']]['page_main_code'] = $this->pageEnd();
}
if ($isSubActions) {
$aVars = array('BaseUri' => $this->_oConfig->getBaseUri(), 'isAllowedAdd' => $this->_oMain->isAllowedAdd() ? 1 : 0);
$GLOBALS['oTopMenu']->setCustomSubActions($aVars, 'bx_sites_title', false);
}
PageCode($this);
}
示例9: pageCode
function pageCode($sTitle, $isDesignBox = true, $isWrap = true)
{
global $_page;
global $_page_cont;
$GLOBALS['BxDolTemplateJs'] = array();
$GLOBALS['BxDolTemplateCss'] = array();
$this->addCss($this->_aMobileCss);
$this->addJs($this->_aMobileJs);
$sOutput = $this->pageEnd();
if ($isDesignBox) {
$aVars = array('content' => $sOutput);
$sOutput = $this->parseHtmlByName('mobile_box.html', $aVars);
}
if ($isWrap) {
$aVars = array('content' => $sOutput);
$sOutput = $this->parseHtmlByName('mobile_page_padding.html', $aVars);
}
$iNameIndex = 11;
$_page['name_index'] = $iNameIndex;
$_page['header'] = $sTitle ? $sTitle : $GLOBALS['site']['title'];
$_page_cont[$iNameIndex]['page_main_code'] = $sOutput;
PageCode($this);
}
示例10: pageCode
function pageCode($aPage = array(), $aPageCont = array(), $aCss = array(), $aJs = array(), $bAdminMode = false, $isSubActions = true)
{
if (!empty($aPage)) {
foreach ($aPage as $sKey => $sValue) {
$GLOBALS['_page'][$sKey] = $sValue;
}
}
if (!empty($aPageCont)) {
foreach ($aPageCont as $sKey => $sValue) {
$GLOBALS['_page_cont'][$aPage['name_index']][$sKey] = $sValue;
}
}
if (!empty($aCss)) {
$this->addCss($aCss);
}
if (!empty($aJs)) {
$this->addJs($aJs);
}
if (!$bAdminMode) {
PageCode($this);
} else {
PageCodeAdmin();
}
}
示例11: showLinksList
/** //MOVE THIS FUNCTION TO utils.inc.php!!!
* Displays list of links, using current template
* (design.inc.php module should be included)
*
* @param string $pageHeaderText
*
* @param string $listHeaderText
*
* @param array of CHyperLink $links - array of URLs. Array length must be equal to $linksDescriptions length
*
* @return bool Returns true on success and false in case of any error
*/
function showLinksList($pageIndex, $pageHeaderText, $listHeaderText, $links)
{
global $_page_cont;
global $_page;
if (!class_exists('CHyperLink')) {
return false;
}
if (!is_array($links) || count($links) == 0) {
return false;
}
$pageMainCode = '';
$_page['header_text'] = $pageHeaderText;
$pageMainCode .= $listHeaderText . '<br />';
foreach ($links as $hyperLink) {
if (!is_a($hyperLink, 'CHyperLink')) {
return false;
}
$pageMainCode .= $hyperLink->GetHTMLcode() . '<br />';
}
$_page_cont[$pageIndex]['page_main_code'] = '<div align="center">' . $pageMainCode . '</div>';
PageCode();
return true;
}
示例12: bx_import
* Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
* CC-BY License - http://creativecommons.org/licenses/by/3.0/
*/
require_once BX_DIRECTORY_PATH_MODULES . $aModule['path'] . '/classes/' . $aModule['class_prefix'] . 'Module.php';
bx_import('BxDolPageView');
$oSpy = new BxSpyModule($aModule);
// ** init some needed variables ;
global $_page;
global $_page_cont;
//-- Define activity type --//;
$sActivityType = '';
if (isset($_GET['spy_type'])) {
switch ($_GET['spy_type']) {
case 'profiles_activity':
$sActivityType = 'profiles_activity';
break;
case 'content_activity':
$sActivityType = 'content_activity';
break;
}
}
$iIndex = 0;
$sPageCaption = _t('_bx_spy_notifications');
$GLOBALS['oTopMenu']->setCurrentProfileID($oSpy->iMemberId);
$_page['name_index'] = $iIndex;
$_page['header'] = $sPageCaption;
$_page['header_text'] = $sPageCaption;
$_page['css_name'] = 'spy.css';
$_page_cont[$iIndex]['page_main_code'] = $oSpy->getActivityPage($oSpy->iMemberId, $sActivityType);
PageCode($oSpy->_oTemplate);
示例13: check_login
function check_login($ID, $passwd, $iRole = BX_DOL_ROLE_MEMBER, $error_handle = true)
{
$ID = (int) $ID;
if (!$ID) {
if ($error_handle) {
login_form(_t("_PROFILE_ERR"), $member);
}
return false;
}
switch ($iRole) {
case BX_DOL_ROLE_MEMBER:
$member = 0;
break;
case BX_DOL_ROLE_ADMIN:
$member = 1;
break;
}
$aProfile = getProfileInfo($ID);
// If no such members
if (!$aProfile) {
if ($error_handle) {
login_form(_t("_PROFILE_ERR"), $member);
}
return false;
}
// If password is incorrect
if (strcmp($aProfile['Password'], $passwd) != 0) {
if ($error_handle) {
login_form(_t("_INVALID_PASSWD"), $member);
}
return false;
}
if (!((int) $aProfile['Role'] & $iRole)) {
if ($error_handle) {
login_form(_t("_INVALID_ROLE"), $member);
}
return false;
}
if ((int) $aProfile['Role'] & BX_DOL_ROLE_ADMIN || (int) $aProfile['Role'] & BX_DOL_ROLE_MODERATOR) {
if ('on' != getParam('ext_nav_menu_enabled')) {
update_date_lastnav($ID);
}
return true;
}
// if IP is banned
if (2 == getParam('ipBlacklistMode') && bx_is_ip_blocked() || 'on' == getParam('sys_dnsbl_enable') && 'block' == getParam('sys_dnsbl_behaviour') && bx_is_ip_dns_blacklisted('', 'login')) {
if ($error_handle) {
$GLOBALS['_page']['name_index'] = 55;
$GLOBALS['_page']['css_name'] = '';
$GLOBALS['_ni'] = $GLOBALS['_page']['name_index'];
$GLOBALS['_page_cont'][$GLOBALS['_ni']]['page_main_code'] = MsgBox(_t('_Sorry, your IP been banned'));
PageCode();
}
return false;
}
// if profile is banned
if (isLoggedBanned($aProfile['ID'])) {
if ($error_handle) {
$GLOBALS['_page']['name_index'] = 55;
$GLOBALS['_page']['css_name'] = '';
$GLOBALS['_ni'] = $GLOBALS['_page']['name_index'];
$GLOBALS['_page_cont'][$GLOBALS['_ni']]['page_main_code'] = MsgBox(_t('_member_banned'));
PageCode();
}
return false;
}
if ('on' != getParam('ext_nav_menu_enabled')) {
update_date_lastnav($ID);
}
return true;
}
示例14: serviceResponceProtectURL
function serviceResponceProtectURL($sURL)
{
if (!isLogged() && bx_get('oid') && bx_get('pwd')) {
// in case of request from flash, cookies are not passed, and we have to set it explicitly
$_COOKIE['memberID'] = bx_get('oid');
$_COOKIE['memberPassword'] = bx_get('pwd');
check_logged();
}
if (!$this->serviceIsUrlAccessable($sURL, getLoggedId())) {
global $_page;
global $_page_cont;
$_page['name_index'] = -1;
$_page['header'] = _t("_bx_pageac_access_denied");
$_page_cont[$_page['name_index']]['page_main_code'] = MsgBox(_t("_bx_pageac_deny_text"));
PageCode();
exit;
}
}
示例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;
}