當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。