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


PHP Admin::checkAccess方法代码示例

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


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

示例1: set_time_limit

<?php

set_time_limit(0);
session_start();
ob_start();
include "./common.php";
Admin::checkAuth();
Admin::checkAccess(AdminAccess::ACCESS_VIEW);
$updated_video = 0;
$updated_karaoke = 0;
$not_custom_video = Mysql::getInstance()->from('video')->where(array('protocol!=' => 'custom'))->get();
while ($item = $not_custom_video->next()) {
    $master = new VideoMaster();
    $master->getAllGoodStoragesForMediaFromNet($item['id'], true);
    unset($master);
    $updated_video++;
}
$not_custom_karaoke = Mysql::getInstance()->from('karaoke')->where(array('protocol!=' => 'custom'))->get();
while ($item = $not_custom_video->next()) {
    $master = new KaraokeMaster();
    $master->getAllGoodStoragesForMediaFromNet($item['id']);
    unset($master);
    $updated_karaoke++;
}
$error = sprintf(_('Updated %s videos and %s karaokes'), $updated_video, $updated_karaoke);
$debug = '<!--' . ob_get_contents() . '-->';
ob_clean();
echo $debug;
?>
<html>
<head>
开发者ID:Eugen1985,项目名称:stalker_portal,代码行数:31,代码来源:cache_refresh.php

示例2: header

        header("Location: epg_setting.php");
        exit;
    } elseif (isset($_GET['status'])) {
        Admin::checkAccess(AdminAccess::ACCESS_CONTEXT_ACTION);
        Mysql::getInstance()->update('epg_setting', array('status' => (int) $_GET['status']), array('id' => (int) $_GET['id']));
        header("Location: epg_setting.php");
        exit;
    }
}
if (@$_GET['edit'] && !empty($id)) {
    $action_name = 'edit';
    $action_value = _('Save');
    $edit = Mysql::getInstance()->from('epg_setting')->where(array('id' => $id))->get()->first();
}
if (isset($_GET['update_epg'])) {
    Admin::checkAccess(AdminAccess::ACCESS_PAGE_ACTION);
    $epg = new Epg();
    if (isset($_GET['force'])) {
        $force = true;
    } else {
        $force = false;
    }
    $error = $epg->updateEpg($force);
}
$settings = Mysql::getInstance()->from('epg_setting')->get()->all();
$debug = '<!--' . ob_get_contents() . '-->';
ob_clean();
echo $debug;
?>
<html>
<head>
开发者ID:Eugen1985,项目名称:stalker_portal,代码行数:31,代码来源:epg_setting.php

