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


PHP CheckPermissionsEvent函数代码示例

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


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

示例1: add_nocache_headers

<?php

include "include/dbcommon.php";
@ini_set("display_errors", "1");
@ini_set("display_startup_errors", "1");
add_nocache_headers();
include "include/pad_pad_customer_variables.php";
include 'include/xtempl.php';
include 'classes/addpage.php';
global $globalEvents;
//	check if logged in
if (!isLogged() || CheckPermissionsEvent($strTableName, 'A') && !CheckSecurity(@$_SESSION["_" . $strTableName . "_OwnerID"], "Add")) {
    $_SESSION["MyURL"] = $_SERVER["SCRIPT_NAME"] . "?" . $_SERVER["QUERY_STRING"];
    header("Location: login.php?message=expired");
    return;
}
if (sizeof($_POST) == 0 && postvalue('ferror')) {
    if (postvalue("inline")) {
        $returnJSON['success'] = false;
        $returnJSON['message'] = "Error occurred";
        $returnJSON['fatalError'] = true;
        echo "<textarea>" . htmlspecialchars(my_json_encode($returnJSON)) . "</textarea>";
        exit;
    } else {
        if (postvalue("fly")) {
            echo -1;
            exit;
        } else {
            $_SESSION["message_add"] = "<< " . "Error occurred" . " >>";
        }
    }
开发者ID:aagusti,项目名称:padl-tng,代码行数:31,代码来源:pad_pad_customer_add.php

示例2: session_cache_limiter

@ini_set("display_errors", "1");
@ini_set("display_startup_errors", "1");
session_cache_limiter("none");
include "include/dbcommon.php";
header("Expires: Thu, 01 Jan 1970 00:00:01 GMT");
set_time_limit(600);
include "include/pad_pad_spt_type_variables.php";
include "include/import_functions.php";
$strOriginalTableName = "\"pad\".\"pad_spt_type\"";
if (!isLogged()) {
    $_SESSION["MyURL"] = $_SERVER["SCRIPT_NAME"] . "?" . $_SERVER["QUERY_STRING"];
    header("Location: login.php?message=expired");
    return;
}
if (CheckPermissionsEvent($strTableName, 'I') && !CheckSecurity(@$_SESSION["_" . $strTableName . "_OwnerID"], "Import")) {
    echo "<p>" . "You don't have permissions to access this table" . "<a href=\"login.php\">" . "Back to login page" . "</a></p>";
    return;
}
$cipherer = new RunnerCipherer($strTableName);
// keys array
$keys[] = AddFieldWrappers("id");
$keys_present = 1;
$total_records = 0;
$goodlines = 0;
// Create audit object
$auditObj = GetAuditObject($strTableName);
function getFieldNamesByHeaders($fields)
{
    global $strTableName, $conn, $strOriginalTableName, $ext, $gSettings;
    // check fields in column headers
开发者ID:aagusti,项目名称:padl-tng,代码行数:30,代码来源:pad_pad_spt_type_import.php

示例3: add_nocache_headers

include "include/dbcommon.php";
add_nocache_headers();
include "include/public_tmp_bank2_variables.php";
include "classes/searchcontrol.php";
include "classes/advancedsearchcontrol.php";
include "classes/panelsearchcontrol.php";
include "classes/searchclause.php";
$sessionPrefix = $strTableName;
//Basic includes js files
$includes = "";
// predefined fields num
$predefFieldNum = 0;
$chrt_array = array();
$rpt_array = array();
//	check if logged in
if (!isLogged() || CheckPermissionsEvent($strTableName, 'S') && !CheckSecurity(@$_SESSION["_" . $strTableName . "_OwnerID"], "Search") && !@$chrt_array['status'] && !@$rpt_array['status'] || @$rpt_array['status'] == "private" && @$rpt_array['owner'] != @$_SESSION["UserID"] || @$chrt_array['status'] == "private" && @$chrt_array['owner'] != @$_SESSION["UserID"]) {
    $_SESSION["MyURL"] = $_SERVER["SCRIPT_NAME"] . "?" . $_SERVER["QUERY_STRING"];
    header("Location: login.php?message=expired");
    return;
}
$layout = new TLayout("search2", "RoundedGreen", "MobileGreen");
$layout->blocks["top"] = array();
$layout->containers["search"] = array();
$layout->containers["search"][] = array("name" => "srchheader", "block" => "", "substyle" => 2);
$layout->containers["search"][] = array("name" => "srchconditions", "block" => "conditions_block", "substyle" => 1);
$layout->containers["search"][] = array("name" => "wrapper", "block" => "", "substyle" => 1, "container" => "fields");
$layout->containers["fields"] = array();
$layout->containers["fields"][] = array("name" => "srchfields", "block" => "", "substyle" => 1);
$layout->skins["fields"] = "fields";
$layout->containers["search"][] = array("name" => "srchbuttons", "block" => "", "substyle" => 2);
$layout->skins["search"] = "1";
开发者ID:aagusti,项目名称:padl-tng,代码行数:31,代码来源:public_tmp_bank2_search.php

示例4: header

include "include/public_tmp_bank_2013_variables.php";
include 'classes/runnerpage.php';
include 'classes/listpage.php';
include "classes/searchpanel.php";
include "classes/searchcontrol.php";
include "classes/searchclause.php";
include "classes/panelsearchcontrol.php";
if (!isLogged()) {
    $_SESSION["MyURL"] = $_SERVER["SCRIPT_NAME"] . "?" . $_SERVER["QUERY_STRING"];
    header("Location: login.php?message=expired");
    return;
}
if (isLoggedAsGuest()) {
    $_SESSION["MyURL"] = $_SERVER["SCRIPT_NAME"] . "?" . $_SERVER["QUERY_STRING"];
}
if (CheckPermissionsEvent($strTableName, 'S') && !CheckSecurity(@$_SESSION["_" . $strTableName . "_OwnerID"], "Search") && !CheckSecurity(@$_SESSION["_" . $strTableName . "_OwnerID"], "Add")) {
    if (IsAdmin()) {
        echo "<p>" . "You don't have permissions to access this table" . "<br><a href=\"admin_rights_list.php\">" . "Proceed to Admin Area" . "</a> " . "to set up user permissions" . "</p>";
    } else {
        echo "<p>" . "You don't have permissions to access this table" . " <a href=\"login.php\">" . "Back to login page" . "</a></p>";
    }
    exit;
}
$layout = new TLayout("list2", "RoundedGreen", "MobileGreen");
$layout->blocks["center"] = array();
$layout->skins["recordcontrols"] = "1";
$layout->blocks["center"][] = "recordcontrols";
$layout->containers["message"] = array();
$layout->containers["message"][] = array("name" => "message", "block" => "message_block", "substyle" => 1);
$layout->skins["message"] = "2";
$layout->blocks["center"][] = "message";
开发者ID:aagusti,项目名称:padl-tng,代码行数:31,代码来源:public_tmp_bank_2013_list.php


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