本文整理汇总了PHP中cAdvancedSecurity::CanDelete方法的典型用法代码示例。如果您正苦于以下问题:PHP cAdvancedSecurity::CanDelete方法的具体用法?PHP cAdvancedSecurity::CanDelete怎么用?PHP cAdvancedSecurity::CanDelete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cAdvancedSecurity
的用法示例。
在下文中一共展示了cAdvancedSecurity::CanDelete方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cUserProfile
function Page_Init()
{
global $gsExport, $gsCustomExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;
// User profile
$UserProfile = new cUserProfile();
// Security
$Security = new cAdvancedSecurity();
if (!$Security->IsLoggedIn()) {
$Security->AutoLogin();
}
if ($Security->IsLoggedIn()) {
$Security->TablePermission_Loading();
}
$Security->LoadCurrentUserLevel($this->ProjectID . $this->TableName);
if ($Security->IsLoggedIn()) {
$Security->TablePermission_Loaded();
}
if (!$Security->CanDelete()) {
$Security->SaveLastUrl();
$this->setFailureMessage($Language->Phrase("NoPermission"));
// Set no permission
if ($Security->CanList()) {
$this->Page_Terminate(ew_GetUrl("banklist.php"));
} else {
$this->Page_Terminate(ew_GetUrl("login.php"));
}
}
if ($Security->IsLoggedIn()) {
$Security->UserID_Loading();
$Security->LoadUserID();
$Security->UserID_Loaded();
}
$this->CurrentAction = @$_GET["a"] != "" ? $_GET["a"] : @$_POST["a_list"];
// Set up current action
$this->BANK_ID->Visible = !$this->IsAdd() && !$this->IsCopy() && !$this->IsGridAdd();
// Global Page Loading event (in userfn*.php)
Page_Loading();
// Page Load event
$this->Page_Load();
// Check token
if (!$this->ValidPost()) {
echo $Language->Phrase("InvalidPostRequest");
$this->Page_Terminate();
exit;
}
// Create Token
$this->CreateToken();
}
示例2: cAdvancedSecurity
function Page_Init()
{
global $gsExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;
global $tbl_ga_stat;
// Security
$Security = new cAdvancedSecurity();
if (!$Security->IsLoggedIn()) {
$Security->AutoLogin();
}
if (!$Security->IsLoggedIn()) {
$Security->SaveLastUrl();
$this->Page_Terminate("login.php");
}
$Security->TablePermission_Loading();
$Security->LoadCurrentUserLevel($this->TableName);
$Security->TablePermission_Loaded();
if (!$Security->IsLoggedIn()) {
$Security->SaveLastUrl();
$this->Page_Terminate("login.php");
}
if (!$Security->CanDelete()) {
$Security->SaveLastUrl();
$this->Page_Terminate("tbl_ga_statlist.php");
}
// Global Page Loading event (in userfn*.php)
Page_Loading();
// Page Load event
$this->Page_Load();
}
示例3:
<?php
}
if ($nTotalRecs > 0) {
?>
<table id="ewlistmain" class="ewTable">
<?php
$OptionCnt = 0;
if ($Security->CanView()) {
$OptionCnt++;
// view
}
if ($Security->CanEdit()) {
$OptionCnt++;
// edit
}
if ($Security->CanDelete()) {
$OptionCnt++;
// delete
}
?>
<!-- Table header -->
<tr class="ewTableHeader">
<td valign="top">
<?php
if ($user->Export != "") {
?>
id
<?php
} else {
?>
<a href="userlist.php?order=<?php
示例4:
$OptionCnt++;
// edit
}
if ($Security->IsLoggedIn()) {
$OptionCnt++;
// copy
}
if ($Security->IsLoggedIn()) {
$OptionCnt++;
// delete
}
?>
<!-- Table header -->
<tr class="ewTableHeader">
<?php
if ($Security->CanDelete() || $Security->CanArchive()) {
?>
<td width="20"><input type="hidden" name="action" id="action" value=""/></td>
<?php
}
?>
<td valign="top">
<?php
if ($archives->Export != "") {
?>
id
<?php
} else {
?>
编号
<?php
示例5: trim
var chk = document.forms["fpostslist"].elements["chkAll"];
for(var i = 0;i < cbx.length;i ++){
cbx[i].checked = chk.checked;
}
}
</script>
<?php
if( isset($view) && $view == 'classic' ) {
$keywords = trim($posts->getBasicSearchKeyword());
if( $posts->getBasicSearchType() == 'OR' || $posts->getBasicSearchType() == 'AND' ) {
$keywords = explode(' ',$keywords);
}
?>
<table id="ewlistmain" class="ewTable">
<tr>
<?php if ($Security->CanDelete()||$Security->CanArchive()) { ?>
<td><input type="hidden" name="action" id="action" value=""/></td>
<?php } ?>
</tr>
<?php
if (defined("EW_EXPORT_ALL") && $posts->Export <> "") {
$nStopRec = $nTotalRecs;
} else {
$nStopRec = $nStartRec + $nDisplayRecs - 1; // Set the last record to display
}
$nRecCount = $nStartRec - 1;
if (!$rs->EOF) {
$rs->MoveFirst();
if (!$posts->SelectLimit) $rs->Move($nStartRec - 1); // Move to first record directly
}
$RowCnt = 0;