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


PHP Users::load方法代码示例

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


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

示例1: import

 function import($f3)
 {
     // Authenticate User so we have LDAP Access
     $user = new Users($f3);
     $user->authenticate($f3);
     // Lookup Tool
     if (!($this->D = \R::findOne('tools', 'name=?', array($f3->get('POST.tool'))))) {
         throw new \Exception('Invalid Tool Name');
     }
     $messages = array();
     $messages[] = 'Training Record Created';
     $messages[] = 'Tool: ' . $this->D->name;
     $messages[] = 'Level: ' . $f3->get('POST.level');
     // Create Training Records
     $usernames = explode("\n", strtolower(str_replace(chr(13), '', str_replace(' ', '', $f3->get('POST.usernames')))));
     foreach ($usernames as $username) {
         if (strlen($username)) {
             try {
                 $u = $user->load($f3, $username);
                 $record = $this->create_record($f3, $u, NULL, NULL);
                 $messages[] = $f3->get('message');
             } catch (\Exception $e) {
                 $messages[] = $e->getMessage();
             }
         }
     }
     $f3->set('messages', $messages);
     show_page($f3, 'messages');
 }
开发者ID:neyre,项目名称:tools.olin.edu,代码行数:29,代码来源:trainings.php

示例2: create_user

 public function create_user()
 {
     // If there are no users then let's create one.
     $db = Database::get_instance();
     $db->query('SELECT * FROM `users` LIMIT 1');
     if ($db->has_rows() && !Auth::get_instance()->logged_in()) {
         Flash::set('<p class="flash validation">Sorry but to create new users, you must be logged in.</p>');
         Core_Helpers::redirect(WEB_ROOT . 'login/');
     }
     $validator = Error::instance();
     if (isset($_POST['email'])) {
         $validator->email($_POST['email'], 'email');
         $validator->blank($_POST['username'], 'username');
         $validator->blank($_POST['password'], 'password');
         $validator->passwords($_POST['password'], $_POST['confirm_password'], 'confirm_password');
         $user = new Users();
         if ($user->select(array('username' => $_POST['username']))) {
             $validator->add('username', 'The username <strong>' . htmlspecialchars($_POST['username']) . '</strong> is already taken.');
         }
         if ($validator->ok()) {
             $user = new Users();
             $user->load($_POST);
             $user->level = 'admin';
             $user->insert();
             Flash::set('<p class="flash success">User created successfully.</p>');
             Core_Helpers::redirect(WEB_ROOT . 'login/');
         }
     }
     $this->data['error'] = $validator;
     $this->load_template('create_user');
 }
开发者ID:robv,项目名称:konnect,代码行数:31,代码来源:controller.main.php

