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


PHP UI::access_denied方法代码示例

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


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

示例1: debug_event

 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 */
require_once 'lib/init.php';
if (!isset($_REQUEST['action']) || empty($_REQUEST['action'])) {
    debug_event("stream.php", "Asked without action. Exiting...", 5);
    exit;
}
if (!defined('NO_SESSION')) {
    /* If we are running a demo, quick while you still can! */
    if (AmpConfig::get('demo_mode') || !Access::check('interface', '25')) {
        UI::access_denied();
        exit;
    }
}
$media_ids = array();
$web_path = AmpConfig::get('web_path');
debug_event("stream.php", "Asked for {" . $_REQUEST['action'] . "}.", 5);
/**
 * action switch
 */
switch ($_REQUEST['action']) {
    case 'basket':
        // Pull in our items (multiple types)
        $media_ids = $GLOBALS['user']->playlist->get_items();
        // Check to see if 'clear' was passed if it was then we need to reset the basket
        if ($_REQUEST['playlist_method'] == 'clear' || AmpConfig::get('playlist_method') == 'clear') {
开发者ID:axelsimon,项目名称:ampache,代码行数:31,代码来源:stream.php

示例2: display_from_request

 public static function display_from_request()
 {
     if (!Access::check('interface', '50')) {
         UI::access_denied();
     } else {
         $user_id = $_REQUEST['user_id'];
         $object_type = $_REQUEST['object_type'];
         $object_id = $_REQUEST['object_id'];
         $end_date = $_REQUEST['end_date'] ? strtotime($_REQUEST['end_date']) : time();
         $f_end_date = date("Y-m-d H:i", $end_date);
         $start_date = $_REQUEST['start_date'] ? strtotime($_REQUEST['start_date']) : $end_date - 864000;
         $f_start_date = date("Y-m-d H:i", $start_date);
         $zoom = $_REQUEST['zoom'] ?: 'day';
         $gtypes = array();
         $gtypes[] = 'user_hits';
         if ($object_type == null || $object_type == 'song' || $object_type == 'video') {
             $gtypes[] = 'user_bandwidth';
         }
         if (!$user_id && !$object_id) {
             $gtypes[] = 'catalog_files';
             $gtypes[] = 'catalog_size';
         }
         $blink = '';
         if ($object_id) {
             if (Core::is_library_item($object_type)) {
                 $libitem = new $object_type($object_id);
                 $libitem->format();
                 if (isset($libitem->f_link)) {
                     $blink = $libitem->f_link;
                 }
             }
         } else {
             if ($user_id) {
                 $u = new User($user_id);
                 $u->format();
                 $blink = $u->f_link;
             }
         }
         require_once AmpConfig::get('prefix') . '/templates/show_graphs.inc.php';
     }
 }
开发者ID:nioc,项目名称:ampache,代码行数:41,代码来源:graph.class.php


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