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

PHP getCurrentPage函数代码示例

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

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



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

示例1: __appendAlert

 /**
  * Append notice that the site is currently in maintenance mode offering a link
  * to switch to live mode if no other alert is set.
  *
  * @param array $context
  *  delegate context
  */
 public function __appendAlert($context)
 {
     // Site in maintenance mode
     if (Symphony::Configuration()->get('enabled', 'maintenance_mode') == 'yes') {
         Administration::instance()->Page->pageAlert(__('This site is currently in maintenance mode.') . ' <a href="' . SYMPHONY_URL . '/system/preferences/?action=toggle-maintenance-mode&amp;redirect=' . getCurrentPage() . '">' . __('Restore?') . '</a>', Alert::NOTICE);
     }
 }
开发者ID:davjand,项目名称:codecept-symphonycms-db,代码行数:14,代码来源:extension.driver.php


示例2: printPageListWithNavAlt

function printPageListWithNavAlt($prevtext, $nexttext, $nextprev = true, $class = NULL, $id = "pagelist")
{
    echo "<div" . ($id ? " id=\"{$id}\"" : "") . " class=\"{$class}\">";
    $total = getTotalPages();
    $current = getCurrentPage();
    echo "\n<ul class=\"{$class}\"><li>[</li>";
    for ($i = 1; $i <= $total; $i++) {
        echo "\n  <li" . ($i == $current ? " class=\"current\"" : "") . ">";
        printLinkHTML(getPageURL($i), $i, "Page {$i}" . ($i == $current ? " (Current Page)" : ""));
        echo "</li>";
    }
    echo "\n<li>]</li>";
    if ($nextprev) {
        echo "\n  <li class=\"prev\">";
        printPrevPageURL($prevtext, "Previous Page");
        echo "</li>";
    }
    echo "\n<li></li>";
    if ($nextprev) {
        echo "\n  <li class=\"next\">";
        printNextPageURL($nexttext, "Next Page");
        echo "</li>";
    }
    echo "\n</ul>";
    echo "\n</div>\n";
}
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:26,代码来源:functions.php


示例3: showPagination

function showPagination($params)
{
    if ($params['totalRows'] >= 1) {
        $currentPage = getCurrentPage();
        $recordsPerPage = isset($params['recordsPerPage']) ? trim($params['recordsPerPage']) : 10;
        $range = isset($params['range']) ? $params['range'] : 5;
        // count all lines in the database to calculate total pages
        $totalPges = ceil($params['totalRows'] / $recordsPerPage);
        // display links to 'range of pages' around 'current page'
        $initialNum = $currentPage - $range;
        $conditionLimitNum = $currentPage + $range + 1;
        echo "<nav><ul class=\"pagination pagination-sm\">";
        // button for first page
        if ($currentPage > 1) {
            echo "<li><a href=\"{$params['url']}\" title=\"Ir para primeira página.\"> << </a></li>";
        }
        for ($x = $initialNum; $x < $conditionLimitNum; $x++) {
            // be sure '$x is greater than 0' AND 'less than or equal to the $totalPges'
            if ($x > 0 && $x <= $totalPges) {
                // current page
                if ($x == $currentPage) {
                    echo "<li class=\"active\"><a href=\"#\">{$x} <span class=\"sr-only\">(current)</span></a></li>";
                } else {
                    // not current page
                    echo "<li><a href=\"{$params['url']}?page={$x}\">{$x}</a></li>";
                }
            }
        }
        // button for last page
        if ($currentPage < $totalPges) {
            echo "<li><a href=\"" . $params['url'] . "?page={$totalPges}\" title=\"Last page is {$totalPges}.\"> >> </a></li>";
        }
        echo "</ul></nav>";
    }
}
开发者ID:Calcio,项目名称:CursoPHPBasico,代码行数:35,代码来源:pagination.php