示例3: validateFolderPMDrive

 /**
  * Validate if exist folder PMDrive
  *
  * @param $userUid id user
  */
 private function validateFolderPMDrive($usrUid)
 {
     if ($this->folderIdPMDrive != '') {
         return;
     }
     $user = new Users();
     $dataUser = $user->load($usrUid);
     if (!empty($dataUser['USR_EMAIL'])) {
         $this->setDriveUser($dataUser['USR_EMAIL']);
     }
     $this->folderIdPMDrive = empty($dataUser['USR_PMDRIVE_FOLDER_UID']) ? '' : $dataUser['USR_PMDRIVE_FOLDER_UID'];
     $conf = $this->getConfigGmail();
     $this->folderNamePMDrive = empty($conf->aConfig['folderNamePMDrive']) ? 'PMDrive (' . SYS_SYS . ')' : $conf->aConfig['folderNamePMDrive'];
     if ($this->folderIdPMDrive == '') {
         $folderid = $this->createFolder($this->folderNamePMDrive);
         $this->folderIdPMDrive = $folderid->id;
         $dataUser['USR_PMDRIVE_FOLDER_UID'] = $folderid->id;
         $user->update($dataUser);
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:25,代码来源:class.pmDrive.php

示例4: Department

            $aTypes['draft'] = 'CASES_DRAFT';
            $aTypes['cancelled'] = 'CASES_CANCELLED';
            $aTypes['sent'] = 'CASES_SENT';
            $aTypes['paused'] = 'CASES_PAUSED';
            $aTypes['completed'] = 'CASES_COMPLETED';
            $aTypes['selfservice'] = 'CASES_SELFSERVICE';
            $aCount = $oAppCache->getAllCounters(array_keys($aTypes), $_REQUEST['USR_UID']);
            $dep = new Department();
            if ($dep->existsDepartment($data['DEP_UID'])) {
                $dep->Load($data['DEP_UID']);
                $dep_name = $dep->getDepTitle();
            } else {
                $dep_name = '';
            }
            if ($data['USR_REPLACED_BY'] != '') {
                $user = new Users();
                $u = $user->load($data['USR_REPLACED_BY']);
                $c = new Configurations();
                $replaced_by = $c->usersNameFormat($u['USR_USERNAME'], $u['USR_FIRSTNAME'], $u['USR_LASTNAME']);
            } else {
                $replaced_by = '';
            }
            $misc = array();
            $misc['DEP_TITLE'] = $dep_name;
            $misc['REPLACED_NAME'] = $replaced_by;
            echo '{success: true, userdata: ' . G::json_encode($data) . ', cases: ' . G::json_encode($aCount) . ', misc: ' . G::json_encode($misc) . '}';
            break;
    }
} catch (Exception $oException) {
    die($oException->getMessage());
}
开发者ID:ralpheav,项目名称:processmaker,代码行数:31,代码来源:users_Ajax.php

