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


PHP Configurations::getFormats方法代码示例

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


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

示例1: index

 /**
  * getting default list
  *
  * @param string $httpData->PRO_UID (opional)
  */
 public function index($httpData)
 {
     global $RBAC;
     $RBAC->requirePermissions('PM_SETUP_ADVANCE');
     G::LoadClass('configuration');
     $c = new Configurations();
     $configPage = $c->getConfiguration('additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED']);
     $Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
     $this->includeExtJS('pmTables/list', $this->debug);
     $this->includeExtJS('pmTables/export', $this->debug);
     $this->setView('pmTables/list');
     //assigning js variables
     $this->setJSVar('FORMATS', $c->getFormats());
     $this->setJSVar('CONFIG', $Config);
     $this->setJSVar('PRO_UID', isset($_GET['PRO_UID']) ? $_GET['PRO_UID'] : false);
     $this->setJSVar('_PLUGIN_SIMPLEREPORTS', $this->_getSimpleReportPluginDef());
     if (isset($_SESSION['_cache_pmtables'])) {
         unset($_SESSION['_cache_pmtables']);
     }
     if (isset($_SESSION['ADD_TAB_UID'])) {
         unset($_SESSION['ADD_TAB_UID']);
     }
     //render content
     G::RenderPage('publish', 'extJs');
 }
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:30,代码来源:pmTables.php

示例2: getSystemDate

    public function getSystemDate($dateTime, $type='dateFormat')
    {
        $oConf = new Configurations();
        $oConf->getFormats();
        $dateFormat = $oConf->UserConfig['dateFormat'];
        $oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', '');
        $creationDateMask = isset($oConf->aConfig[$type]) ? $oConf->aConfig[$type] : '';
        $creationDateMask = ($creationDateMask == '') ? $dateFormat : $creationDateMask;
        if ($creationDateMask != '') {
            if (strpos($dateTime, ' ') !== false) {
                list ($date, $time) = explode(' ', $dateTime);
                list ($y, $m, $d) = explode('-', $date);
                list ($h, $i, $s) = explode(':', $time);
                $newCreation = '';
                $maskTime = array('d' => '%d', 'D' => '%A', 'j' => '%d', 'l' => '%A', 'G' => '%I', 'g' => '%i', 'N' => '%u', 'S' => '%d', 'w' => '%w', 'z' => '%j', 'W' => '%W', 'F' => '%B', 'm' => '%m', 'M' => '%B', 'n' => '%m', 'o' => '%Y', 'Y' => '%Y', 'y' => '%g', 'a' => '%p', 'A' => '%p', 'g' => '%I', 'G' => '%H', 'h' => '%I', 'H' => '%H', 'i' => '%M', 's' => '%S');
                $creationDateMask = trim($creationDateMask);

                if (strpos($creationDateMask, ' \\d\\e ') !== false) {
                    $creationDateMask = str_replace(' \\d\\e ', ' [xx] ', $creationDateMask);
                }

                for ($j = 0; $j < strlen($creationDateMask); $j++) {
                    if ($creationDateMask[$j] != ' ' && isset($maskTime[$creationDateMask[$j]])) {
                        $newCreation .= $maskTime[$creationDateMask[$j]];
                    } else {
                        $newCreation .= $creationDateMask[$j];
                    }
                }

                $langLocate = SYS_LANG;

                require_once 'model/Language.php';
                $language = new language();
                $lanLocation = $language->findLocationByLanId(SYS_LANG);
                $location = isset($lanLocation['LAN_LOCATION']) ? $lanLocation['LAN_LOCATION'] : '';    

                if (G::toLower(PHP_OS) == 'linux' || G::toLower(PHP_OS) == 'darwin') {
                    if (SYS_LANG == 'es') {
                        $langLocate = 'es_ES';
                    } else if (strlen(SYS_LANG) > 2) {
                        $langLocate = str_replace('-', '_', SYS_LANG);
                    } else if ($location != '') {
                        $langLocate = SYS_LANG.'_'.$location;
                    } else {
                        $langLocate = 'en_US';
                    }
                } else {
                    switch (SYS_LANG) {
                        case 'es':
                        case 'es_ES':
                            $langLocate = 'ESN';
                            break;
                        case 'pt':
                        case 'pt-BR':
                            $langLocate = 'PTB';
                            break;
                        case 'en':
                        case 'en-US':
                        default:
                            $langLocate = 'EST';
                            break;
                    }
                }
                
                if (defined('PARTNER_FLAG')) {
                    setlocale(LC_TIME, $langLocate);
                    $dateTime = utf8_encode(strftime($newCreation, mktime($h, $i, $s, $m, $d, $y)));
                } else {
                    setlocale(LC_TIME, $langLocate . ".utf8");
                    $dateTime = strftime($newCreation, mktime($h, $i, $s, $m, $d, $y));
                }

                if (strpos($dateTime, ' ') !== false) {
                    $dateTime = ucwords($dateTime);
                }

                if (strpos($dateTime, ' [xx] ') !== false) {
                    $dateTime = str_replace('[xx]', ' de ', $dateTime);
                }
            }
        }

        return $dateTime;
    }
