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


PHP Application::load方法代码示例

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


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

示例1: deleteCase

 function deleteCase($params)
 {
     $ainfoCase = array();
     try {
         $applicationUID = isset($_POST['APP_UID']) ? $_POST['APP_UID'] : $_SESSION['APPLICATION'];
         $app = new Application();
         $caseData = $app->load($applicationUID);
         $data['APP_NUMBER'] = $caseData['APP_NUMBER'];
         $oCase = new Cases();
         $oCase->removeCase($applicationUID);
         $this->success = true;
         $this->msg = G::LoadTranslation('ID_CASE_DELETED_SUCCESSFULLY', SYS_LANG, $data);
     } catch (Exception $e) {
         $this->success = false;
         $this->msg = $e->getMessage();
     }
 }
开发者ID:nshong,项目名称:processmaker,代码行数:17,代码来源:adhocUserProxy.php

示例2: database

         G::LoadSystem($sDataBase);
         $oDataBase = new database();
         $sConcat = $oDataBase->concatString("U.USR_LASTNAME", "' '", "U.USR_FIRSTNAME");
     }
     $sSQL = "   SELECT\n                                    TU.USR_UID AS USR_UID, " . $sConcat . " AS USR_FULLNAME\n                                FROM\n                                    TASK_USER AS TU\n                                    LEFT JOIN\n                                    USERS AS U\n                                    ON (\n                                        TU.USR_UID = U.USR_UID\n                                    )\n                                WHERE\n                                    TU.TAS_UID     = '" . $_POST['TAS_UID'] . "' AND\n                                    TU.TU_TYPE     = 1 AND\n                                    TU.TU_RELATION = 1 AND\n                                    U.USR_STATUS   = 1";
     $oDataset = $oSession->Execute($sSQL);
     while ($aRow = $oDataset->Read()) {
         $sAux .= '<option value="' . $aRow['USR_UID'] . '">' . $aRow['USR_FULLNAME'] . '</option>';
     }
     $sAux .= '</select>';
     echo $sAux;
     break;
 case 'EVALUATE':
     G::LoadClass('application');
     $oApplication = new Application(new DBConnection());
     $oApplication->load($_SESSION['APPLICATION']);
     $sUser = '';
     if ($_POST['TAS_ASSIGN_VARIABLE'] != '') {
         if (isset($oApplication->Fields['APP_DATA'][str_replace('@@', '', $_POST['TAS_ASSIGN_VARIABLE'])])) {
             $sUser = $oApplication->Fields['APP_DATA'][str_replace('@@', '', $_POST['TAS_ASSIGN_VARIABLE'])];
         }
     }
     if ($sUser != '') {
         G::LoadClass('user');
         $oUser = new User(new DBConnection());
         $oUser->load($sUser);
         echo $oUser->Fields['USR_FIRSTNAME'] . ' ' . $oUser->Fields['USR_LASTNAME'] . '<input type="hidden" name="form[TASKS][1][USR_UID]" id="form[TASKS][1][USR_UID]" value="' . $sUser . '">';
     } else {
         echo '<strong>Error: </strong>' . $_POST['TAS_ASSIGN_VARIABLE'] . ' ' . G::LoadTranslation('ID_EMPTY');
         echo '<input type="hidden" name="_ERROR_" id="_ERROR_" value="">';
     }
开发者ID:bqevin,项目名称:processmaker,代码行数:31,代码来源:cases_Ajax.php

