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


PHP DCL_Sanitize::ToSignedInt方法代码示例

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


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

示例1: show

 function show()
 {
     global $dcl_info, $g_oSec;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_PROJECT, DCL_PERM_VIEW)) {
         return PrintPermissionDenied();
     }
     $oView = CreateObject('dcl.boView');
     $oView->numrows = 25;
     $filterStatus = @DCL_Sanitize::ToSignedInt($_REQUEST['filterStatus']);
     $filterReportto = @DCL_Sanitize::ToInt($_REQUEST['filterReportto']);
     $oView->table = 'dcl_projects';
     $oView->style = 'report';
     $oView->title = 'Projects';
     $oView->AddDef('columnhdrs', '', array(STR_CMMN_ID, STR_PRJ_LEAD, STR_PRJ_STATUS, STR_PRJ_NAME));
     $oView->AddDef('columns', '', array('projectid', 'reportto.short', 'statuses.name', 'dcl_projects.name'));
     if ($dcl_info['DCL_PROJECT_BROWSE_PARENTS_ONLY'] == 'Y') {
         $oView->AddDef('filter', 'parentprojectid', 0);
     }
     $oView->AddDef('order', '', array('dcl_projects.name'));
     if ($filterStatus !== null) {
         if ($filterStatus > 0) {
             $oView->AddDef('filter', 'dcl_projects.status', $filterStatus);
         } else {
             if ($filterStatus == -1) {
                 $oView->AddDef('filter', 'statuses.dcl_status_type', '2');
             } else {
                 $oView->AddDef('filternot', 'statuses.dcl_status_type', '2');
             }
         }
     } else {
         $oView->AddDef('filternot', 'statuses.dcl_status_type', '2');
     }
     if ($filterReportto !== null) {
         $oView->AddDef('filter', 'dcl_projects.reportto', $filterReportto);
     }
     if (isset($_REQUEST['filterName']) && trim($_REQUEST['filterName']) != '') {
         $oView->AddDef('filterlike', 'name', GPCStripSlashes($_REQUEST['filterName']));
     }
     $oHtml = CreateObject('dcl.htmlProjectsBrowse');
     $oHtml->Render($oView);
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:42,代码来源:class.htmlProjects.inc.php

