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


PHP PrintPermissionDenied函数代码示例

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


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

示例1: show

 function show($orderBy = 'short')
 {
     global $dcl_info, $g_oSec;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_ORG, DCL_PERM_VIEW)) {
         return PrintPermissionDenied();
     }
     $oView = CreateObject('dcl.boView');
     $oView->startrow = 0;
     $oView->numrows = 25;
     $filterActive = '';
     if (isset($_REQUEST['filterActive'])) {
         $filterActive = $_REQUEST['filterActive'];
     }
     $oView->table = 'dcl_org';
     $oView->title = 'Browse Organizations';
     $oView->AddDef('columnhdrs', '', array('ID', 'Active', 'Name', 'Phone', 'Email', 'Internet'));
     $oView->AddDef('columns', '', array('org_id', 'active', 'name', 'dcl_org_phone.phone_number', 'dcl_org_email.email_addr', 'dcl_org_url.url_addr'));
     $oView->AddDef('order', '', array('name'));
     if ($filterActive == 'Y' || $filterActive == 'N') {
         $oView->AddDef('filter', 'active', "'{$filterActive}'");
     }
     $oHtml = CreateObject('dcl.htmlOrgBrowse');
     $oHtml->Render($oView);
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:25,代码来源:class.htmlOrg.inc.php

示例2: view

 function view()
 {
     global $g_oSec;
     commonHeader();
     if (($iID = @DCL_Sanitize::ToInt($_REQUEST['id'])) === null) {
         trigger_error('Data sanitize failed.');
         return;
     }
     if (!$g_oSec->HasPerm(DCL_ENTITY_PRODUCT, DCL_PERM_VIEW, $iID)) {
         return PrintPermissionDenied();
     }
     $which = isset($_REQUEST['which']) ? $_REQUEST['which'] : '';
     if ($which != 'workorders' && $which != 'tickets' && $which != 'modules' && $which != 'release' && $which != 'build') {
         $which = null;
     }
     $versionid = null;
     if (isset($_REQUEST['versionid'])) {
         $versionid = @DCL_Sanitize::ToInt($_REQUEST['versionid']);
     }
     $obj =& CreateObject('dcl.htmlProductDetail');
     if ($which !== null) {
         if ($versionid !== null) {
             $obj->Show($iID, $which, $versionid);
         } else {
             $obj->Show($iID, $which);
         }
     } else {
         $obj->Show($iID);
     }
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:30,代码来源:class.boProducts.inc.php

示例3: show

 function show($orderBy = 'short')
 {
     global $dcl_info, $g_oSec;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_ROLE, DCL_PERM_VIEW)) {
         return PrintPermissionDenied();
     }
     $oView = CreateObject('dcl.boView');
     $oView->startrow = 0;
     $oView->numrows = 25;
     $filterActive = '';
     if (isset($_REQUEST['filterActive'])) {
         $filterActive = $_REQUEST['filterActive'];
     }
     $oView->table = 'dcl_role';
     $oView->title = 'Browse Roles';
     $oView->AddDef('columnhdrs', '', array('ID', 'Active', 'Role'));
     $oView->AddDef('columns', '', array('role_id', 'active', 'role_desc'));
     $oView->AddDef('order', '', array('role_desc'));
     if ($filterActive == 'Y' || $filterActive == 'N') {
         $oView->AddDef('filter', 'active', "'{$filterActive}'");
     }
     $oHtml = CreateObject('dcl.htmlRoleBrowse');
     $oHtml->Render($oView);
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:25,代码来源:class.htmlRole.inc.php

