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


PHP G::loadClass方法代码示例

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


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

示例1: skinList

function skinList()
{
    G::loadClass('system');
    $skinList = System::getSkingList();
    $wildcard = '';
    if (isset($_REQUEST['activeskin'])) {
        $wildcard = '@';
    }
    $filterList = array();
    if (defined('PARTNER_FLAG')) {
        $filterList = array('00000000000000000000000000000001', '00000000000000000000000000000002');
    }
    foreach ($skinList['skins'] as $key => $value) {
        if (!isset($value['SKIN_ID']) || !in_array($value['SKIN_ID'], $filterList)) {
            if ($value['SKIN_FOLDER_ID'] != 'simplified' && $value['SKIN_FOLDER_ID'] != 'uxs' && $value['SKIN_FOLDER_ID'] != 'uxmodern') {
                if ($skinList['currentSkin'] == $value['SKIN_FOLDER_ID']) {
                    $value['SKIN_STATUS'] = $wildcard . G::LoadTranslation('ID_ACTIVE');
                    $value['SKIN_NAME'] = $wildcard . $value['SKIN_NAME'];
                    $value['SKIN_WORKSPACE'] = $wildcard . $value['SKIN_WORKSPACE'];
                    $value['SKIN_DESCRIPTION'] = $wildcard . $value['SKIN_DESCRIPTION'];
                    $value['SKIN_AUTHOR'] = $wildcard . $value['SKIN_AUTHOR'];
                    $value['SKIN_CREATEDATE'] = $wildcard . $value['SKIN_CREATEDATE'];
                    $value['SKIN_MODIFIEDDATE'] = $wildcard . $value['SKIN_MODIFIEDDATE'];
                } else {
                    $value['SKIN_STATUS'] = G::LoadTranslation('ID_INACTIVE');
                }
                $skinListArray['skins'][] = $value;
            }
        }
    }
    $skinListArray['currentSkin'] = $skinList['currentSkin'];
    echo G::json_encode($skinListArray);
}
开发者ID:bqevin,项目名称:processmaker,代码行数:33,代码来源:skin_Ajax.php

