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

PHP Cases类代码示例

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

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



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

示例1: postNote

function postNote($httpData)
{
    //extract(getExtJSParams());
    $appUid = isset($httpData->appUid) ? $httpData->appUid : '';
    $usrUid = isset($httpData->usrUid) ? $httpData->usrUid : '';
    require_once "classes/model/AppNotes.php";
    $appNotes = new AppNotes();
    $noteContent = addslashes($httpData->noteText);
    $result = $appNotes->postNewNote($appUid, $usrUid, $noteContent, false);
    //return true;
    //die();
    //send the response to client
    @ini_set('implicit_flush', 1);
    ob_start();
    //echo G::json_encode($result);
    @ob_flush();
    @flush();
    @ob_end_flush();
    ob_implicit_flush(1);
    //return true;
    //send notification in background
    $noteRecipientsList = array();
    G::LoadClass('case');
    $oCase = new Cases();
    $p = $oCase->getUsersParticipatedInCase($appUid);
    foreach ($p['array'] as $key => $userParticipated) {
        $noteRecipientsList[] = $key;
    }
    $noteRecipients = implode(",", $noteRecipientsList);
    $appNotes->sendNoteNotification($appUid, $usrUid, $noteContent, $noteRecipients);
}
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:class.actionsByEmailUtils.php


示例2: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     // check if user has permissions to createSecuences
     if (Yii::app()->user->checkAccess('createSecuences')) {
         // create secuences object
         $model = new Secuences();
         // find case parent
         $cases = Cases::model()->findByPk((int) $_GET['owner']);
         // output message
         $returnMessage = null;
         // verify Secuences form exist
         if (isset($_POST['Secuences'])) {
             // set form elements to Secuences model attributes
             $model->attributes = $_POST['Secuences'];
             // validate and save
             if ($model->save()) {
                 // save log
                 $attributes = array('log_date' => date("Y-m-d G:i:s"), 'log_activity' => 'SecuenceCreated', 'log_resourceid' => $model->case_id, 'log_type' => Logs::LOG_CREATED, 'user_id' => Yii::app()->user->id, 'module_id' => 'cases', 'project_id' => $model->Cases->project_id);
                 Logs::model()->saveLog($attributes);
                 $returnMessage = Yii::t('secuences', 'successMessage');
                 // create new secuence model for clear inputs form
                 $model = new Secuences();
             } else {
                 $returnMessage = Yii::t('secuences', 'errorMessage');
             }
         }
         // output create page
         $this->render('create', array('model' => $model, 'types' => SecuenceTypes::model()->findAll(), 'cases' => $cases, 'returnMessage' => $returnMessage));
     } else {
         throw new CHttpException(403, Yii::t('site', '403_Error'));
     }
 }
开发者ID:lanzelotik,项目名称:celestic-community,代码行数:36,代码来源:SecuencesController.php


示例3: init

 public function init()
 {
     $cases = Cases::all();
     $aboutme = AboutMe::all();
     $view = new View('Home', [], [], array('header', 'home'), [$cases, $aboutme]);
     $view->render();
 }
开发者ID:hansfeenstra1997,项目名称:Feenstra_IT,代码行数:7,代码来源:HomeController.php


示例4: FupdateAPPDATATYPO3

function FupdateAPPDATATYPO3($APP_UID, $new = 0)
{
    $_SESSION["PM_RUN_OUTSIDE_MAIN_APP"] = true;
    G::LoadClass("case");
    $caseInstance = new Cases();
    $newFields = $caseInstance->loadCase($APP_UID);
    $newFields['APP_DATA']['FLAGTYPO3'] = 'On';
    $newFields['APP_DATA']['FLAG_ACTIONTYPO3'] = 'actionCreateCase';
    if ($_REQUEST['redirect']) {
        $newFields['APP_DATA']['FLAG_REDIRECT_PAGE'] = urldecode($_REQUEST['redirect']);
    }
    if ($new == 1) {
        $newFields['APP_DATA']['NUM_DOSSIER'] = $newFields['APP_NUMBER'];
    }
    PMFSendVariables($APP_UID, $newFields['APP_DATA']);
    $caseInstance->updateCase($APP_UID, $newFields);
}
开发者ID:emildev35,项目名称:processmaker,代码行数:17,代码来源:endpoint.php