示例2: View

 function View()
 {
     global $g_oSec;
     commonHeader();
     if (($id = @DCL_Sanitize::ToInt($_REQUEST['id'])) === null) {
         trigger_error('Data sanitize failed.');
         return;
     }
     if ($id > 0) {
         if (!$g_oSec->HasPerm(DCL_ENTITY_HOTLIST, DCL_PERM_VIEW, $id)) {
             return PrintPermissionDenied();
         }
         $status = 0;
         $responsible = 0;
         if (($status = @DCL_Sanitize::ToSignedInt($_REQUEST['wostatus'])) === null) {
             $status = 0;
         }
         if (($responsible = @DCL_Sanitize::ToInt($_REQUEST['woresponsible'])) === null) {
             $responsible = 0;
         }
         $this->show($id, $status, $responsible);
     }
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:23,代码来源:class.htmlHotlistProject.inc.php

示例3: Page

 function Page()
 {
     global $dcl_info, $g_oSec;
     commonHeader();
     if (!$g_oSec->HasAnyPerm(array(DCL_ENTITY_TICKET => array($g_oSec->PermArray(DCL_PERM_VIEW), $g_oSec->PermArray(DCL_PERM_VIEWSUBMITTED), $g_oSec->PermArray(DCL_PERM_VIEWACCOUNT))))) {
         return PrintPermissionDenied();
     }
     $oView = CreateObject('dcl.boView');
     $oView->SetFromURL();
     if (isset($_REQUEST['jumptopage']) && isset($_REQUEST['startrow']) && isset($_REQUEST['numrows'])) {
         $iPage = (int) $_REQUEST['jumptopage'];
         if ($iPage < 1) {
             $iPage = 1;
         }
         $oView->startrow = ($iPage - 1) * (int) $_REQUEST['numrows'];
         if ($oView->startrow < 0) {
             $oView->startrow = 0;
         }
         $oView->numrows = (int) $_REQUEST['numrows'];
     } else {
         $oView->numrows = 25;
         $oView->startrow = 0;
     }
     $filterStatus = -1;
     if (isset($_REQUEST['filterStatus'])) {
         $filterStatus = @DCL_Sanitize::ToSignedInt($_REQUEST['filterStatus']);
     }
     $filterReportto = @DCL_Sanitize::ToInt($_REQUEST['filterReportto']);
     $filterProduct = @DCL_Sanitize::ToInt($_REQUEST['filterProduct']);
     $filterType = @DCL_Sanitize::ToInt($_REQUEST['filterType']);
     $oView->RemoveDef('filternot', 'statuses.dcl_status_type');
     $oView->RemoveDef('filter', 'statuses.dcl_status_type');
     $oView->RemoveDef('filter', 'status');
     if ($filterStatus !== null && $filterStatus != 0) {
         if ($filterStatus == -1) {
             $oView->AddDef('filternot', 'statuses.dcl_status_type', '2');
         } else {
             if ($filterStatus == -2) {
                 $oView->AddDef('filter', 'statuses.dcl_status_type', '2');
             } else {
                 if ($filterStatus !== null) {
                     $oView->AddDef('filter', 'status', $filterStatus);
                 }
             }
         }
     } else {
         $oView->RemoveDef('filter', 'status');
     }
     if ($filterReportto !== null && $filterReportto > 0) {
         $oView->ReplaceDef('filter', 'responsible', $filterReportto);
     } else {
         $oView->RemoveDef('filter', 'responsible');
     }
     if ($filterProduct !== null && $filterProduct > 0) {
         $oView->ReplaceDef('filter', 'product', $filterProduct);
     } else {
         $oView->RemoveDef('filter', 'product');
     }
     if ($filterType !== null && $filterType > 0) {
         $oView->ReplaceDef('filter', 'type', $filterType);
     } else {
         $oView->RemoveDef('filter', 'type');
     }
     $this->sColumnTitle = STR_CMMN_OPTIONS;
     $this->bShowPager = true;
     $this->Render($oView);
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:67,代码来源:class.htmlTicketBrowse.inc.php

示例4: Page

 function Page()
 {
     global $dcl_info, $g_oSec;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_PROJECT, DCL_PERM_VIEW)) {
         return PrintPermissionDenied();
     }
     $oView = CreateObject('dcl.boView');
     $oView->SetFromURL();
     if (isset($_REQUEST['jumptopage']) && isset($_REQUEST['startrow']) && isset($_REQUEST['numrows'])) {
         $iPage = (int) $_REQUEST['jumptopage'];
         if ($iPage < 1) {
             $iPage = 1;
         }
         $oView->startrow = ($iPage - 1) * (int) $_REQUEST['numrows'];
         if ($oView->startrow < 0) {
             $oView->startrow = 0;
         }
         $oView->numrows = (int) $_REQUEST['numrows'];
     } else {
         $oView->numrows = 25;
         $oView->startrow = 0;
     }
     $filterStatus = -1;
     if (isset($_REQUEST['filterStatus'])) {
         $filterStatus = @DCL_Sanitize::ToSignedInt($_REQUEST['filterStatus']);
     }
     $filterReportto = @DCL_Sanitize::ToInt($_REQUEST['filterReportto']);
     $oView->RemoveDef('filternot', 'statuses.dcl_status_type');
     $oView->RemoveDef('filter', 'statuses.dcl_status_type');
     $oView->RemoveDef('filter', 'status');
     $oView->RemoveDef('filterlike', 'name');
     if ($filterStatus !== null && $filterStatus != 0) {
         if ($filterStatus == -1) {
             $oView->AddDef('filternot', 'statuses.dcl_status_type', '2');
         } else {
             if ($filterStatus == -2) {
                 $oView->AddDef('filter', 'statuses.dcl_status_type', '2');
             } else {
                 if ($filterStatus !== null) {
                     $oView->AddDef('filter', 'status', $filterStatus);
                 }
             }
         }
     } else {
         $oView->RemoveDef('filter', 'status');
     }
     if ($filterReportto !== null && $filterReportto > 0) {
         $oView->ReplaceDef('filter', 'reportto', $filterReportto);
     } else {
         $oView->RemoveDef('filter', 'reportto');
     }
     if (isset($_REQUEST['filterName']) && trim($_REQUEST['filterName']) != '') {
         $oView->AddDef('filterlike', 'name', GPCStripSlashes($_REQUEST['filterName']));
     }
     $this->sColumnTitle = STR_CMMN_OPTIONS;
     $this->bShowPager = true;
     $this->Render($oView);
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:59,代码来源:class.htmlProjectsBrowse.inc.php

示例5: showBrowseFrame

 function showBrowseFrame()
 {
     global $dcl_info, $g_oSec;
     if (!$g_oSec->HasPerm(DCL_ENTITY_CONTACT, DCL_PERM_VIEW)) {
         return PrintPermissionDenied();
     }
     $filterStatus = @DCL_Sanitize::ToSignedInt($_REQUEST['filterStatus']);
     if ($filterStatus === null) {
         $filterStatus = -1;
     }
     $filterStartsWith = '';
     if (isset($_REQUEST['filterStartsWith'])) {
         $filterStartsWith = $_REQUEST['filterStartsWith'];
     }
     $filterSearch = '';
     if (isset($_REQUEST['filterSearch'])) {
         $filterSearch = $_REQUEST['filterSearch'];
     }
     $filterID = '';
     if (isset($_REQUEST['filterID'])) {
         if (ereg('^[0-9]+([,][0-9]+)*$', $_REQUEST['filterID'])) {
             $filterID = explode(',', $_REQUEST['filterID']);
         }
     }
     $aColumnHeaders = array(STR_CMMN_ID, STR_PRJ_LEAD, STR_PRJ_STATUS, STR_PRJ_NAME);
     $aColumns = array('projectid', 'reportto.short', 'statuses.name', 'dcl_projects.name');
     $iPage = 1;
     $this->oView->startrow = 0;
     $this->oView->numrows = 15;
     if (isset($_REQUEST['page'])) {
         $iPage = (int) $_REQUEST['page'];
         if ($iPage < 1) {
             $iPage = 1;
         }
         $this->oView->startrow = ($iPage - 1) * $this->oView->numrows;
         if ($this->oView->startrow < 0) {
             $this->oView->startrow = 0;
         }
     }
     $this->oView->table = 'dcl_projects';
     $this->oView->AddDef('columnhdrs', '', $aColumnHeaders);
     $this->oView->AddDef('columns', '', $aColumns);
     $this->oView->AddDef('order', '', array('name'));
     if ($filterStatus !== null) {
         if ($filterStatus > 0) {
             $this->oView->AddDef('filter', 'dcl_projects.status', $filterStatus);
         } else {
             if ($filterStatus == -2) {
                 $this->oView->AddDef('filter', 'statuses.dcl_status_type', '2');
             } else {
                 $this->oView->AddDef('filternot', 'statuses.dcl_status_type', '2');
             }
         }
     } else {
         $this->oView->AddDef('filternot', 'statuses.dcl_status_type', '2');
     }
     if ($filterSearch != '') {
         $this->oView->AddDef('filterlike', 'name', $filterSearch);
     }
     if ($filterStartsWith != '') {
         $this->oView->AddDef('filterstart', 'name', $filterStartsWith);
     }
     if (is_array($filterID)) {
         $this->oView->AddDef('filter', 'projectid', $filterID);
     }
     if ($this->oDB->Query($this->oView->GetSQL(true)) == -1 || !$this->oDB->next_record()) {
         exit;
     }
     $iRecords = (int) $this->oDB->f(0);
     $this->oSmarty->assign('VAL_COUNT', $iRecords);
     $this->oSmarty->assign('VAL_PAGE', $iPage);
     $this->oSmarty->assign('VAL_MAXPAGE', ceil($iRecords / $this->oView->numrows));
     $this->oDB->FreeResult();
     if ($this->oDB->LimitQuery($this->oView->GetSQL(), $this->oView->startrow, $this->oView->numrows) != -1) {
         $aProjects = array();
         while ($this->oDB->next_record()) {
             $aRecord = $this->oDB->Record;
             $aRecord['status'] = $this->oDB->f(2);
             $aRecord['reportto'] = $this->oDB->f(1);
             array_push($aProjects, $aRecord);
         }
         $this->oDB->FreeResult();
         $this->oSmarty->assign_by_ref('VAL_PROJECTS', $aProjects);
         $this->oSmarty->assign('VAL_HEADERS', $aColumnHeaders);
         $this->oSmarty->assign('VAL_FILTERID', $filterID);
         $this->oSmarty->assign('VAL_MULTISELECT', isset($_REQUEST['multiple']) && $_REQUEST['multiple'] == 'true');
         SmartyDisplay($this->oSmarty, 'htmlProjectSelectorBrowse.tpl');
     }
     exit;
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:90,代码来源:class.htmlProjectSelector.inc.php

示例6: viewproject

 function viewproject()
 {
     global $g_oSec;
     commonHeader();
     if (($project = @DCL_Sanitize::ToInt($_REQUEST['project'])) === null) {
         trigger_error('Data sanitize failed.');
         return;
     }
     if ($project > 0) {
         if (!$g_oSec->HasPerm(DCL_ENTITY_PROJECT, DCL_PERM_VIEW, $project)) {
             return PrintPermissionDenied();
         }
         $obj =& CreateObject('dcl.htmlProjectsdetail');
         $wostatus = 0;
         $woresponsible = 0;
         if (($wostatus = @DCL_Sanitize::ToSignedInt($_REQUEST['wostatus'])) === null) {
             $wostatus = 0;
         }
         if (($woresponsible = @DCL_Sanitize::ToInt($_REQUEST['woresponsible'])) === null) {
             $woresponsible = 0;
         }
         $obj->show($project, $wostatus, $woresponsible);
     }
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:24,代码来源:class.boProjects.inc.php


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