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


PHP Cases::canStartCase方法代码示例

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


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

示例1: getProcessList

function getProcessList()
{
    G::LoadClass('case');
    G::LoadClass('process');
    G::LoadClass('calendar');
    $calendar = new Calendar();
    $oProcess = new Process();
    $oCase = new Cases();
    //Get ProcessStatistics Info
    $start = 0;
    $limit = '';
    $proData = $oProcess->getAllProcesses($start, $limit, null, null, false, true);
    $bCanStart = $oCase->canStartCase($_SESSION['USER_LOGGED']);
    if ($bCanStart) {
        $processListInitial = $oCase->getStartCasesPerType($_SESSION['USER_LOGGED'], 'category');
        $processList = array();
        foreach ($processListInitial as $key => $procInfo) {
            if (isset($procInfo['pro_uid'])) {
                if (trim($procInfo['cat']) == "") {
                    $procInfo['cat'] = "_OTHER_";
                }
                $processList[$procInfo['catname']][$procInfo['value']] = $procInfo;
            }
        }
        ksort($processList);
        foreach ($processList as $key => $processInfo) {
            ksort($processList[$key]);
        }
        if (!isset($_REQUEST['node'])) {
            $node = 'root';
        } else {
            $node = $_REQUEST['node'];
        }
        foreach ($proData as $key => $proInfo) {
            $proData[$proInfo['PRO_UID']] = $proInfo;
        }
        $processListTree = array();
        if (1) {
            foreach ($processList as $key => $processInfo) {
                $tempTree['text'] = $key;
                $tempTree['id'] = G::encryptOld($key);
                $tempTree['cls'] = 'folder';
                $tempTree['draggable'] = true;
                $tempTree['optionType'] = "category";
                //$tempTree['allowDrop']=false;
                $tempTree['singleClickExpand'] = true;
                if ($key != "No Category") {
                    $tempTree['expanded'] = true;
                } else {
                    //$tempTree ['expanded'] = false;
                    $tempTree['expanded'] = true;
                }
                $tempTreeChildren = array();
                foreach ($processList[$key] as $keyChild => $processInfoChild) {
                    //print_r($processInfo);
                    $tempTreeChild['text'] = htmlentities($keyChild, ENT_QUOTES, 'UTF-8');
                    //ellipsis ( $keyChild, 50 );
                    //$tempTree['text']=$key;
                    $tempTreeChild['id'] = G::encryptOld($keyChild);
                    $tempTreeChild['draggable'] = true;
                    $tempTreeChild['leaf'] = true;
                    $tempTreeChild['icon'] = '/images/icon.trigger.png';
                    $tempTreeChild['allowChildren'] = false;
                    $tempTreeChild['optionType'] = "startProcess";
                    $tempTreeChild['pro_uid'] = $processInfoChild['pro_uid'];
                    $tempTreeChild['tas_uid'] = $processInfoChild['uid'];
                    $processInfoChild['myInbox'] = 0;
                    $processInfoChild['totalInbox'] = 0;
                    if (isset($proData[$processInfoChild['pro_uid']])) {
                        $tempTreeChild['otherAttributes'] = array_merge($processInfoChild, $proData[$processInfoChild['pro_uid']], $calendar->getCalendarFor($_SESSION['USER_LOGGED'], $processInfoChild['pro_uid'], $processInfoChild['uid']));
                        $tempTreeChild['otherAttributes']['PRO_TAS_TITLE'] = str_replace(")", "", str_replace("(", "", trim(str_replace($tempTreeChild['otherAttributes']['PRO_TITLE'], "", $tempTreeChild['otherAttributes']["value"]))));
                        $tempTreeChild['qtip'] = $tempTreeChild['otherAttributes']['PRO_DESCRIPTION'];
                        //$tempTree['cls']='file';
                        $tempTreeChildren[] = $tempTreeChild;
                    }
                }
                $tempTree['children'] = $tempTreeChildren;
                $processListTree[] = $tempTree;
            }
        } else {
            foreach ($processList[$node] as $key => $processInfo) {
                //print_r($processInfo);
                $tempTree['text'] = $key;
                //ellipsis ( $key, 50 );
                //$tempTree['text']=$key;
                $tempTree['id'] = $key;
                $tempTree['draggable'] = true;
                $tempTree['leaf'] = true;
                $tempTree['icon'] = '/images/icon.trigger.png';
                $tempTree['allowChildren'] = false;
                $tempTree['optionType'] = "startProcess";
                $tempTree['pro_uid'] = $processInfo['pro_uid'];
                $tempTree['tas_uid'] = $processInfo['uid'];
                $processInfo['myInbox'] = 0;
                $processInfo['totalInbox'] = 0;
                $tempTree['otherAttributes'] = array_merge($processInfo, $proData[$processInfo['pro_uid']], $calendar->getCalendarFor($processInfo['uid'], $processInfo['uid'], $processInfo['uid']));
                $tempTree['otherAttributes']['PRO_TAS_TITLE'] = str_replace(")", "", str_replace("(", "", trim(str_replace($tempTree['otherAttributes']['PRO_TITLE'], "", $tempTree['otherAttributes']["value"]))));
                $tempTree['qtip'] = $tempTree['otherAttributes']['PRO_DESCRIPTION'];
                //$tempTree['cls']='file';
                $processListTree[] = $tempTree;
//.........这里部分代码省略.........
开发者ID:emildev35,项目名称:processmaker,代码行数:101,代码来源:casesStartPage_Ajax.php

示例2: trim

$sWS_PASS = trim($_REQUEST['PASSWORD']);
if (G::is_https()) {
    $http = 'https://';
} else {
    $http = 'http://';
}
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
@($client = new SoapClient($endpoint));
$user = $sWS_USER;
$pass = $sWS_PASS;
$params = array('userid' => $user, 'password' => $pass);
$result = $client->__SoapCall('login', array($params));
if ($result->status_code == 0) {
    if (!class_exists('Users')) {
        require "classes/model/UsersPeer.php";
    }
    $oCriteria = new Criteria('workflow');
    $oCriteria->addSelectColumn('USR_UID');
    $oCriteria->add(UsersPeer::USR_USERNAME, $sWS_USER);
    $resultSet = UsersPeer::doSelectRS($oCriteria);
    $resultSet->next();
    $user_id = $resultSet->getRow();
    $result->message = $user_id[0];
    G::LoadClass('case');
    $caseInstance = new Cases();
    if (!$caseInstance->canStartCase($result->message, $_REQUEST['PRO_UID'])) {
        $result->status_code = -1000;
        $result->message = G::LoadTranslation('ID_USER_CASES_NOT_START');
    }
}
die(G::json_encode($result));
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:cases_SchedulerValidateUser.php

示例3: index

 /**
  * getting default list
  *
  * @param string $httpData (opional)
  */
 public function index($httpData)
 {
     if ($this->userUxType == 'SINGLE') {
         $this->indexSingle($httpData);
         return;
     }
     require_once 'classes/model/UsersProperties.php';
     G::LoadClass('process');
     G::LoadClass('case');
     $userProperty = new UsersProperties();
     $process = new Process();
     $case = new Cases();
     G::loadClass('system');
     $sysConf = System::getSystemConfiguration(PATH_CONFIG . 'env.ini');
     //Get ProcessStatistics Info
     $start = 0;
     $limit = '';
     $proData = $process->getAllProcesses($start, $limit);
     $processList = $case->getStartCasesPerType($_SESSION['USER_LOGGED'], 'category');
     $switchLink = $userProperty->getUserLocation($_SESSION['USER_LOGGED']);
     if (!isset($_COOKIE['workspaceSkin'])) {
         if (substr($sysConf['default_skin'], 0, 2) == 'ux') {
             $_SESSION['_defaultUserLocation'] = $switchLink;
             $switchLink = '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . $sysConf['default_skin'] . '/main';
         }
     }
     unset($processList[0]);
     //Get simplified options
     global $G_TMP_MENU;
     $mnu = new Menu();
     $mnu->load('simplified');
     $arrayMnuOption = array();
     $mnuNewCase = array();
     if (!empty($mnu->Options)) {
         foreach ($mnu->Options as $index => $value) {
             $option = array('id' => $mnu->Id[$index], 'url' => $mnu->Options[$index], 'label' => $mnu->Labels[$index], 'icon' => $mnu->Icons[$index], 'class' => $mnu->ElementClass[$index]);
             if ($mnu->Id[$index] != 'S_NEW_CASE') {
                 $arrayMnuOption[] = $option;
             } else {
                 $mnuNewCase = $option;
             }
         }
     }
     $this->setView($this->userUxBaseTemplate . PATH_SEP . 'index');
     $this->setVar('usrUid', $this->userID);
     $this->setVar('userName', $this->userName);
     $this->setVar('processList', $processList);
     $this->setVar('canStartCase', $case->canStartCase($_SESSION['USER_LOGGED']));
     $this->setVar('userUxType', $this->userUxType);
     $this->setVar('clientBrowser', $this->clientBrowser['name']);
     $this->setVar('switchLink', $switchLink);
     $this->setVar('arrayMnuOption', $arrayMnuOption);
     $this->setVar('mnuNewCase', $mnuNewCase);
     $this->render();
 }
开发者ID:ralpheav,项目名称:processmaker,代码行数:60,代码来源:home.php

示例4: array

        G::header('location: ../login/login');
        die;
        break;
}
/* Includes */
G::LoadClass('case');
/* GET , POST & $_SESSION Vars */
/* Menues */
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'cases';
$G_ID_MENU_SELECTED = 'CASES';
$G_ID_SUB_MENU_SELECTED = 'CASES_DRAFT';
/* Prepare page before to show */
$aFields = array();
$oCase = new Cases();
$bCanStart = $oCase->canStartCase($_SESSION['USER_LOGGED']);
if ($bCanStart) {
    $aFields['LANG'] = SYS_LANG;
    $aFields['USER'] = $_SESSION['USER_LOGGED'];
    $sXmlForm = 'cases/cases_New.xml';
    //$_DBArray['NewCase'] = $oCase->getStartCases( $_SESSION['USER_LOGGED'] );
    $_DBArray['NewCase'] = $oCase->getStartCasesPerType($_SESSION['USER_LOGGED'], $_GET['change']);
} else {
    $sXmlForm = 'cases/cases_CannotInitiateCase.xml';
}
if (isset($_SESSION['G_MESSAGE']) && strlen($_SESSION['G_MESSAGE']) > 0) {
    $aMessage = array();
    $aMessage['MESSAGE'] = $_SESSION['G_MESSAGE'];
    //$_SESSION['G_MESSAGE_TYPE'];
    unset($_SESSION['G_MESSAGE']);
    unset($_SESSION['G_MESSAGE_TYPE']);
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:cases_New.php


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