示例5: 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


示例6: getViewMessages

 /**
  * @return array
  * @access public
  *
  * @param string $msg_uid {@min 1}{@max 32}
  * @param string $app_uid {@min 1}{@max 32}
  *
  * @url GET /process/case/:app_uid/message/:msg_uid/view
  */
 public function getViewMessages($app_uid, $msg_uid)
 {
     try {
         $oMobile = new \ProcessMaker\BusinessModel\Light\Tracker();
         $Fields = \Cases::getHistoryMessagesTrackerView($app_uid, $msg_uid);
         $response = $oMobile->parserMessages($Fields);
         //$response = $oMobile->messages($pro_uid, $app_uid);
     } catch (\Exception $e) {
         throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
     }
     return $response;
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:21,代码来源:Tracker.php


示例7: actionEditProcess

 public function actionEditProcess()
 {
     try {
         $post = StringHelper::filterArrayString($_POST);
         $result = Cases::model()->edit($_POST);
         if ($result == 1) {
             Yii::app()->user->setFlash('success', 'Cập nhật dữ liệu thành công !');
             $this->redirect(Yii::app()->createUrl('case/edit', array('id' => $post['id'])));
         } else {
             if ($result == 2) {
                 Yii::app()->user->setFlash('error', 'Cập nhật dữ liệu thất bại !');
                 $this->redirect(Yii::app()->createUrl('case/edit', array('id' => $post['id'])));
             } else {
                 Yii::app()->user->setFlash('error', 'Không tồn tại tài liệu !');
                 $this->redirect(Yii::app()->createUrl('case/edit', array('id' => $post['id'])));
             }
         }
     } catch (Exception $ex) {
         var_dump($ex->getMessage());
     }
 }
开发者ID:huynt57,项目名称:vksnd,代码行数:21,代码来源:CaseController.php


示例8: generateData

 /**
  * Generate data
  *
  * return void
  */
 public function generateData()
 {
     try {
         G::LoadClass("case");
         AppAssignSelfServiceValuePeer::doDeleteAll();
         //Delete all records
         //Generate data
         $case = new Cases();
         $criteria = new Criteria("workflow");
         $criteria->addSelectColumn(AppDelegationPeer::APP_UID);
         $criteria->addSelectColumn(AppDelegationPeer::DEL_INDEX);
         $criteria->addSelectColumn(ApplicationPeer::APP_DATA);
         $criteria->addSelectColumn(AppDelegationPeer::PRO_UID);
         $criteria->addSelectColumn(TaskPeer::TAS_UID);
         $criteria->addSelectColumn(TaskPeer::TAS_GROUP_VARIABLE);
         $criteria->addJoin(AppDelegationPeer::APP_UID, ApplicationPeer::APP_UID, Criteria::LEFT_JOIN);
         $criteria->addJoin(AppDelegationPeer::TAS_UID, TaskPeer::TAS_UID, Criteria::LEFT_JOIN);
         $criteria->add(TaskPeer::TAS_ASSIGN_TYPE, "SELF_SERVICE", Criteria::EQUAL);
         $criteria->add(TaskPeer::TAS_GROUP_VARIABLE, "", Criteria::NOT_EQUAL);
         $criteria->add(AppDelegationPeer::USR_UID, "", Criteria::EQUAL);
         $criteria->add(AppDelegationPeer::DEL_THREAD_STATUS, "OPEN", Criteria::EQUAL);
         $rsCriteria = AppDelegationPeer::doSelectRS($criteria);
         $rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         while ($rsCriteria->next()) {
             $row = $rsCriteria->getRow();
             $applicationData = $case->unserializeData($row["APP_DATA"]);
             $taskGroupVariable = trim($row["TAS_GROUP_VARIABLE"], " @#");
             if ($taskGroupVariable != "" && isset($applicationData[$taskGroupVariable])) {
                 $dataVariable = $applicationData[$taskGroupVariable];
                 $dataVariable = is_array($dataVariable) ? $dataVariable : trim($dataVariable);
                 if (!empty($dataVariable)) {
                     $this->create($row["APP_UID"], $row["DEL_INDEX"], array("PRO_UID" => $row["PRO_UID"], "TAS_UID" => $row["TAS_UID"], "GRP_UID" => serialize($dataVariable)));
                 }
             }
         }
     } catch (Exception $e) {
         throw $e;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:44,代码来源:AppAssignSelfServiceValue.php


示例9: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     if (Yii::app()->user->checkAccess('createValidations')) {
         $model = new Validations();
         $cases = Cases::model()->findByPk($_GET['owner']);
         $returnMessage = null;
         if (isset($_POST['Validations'])) {
             $model->attributes = $_POST['Validations'];
             if ($model->save()) {
                 // Guardar log
                 $attributes = array('log_date' => date("Y-m-d G:i:s"), 'log_activity' => 'ValidationCreated', 'log_resourceid' => $model->case_id, 'log_type' => Logs::LOG_CREATED, 'user_id' => Yii::app()->user->id, 'module_id' => 'cases', 'project_id' => $model->Cases->project_id);
                 Logs::model()->saveLog($attributes);
                 //$this->redirect(Yii::app()->createUrl('secuences/create', array('owner'=>$cases->case_id)));
                 $returnMessage = "Validation was succefully created.";
                 $model = new Validations();
             }
         }
         $this->render('create', array('model' => $model, 'cases' => $cases, 'returnMessage' => $returnMessage));
     } else {
         throw new CHttpException(403, Yii::t('site', '403_Error'));
     }
 }
开发者ID:lanzelotik,项目名称:celestic-community,代码行数:26,代码来源:ValidationsController.php


示例10: 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


示例11: Cases

            G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels' );
            G::header( 'location: ../login/login' );
            break;
        case - 1:
        default:
            G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
            G::header( 'location: ../login/login' );
            break;
    }
}