示例5: isset

     $aFields['PREF_DEFAULT_MENUSELECTED'] = isset($oConf->aConfig['DEFAULT_MENU']) ? $oConf->aConfig['DEFAULT_MENU'] : '';
     $aFields['PREF_DEFAULT_CASES_MENUSELECTED'] = isset($oConf->aConfig['DEFAULT_CASES_MENU']) ? $oConf->aConfig['DEFAULT_CASES_MENU'] : '';
 } else {
     switch ($RBAC->aUserInfo['PROCESSMAKER']['ROLE']['ROL_CODE']) {
         case 'PROCESSMAKER_ADMIN':
             $aFields['PREF_DEFAULT_MENUSELECTED'] = 'PM_SETUP';
             break;
         case 'PROCESSMAKER_OPERATOR':
             $aFields['PREF_DEFAULT_MENUSELECTED'] = 'PM_CASES';
             break;
     }
     $aFields['PREF_DEFAULT_LANG'] = SYS_LANG;
 }
 if ($aFields['USR_REPLACED_BY'] != '') {
     $user = new Users();
     $u = $user->load($aFields['USR_REPLACED_BY']);
     if ($u['USR_STATUS'] == 'CLOSED') {
         $replaced_by = '';
         $aFields['USR_REPLACED_BY'] = '';
     } else {
         $c = new Configurations();
         $replaced_by = $c->usersNameFormat($u['USR_USERNAME'], $u['USR_FIRSTNAME'], $u['USR_LASTNAME']);
     }
 } else {
     $replaced_by = '';
 }
 $aFields['REPLACED_NAME'] = $replaced_by;
 $menuSelected = '';
 if ($aFields['PREF_DEFAULT_MENUSELECTED'] != '') {
     foreach ($RBAC->aUserInfo['PROCESSMAKER']['PERMISSIONS'] as $permission) {
         if ($aFields['PREF_DEFAULT_MENUSELECTED'] == $permission['PER_CODE']) {
开发者ID:ralpheav,项目名称:processmaker,代码行数:31,代码来源:usersAjax.php

示例6: verifyIsCaseChild

    function verifyIsCaseChild ($sApplicationUID, $delIndex = 0)

    {

        //Obtain the related row in the table SUB_APPLICATION

        $oCriteria = new Criteria( 'workflow' );

        $oCriteria->add( SubApplicationPeer::APP_UID, $sApplicationUID );

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

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

        $oDataset->next();

        $aSA = $oDataset->getRow();

        if ($aSA) {

            //Obtain the related row in the table SUB_PROCESS

            $oCase = new Cases();

            $aParentCase = $oCase->loadCase( $aSA['APP_PARENT'], $aSA['DEL_INDEX_PARENT'] );

            $oCriteria = new Criteria( 'workflow' );

            $oCriteria->add( SubProcessPeer::PRO_PARENT, $aParentCase['PRO_UID'] );

            $oCriteria->add( SubProcessPeer::TAS_PARENT, $aParentCase['TAS_UID'] );

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

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

            $oDataset->next();

            $aSP = $oDataset->getRow();

            if ($aSP['SP_SYNCHRONOUS'] == 1) {

                $appFields = $oCase->loadCase($sApplicationUID, $delIndex);

                //Copy case variables to parent case

                $aFields = unserialize( $aSP['SP_VARIABLES_IN'] );

                $aNewFields = array ();

                foreach ($aFields as $sOriginField => $sTargetField) {

                    $sOriginField = str_replace( '@', '', $sOriginField );

                    $sOriginField = str_replace( '#', '', $sOriginField );

                    $sOriginField = str_replace( '%', '', $sOriginField );

                    $sOriginField = str_replace( '?', '', $sOriginField );

                    $sOriginField = str_replace( '$', '', $sOriginField );

                    $sOriginField = str_replace( '=', '', $sOriginField );

                    $sTargetField = str_replace( '@', '', $sTargetField );

                    $sTargetField = str_replace( '#', '', $sTargetField );

                    $sTargetField = str_replace( '%', '', $sTargetField );

                    $sTargetField = str_replace( '?', '', $sTargetField );

                    $sTargetField = str_replace( '$', '', $sTargetField );

                    $sTargetField = str_replace( '=', '', $sTargetField );

                    $aNewFields[$sTargetField] = isset( $appFields['APP_DATA'][$sOriginField] ) ? $appFields['APP_DATA'][$sOriginField] : '';

                    if(isset($aParentCase['APP_DATA'][$sTargetField.'_label'])){

                        $aNewFields[$sTargetField.'_label'] = isset( $appFields['APP_DATA'][$sOriginField.'_label'] ) ? $appFields['APP_DATA'][$sOriginField.'_label'] : '';

                    }

                }

                $aParentCase['APP_DATA'] = array_merge( $aParentCase['APP_DATA'], $aNewFields );

                $oCase->updateCase( $aSA['APP_PARENT'], $aParentCase );

                /*----------------------------------********---------------------------------*/



                //Update table SUB_APPLICATION

                $oSubApplication = new SubApplication();

                $oSubApplication->update( array ('APP_UID' => $sApplicationUID,'APP_PARENT' => $aSA['APP_PARENT'],'DEL_INDEX_PARENT' => $aSA['DEL_INDEX_PARENT'],'DEL_THREAD_PARENT' => $aSA['DEL_THREAD_PARENT'],'SA_STATUS' => 'FINISHED','SA_VALUES_IN' => serialize( $aNewFields ),'SA_FINISH_DATE' => date( 'Y-m-d H:i:s' )

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

示例7: derivateCase

    /**

     * derivate Case moves the case to the next task in the process according to the routing rules

     *

     * @param string $userId

     * @param string $caseId

     * @param string $delIndex

     * @param array $tasks

     * @param bool   $bExecuteTriggersBeforeAssignment

     * @return $result will return an object

     */

    public function derivateCase ($userId, $caseId, $delIndex, $bExecuteTriggersBeforeAssignment = false, $tasks = array())

    {

        $g = new G();



        try {

            $g->sessionVarSave();



            $_SESSION["APPLICATION"] = $caseId;

            $_SESSION["INDEX"] = $delIndex;

            $_SESSION["USER_LOGGED"] = $userId;



            $sStatus = 'TO_DO';



            $varResponse = '';

            $varTriggers = "\n";



            if ($delIndex == '') {

                $oCriteria = new Criteria( 'workflow' );

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

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

                $oCriteria->add( AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL );



                if (AppDelegationPeer::doCount( $oCriteria ) > 1) {

                    $result = new wsResponse( 20, G::loadTranslation( 'ID_SPECIFY_DELEGATION_INDEX' ) );

                    return $result;

                }



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

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

                $oDataset->next();

                $aRow = $oDataset->getRow();

                $delIndex = $aRow['DEL_INDEX'];

            }



            $oAppDel = new AppDelegation();

            $appdel = $oAppDel->Load( $caseId, $delIndex );



            if ($userId != $appdel['USR_UID']) {

                $result = new wsResponse( 17, G::loadTranslation( 'ID_CASE_ASSIGNED_ANOTHER_USER' ) );



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

示例8: remove

 /**
  * Remove the application document registry
  *
  * @param string $sGrpUid
  * @param string $sUserUid
  * @return string
  */
 public function remove($sGrpUid, $sUserUid)
 {
     $oConnection = Propel::getConnection(GroupUserPeer::DATABASE_NAME);
     try {
         $oGroupUser = GroupUserPeer::retrieveByPK($sGrpUid, $sUserUid);
         if (!is_null($oGroupUser)) {
             $oConnection->begin();
             $iResult = $oGroupUser->delete();
             $oConnection->commit();
             $oGrpwf = new Groupwf();
             $grpName = $oGrpwf->loadByGroupUid($sGrpUid);
             $oUsr = new Users();
             $usrName = $oUsr->load($sUserUid);
             G::auditLog("AssignUserToGroup", "Remove user: " . $usrName['USR_USERNAME'] . " (" . $sUserUid . ") from group " . $grpName['CON_VALUE'] . " (" . $sGrpUid . ") ");
             return $iResult;
         } else {
             throw new Exception('This row doesn\'t exist!');
         }
     } catch (Exception $oError) {
         $oConnection->rollback();
         throw $oError;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:30,代码来源:GroupUser.php

示例9: sendNotifications

    public function sendNotifications($sCurrentTask, $aTasks, $aFields, $sApplicationUID, $iDelegation, $sFrom = "")

    {

        try {

            $applicationData = $this->loadCase($sApplicationUID);

            $aFields["APP_NUMBER"] = $applicationData["APP_NUMBER"];



            if (!class_exists('System')) {

                G::LoadClass('system');

            }

            $aConfiguration = System::getEmailConfiguration();



            $msgError = "";

            if (!isset($aConfiguration['MESS_ENABLED']) || $aConfiguration['MESS_ENABLED'] != '1') {

                $msgError = "The default configuration wasn't defined";

                $aConfiguration['MESS_ENGINE'] = '';

            }



            //Send derivation notification - Start

            $oTask = new Task();

            $aTaskInfo = $oTask->load($sCurrentTask);



            if ($aTaskInfo['TAS_SEND_LAST_EMAIL'] != 'TRUE') {

                return false;

            }



            $sFrom = G::buildFrom($aConfiguration, $sFrom);



            if (isset($aTaskInfo['TAS_DEF_SUBJECT_MESSAGE']) && $aTaskInfo['TAS_DEF_SUBJECT_MESSAGE'] != '') {

                $sSubject = G::replaceDataField($aTaskInfo['TAS_DEF_SUBJECT_MESSAGE'], $aFields);

            } else {

                $sSubject = G::LoadTranslation('ID_MESSAGE_SUBJECT_DERIVATION');

            }



            //erik: new behaviour for messages

            G::loadClass('configuration');

            $oConf = new Configurations;

            $oConf->loadConfig($x, 'TAS_EXTRA_PROPERTIES', $aTaskInfo['TAS_UID'], '', '');

            $conf = $oConf->aConfig;



            $pathEmail = PATH_DATA_SITE . "mailTemplates" . PATH_SEP . $aTaskInfo["PRO_UID"] . PATH_SEP;

            $swtplDefault = 0;

            $sBody = null;



            if (isset($conf["TAS_DEF_MESSAGE_TYPE"]) &&

                    isset($conf["TAS_DEF_MESSAGE_TEMPLATE"]) &&

                    $conf["TAS_DEF_MESSAGE_TYPE"] == "template" &&

                    $conf["TAS_DEF_MESSAGE_TEMPLATE"] != ""

            ) {

                if ($conf["TAS_DEF_MESSAGE_TEMPLATE"] == "alert_message.html") {

                    $swtplDefault = 1;

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

示例10: 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 ($swOutDocExists == 0) {
                        $swpdf = 0;
                        $swdoc = 0;

                        $info = pathinfo($oAppDocument->getAppDocFilename());

                        $version = (!empty($docVersion))? "_" . $docVersion : "_1";
                        $outDocPath = PATH_DOCUMENT . G::getPathFromUID($row1["APP_UID"]) . PATH_SEP . "outdocs" . PATH_SEP;

                        if (file_exists($outDocPath . $appDocUid . $version . ".pdf") ||
                            file_exists($outDocPath . $info["basename"] . $version . ".pdf") ||
                            file_exists($outDocPath . $info["basename"] . ".pdf")
                        ) {
                            $swpdf = 1;
                        }

                        if (file_exists($outDocPath . $appDocUid . $version . ".doc") ||
                            file_exists($outDocPath . $info["basename"] . $version . ".doc") ||
                            file_exists($outDocPath . $info["basename"] . ".doc")
                        ) {
                            $swdoc = 1;
                        }

                        if ($swpdf == 1 && $swdoc == 1) {
                            $row4["OUT_DOC_GENERATE"] = "BOTH";
                        } else {
                            if ($swpdf == 1) {
                                $row4["OUT_DOC_GENERATE"] = "PDF";
                            } else {
                                if ($swdoc == 1) {
                                    $row4["OUT_DOC_GENERATE"] = "DOC";
                                } else {
                                    $row4["OUT_DOC_GENERATE"] = "NOFILE";
                                }
                            }
                        }
                    }

                    $versioningEnabled = false; //$row4['OUT_DOC_VERSIONING']; //Only enabled for Input or Attached documents. Need to study the best way for Output docs.

                    switch ($row4['OUT_DOC_GENERATE']) {
                        case "PDF":
                            $downloadLink = "../cases/cases_ShowOutputDocument?a=" . $appDocUid . "&v=" . $docVersion . "&ext=pdf" . "&random=" . rand();
                            $downloadLink1 = "";
                            $downloadLabel = ".pdf";
                            $downloadLabel1 = "";
                            break;
                        case "DOC":
                            $downloadLink = "../cases/cases_ShowOutputDocument?a=" . $appDocUid . "&v=" . $docVersion . "&ext=doc" . "&random=" . rand();
                            $downloadLink1 = "";
                            $downloadLabel = ".doc";
                            $downloadLabel1 = "";
                            break;
                        case "BOTH":
                            $downloadLink = "../cases/cases_ShowOutputDocument?a=" . $appDocUid . "&v=" . $docVersion . "&ext=pdf" . "&random=" . rand();
                            $downloadLink1 = "../cases/cases_ShowOutputDocument?a=" . $appDocUid . "&v=" . $docVersion . "&ext=doc" . "&random=" . rand();
                            $downloadLabel = ".pdf";
                            $downloadLabel1 = ".doc";
                            break;
                        case "NOFILE":
                            $downloadLink = "../cases/cases_ShowDocument?a=" . $appDocUid . "&v=" . $docVersion;
//.........这里部分代码省略.........
开发者ID:rrsc,项目名称:processmaker,代码行数:101,代码来源:AppFolder.php

示例11: pathinfo

 $iDocVersion = $oAppDocument->getDocVersion();
 $sAppDocUid = $oAppDocument->getAppDocUid();
 $aInfo = pathinfo($oAppDocument->getAppDocFilename());
 $sExtension = isset($aInfo["extension"]) ? $aInfo["extension"] : "";
 $pathUID = G::getPathFromUID($_SESSION["APPLICATION"]);
 $sPathName = PATH_DOCUMENT . $pathUID . PATH_SEP;
 $sFileName = $sAppDocUid . "_" . $iDocVersion . "." . $sExtension;
 /*----------------------------------********---------------------------------*/
 $licensedFeatures =& PMLicensedFeatures::getSingleton();
 if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) {
     G::LoadClass("pmDrive");
     $pmDrive = new PMDrive();
     if ($pmDrive->getStatusService()) {
         $app = new Application();
         $user = new Users();
         $dataUser = $user->load($_SESSION['USER_LOGGED']);
         $pmDrive->setDriveUser($dataUser['USR_EMAIL']);
         $appData = $app->Load($_SESSION['APPLICATION']);
         if ($appData['APP_DRIVE_FOLDER_UID'] == null) {
             $process = new Process();
             $process->setProUid($appData['PRO_UID']);
             $result = $pmDrive->createFolder($process->getProTitle() . ' - ' . G::LoadTranslation("ID_CASE") . ' #' . $appData['APP_NUMBER'], $pmDrive->getFolderIdPMDrive($_SESSION['USER_LOGGED']));
             $appData['APP_DRIVE_FOLDER_UID'] = $result->id;
             $app->update($appData);
         }
         $result = $pmDrive->uploadFile('application/' . $sExtension, $arrayFileTmpName[$i], $arrayFileName[$i], $appData['APP_DRIVE_FOLDER_UID']);
         $oAppDocument->setDriveDownload('ATTACHED', $result->webContentLink);
         $fileIdDrive = $result->id;
         $aFields['DOC_VERSION'] = $iDocVersion;
         $aFields['APP_DOC_UID'] = $sAppDocUid;
         $oAppDocument->update($aFields);
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:cases_SaveData.php

示例12: array

} else {
    $_DBArray['eventomsgcc'] = array();
}
if (isset($parameters->BCC)) {
    $paramBCC[] = array('id' => 'char', 'name' => 'char');
    foreach ($parameters->BCC as $item) {
        $row = explode('|', $item);
        $row[1] = trim($row[1]);
        switch ($row[0]) {
            case 'usr':
                require_once 'classes/model/Users.php';
                $user = new Users();
                if ($row[1] == '-1') {
                    $value = '(Current Task User)';
                } else {
                    $rec = $user->load($row[1]);
                    $value = $rec['USR_FIRSTNAME'] . ' ' . $rec['USR_LASTNAME'];
                }
                break;
            case 'grp':
                G::LoadClass('groups');
                $group = new Groups();
                $rec = $group->load($row[1]);
                $value = strip_tags($rec->getGrpTitle());
                break;
            case 'ext':
                $value = htmlentities($row[1]);
                break;
            case 'dyn':
                $value = htmlentities('@#' . $row[1]);
                break;
开发者ID:bqevin,项目名称:processmaker,代码行数:31,代码来源:eventsEditAction.php

示例13: Cases

    $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') {
    ?>
    <link rel="stylesheet" type="text/css" href="/css/classic.css" />
开发者ID:bqevin,项目名称:processmaker,代码行数:31,代码来源:casesList_Ajax.php

示例14: OutputDocument

 require_once 'classes/model/OutputDocument.php';
 $oOutputDocument = new OutputDocument();
 $aOD = $oOutputDocument->load($aFields['DOC_UID']);
 $oCriteria = new Criteria('workflow');
 $oCriteria->add(AppDelegationPeer::APP_UID, $aFields['APP_UID']);
 $oCriteria->add(AppDelegationPeer::DEL_INDEX, $aFields['DEL_INDEX']);
 $oDataset = AppDelegationPeer::doSelectRS($oCriteria);
 $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
 $oDataset->next();
 $aRow = $oDataset->getRow();
 $oTask = new Task();
 $aTask = $oTask->load($aRow['TAS_UID']);
 $aFields['ORIGIN'] = $aTask['TAS_TITLE'];
 require_once 'classes/model/Users.php';
 $oUser = new Users();
 $aUser = $oUser->load($aFields['USR_UID']);
 $aFields['CREATOR'] = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
 $aFields['VIEW'] = G::LoadTranslation('ID_OPEN');
 $aFields['FILE1'] = 'tracker_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=doc&random=' . rand();
 $aFields['FILE2'] = 'tracker_ShowOutputDocument?a=' . $aFields['APP_DOC_UID'] . '&ext=pdf&random=' . rand();
 //If plugin and trigger are defined for listing
 if ($oPluginRegistry->existsTrigger(PM_CASE_DOCUMENT_LIST_ARR)) {
     $oPluginRegistry =& PMPluginRegistry::getSingleton();
     $filesPluginArray = $oPluginRegistry->executeTriggers(PM_CASE_DOCUMENT_LIST_ARR, $aFields['APP_UID']);
     //Now search for the file, if exists the change the download URL
     foreach ($filesPluginArray as $file) {
         if ($file->filename == $_POST['APP_DOC_UID']) {
             $aFields['FILE2'] = $file->downloadScript;
             // The PDF is the only one uploaded to KT
         }
     }
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:tracker_Ajax.php

示例15: sizeof

 $appFields = $oCase->loadCase($_SESSION['APPLICATION']);
 //refresh appFields, because in derivations should change some values
 $triggers = $oCase->loadTriggers($_SESSION['TASK'], 'ASSIGN_TASK', -2, 'AFTER');
 //load the triggers after derivation
 if (sizeof($triggers) > 0) {
     $appFields['APP_DATA'] = $oCase->ExecuteTriggers($_SESSION['TASK'], 'ASSIGN_TASK', -2, 'AFTER', $appFields['APP_DATA']);
     //Execute triggers after derivation
     $_SESSION['TRIGGER_DEBUG']['info'][1]['NUM_TRIGGERS'] = sizeof($triggers);
     $_SESSION['TRIGGER_DEBUG']['info'][1]['TIME'] = 'AFTER';
     $_SESSION['TRIGGER_DEBUG']['info'][1]['TRIGGERS_NAMES'] = $oCase->getTriggerNames($triggers);
     $_SESSION['TRIGGER_DEBUG']['info'][1]['TRIGGERS_VALUES'] = $triggers;
 }
 $oCase->updateCase($_SESSION['APPLICATION'], $appFields);
 // Send notifications - Start
 $oUser = new Users();
 $aUser = $oUser->load($_SESSION['USER_LOGGED']);
 if (trim($aUser['USR_EMAIL']) == '') {
     $aUser['USR_EMAIL'] = 'info@' . $_SERVER['HTTP_HOST'];
 }
 $sFromName = '"' . $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'] . '" <' . $aUser['USR_EMAIL'] . '>';
 try {
     $oCase->sendNotifications($_SESSION['TASK'], $_POST['form']['TASKS'], $appFields['APP_DATA'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $sFromName);
 } catch (Exception $e) {
     G::SendTemporalMessage(G::loadTranslation('ID_NOTIFICATION_ERROR') . ' - ' . $e->getMessage(), 'warning', 'string', null, '100%');
 }
 // Send notifications - End
 // Events - Start
 $oEvent = new Event();
 $oEvent->closeAppEvents($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['TASK']);
 $oCurrentAppDel = AppDelegationPeer::retrieveByPk($_SESSION['APPLICATION'], $_SESSION['INDEX'] + 1);
 $multipleDelegation = false;
开发者ID:ralpheav,项目名称:processmaker,代码行数:31,代码来源:cases_Derivate.php


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