• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP AppDocument类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: casesShowOuputDocumentExist

function casesShowOuputDocumentExist($url)
{
    $urlArray = explode("?", $url);
    $urlParametroString = $urlArray[1];
    parse_str($urlParametroString, $_GET);
    require_once "classes/model/AppDocumentPeer.php";
    $oAppDocument = new AppDocument();
    $oAppDocument->Fields = $oAppDocument->load($_GET['a'], isset($_GET['v']) ? $_GET['v'] : null);
    $sAppDocUid = $oAppDocument->getAppDocUid();
    $info = pathinfo($oAppDocument->getAppDocFilename());
    if (!isset($_GET['ext'])) {
        $ext = $info['extension'];
    } else {
        if ($_GET['ext'] != '') {
            $ext = $_GET['ext'];
        } else {
            $ext = $info['extension'];
        }
    }
    $ver = isset($_GET['v']) && $_GET['v'] != '' ? '_' . $_GET['v'] : '';
    if (!$ver) {
        //This code is in the case the outputdocument won't be versioned
        $ver = '_1';
    }
    $realPath = PATH_DOCUMENT . G::getPathFromUID($oAppDocument->Fields['APP_UID']) . '/outdocs/' . $sAppDocUid . $ver . '.' . $ext;
    $realPath1 = PATH_DOCUMENT . G::getPathFromUID($oAppDocument->Fields['APP_UID']) . '/outdocs/' . $info['basename'] . $ver . '.' . $ext;
    $realPath2 = PATH_DOCUMENT . G::getPathFromUID($oAppDocument->Fields['APP_UID']) . '/outdocs/' . $info['basename'] . '.' . $ext;
    $sw_file_exists = false;
    if (file_exists($realPath)) {
        $sw_file_exists = true;
    } elseif (file_exists($realPath1)) {
        $sw_file_exists = true;
        $realPath = $realPath1;
    } elseif (file_exists($realPath2)) {
        $sw_file_exists = true;
        $realPath = $realPath2;
    }
    $swFileExist = 0;
    if ($sw_file_exists) {
        $swFileExist = 1;
    }
    return $swFileExist;
}
开发者ID:ralpheav,项目名称:processmaker,代码行数:43,代码来源:casesGenerateDocumentPage_Ajax.php


示例2: AppDocument

 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email [email protected].
 */
/*
 * Created on 19-03-2009
 *
 * @author Everth S . Berrios <[email protected]>
 */
require_once 'classes/model/AppDocument.php';
$oAppDocument = new AppDocument();
$aFields = $oAppDocument->load($_GET['a']);
require_once 'classes/model/OutputDocument.php';
$oOutputDocument = new OutputDocument();
$aOD = $oOutputDocument->load($aFields['DOC_UID']);
$a = $_GET['a'];
$ext = strtolower($aOD['OUT_DOC_GENERATE']);
G::header('location: cases_ShowOutputDocument?a=' . $a . '&ext=' . $ext);
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:cases_Redirect.php


示例3: Publisher

 case 'showHistoryMessage':
     $G_PUBLISH = new Publisher();
     $oCase = new Cases();
     $G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_MessagesView', '', $oCase->getHistoryMessagesTrackerView($_POST['APP_UID'], $_POST['APP_MSG_UID']));
     G::RenderPage('publish', 'raw');
     break;
 case 'deleteUploadedDocument':
     //require_once 'classes/model/AppDocument.php';
     $oAppDocument = new AppDocument();
     $oAppDocument->remove($_POST['DOC']);
     $oCase = new Cases();
     $oCase->getAllUploadedDocumentsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']);
     break;
 case 'deleteGeneratedDocument':
     //require_once 'classes/model/AppDocument.php';
     $oAppDocument = new AppDocument();
     $oAppDocument->remove($_POST['DOC']);
     $oCase = new Cases();
     $oCase->getAllGeneratedDocumentsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']);
     break;
     /* @Author Erik Amaru Ortiz <[email protected]> */
 /* @Author Erik Amaru Ortiz <[email protected]> */
 case 'resendMessage':
     //require_once 'classes/model/Configuration.php';
     G::LoadClass('spool');
     $oCase = new Cases();
     $data = $oCase->getHistoryMessagesTrackerView($_POST['APP_UID'], $_POST['APP_MSG_UID']);
     //print_r($data);
     G::LoadClass("system");
     $aSetup = System::getEmailConfiguration();
     $passwd = $aSetup['MESS_PASSWORD'];
开发者ID:bqevin,项目名称:processmaker,代码行数:31,代码来源:cases_Ajax.php


示例4: generateHtml2ps_pdf