/* Includes */
require_once 'classes/model/AppDelay.php';
G::LoadClass( 'case' );

$oCase = new Cases();

//cleaning the case session data
Cases::clearCaseSessionData();

try {
    //Loading data for a Jump request
    if (! isset( $_GET['APP_UID'] ) && isset( $_GET['APP_NUMBER'] )) {
        $_GET['APP_UID'] = $oCase->getApplicationUIDByNumber( $_GET['APP_NUMBER'] );
        $_GET['DEL_INDEX'] = $oCase->getCurrentDelegation( $_GET['APP_UID'], $_SESSION['USER_LOGGED'] );

        //if the application doesn't exist
        if (is_null( $_GET['APP_UID'] )) {
            G::SendMessageText( G::LoadTranslation( 'ID_CASE_DOES_NOT_EXISTS' ), 'info' );
            G::header( 'location: casesListExtJs' );
            exit();
开发者ID:hpx2206,项目名称:processmaker-1,代码行数:31,代码来源:cases_Open.php


示例12: Publisher

     //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',
     // '', $Fields, 'cases_SaveDocument?UID=' . $_POST['docID']);
     G::RenderPage('publish', 'raw');
     break;
 case "getCountCasesFolder":
     //$json = new Services_JSON();
     $aTypes = array('to_do', 'draft', 'cancelled', 'sent', 'paused', 'completed', 'selfservice', 'to_revise', 'to_reassign');
     $aTypesID = array('to_do' => 'CASES_INBOX', 'draft' => 'CASES_DRAFT', 'cancelled' => 'CASES_CANCELLED', 'sent' => 'CASES_SENT', 'paused' => 'CASES_PAUSED', 'completed' => 'CASES_COMPLETED', 'selfservice' => 'CASES_SELFSERVICE', 'to_revise' => 'CASES_TO_REVISE', 'to_reassign' => 'CASES_TO_REASSIGN');
     if (!isset($_POST['A'])) {
         $oCases = new Cases();
         $aCount = $oCases->getAllConditionCasesCount($aTypes, true);
         echo Bootstrap::json_encode($aCount);
     } else {
         echo Bootstrap::json_encode($aTypesID);
     }
     break;
 case "previusJump":
     //require_once 'classes/model/Application.php';
     $oCriteria = new Criteria('workflow');
     $response = array("success" => true);
     $oCriteria->add(ApplicationPeer::APP_NUMBER, $_POST['appNumber']);
     $oDataset = ApplicationPeer::doSelectRS($oCriteria);
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $oDataset->next();
     $aApplication = $oDataset->getRow();
开发者ID:bqevin,项目名称:processmaker,代码行数:31,代码来源:cases_Ajax.php


示例13: header

        G::header('location: ../login/login');
        die;
        break;
    case -1:
        G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
        G::header('location: ../login/login');
        die;
        break;
}
if (isset($_POST['form']['BTN_CANCEL'])) {
    header("Location: ../cases/main");
    die;
}
/* Includes */
G::LoadClass('case');
$oCase = new Cases();
$sAppUid = $_SESSION['APPLICATION'];
$iDelIndex = $_SESSION['INDEX'];
$oAppDelegation = new AppDelegation();
$aDelegation = $oAppDelegation->load($sAppUid, $iDelIndex);
//if there are no user in the delegation row, this case is still in selfservice
if ($aDelegation['USR_UID'] == "") {
    $oCase->setCatchUser($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED']);
} else {
    G::SendMessageText(G::LoadTranslation('ID_CASE_ALREADY_DERIVATED'), 'error');
}
die('<script type="text/javascript">
      if (window.parent.frames.length != 0) {
        parent.location = "open?APP_UID=' . $_SESSION['APPLICATION'] . '&DEL_INDEX=' . $_SESSION['INDEX'] . '&action=unassigned";
      }
      else {
开发者ID:nshong,项目名称:processmaker,代码行数:31,代码来源:cases_CatchExecute.php


示例14: actionCreate


//.........这里部分代码省略.........
                     // create an Document object
                     $modeldocs = new Documents();
                     $modeldocs->image = $image[$i];
                     if (!$modeldocs->image->getError()) {
                         // name is formed by date(day+month+year+hour+minutes+seconds+dayofyear+microtime())
                         $this->tmpFileName = str_replace(" ", "", date('dmYHis-z-') . microtime());
                         // set the extension file uploaded
                         $extension = $modeldocs->image->getExtensionName();
                         // if no error saving file
                         if ($modeldocs->image->saveAs(self::FOLDERIMAGES . $this->tmpFileName . '.' . $extension)) {
                             $modeldocs->project_id = $project;
                             $modeldocs->document_name = substr($modeldocs->image->getName(), 0, 30);
                             $modeldocs->document_description = $model->comment_text;
                             $modeldocs->document_path = self::FOLDERIMAGES . $this->tmpFileName . '.' . $extension;
                             $modeldocs->document_revision = '1';
                             $modeldocs->document_uploadDate = date("Y-m-d");
                             $modeldocs->document_type = $modeldocs->image->getType();
                             $modeldocs->document_baseRevision = date('dmYHis');
                             $modeldocs->user_id = Yii::app()->user->id;
                             $modeldocs->comment_id = $model->primaryKey;
                             // save file uploaded as document
                             if ($modeldocs->save()) {
                                 Yii::app()->user->setFlash('CommentMessageSuccess', $modeldocs->image->getName() . " " . Yii::t('comments', 'UploadOk'));
                             } else {
                                 Yii::app()->user->setFlash('CommentMessage', $modeldocs->getErrors());
                             }
                         } else {
                             Yii::app()->user->setFlash('CommentMessage', $modeldocs->image->getName() . " " . Yii::t('comments', 'UploadError'));
                         }
                     } else {
                         Yii::app()->user->setFlash('CommentMessage', $modeldocs->image->error . " " . Yii::t('comments', 'UploadCheckErrors'));
                     }
                 }
             }
             // save log
             $attributes = array('log_date' => date("Y-m-d G:i:s"), 'log_activity' => 'CommentPosted', 'log_resourceid' => $model->comment_resourceid, 'log_type' => Logs::LOG_COMMENTED, 'log_commentid' => $model->primaryKey, 'user_id' => Yii::app()->user->id, 'module_id' => $module->module_name, 'project_id' => $project);
             Logs::model()->saveLog($attributes);
             // find project managers to sent comment via mail
             $recipientsList = array();
             $ProjectManagers = Projects::model()->findManagersByProject($project);
             $managersArray = array();
             foreach ($ProjectManagers as $manager) {
                 $managersArray['email'] = $manager->user_email;
                 $managersArray['name'] = $manager->CompleteName;
                 array_push($recipientsList, $managersArray);
             }
             // find task owners to send comment via mail
             if ($module->module_name == 'tasks') {
                 $collaborators = Projects::model()->findAllUsersByProject($project);
                 $ColaboratorsArray = array();
                 foreach ($collaborators as $colaborator) {
                     $ColaboratorsArray['email'] = $colaborator->user_email;
                     $ColaboratorsArray['name'] = $colaborator->CompleteName;
                     // avoid to repeat email address
                     if (!in_array($ColaboratorsArray, $recipientsList)) {
                         array_push($recipientsList, $ColaboratorsArray);
                     }
                 }
             }
             // finding resource title
             switch ($module->module_name) {
                 case "budgets":
                     $resourceModelTitle = Budgets::model()->findByPk($model->comment_resourceid)->budget_title;
                     break;
                 case "invoices":
                     $resourceModelTitle = Invoices::model()->findByPk($model->comment_resourceid)->invoice_number;
                     break;
                 case "expenses":
                     $resourceModelTitle = Expenses::model()->findByPk($model->comment_resourceid)->expense_name;
                     break;
                 case "documents":
                     $resourceModelTitle = Documents::model()->findByPk($model->comment_resourceid)->document_name;
                     break;
                 case "milestones":
                     $resourceModelTitle = Milestones::model()->findByPk($model->comment_resourceid)->milestone_title;
                     break;
                 case "cases":
                     $resourceModelTitle = Cases::model()->findByPk($model->comment_resourceid)->case_name;
                     break;
                 case "tasks":
                     $resourceModelTitle = Tasks::model()->findByPk($model->comment_resourceid)->task_name;
                     break;
                 default:
                     $resourceModelTitle = "{empty}";
                     break;
             }
             // get project information
             $project = Projects::model()->findByPk($project);
             // prepare template to send via email
             $str = $this->renderPartial('//templates/comments/created', array('model' => $model, 'projectName' => $project->project_name, 'userposted' => Yii::app()->user->CompleteName, 'resourceTitle' => $resourceModelTitle, 'moduleName' => Yii::t('modules', $module->module_name), 'applicationName' => Yii::app()->name, 'applicationUrl' => Yii::app()->createAbsoluteUrl($module->module_name . '/view', array('id' => $model->comment_resourceid))), true);
             Yii::import('application.extensions.phpMailer.yiiPhpMailer');
             $mailer = new yiiPhpMailer();
             $subject = Yii::t('email', 'CommentPosted') . " - " . $project->project_name . " - " . Yii::t('modules', $module->module_name);
             $mailer->pushMail($subject, $str, $recipientsList, Emails::PRIORITY_NORMAL);
         } else {
             Yii::app()->user->setFlash('CommentMessage', Yii::t('comments', 'RequiredComment'));
         }
     }
     $this->redirect(Yii::app()->createUrl($_GET['module'] . '/' . $_GET['action'], array('id' => $_GET['id'], '#' => 'comment-' . $model->primaryKey)));
 }