示例4: ShowEntryForm

 function ShowEntryForm($obj = '')
 {
     global $dcl_info, $g_oSec;
     $isEdit = is_object($obj);
     if (!$g_oSec->HasPerm(DCL_ENTITY_PERSONNEL, $isEdit ? DCL_PERM_MODIFY : DCL_PERM_ADD)) {
         return PrintPermissionDenied();
     }
     $Template =& CreateSmarty();
     $Template->assign('IS_EDIT', $isEdit);
     $oUserRole = CreateObject('dcl.dbUserRole');
     $oDept = CreateObject('dcl.htmlDepartments');
     if ($isEdit) {
         $Template->assign('VAL_PERSONNELID', $obj->id);
         $Template->assign('VAL_ACTIVE', $obj->active);
         $Template->assign('VAL_SHORT', $obj->short);
         $Template->assign('VAL_REPORTTO', $obj->reportto);
         $Template->assign('VAL_DEPARTMENT', $obj->department);
         $Template->assign('Roles', $oUserRole->GetGlobalRoles($obj->id));
         $oMeta =& CreateObject('dcl.DCL_MetadataDisplay');
         $aContact =& $oMeta->GetContact($obj->contact_id);
         $Template->assign('VAL_CONTACTID', $obj->contact_id);
         $Template->assign('VAL_CONTACTNAME', $aContact['name']);
     } else {
         $Template->assign('VAL_ACTIVE', 'Y');
         $Template->assign('VAL_REPORTTO', $GLOBALS['DCLID']);
         $Template->assign('VAL_DEPARTMENT', 0);
         $Template->assign('VAL_SHORT', '');
         $Template->assign('Roles', $oUserRole->GetGlobalRoles());
     }
     SmartyDisplay($Template, 'htmlPersonnelForm.tpl');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:31,代码来源:class.htmlPersonnelForm.inc.php

示例5: ShowTopic

 function ShowTopic($obj)
 {
     global $dcl_info, $g_oSec;
     if (!is_object($obj)) {
         trigger_error('[htmlFaqtopics::ShowTopic] ' . STR_FAQ_TOPICOBJECTNOTPASSED);
         return;
     }
     if (!$g_oSec->HasPerm(DCL_ENTITY_FAQ, DCL_PERM_VIEW, $obj->faqid)) {
         return PrintPermissionDenied();
     }
     $objFaq = CreateObject('dcl.dbFaq');
     if ($objFaq->Load($obj->faqid) == -1) {
         return;
     }
     $t =& CreateSmarty();
     $t->assign('VAL_FAQID', $objFaq->faqid);
     $t->assign('VAL_FAQNAME', $objFaq->name);
     $t->assign('VAL_DESCRIPTION', $obj->description);
     $t->assign('VAL_TOPICID', $obj->f('topicid'));
     $t->assign('VAL_TOPICNAME', $obj->name);
     $t->assign('PERM_ADDQUESTION', $g_oSec->HasPerm(DCL_ENTITY_FAQQUESTION, DCL_PERM_ADD, $obj->faqid));
     $t->assign('PERM_MODIFY', $g_oSec->HasPerm(DCL_ENTITY_FAQTOPIC, DCL_PERM_MODIFY));
     $t->assign('PERM_DELETE', $g_oSec->HasPerm(DCL_ENTITY_FAQTOPIC, DCL_PERM_DELETE));
     $objF = CreateObject('dcl.dbFaqquestions');
     if ($objF->LoadByFaqTopicID($obj->topicid) == -1) {
         return;
     }
     $aRecords = array();
     while ($objF->next_record()) {
         array_push($aRecords, $objF->Record);
     }
     $t->assign('VAL_QUESTIONS', $aRecords);
     SmartyDisplay($t, 'htmlFaqtopicsDetail.tpl');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:34,代码来源:class.htmlFaqtopics.inc.php

示例6: show

 function show()
 {
     global $dcl_info, $g_oSec;
     if (!$g_oSec->HasPerm(DCL_ENTITY_ADMIN, DCL_PERM_MODIFY)) {
         return PrintPermissionDenied();
     }
     $objPersonnel = CreateObject('dcl.htmlPersonnel');
     $oDBPersonnel = CreateObject('dcl.dbPersonnel');
     if ($oDBPersonnel->Load($GLOBALS['DCLID']) == -1) {
         return;
     }
     $t =& CreateSmarty();
     $oSelect = CreateObject('dcl.htmlSelect');
     $t->assign('CMB_USERS', $objPersonnel->GetCombo(0, 'responsible', 'lastfirst', 0, false));
     $begindate = @DCL_Sanitize::ToDate($_REQUEST['begindate']);
     if ($begindate !== null) {
         $t->assign('VAL_BEGINDATE', $begindate);
     } else {
         $t->assign('VAL_BEGINDATE', '');
     }
     $enddate = @DCL_Sanitize::ToDate($_REQUEST['enddate']);
     if ($enddate !== null) {
         $t->assign('VAL_ENDDATE', $enddate);
     } else {
         $t->assign('VAL_ENDDATE', '');
     }
     SmartyDisplay($t, 'htmlSecAuditBrowse.tpl');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:28,代码来源:class.htmlSecAudit.inc.php

示例7: ShowPage

 function ShowPage($sPage)
 {
     global $g_oSec, $dcl_info;
     commonHeader();
     if (($productid = DCL_Sanitize::ToInt($_REQUEST['id'])) === null) {
         trigger_error('Data sanitize failed.');
         return;
     }
     if (!$g_oSec->HasPerm(DCL_ENTITY_PRODUCT, DCL_PERM_VIEW, $productid)) {
         return PrintPermissionDenied();
     }
     $this->oProduct =& CreateObject('dcl.dbProducts');
     if ($this->oProduct->Load($productid) == -1) {
         trigger_error('Could not find a product with an id of ' . $productid, E_USER_ERROR);
         return;
     }
     $this->oSmarty->assign('VAL_ID', $this->oProduct->id);
     $this->oSmarty->assign('VAL_NAME', $this->oProduct->name);
     $this->oSmarty->assign('PERM_VIEWWO', $g_oSec->HasPerm(DCL_ENTITY_WORKORDER, DCL_PERM_VIEW));
     $this->oSmarty->assign('PERM_VIEWTCK', $g_oSec->HasPerm(DCL_ENTITY_TICKET, DCL_PERM_VIEW));
     $this->oSmarty->assign('PERM_WIKI', $dcl_info['DCL_WIKI_ENABLED'] == 'Y' && $g_oSec->HasPerm(DCL_ENTITY_PRODUCT, DCL_PERM_VIEWWIKI));
     $this->oSmarty->assign('PERM_EDIT', $g_oSec->HasPerm(DCL_ENTITY_PRODUCT, DCL_PERM_MODIFY));
     $this->oSmarty->assign('PERM_DELETE', $g_oSec->HasPerm(DCL_ENTITY_PRODUCT, DCL_PERM_DELETE));
     $this->oSmarty->assign('PERM_VERSIONS', $dcl_info['DCL_BUILD_MANAGER_ENABLED'] == 'Y' && $this->oProduct->is_versioned == 'Y');
     SmartyDisplay($this->oSmarty, $sPage);
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:26,代码来源:class.htmlProductDashboard.inc.php

示例8: Show

 function Show($id, $status, $responsible)
 {
     global $dcl_info, $dcl_domain_info, $dcl_domain, $g_oSec;
     if (!isset($_REQUEST['wogroupby'])) {
         $_REQUEST['wogroupby'] = 'none';
     }
     $bIsGrouping = $_REQUEST['wogroupby'] != 'none';
     if (!$g_oSec->HasPerm(DCL_ENTITY_HOTLIST, DCL_PERM_VIEW, $id)) {
         return PrintPermissionDenied();
     }
     if ($this->hotlist->Load($id) == -1) {
         trigger_error('Could not find a hotlist with an id of ' . $id, E_USER_ERROR);
         return;
     }
     $oMeta =& CreateObject('dcl.DCL_MetadataDisplay');
     $this->oSmarty->assign('VAL_HOTLISTID', $id);
     $this->oSmarty->assign('VAL_NAME', $this->hotlist->hotlist_tag);
     $this->oSmarty->assign('VAL_DESCRIPTION', $this->hotlist->hotlist_desc);
     $this->oSmarty->assign('VAL_FILTERSTATUS', $status);
     $this->oSmarty->assign('VAL_FILTERRESPONSIBLE', $responsible);
     $this->oSmarty->assign('VAL_FILTERGROUPBY', $_REQUEST['wogroupby']);
     $this->oSmarty->assign('OPT_GROUPBY', array('none' => STR_CMMN_SELECTONE, '3' => STR_WO_RESPONSIBLE, '7' => STR_WO_STATUS, '4' => STR_WO_PRODUCT, '5' => STR_CMMN_MODULE, '2' => STR_WO_TYPE));
     $this->oSmarty->assign('PERM_AUDIT', $g_oSec->HasPerm(DCL_ENTITY_PROJECT, DCL_PERM_AUDIT));
     $this->oSmarty->assign('PERM_ATTACHFILE', $g_oSec->HasPerm(DCL_ENTITY_PROJECT, DCL_PERM_ATTACHFILE));
     $this->oSmarty->assign('PERM_REMOVEFILE', $g_oSec->HasPerm(DCL_ENTITY_PROJECT, DCL_PERM_REMOVEFILE));
     $this->SetStatistics();
     $this->SetTasks($status, $responsible, $bIsGrouping);
     SmartyDisplay($this->oSmarty, 'htmlHotlistProjectDetail.tpl');
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:29,代码来源:class.htmlHotlistProject.inc.php

示例9: Render

 function Render(&$oView)
 {
     global $g_oSec, $dcl_info;
     if (!$g_oSec->HasPerm(DCL_ENTITY_ADDRTYPE, DCL_PERM_VIEW)) {
         return PrintPermissionDenied();
     }
     parent::Render($oView);
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:8,代码来源:class.htmlAddrTypeView.inc.php

示例10: submitModify

 function submitModify()
 {
     global $g_oSession, $dcl_info, $g_oSec;
     if (!$g_oSec->HasPerm(DCL_ENTITY_PREFS, DCL_PERM_MODIFY)) {
         return PrintPermissionDenied();
     }
     $bHasChanges = false;
     $o = CreateObject('dcl.dbPreferences');
     $o->personnel_id = $GLOBALS['DCLID'];
     $o->preferences_data = $g_oSession->Value('dcl_preferences');
     if (!isset($o->preferences_data) || !is_array($o->preferences_data) || count($o->preferences_data) < 1) {
         $o->preferences_data = array('DCL_PREF_TEMPLATE_SET' => $dcl_info['DCL_DEF_TEMPLATE_SET'], 'DCL_PREF_LANGUAGE' => $dcl_info['DCL_DEFAULT_LANGUAGE'], 'DCL_PREF_NOTIFY_DEFAULT' => 'N', 'DCL_PREF_CREATED_WATCH_OPTION' => 4);
         $o->Add();
         $bHasChanges = true;
     }
     $sOldTpl = $o->preferences_data['DCL_PREF_TEMPLATE_SET'];
     foreach ($_REQUEST as $pref => $setting) {
         if (substr($pref, 0, 9) != 'DCL_PREF_') {
             continue;
         }
         if ($pref == 'DCL_PREF_NOTIFY_DEFAULT') {
             $setting = DCL_Sanitize::ToYN($_REQUEST['DCL_PREF_NOTIFY_DEFAULT']);
         }
         if ($o->Value($pref) != $setting) {
             $bHasChanges = true;
             $o->Register($pref, $setting);
         }
     }
     if (!isset($_REQUEST['DCL_PREF_NOTIFY_DEFAULT'])) {
         $bHasChanges = true;
         $o->Register('DCL_PREF_NOTIFY_DEFAULT', 'N');
     }
     if ($bHasChanges) {
         $o->Edit();
         $g_oSession->Register('dcl_preferences', $o->preferences_data);
         $g_oSession->Edit();
     }
     // Template change?
     $sNewTpl = $o->preferences_data['DCL_PREF_TEMPLATE_SET'];
     if ($sNewTpl != $sOldTpl) {
         // Do we need to break out of frames?
         $menuAction = 'menuAction=htmlPreferences.modify';
         $sNewIsFramed = file_exists(DCL_ROOT . 'templates/' . $sNewTpl . '/frameset.php');
         $sOldIsFramed = file_exists(DCL_ROOT . 'templates/' . $sOldTpl . '/frameset.php');
         if ($sOldIsFramed) {
             if ($sNewIsFramed) {
                 RefreshTop(menuLink(DCL_WWW_ROOT . 'templates/' . $sNewTpl . '/frameset.php', $menuAction));
             } else {
                 RefreshTop(menuLink('', $menuAction));
             }
         } else {
             if ($sNewIsFramed) {
                 RefreshTop(menuLink(DCL_WWW_ROOT . 'templates/' . $sNewTpl . '/frameset.php', $menuAction));
             }
         }
     }
     $this->modify();
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:58,代码来源:class.htmlPreferences.inc.php

示例11: Render

 function Render(&$oView)
 {
     global $g_oSec, $dcl_info;
     if ($g_oSec->HasPerm(DCL_ENTITY_SOURCE, DCL_PERM_VIEW)) {
         parent::Render($oView);
     } else {
         return PrintPermissionDenied();
     }
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:9,代码来源:class.htmlEntitySourceView.inc.php

示例12: ShowSystemConfig

 function ShowSystemConfig()
 {
     global $g_oSec;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_ADMIN, DCL_PERM_VIEW)) {
         return PrintPermissionDenied();
     }
     $obj =& CreateObject('dcl.htmlAdminMain');
     $obj->Show();
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:10,代码来源:class.boAdmin.inc.php

示例13: delete

 function delete($aSource)
 {
     global $g_oSec;
     if (!$g_oSec->HasPerm(DCL_ENTITY_ROLE, DCL_PERM_DELETE)) {
         return PrintPermissionDenied();
     }
     $oDB =& CreateObject('dcl.dbRolePerm');
     $oDB->DeleteRole($aSource['role_id']);
     return parent::Delete($aSource);
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:10,代码来源:class.boRole.inc.php

示例14: ShowResults

 function ShowResults()
 {
     global $g_oSec;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_ADMIN, DCL_PERM_MODIFY)) {
         return PrintPermissionDenied();
     }
     $begindate = @DCL_Sanitize::ToDateTime($_REQUEST['begindate'] . ' 00:00:00.00');
     $enddate = @DCL_Sanitize::ToDateTime($_REQUEST['enddate'] . ' 23:59:59.99');
     $responsible = DCL_Sanitize::ToInt($_REQUEST['responsible']);
     if ($begindate === null || $enddate === null) {
         commonHeader();
         trigger_error(STR_SEC_DATEERR, E_USER_ERROR);
         $this->Show(false);
         return;
     }
     $objDBPer =& CreateObject('dcl.dbPersonnel');
     $objDBSA =& CreateObject('dcl.dbSecAudit');
     $objDB = new DCLDb();
     $sCols = 'SA.id, ' . $objDBSA->ConvertTimestamp('SA.actionon', 'actionon') . ', SA.actiontxt, SA.actionparam';
     $sCols .= ', ' . $objDBPer->SelectAllColumns('Pers.');
     $sQuery = "SELECT {$sCols}\n\t\t\tFROM {$objDBSA->TableName} SA INNER JOIN {$objDBPer->TableName} Pers on \n\t\t\tSA.id = pers.id \n\t\t\tWHERE SA.actionon BETWEEN " . $objDBSA->DisplayToSQL($begindate) . ' and ' . $objDBSA->DisplayToSQL($enddate);
     if ($responsible == 0) {
         $respname = STR_SEC_ALLUSERS;
     } else {
         $objDBPer->Load($responsible);
         $respname = $objDBPer->short;
         $sQuery .= ' AND SA.id=' . $responsible;
     }
     $sQuery .= ' ORDER BY SA.actionon';
     $reportAr = null;
     if ($objDB->Query($sQuery) != -1) {
         if ($objDB->next_record()) {
             $idx = -1;
             do {
                 $idx++;
                 $reportAr[$idx][] = $objDB->f('short');
                 $reportAr[$idx][] = $objDB->FormatTimeStampForDisplay($objDB->f('actionon'));
                 $reportAr[$idx][] = $objDB->f('actiontxt');
                 $reportAr[$idx][] = $objDB->f('actionparam');
             } while ($objDB->next_record());
         } else {
             trigger_error(STR_SEC_RPTNODATA, E_USER_ERROR);
             $this->Show(false);
             return;
         }
     }
     $obj =& CreateObject('dcl.htmlSecAudit');
     if (!$obj->Render($reportAr, $begindate, $enddate, $respname)) {
         trigger_error(STR_SEC_RPTERROR, E_USER_ERROR);
         $this->Show(false);
         return;
     }
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:54,代码来源:class.boSecAudit.inc.php

示例15: Detail

 function Detail()
 {
     global $g_oSession, $g_oSec, $dcl_info;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_SESSION, DCL_PERM_VIEW)) {
         return PrintPermissionDenied();
     }
     echo '<pre>';
     print_r($g_oSession->session_data);
     echo '</pre>';
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:11,代码来源:class.htmlSession.inc.php


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