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


PHP Cases::startCase方法代码示例

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


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

示例1: startCase

function startCase()
{
    G::LoadClass('case');
    G::LoadSystem('inputfilter');
    $filter = new InputFilter();
    $_POST = $filter->xssFilterHard($_POST);
    $_REQUEST = $filter->xssFilterHard($_REQUEST);
    $_SESSION = $filter->xssFilterHard($_SESSION);
    /* GET , POST & $_SESSION Vars */
    /* unset any variable, because we are starting a new case */
    if (isset($_SESSION['APPLICATION'])) {
        unset($_SESSION['APPLICATION']);
    }
    if (isset($_SESSION['PROCESS'])) {
        unset($_SESSION['PROCESS']);
    }
    if (isset($_SESSION['TASK'])) {
        unset($_SESSION['TASK']);
    }
    if (isset($_SESSION['INDEX'])) {
        unset($_SESSION['INDEX']);
    }
    if (isset($_SESSION['STEP_POSITION'])) {
        unset($_SESSION['STEP_POSITION']);
    }
    /* Process */
    try {
        $oCase = new Cases();
        lookinginforContentProcess($_POST['processId']);
        $aData = $oCase->startCase($_REQUEST['taskId'], $_SESSION['USER_LOGGED']);
        $aData = $filter->xssFilterHard($aData);
        $_SESSION['APPLICATION'] = $aData['APPLICATION'];
        $_SESSION['INDEX'] = $aData['INDEX'];
        $_SESSION['PROCESS'] = $aData['PROCESS'];
        $_SESSION['TASK'] = $_REQUEST['taskId'];
        $_SESSION['STEP_POSITION'] = 0;
        $_SESSION['CASES_REFRESH'] = true;
        /*----------------------------------********---------------------------------*/
        $oCase = new Cases();
        $aNextStep = $oCase->getNextStep($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION']);
        $aNextStep['PAGE'] = 'open?APP_UID=' . $aData['APPLICATION'] . '&DEL_INDEX=' . $aData['INDEX'] . '&action=draft';
        $_SESSION['BREAKSTEP']['NEXT_STEP'] = $aNextStep;
        $aData['openCase'] = $aNextStep;
        $aData['status'] = 'success';
        print G::json_encode($aData);
    } catch (Exception $e) {
        $aData['status'] = 'failure';
        $aData['message'] = $e->getMessage();
        print_r(G::json_encode($aData));
    }
}
开发者ID:emildev35,项目名称:processmaker,代码行数:51,代码来源:casesStartPage_Ajax.php

示例2: unset

if (isset($_SESSION['PROCESS'])) {
    unset($_SESSION['PROCESS']);
}
if (isset($_SESSION['TASK'])) {
    unset($_SESSION['TASK']);
}
if (isset($_SESSION['INDEX'])) {
    unset($_SESSION['INDEX']);
}
if (isset($_SESSION['STEP_POSITION'])) {
    unset($_SESSION['STEP_POSITION']);
}
/* Process */
try {
    $oCase = new Cases();
    $aData = $oCase->startCase($_POST['form']['TAS_UID'], $_SESSION['USER_LOGGED']);
    $_SESSION['APPLICATION'] = $aData['APPLICATION'];
    $_SESSION['INDEX'] = $aData['INDEX'];
    $_SESSION['PROCESS'] = $aData['PROCESS'];
    $_SESSION['TASK'] = $_POST['form']['TAS_UID'];
    $_SESSION['STEP_POSITION'] = 0;
    $_SESSION['CASES_REFRESH'] = true;
    $oCase = new Cases();
    $aNextStep = $oCase->getNextStep($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION']);
    $_SESSION['BREAKSTEP']['NEXT_STEP'] = $aNextStep;
    G::header('location: ' . $aNextStep['PAGE']);
} catch (Exception $e) {
    $_SESSION['G_MESSAGE'] = $e->getMessage();
    $_SESSION['G_MESSAGE_TYPE'] = 'error';
    G::header('location: cases_New');
}
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:cases_Save.php

示例3: startCase

 public function startCase($httpData)
 {
     G::LoadClass('case');
     $case = new Cases();
     $aData = $case->startCase($httpData->id, $_SESSION['USER_LOGGED']);
     $_SESSION['APPLICATION'] = $aData['APPLICATION'];
     $_SESSION['INDEX'] = $aData['INDEX'];
     $_SESSION['PROCESS'] = $aData['PROCESS'];
     $_SESSION['TASK'] = $httpData->id;
     $_SESSION['STEP_POSITION'] = 0;
     $_SESSION['CASES_REFRESH'] = true;
     // Execute Events
     require_once 'classes/model/Event.php';
     $event = new Event();
     $event->createAppEvents($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['TASK']);
     $oCase = new Cases();
     $aNextStep = $oCase->getNextStep($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION']);
     //../cases/cases_Open?APP_UID={$APP.APP_UID}&DEL_INDEX={$APP.DEL_INDEX}&action=todo
     $aNextStep['PAGE'] = '../cases/cases_Open?APP_UID=' . $aData['APPLICATION'] . '&DEL_INDEX=' . $aData['INDEX'] . '&action=draft';
     $_SESSION['BREAKSTEP']['NEXT_STEP'] = $aNextStep;
     $this->redirect($aNextStep['PAGE']);
 }
开发者ID:ralpheav,项目名称:processmaker,代码行数:22,代码来源:home.php

示例4: newCaseImpersonate


//.........这里部分代码省略.........



            $numTasks = 0;

            if ($taskId != '') {

                $aTasks = $processes->getStartingTaskForUser( $processId, null );

                foreach ($aTasks as $task) {

                    if ($task['TAS_UID'] == $taskId) {

                        $arrayTask[0]['TAS_UID'] = $taskId;

                        $numTasks = 1;

                    }

                }

            } else {

                $arrayTask = $processes->getStartingTaskForUser( $processId, null );

                $numTasks = count( $arrayTask );

            }



            if ($numTasks == 1) {

                $case = $oCase->startCase( $arrayTask[0]['TAS_UID'], $userId );

                $caseId = $case['APPLICATION'];

                $caseNumber = $case['CASE_NUMBER'];



                $oldFields = $oCase->loadCase( $caseId );



                $oldFields['APP_DATA'] = array_merge( $oldFields['APP_DATA'], $Fields );



                $up_case = $oCase->updateCase( $caseId, $oldFields );



                $result = new wsResponse( 0, G::loadTranslation( 'ID_COMMAND_EXECUTED_SUCCESSFULLY' ) );



                $result->caseId = $caseId;

                $result->caseNumber = $caseNumber;



                return $result;

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

示例5: startCase

function startCase()
{
    G::LoadClass('case');
    /* GET , POST & $_SESSION Vars */
    /* unset any variable, because we are starting a new case */
    if (isset($_SESSION['APPLICATION'])) {
        unset($_SESSION['APPLICATION']);
    }
    if (isset($_SESSION['PROCESS'])) {
        unset($_SESSION['PROCESS']);
    }
    if (isset($_SESSION['TASK'])) {
        unset($_SESSION['TASK']);
    }
    if (isset($_SESSION['INDEX'])) {
        unset($_SESSION['INDEX']);
    }
    if (isset($_SESSION['STEP_POSITION'])) {
        unset($_SESSION['STEP_POSITION']);
    }
    /* Process */
    try {
        $oCase = new Cases();
        lookinginforContentProcess($_POST['processId']);
        $aData = $oCase->startCase($_REQUEST['taskId'], $_SESSION['USER_LOGGED']);
        $_SESSION['APPLICATION'] = $aData['APPLICATION'];
        $_SESSION['INDEX'] = $aData['INDEX'];
        $_SESSION['PROCESS'] = $aData['PROCESS'];
        $_SESSION['TASK'] = $_REQUEST['taskId'];
        $_SESSION['STEP_POSITION'] = 0;
        $_SESSION['CASES_REFRESH'] = true;
        // Execute Events
        require_once 'classes/model/Event.php';
        $event = new Event();
        $event->createAppEvents($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['TASK']);
        $oCase = new Cases();
        $aNextStep = $oCase->getNextStep($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION']);
        $aNextStep['PAGE'] = 'open?APP_UID=' . $aData['APPLICATION'] . '&DEL_INDEX=' . $aData['INDEX'] . '&action=draft';
        $_SESSION['BREAKSTEP']['NEXT_STEP'] = $aNextStep;
        $aData['openCase'] = $aNextStep;
        $aData['status'] = 'success';
        print G::json_encode($aData);
    } catch (Exception $e) {
        $aData['status'] = 'failure';
        $aData['message'] = $e->getMessage();
        print_r(G::json_encode($aData));
    }
}
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:48,代码来源:casesStartPage_Ajax.php

示例6: Event

         $_SESSION['INDEX'] = 1;
         $_SESSION['PROCESS'] = $resultprocessTask[1]['PRO_UID'];
         $_SESSION['TASK'] = $resultprocessTask[1]['TAS_UID'];
         $_SESSION['STEP_POSITION'] = 0;
         FupdateAPPDATATYPO3($_SESSION['APPLICATION']);
         // typo3
         // Execute events
         require_once 'classes/model/Event.php';
         $eventInstance = new Event();
         $eventInstance->createAppEvents($resultprocessTask[1]['PRO_UID'], $resultDraft[1]['APP_UID'], '1', $resultprocessTask[1]['TAS_UID']);
         // Redirect to cases steps
         $nextStep = $caseInstance->getNextStep($resultprocessTask[1]['PRO_UID'], $resultDraft[1]['APP_UID'], '1', 0);
         G::header('Location: ../cases/' . $nextStep['PAGE']);
     }
 } else {
     $data = $caseInstance->startCase($_REQUEST['task'], $_SESSION['USER_LOGGED']);
     $_SESSION['APPLICATION'] = $data['APPLICATION'];
     $_SESSION['INDEX'] = $data['INDEX'];
     $_SESSION['PROCESS'] = $data['PROCESS'];
     $_SESSION['TASK'] = $_REQUEST['task'];
     $_SESSION['STEP_POSITION'] = 0;
     // Execute events
     require_once 'classes/model/Event.php';
     $eventInstance = new Event();
     $eventInstance->createAppEvents($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['TASK']);
     FupdateAPPDATATYPO3($_SESSION['APPLICATION'], 1);
     // typo3
     // Redirect to cases steps
     $nextStep = $caseInstance->getNextStep($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION']);
     G::header('Location: ../cases/' . $nextStep['PAGE']);
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:endpoint.php

示例7: Task

<?php

try {
    require_once "classes/model/Task.php";
    require_once "classes/model/Users.php";
    G::LoadClass('case');
    G::LoadClass('derivation');
    $oTask = new Task();
    $TaskFields = $oTask->load($_POST['TASKS']);
    $aDerivation['NEXT_TASK'] = $TaskFields;
    $oDerivation = new Derivation();
    $deriva = $oDerivation->getNextAssignedUser($aDerivation);
    $oCase = new Cases();
    $aData = $oCase->startCase($_POST['TASKS'], $deriva['USR_UID']);
    $case = $oCase->loadCase($aData['APPLICATION'], 1);
    $Fields = array();
    $Fields['APP_NUMBER'] = $case['APP_NUMBER'];
    $Fields['APP_PROC_STATUS'] = 'draft';
    $Fields['APP_DATA'] = $_POST['form'];
    $Fields['DEL_INDEX'] = 1;
    $Fields['TAS_UID'] = $_POST['TASKS'];
    //$Fields = $oCase->loadCase($aData['APPLICATION'], 1);
    $oCase->updateCase($aData['APPLICATION'], $Fields);
    $s = 0;
    if (isset($_SERVER['HTTP_REFERER'])) {
        $dir = explode('?', $_SERVER['HTTP_REFERER']);
        if ($dir[1] == '__flag__=1') {
            $s = 1;
        } else {
            $dire = explode('&', $dir[1]);
            for ($i = 0; $i <= count($dire); $i++) {
开发者ID:nshong,项目名称:processmaker,代码行数:31,代码来源:cases_StartExternal.php


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