开发者ID:rrsc,项目名称:processmaker,代码行数:84,代码来源:class.configuration.php

示例3: Configurations

    $swFileExist = 0;
    if ($sw_file_exists) {
        $swFileExist = 1;
    }
    return $swFileExist;
}
if ($actionAjax == 'casesGenerateDocumentPage') {
    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("FORMATS", $conf->getFormats());
    $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);
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:casesGenerateDocumentPage_Ajax.php

示例4: getAllGeneratedDocumentsCriteria

    public function getAllGeneratedDocumentsCriteria($sProcessUID, $sApplicationUID, $sTasKUID, $sUserUID)

    {

        G::LoadClass("configuration");



        $conf = new Configurations();



        $confEnvSetting = $conf->getFormats();



        //verifica si la tabla OBJECT_PERMISSION

        $this->verifyTable();

        $listing = false;

        $oPluginRegistry = & PMPluginRegistry::getSingleton();

        if ($oPluginRegistry->existsTrigger(PM_CASE_DOCUMENT_LIST)) {

            $folderData = new folderData(null, null, $sApplicationUID, null, $sUserUID);

            $folderData->PMType = "OUTPUT";

            $folderData->returnList = true;

            //$oPluginRegistry = & PMPluginRegistry::getSingleton();

            $listing = $oPluginRegistry->executeTriggers(PM_CASE_DOCUMENT_LIST, $folderData);

        }



        $aObjectPermissions = $this->getAllObjects($sProcessUID, $sApplicationUID, $sTasKUID, $sUserUID);

        if (!is_array($aObjectPermissions)) {

            $aObjectPermissions = array(

                'DYNAFORMS' => array(-1),

                'INPUT_DOCUMENTS' => array(-1),

                'OUTPUT_DOCUMENTS' => array(-1)

            );

        }

        if (!isset($aObjectPermissions['DYNAFORMS'])) {

            $aObjectPermissions['DYNAFORMS'] = array(-1);

        } else {

            if (!is_array($aObjectPermissions['DYNAFORMS'])) {

                $aObjectPermissions['DYNAFORMS'] = array(-1);

            }

        }

        if (!isset($aObjectPermissions['INPUT_DOCUMENTS'])) {

            $aObjectPermissions['INPUT_DOCUMENTS'] = array(-1);

        } else {

            if (!is_array($aObjectPermissions['INPUT_DOCUMENTS'])) {

                $aObjectPermissions['INPUT_DOCUMENTS'] = array(-1);

            }

        }

        if (!isset($aObjectPermissions['OUTPUT_DOCUMENTS'])) {

            $aObjectPermissions['OUTPUT_DOCUMENTS'] = array(-1);

        } else {

            if (!is_array($aObjectPermissions['OUTPUT_DOCUMENTS'])) {

                $aObjectPermissions['OUTPUT_DOCUMENTS'] = array(-1);

            }

        }

        $aDelete = $this->getAllObjectsFrom($sProcessUID, $sApplicationUID, $sTasKUID, $sUserUID, 'DELETE');

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

示例5: getCasesInputDocuments

 /**
  * Get data of Cases InputDocument
  *
  * @param string $applicationUid
  * @param string $userUid
  *
  * return array Return an array with data of an InputDocument
  */
 public function getCasesInputDocuments($applicationUid, $userUid)
 {
     try {
         //Verify data inbox
         $case = new \ProcessMaker\BusinessModel\Cases();
         $arrayResult = $case->getStatusInfo($applicationUid, 0, $userUid);
         $flagInbox = true;
         if (empty($arrayResult) || !preg_match("/^(?:TO_DO|DRAFT)\$/", $arrayResult["APP_STATUS"])) {
             $flagInbox = false;
         }
         $user = new \Users();
         $appDocument = new \AppDocument();
         $configuraction = new \Configurations();
         $confEnvSetting = $configuraction->getFormats();
         $arrayInputDocument = array();
         //Query
         $criteria = $this->getAppDocumentCriteriaByData($applicationUid);
         if (!$flagInbox) {
             $criteria->add(\AppDocumentPeer::USR_UID, $userUid, \Criteria::EQUAL);
         }
         $rsCriteria = \AppDocumentPeer::doSelectRS($criteria);
         $rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
         /*----------------------------------********---------------------------------*/
         $licensedFeatures =& \PMLicensedFeatures::getSingleton();
         $enablePMGmail = false;
         if ($licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) {
             \G::LoadClass("pmDrive");
             $pmDrive = new \PMDrive();
             $enablePMGmail = $pmDrive->getStatusService();
         }
         /*----------------------------------********---------------------------------*/
         while ($rsCriteria->next()) {
             $row = $rsCriteria->getRow();
             $arrayUserData = $user->load($row["USR_UID"]);
             $arrayAppDocument = $appDocument->load($row["APP_DOC_UID"], $row["DOC_VERSION"]);
             $row["APP_DOC_FILENAME"] = $arrayAppDocument["APP_DOC_FILENAME"];
             $row["APP_DOC_CREATE_USER"] = $configuraction->usersNameFormatBySetParameters($confEnvSetting["format"], $arrayUserData["USR_USERNAME"], $arrayUserData["USR_FIRSTNAME"], $arrayUserData["USR_LASTNAME"]);
             $row["APP_DOC_LINK"] = "cases/cases_ShowDocument?a=" . $row["APP_DOC_UID"] . "&v=" . $row["DOC_VERSION"];
             /*----------------------------------********---------------------------------*/
             //change donwload link - drive
             $driveDownload = @unserialize($arrayAppDocument['APP_DOC_DRIVE_DOWNLOAD']);
             if ($driveDownload !== false && is_array($driveDownload) && $enablePMGmail) {
                 if (array_key_exists('INPUT', $driveDownload)) {
                     $row['APP_DOC_LINK'] = $driveDownload['INPUT'];
                 } else {
                     if (array_key_exists('ATTACHED', $driveDownload)) {
                         $row['APP_DOC_LINK'] = $driveDownload['ATTACHED'];
                     }
                 }
             }
             /*----------------------------------********---------------------------------*/
             $arrayInputDocument[] = $this->getAppDocumentDataFromRecord($row);
         }
         //Return
         return $arrayInputDocument;
     } catch (\Exception $e) {
         throw $e;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:67,代码来源:InputDocument.php

示例6: isset

$sReassignFromUser = isset($_POST['user']) ? $_POST['user'] : '';
G::LoadClass('tasks');
G::LoadClass('groups');
G::LoadClass('case');
G::LoadClass('users');
$oTasks = new Tasks();
$oGroups = new Groups();
$oUser = new Users();
$oCases = new Cases();
$aCasesList = array();
//        foreach ( $APP_UIDS as $APP_UID ) {
$aCase = $oCases->loadCaseInCurrentDelegation($appUid);
$aUsersInvolved = array();
$aCaseGroups = $oTasks->getGroupsOfTask($aCase['TAS_UID'], 1);
$oConf = new Configurations();
$ConfEnv = $oConf->getFormats();
foreach ($aCaseGroups as $aCaseGroup) {
    $aCaseUsers = $oGroups->getUsersOfGroup($aCaseGroup['GRP_UID']);
    foreach ($aCaseUsers as $aCaseUser) {
        if ($aCaseUser['USR_UID'] != $sReassignFromUser) {
            $aCaseUserRecord = $oUser->load($aCaseUser['USR_UID']);
            $sCaseUser = G::getFormatUserList($ConfEnv['format'], $aCaseUserRecord);
            //                        $aUsersInvolved[] = array ( 'userUid' => $aCaseUser['USR_UID'] , 'userFullname' => $aCaseUserRecord['USR_FIRSTNAME'] . ' ' . $aCaseUserRecord['USR_LASTNAME']); // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
            $aUsersInvolved[] = array('userUid' => $aCaseUser['USR_UID'], 'userFullname' => $sCaseUser);
            // . ' (' . $aCaseUserRecord['USR_USERNAME'] . ')';
        }
    }
}
$aCaseUsers = $oTasks->getUsersOfTask($aCase['TAS_UID'], 1);
foreach ($aCaseUsers as $aCaseUser) {
    if ($aCaseUser['USR_UID'] != $sReassignFromUser) {
开发者ID:nshong,项目名称:processmaker,代码行数:31,代码来源:proxyReassignUsersList.php

示例7: generatedDocumentsSummary

 public function generatedDocumentsSummary()
 {
     global $G_PUBLISH;
     G::loadClass('configuration');
     $oHeadPublisher =& headPublisher::getSingleton();
     $conf = new Configurations();
     $oHeadPublisher->addExtJsScript('cases/casesGenerateDocumentPage', true);
     //adding a javascript file .js
     $oHeadPublisher->addContent('cases/casesGenerateDocumentPage');
     //adding a html file  .html.
     $oHeadPublisher->assign("FORMATS", $conf->getFormats());
     $oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
     G::RenderPage('publish', 'extJs');
 }
开发者ID:norahmollo,项目名称:processmaker,代码行数:14,代码来源:ajaxListener.php

示例8: getCasesInputDocuments

    /**
     * Get data of Cases InputDocument
     *
     * @param string $applicationUid
     * @param string $userUid
     *
     * return array Return an array with data of an InputDocument
     */
    public function getCasesInputDocuments($applicationUid, $userUid)
    {
        try {
            //Verify data inbox
            $case = new \ProcessMaker\BusinessModel\Cases();
            $arrayResult = $case->getStatusInfo($applicationUid, 0, $userUid);

            $flagInbox = true;

            if (empty($arrayResult) || !preg_match("/^(?:TO_DO|DRAFT)$/", $arrayResult["APP_STATUS"])) {
                $flagInbox = false;
            }

            $user = new \Users();
            $appDocument = new \AppDocument();
            $configuraction = new \Configurations();

            $confEnvSetting = $configuraction->getFormats();

            $arrayInputDocument = array();

            //Query
            $criteria = $this->getAppDocumentCriteriaByData($applicationUid);

            if (!$flagInbox) {
                $criteria->add(\AppDocumentPeer::USR_UID, $userUid, \Criteria::EQUAL);
            }

            $rsCriteria = \AppDocumentPeer::doSelectRS($criteria);
            $rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);

            while ($rsCriteria->next()) {
                $row = $rsCriteria->getRow();

                $arrayUserData = $user->load($row["USR_UID"]);

                $arrayAppDocument = $appDocument->load($row["APP_DOC_UID"], $row["DOC_VERSION"]);

                $row["APP_DOC_FILENAME"] = $arrayAppDocument["APP_DOC_FILENAME"];
                $row["APP_DOC_CREATE_USER"] = $configuraction->usersNameFormatBySetParameters($confEnvSetting["format"], $arrayUserData["USR_USERNAME"], $arrayUserData["USR_FIRSTNAME"], $arrayUserData["USR_LASTNAME"]);
                $row["APP_DOC_LINK"] = "cases/cases_ShowDocument?a=" . $row["APP_DOC_UID"] . "&v=" . $row["DOC_VERSION"];

                $arrayInputDocument[] = $this->getAppDocumentDataFromRecord($row);
            }

            //Return
            return $arrayInputDocument;
        } catch (\Exception $e) {
            throw $e;
        }
    }
开发者ID:nhenderson,项目名称:processmaker,代码行数:59,代码来源:InputDocument.php

示例9: getRoleDataFromRecord

 /**
  * Get data of a Role from a record
  *
  * @param array $record Record
  *
  * return array Return an array with data Role
  */
 public function getRoleDataFromRecord(array $record)
 {
     try {
         $conf = new \Configurations();
         $confEnvSetting = $conf->getFormats();
         $dateTime = new \DateTime($record["ROL_CREATE_DATE"]);
         $roleCreateDate = $dateTime->format($confEnvSetting["dateFormat"]);
         $roleUpdateDate = "";
         if (!empty($record["ROL_UPDATE_DATE"])) {
             $dateTime = new \DateTime($record["ROL_UPDATE_DATE"]);
             $roleUpdateDate = $dateTime->format($confEnvSetting["dateFormat"]);
         }
         return array($this->getFieldNameByFormatFieldName("ROL_UID") => $record["ROL_UID"], $this->getFieldNameByFormatFieldName("ROL_CODE") => $record["ROL_CODE"], $this->getFieldNameByFormatFieldName("ROL_NAME") => $record["ROL_NAME"], $this->getFieldNameByFormatFieldName("ROL_STATUS") => $record["ROL_STATUS"] . "" == "1" ? "ACTIVE" : "INACTIVE", $this->getFieldNameByFormatFieldName("ROL_SYSTEM") => $record["ROL_SYSTEM"], $this->getFieldNameByFormatFieldName("ROL_CREATE_DATE") => $roleCreateDate, $this->getFieldNameByFormatFieldName("ROL_UPDATE_DATE") => $roleUpdateDate, $this->getFieldNameByFormatFieldName("ROL_TOTAL_USERS") => (int) $record["ROL_TOTAL_USERS"]);
     } catch (\Exception $e) {
         throw $e;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:24,代码来源:Role.php

示例10: getTasks

    /**
     * Get all Tasks of Case
     * Based in: processmaker/workflow/engine/classes/class.processMap.php
     * Method:   processMap::load()
     *
     * @param string $applicationUid Unique id of Case
     *
     * return array Return an array with all Tasks of Case
     */
    public function getTasks($applicationUid)
    {
        try {
            $arrayTask = array();

            //Verify data
            $this->throwExceptionIfNotExistsCase($applicationUid, 0, $this->getFieldNameByFormatFieldName("APP_UID"));

            //Set variables
            $process = new \Process();
            $application = new \Application();
            $conf = new \Configurations();

            $arrayApplicationData = $application->Load($applicationUid);
            $processUid = $arrayApplicationData["PRO_UID"];

            $confEnvSetting = $conf->getFormats();

            $taskUid = "";

            //Get data
            //SQL
            $delimiter = \DBAdapter::getStringDelimiter();

            $criteria = new \Criteria("workflow");

            $criteria->addSelectColumn(\TaskPeer::TAS_UID);
            $criteria->addAsColumn("TAS_TITLE", "CT.CON_VALUE");
            $criteria->addAsColumn("TAS_DESCRIPTION", "CD.CON_VALUE");
            $criteria->addSelectColumn(\TaskPeer::TAS_START);
            $criteria->addSelectColumn(\TaskPeer::TAS_TYPE);
            $criteria->addSelectColumn(\TaskPeer::TAS_DERIVATION);
            $criteria->addSelectColumn(\TaskPeer::TAS_ASSIGN_TYPE);
            $criteria->addSelectColumn(\UsersPeer::USR_UID);
            $criteria->addSelectColumn(\UsersPeer::USR_USERNAME);
            $criteria->addSelectColumn(\UsersPeer::USR_FIRSTNAME);
            $criteria->addSelectColumn(\UsersPeer::USR_LASTNAME);

            $criteria->addAlias("CT", \ContentPeer::TABLE_NAME);
            $criteria->addAlias("CD", \ContentPeer::TABLE_NAME);

            $arrayCondition = array();
            $arrayCondition[] = array(\TaskPeer::TAS_UID, "CT.CON_ID", \Criteria::EQUAL);
            $arrayCondition[] = array("CT.CON_CATEGORY", $delimiter . "TAS_TITLE" . $delimiter, \Criteria::EQUAL);
            $arrayCondition[] = array("CT.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
            $criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);

            $arrayCondition = array();
            $arrayCondition[] = array(\TaskPeer::TAS_UID, "CD.CON_ID", \Criteria::EQUAL);
            $arrayCondition[] = array("CD.CON_CATEGORY", $delimiter . "TAS_DESCRIPTION" . $delimiter, \Criteria::EQUAL);
            $arrayCondition[] = array("CD.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
            $criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);

            $criteria->addJoin(\TaskPeer::TAS_LAST_ASSIGNED, \UsersPeer::USR_UID, \Criteria::LEFT_JOIN);

            $criteria->add(\TaskPeer::PRO_UID, $processUid, \Criteria::EQUAL);

            $rsCriteria = \TaskPeer::doSelectRS($criteria);
            $rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);

            while ($rsCriteria->next()) {
                $row = $rsCriteria->getRow();

                //Task
                if ($row["TAS_TYPE"] == "NORMAL") {
                    if (($row["TAS_TITLE"] . "" == "")) {
                        //There is no Label in Current SYS_LANG language so try to find in English - by default
                        $task = new \Task();
                        $task->setTasUid($row["TAS_UID"]);

                        $row["TAS_TITLE"] = $task->getTasTitle();
                    }
                } else {
                    $criteria2 = new \Criteria("workflow");

                    $criteria2->addSelectColumn(\SubProcessPeer::PRO_UID);
                    $criteria2->addAsColumn("TAS_TITLE", "CT.CON_VALUE");
                    $criteria2->addAsColumn("TAS_DESCRIPTION", "CD.CON_VALUE");

                    $criteria2->addAlias("CT", \ContentPeer::TABLE_NAME);
                    $criteria2->addAlias("CD", \ContentPeer::TABLE_NAME);

                    $arrayCondition = array();
                    $arrayCondition[] = array(\SubProcessPeer::TAS_PARENT, "CT.CON_ID", \Criteria::EQUAL);
                    $arrayCondition[] = array("CT.CON_CATEGORY", $delimiter . "TAS_TITLE" . $delimiter, \Criteria::EQUAL);
                    $arrayCondition[] = array("CT.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
                    $criteria2->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);

                    $arrayCondition = array();
                    $arrayCondition[] = array(\SubProcessPeer::TAS_PARENT, "CD.CON_ID", \Criteria::EQUAL);
                    $arrayCondition[] = array("CD.CON_CATEGORY", $delimiter . "TAS_DESCRIPTION" . $delimiter, \Criteria::EQUAL);
//.........这里部分代码省略.........
开发者ID:nhenderson,项目名称:processmaker,代码行数:101,代码来源:Cases.php

示例11: getWebEntryDataFromRecord

 /**
  * Get data of a Web Entry from a record
  *
  * @param array $record Record
  *
  * return array Return an array with data Web Entry
  */
 public function getWebEntryDataFromRecord(array $record)
 {
     try {
         if ($record["WE_METHOD"] == "WS") {
             $http = \G::is_https() ? "https://" : "http://";
             $url = $http . $_SERVER["HTTP_HOST"] . "/sys" . SYS_SYS . "/" . SYS_LANG . "/" . SYS_SKIN . "/" . $record["PRO_UID"];
             $record["WE_DATA"] = $url . "/" . $record["WE_DATA"];
         }
         $conf = new \Configurations();
         $confEnvSetting = $conf->getFormats();
         $dateTime = new \DateTime($record["WE_CREATE_DATE"]);
         $webEntryCreateDate = $dateTime->format($confEnvSetting["dateFormat"]);
         $webEntryUpdateDate = "";
         if (!empty($record["WE_UPDATE_DATE"])) {
             $dateTime = new \DateTime($record["WE_UPDATE_DATE"]);
             $webEntryUpdateDate = $dateTime->format($confEnvSetting["dateFormat"]);
         }
         return array($this->getFieldNameByFormatFieldName("WE_UID") => $record["WE_UID"], $this->getFieldNameByFormatFieldName("TAS_UID") => $record["TAS_UID"], $this->getFieldNameByFormatFieldName("DYN_UID") => $record["DYN_UID"], $this->getFieldNameByFormatFieldName("USR_UID") => $record["USR_UID"] . "", $this->getFieldNameByFormatFieldName("WE_TITLE") => $record["WE_TITLE"] . "", $this->getFieldNameByFormatFieldName("WE_DESCRIPTION") => $record["WE_DESCRIPTION"] . "", $this->getFieldNameByFormatFieldName("WE_METHOD") => $record["WE_METHOD"], $this->getFieldNameByFormatFieldName("WE_INPUT_DOCUMENT_ACCESS") => (int) $record["WE_INPUT_DOCUMENT_ACCESS"], $this->getFieldNameByFormatFieldName("WE_DATA") => $record["WE_DATA"], $this->getFieldNameByFormatFieldName("WE_CREATE_USR_UID") => $record["WE_CREATE_USR_UID"], $this->getFieldNameByFormatFieldName("WE_UPDATE_USR_UID") => $record["WE_UPDATE_USR_UID"] . "", $this->getFieldNameByFormatFieldName("WE_CREATE_DATE") => $webEntryCreateDate, $this->getFieldNameByFormatFieldName("WE_UPDATE_DATE") => $webEntryUpdateDate);
     } catch (\Exception $e) {
         throw $e;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:29,代码来源:WebEntry.php

示例12: getCalendarDataFromRecord

 /**
  * Get data of a Calendar from a record
  *
  * @param array $record Record
  *
  * return array Return an array with data Calendar
  */
 public function getCalendarDataFromRecord($record)
 {
     try {
         $calendarBusinessHours = new \CalendarBusinessHours();
         $calendarHolidays = new \CalendarHolidays();
         $arrayCalendarWorkHour = array();
         $arrayData = $calendarBusinessHours->getCalendarBusinessHours($record["CALENDAR_UID"]);
         foreach ($arrayData as $value) {
             $arrayCalendarWorkHour[] = array($this->getFieldNameByFormatFieldName("DAY") => $this->workDaysTransformData($value["CALENDAR_BUSINESS_DAY"] . "", false), $this->getFieldNameByFormatFieldName("HOUR_START") => $value["CALENDAR_BUSINESS_START"] . "", $this->getFieldNameByFormatFieldName("HOUR_END") => $value["CALENDAR_BUSINESS_END"] . "");
         }
         $arrayCalendarHoliday = array();
         $arrayData = $calendarHolidays->getCalendarHolidays($record["CALENDAR_UID"]);
         foreach ($arrayData as $value) {
             $arrayCalendarHoliday[] = array($this->getFieldNameByFormatFieldName("NAME") => $value["CALENDAR_HOLIDAY_NAME"] . "", $this->getFieldNameByFormatFieldName("DATE_START") => $value["CALENDAR_HOLIDAY_START"] . "", $this->getFieldNameByFormatFieldName("DATE_END") => $value["CALENDAR_HOLIDAY_END"] . "");
         }
         $conf = new \Configurations();
         $confEnvSetting = $conf->getFormats();
         $dateTime = new \DateTime($record["CALENDAR_CREATE_DATE"]);
         $dateCreate = $dateTime->format($confEnvSetting["dateFormat"]);
         $dateTime = new \DateTime($record["CALENDAR_UPDATE_DATE"]);
         $dateUpdate = $dateTime->format($confEnvSetting["dateFormat"]);
         $arrayCalendarWorkDays = array();
         foreach ($this->workDaysTransformData($record["CALENDAR_WORK_DAYS"] . "", false) as $value) {
             $arrayCalendarWorkDays[$value] = \G::LoadTranslation("ID_WEEKDAY_" . ($value != 7 ? $value : 0));
         }
         return array($this->getFieldNameByFormatFieldName("CAL_UID") => $record["CALENDAR_UID"], $this->getFieldNameByFormatFieldName("CAL_NAME") => $record["CALENDAR_NAME"], $this->getFieldNameByFormatFieldName("CAL_DESCRIPTION") => $record["CALENDAR_DESCRIPTION"] . "", $this->getFieldNameByFormatFieldName("CAL_WORK_DAYS") => $arrayCalendarWorkDays, $this->getFieldNameByFormatFieldName("CAL_STATUS") => $record["CALENDAR_STATUS"], $this->getFieldNameByFormatFieldName("CAL_WORK_HOUR") => $arrayCalendarWorkHour, $this->getFieldNameByFormatFieldName("CAL_HOLIDAY") => $arrayCalendarHoliday, $this->getFieldNameByFormatFieldName("CAL_CREATE_DATE") => $dateCreate, $this->getFieldNameByFormatFieldName("CAL_UPDATE_DATE") => $dateUpdate, $this->getFieldNameByFormatFieldName("CAL_TOTAL_USERS") => (int) $record["CALENDAR_TOTAL_USERS"], $this->getFieldNameByFormatFieldName("CAL_TOTAL_PROCESSES") => (int) $record["CALENDAR_TOTAL_PROCESSES"], $this->getFieldNameByFormatFieldName("CAL_TOTAL_TASKS") => (int) $record["CALENDAR_TOTAL_TASKS"]);
     } catch (\Exception $e) {
         throw $e;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:37,代码来源:Calendar.php

示例13: getConfiguration

 /**
  * Get configuration
  * @return mixed
  */
 public function getConfiguration()
 {
     $sysConf = \System::getSystemConfiguration('', '', SYS_SYS);
     $offset = timezone_offset_get(new \DateTimeZone($sysConf['time_zone']), new \DateTime());
     $response['timeZone'] = sprintf("GMT%s%02d:%02d", $offset >= 0 ? '+' : '-', abs($offset / 3600), abs($offset % 3600 / 60));
     $response['multiTimeZone'] = isset($sysConf['system_utc_time_zone']) && $sysConf['system_utc_time_zone'] ? true : false;
     $fields = \System::getSysInfo();
     $response['version'] = $fields['PM_VERSION'];
     $buildType = 'Community';
     /*----------------------------------********---------------------------------*/
     $response['buildType'] = $buildType;
     $conf = new \Configurations();
     $confEnvironment = $conf->getFormats();
     $response['environment'] = array();
     if (is_array($confEnvironment)) {
         $response['environment']['format'] = isset($confEnvironment['format']) ? $confEnvironment['format'] : '';
         $response['environment']['dateFormat'] = isset($confEnvironment['dateFormat']) ? $confEnvironment['dateFormat'] : '';
         $response['environment']['casesListDateFormat'] = isset($confEnvironment['casesListDateFormat']) ? $confEnvironment['casesListDateFormat'] : '';
     }
     $Translations = new \Translation();
     $translationsTable = $Translations->getTranslationEnvironments();
     $languagesList = array();
     foreach ($translationsTable as $locale) {
         $LANG_ID = $locale['LOCALE'];
         if ($locale['COUNTRY'] != '.') {
             $LANG_NAME = $locale['LANGUAGE'] . ' (' . ucwords(strtolower($locale['COUNTRY'])) . ')';
         } else {
             $LANG_NAME = $locale['LANGUAGE'];
         }
         $languages["L10n"] = $LANG_ID;
         $languages["label"] = $LANG_NAME;
         $languagesList[] = $languages;
     }
     $response['listLanguage'] = $languagesList;
     return $response;
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:40,代码来源:Light.php

示例14: uploadedDocuments

 public function uploadedDocuments()
 {
     if (!isset($_SESSION['USER_LOGGED'])) {
         $response = new stdclass();
         $response->message = G::LoadTranslation('ID_LOGIN_AGAIN');
         $response->lostSession = true;
         print G::json_encode($response);
         die;
     }
     global $G_PUBLISH;
     G::loadClass('configuration');
     $oHeadPublisher =& headPublisher::getSingleton();
     $conf = new Configurations();
     $oHeadPublisher->addExtJsScript('cases/casesUploadedDocumentsPage', true);
     //adding a javascript file .js
     $oHeadPublisher->addContent('cases/casesUploadedDocumentsPage');
     //adding a html file  .html.
     $oHeadPublisher->assign("FORMATS", $conf->getFormats());
     $oHeadPublisher->assign('pageSize', $conf->getEnvSetting('casesListRowNumber'));
     G::RenderPage('publish', 'extJs');
 }
开发者ID:bqevin,项目名称:processmaker,代码行数:21,代码来源:ajaxListener.php

示例15: Publisher

$G_ID_MENU_SELECTED = 'SETUP';
$G_ID_SUB_MENU_SELECTED = 'CALENDAR';
$G_PUBLISH = new Publisher();
G::LoadClass('configuration');
$c = new Configurations();
$configPage = $c->getConfiguration('skinList', 'pageSize', '', $_SESSION['USER_LOGGED']);
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('setup/skinList', false);
//adding a javascript file .js
$oHeadPublisher->addContent('setup/skinList');
//adding a html file  .html.
$oHeadPublisher->assign('CONFIG', $Config);
$oHeadPublisher->assign('SYS_SKIN', SYS_SKIN);
$oHeadPublisher->assign('SYS_SYS', "sys" . SYS_SYS);
$oHeadPublisher->assign('FORMATS', $c->getFormats());
G::RenderPage('publish', 'extJs');
die;
global $RBAC;
$access = $RBAC->userCanAccess('PM_SETUP');
if ($access != 1) {
    switch ($access) {
        case -1:
            G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
            G::header('location: ../login/login');
            die;
            break;
        case -2:
            G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
            G::header('location: ../login/login');
            die;
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:skinsList.php


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