示例4: action

 function action()
 {
     ##Do not proceed if the config file is read only
     if (!is_writable(CONFIG)) {
         redirect($this->_Parent->getCurrentPageURL());
     }
     ###
     # Delegate: CustomActions
     # Description: This is where Extensions can hook on to custom actions they may need to provide.
     $this->_Parent->ExtensionManager->notifyMembers('CustomActions', getCurrentPage());
     if (isset($_POST['action']['save'])) {
         $settings = $_POST['settings'];
         ###
         # Delegate: Save
         # Description: Saving of system preferences.
         $this->_Parent->ExtensionManager->notifyMembers('Save', getCurrentPage(), array('settings' => &$settings, 'errors' => &$this->_errors));
         if (!is_array($this->_errors) || empty($this->_errors)) {
             foreach ($settings as $set => $values) {
                 foreach ($values as $key => $val) {
                     $this->_Parent->Configuration->set($key, $val, $set);
                 }
             }
             $this->_Parent->saveConfig();
             redirect($this->_Parent->getCurrentPageURL());
         }
     }
 }
开发者ID:njmcgee,项目名称:taxcheck,代码行数:27,代码来源:content.systempreferences.php


示例5: renderer_json

function renderer_json($mode)
{
    if (strtolower($mode) == 'administration') {
        throw new Lib\Exceptions\InvalidModeException('JSON Renderer launcher is only available on the frontend');
    }
    $renderer = Frontend::instance();
    // Check if we should enable exception debug information
    $exceptionDebugEnabled = Symphony::isLoggedIn();
    // Use the JSON exception and error handlers instead of the Symphony one.
    Lib\ExceptionHandler::initialise($exceptionDebugEnabled);
    Lib\ErrorHandler::initialise($exceptionDebugEnabled);
    // #1808
    if (isset($_SERVER['HTTP_MOD_REWRITE'])) {
        throw new Exception("mod_rewrite is required, however is not enabled.");
    }
    $output = $renderer->display(getCurrentPage());
    cleanup_session_cookies();
    if (in_array('JSON', Frontend::Page()->pageData()['type'])) {
        // Load the output into a SimpleXML Container and convert to JSON
        try {
            $xml = new SimpleXMLElement($output, LIBXML_NOCDATA);
            // Convert the XML to a plain array. This step is necessary as we cannot
            // use JSON_PRETTY_PRINT directly on a SimpleXMLElement object
            $outputArray = json_decode(json_encode($xml), true);
            // Get the transforer object ready. Other extensions will
            // add their transormations to this.
            $transformer = new Lib\Transformer();
            /**
             * Allow other extensions to add their own transformers
             */
            Symphony::ExtensionManager()->notifyMembers('APIFrameworkJSONRendererAppendTransformations', '/frontend/', ['transformer' => &$transformer]);
            // Apply transformations
            $outputArray = $transformer->run($outputArray);
            // Now put the array through a json_encode
            $output = json_encode($outputArray, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
        } catch (\Exception $e) {
            // This happened because the input was not valid XML. This could
            // occur for a few reasons, but there are two scenarios
            // we are interested in.
            // 1) This is a devkit page (profile, debug etc). We want the data
            //    to be passed through and displayed rather than converted into
            //    JSON. There is no easy way in Symphony to tell if a devkit has
            //    control over the page, so instead lets inspect the output for
            //    any signs a devkit is rendering the page.
            // 2) It is actually bad XML. In that case we need to let the error
            //    bubble through.
            // Currently the easiest method is to check for the devkit.min.css
            // in the output. This may fail in the furture if this file is
            // renamed or moved.
            if (!preg_match("@\\/symphony\\/assets\\/css\\/devkit.min.css@", $output)) {
                throw $e;
            }
        }
    }
    echo $output;
    return $renderer;
}
开发者ID:pointybeard,项目名称:api_framework,代码行数:57,代码来源:JsonRendererLauncher.php


示例6: __appendAlert

 public function __appendAlert($context)
 {
     if (!is_null($context['alert'])) {
         return;
     }
     if ($this->_Parent->Configuration->get('enabled', 'maintenance_mode') == 'yes') {
         Administration::instance()->Page->pageAlert(__('This site is currently in maintenance mode.') . ' <a href="' . URL . '/symphony/system/preferences/?action=toggle-maintenance-mode&amp;redirect=' . getCurrentPage() . '">' . __('Restore?') . '</a>', Alert::NOTICE);
     }
 }
开发者ID:symphonycms-it,项目名称:maintenance_mode,代码行数:9,代码来源:extension.driver.php


示例7: getNextLink

function getNextLink()
{
    $paged = getCurrentPage();
    if ($paged === getMaxPage()) {
        echo '#';
    } else {
        echo getPageLink($paged + 1);
    }
}
开发者ID:ChiVincent,项目名称:WPtheme_Wetprogrammer2015,代码行数:9,代码来源:functions.php


示例8: __appendAlert

		public function __appendAlert($context){
			
			if(Symphony::Configuration()->get('enabled', 'readonly_mode') == 'yes'){
				$text = __('This site is currently in readonly mode.');
				if($this->isDeveloper())
					$text .= ' <a href="' . SYMPHONY_URL . '/system/preferences/?action=toggle-readonly-mode&amp;redirect=' . getCurrentPage() . '">' . __('Restore?') . '</a>';
				Administration::instance()->Page->pageAlert($text, Alert::NOTICE);
			}
		}
开发者ID:nils-werner,项目名称:readonly_mode,代码行数:9,代码来源:extension.driver.php


示例9: getConfigFile

/**
 * Fonction permettant la récupération du fichier de configuration
 * @return array associatif dont les clés, sont les sections
 */
function getConfigFile()
{
    $page = getCurrentPage();
    $isIndex = ($page == '' or $page == "index");
    if ($isIndex) {
        return parse_ini_file("config.ini.php", true);
    } else {
        return parse_ini_file("../config.ini.php", true);
    }
}
开发者ID:OvynFlavian,项目名称:IntegrationTP_Groupe_1,代码行数:14,代码来源:config.lib.php


示例10: printNavigation

 static function printNavigation($prevtext, $nexttext, $oneImagePage = false, $navlen = 7, $firstlast = true)
 {
     $total = getTotalPages($oneImagePage);
     $current = getCurrentPage();
     if ($total < 2) {
         $class .= ' disabled_nav';
     }
     if ($navlen == 0) {
         $navlen = $total;
     }
     $extralinks = 2;
     if ($firstlast) {
         $extralinks += 2;
     }
     $len = floor(($navlen - $extralinks) / 2);
     $j = max(round($extralinks / 2), min($current - $len - (2 - round($extralinks / 2)), $total - $navlen + $extralinks - 1));
     $ilim = min($total, max($navlen - round($extralinks / 2), $current + floor($len)));
     $k1 = round(($j - 2) / 2) + 1;
     $k2 = $total - round(($total - $ilim) / 2);
     if ($firstlast) {
         echo '<div class="nav-cell ' . ($current == 1 ? 'current' : 'first') . '">';
         echo "<span class='valign'>";
         printLink(getPageURL(1, $total), 1, "Page 1");
         echo "</span></div>\n";
         if ($j > 2) {
             echo '<div class="nav-cell">';
             echo "<span class='valign'>";
             printLink(getPageURL($k1, $total), $j - 1 > 2 ? '...' : $k1, "Page {$k1}");
             echo "</span></div>\n";
         }
     }
     for ($i = $j; $i <= $ilim; $i++) {
         echo '<div class="nav-cell' . ($i == $current ? " current" : "") . '">';
         echo "<span class='valign'>";
         printLink(getPageURL($i, $total), $i, "Page {$i}" . ($i == $current ? ' ' . gettext("(Current Page)") : ""));
         echo "</span></div>\n";
     }
     if ($i < $total) {
         echo '<div class="nav-cell">';
         echo "<span class='valign'>";
         printLink(getPageURL($k2, $total), $total - $i > 1 ? '...' : $k2, "Page {$k2}");
         echo "</span></div>\n";
     }
     if ($firstlast && $i <= $total) {
         echo '<div class="nav-cell last">';
         echo "<span class='valign'>";
         printLink(getPageURL($total, $total), $total, "Page {$total}");
         echo "</span></div>\n";
     }
     $prevNextLinks = array();
     $prevNextLinks['prev'] = ThemeUtil::getLink(getPrevPageURL(), $prevtext) . "\n";
     $prevNextLinks['next'] = ThemeUtil::getLink(getNextPageURL(), $nexttext) . "\n";
     return $prevNextLinks;
 }
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:54,代码来源:AlbumUtil.php


示例11: __construct

 public function __construct(View $view)
 {
     parent::__construct();
     $this->document = new HTMLDocument();
     $this->view = $view;
     $this->data = (object) array();
     $this->url = new URLWriter(URL . getCurrentPage(), $_GET);
     // Remove symphony parameters:
     unset($this->url->parameters()->{'symphony-page'});
     unset($this->url->parameters()->{'symphony-renderer'});
 }
开发者ID:brendo,项目名称:symphony-3,代码行数:11,代码来源:class.devkit.php


示例12: GalleryController

 function GalleryController()
 {
     global $_zp_gallery;
     zp_load_page();
     $this->requestedPage = getCurrentPage() >= 1 ? getCurrentPage() : 1;
     if (!isset($_zp_gallery)) {
         load_gallery();
     }
     list($album, $image) = rewrite_get_album_image('album', 'image');
     $this->setAlbum($album);
     $this->setImage($image);
 }
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:12,代码来源:GalleryController.php


示例13: renderView

 /**
  * Fields requests, routes them to appropriate View, returns output
  */
 public function renderView()
 {
     // Set URL
     $this->url = getCurrentPage();
     // Create view
     $this->View = $this->createView();
     // Initialize View
     $this->View->load($this->url);
     // Initialize context
     $this->initializeContext();
     // Tell the view to build its output
     $output = $this->View->buildOutput();
     return $output;
 }
开发者ID:symphonycms,项目名称:symphony-3,代码行数:17,代码来源:class.controller.php


示例14: smarty_function_reportPages

function smarty_function_reportPages($params, &$smarty)
{
    /*
        parameter total_results(integer,requrired): total number of results
        parameter file_path(string,optional): set the file path that will be used in page urls
        parameter pages_to_show(integer,optional): set number of pages we want to show the user on page select, default 12
    */
    $url_params = convertRequestToUrl(array("page"));
    $file_path = isset($params["file_path"]) ? $params["file_path"] : $_SERVER["PHP_SELF"];
    $pages_to_show = isset($params["pages_to_show"]) ? (int) $params["pages_to_show"] : 12;
    $total_pages = calcTotalPages($params["total_results"], getRPP());
    $cur_page = min(getCurrentPage(), $total_pages);
    $link = "{$file_path}?{$url_params}";
    $pages = createReportPagesArray($link, $cur_page, $total_pages, $pages_to_show);
    return createReportPagesTable($pages, $cur_page, $link, $total_pages);
}
开发者ID:zeroleo12345,项目名称:freeIBS,代码行数:16,代码来源:function.reportPages.php


示例15: promptAuth

 /**
  * Redirects user to login and if he logged he will be returned to where this was calles
  * @param String $paramTo To what should he be redirected? (OPTIONAL)
  */
 public static function promptAuth($paramTo = null)
 {
     if (getUser() != null) {
         return;
     }
     if ($paramTo != null) {
         header("Location: " . orongoURL('orongo-login.php?redirect=' . $paramTo));
         exit;
     }
     if (!function_exists('getCurrentPage')) {
         header("Location: " . orongoURL('orongo-login.php'));
         exit;
     }
     $currentPage = str_replace("admin_", "orongo-admin/", getCurrentPage()) . '.php';
     header("Location: " . orongoURL('orongo-login.php?redirect=' . $currentPage));
     exit;
 }
开发者ID:JacoRuit,项目名称:orongocms,代码行数:21,代码来源:class_Security.php


示例16: __construct

 public function __construct($args)
 {
     $authKey = $args['auth_key'];
     $this->settings = Plugin::getSettings($authKey);
     //Hook terminal plugin
     if (!isset($this->settings["use_terminal"])) {
         $this->settings["use_terminal"] = true;
     }
     if ($this->settings["use_terminal"]) {
         if (!file_exists("OrongoAuthTerminal.php")) {
             throw new Exception("Terminal plugin missing!");
         }
         Plugin::hookTerminalPlugin(new OrongoAuthTerminal($this->settings));
     }
     if (getCurrentPage() == "orongo-login" && isset($_SERVER['orongo-auth-app-name']) && isset($_SERVER['orongo-auth-app-desc']) && isset($_SERVER['orongo-auth-app-website']) && isset($_SERVER['orongo-auth-time'])) {
     }
 }
开发者ID:JacoRuit,项目名称:orongocms,代码行数:17,代码来源:OrongoAuthMain.php


示例17: getArticlesHTML

 public function getArticlesHTML($paramArticles)
 {
     $generatedHTML = "";
     $curPage = getCurrentPage();
     if (is_array($paramArticles) == false) {
         return null;
     }
     //Sup, Orongo? U nooo pass me an array :(
     $count = count($paramArticles);
     if ($count < 1) {
         return "<p>No articles we're found</p>";
     }
     $generatedCount = 0;
     foreach ($paramArticles as $article) {
         $last = false;
         if ($article instanceof Article == false) {
             continue;
         }
         $generatedCount++;
         if ($generatedCount == 4 && $curPage == 'index') {
             $last = true;
         }
         if (is_int($generatedCount / 4) && $curPage == 'archive') {
             $last = true;
         }
         if ($curPage == 'archive' && $last == false && $generatedCount == count($paramArticles)) {
             $last = true;
         }
         $generatedHTML .= '<div class="one_fourth ';
         if ($last) {
             $generatedHTML .= 'column-last';
         }
         $generatedHTML .= ' ">';
         $generatedHTML .= '<a href="' . Settings::getWebsiteURL() . 'article.php?id=' . $article->getID() . '"><h3>' . $article->getTitle() . '</h3></a>';
         $generatedHTML .= '<p>' . substr(strip_tags($article->getContent()), 0, 500) . '</p>';
         $generatedHTML .= '</div>';
         if ($last && $curPage == 'index') {
             break;
         }
     }
     return $generatedHTML;
 }
开发者ID:JacoRuit,项目名称:orongocms,代码行数:42,代码来源:monkPHP.php


示例18: buildCacheInformation

 /**
  * Helper function to build Cache information block
  *
  * @param XMLElement $wrapper
  * @param Cacheable $cache
  * @param string $cache_id
  */
 public static function buildCacheInformation(XMLElement $wrapper, Cacheable $cache, $cache_id)
 {
     $cachedData = $cache->check($cache_id);
     if (is_array($cachedData) && !empty($cachedData) && time() < $cachedData['expiry']) {
         $a = Widget::Anchor(__('Clear now'), SYMPHONY_URL . getCurrentPage() . 'clear_cache/');
         $wrapper->appendChild(new XMLElement('p', __('Cache expires in %d minutes. %s', array(($cachedData['expiry'] - time()) / 60, $a->generate(false))), array('class' => 'help')));
     } else {
         $wrapper->appendChild(new XMLElement('p', __('Cache has expired or does not exist.'), array('class' => 'help')));
     }
 }
开发者ID:beaubbe,项目名称:remote_datasource,代码行数:17,代码来源:datasource.remote.php


示例19: PortaMx_AdminArticles


//.........这里部分代码省略.........
                            ob_end_flush();
                            exit;
                        }
                    }
                    // add a new article
                    if (!empty($_POST['add_new_article'])) {
                        $article = PortaMx_getDefaultArticle($_POST['add_new_article']);
                        $context['pmx']['subaction'] = 'editnew';
                    } elseif (!empty($_POST['edit_article']) || !empty($_POST['clone_article'])) {
                        $id = !empty($_POST['clone_article']) ? $_POST['clone_article'] : $_POST['edit_article'];
                        // load the article for edit/clone
                        $request = $smcFunc['db_query']('', '
							SELECT *
							FROM {db_prefix}portamx_articles
							WHERE id = {int:id}', array('id' => $id));
                        $row = $smcFunc['db_fetch_assoc']($request);
                        $article = array('id' => $row['id'], 'name' => $row['name'], 'catid' => $row['catid'], 'acsgrp' => $row['acsgrp'], 'ctype' => $row['ctype'], 'config' => $row['config'], 'content' => $row['content'], 'active' => $row['active'], 'owner' => $row['owner'], 'created' => $row['created'], 'approved' => $row['approved'], 'approvedby' => $row['approvedby'], 'updated' => $row['updated'], 'updatedby' => $row['updatedby']);
                        $smcFunc['db_free_result']($request);
                        if (!empty($_POST['clone_article'])) {
                            $article['id'] = 0;
                            $article['active'] = 0;
                            $article['approved'] = 0;
                            $article['owner'] = $user_info['id'];
                            $article['created'] = 0;
                            $article['updated'] = 0;
                            $article['updatedby'] = 0;
                            $context['pmx']['subaction'] = 'editnew';
                        } else {
                            $context['pmx']['subaction'] = 'edit';
                        }
                    } elseif (!empty($_POST['delete_article'])) {
                        $delid = $_POST['delete_article'];
                        // get the current page
                        $context['pmx']['articlestart'] = getCurrentPage($delid, $context['pmx']['settings']['manager']['artpage'], true);
                        $smcFunc['db_query']('', '
							DELETE FROM {db_prefix}portamx_articles
							WHERE id = {int:id}', array('id' => $delid));
                        // clear cached blocks
                        $pmxCacheFunc['clean']();
                    } elseif (!empty($_POST['chg_approved'])) {
                        $smcFunc['db_query']('', '
							UPDATE {db_prefix}portamx_articles
							SET approved = CASE WHEN approved = 0 THEN {int:apptime} ELSE 0 END, approvedby = {int:appmember}
							WHERE id = {int:id}', array('id' => $_POST['chg_approved'], 'apptime' => forum_time(), 'appmember' => $user_info['id']));
                        // clear cached blocks
                        $pmxCacheFunc['clean']();
                    } elseif (!empty($_POST['chg_active'])) {
                        $smcFunc['db_query']('', '
							UPDATE {db_prefix}portamx_articles
							SET active = CASE WHEN active = 0 THEN {int:apptime} ELSE 0 END
							WHERE id = {int:id}', array('id' => $_POST['chg_active'], 'apptime' => forum_time()));
                        // clear cached blocks
                        $pmxCacheFunc['clean']();
                    }
                    if (isset($_POST['xml']) && (!empty($_POST['chg_active']) || !empty($_POST['chg_approved']))) {
                        $id = !empty($_POST['chg_active']) ? $_POST['chg_active'] : $_POST['chg_approved'];
                        $request = $smcFunc['db_query']('', '
							SELECT active, approved
							FROM {db_prefix}portamx_articles
							WHERE id = {int:id}', array('id' => $id));
                        list($active, $approved) = $smcFunc['db_fetch_row']($request);
                        $smcFunc['db_free_result']($request);
                        // return update result
                        ob_start();
                        echo $id . ',' . (!empty($_POST['chg_active']) ? intval(!empty($active)) : intval(!empty($approved)));
                        ob_end_flush();
开发者ID:thunderamur,项目名称:PortaMx-Virgo-2.0-Beta-2,代码行数:67,代码来源:AdminArticles.php


示例20: canAccessPage

 /**
  * Checks the current Symphony Author can access the current page.
  * This includes the check to ensure that an Author cannot access a
  * hidden section.
  *
  * @return boolean
  *  True if the Author can access the current page, false otherwise
  */
 public function canAccessPage()
 {
     $nav = $this->getNavigationArray();
     $page = '/' . trim(getCurrentPage(), '/') . '/';
     $page_limit = 'author';
     foreach ($nav as $item) {
         if (General::in_array_multi($page, $item['children'])) {
             if (is_array($item['children'])) {
                 foreach ($item['children'] as $c) {
                     if ($c['type'] == 'section' && $c['visible'] == 'no' && preg_match('#^' . $c['link'] . '#', $page)) {
                         $page_limit = 'developer';
                     }
                     if ($c['link'] == $page && isset($c['limit'])) {
                         $page_limit = $c['limit'];
                     }
                 }
             }
             if (isset($item['limit']) && $page_limit != 'primary') {
                 if ($page_limit == 'author' && $item['limit'] == 'developer') {
                     $page_limit = 'developer';
                 }
             }
         } elseif (isset($item['link']) && $page == $item['link'] && isset($item['limit'])) {
             $page_limit = $item['limit'];
         }
     }
     if ($page_limit == 'author') {
         return true;
     } elseif ($page_limit == 'developer' && Administration::instance()->Author->isDeveloper()) {
         return true;
     } elseif ($page_limit == 'primary' && Administration::instance()->Author->isPrimaryAccount()) {
         return true;
     }
     return false;
 }
开发者ID:benesch,项目名称:hilton-unar,代码行数:43,代码来源:class.administrationpage.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP getCurrentTheme函数代码示例发布时间:2022-05-15
下一篇:
PHP getCurrentLocation函数代码示例发布时间: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