本文整理汇总了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') {
示例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';
}
}