示例2: system

 public function system()
 {
     require_once PATH_CONTROLLERS . 'main.php';
     G::loadClass('system');
     $skinsList = System::getSkingList();
     foreach ($skinsList['skins'] as $key => $value) {
         if ($value['SKIN_WORKSPACE'] != 'Global') {
             unset($skinsList['skins'][$key]);
         }
     }
     $skins = array();
     $timeZonesList = System::getAllTimeZones();
     $timeZonesList = array_keys($timeZonesList);
     $mainController = new Main();
     $languagesList = $mainController->getLanguagesList();
     $sysConf = System::getSystemConfiguration(PATH_CONFIG . 'env.ini');
     foreach ($skinsList['skins'] as $skin) {
         $skins[] = array($skin['SKIN_FOLDER_ID'], $skin['SKIN_NAME']);
     }
     foreach ($timeZonesList as $tz) {
         $timeZones[] = array($tz, $tz);
     }
     $this->includeExtJS('admin/system');
     //G::LoadClass('configuration');
     // $c = new Configurations();
     // $configPage = $c->getConfiguration('usersList', 'pageSize','',$_SESSION['USER_LOGGED']);
     // $Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
     $this->setJSVar('skinsList', $skins);
     $this->setJSVar('languagesList', $languagesList);
     $this->setJSVar('timeZonesList', $timeZones);
     $this->setJSVar('sysConf', $sysConf);
     G::RenderPage('publish', 'extJs');
 }
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:33,代码来源:admin.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 (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('home/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:nshong,项目名称:processmaker,代码行数:57,代码来源:home.php

示例4: edit

 /**
  * edit pmtable
  *
  * @param string $httpData->id
  */
 public function edit($httpData)
 {
     require_once PATH_CONTROLLERS . 'pmTablesProxy.php';
     require_once 'classes/model/AdditionalTables.php';
     G::loadClass('pmTable');
     $additionalTables = new AdditionalTables();
     $table = false;
     $addTabUid = isset($httpData->id) ? $httpData->id : false;
     $dataNumRows = 0;
     $repTabPluginPermissions = false;
     $columnsTypes = PmTable::getPropelSupportedColumnTypes();
     $jsFile = isset($httpData->tableType) && $httpData->tableType == 'report' ? 'editReport' : 'edit';
     $columnsTypesList = array();
     foreach ($columnsTypes as $columnTypeName => $columnType) {
         $columnsTypesList[] = array($columnTypeName, $columnType);
     }
     if ($addTabUid) {
         $tableData = $additionalTables->getAllData($httpData->id, 0, 2);
         $dataNumRows = $tableData['count'];
     }
     if ($addTabUid !== false) {
         // if it is a edit request
         $tableFields = array();
         $fieldsList = array();
         $table = $additionalTables->load($addTabUid, true);
         //fix for backware compatibility
         $table['DBS_UID'] = $table['DBS_UID'] == null || $table['DBS_UID'] == '' ? 'workflow' : $table['DBS_UID'];
         $_SESSION['ADD_TAB_UID'] = $addTabUid;
         //list dynaform fields
         if ($table['ADD_TAB_TYPE'] == 'NORMAL' || $table['ADD_TAB_TYPE'] == 'GRID') {
             $repTabPluginPermissions = $this->_getSimpleReportPluginDef();
         }
     }
     $this->includeExtJS('pmTables/' . $jsFile);
     $this->setJSVar('flagProcessmap', isset($_REQUEST['flagProcessmap']) ? $_REQUEST['flagProcessmap'] : 0);
     $this->setJSVar('ADD_TAB_UID', $addTabUid);
     $this->setJSVar('PRO_UID', isset($_GET['PRO_UID']) ? $_GET['PRO_UID'] : false);
     $this->setJSVar('TABLE', $table);
     $this->setJSVar('dbg', isset($httpData->dbg));
     $this->setJSVar('columnsTypes', $columnsTypesList);
     $this->setJSVar('dataNumRows', $dataNumRows);
     $this->setJSVar('_plugin_permissions', $repTabPluginPermissions);
     $this->setJSVar('sizeTableName', $this->getSizeTableName());
     $isBpmn = 0;
     if (isset($_GET['PRO_UID'])) {
         $process = new Process();
         $isBpmn = $process->isBpmnProcess($_GET['PRO_UID']);
     }
     $this->setJSVar('isBpmn', $isBpmn);
     G::RenderPage('publish', 'extJs');
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:56,代码来源:pmTables.php

示例5: get

 protected function get($id = '', $start = null, $limit = null, $type = null, $filter = null, $search = null, $process = null, $user = null, $status = null, $typeResource = null, $dateFrom = null, $dateTo = null)
 {
     if (empty($id)) {
         // getting all records.
         G::loadClass('applications');
         $app = new Applications();
         $userUid = Services_Rest_Auth::$userId;
         return $app->getAll($userUid, $start, $limit, $type, $filter, $search, $process, $status, $typeResource, $dateFrom, $dateTo);
     } else {
         // get a specific record.
         G::loadClass('wsBase');
         $wsBase = new wsBase();
         return $wsBase->getCaseInfo($id);
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:15,代码来源:Case.php

示例6: system

 public function system()
 {
     global $RBAC;
     $RBAC->requirePermissions('PM_SETUP');
     require_once PATH_CONTROLLERS . 'main.php';
     G::loadClass('system');
     $skinsList = System::getSkingList();
     foreach ($skinsList['skins'] as $key => $value) {
         if ($value['SKIN_WORKSPACE'] != 'Global') {
             unset($skinsList['skins'][$key]);
         }
     }
     $skins = array();
     $mainController = new Main();
     $languagesList = $mainController->getLanguagesList();
     $languagesList[] = array("", G::LoadTranslation("ID_USE_LANGUAGE_URL"));
     $sysConf = System::getSystemConfiguration(PATH_CONFIG . 'env.ini');
     foreach ($skinsList['skins'] as $skin) {
         $skins[] = array($skin['SKIN_FOLDER_ID'], $skin['SKIN_NAME']);
     }
     $this->includeExtJS('admin/system');
     //G::LoadClass('configuration');
     // $c = new Configurations();
     // $configPage = $c->getConfiguration('usersList', 'pageSize','',$_SESSION['USER_LOGGED']);
     // $Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
     if (isset($sysConf["session.gc_maxlifetime"])) {
         $sysConf["session_gc_maxlifetime"] = $sysConf["session.gc_maxlifetime"];
     } else {
         $sysConf["session_gc_maxlifetime"] = ini_get('session.gc_maxlifetime');
     }
     $this->setJSVar('skinsList', $skins);
     $this->setJSVar('languagesList', $languagesList);
     $this->setJSVar('timeZonesList', array_map(function ($value) {
         return [$value, $value];
     }, DateTimeZone::listIdentifiers()));
     $this->setJSVar('sysConf', $sysConf);
     G::RenderPage('publish', 'extJs');
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:38,代码来源:admin.php

示例7: Users

         print G::json_encode($result);
     }
     break;
 case 'userData':
     require_once 'classes/model/Users.php';
     $_SESSION['CURRENT_USER'] = $_POST['USR_UID'];
     $oUser = new Users();
     $aFields = $oUser->loadDetailed($_POST['USR_UID']);
     //Load Calendar options and falue for this user
     G::LoadClass('calendar');
     $calendar = new Calendar();
     $calendarInfo = $calendar->getCalendarFor($_POST['USR_UID'], $_POST['USR_UID'], $_POST['USR_UID']);
     //If the function returns a DEFAULT calendar it means that this object doesn't have assigned any calendar
     $aFields['USR_CALENDAR'] = $calendarInfo['CALENDAR_APPLIED'] != 'DEFAULT' ? $calendarInfo['CALENDAR_UID'] : "";
     #verifying if it has any preferences on the configurations table
     G::loadClass('configuration');
     $oConf = new Configurations();
     $oConf->loadConfig($x, 'USER_PREFERENCES', '', '', $_SESSION['USER_LOGGED'], '');
     $aFields['PREF_DEFAULT_MENUSELECTED'] = '';
     $aFields['PREF_DEFAULT_CASES_MENUSELECTED'] = '';
     if (sizeof($oConf->Fields) > 0) {
         // this user has a configuration record
         $aFields['PREF_DEFAULT_LANG'] = $oConf->aConfig['DEFAULT_LANG'];
         $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':
开发者ID:ralpheav,项目名称:processmaker,代码行数:31,代码来源:usersAjax.php

示例8: saveOrderDashlet

 public function saveOrderDashlet($data)
 {
     $this->setResponseType('json');
     try {
         $orderDashlet[0] = Bootstrap::json_decode($data->positionCol0);
         $orderDashlet[1] = Bootstrap::json_decode($data->positionCol1);
         $orderDashlet[2] = Bootstrap::json_decode($data->positionCol2);
         G::loadClass('configuration');
         $oConfiguration = new Configurations();
         $aConfiguration = $oConfiguration->load('Dashboard', '', '', $_SESSION['USER_LOGGED']);
         $dataDashboard = array();
         if (isset($aConfiguration["CFG_VALUE"])) {
             $dataDashboard = $aConfiguration["CFG_VALUE"];
         }
         $dataNow['ORDER'] = $orderDashlet;
         if (isset($data->columns)) {
             $dataNow['COLUMNS'] = Bootstrap::json_decode($data->columns);
         }
         $dataDashboard = array_merge($dataDashboard, $dataNow);
         $oConfiguration->aConfig = $dataDashboard;
         $oConfiguration->saveConfig('Dashboard', '', '', $_SESSION['USER_LOGGED']);
         $result->success = '1';
         return $result;
     } catch (Exception $error) {
         //ToDo: Display a error message
     }
 }
开发者ID:norahmollo,项目名称:processmaker,代码行数:27,代码来源:dashboard.php

示例9: updateReportTables

    /**
     * Update the report table with a determinated case data
     * @param string $proUid
     * @param string $appUid
     * @param string $appNumber
     * @param string $caseData
     */
    public function updateReportTables($proUid, $appUid, $appNumber, $caseData, $appStatus)
    {
        G::loadClass('pmTable');
        //get all Active Report Tables
        $criteria = new Criteria('workflow');
        $criteria->add(AdditionalTablesPeer::PRO_UID, $proUid);
        $dataset = AdditionalTablesPeer::doSelectRS($criteria);
        $dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);

        // accomplish all related  report tables for this process that contain case data
        // for the target ($appUid) application
        while ($dataset->next()) {
            $row = $dataset->getRow();
            $className = $row['ADD_TAB_CLASS_NAME'];
            // verify if the report table class exists
            if (!file_exists(PATH_WORKSPACE . 'classes/' . $className . '.php')) {
                continue;
            }
            // the class exists then load it.
            require_once PATH_WORKSPACE . 'classes/' . $className . '.php';
            // create a criteria object of report table class
            $c = new Criteria(pmTable::resolveDbSource($row['DBS_UID']));
            // select all related records with this $appUid
            eval('$c->add(' . $className . 'Peer::APP_UID, \'' . $appUid . '\');');
            eval('$records = ' . $className . 'Peer::doSelect($c);');

            //Select all types
            require_once 'classes/model/Fields.php';
            $criteriaField = new Criteria('workflow');
            $criteriaField->add(FieldsPeer::ADD_TAB_UID, $row['ADD_TAB_UID']);
            $datasetField = FieldsPeer::doSelectRS($criteriaField);
            $datasetField->setFetchmode(ResultSet::FETCHMODE_ASSOC);
            $fieldTypes = array();
            while ($datasetField->next()) {
                $rowfield = $datasetField->getRow();
                switch ($rowfield['FLD_TYPE']) {
                    case 'FLOAT':
                    case 'DOUBLE':
                    case 'INTEGER':
                        $fieldTypes[] = array($rowfield['FLD_NAME']=>$rowfield['FLD_TYPE']);
                        break;
                    default:
                        break;
                }
            }

            switch ($row['ADD_TAB_TYPE']) {
                //switching by report table type
                case 'NORMAL':
                    // parsing empty values to null
                    if (!is_array($caseData)) {
                        $caseData = unserialize($caseData);
                    }
                    foreach ($caseData as $i => $v) {
                        foreach ($fieldTypes as $key => $fieldType) {
                            foreach ($fieldType as $name => $type) {
                                if ( strtoupper ( $i) == $name) {
                                    $v = validateType ($v, $type);
                                    unset($name);
                                }
                            }
                        }
                        $caseData[$i] = $v === '' ? null : $v;
                    }

                    if (is_array($records) && count($records) > 0) {
                        // if the record already exists on the report table
                        foreach ($records as $record) {
                            //update all records
                            if (method_exists($record, 'setAppStatus')) {
                                $record->setAppStatus($appStatus);
                            }
                            $record->fromArray(array_change_key_case($caseData, CASE_UPPER), BasePeer::TYPE_FIELDNAME);
                            if ($record->validate()) {
                                $record->save();
                            }
                        }
                    } else {
                        // there are not any record for this application on the table, then create it
                        eval('$obj = new ' . $className . '();');
                        $obj->fromArray(array_change_key_case($caseData, CASE_UPPER), BasePeer::TYPE_FIELDNAME);
                        $obj->setAppUid($appUid);
                        $obj->setAppNumber($appNumber);
                        if (method_exists($obj, 'setAppStatus')) {
                            $obj->setAppStatus($appStatus);
                        }
                        $obj->save();
                    }
                    break;
                case 'GRID':
                    list($gridName, $gridUid) = explode('-', $row['ADD_TAB_GRID']);
                    $gridData = isset($caseData[$gridName]) ? $caseData[$gridName] : array();

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

示例10: _getDefaultLocation

 /**
  * get user preferences for default redirect
  * verifying if it has any preferences on configurations table
  */
 public function _getDefaultLocation()
 {
     global $RBAC;
     G::loadClass('configuration');
     $oConf = new Configurations();
     $oConf->loadConfig($x, 'USER_PREFERENCES', '', '', $_SESSION['USER_LOGGED'], '');
     //$baseUrl = '/sys' . SYS_SYS . '/' . $this->lang . '/' . SYS_SKIN . '/';
     if (isset($_COOKIE['workspaceSkin'])) {
         $baseUrl = '/sys' . SYS_SYS . '/' . $this->lang . '/' . $_COOKIE['workspaceSkin'] . '/';
     } else {
         $baseUrl = '/sys' . SYS_SYS . '/' . $this->lang . '/' . SYS_SKIN . '/';
     }
     $url = '';
     if (sizeof($oConf->aConfig) > 0) {
         // this user has a configuration record
         // backward compatibility, because now, we don't have user and dashboard menu.
         if ($oConf->aConfig['DEFAULT_MENU'] == 'PM_USERS') {
             $oConf->aConfig['DEFAULT_MENU'] = 'PM_SETUP';
         }
         switch ($oConf->aConfig['DEFAULT_MENU']) {
             case 'PM_SETUP':
                 if ($RBAC->userCanAccess('PM_SETUP') == 1) {
                     $url = 'setup/main';
                 }
                 break;
             case 'PM_FACTORY':
                 if ($RBAC->userCanAccess('PM_FACTORY') == 1) {
                     $url = 'processes/main';
                 }
                 break;
             case 'PM_CASES':
                 if ($RBAC->userCanAccess('PM_CASES') == 1) {
                     $url = 'cases/main';
                 }
                 break;
             case 'PM_USERS':
                 if ($RBAC->userCanAccess('PM_USERS') == 1) {
                     $url = 'setup/main';
                 }
                 break;
             case 'PM_DASHBOARD':
                 if ($RBAC->userCanAccess('PM_DASHBOARD') == 1) {
                     $url = 'dashboard/main';
                 }
                 break;
         }
     }
     if (empty($url)) {
         if ($RBAC->userCanAccess('PM_FACTORY') == 1) {
             $url = 'processes/main';
         } elseif ($RBAC->userCanAccess('PM_SETUP') == 1) {
             $url = 'setup/main';
         } elseif ($RBAC->userCanAccess('PM_CASES') == 1) {
             $url = 'cases/main';
         } elseif ($RBAC->userCanAccess('PM_USERS') == 1) {
             $url = 'setup/main';
         } elseif ($RBAC->userCanAccess('PM_DASHBOARD') == 1) {
             $url = 'dashboard/dashboard';
         } else {
             $url = 'users/myInfo';
         }
     }
     return $baseUrl . $url;
 }
开发者ID:bqevin,项目名称:processmaker,代码行数:68,代码来源:UsersProperties.php

示例11: getInfoFromPOFile

 function getInfoFromPOFile($file)
 {
     G::loadClass('i18n_po');
     $POFile = new i18n_PO($file);
     $POFile->readInit();
     $POHeaders = $POFile->getHeaders();
     if ($POHeaders['X-Poedit-Country'] != '.') {
         $country = self::getTranslationMetaByCountryName($POHeaders['X-Poedit-Country']);
     } else {
         $country = '.';
     }
     $language = self::getTranslationMetaByLanguageName($POHeaders['X-Poedit-Language']);
     if ($language !== false) {
         if ($country !== false) {
             if ($country != '.') {
                 $LOCALE = $language['LAN_ID'] . '-' . $country['IC_UID'];
             } else {
                 if ($country == '.') {
                     //this a trsnlation file with a language international, no country name was set
                     $LOCALE = $language['LAN_ID'];
                 } else {
                     throw new Exception('PO File Error: "' . $file . '" has a invalid country definition!');
                 }
             }
         } else {
             throw new Exception('PO File Error: "' . $file . '" has a invalid country definition!');
         }
     } else {
         throw new Exception('PO File Error: "' . $file . '" has a invalid language definition!');
     }
     $countItems = 0;
     try {
         while ($rowTranslation = $POFile->getTranslation()) {
             $countItems++;
         }
     } catch (Exception $e) {
         $countItems = '-';
     }
     return array('LOCALE' => $LOCALE, 'HEADERS' => $POHeaders, 'COUNT' => $countItems);
 }
开发者ID:nshong,项目名称:processmaker,代码行数:40,代码来源:Translation.php

示例12: getEmailConfiguration

function getEmailConfiguration()
{
    G::loadClass('system');
    return System::getEmailConfiguration();
}
开发者ID:ralpheav,项目名称:processmaker,代码行数:5,代码来源:class.pmFunctions.php

示例13: login

 /**
  * Login
  */
 public function login()
 {
     require_once 'classes/model/LoginLog.php';
     G::LoadClass('system');
     G::loadClass('configuration');
     $this->conf = new Configurations();
     // getting posibles errors passed by GET method
     $this->getInUrlError();
     if (!isset($_SESSION['G_MESSAGE'])) {
         $_SESSION['G_MESSAGE'] = '';
     }
     if (!isset($_SESSION['G_MESSAGE_TYPE'])) {
         $_SESSION['G_MESSAGE_TYPE'] = '';
     }
     $msg = $_SESSION['G_MESSAGE'];
     $msgType = $_SESSION['G_MESSAGE_TYPE'];
     if (!isset($_SESSION['FAILED_LOGINS'])) {
         $_SESSION['FAILED_LOGINS'] = 0;
     }
     $sFailedLogins = $_SESSION['FAILED_LOGINS'];
     if (isset($_SESSION['USER_LOGGED'])) {
         //close the session, if the current session_id was used in PM.
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(LoginLogPeer::LOG_SID, session_id());
         $oCriteria->add(LoginLogPeer::USR_UID, isset($_SESSION['USER_LOGGED']) ? $_SESSION['USER_LOGGED'] : '-');
         $oCriteria->add(LoginLogPeer::LOG_STATUS, 'ACTIVE');
         $oCriteria->add(LoginLogPeer::LOG_END_DATE, null, Criteria::ISNULL);
         $oDataset = LoginLogPeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         $aRow = $oDataset->getRow();
         if ($aRow) {
             if ($aRow['LOG_STATUS'] != 'CLOSED' && $aRow['LOG_END_DATE'] == null) {
                 $weblog = new LoginLog();
                 $aLog['LOG_UID'] = $aRow['LOG_UID'];
                 $aLog['LOG_STATUS'] = 'CLOSED';
                 $aLog['LOG_IP'] = $aRow['LOG_IP'];
                 $aLog['LOG_SID'] = session_id();
                 $aLog['LOG_INIT_DATE'] = $aRow['LOG_INIT_DATE'];
                 $aLog['LOG_END_DATE'] = date('Y-m-d H:i:s');
                 $aLog['LOG_CLIENT_HOSTNAME'] = $aRow['LOG_CLIENT_HOSTNAME'];
                 $aLog['USR_UID'] = $aRow['USR_UID'];
                 $weblog->update($aLog);
             }
         }
         //remove memcached session
         $this->memcache->delete('rbacSession' . session_id());
     } else {
         // Execute SSO trigger
         $pluginRegistry =& PMPluginRegistry::getSingleton();
         if (defined('PM_SINGLE_SIGN_ON')) {
             if ($pluginRegistry->existsTrigger(PM_SINGLE_SIGN_ON)) {
                 if ($pluginRegistry->executeTriggers(PM_SINGLE_SIGN_ON, null)) {
                     // Start new session
                     @session_destroy();
                     session_start();
                     session_regenerate_id();
                     // Authenticate
                     $result = $this->authentication();
                     if ($result->success) {
                         // Redirect to landing page for the user
                         G::header('Location: ' . $result->url);
                         die;
                     }
                 }
             }
         }
     }
     //end log
     //start new session
     @session_destroy();
     session_start();
     session_regenerate_id();
     if (strlen($msg) > 0) {
         $_SESSION['G_MESSAGE'] = $msg;
     }
     if (strlen($msgType) > 0) {
         $_SESSION['G_MESSAGE_TYPE'] = $msgType;
     }
     $_SESSION['FAILED_LOGINS'] = $sFailedLogins;
     $availableLangArray = $this->getLanguagesList();
     G::LoadClass("serverConfiguration");
     $sflag = 0;
     if (($nextBeatDate = $this->memcache->get('nextBeatDate')) === false) {
         //get the serverconf singleton, and check if we can send the heartbeat
         $oServerConf =& serverConf::getSingleton();
         $sflag = $oServerConf->getHeartbeatProperty('HB_OPTION', 'HEART_BEAT_CONF');
         $sflag = trim($sflag) != '' ? $sflag : '1';
         //get date of next beat
         $nextBeatDate = $oServerConf->getHeartbeatProperty('HB_NEXT_BEAT_DATE', 'HEART_BEAT_CONF');
         $this->memcache->set('nextBeatDate', $nextBeatDate, 1 * 3600);
     } else {
         $sflag = '1';
     }
     if ($sflag == '1' && (strtotime("now") > $nextBeatDate || is_null($nextBeatDate))) {
         //To do: we need to change to ExtJs
         $this->setJSVar('flagHeartBeat', 1);
//.........这里部分代码省略.........
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:101,代码来源:main.php

示例14: editTaskProperties


//.........这里部分代码省略.........

                        }

                    }



                    //$sFilename = 'tasks/tasks_Owner.xml';

                    break;

            }

            $oTask = new Task();

            $aFields = $oTask->load($sTaskUID);

            $aFields['INDEX'] = $iIndex;

            $aFields['IFORM'] = $iForm;

            $aFields['LANG'] = SYS_LANG;



            /**

             * Task Notifications *

             */

            if ($iForm == 7 || $iForm == 1) {

                G::loadClass('processes');

                $files = Processes::getProcessFiles($aFields['PRO_UID'], 'mail');



                $templates = array();

                $templates[] = 'dummy';



                foreach ($files as $file) {

                    $templates[] = array('FILE' => $file['filename'], 'NAME' => $file['filename'] );

                }



                global $_DBArray;

                $_DBArray['_TEMPLATES1'] = $templates;

                $_SESSION['_DBArray'] = $_DBArray;



                if ($iForm == 7) {

                    // Additional configuration

                    G::loadClass('configuration');
开发者ID:hpx2206,项目名称:processmaker-1,代码行数:67,代码来源:class.processMap.php

示例15: callPhing

 /**
  *
  * @param string $target - task name to execute
  * @param string $buildFile - build file path
  * @param array $options - array options to override the options on .ini file
  * @param bool $verbose - to show a verbose output
  */
 public static function callPhing($target, $buildFile = '', $options = array(), $verbose = true)
 {
     G::loadClass('pmPhing');
     $args = array();
     foreach ($options as $key => $value) {
         $args[] = "-D{$key}={$value}";
     }
     if ($buildFile) {
         $args[] = '-f';
         $args[] = realpath($buildFile);
     }
     if (!$verbose) {
         $args[] = '-q';
     }
     if (is_array($target)) {
         $args = array_merge($args, $target);
     } else {
         $args[] = $target;
     }
     if (DIRECTORY_SEPARATOR != '\\' && (function_exists('posix_isatty') && @posix_isatty(STDOUT))) {
         $args[] = '-logger';
         $args[] = 'phing.listener.AnsiColorLogger';
     }
     Phing::startup();
     Phing::setProperty('phing.home', getenv('PHING_HOME'));
     $m = new pmPhing();
     $m->execute($args);
     $m->runBuild();
 }
开发者ID:bqevin,项目名称:processmaker,代码行数:36,代码来源:class.pmTable.php


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