示例3: getDerivatedCases

    function getDerivatedCases ($sParentUid, $sDelIndexParent)

    {

        $oCriteria = new Criteria( 'workflow' );

        $cases = array ();

        $derivation = array ();

        //get the child delegations , of parent delIndex

        $children = array ();

        $oCriteria->clearSelectColumns();

        $oCriteria->addSelectColumn( AppDelegationPeer::DEL_INDEX );

        $oCriteria->add( AppDelegationPeer::APP_UID, $sParentUid );

        $oCriteria->add( AppDelegationPeer::DEL_PREVIOUS, $sDelIndexParent );

        $oDataset = AppDelegationPeer::doSelectRS( $oCriteria );

        $oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );

        $oDataset->next();

        $aRow = $oDataset->getRow();

        while (is_array( $aRow )) {

            $children[] = $aRow['DEL_INDEX'];



            $oDataset->next();

            $aRow = $oDataset->getRow();

        }



        //foreach child , get the info of their derivations and subprocesses

        foreach ($children as $keyChild => $child) {

            $oCriteria = new Criteria( 'workflow' );

            $oCriteria->clearSelectColumns();

            $oCriteria->addSelectColumn( SubApplicationPeer::APP_UID );

            $oCriteria->addSelectColumn( AppDelegationPeer::APP_UID );

            $oCriteria->addSelectColumn( AppDelegationPeer::DEL_INDEX );

            $oCriteria->addSelectColumn( AppDelegationPeer::PRO_UID );

            $oCriteria->addSelectColumn( AppDelegationPeer::TAS_UID );

            $oCriteria->addSelectColumn( AppDelegationPeer::USR_UID );

            $oCriteria->addSelectColumn( UsersPeer::USR_USERNAME );

            $oCriteria->addSelectColumn( UsersPeer::USR_FIRSTNAME );

            $oCriteria->addSelectColumn( UsersPeer::USR_LASTNAME );



            $oCriteria->add( SubApplicationPeer::APP_PARENT, $sParentUid );

            $oCriteria->add( SubApplicationPeer::DEL_INDEX_PARENT, $child );

            $oCriteria->addJoin( SubApplicationPeer::APP_UID, AppDelegationPeer::APP_UID );

            $oCriteria->addJoin( AppDelegationPeer::USR_UID, UsersPeer::USR_UID );

            $oDataset = SubApplicationPeer::doSelectRS( $oCriteria );

            $oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );

            $oDataset->next();

            $aRow = $oDataset->getRow();

            while (is_array( $aRow )) {

                $oProcess = new Process();

                $proFields = $oProcess->load( $aRow['PRO_UID'] );

                $oCase = new Application();

                $appFields = $oCase->load( $aRow['APP_UID'] );

                $oTask = new Task();

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

示例4: reactivateCase

    public function reactivateCase($sApplicationUID, $iIndex, $user_logged)

    {

        $oApplication = new Application();

        $aFields = $oApplication->load(

                (isset($_POST['sApplicationUID']) ? $_POST['sApplicationUID'] : $_SESSION['APPLICATION'])

        );

        $aFields['APP_STATUS'] = 'TO_DO';

        $oApplication->update($aFields);

        $this->ReactivateCurrentDelegation($sApplicationUID, $iIndex);

        $c = new Criteria('workflow');

        $c->clearSelectColumns();

        $c->addSelectColumn(AppDelayPeer::APP_DELAY_UID);



        $c->add(AppDelayPeer::APP_UID, $sApplicationUID);

        $c->add(AppDelayPeer::PRO_UID, $aFields['PRO_UID']);

        $c->add(AppDelayPeer::APP_DEL_INDEX, $iIndex);

        $c->add(AppDelayPeer::APP_TYPE, 'CANCEL');

        $c->add(AppDelayPeer::APP_DISABLE_ACTION_USER, 0);

        $c->add(AppDelayPeer::APP_DISABLE_ACTION_DATE, null, Criteria::ISNULL);



        $oDataset = AppDelayPeer::doSelectRS($c);

        $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);

        $oDataset->next();

        $aRow = $oDataset->getRow();

        //var_dump($aRow);

        $aFields = array();

        $aFields['APP_DELAY_UID'] = $aRow['APP_DELAY_UID'];

        $aFields['APP_DISABLE_ACTION_USER'] = $user_logged;

        $aFields['APP_DISABLE_ACTION_DATE'] = date('Y-m-d H:i:s');



        $delay = new AppDelay();

        $delay->update($aFields);

        //$this->ReactivateCurrentDelegation($sApplicationUID);

        $con = Propel::getConnection('workflow');

        $sql = "UPDATE APP_THREAD SET APP_THREAD_STATUS = 'OPEN' WHERE APP_UID =  '$sApplicationUID' " .

                " AND DEL_INDEX  ='$iIndex' ";

        $stmt = $con->createStatement();

        $rs = $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC);



        //update searchindex

        if ($this->appSolr != null) {

            $this->appSolr->updateApplicationSearchIndex($sApplicationUID);

        }

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

