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


PHP yourls_html_menu函数代码示例

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


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

示例1: yourls_plugin_admin_page

/**
 * Handle plugin administration page
 *
 */
function yourls_plugin_admin_page($plugin_page)
{
    global $ydb;
    // Check the plugin page is actually registered
    if (!isset($ydb->plugin_pages[$plugin_page])) {
        yourls_die('This page does not exist. Maybe a plugin you thought was activated is inactive?', 'Invalid link');
    }
    // Draw the page itself
    yourls_do_action('load-' . $plugin_page);
    yourls_html_head('plugin_page_' . $plugin_page, $ydb->plugin_pages[$plugin_page]['title']);
    yourls_html_logo();
    yourls_html_menu();
    call_user_func($ydb->plugin_pages[$plugin_page]['function']);
    yourls_html_footer();
    die;
}
开发者ID:469306621,项目名称:Languages,代码行数:20,代码来源:functions-plugins.php

示例2: ceil

        $max_on_page = $offset + $perpage;
    }
    // Determine Number Of Items To Display On Page
    if ($offset + 1 > $total_items) {
        $display_on_page = $total_items;
    } else {
        $display_on_page = $offset + 1;
    }
    // Determing Total Amount Of Pages
    $total_pages = ceil($total_items / $perpage);
}
// Begin output of the page
$context = $is_bookmark ? 'bookmark' : 'index';
yourls_html_head($context);
yourls_html_logo();
yourls_html_menu();
yourls_do_action('admin_page_before_content');
if (!$is_bookmark) {
    ?>
	<p><?php 
    echo $search_sentence;
    ?>
</p>
	<p><?php 
    printf(yourls__('Display <strong>%1$s</strong> to <strong class="increment">%2$s</strong> of <strong class="increment">%3$s</strong> URLs'), $display_on_page, $max_on_page, $total_items);
    if ($total_items_clicks !== false) {
        echo ", " . sprintf(yourls_n('counting <strong>1</strong> click', 'counting <strong>%s</strong> clicks', $total_items_clicks), yourls_number_format_i18n($total_items_clicks));
    }
    ?>
.</p>
<?php 
开发者ID:yourls,项目名称:yourls,代码行数:31,代码来源:index.php

示例3: action_auth_successful

 /**
  * Yourls action auth_successful
  *
  * @return bool
  */
 public function action_auth_successful()
 {
     if (!yourls_is_admin()) {
         return true;
     }
     /**
      * Check page permissions
      */
     if (preg_match('#\\/admin\\/(.*?)\\.php#', $_SERVER['SCRIPT_FILENAME'], $matches)) {
         if (!in_array($matches[1], $this->helperGetAllowedPermissions())) {
             yourls_add_notice(yourls__('Denied access to this page', self::APP_NAMESPACE));
             yourls_html_head('accessdenied', yourls__('Denied access to this page', self::APP_NAMESPACE));
             yourls_html_logo();
             yourls_html_menu();
             yourls_html_footer();
             die;
         }
     }
     /**
      * Check action permissions
      */
     if (yourls_is_Ajax()) {
         $action = $this->getRequest('action');
         $permissions = $this->helperGetAllowedPermissions();
         $bol = false;
         switch ($action) {
             case 'edit_display':
             case 'edit_save':
                 if (!in_array('edit', $permissions['action'])) {
                     $bol = true;
                 }
                 break;
             case 'add':
             case 'delete':
                 if (!in_array($action, $permissions['action'])) {
                     $bol = true;
                 }
                 break;
         }
         if ($bol) {
             $this->setRequest('action_old', $action);
             $this->setRequest('action', 'accessdenied');
         }
     }
 }
开发者ID:laemmi,项目名称:laemmi-yourls-easy-ldap,代码行数:50,代码来源:Plugin.php


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