开发者ID:lanzelotik,项目名称:celestic-community,代码行数:101,代码来源:CommentsController.php


示例15: handleFatalErrors

function handleFatalErrors($buffer)
{
    G::LoadClass('case');
    $oCase = new Cases();
    if (preg_match('/(error<\\/b>:)(.+)(<br)/', $buffer, $regs)) {
        $err = preg_replace('/<.*?>/', '', $regs[2]);
        $aAux = explode(' in ', $err);
        $sCode = $_SESSION['_CODE_'];
        unset($_SESSION['_CODE_']);
        registerError(2, $aAux[0], 0, $sCode);
        if (strpos($_SERVER['REQUEST_URI'], '/cases/cases_Step') !== false) {
            if (strpos($_SERVER['REQUEST_URI'], '&ACTION=GENERATE') !== false) {
                $aNextStep = $oCase->getNextStep($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION']);
                if ($_SESSION['TRIGGER_DEBUG']['ISSET']) {
                    $_SESSION['TRIGGER_DEBUG']['TIME'] = 'AFTER';
                    $_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $aNextStep['PAGE'];
                    $aNextStep['PAGE'] = $aNextStep['PAGE'] . '&breakpoint=triggerdebug';
                }
                global $oPMScript;
                if (isset($oPMScript) && isset($_SESSION['APPLICATION'])) {
                    $oPMScript->aFields['__ERROR__'] = $aAux[0];
                    $oCase->updateCase($_SESSION['APPLICATION'], array('APP_DATA' => $oPMScript->aFields));
                }
                G::header('Location: ' . $aNextStep['PAGE']);
                die;
            }
            $_SESSION['_NO_EXECUTE_TRIGGERS_'] = 1;
            global $oPMScript;
            if (isset($oPMScript) && isset($_SESSION['APPLICATION'])) {
                $oPMScript->aFields['__ERROR__'] = $aAux[0];
                $oCase->updateCase($_SESSION['APPLICATION'], array('APP_DATA' => $oPMScript->aFields));
            }
            G::header('Location: ' . $_SERVER['REQUEST_URI']);
            die;
        } else {
            $aNextStep = $oCase->getNextStep($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION']);
            if ($_SESSION['TRIGGER_DEBUG']['ISSET']) {
                $_SESSION['TRIGGER_DEBUG']['TIME'] = 'AFTER';
                $_SESSION['TRIGGER_DEBUG']['BREAKPAGE'] = $aNextStep['PAGE'];
                $aNextStep['PAGE'] = $aNextStep['PAGE'] . '&breakpoint=triggerdebug';
            }
            if (strpos($aNextStep['PAGE'], 'TYPE=ASSIGN_TASK&UID=-1') !== false) {
                G::SendMessageText('Fatal error in trigger', 'error');
            }
            global $oPMScript;
            if (isset($oPMScript) && isset($_SESSION['APPLICATION'])) {
                $oPMScript->aFields['__ERROR__'] = $aAux[0];
                $oCase->updateCase($_SESSION['APPLICATION'], array('APP_DATA' => $oPMScript->aFields));
            }
            G::header('Location: ' . $aNextStep['PAGE']);
            die;
        }
    }
    return $buffer;
}
开发者ID:ralpheav,项目名称:processmaker,代码行数:55,代码来源:class.pmScript.php


示例16: Configurations

    global $G_PUBLISH;
    $oHeadPublisher =& headPublisher::getSingleton();
    G::loadClass('configuration');
    $conf = new Configurations();
    $oHeadPublisher->addExtJsScript('cases/casesGenerateDocumentPage', true);
    //adding a javascript file .js
    $oHeadPublisher->addContent('cases/casesGenerateDocumentPage');
    //adding a html file  .html.
    $oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
    G::RenderPage('publish', 'extJs');
}
if ($actionAjax == 'generateDocumentGrid_Ajax') {
    G::LoadClass('case');
    G::LoadClass("BasePeer");
    global $G_PUBLISH;
    $oCase = new Cases();
    $aProcesses = array();
    $G_PUBLISH = new Publisher();
    $c = $oCase->getAllGeneratedDocumentsCriteria($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['TASK'], $_SESSION['USER_LOGGED']);
    if ($c->getDbName() == 'dbarray') {
        $rs = ArrayBasePeer::doSelectRs($c);
    } else {
        $rs = GulliverBasePeer::doSelectRs($c);
    }
    $rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
    $rs->next();
    $totalCount = 0;
    for ($j = 0; $j < $rs->getRecordCount(); $j++) {
        $result = $rs->getRow();
        $result["FILEDOCEXIST"] = casesShowOuputDocumentExist($result["FILEDOC"]);
        $result["FILEPDFEXIST"] = casesShowOuputDocumentExist($result["FILEPDF"]);
开发者ID:ralpheav,项目名称:processmaker,代码行数:31,代码来源:casesGenerateDocumentPage_Ajax.php


示例17: TemplatePower

/* GET , POST & $_SESSION Vars */
//$_SESSION['STEP_POSITION'] = (int)$_GET['POSITION'];


/* Menues */
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'cases';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = 'CASES_TO_REVISE';

/* Prepare page before to show */
$oTemplatePower = new TemplatePower( PATH_TPL . 'cases/cases_Step.html' );
$oTemplatePower->prepare();
$G_PUBLISH = new Publisher();
$oCase = new Cases();
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );

$oHeadPublisher = & headPublisher::getSingleton();
$oHeadPublisher->addScriptCode( "
if (typeof parent != 'undefined') {
  if (parent.showCaseNavigatorPanel) {
    parent.showCaseNavigatorPanel('{$Fields['APP_STATUS']}');
  }
}" );
// DEPRECATED this script call is marked for removal since almost all the interface is extJS based
$oHeadPublisher->addScriptCode( '
    var Cse = {};
    Cse.panels = {};
    var leimnud = new maborak();
    leimnud.make();
开发者ID:rrsc,项目名称:processmaker,代码行数:30,代码来源:cases_StepToRevise.php


示例18: explode

            break;
    }
    G::SendMessageText($message, "ERROR");
    $backUrlObj = explode("sys" . SYS_SYS, $_SERVER['HTTP_REFERER']);
    G::header("location: " . "/sys" . SYS_SYS . $backUrlObj[1]);
    die;
}
G::LoadClass("case");
$inputDocumentUid = $_GET["UID"];
//$_POST["form"]["DOC_UID"]
$appDocUid = $_POST["form"]["APP_DOC_UID"];
$docVersion = intval($_POST["form"]["docVersion"]);
$appDocType = $_POST["form"]["APP_DOC_TYPE"];
$appDocComment = isset($_POST["form"]["APP_DOC_COMMENT"]) ? $_POST["form"]["APP_DOC_COMMENT"] : "";
$actionType = $_POST["form"]["actionType"];
$case = new Cases();
$case->thisIsTheCurrentUser($_SESSION["APPLICATION"], $_SESSION["INDEX"], $_SESSION["USER_LOGGED"], "REDIRECT", "casesListExtJs");
//Load the fields
$arrayField = $case->loadCase($_SESSION["APPLICATION"]);
$arrayField["APP_DATA"] = array_merge($arrayField["APP_DATA"], G::getSystemConstants());
//Triggers
$arrayTrigger = $case->loadTriggers($_SESSION["TASK"], "INPUT_DOCUMENT", $inputDocumentUid, "AFTER");
//Trigger debug routines
//Cleaning debug variables
$_SESSION["TRIGGER_DEBUG"]["ERRORS"] = array();
$_SESSION["TRIGGER_DEBUG"]["DATA"] = array();
$_SESSION["TRIGGER_DEBUG"]["TRIGGERS_NAMES"] = array();
$_SESSION["TRIGGER_DEBUG"]["TRIGGERS_VALUES"] = array();
$_SESSION["TRIGGER_DEBUG"]["NUM_TRIGGERS"] = count($arrayTrigger);
$_SESSION["TRIGGER_DEBUG"]["TIME"] = "AFTER";
if ($_SESSION["TRIGGER_DEBUG"]["NUM_TRIGGERS"] > 0) {
开发者ID:bqevin,项目名称:processmaker,代码行数:31,代码来源:cases_SaveDocument.php


示例19: addCasesInputDocument

 /**
  * Get data of Cases InputDocument
  *
  * @param string $applicationUid
  * @param string $taskUid
  * @param string $appDocComment
  * @param string $inputDocumentUid
  * @param string $userUid
  *
  * return array Return an array with data of an InputDocument
  */
 public function addCasesInputDocument($applicationUid, $taskUid, $appDocComment, $inputDocumentUid, $userUid)
 {
     try {
         if ((isset( $_FILES['form'] )) && ($_FILES['form']['error'] != 0)) {
             $code = $_FILES['form']['error'];
             switch ($code) {
                 case UPLOAD_ERR_INI_SIZE:
                     $message = \G::LoadTranslation( 'ID_UPLOAD_ERR_INI_SIZE' );
                     break;
                 case UPLOAD_ERR_FORM_SIZE:
                     $message = \G::LoadTranslation( 'ID_UPLOAD_ERR_FORM_SIZE' );
                     break;
                 case UPLOAD_ERR_PARTIAL:
                     $message = \G::LoadTranslation( 'ID_UPLOAD_ERR_PARTIAL' );
                     break;
                 case UPLOAD_ERR_NO_FILE:
                     $message = \G::LoadTranslation( 'ID_UPLOAD_ERR_NO_FILE' );
                     break;
                 case UPLOAD_ERR_NO_TMP_DIR:
                     $message = \G::LoadTranslation( 'ID_UPLOAD_ERR_NO_TMP_DIR' );
                     break;
                 case UPLOAD_ERR_CANT_WRITE:
                     $message = \G::LoadTranslation( 'ID_UPLOAD_ERR_CANT_WRITE' );
                     break;
                 case UPLOAD_ERR_EXTENSION:
                     $message = \G::LoadTranslation( 'ID_UPLOAD_ERR_EXTENSION' );
                     break;
                 default:
                     $message = \G::LoadTranslation( 'ID_UPLOAD_ERR_UNKNOWN' );
                     break;
             }
             \G::SendMessageText( $message, "ERROR" );
             $backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] );
             \G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] );
             die();
         }
         \G::LoadClass("case");
         $appDocUid = \G::generateUniqueID();
         $docVersion = '';
         $appDocType = 'INPUT';
         $case = new \Cases();
         $delIndex = \AppDelegation::getCurrentIndex($applicationUid);
         $case->thisIsTheCurrentUser($applicationUid, $delIndex, $userUid, "REDIRECT", "casesListExtJs");
         //Load the fields
         $arrayField = $case->loadCase($applicationUid);
         $arrayField["APP_DATA"] = array_merge($arrayField["APP_DATA"], \G::getSystemConstants());
         //Triggers
         $arrayTrigger = $case->loadTriggers($taskUid, "INPUT_DOCUMENT", $inputDocumentUid, "AFTER");
         //Add Input Document
         if (empty($_FILES)) {
             throw new \Exception(\G::LoadTranslation("ID_CASES_INPUT_FILENAME_DOES_NOT_EXIST"));
         }
         if (!$_FILES["form"]["error"]) {
             $_FILES["form"]["error"] = 0;
         }
         if (isset($_FILES) && isset($_FILES["form"]) && count($_FILES["form"]) > 0) {
             $appDocUid = $case->addInputDocument($inputDocumentUid,
                 $appDocUid,
                 $docVersion,
                 $appDocType,
                 $appDocComment,
                 '',
                 $applicationUid,
                 $delIndex,
                 $taskUid,
                 $userUid,
                 "xmlform",
                 $_FILES["form"]["name"],
                 $_FILES["form"]["error"],
                 $_FILES["form"]["tmp_name"]);
         }
         //Trigger - Execute after - Start
         $arrayField["APP_DATA"] = $case->executeTriggers ($taskUid,
             "INPUT_DOCUMENT",
             $inputDocumentUid,
             "AFTER",
             $arrayField["APP_DATA"]);
         //Trigger - Execute after - End
         //Save data
         $arrayData = array();
         $arrayData["APP_NUMBER"] = $arrayField["APP_NUMBER"];
         //$arrayData["APP_PROC_STATUS"] = $arrayField["APP_PROC_STATUS"];
         $arrayData["APP_DATA"]  = $arrayField["APP_DATA"];
         $arrayData["DEL_INDEX"] = $delIndex;
         $arrayData["TAS_UID"]   = $taskUid;
         $case->updateCase($applicationUid, $arrayData);
         return($this->getCasesInputDocument($applicationUid, $userUid, $appDocUid));
     } catch (\Exception $e) {
         throw $e;
//.........这里部分代码省略.........
开发者ID:rrsc,项目名称:processmaker,代码行数:101,代码来源:InputDocument.php


示例20: pmDynaform

            $pmDynaForm = new pmDynaform($Fields);
            if ($pmDynaForm->isResponsive()) {
                $pmDynaForm->printTracker();
            }
        } else {
            $G_PUBLISH = new Publisher();
            $G_PUBLISH->AddContent("dynaform", "xmlform", $_SESSION["PROCESS"] . "/" . $_GET["CTO_UID_OBJ"], "", $Fields["APP_DATA"], "", "", "view");
            G::RenderPage("publish");
        }
        break;
    case 'INPUT_DOCUMENT':
        G::LoadClass('case');
        $oCase = new Cases();
        $c = $oCase->getAllUploadedDocumentsCriteriaTracker($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_GET['CTO_UID_OBJ']);
        $oHeadPublisher =& headPublisher::getSingleton();
        $oHeadPublisher->addScriptFile('/jscore/tracker/tracker.js');
        $G_PUBLISH = new Publisher();
        $G_PUBLISH->AddContent('propeltable', 'paged-table', 'tracker/tracker_Inputdocs', $c);
        G::RenderPage('publish');
        break;
    case 'OUTPUT_DOCUMENT':
        G::LoadClass('case');
        $oCase = new Cases();
        $c = $oCase->getAllGeneratedDocumentsCriteriaTracker($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_GET['CTO_UID_OBJ']);
        $oHeadP 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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