示例3: unset

             unset($_SESSION['upload']);
         }
         if ((empty($_FILES['screenshot']) || empty($_FILES['screenshot']['tmp_name'])) && empty($_POST['cover_big']) && empty($_POST['cover_id'])) {
             Mysql::getInstance()->delete('screenshots', array('media_id' => $video_id));
         }
         add_video_log('add', $video_id);
         //header("Location: add_video.php?letter=".@$_GET['letter']."&search=".@$_GET['search']."&page=".@$_GET['page']);
         //exit;
     } else {
         if (!$error) {
             $error = _('Error: all fields are required');
         }
     }
 }
 if (@$_GET['update']) {
     Admin::checkAccess(AdminAccess::ACCESS_EDIT);
     $video_id = intval(@$_GET['id']);
     if (@$_GET['name']) {
         Mysql::getInstance()->update('video', array('name' => trim($_POST['name']), 'series' => serialize($series), 'o_name' => trim($_POST['o_name']), 'censored' => $censored, 'hd' => $hd, 'for_sd_stb' => $for_sd_stb, 'protocol' => $protocol, 'rtsp_url' => $rtsp_url, 'time' => @$_POST['time'], 'description' => $_POST['description'], 'genre_id_1' => $genre_id_1, 'genre_id_2' => $genre_id_2, 'genre_id_3' => $genre_id_3, 'genre_id_4' => $genre_id_4, 'cat_genre_id_1' => $cat_genre_id_1, 'cat_genre_id_2' => $cat_genre_id_2, 'cat_genre_id_3' => $cat_genre_id_3, 'cat_genre_id_4' => $cat_genre_id_4, 'category_id' => $category_id, 'director' => $_POST['director'], 'actors' => $_POST['actors'], 'status' => $status, 'year' => $_POST['year'], 'volume_correction' => (int) $_POST['volume_correction'], 'kinopoisk_id' => $_POST['kinopoisk_id'], 'rating_kinopoisk' => $_POST['rating_kinopoisk'], 'rating_count_kinopoisk' => $_POST['rating_count_kinopoisk'], 'rating_imdb' => $_POST['rating_imdb'], 'rating_count_imdb' => $_POST['rating_count_imdb'], 'age' => $_POST['age'], 'rating_mpaa' => $_POST['rating_mpaa'], 'high_quality' => $high_quality, 'low_quality' => $low_quality, 'comments' => $_POST['comments'], 'country' => $_POST['country']), array('id' => (int) $_GET['id']));
         add_video_log('edit', intval(@$_GET['id']));
         if (!empty($_SESSION['upload'])) {
             Mysql::getInstance()->query('DELETE from screenshots where media_id=\'' . intval(@$_GET['id']) . '\' and id not IN (' . @implode(',', $_SESSION['upload']) . ')');
             Mysql::getInstance()->query('UPDATE screenshots SET media_id=\'' . intval(@$_GET['id']) . '\' WHERE id IN (' . @implode(',', $_SESSION['upload']) . ')');
             unset($_SESSION['upload']);
         }
         if ((empty($_FILES['screenshot']) || empty($_FILES['screenshot']['tmp_name'])) && empty($_POST['cover_big']) && empty($_POST['cover_id'])) {
             Mysql::getInstance()->delete('screenshots', array('media_id' => intval(@$_GET['id'])));
         }
         //header("Location: add_video.php?letter=".@$_GET['letter']."&search=".@$_GET['search']."&page=".$_GET['page']);
         //exit;
     } else {
开发者ID:saydulk,项目名称:stalker_portal,代码行数:31,代码来源:add_video.php

示例4: intval

if (!empty($_POST)) {
    $time = intval($_POST['hh']) * 60 + intval($_POST['mm']);
}
if (@$_POST['add']) {
    Admin::checkAccess(AdminAccess::ACCESS_CREATE);
    $playlist->addRecord(array('time' => $time, 'video_id' => $_POST['video_id'], 'playlist_id' => $_GET['playlist_id']));
    header("Location: playlist.php?playlist_id=" . @$_GET['playlist_id']);
    exit;
}
if (!empty($id)) {
    if (@$_POST['edit']) {
        Admin::checkAccess(AdminAccess::ACCESS_EDIT);
        $playlist->updateRecord(array('time' => $time, 'video_id' => $_POST['video_id']), $id);
        header("Location: playlist.php?playlist_id=" . @$_GET['playlist_id']);
    } elseif (@$_GET['del']) {
        Admin::checkAccess(AdminAccess::ACCESS_DELETE);
        $playlist->delRecord($id);
        header("Location: playlist.php?playlist_id=" . @$_GET['playlist_id']);
    }
    exit;
}
if (@$_GET['edit'] && !empty($id)) {
    $action_name = 'edit';
    $action_value = _('Save');
    $edit_record = $playlist->getRecord($id);
}
$records = $playlist->getAllRecordsByPlaylistId($_GET['playlist_id']);
function time_to_hhmm($time)
{
    if ($time < 0) {
        return '----';
开发者ID:Eugen1985,项目名称:stalker_portal,代码行数:31,代码来源:playlist.php

示例5: session_start

session_start();
ob_start();
include "./common.php";
$error = '';
Admin::checkAuth();
Admin::checkAccess(AdminAccess::ACCESS_VIEW);
$error_counter = 0;
if (@$_GET['del'] == 1) {
    Admin::checkAccess(AdminAccess::ACCESS_DELETE);
    $uid = Middleware::getUidByMac(@$_GET['mac']);
    Mysql::getInstance()->delete('events', array('uid' => $uid));
    header("Location: events.php?mac=" . @$_GET['mac']);
    exit;
}
if (!empty($_POST['user_list_type']) && !empty($_POST['event'])) {
    Admin::checkAccess(AdminAccess::ACCESS_CREATE);
    if (@$_POST['need_reboot']) {
        $reboot_after_ok = 1;
    } else {
        $reboot_after_ok = 0;
    }
    $event = new SysEvent();
    $event->setTtl($_POST['ttl']);
    if (@$_POST['user_list_type'] == 'to_all') {
        if ($_POST['event'] == 'send_msg' || $_POST['event'] == 'send_msg_with_video') {
            $event->setUserListByMac('all');
            $user_list = Middleware::getOnlineUsersId();
        } else {
            $event->setUserListByMac('online');
            $user_list = Middleware::getAllUsersId();
        }
开发者ID:Eugen1985,项目名称:stalker_portal,代码行数:31,代码来源:events.php

示例6: intval

    exit;
}
if (isset($_GET['set_services'])) {
    Admin::checkAccess(AdminAccess::ACCESS_CONTEXT_ACTION);
    $id = intval(@$_GET['id']);
    $set = intval($_GET['set_services']);
    if ($set == 0) {
    } else {
        $set = 1;
    }
    Mysql::getInstance()->update('users', array('additional_services_on' => $set), array('id' => $id));
    header("Location: profile.php?id=" . @$_GET['id']);
    exit;
}
if (isset($_GET['id']) && isset($_GET['package_id']) && isset($_GET['subscribed'])) {
    Admin::checkAccess(AdminAccess::ACCESS_CONTEXT_ACTION);
    $id = intval($_GET['id']);
    $package_id = intval($_GET['package_id']);
    $subscribed = intval($_GET['subscribed']);
    $user = User::getInstance($id);
    if ($subscribed) {
        $user->subscribeToPackage($package_id, null, true);
    } else {
        $user->unsubscribeFromPackage($package_id, null, true);
    }
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link type="text/css" href="../adm/css/jquery.ui.all.css" rel="stylesheet" />
开发者ID:Eugen1985,项目名称:stalker_portal,代码行数:31,代码来源:profile.php


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