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


PHP DCL_Sanitize::ToActualFileName方法代码示例

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


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

示例1: attachFile

 function attachFile($aSource, $iIndex = -1)
 {
     if (($wo_task_id = DCL_Sanitize::ToInt($aSource['wo_task_id'])) === null) {
         trigger_error('Data sanitize failed.', E_USER_ERROR);
         return;
     }
     if ($this->oDB->Load($wo_task_id) == -1) {
         return;
     }
     if (($sFileName = DCL_Sanitize::ToFileName('userfile')) !== null) {
         $o =& CreateObject('dcl.boFile');
         $o->iType = DCL_ENTITY_WORKORDER_TASK;
         $o->iKey1 = $wo_task_id;
         $o->sFileName = DCL_Sanitize::ToActualFileName('userfile');
         $o->sTempFileName = $sFileName;
         $o->sRoot = $dcl_info['DCL_FILE_PATH'] . '/attachments';
         $o->Upload();
     }
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:19,代码来源:class.boWorkOrderTask.inc.php

示例2: doupload

 function doupload()
 {
     global $dcl_info, $g_oSec;
     commonHeader();
     if (($iID = @DCL_Sanitize::ToInt($_REQUEST['jcn'])) === null || ($iSeq = @DCL_Sanitize::ToInt($_REQUEST['seq'])) === null) {
         trigger_error('Data sanitize failed.');
         return;
     }
     if (!$g_oSec->HasPerm(DCL_ENTITY_WORKORDER, DCL_PERM_ATTACHFILE, $iID, $iSeq)) {
         return PrintPermissionDenied();
     }
     $oWO =& CreateObject('dcl.dbWorkorders');
     if ($oWO->Load($iID, $iSeq) == -1) {
         return;
     }
     if (($sFileName = DCL_Sanitize::ToFileName('userfile')) === null) {
         return PrintPermissionDenied();
     }
     $o = CreateObject('dcl.boFile');
     $o->iType = DCL_ENTITY_WORKORDER;
     $o->iKey1 = $iID;
     $o->iKey2 = $iSeq;
     $o->sFileName = DCL_Sanitize::ToActualFileName('userfile');
     $o->sTempFileName = $sFileName;
     $o->sRoot = $dcl_info['DCL_FILE_PATH'] . '/attachments';
     $o->Upload();
     $obj = CreateObject('dcl.htmlWorkOrderDetail');
     $obj->Show($iID, $iSeq);
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:29,代码来源:class.boWorkorders.inc.php

示例3: doupload

 function doupload()
 {
     global $dcl_info, $g_oSec;
     commonHeader();
     if (($projectid = @DCL_Sanitize::ToInt($_REQUEST['projectid'])) === null) {
         trigger_error('Data sanitize failed.');
         return;
     }
     if (!$g_oSec->HasPerm(DCL_ENTITY_PROJECT, DCL_PERM_ATTACHFILE, $projectid)) {
         return PrintPermissionDenied();
     }
     if (($sFileName = DCL_Sanitize::ToFileName('userfile')) !== null) {
         $o =& CreateObject('dcl.boFile');
         $o->iType = DCL_ENTITY_PROJECT;
         $o->iKey1 = $projectid;
         $o->sFileName = DCL_Sanitize::ToActualFileName('userfile');
         $o->sTempFileName = $sFileName;
         $o->sRoot = $dcl_info['DCL_FILE_PATH'] . '/attachments';
         $o->Upload();
     } else {
         trigger_error('Invalid request');
         return;
     }
     $objHTML =& CreateObject('dcl.htmlProjectsdetail');
     $objHTML->Show($projectid, 0, 0);
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:26,代码来源:class.boProjects.inc.php

示例4: dbadd

 function dbadd()
 {
     global $dcl_info, $g_oSec;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_WORKORDER, DCL_PERM_ACTION)) {
         return PrintPermissionDenied();
     }
     $objTimecard =& CreateObject('dcl.dbTimeCards');
     $objWorkorder =& CreateObject('dcl.dbWorkorders');
     $oStatus =& CreateObject('dcl.dbStatuses');
     $objTimecard->InitFromGlobals();
     $objTimecard->actionby = $GLOBALS['DCLID'];
     if ($g_oSec->IsPublicUser()) {
         $objTimecard->is_public = 'Y';
     } else {
         $objTimecard->is_public = @DCL_Sanitize::ToYN($_REQUEST['is_public']);
     }
     $objTimecard->inputon = DCL_NOW;
     if ($objWorkorder->Load($objTimecard->jcn, $objTimecard->seq) == -1) {
         return;
     }
     if (($targeted_version_id = @DCL_Sanitize::ToInt($_REQUEST['targeted_version_id'])) === null) {
         $targeted_version_id = 0;
     }
     if (($fixed_version_id = @DCL_Sanitize::ToInt($_REQUEST['fixed_version_id'])) === null) {
         $fixed_version_id = 0;
     }
     $status = $objWorkorder->status;
     $objTimecard->Add($targeted_version_id, $fixed_version_id);
     $notify = '4';
     if ($status != $objTimecard->status) {
         $notify .= ',3';
         if ($oStatus->GetStatusType($objTimecard->status) == 2) {
             $notify .= ',2';
             // also need to close all incomplete tasks and warn user if it happens
             $this->closeIncompleteTasks($objTimecard->jcn, $objTimecard->seq);
         } elseif ($oStatus->GetStatusType($objTimecard->status) == 1 && $oStatus->GetStatusType($status) != 1) {
             $notify .= ',1';
         }
     }
     // See if we modified some work order items
     // * Tags
     if (isset($_REQUEST['tags']) && $g_oSec->HasPerm(DCL_ENTITY_WORKORDER, DCL_PERM_MODIFY)) {
         $oTag =& CreateObject('dcl.dbEntityTag');
         $oTag->serialize(DCL_ENTITY_WORKORDER, $objWorkorder->jcn, $objWorkorder->seq, $_REQUEST['tags']);
     }
     // * Hotlists
     if (isset($_REQUEST['hotlist']) && $g_oSec->HasPerm(DCL_ENTITY_WORKORDER, DCL_PERM_MODIFY)) {
         $oTag =& CreateObject('dcl.dbEntityHotlist');
         $oTag->serialize(DCL_ENTITY_WORKORDER, $objWorkorder->jcn, $objWorkorder->seq, $_REQUEST['hotlist']);
     }
     // * Organizations - only if multiple are allowed to improve workflow
     if ($g_oSec->HasPerm(DCL_ENTITY_WORKORDER, DCL_PERM_MODIFY) && $dcl_info['DCL_WO_SECONDARY_ACCOUNTS_ENABLED'] == 'Y') {
         $oWOA =& CreateObject('dcl.dbWorkOrderAccount');
         if (isset($_REQUEST['secaccounts'])) {
             $aAccounts = @DCL_Sanitize::ToIntArray($_REQUEST['secaccounts']);
             if ($aAccounts === null) {
                 $aAccounts = array();
             }
             $oWOA->DeleteByWorkOrder($objWorkorder->jcn, $objWorkorder->seq, join(',', $aAccounts));
             // Add the new ones
             if (count($aAccounts) > 0) {
                 $oWOA->wo_id = $objWorkorder->jcn;
                 $oWOA->seq = $objWorkorder->seq;
                 for ($i = 0; $i < count($aAccounts); $i++) {
                     if ($aAccounts[$i] > 0) {
                         $oWOA->account_id = $aAccounts[$i];
                         $oWOA->Add();
                     }
                 }
             }
         } else {
             $oWOA->DeleteByWorkOrder($objWorkorder->jcn, $objWorkorder->seq);
         }
     }
     // * Project
     if ($g_oSec->HasPerm(DCL_ENTITY_PROJECT, DCL_PERM_ADDTASK)) {
         if (($iProjID = @DCL_Sanitize::ToInt($_REQUEST['projectid'])) !== null && $iProjID > 0) {
             $oProjectMap =& CreateObject('dcl.dbProjectmap');
             if ($oProjectMap->LoadByWO($objWorkorder->jcn, $objWorkorder->seq) == -1 || $oProjectMap->projectid != $iProjID) {
                 $oProject = CreateObject('dcl.boProjects');
                 $aSource = array();
                 $aSource['selected'] = array($objWorkorder->jcn . '.' . $objWorkorder->seq);
                 $aSource['projectid'] = $iProjID;
                 $oProject->batchMove($aSource);
             }
         }
     }
     // * File attachment
     if (($sFileName = DCL_Sanitize::ToFileName('userfile')) !== null && $g_oSec->HasPerm(DCL_ENTITY_WORKORDER, DCL_PERM_ATTACHFILE)) {
         $o =& CreateObject('dcl.boFile');
         $o->iType = DCL_ENTITY_WORKORDER;
         $o->iKey1 = $objWorkorder->jcn;
         $o->iKey2 = $objWorkorder->seq;
         $o->sFileName = DCL_Sanitize::ToActualFileName('userfile');
         $o->sTempFileName = $sFileName;
         $o->sRoot = $dcl_info['DCL_FILE_PATH'] . '/attachments';
         $o->Upload();
     }
     $objWtch =& CreateObject('dcl.boWatches');
//.........这里部分代码省略.........
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:101,代码来源:class.boTimecards.inc.php

示例5: doupload

 function doupload()
 {
     global $dcl_info, $g_oSec;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_TICKET, DCL_PERM_ATTACHFILE)) {
         return PrintPermissionDenied();
     }
     if (($iID = @DCL_Sanitize::ToInt($_REQUEST['ticketid'])) === null) {
         trigger_error('Data sanitize failed.');
         return;
     }
     $objTicket =& CreateObject('dcl.dbTickets');
     if ($objTicket->Load($iID) == -1) {
         return;
     }
     if (($sFileName = DCL_Sanitize::ToFileName('userfile')) === null) {
         return PrintPermissionDenied();
     }
     $o =& CreateObject('dcl.boFile');
     $o->iType = DCL_ENTITY_TICKET;
     $o->iKey1 = $iID;
     $o->sFileName = DCL_Sanitize::ToActualFileName('userfile');
     $o->sTempFileName = $sFileName;
     $o->sRoot = $dcl_info['DCL_FILE_PATH'] . '/attachments';
     $o->Upload();
     $obj =& CreateObject('dcl.htmlTicketDetail');
     $obj->Show($objTicket);
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:28,代码来源:class.boTickets.inc.php


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