//.........这里部分代码省略.........
     $header_html = '';
     $footer_html = '';
     $filter = new PreTreeFilterHeaderFooter($header_html, $footer_html);
     $pipeline->pre_tree_filters[] = $filter;
     if ($GLOBALS['g_config']['renderfields']) {
         $pipeline->pre_tree_filters[] = new PreTreeFilterHTML2PSFields();
     }
     if ($GLOBALS['g_config']['method'] === 'ps') {
         $pipeline->layout_engine = new LayoutEnginePS();
     } else {
         $pipeline->layout_engine = new LayoutEngineDefault();
     }
     $pipeline->post_tree_filters = array();
     if ($GLOBALS['g_config']['pslevel'] == 3) {
         $image_encoder = new PSL3ImageEncoderStream();
     } else {
         $image_encoder = new PSL2ImageEncoderStream();
     }
     switch ($GLOBALS['g_config']['method']) {
         case 'fastps':
             if ($GLOBALS['g_config']['pslevel'] == 3) {
                 $pipeline->output_driver = new OutputDriverFastPS($image_encoder);
             } else {
                 $pipeline->output_driver = new OutputDriverFastPSLevel2($image_encoder);
             }
             break;
         case 'pdflib':
             $pipeline->output_driver = new OutputDriverPDFLIB16($GLOBALS['g_config']['pdfversion']);
             break;
         case 'fpdf':
             $pipeline->output_driver = new OutputDriverFPDF();
             break;
         case 'png':
             $pipeline->output_driver = new OutputDriverPNG();
             break;
         case 'pcl':
             $pipeline->output_driver = new OutputDriverPCL();
             break;
         default:
             die('Unknown output method');
     }
     if (isset($GLOBALS['g_config']['watermarkhtml'])) {
         $watermark_text = $GLOBALS['g_config']['watermarkhtml'];
     } else {
         $watermark_text = '';
     }
     $pipeline->output_driver->set_watermark($watermark_text);
     if ($watermark_text != '') {
         $dispatcher =& $pipeline->getDispatcher();
     }
     if ($GLOBALS['g_config']['debugbox']) {
         $pipeline->output_driver->set_debug_boxes(true);
     }
     if ($GLOBALS['g_config']['draw_page_border']) {
         $pipeline->output_driver->set_show_page_border(true);
     }
     if ($GLOBALS['g_config']['ps2pdf']) {
         $pipeline->output_filters[] = new OutputFilterPS2PDF($GLOBALS['g_config']['pdfversion']);
     }
     if ($GLOBALS['g_config']['compress'] && $GLOBALS['g_config']['method'] == 'fastps') {
         $pipeline->output_filters[] = new OutputFilterGZip();
     }
     if (!isset($GLOBALS['g_config']['process_mode'])) {
         $GLOBALS['g_config']['process_mode'] = '';
     }
     if ($GLOBALS['g_config']['process_mode'] == 'batch') {
         $filename = 'batch';
     } else {
         $filename = $sFilename;
     }
     switch ($GLOBALS['g_config']['output']) {
         case 0:
             $pipeline->destination = new DestinationBrowser($filename);
             break;
         case 1:
             $pipeline->destination = new DestinationDownload($filename);
             break;
         case 2:
             $pipeline->destination = new DestinationFile($filename);
             break;
     }
     copy($sPath . $sFilename . '.html', PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.html');
     try {
         $status = $pipeline->process((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'] . '/files/' . $_SESSION['APPLICATION'] . '/outdocs/' . $sFilename . '.html', $g_media);
         copy(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.pdf', $sPath . $sFilename . '.pdf');
         unlink(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.pdf');
         unlink(PATH_OUTPUT_FILE_DIRECTORY . $sFilename . '.html');
     } catch (Exception $e) {
         if ($e->getMessage() == 'ID_OUTPUT_NOT_GENERATE') {
             include_once 'classes/model/AppDocument.php';
             $dataDocument = explode('_', $sFilename);
             if (!isset($dataDocument[1])) {
                 $dataDocument[1] = 1;
             }
             $oAppDocument = new AppDocument();
             $oAppDocument->remove($dataDocument[0], $dataDocument[1]);
             G::SendTemporalMessage(G::LoadTranslation('ID_OUTPUT_NOT_GENERATE'), 'Error');
         }
     }
 }
开发者ID:bqevin,项目名称:processmaker,代码行数:101,代码来源:OutputDocument.php


示例5: removeDocument

    /**

     * remove document

     *

     * @param string $appDocUid

     * @return $result will return an object

     */

    public function removeDocument ($appDocUid)

    {

        try {

            $oAppDocument = new AppDocument();

            $oAppDocument->remove( $appDocUid, 1 ); //always send version 1

            $result = new wsResponse( 0, " $appDocUid" );



            return $result;

        } catch (Exception $e) {

            $result = new wsResponse( 100, $e->getMessage() );



            return $result;

        }

    }
开发者ID:nhenderson,项目名称:processmaker,代码行数:39,代码来源:class.wsBase.php


示例6: AppDocument

 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd., 
 * Coral Gables, FL, 33134, USA, or email [email protected].
 * 
 */
/*
 * Created on 13-02-2008
 *
 * @author David Callizaya <[email protected]>
 */
if (!isset($_SESSION['PROCESS'])) {
    G::header('location: login');
}
require_once "classes/model/AppDocumentPeer.php";
$oAppDocument = new AppDocument();
$oAppDocument->Fields = $oAppDocument->load($_GET['a']);
$sAppDocUid = $oAppDocument->getAppDocUid();
$info = pathinfo($oAppDocument->getAppDocFilename());
if (!isset($_GET['ext'])) {
    $ext = $info['extension'];
} else {
    if ($_GET['ext'] != '') {
        $ext = $_GET['ext'];
    } else {
        $ext = $info['extension'];
    }
}
$realPath = PATH_DOCUMENT . $_SESSION['APPLICATION'] . '/outdocs/' . $info['basename'] . '.' . $ext;
G::streamFile($realPath, true);
开发者ID:nshong,项目名称:processmaker,代码行数:31,代码来源:tracker_ShowOutputDocument.php


示例7: Publisher

<?php

try {
    $G_MAIN_MENU = 'processmaker';
    $G_SUB_MENU = '';
    $G_ID_MENU_SELECTED = 'FOLDERS';
    $G_ID_SUB_MENU_SELECTED = '';
    $G_PUBLISH = new Publisher();
    if (isset($_POST['form']['FOLDER_UID']) && isset($_POST['form']['MOVE_FOLDER_PATH'])) {
        require_once "classes/model/AppDocument.php";
        $oAppDocument = new AppDocument();
        //Move files to another FOLDER_UID'
        $folderUid = $_POST['form']['FOLDER_UID'];
        $filesArrayAux = explode(";", $_POST['form']['MOVE_FOLDER_PATH']);
        $filesArray = array();
        foreach ($filesArrayAux as $value) {
            if ($value != "") {
                $valueAux = explode("|", $value);
                $filesArray[$valueAux[1]] = $valueAux[0];
            }
        }
        foreach ($filesArray as $keyDoc => $sw) {
            if ($sw == "true") {
                $keyDocArray = explode("_", $keyDoc);
                $aFields = array('APP_DOC_UID' => $keyDocArray[0], 'DOC_VERSION' => $keyDocArray[1], 'FOLDER_UID' => $folderUid);
                $oAppDocument->update($aFields);
            }
        }
    }
    //$rootFolder='5320083284b210ceb511e43070218744';
    $rootFolder = '0';
开发者ID:nshong,项目名称:processmaker,代码行数:31,代码来源:appFolderList.php


示例8: getCasesInputDocuments

 /**
  * Get data of Cases InputDocument
  *
  * @param string $applicationUid
  * @param string $userUid
  *
  * return array Return an array with data of an InputDocument
  */
 public function getCasesInputDocuments($applicationUid, $userUid)
 {
     try {
         //Verify data inbox
         $case = new \ProcessMaker\BusinessModel\Cases();
         $arrayResult = $case->getStatusInfo($applicationUid, 0, $userUid);
         $flagInbox = true;
         if (empty($arrayResult) || !preg_match("/^(?:TO_DO|DRAFT)\$/", $arrayResult["APP_STATUS"])) {
             $flagInbox = false;
         }
         $user = new \Users();
         $appDocument = new \AppDocument();
         $configuraction = new \Configurations();
         $confEnvSetting = $configuraction->getFormats();
         $arrayInputDocument = array();
         //Query
         $criteria = $this->getAppDocumentCriteriaByData($applicationUid);
         if (!$flagInbox) {
             $criteria->add(\AppDocumentPeer::USR_UID, $userUid, \Criteria::EQUAL);
         }
         $rsCriteria = \AppDocumentPeer::doSelectRS($criteria);
         $rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
         /*----------------------------------********---------------------------------*/
         $licensedFeatures =& \PMLicensedFeatures::getSingleton();
         $enablePMGmail = false;
         if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) {
             \G::LoadClass("pmDrive");
             $pmDrive = new \PMDrive();
             $enablePMGmail = $pmDrive->getStatusService();
         }
         /*----------------------------------********---------------------------------*/
         while ($rsCriteria->next()) {
             $row = $rsCriteria->getRow();
             $arrayUserData = $user->load($row["USR_UID"]);
             $arrayAppDocument = $appDocument->load($row["APP_DOC_UID"], $row["DOC_VERSION"]);
             $row["APP_DOC_FILENAME"] = $arrayAppDocument["APP_DOC_FILENAME"];
             $row["APP_DOC_CREATE_USER"] = $configuraction->usersNameFormatBySetParameters($confEnvSetting["format"], $arrayUserData["USR_USERNAME"], $arrayUserData["USR_FIRSTNAME"], $arrayUserData["USR_LASTNAME"]);
             $row["APP_DOC_LINK"] = "cases/cases_ShowDocument?a=" . $row["APP_DOC_UID"] . "&v=" . $row["DOC_VERSION"];
             /*----------------------------------********---------------------------------*/
             //change donwload link - drive
             $driveDownload = @unserialize($arrayAppDocument['APP_DOC_DRIVE_DOWNLOAD']);
             if ($driveDownload !== false && is_array($driveDownload) && $enablePMGmail) {
                 if (array_key_exists('INPUT', $driveDownload)) {
                     $row['APP_DOC_LINK'] = $driveDownload['INPUT'];
                 } else {
                     if (array_key_exists('ATTACHED', $driveDownload)) {
                         $row['APP_DOC_LINK'] = $driveDownload['ATTACHED'];
                     }
                 }
             }
             /*----------------------------------********---------------------------------*/
             $arrayInputDocument[] = $this->getAppDocumentDataFromRecord($row);
         }
         //Return
         return $arrayInputDocument;
     } catch (\Exception $e) {
         throw $e;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:67,代码来源:InputDocument.php


示例9: InputDocument

     $Fields['DOC_UID'] = $_POST['docID'];
     $Fields['APP_DOC_UID'] = $_POST['appDocId'];
     $Fields['actionType'] = $_POST['actionType'];
     $Fields["docVersion"] = (int) $_POST["docVersion"];
     $oInputDocument = new InputDocument();
     $InpDocData = $oInputDocument->load($Fields['DOC_UID']);
     $inpDocMaxFilesize = $InpDocData["INP_DOC_MAX_FILESIZE"];
     $inpDocMaxFilesizeUnit = $InpDocData["INP_DOC_MAX_FILESIZE_UNIT"];
     $inpDocMaxFilesize = $inpDocMaxFilesize * ($inpDocMaxFilesizeUnit == "MB" ? 1024 * 1024 : 1024);
     //Bytes
     $Fields["INP_DOC_SUPPORTED_EXTENSIONS_FILENAME_LABEL"] = "[" . $InpDocData["INP_DOC_TYPE_FILE"] . "]";
     $Fields["INP_DOC_MAX_FILESIZE"] = $inpDocMaxFilesize;
     $Fields["INP_DOC_MAX_FILESIZE_LABEL"] = $inpDocMaxFilesize > 0 ? "[" . $InpDocData["INP_DOC_MAX_FILESIZE"] . " " . $InpDocData["INP_DOC_MAX_FILESIZE_UNIT"] . "]" : "";
     $Fields['fileTypes'] = $InpDocData['INP_DOC_TYPE_FILE'];
     if ($_POST['actionType'] == 'NV') {
         $appDocument = new AppDocument();
         $arrayAppDocumentData = $appDocument->load($_POST["appDocId"]);
         $G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_AttachInputDocumentGeneral', '', $Fields, 'cases_SupervisorSaveDocument?APP_DOC_UID=' . $_POST['appDocId'] . "&DOC_VERSION=" . ($Fields['docVersion'] + 1) . '&APP_UID=' . $arrayAppDocumentData["APP_UID"] . '&UID=' . $_POST['docID']);
     } else {
         $G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_AttachInputDocumentGeneral', '', $Fields, 'cases_SupervisorSaveDocument?UID=' . $_POST['docID'] . '&APP_UID=' . $_POST['appDocId']);
     }
     G::RenderPage('publish', 'raw');
     break;
 case "inputDocumentVersionHistory":
     //krumo($_POST);
     $G_PUBLISH = new Publisher();
     $Fields['DOC_UID'] = $_POST['docID'];
     $Fields['APP_DOC_UID'] = $_POST['appDocId'];
     $G_PUBLISH->AddContent('propeltable', 'paged-table', 'cases/cases_InputdocsListHistory', $oCase->getInputDocumentsCriteria($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_POST['docID'], $_POST['appDocId']), array());
     //$aFields
     //$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_AttachInputDocumentGeneral',
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:cases_Ajax.php


示例10: getDynaformHistory

 public function getDynaformHistory($PRO_UID, $TAS_UID, $APP_UID, $DYN_UID = "")
 {
     G::LoadClass('case');
     $oCase = new Cases();
     $oCase->verifyTable();
     $aObjectPermissions = $oCase->getAllObjects($PRO_UID, $APP_UID, $TAS_UID, $_SESSION['USER_LOGGED']);
     if (!is_array($aObjectPermissions)) {
         $aObjectPermissions = array('DYNAFORMS' => array(-1), 'INPUT_DOCUMENTS' => array(-1), 'OUTPUT_DOCUMENTS' => array(-1));
     }
     if (!isset($aObjectPermissions['DYNAFORMS'])) {
         $aObjectPermissions['DYNAFORMS'] = array(-1);
     } else {
         if (!is_array($aObjectPermissions['DYNAFORMS'])) {
             $aObjectPermissions['DYNAFORMS'] = array(-1);
         }
     }
     if (!isset($aObjectPermissions['INPUT_DOCUMENTS'])) {
         $aObjectPermissions['INPUT_DOCUMENTS'] = array(-1);
     } else {
         if (!is_array($aObjectPermissions['INPUT_DOCUMENTS'])) {
             $aObjectPermissions['INPUT_DOCUMENTS'] = array(-1);
         }
     }
     if (!isset($aObjectPermissions['OUTPUT_DOCUMENTS'])) {
         $aObjectPermissions['OUTPUT_DOCUMENTS'] = array(-1);
     } else {
         if (!is_array($aObjectPermissions['OUTPUT_DOCUMENTS'])) {
             $aObjectPermissions['OUTPUT_DOCUMENTS'] = array(-1);
         }
     }
     $appDocument = new AppDocument();
     foreach (array("INPUT_DOCUMENTS", "OUTPUT_DOCUMENTS") as $value) {
         $key = $value;
         if ($aObjectPermissions[$key]) {
             foreach ($aObjectPermissions[$key] as $key2 => $value2) {
                 $appDocumentUid = $value2;
                 try {
                     $arrayAppDocumentData = $appDocument->load($appDocumentUid);
                     $aObjectPermissions[$key][$key2] = $arrayAppDocumentData["DOC_UID"];
                 } catch (Exception $e) {
                 }
             }
         }
     }
     $dynaForm = new Dynaform();
     $inputDocument = new InputDocument();
     $outputDocument = new OutputDocument();
     $c = new Criteria('workflow');
     $c->addSelectColumn(AppHistoryPeer::APP_UID);
     $c->addSelectColumn(AppHistoryPeer::DEL_INDEX);
     $c->addSelectColumn(AppHistoryPeer::PRO_UID);
     $c->addSelectColumn(AppHistoryPeer::TAS_UID);
     $c->addSelectColumn(AppHistoryPeer::DYN_UID);
     $c->addSelectColumn(AppHistoryPeer::OBJ_TYPE);
     $c->addSelectColumn(AppHistoryPeer::USR_UID);
     $c->addSelectColumn(AppHistoryPeer::APP_STATUS);
     $c->addSelectColumn(AppHistoryPeer::HISTORY_DATE);
     $c->addSelectColumn(AppHistoryPeer::HISTORY_DATA);
     $c->addSelectColumn(UsersPeer::USR_FIRSTNAME);
     $c->addSelectColumn(UsersPeer::USR_LASTNAME);
     $c->addAsColumn('USR_NAME', "CONCAT(USR_LASTNAME, ' ', USR_FIRSTNAME)");
     $c->addJoin(AppHistoryPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN);
     //WHERE
     $c->add($c->getNewCriterion(AppHistoryPeer::DYN_UID, $aObjectPermissions["DYNAFORMS"], Criteria::IN)->addOr($c->getNewCriterion(AppHistoryPeer::DYN_UID, $aObjectPermissions["INPUT_DOCUMENTS"], Criteria::IN))->addOr($c->getNewCriterion(AppHistoryPeer::DYN_UID, $aObjectPermissions["OUTPUT_DOCUMENTS"], Criteria::IN)));
     $c->add(AppHistoryPeer::PRO_UID, $PRO_UID);
     $c->add(AppHistoryPeer::APP_UID, $APP_UID);
     $c->add(AppHistoryPeer::TAS_UID, $TAS_UID);
     if (isset($DYN_UID) && $DYN_UID != "") {
         $c->add(AppHistoryPeer::DYN_UID, $DYN_UID);
     }
     //Execute
     $oDataset = AppHistoryPeer::doSelectRS($c);
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $aDynHistory = array();
     $aDynHistory[] = array('DYN_TITLE' => 'char');
     while ($oDataset->next()) {
         $aRow = $oDataset->getRow();
         $title = "";
         switch ($aRow["OBJ_TYPE"]) {
             case "DYNAFORM":
                 $arrayDynaFormData = $dynaForm->Load($aRow["DYN_UID"]);
                 $title = $arrayDynaFormData["DYN_TITLE"] . " (" . G::LoadTranslation("ID_DYNAFORM") . ")";
                 break;
             case "INPUT_DOCUMENT":
                 $arrayInputDocumentData = $inputDocument->load($aRow["DYN_UID"]);
                 $title = $arrayInputDocumentData["INP_DOC_TITLE"] . " (" . G::LoadTranslation("ID_INPUT_DOCUMENT") . ")";
                 break;
             case "OUTPUT_DOCUMENT":
                 $arrayOutputDocumentData = $outputDocument->load($aRow["DYN_UID"]);
                 $title = $arrayOutputDocumentData["OUT_DOC_TITLE"] . " (" . G::LoadTranslation("ID_OUTPUT_DOCUMENT") . ")";
                 break;
             case "ASSIGN_TASK":
                 $title = G::LoadTranslation("ID_ASSIGN_TASK") . " (" . G::LoadTranslation("ID_TRIGGERS") . ")";
                 break;
         }
         $aRow["DYN_TITLE"] = $title;
         $changedValues = unserialize($aRow['HISTORY_DATA']);
         $html = "<table border='0' cellpadding='0' cellspacing='0'>";
         $sw_add = false;
         foreach ($changedValues as $key => $value) {
//.........这里部分代码省略.........
开发者ID:emildev35,项目名称:processmaker,代码行数:101,代码来源:AppHistory.php


示例11: documentUploadFiles

    /**
     * second step for upload file
     * upload file in foler app_uid
     *
     * @param $userUid
     * @param $Fields
     * @param $type
     * @throws \Exception
     */
    public function documentUploadFiles($userUid, $app_uid, $app_doc_uid, $request_data)
    {
        $response = array("status" => "fail");
        if (isset( $_FILES["form"]["name"] ) && count( $_FILES["form"]["name"] ) > 0) {
            $arrayField = array ();
            $arrayFileName = array ();
            $arrayFileTmpName = array ();
            $arrayFileError = array ();
            $i = 0;

            foreach ($_FILES["form"]["name"] as $fieldIndex => $fieldValue) {
                if (is_array( $fieldValue )) {
                    foreach ($fieldValue as $index => $value) {
                        if (is_array( $value )) {
                            foreach ($value as $grdFieldIndex => $grdFieldValue) {
                                $arrayField[$i]["grdName"] = $fieldIndex;
                                $arrayField[$i]["grdFieldName"] = $grdFieldIndex;
                                $arrayField[$i]["index"] = $index;

                                $arrayFileName[$i] = $_FILES["form"]["name"][$fieldIndex][$index][$grdFieldIndex];
                                $arrayFileTmpName[$i] = $_FILES["form"]["tmp_name"][$fieldIndex][$index][$grdFieldIndex];
                                $arrayFileError[$i] = $_FILES["form"]["error"][$fieldIndex][$index][$grdFieldIndex];
                                $i = $i + 1;
                            }
                        }
                    }
                } else {
                    $arrayField[$i] = $fieldIndex;

                    $arrayFileName[$i] = $_FILES["form"]["name"][$fieldIndex];
                    $arrayFileTmpName[$i] = $_FILES["form"]["tmp_name"][$fieldIndex];
                    $arrayFileError[$i] = $_FILES["form"]["error"][$fieldIndex];
                    $i = $i + 1;
                }
            }
            if (count( $arrayField ) > 0) {
                for ($i = 0; $i <= count( $arrayField ) - 1; $i ++) {
                    if ($arrayFileError[$i] == 0) {
                        $indocUid = null;
                        $fieldName = null;
                        $fileSizeByField = 0;

                        $oAppDocument = new \AppDocument();
                        $aAux = $oAppDocument->load($app_doc_uid);

                        $iDocVersion = $oAppDocument->getDocVersion();
                        $sAppDocUid = $oAppDocument->getAppDocUid();
                        $aInfo = pathinfo( $oAppDocument->getAppDocFilename() );
                        $sExtension = ((isset( $aInfo["extension"] )) ? $aInfo["extension"] : "");
                        $pathUID = G::getPathFromUID($app_uid);
                        $sPathName = PATH_DOCUMENT . $pathUID . PATH_SEP;
                        $sFileName = $sAppDocUid . "_" . $iDocVersion . "." . $sExtension;
                        G::uploadFile( $arrayFileTmpName[$i], $sPathName, $sFileName );
                        $response = array("status" => "ok");
                    }
                }
            }
        }

        return $response;
    }
开发者ID:rrsc,项目名称:processmaker,代码行数:70,代码来源:Light.php


示例12: getSteps

    public function getSteps ($appUid, $index, $tasUid, $proUid)
    {
        //require_once 'classes/model/Step.php';
        //require_once 'classes/model/Content.php';
        //require_once 'classes/model/AppDocument.php';
        //require_once 'classes/model/InputDocumentPeer.php';
        //require_once 'classes/model/OutputDocument.php';
        //require_once 'classes/model/Dynaform.php';

        //G::LoadClass( 'pmScript' );
        G::LoadClass( 'case' );

        $steps = Array ();
        $case = new Cases();
        $step = new Step();
        $appDocument = new AppDocument();

        $caseSteps = $step->getAllCaseSteps( $proUid, $tasUid, $appUid );

        //getting externals steps
        $oPluginRegistry = &PMPluginRegistry::getSingleton();
        $eSteps = $oPluginRegistry->getSteps();
        $externalSteps = array ();

        foreach ($eSteps as $externalStep) {
            $externalSteps[$externalStep->sStepId] = $externalStep;
        }

        //getting the case record
        if ($appUid) {
            $caseData = $case->loadCase( $appUid );
            $pmScript = new PMScript();
            $pmScript->setFields( $caseData['APP_DATA'] );
        }

        $externalStepCount = 0;

        foreach ($caseSteps as $caseStep) {
            // if it has a condition
            if (trim( $caseStep->getStepCondition() ) != '') {
                $pmScript->setScript( $caseStep->getStepCondition() );

                if (! $pmScript->evaluate()) {
                    //evaluated false, jump & continue with the others steps
                    continue;
                }
            }

            $stepUid = $caseStep->getStepUidObj();
            $stepType = $caseStep->getStepTypeObj();
            $stepPosition = $caseStep->getStepPosition();

            $stepItem = array ();
            $stepItem['id'] = $stepUid;
            $stepItem['type'] = $stepType;

            switch ($stepType) {
                case 'DYNAFORM':
                    $oDocument = DynaformPeer::retrieveByPK( $stepUid );

                    $stepItem['title'] = $oDocument->getDynTitle();
                    $stepItem['url'] = "cases/cases_Step?UID=$stepUid&TYPE=$stepType&POSITION=$stepPosition&ACTION=EDIT";
                    $stepItem['version'] = $oDocument->getDynVersion();
                    break;
                case 'OUTPUT_DOCUMENT':
                    $oDocument = OutputDocumentPeer::retrieveByPK( $caseStep->getStepUidObj() );
                    $outputDoc = $appDocument->getObject( $appUid, $index, $caseStep->getStepUidObj(), 'OUTPUT' );
                    $stepItem['title'] = $oDocument->getOutDocTitle();

                    if ($outputDoc['APP_DOC_UID']) {
                        $stepItem['url'] = "cases/cases_Step?UID=$stepUid&TYPE=$stepType&POSITION=$stepPosition&ACTION=VIEW&DOC={$outputDoc['APP_DOC_UID']}";
                    } else {
                        $stepItem['url'] = "cases/cases_Step?UID=$stepUid&TYPE=$stepType&POSITION=$stepPosition&ACTION=GENERATE";
                    }
                    break;
                case 'INPUT_DOCUMENT':
                    $oDocument = InputDocumentPeer::retrieveByPK( $stepUid );
                    $stepItem['title'] = $oDocument->getInpDocTitle();
                    $stepItem['url'] = "cases/cases_Step?UID=$stepUid&TYPE=$stepType&POSITION=$stepPosition&ACTION=ATTACH";
                    break;
                case 'EXTERNAL':
                    $stepTitle = 'unknown ' . $caseStep->getStepUidObj();
                    $oPluginRegistry = PMPluginRegistry::getSingleton();
                    $externalStep = $externalSteps[$caseStep->getStepUidObj()];
                    $stepItem['id'] = $externalStep->sStepId;
                    $stepItem['title'] = $externalStep->sStepTitle;
                    $stepItem['url'] = "cases/cases_Step?UID={$externalStep->sStepId}&TYPE=EXTERNAL&POSITION=$stepPosition&ACTION=EDIT";
                    break;
            }

            $steps[] = $stepItem;
        }

        //last, assign task
        $stepItem = array ();
        $stepItem['id'] = '-1';
        $stepItem['type'] = '';
        $stepItem['title'] = G::LoadTranslation( 'ID_ASSIGN_TASK' );
        $stepItem['url'] = "cases/cases_Step?TYPE=ASSIGN_TASK&UID=-1&POSITION=10000&ACTION=ASSIGN";

//.........这里部分代码省略.........
开发者ID:rrsc,项目名称:processmaker,代码行数:101,代码来源:class.applications.php


示例13: getAllGeneratedDocumentsCriteria

    public function getAllGeneratedDocumentsCriteria($sProcessUID, $sApplicationUID, $sTasKUID, $sUserUID)
    {
        \G::LoadClass("configuration");
        $conf = new \Configurations();
        $confEnvSetting = $conf->getFormats();
        //verifica si la tabla OBJECT_PERMISSION
        $cases = new \cases();
        $cases->verifyTable();
        $listing = false;
        $oPluginRegistry = & \PMPluginRegistry::getSingleton();
        if ($oPluginRegistry->existsTrigger(PM_CASE_DOCUMENT_LIST)) {
            $folderData = new \folderData(null, null, $sApplicationUID, null, $sUserUID);
            $folderData->PMType = "OUTPUT";
            $folderData->returnList = true;
            //$oPluginRegistry = & PMPluginRegistry::getSingleton();
            $listing = $oPluginRegistry->executeTriggers(PM_CASE_DOCUMENT_LIST, $folderData);
        }
        $aObjectPermissions = $cases->getAllObjects($sProcessUID, $sApplicationUID, $sTasKUID, $sUserUID);
        if (!is_array($aObjectPermissions)) {
            $aObjectPermissions = array('DYNAFORMS' => array(-1),'INPUT_DOCUMENTS' => array(-1),'OUTPUT_DOCUMENTS' => array(-1));
        }
        if (!isset($aObjectPermissions['DYNAFORMS'])) {
            $aObjectPermissions['DYNAFORMS'] = array(-1);
        } else {
            if (!is_array($aObjectPermissions['DYNAFORMS'])) {
                $aObjectPermissions['DYNAFORMS'] = array(-1);
            }
        }
        if (!isset($aObjectPermissions['INPUT_DOCUMENTS'])) {
            $aObjectPermissions['INPUT_DOCUMENTS'] = array(-1);
        } else {
            if (!is_array($aObjectPermissions['INPUT_DOCUMENTS'])) {
                $aObjectPermissions['INPUT_DOCUMENTS'] = array(-1);
            }
        }
        if (!isset($aObjectPermissions['OUTPUT_DOCUMENTS'])) {
            $aObjectPermissions['OUTPUT_DOCUMENTS'] = array(-1);
        } else {
            if (!is_array($aObjectPermissions['OUTPUT_DOCUMENTS'])) {
                $aObjectPermissions['OUTPUT_DOCUMENTS'] = array(-1);
            }
        }
        $aDelete = $cases->getAllObjectsFrom($sProcessUID, $sApplicationUID, $sTasKUID, $sUserUID, 'DELETE');
        $oAppDocument = new \AppDocument();
        $oCriteria = new \Criteria('workflow');
        $oCriteria->add(\AppDocumentPeer::APP_UID, $sApplicationUID);
        $oCriteria->add(\AppDocumentPeer::APP_DOC_TYPE, 'OUTPUT');
        $oCriteria->add(\AppDocumentPeer::APP_DOC_STATUS, array('ACTIVE'), \Criteria::IN);
        //$oCriteria->add(AppDocumentPeer::APP_DOC_UID, $aObjectPermissions['OUTPUT_DOCUMENTS'], Criteria::IN);
        $oCriteria->add(
            $oCriteria->getNewCriterion(
                \AppDocumentPeer::APP_DOC_UID, $aObjectPermissions['OUTPUT_DOCUMENTS'], \Criteria::IN)->addOr($oCriteria->getNewCriterion(\AppDocumentPeer::USR_UID, $sUserUID, \Criteria::EQUAL))
        );
        $aConditions = array();
        $aConditions[] = array(\AppDocumentPeer::APP_UID, \AppDelegationPeer::APP_UID);
        $aConditions[] = array(\AppDocumentPeer::DEL_INDEX, \AppDelegationPeer::DEL_INDEX);
        $oCriteria->addJoinMC($aConditions, \Criteria::LEFT_JOIN);
        $oCriteria->add(\AppDelegationPeer::PRO_UID, $sProcessUID);
        $oCriteria->addAscendingOrderByColumn(\AppDocumentPeer::APP_DOC_INDEX);
        $oDataset = \AppDocumentPeer::doSelectRS($oCriteria);
        $oDataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
        $oDataset->next();
        $aOutputDocuments = array();
        $aOutputDocuments[] = array(
            'APP_DOC_UID' => 'char',
            'DOC_UID' => 'char',
            'APP_DOC_COMMENT' => 'char',
            'APP_DOC_FILENAME' => 'char',
            'APP_DOC_INDEX' => 'integer'
        );
        $oUser = new \Users();
        while ($aRow = $oDataset->getRow()) {
            $oCriteria2 = new \Criteria('workflow');
            $oCriteria2->add(\AppDelegationPeer::APP_UID, $sApplicationUID);
            $oCriteria2->add(\AppDelegationPeer::DEL_INDEX, $aRow['DEL_INDEX']);
            $oDataset2 = \AppDelegationPeer::doSelectRS($oCriteria2);
            $oDataset2->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
            $oDataset2->next();
            $aRow2 = $oDataset2->getRow();
            $oTask = new \Task();
            if ($oTask->taskExists($aRow2['TAS_UID'])) {
                $aTask = $oTask->load($aRow2['TAS_UID']);
            } else {
                $aTask = array('TAS_TITLE' => '(TASK DELETED)');
            }
            $lastVersion = $oAppDocument->getLastDocVersion($aRow['DOC_UID'], $sApplicationUID);
            if ($lastVersion == $aRow['DOC_VERSION']) {
                //Only show last document Version
                $aAux = $oAppDocument->load($aRow['APP_DOC_UID'], $aRow['DOC_VERSION']);
                //Get output Document information
                $oOutputDocument = new \OutputDocument();
                $aGields = $oOutputDocument->load($aRow['DOC_UID']);
                //OUTPUTDOCUMENT
                $outDocTitle = $aGields['OUT_DOC_TITLE'];
                switch ($aGields['OUT_DOC_GENERATE']) {
                    //G::LoadTranslation(ID_DOWNLOAD)
                    case "PDF":
                        $fileDoc = 'javascript:alert("NO DOC")';
                        $fileDocLabel = " ";
                        $filePdf = 'cases_ShowOutputDocument?a=' .
//.........这里部分代码省略.........
开发者ID:nhenderson,项目名称:processmaker,代码行数:101,代码来源:Cases.php


示例14: doValidate

 /**
  * Validates all modified columns of given AppDocument object.
  * If parameter $columns is either a single column name or an array of column names
  * than only those columns are validated.
  *
  * NOTICE: This does not apply to primary or foreign keys for now.
  *
  * @param      AppDocument $obj The object to validate.
  * @param      mixed $cols Column name or array of column names.
  *
  * @return     mixed TRUE if all columns are valid or the error message of the first invalid column.
  */
 public static function doValidate(AppDocument $obj, $cols = null)
 {
     $columns = array();
     if ($cols) {
         $dbMap = Propel::getDatabaseMap(AppDocumentPeer::DATABASE_NAME);
         $tableMap = $dbMap->getTable(AppDocumentPeer::TABLE_NAME);
         if (!is_array($cols)) {
             $cols = array($cols);
         }
         foreach ($cols as $colName) {
             if ($tableMap->containsColumn($colName)) {
                 $get = 'get' . $tableMap->getColumn($colName)->getPhpName();
                 $columns[$colName] = $obj->{$get}();
             }
         }
     } else {
         if ($obj->isNew() || $obj->isColumnModified(AppDocumentPeer::APP_DOC_UID)) {
             $columns[AppDocumentPeer::APP_DOC_UID] = $obj->getAppDocUid();
         }
         if ($obj->isNew() || $obj->isColumnModified(AppDocumentPeer::APP_UID)) {
             $columns[AppDocumentPeer::APP_UID] = $obj->getAppUid();
         }
         if ($obj->isNew() || $obj->isColumnModified(AppDocumentPeer::DEL_INDEX)) {
             $columns[AppDocumentPeer::DEL_INDEX] = $obj->getDelIndex();
         }
         if ($obj->isNew() || $obj->isColumnModified(AppDocumentPeer::DOC_UID)) {
             $columns[AppDocumentPeer::DOC_UID] = $obj->getDocUid();
         }
         if ($obj->isNew() || $obj->isColumnModified(AppDocumentPeer::USR_UID)) {
             $columns[AppDocumentPeer::USR_UID] = $obj->getUsrUid();
         }
         if ($obj->isNew() || $obj->isColumnModified(AppDocumentPeer::APP_DOC_TYPE)) {
             $columns[AppDocumentPeer::APP_DOC_TYPE] = $obj->getAppDocType();
         }
         if ($obj->isNew() || $obj->isColumnModified(AppDocumentPeer::APP_DOC_CREATE_DATE)) {
             $columns[AppDocumentPeer::APP_DOC_CREATE_DATE] = $obj->getAppDocCreateDate();
         }
         if ($obj->isNew() || $obj->isColumnModified(AppDocumentPeer::APP_DOC_STATUS)) {
             $columns[AppDocumentPeer::APP_DOC_STATUS] = $obj->getAppDocStatus();
         }
     }
     return BasePeer::doValidate(AppDocumentPeer::DATABASE_NAME, AppDocumentPeer::TABLE_NAME, $columns);
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:55,代码来源:BaseAppDocumentPeer.php


示例15: documentdelete

function documentdelete()
{
    include_once ("classes/model/AppDocument.php");
    $oAppDocument = new AppDocument ();
    $oAppDocument->remove($_POST['sFileUID'],$_POST['docVersion']);
    /*we need to delete fisicaly the file use the follow code
     $appId= "00000000000000000000000000000000";
     $sPathName = PATH_DOCUMENT . $appId . PATH_SEP;
     unlink($sPathName.$_POST['sFileUID'].'_1.jpg');*/
}
开发者ID:rrsc,项目名称:processmaker,代码行数:10,代码来源:appFolderAjax.php


示例16: getCompleteDocumentInfo

    public function getCompleteDocumentInfo ($appUid, $appDocUid, $docVersion, $docUid, $usrId)
    {
        //require_once ("classes/model/AppDocument.php");
        //require_once ("classes/model/InputDocument.php");
        //require_once ("classes/model/OutputDocument.php");
        //require_once ("classes/model/Users.php");

        //**** start get Doc Info
        $oApp = new Application();
        $oAppDocument = new AppDocument();
        G::LoadClass( 'case' );
        $oCase = new Cases();
        G::LoadClass( 'process' );
        $oProcess = new Process();
        if (($oApp->exists( $appUid )) || ($appUid == "00000000000000000000000000000000")) {
            if ($appUid == "00000000000000000000000000000000") {
                //External Files
                $row1 = $oAppDocument->load( $appDocUid, $docVersion );
                $row2 = array ('PRO_TITLE' => G::LoadTranslation( 'ID_NOT_PROCESS_RELATED' ));
                $row3 = array ('APP_TITLE' => G::LoadTranslation( 'ID_NOT_PROCESS_RELATED' ));
            } else {
                $row1 = $oAppDocument->load( $appDocUid, $docVersion );
                $row2 = $oCase->loadCase( $appUid );
                $row3 = $oProcess->Load( $row2['PRO_UID'] );
            }
            $lastVersion = $oAppDocument->getLastAppDocVersion( $appDocUid, $appUid );

            switch ($row1['APP_DOC_TYPE']) {
                case "OUTPUT":
                    $oOutputDocument = new OutputDocument();

                    $row4 = array();
                    $swOutDocExists = 0;

                    if ($oOutputDocument->OutputExists($docUid)) {
                        $row4 = $oOutputDocument->load($docUid);
                        $swOutDocExists = 1;
                    }

                    if ($s 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP AppHelper类代码示例发布时间:2022-05-23
下一篇:
PHP AppDelegationPeer类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap