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


PHP cAdvancedSecurity::CanView方法代码示例

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


在下文中一共展示了cAdvancedSecurity::CanView方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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->CanView()) {
         $Security->SaveLastUrl();
         $this->setFailureMessage($Language->Phrase("NoPermission"));
         // Set no permission
         if ($Security->CanList()) {
             $this->Page_Terminate(ew_GetUrl("airplanelist.php"));
         } else {
             $this->Page_Terminate(ew_GetUrl("login.php"));
         }
     }
     if ($Security->IsLoggedIn()) {
         $Security->UserID_Loading();
         $Security->LoadUserID();
         $Security->UserID_Loaded();
     }
     // Get export parameters
     $custom = "";
     if (@$_GET["export"] != "") {
         $this->Export = $_GET["export"];
         $custom = @$_GET["custom"];
     } elseif (@$_POST["export"] != "") {
         $this->Export = $_POST["export"];
         $custom = @$_POST["custom"];
     } elseif (ew_IsHttpPost()) {
         if (@$_POST["exporttype"] != "") {
             $this->Export = $_POST["exporttype"];
         }
         $custom = @$_POST["custom"];
     } else {
         $this->setExportReturnUrl(ew_CurrentUrl());
     }
     $gsExportFile = $this->TableVar;
     // Get export file, used in header
     if (@$_GET["AIRPLANE_ID"] != "") {
         if ($gsExportFile != "") {
             $gsExportFile .= "_";
         }
         $gsExportFile .= ew_StripSlashes($_GET["AIRPLANE_ID"]);
     }
     // Get custom export parameters
     if ($this->Export != "" && $custom != "") {
         $this->CustomExport = $this->Export;
         $this->Export = "print";
     }
     $gsCustomExport = $this->CustomExport;
     $gsExport = $this->Export;
     // Get export parameter, used in header
     // Update Export URLs
     if (defined("EW_USE_PHPEXCEL")) {
         $this->ExportExcelCustom = FALSE;
     }
     if ($this->ExportExcelCustom) {
         $this->ExportExcelUrl .= "&custom=1";
     }
     if (defined("EW_USE_PHPWORD")) {
         $this->ExportWordCustom = FALSE;
     }
     if ($this->ExportWordCustom) {
         $this->ExportWordUrl .= "&custom=1";
     }
     if ($this->ExportPdfCustom) {
         $this->ExportPdfUrl .= "&custom=1";
     }
     $this->CurrentAction = @$_GET["a"] != "" ? $_GET["a"] : @$_POST["a_list"];
     // Set up current action
     // Setup export options
     $this->SetupExportOptions();
     $this->AIRPLANE_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();
 }
开发者ID:demian054,项目名称:APCB_WebPagePHP,代码行数:98,代码来源:airplaneview.php

示例2: cAdvancedSecurity

 function Page_Init()
 {
     global $gsExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;
     global $tbl_target;
     // 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->CanView()) {
         $Security->SaveLastUrl();
         $this->Page_Terminate("tbl_targetlist.php");
     }
     // Global Page Loading event (in userfn*.php)
     Page_Loading();
     // Page Load event
     $this->Page_Load();
 }
开发者ID:jliman,项目名称:SEOStat,代码行数:29,代码来源:tbl_targetview.php

示例3:

        if ($archives->Export != "") {
            ?>
		标题
		<?php 
        } else {
            ?>
			网页标题&nbsp;(*)
		<?php 
        }
        ?>
				</td>
		<?php 
        if ($archives->Export == "") {
            ?>
		<?php 
            if ($Security->CanView()) {
                ?>
		<td nowrap>&nbsp;</td>
		<?php 
            }
            ?>
		<?php 
            if ($Security->CanEdit()) {
                ?>

		<?php 
            }
            ?>
		<?php 
        }
        ?>
开发者ID:BGCX261,项目名称:zhss-svn-to-git,代码行数:31,代码来源:archiveslist.php

示例4: if

		<?php if ($posts->Export <> "") { ?>
		时间
		<?php } else { ?>
			<a href="postslist.php?order=<?php echo urlencode('datetime') ?>&ordertype=<?php echo $posts->datetime->ReverseSort() ?>">时间<?php if ($posts->datetime->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($posts->datetime->getSort() == "DESC") { ?><img src="images/sortdown.gif" width="10" height="9" border="0"><?php } ?></a>
		<?php } ?>
				</td>
				<td valign="top">
		<?php if ($posts->Export <> "" ) { ?>
		标题
		<?php } else { ?>
			<a href="postslist.php?order=<?php echo urlencode('title') ?>&ordertype=<?php echo $posts->title->ReverseSort() ?>">网页标题&nbsp;(*)<?php if ($posts->title->getSort() == "ASC") { ?><img src="images/sortup.gif" width="10" height="9" border="0"><?php } elseif ($posts->title->getSort() == "DESC") { ?><img src="images/sortdown.gif" width="10" height="9" border="0"><?php } ?></a>
		<?php } ?>
				</td>
		<?php if ($posts->Export == "") { ?>
		<?php
			if ($Security->CanView()) {
		?>
		<td nowrap>&nbsp;</td>
		<?php } ?>
		<?php if ($Security->CanEdit()) { ?>
		<td nowrap>&nbsp;</td>
		<?php } ?>
		<?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;
开发者ID:BGCX261,项目名称:zhss-svn-to-git,代码行数:31,代码来源:复件+postslist.php


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