示例5: reactivateCase

 public function reactivateCase()
 {
     try {
         $applicationUID = isset($_POST['APP_UID']) ? $_POST['APP_UID'] : $_SESSION['APPLICATION'];
         $delIndex = isset($_POST['DEL_INDEX']) ? $_POST['DEL_INDEX'] : $_SESSION['INDEX'];
         $app = new Application();
         $caseData = $app->load($applicationUID);
         $data['APP_NUMBER'] = $caseData['APP_NUMBER'];
         $oCase = new Cases();
         $oCase->reactivateCase($applicationUID, $delIndex, $_SESSION['USER_LOGGED']);
         $result->success = true;
         $result->msg = G::LoadTranslation('ID_CASE_REACTIVATED_SUCCESSFULLY', SYS_LANG, $data);
     } catch (Exception $e) {
         $result->success = false;
         $result->msg = $e->getMessage();
     }
     print G::json_encode($result);
 }
开发者ID:norahmollo,项目名称:processmaker,代码行数:18,代码来源:ajaxListener.php

示例6: Cases

    $tasks = $task->load($_SESSION['TASK']);
    $result->data = $case->getUsersToReassign($_SESSION['TASK'], $_SESSION['USER_LOGGED'], $tasks['PRO_UID']);
    print G::json_encode($result);
}
if ($actionAjax == 'reassignCase') {
    $APP_UID = $_REQUEST["APP_UID"];
    $DEL_INDEX = $_REQUEST["DEL_INDEX"];
    $_SESSION['APPLICATION'] = $APP_UID;
    $_SESSION['INDEX'] = $DEL_INDEX;
    $cases = new Cases();
    $user = new Users();
    $app = new Application();
    $TO_USR_UID = $_POST['USR_UID'];
    try {
        $cases->reassignCase($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], $TO_USR_UID);
        $caseData = $app->load($_SESSION['APPLICATION']);
        $userData = $user->load($TO_USR_UID);
        //print_r($caseData);
        $data['APP_NUMBER'] = $caseData['APP_NUMBER'];
        $data['USER'] = $userData['USR_LASTNAME'] . ' ' . $userData['USR_FIRSTNAME'];
        //TODO change with the farmated username from environment conf
        $result->status = 0;
        $result->msg = G::LoadTranslation('ID_REASSIGNMENT_SUCCESS', SYS_LANG, $data);
    } catch (Exception $e) {
        $result->status = 1;
        $result->msg = $e->getMessage();
    }
    print G::json_encode($result);
}
if ($actionAjax == 'showHistoryMessage') {
    ?>
开发者ID:bqevin,项目名称:processmaker,代码行数:31,代码来源:casesList_Ajax.php

示例7: isset

     }
     G::RenderPage('publish', 'raw');
     break;
 case "SendMessage":
     require_once 'classes/model/Application.php';
     $sessionId = $frm["SESSION_ID"];
     $from = $frm["FROM"];
     $to = $frm["TO_EMAIL"];
     $cc = isset($frm["CC_MAIL"]) ? $frm["CC_MAIL"] : '';
     $bcc = isset($frm["BCC_MAIL"]) ? $frm["BCC_MAIL"] : '';
     $caseId = $frm["CASE_ID"];
     $subject = $frm["SUBJECT"];
     $message = $frm["MESSAGE"];
     // getting the proUid variable
     $oCases = new Application();
     $oCases->load($caseId);
     $proUid = $oCases->getProUid();
     $caseNumber = $oCases->getAppNumber();
     // generating the path for the template msj
     $templateFile = PATH_DB . SYS_SYS . PATH_SEP . 'mailTemplates' . PATH_SEP . $proUid . PATH_SEP . 'tempTemplate.hml';
     // generating the file adding the msj variable
     $messageBody = "message for case: " . $caseNumber . "<br>" . $message;
     file_put_contents($templateFile, $messageBody);
     $params = array('sessionId' => $sessionId, 'caseId' => $caseId, 'from' => $from, 'to' => $to, 'cc' => $cc, 'bcc' => $bcc, 'subject' => $subject, 'template' => 'tempTemplate.hml');
     $result = $client->__SoapCall('sendMessage', array($params));
     $G_PUBLISH = new Publisher();
     $fields['status_code'] = $result->status_code;
     $fields['message'] = $result->message;
     $fields['time_stamp'] = $result->timestamp;
     if ($result->status_code == 9) {
         $_SESSION['WS_SESSION_ID'] = '';
开发者ID:rodriquelca,项目名称:processmaker,代码行数:31,代码来源:webServicesAjax.php

示例8: ON

         $sConcat = $oDataBase->concatString("U.USR_LASTNAME", "' '", "U.USR_FIRSTNAME");
     }
     $sSQL = "   SELECT\n                                    TU.USR_UID AS USR_UID, " . $sConcat . " AS USR_FULLNAME\n                                FROM\n                                    TASK_USER AS TU\n                                    LEFT JOIN\n                                    USERS AS U\n                                    ON (\n                                        TU.USR_UID = U.USR_UID\n                                    )\n                                WHERE\n                                    TU.TAS_UID     = '" . $_POST['TAS_UID'] . "' AND\n                                    TU.TU_TYPE     = 1 AND\n                                    TU.TU_RELATION = 1 AND\n                                    U.USR_STATUS   = 1";
     $oDataset = $oSession->Execute($sSQL);
     while ($aRow = $oDataset->Read()) {
         $sAux .= '<option value="' . $aRow['USR_UID'] . '">' . $aRow['USR_FULLNAME'] . '</option>';
     }
     $sAux .= '</select>';
     echo $sAux;
     break;
 case 'EVALUATE':
     $TAS_ASSIGN_VARIABLE = $filter->xssFilterHard($_POST['TAS_ASSIGN_VARIABLE']);
     $APPLICATION = $filter->xssFilterHard($_SESSION['APPLICATION']);
     G::LoadClass('application');
     $oApplication = new Application(new DBConnection());
     $oApplication->load($APPLICATION);
     $sUser = '';
     if ($TAS_ASSIGN_VARIABLE != '') {
         if (isset($oApplication->Fields['APP_DATA'][str_replace('@@', '', $TAS_ASSIGN_VARIABLE)])) {
             $sUser = $oApplication->Fields['APP_DATA'][str_replace('@@', '', $TAS_ASSIGN_VARIABLE)];
         }
     }
     if ($sUser != '') {
         G::LoadClass('user');
         $oUser = new User(new DBConnection());
         $oUser->load($sUser);
         echo $oUser->Fields['USR_FIRSTNAME'] . ' ' . $oUser->Fields['USR_LASTNAME'] . '<input type="hidden" name="form[TASKS][1][USR_UID]" id="form[TASKS][1][USR_UID]" value="' . $sUser . '">';
     } else {
         $ID_EMPTY = $filter->xssFilterHard(G::LoadTranslation('ID_EMPTY'));
         echo '<strong>Error: </strong>' . $TAS_ASSIGN_VARIABLE . ' ' . $ID_EMPTY;
         echo '<input type="hidden" name="_ERROR_" id="_ERROR_" value="">';
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:cases_Ajax.php

示例9: catch

    $res = $obj->create();
} catch (Exception $e) {
    //#14
    $t->isa_ok($e, 'PropelException', 'create() return error when APP_UID is not defined');
    //#15
    $t->like($e->getMessage(), "%Unable to execute INSERT statement%", 'getAppTitle() return Error in getAppTitle, the APP_UID cant be blank');
}
//create
try {
    $obj = new Application();
    $appUid = $obj->create('1');
    //#16
    $t->isa_ok($appUid, 'string', 'create(), creates a new application');
    //#17
    $t->is(strlen($appUid), 14, 'create(), creates a new application, Guid lenth=14 chars');
    $res = $obj->load($appUid);
    //#18
    $t->isa_ok($res, 'array', 'load(), loads a new application');
    //#19
    $t->is($res['APP_UID'], $appUid, 'load(), loads a new application, valid APP_UID');
    //#20
    $t->is($res['APP_FINISH_DATE'], '1902-01-01 00:00:00', 'load(), loads a new application, valid FINISH_DATE');
    //#21
    $t->like($res['APP_TITLE'], '%#%', 'load(), loads a new application, valid APP_TITLE');
    //#22
    $t->is($res['APP_PARENT'], '', 'load(), loads a new application, valid APP_PARENT');
} catch (Exception $e) {
    $t->like($e->getMessage(), "%Unable to execute INSERT statement%", 'create() return Error in getAppTitle, the APP_UID cant be blank');
}
//update with empty
try {
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:classApplicationTest.php

示例10: pauseCase

    /**
     *
     */
    public function pauseCase($usr_uid, $app_uid, $request_data)
    {
        $result = new \stdclass();

        try {
            $unpauseDate = $request_data['unpauseDate'] . ' '. $request_data['unpauseTime'];
            $oCase = new \Cases();
            $iDelIndex = $oCase->getCurrentDelegation( $app_uid, $usr_uid );
            // Save the note pause reason
            if ($request_data['noteContent'] != '') {
                $request_data['noteContent'] = G::LoadTranslation('ID_CASE_PAUSE_LABEL_NOTE') . ' ' . $request_data['noteContent'];
                $appNotes = new \AppNotes();
                $noteContent = addslashes($request_data['noteContent']);
                $appNotes->postNewNote($app_uid, $usr_uid, $noteContent, $request_data['notifyUser']);
            }
            // End save

            $oCase->pauseCase($app_uid, $iDelIndex, $usr_uid, $unpauseDate);
            $app = new \Application();
            $caseData = $app->load($app_uid);
            $data['APP_NUMBER'] = $caseData['APP_NUMBER'];
            $data['UNPAUSE_DATE'] = $unpauseDate;

            $result->success = true;
            $result->msg = G::LoadTranslation('ID_CASE_PAUSED_SUCCESSFULLY', SYS_LANG, $data);
        } catch (\Exception $e) {
            throw $e;
        }
        return $result;
    }
开发者ID:rrsc,项目名称:processmaker,代码行数:33,代码来源:Light.php

示例11: cancelCase

 /**
  * Cancel case
  *
  * @param string caseUid : ID of the case.
  * @param int delIndex : Delegation index of the case.
  * @param string userUid : The unique ID of the user who will cancel the case.
  * @return $result will return an object
  */
 public function cancelCase($caseUid, $delIndex, $userUid)
 {
     $g = new G();
     try {
         $g->sessionVarSave();
         $_SESSION["APPLICATION"] = $caseUid;
         $_SESSION["INDEX"] = $delIndex;
         $_SESSION["USER_LOGGED"] = $userUid;
         if (empty($caseUid)) {
             $result = new wsResponse(100, G::LoadTranslation("ID_REQUIRED_FIELD") . " caseUid");
             $g->sessionVarRestore();
             return $result;
         }
         if (empty($delIndex)) {
             $result = new wsResponse(100, G::LoadTranslation("ID_REQUIRED_FIELD") . " delIndex");
             $g->sessionVarRestore();
             return $result;
         }
         if (empty($userUid)) {
             $result = new wsResponse(100, G::LoadTranslation("ID_REQUIRED_FIELD") . " userUid");
             $g->sessionVarRestore();
             return $result;
         }
         $oApplication = new Application();
         $aFields = $oApplication->load($caseUid);
         if ($aFields['APP_STATUS'] == 'DRAFT') {
             $result = new wsResponse(100, G::LoadTranslation("ID_CASE_IN_STATUS") . " DRAFT");
             $g->sessionVarRestore();
             return $result;
         }
         $case = new Cases();
         $case->cancelCase($caseUid, $delIndex, $userUid);
         //Response
         $res = new wsResponse(0, G::LoadTranslation("ID_COMMAND_EXECUTED_SUCCESSFULLY"));
         $result = array("status_code" => $res->status_code, "message" => $res->message, "timestamp" => $res->timestamp);
         $g->sessionVarRestore();
         return $result;
     } catch (Exception $e) {
         $result = new wsResponse(100, $e->getMessage());
         $g->sessionVarRestore();
         return $result;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:51,代码来源:class.wsBase.php

示例12: __autoload

function __autoload($class)
{
    if (!Application::load($class)) {
        die("Could not locate class: {$class}");
    }
}
开发者ID:jasonjohnson,项目名称:blast,代码行数:6,代码来源:bootstrap.php


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