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


PHP Configurations::getConfiguration方法代码示例

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


在下文中一共展示了Configurations::getConfiguration方法的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: getAll

 public function getAll($userUid, $start = null, $limit = null, $action = null, $filter = null, $search = null, $process = null, $status = null, $type = null, $dateFrom = null, $dateTo = null, $callback = null, $dir = null, $sort = "APP_CACHE_VIEW.APP_NUMBER", $category = null)
 {
     $callback = isset($callback) ? $callback : "stcCallback1001";
     $dir = isset($dir) ? $dir : "DESC";
     $sort = isset($sort) ? $sort : "";
     $start = isset($start) ? $start : "0";
     $limit = isset($limit) ? $limit : "25";
     $filter = isset($filter) ? $filter : "";
     $search = isset($search) ? $search : "";
     $process = isset($process) ? $process : "";
     $category = isset($category) ? $category : "";
     $status = isset($status) ? $status : "";
     $action = isset($action) ? $action : "todo";
     $type = isset($type) ? $type : "extjs";
     $dateFrom = isset($dateFrom) ? $dateFrom : "";
     $dateTo = isset($dateTo) ? $dateTo : "";
     G::LoadClass("BasePeer");
     G::LoadClass("configuration");
     //require_once ("classes/model/AppCacheView.php");
     //require_once ("classes/model/AppDelegation.php");
     //require_once ("classes/model/AdditionalTables.php");
     //require_once ("classes/model/AppDelay.php");
     //require_once ("classes/model/Fields.php");
     //require_once ("classes/model/Users.php");
     //require_once ("classes/model/Process.php");
     $oAppCache = new AppCacheView();
     //get data configuration
     $conf = new Configurations();
     $confCasesList = $conf->getConfiguration('casesList', $action == 'search' || $action == 'simple_search' ? 'sent' : $action);
     $oAppCache->confCasesList = $confCasesList;
     // get the action based list
     switch ($action) {
         case "draft":
             $Criteria = $oAppCache->getDraftListCriteria($userUid);
             $CriteriaCount = $oAppCache->getDraftCountCriteria($userUid);
             break;
         case "sent":
             $Criteria = $oAppCache->getSentListCriteria($userUid);
             $CriteriaCount = $oAppCache->getSentCountCriteria($userUid);
             if (!empty($status)) {
                 $Criteria->add(AppCacheViewPeer::APP_STATUS, $status);
                 $CriteriaCount->add(AppCacheViewPeer::APP_STATUS, $status);
             }
             break;
         case "selfservice":
         case "unassigned":
             //$userUid can't be empty or null
             $Criteria = $oAppCache->getUnassignedListCriteria($userUid);
             $CriteriaCount = $oAppCache->getUnassignedCountCriteria($userUid);
             break;
         case "paused":
             $Criteria = $oAppCache->getPausedListCriteria($userUid);
             $CriteriaCount = $oAppCache->getPausedCountCriteria($userUid);
             break;
         case "completed":
             $Criteria = $oAppCache->getCompletedListCriteria($userUid);
             $CriteriaCount = $oAppCache->getCompletedCountCriteria($userUid);
             break;
         case "cancelled":
             $Criteria = $oAppCache->getCancelledListCriteria($userUid);
             $CriteriaCount = $oAppCache->getCancelledCountCriteria($userUid);
             break;
         case "search":
             //$Criteria = $oAppCache->getSearchListCriteria();
             //$CriteriaCount = $oAppCache->getSearchCountCriteria();
             switch ($status) {
                 case "TO_DO":
                     $Criteria = $oAppCache->getToDoListCriteria($userUid);
                     $CriteriaCount = $oAppCache->getToDoCountCriteria($userUid);
                     break;
                 case "DRAFT":
                     $Criteria = $oAppCache->getDraftListCriteria($userUid);
                     $CriteriaCount = $oAppCache->getDraftCountCriteria($userUid);
                     break;
                 case "PAUSED":
                     $Criteria = $oAppCache->getPausedListCriteria($userUid);
                     $CriteriaCount = $oAppCache->getPausedCountCriteria($userUid);
                     break;
                 case "CANCELLED":
                     $Criteria = $oAppCache->getCancelledListCriteria($userUid);
                     $CriteriaCount = $oAppCache->getCancelledCountCriteria($userUid);
                     break;
                 case "COMPLETED":
                     $Criteria = $oAppCache->getCompletedListCriteria($userUid);
                     $CriteriaCount = $oAppCache->getCompletedCountCriteria($userUid);
                     break;
                 default:
                     //All status
                     $Criteria = $oAppCache->getAllCasesListCriteria2($userUid);
                     $CriteriaCount = $oAppCache->getAllCasesCountCriteria2($userUid);
                     break;
             }
             break;
         case "simple_search":
             $Criteria = $oAppCache->getSimpleSearchListCriteria();
             $CriteriaCount = $oAppCache->getSimpleSearchCountCriteria();
             break;
         case "to_revise":
             $Criteria = $oAppCache->getToReviseListCriteria($userUid);
             $CriteriaCount = $oAppCache->getToReviseCountCriteria($userUid);
//.........这里部分代码省略.........
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:101,代码来源:class.applications.php

示例3: isset

     $rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $rs->next();
     $totalCount = 0;
     for ($j = 0; $j < $rs->getRecordCount(); $j++) {
         $result = $rs->getRow();
         $result["FILEDOCEXIST"] = $result["FILEDOC"];
         $result["FILEPDFEXIST"] = $result["FILEPDF"];
         $result["DELETE_FILE"] = isset($result['ID_DELETE']) && $result['ID_DELETE'] == 'Delete' ? true : false;
         $aProcesses[] = $result;
         $rs->next();
         $totalCount++;
     }
     //!dateFormat
     $conf = new Configurations();
     try {
         $globaleneralConfCasesList = $conf->getConfiguration('ENVIRONMENT_SETTINGS', '');
     } catch (Exception $e) {
         $generalConfCasesList = array();
     }
     $dateFormat = "";
     $varFlag = isset($generalConfCasesList['casesListDateFormat']);
     if ($varFlag && !empty($generalConfCasesList['casesListDateFormat'])) {
         $dateFormat = $generalConfCasesList['casesListDateFormat'];
     }
     $r = new stdclass();
     $r->data = $aProcesses;
     $r->totalCount = $totalCount;
     $r->dataFormat = $dateFormat;
     echo Bootstrap::json_encode($r);
     break;
 case 'showGeneratedDocument':
开发者ID:bqevin,项目名称:processmaker,代码行数:31,代码来源:cases_Ajax.php

示例4: Publisher

 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 */
if ($RBAC->userCanAccess('PM_SETUP') != 1 && $RBAC->userCanAccess('PM_SETUP_ADVANCE') != 1) {
    G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
    //G::header('location: ../login/login');
    die;
}
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'setup';
$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) {
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:skinsList.php

示例5: array

         $G_PUBLISH->AddContent('propeltable', 'pagedTableLdap', 'authSources/ldapSearchResults', $oCriteria, ' ', array('Checkbox' => G::LoadTranslation('ID_MSG_CONFIRM_DELETE_CASE_SCHEDULER')));
     } else {
         if (file_exists(PATH_XMLFORM . 'authSources/' . $aFields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml')) {
             $G_PUBLISH->AddContent('propeltable', 'pagedTableLdap', 'authSources/' . $aFields['AUTH_SOURCE_PROVIDER'] . 'SearchResults', $oCriteria, ' ', array('Checkbox' => G::LoadTranslation('ID_MSG_CONFIRM_DELETE_CASE_SCHEDULER')));
         } else {
             $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', array('MESSAGE' => 'File: ' . $aFields['AUTH_SOURCE_PROVIDER'] . 'SearchResults.xml' . ' doesn\'t exist.'));
         }
     }
     G::RenderPage('publish', 'raw');
     break;
 case 'authSourcesList':
     require_once PATH_RBAC . 'model/AuthenticationSource.php';
     global $RBAC;
     G::LoadClass('configuration');
     $co = new Configurations();
     $config = $co->getConfiguration('authSourcesList', 'pageSize', '', $_SESSION['USER_LOGGED']);
     $limit_size = isset($config['pageSize']) ? $config['pageSize'] : 20;
     $start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
     $limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : $limit_size;
     $filter = isset($_REQUEST['textFilter']) ? $_REQUEST['textFilter'] : '';
     $Criterias = $RBAC->getAuthenticationSources($start, $limit, $filter);
     $Dat = AuthenticationSourcePeer::doSelectRS($Criterias['COUNTER']);
     $Dat->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $Dat->next();
     $row = $Dat->getRow();
     $total_sources = $row['CNT'];
     $oDataset = AuthenticationSourcePeer::doSelectRS($Criterias['LIST']);
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     global $RBAC;
     $auth = $RBAC->getAllUsersByAuthSource();
     $aSources = array();
开发者ID:nshong,项目名称:processmaker,代码行数:31,代码来源:authSources_Ajax.php

示例6: Publisher

 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 */
if (($RBAC_Response = $RBAC->userCanAccess("PM_LOGIN")) != 1) {
    return $RBAC_Response;
}
$G_PUBLISH = new Publisher();
G::LoadClass('configuration');
$c = new Configurations();
$configPage = $c->getConfiguration('casesSchedulerLogList', 'pageSize', '', $_SESSION['USER_LOGGED']);
$Config['pageSize'] = isset($configPage['pageSize']) ? $configPage['pageSize'] : 20;
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('cases/casesSchedulerLog', false);
//adding a javascript file .js
$oHeadPublisher->addContent('cases/casesSchedulerLog');
//adding a html file  .html.
$oHeadPublisher->assign('CONFIG', $Config);
G::RenderPage('publish', 'extJs');
开发者ID:bqevin,项目名称:processmaker,代码行数:31,代码来源:cases_Scheduler_Log.php

示例7: getDataGenerate

    /**
     * Get Data Generate
     *
     * @access public
     * @param string $pro_uid, Process Uid
     * @param string $tas_uid, Task Uid
     * @param string $dyn_uid, Dynaform Uid
     * @return string
     *
     * @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
     * @copyright Colosa - Bolivia
    */
    public function getDataGenerate($pro_uid, $tas_uid, $dyn_uid)
    {
        G::LoadClass ('case');
        G::LoadClass ('pmFunctions');
        G::LoadClass ("configuration");
        $hasTextArea = false;

        $conf = new \Configurations();
        $generalConfCasesList = $conf->getConfiguration("ENVIRONMENT_SETTINGS", "");
        if (isset($generalConfCasesList["casesListDateFormat"]) && !empty($generalConfCasesList["casesListDateFormat"])) {
            $dateFormat = $generalConfCasesList["casesListDateFormat"];
        } else {
            $dateFormat = "Y/m/d";
        }

        $oDyna = new \Dynaform();
        $dataTask = $oDyna->load($dyn_uid);
        if ($dataTask['DYN_VERSION'] > 0) {
            G::LoadClass("pmDynaform");
            $pmDyna = new \pmDynaform(array('APP_DATA' => array()));
            $pmDyna->fields["CURRENT_DYNAFORM"] = $dyn_uid;
            $json = G::json_decode($dataTask["DYN_CONTENT"]);
            $pmDyna->jsonr($json);
            $fieldsDyna = $json->items[0]->items;

            $xmlfrm = new \stdclass();
            $xmlfrm->fields = array();
            foreach ($fieldsDyna as $key => $value) {
                if ($value[0]->type == 'title' || $value[0]->type == 'submit') {
                    continue;
                }
                $temp = new \stdclass();
                $temp->type = $value[0]->type;
                $temp->label = $value[0]->label;
                $temp->name = $value[0]->name;
                $temp->required = (isset($value[0]->required)) ? $value[0]->required : 0;
                $temp->mode = (isset($value[0]->mode)) ? $value[0]->mode : 'edit';

                if (!empty($value[0]->options)) {
                    $temp->storeData = '[';
                    foreach ($value[0]->options as $valueOption) {
                        $temp->storeData .= '["' . $valueOption['value'] . '", "' . $valueOption['label'] . '"],';
                    }
                    $temp->storeData = substr($temp->storeData,0,-1);
                    $temp->storeData .= ']';
                }

                $temp->readOnly = ($temp->mode == 'view') ? "1" : "0";
                $temp->colWidth = 200;
                $xmlfrm->fields[] = $temp;
            }
        } else {
            $filename = $pro_uid . PATH_SEP . $dyn_uid . ".xml";
            if (!class_exists('Smarty')) {
                require_once(PATH_THIRDPARTY . 'smarty' . PATH_SEP . 'libs' . PATH_SEP . 'Smarty.class.php');  
            }
            $xmlfrm = new \XmlForm();
            $xmlfrm->home = PATH_DYNAFORM;
            $xmlfrm->parseFile($filename, SYS_LANG, true);    
        }

        $caseColumns      = array();
        $caseReaderFields = array();

        $dropList          = array();
        $comboBoxYesNoList = array();

        $caseColumns[] = array("header" => "APP_UID", "dataIndex" => "APP_UID", "width" => 100, "hidden" => true, "hideable" => false);
        $caseColumns[] = array("header" => "#", "dataIndex" => "APP_NUMBER", "width" => 40, "sortable" => true);
        $caseColumns[] = array("header" => G::LoadTranslation("ID_TITLE"), "dataIndex" => "APP_TITLE", "width" => 180, "renderer" => "renderTitle", "sortable" => true);
        $caseColumns[] = array("header" => G::LoadTranslation("ID_SUMMARY"), "width" => 60, "renderer" => "renderSummary", "align" => "center");
        $caseColumns[] = array("header" => "DEL_INDEX", "dataIndex" => "DEL_INDEX", "width" => 100, "hidden" => true, "hideable" => false);

        $caseReaderFields[] = array("name" => "APP_UID");
        $caseReaderFields[] = array("name" => "APP_NUMBER");
        $caseReaderFields[] = array("name" => "APP_TITLE");
        $caseReaderFields[] = array("name" => "DEL_INDEX");

        //$caseColumns[] = array("header" => "FLAG", "dataIndex" => "FLAG", "width" => 55, "xtype"=>"checkcolumn");
        //$caseReaderFields[] = array("name" => "FLAG", "type"=>"bool");

        foreach ($xmlfrm->fields as $index => $value) {
            $field = $value;

            $editor = null;
            $renderer = null;

            $readOnly = (isset($field->readOnly))? $field->readOnly : null;
//.........这里部分代码省略.........
开发者ID:hpx2206,项目名称:processmaker-1,代码行数:101,代码来源:Consolidated.php

示例8: catch

             }
         }
         $result->success = true;
     } catch (Exception $e) {
         $result->success = false;
         $result->msg = $e->getMessage();
     }
     echo G::json_encode($result);
     break;
 case 'list':
     require_once 'classes/model/AdditionalTables.php';
     G::LoadClass('configuration');
     G::LoadClass('processMap');
     $configigurations = new Configurations();
     $oProcessMap = new processMap();
     $config = $configigurations->getConfiguration('additionalTablesList', 'pageSize', '', $_SESSION['USER_LOGGED']);
     $env = $configigurations->getConfiguration('ENVIRONMENT_SETTINGS', '');
     $limit_size = isset($config['pageSize']) ? $config['pageSize'] : 20;
     $start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
     $limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : $limit_size;
     $filter = isset($_REQUEST['textFilter']) ? $_REQUEST['textFilter'] : '';
     $pro_uid = isset($_REQUEST['pro_uid']) ? $_REQUEST['pro_uid'] : '';
     $process = $pro_uid == '' ? array('not_equal' => $pro_uid) : array('equal' => $pro_uid);
     $addTab = AdditionalTables::getAll($start, $limit, $filter, $process);
     if ($pro_uid != '') {
         $c = $oProcessMap->getReportTablesCriteria($pro_uid);
         $oDataset = RoutePeer::doSelectRS($c);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $reportTablesOldList = array();
         while ($oDataset->next()) {
             $reportTablesOldList[] = $oDataset->getRow();
开发者ID:nshong,项目名称:processmaker,代码行数:31,代码来源:reportTables_Ajax.php

示例9: Configurations

$oHeadPublisher = & headPublisher::getSingleton();
global $RBAC;
switch ($page) {
    case "startCase":
        $oHeadPublisher->addExtJsScript( 'cases/casesStartCase', true ); //adding a javascript file .js
        $oHeadPublisher->addContent( 'cases/casesStartCase' ); //adding a html file  .html.
        G::LoadClass( 'configuration' );
        $c = new Configurations();
        $oHeadPublisher->assign( 'FORMATS', $c->getFormats() );
        break;
    case "documents":

        G::LoadClass( 'configuration' );
        $c = new Configurations();
        $configPage = $c->getConfiguration( 'documentsModule', 'pageSize', '', $_SESSION['USER_LOGGED'] );
        $configEnv = $c->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
        $Config['pageSize'] = isset( $configPage['pageSize'] ) ? $configPage['pageSize'] : 20;
        $oHeadPublisher->assign( 'CONFIG', $Config );
        $oHeadPublisher->assign( 'FORMATS', $c->getFormats() );

        $oHeadPublisher->assign( 'permitodelete', $RBAC->userCanAccess( 'PM_FOLDER_DELETE' ) );
        $oHeadPublisher->assign( 'permitoaddfile', $RBAC->userCanAccess( 'PM_FOLDERS_ADD_FILE' ) );
        $oHeadPublisher->assign( 'permitoaddfolder', $RBAC->userCanAccess( 'PM_FOLDERS_ADD_FOLDER' ) );

        $oHeadPublisher->addExtJsScript( 'cases/casesDocuments', false ); //adding a javascript file .js
        $oHeadPublisher->addContent( 'cases/casesDocuments' ); //adding a html file  .html.
        break;
    default:
        $oHeadPublisher->addExtJsScript( 'cases/casesStartPage', false ); //adding a javascript file .js
        $oHeadPublisher->addContent( 'cases/casesStartPage' ); //adding a html file  .html.
开发者ID:rrsc,项目名称:processmaker,代码行数:30,代码来源:casesStartPage.php

示例10: getAll

    public function getAll(
        $userUid,
        $start = null,
        $limit = null,
        $action = null,
        $filter = null,
        $search = null,
        $process = null,
        $status = null,
        $type = null,
        $dateFrom = null,
        $dateTo = null,
        $callback = null,
        $dir = null,
        $sort = "APP_CACHE_VIEW.APP_NUMBER",
        $category = null,
        $configuration = true,
        $paged = true
    ) {
        $callback = isset($callback)? $callback : "stcCallback1001";
        $dir = isset($dir)? $dir : "DESC";

        if (isset($sort)) {
            G::LoadClass('phpSqlParser');
            $parser = new PHPSQLParser($sort);
            $sort = $parser->parsed;
            $sort = $sort[''][0];
        }

        $sort = isset($sort)? $sort : "";
        $start = isset($start)? $start : "0";
        $limit = isset($limit)? $limit : "25";
        $filter = isset($filter)? $filter : "";
        $search = isset($search)? $search : "";
        $process = isset($process)? $process : "";
        $category = isset($category)? $category : "";
        $status = isset($status)? $status : "";
        $action = isset($action)? $action : "todo";
        $type = isset($type)? $type : "extjs";
        $dateFrom = isset($dateFrom)? $dateFrom : "";
        $dateTo = isset($dateTo)? $dateTo : "";

        G::LoadClass("BasePeer");
        G::LoadClass("configuration");
        //require_once ("classes/model/AppCacheView.php");
        //require_once ("classes/model/AppDelegation.php");
        //require_once ("classes/model/AdditionalTables.php");
        //require_once ("classes/model/AppDelay.php");
        //require_once ("classes/model/Fields.php");
        //require_once ("classes/model/Users.php");
        //require_once ("classes/model/Process.php");

        $oAppCache = new AppCacheView();

        if ($configuration == true) {
            //get data configuration
            $conf = new Configurations();
            $confCasesList = $conf->getConfiguration("casesList", ($action == "search" || $action == "simple_search")? "search" : $action);
            $oAppCache->confCasesList = $confCasesList;
        }

        $delimiter = DBAdapter::getStringDelimiter();

        // get the action based list
        switch ($action) {
            case "draft":
                $Criteria = $oAppCache->getDraftListCriteria($userUid);
                $CriteriaCount = $oAppCache->getDraftCountCriteria($userUid);
                break;
            case "sent":
                $Criteria = $oAppCache->getSentListCriteria($userUid);
                $CriteriaCount = $oAppCache->getSentCountCriteria($userUid);

                if (!empty($status)) {
                    $Criteria->add(AppCacheViewPeer::APP_STATUS, $status);
                    $CriteriaCount->add(AppCacheViewPeer::APP_STATUS, $status);
                }
                break;
            case "selfservice":
            case "unassigned":
                //$userUid can't be empty or null
                $Criteria = $oAppCache->getUnassignedListCriteria($userUid);
                $CriteriaCount = $oAppCache->getUnassignedCountCriteria($userUid);
                break;
            case "paused":
                $Criteria = $oAppCache->getPausedListCriteria($userUid);
                $CriteriaCount = $oAppCache->getPausedCountCriteria($userUid);
                break;
            case "completed":
                $Criteria = $oAppCache->getCompletedListCriteria($userUid);
                $CriteriaCount = $oAppCache->getCompletedCountCriteria($userUid);
                break;
            case "cancelled":
                $Criteria = $oAppCache->getCancelledListCriteria($userUid);
                $CriteriaCount = $oAppCache->getCancelledCountCriteria($userUid);
                break;
            case "search":
                //$Criteria = $oAppCache->getSearchListCriteria();
                //$CriteriaCount = $oAppCache->getSearchCountCriteria();

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

示例11: filterGroup

 public function filterGroup($filter, $start, $limit)
 {
     require_once 'classes/model/Groupwf.php';
     require_once 'classes/model/TaskUser.php';
     require_once 'classes/model/GroupUser.php';
     G::LoadClass('configuration');
     $co = new Configurations();
     $config = $co->getConfiguration('groupList', 'pageSize', '', $_SESSION['USER_LOGGED']);
     $env = $co->getConfiguration('ENVIRONMENT_SETTINGS', '');
     $limit_size = isset($config['pageSize']) ? $config['pageSize'] : 20;
     $start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
     $limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : $limit_size;
     $filter = isset($_REQUEST['textFilter']) ? $_REQUEST['textFilter'] : '';
     $oCriteria = new Criteria('workflow');
     $oCriteria->addSelectColumn(GroupwfPeer::GRP_UID);
     $oCriteria->addJoin(GroupwfPeer::GRP_UID, ContentPeer::CON_ID, Criteria::LEFT_JOIN);
     $oCriteria->add(ContentPeer::CON_CATEGORY, 'GRP_TITLE');
     $oCriteria->add(ContentPeer::CON_LANG, SYS_LANG);
     if ($filter != '') {
         $oCriteria->add(ContentPeer::CON_VALUE, '%' . $filter . '%', Criteria::LIKE);
     }
     $totalRows = GroupwfPeer::doCount($oCriteria);
     $oCriteria = new Criteria('workflow');
     $oCriteria->clearSelectColumns();
     $oCriteria->addSelectColumn(GroupwfPeer::GRP_UID);
     $oCriteria->addSelectColumn(GroupwfPeer::GRP_STATUS);
     $oCriteria->addSelectColumn(ContentPeer::CON_VALUE);
     $oCriteria->addAsColumn('GRP_TASKS', 0);
     $oCriteria->addAsColumn('GRP_USERS', 0);
     $oCriteria->addJoin(GroupwfPeer::GRP_UID, ContentPeer::CON_ID, Criteria::LEFT_JOIN);
     $oCriteria->add(ContentPeer::CON_CATEGORY, 'GRP_TITLE');
     $oCriteria->add(ContentPeer::CON_LANG, SYS_LANG);
     if ($filter != '') {
         $oCriteria->add(ContentPeer::CON_VALUE, '%' . $filter . '%', Criteria::LIKE);
     }
     $oCriteria->setOffset($start);
     $oCriteria->setLimit($limit);
     $oDataset = GroupwfPeer::doSelectRS($oCriteria);
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
 }
开发者ID:bqevin,项目名称:processmaker,代码行数:40,代码来源:Groupwf.php

示例12: foreach

 $translationsEnvList = $translationRow->getTranslationEnvironments();
 //print_r($translationsEnvList); die;
 $i = 0;
 foreach ($translationsEnvList as $locale => $translationRow) {
     $COUNTRY_ID = $translationRow['IC_UID'];
     if ($COUNTRY_ID != '') {
         $isoCountryRecord = $isoCountry->findById(strtoupper($COUNTRY_ID));
         $flag = strtolower($isoCountryRecord['IC_UID']);
         $countryName = $translationRow['HEADERS']['X-Poedit-Country'];
     } else {
         $flag = 'international';
         $countryName = G::LoadTranslation('ID_INTERNATIONAL');
     }
     G::LoadClass('configuration');
     $conf = new Configurations();
     $confCasesList = $conf->getConfiguration('casesList', 'todo');
     //echo date($confCasesList['dateformat'], '2010-01-01');
     if (isset($confCasesList['dateformat'])) {
         $datetime = explode(' ', $translationRow['DATE']);
         $date = explode('-', $datetime[0]);
         if (count($datetime) == 2) {
             $time = explode(':', $datetime[1]);
         }
         if (count($date) == 3) {
             if (count($time) >= 2) {
                 $DATE = date($confCasesList['dateformat'], mktime($time[0], $time[1], 0, $date[1], $date[2], $date[0]));
             } else {
                 $DATE = date($confCasesList['dateformat'], mktime(0, 0, 0, $date[1], $date[2], $date[0]));
             }
         } else {
             $DATE = $translationRow['DATE'];
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:language_Ajax.php

示例13: getList

    /**
     * Get list for Cases
     *
     * @access public
     * @param array $dataList, Data for list
     * @return array
     *
     * @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
     * @copyright Colosa - Bolivia
     */
    public function getList($dataList = array())
    {
        Validator::isArray($dataList, '$dataList');
        if (!isset($dataList["userId"])) {
            throw (new \Exception(\G::LoadTranslation("ID_USER_NOT_EXIST", array('userId',''))));
        } else {
            Validator::usrUid($dataList["userId"], "userId");
        }

        $user = new \ProcessMaker\BusinessModel\User();

        if (!$user->checkPermission($dataList["userId"], "PM_ALLCASES")) {
            throw new \Exception(\G::LoadTranslation("ID_CASE_USER_NOT_HAVE_PERMISSION", array($dataList["userId"])));
        }

        G::LoadClass("applications");
        $solrEnabled = false;
        $userUid = $dataList["userId"];
        $callback = isset( $dataList["callback"] ) ? $dataList["callback"] : "stcCallback1001";
        $dir = isset( $dataList["dir"] ) ? $dataList["dir"] : "DESC";
        $sort = isset( $dataList["sort"] ) ? $dataList["sort"] : "APP_CACHE_VIEW.APP_NUMBER";
        $start = isset( $dataList["start"] ) ? $dataList["start"] : "0";
        $limit = isset( $dataList["limit"] ) ? $dataList["limit"] : "";
        $filter = isset( $dataList["filter"] ) ? $dataList["filter"] : "";
        $process = isset( $dataList["process"] ) ? $dataList["process"] : "";
        $category = isset( $dataList["category"] ) ? $dataList["category"] : "";
        $status = isset( $dataList["status"] ) ? strtoupper( $dataList["status"] ) : "";
        $user = isset( $dataList["user"] ) ? $dataList["user"] : "";
        $search = isset( $dataList["search"] ) ? $dataList["search"] : "";
        $action = isset( $dataList["action"] ) ? $dataList["action"] : "todo";
        $paged = isset( $dataList["paged"] ) ? $dataList["paged"] : true;
        $type = "extjs";
        $dateFrom = (!empty( $dataList["dateFrom"] )) ? substr( $dataList["dateFrom"], 0, 10 ) : "";
        $dateTo = (!empty( $dataList["dateTo"] )) ? substr( $dataList["dateTo"], 0, 10 ) : "";
        $first = isset( $dataList["first"] ) ? true :false;

        $valuesCorrect = array('todo', 'draft', 'paused', 'sent', 'selfservice', 'unassigned', 'search');
        if (!in_array($action, $valuesCorrect)) {
            throw (new \Exception(\G::LoadTranslation("ID_INCORRECT_VALUE_ACTION")));
        }

        $start = (int)$start;
        $start = abs($start);
        if ($start != 0) {
            $start--;
        }
        $limit = (int)$limit;
        $limit = abs($limit);
        if ($limit == 0) {
            G::LoadClass("configuration");
            $conf = new \Configurations();
            $generalConfCasesList = $conf->getConfiguration('ENVIRONMENT_SETTINGS', '');
            if (isset($generalConfCasesList['casesListRowNumber'])) {
                $limit = (int)$generalConfCasesList['casesListRowNumber'];
            } else {
                $limit = 25;
            }
        } else {
            $limit = (int)$limit;
        }
        if ($sort != 'APP_CACHE_VIEW.APP_NUMBER') {
            $sort = G::toUpper($sort);
            $columnsAppCacheView = \AppCacheViewPeer::getFieldNames(\BasePeer::TYPE_FIELDNAME);
            if (!(in_array($sort, $columnsAppCacheView))) {
                $sort = 'APP_CACHE_VIEW.APP_NUMBER';
            }
        }
        $dir = G::toUpper($dir);
        if (!($dir == 'DESC' || $dir == 'ASC')) {
            $dir = 'DESC';
        }
        if ($process != '') {
            Validator::proUid($process, '$pro_uid');
        }
        if ($category != '') {
            Validator::catUid($category, '$cat_uid');
        }
        $status = G::toUpper($status);
        $listStatus = array('TO_DO', 'DRAFT', 'COMPLETED', 'CANCEL', 'OPEN', 'CLOSE');
        if (!(in_array($status, $listStatus))) {
            $status = '';
        }
        if ($user != '') {
            Validator::usrUid($user, '$usr_uid');
        }
        if ($dateFrom != '') {
            Validator::isDate($dateFrom, 'Y-m-d', '$date_from');
        }
        if ($dateTo != '') {
            Validator::isDate($dateTo, 'Y-m-d', '$date_to');
//.........这里部分代码省略.........
开发者ID:nhenderson,项目名称:processmaker,代码行数:101,代码来源:Cases.php

示例14: getAppsData

 public function getAppsData($type, $start = null, $limit = null, $user = null, $filter = null, $search = null, $process = null, $status = null, $dateFrom = null, $dateTo = null, $callback = null, $dir = null, $sort = "APP_CACHE_VIEW.APP_NUMBER", $category = null)
 {
     require_once "classes/model/AppNotes.php";
     G::LoadClass('applications');
     $apps = new Applications();
     $appNotes = new AppNotes();
     $start = empty($start) ? $this->appListStart : $start;
     $limit = empty($limit) ? $this->appListLimit : $limit;
     $notesStart = 0;
     $notesLimit = 4;
     switch ($user) {
         case 'CURRENT_USER':
             $user = $this->userID;
             break;
         case 'ALL':
             $user = null;
             break;
         case null:
             $user = $this->userID;
             break;
         default:
             //$user = $this->userID;
             break;
     }
     $cases = $apps->getAll($user, $start, $limit, $type, $filter, $search, $process, $status, $type, $dateFrom, $dateTo, $callback, $dir, $sort, $category, false);
     // formating & complitting apps data with 'Notes'
     foreach ($cases['data'] as $i => $row) {
         // Formatting
         $appTitle = str_replace('#', '', $row['APP_TITLE']);
         if (is_numeric($appTitle)) {
             $cases['data'][$i]['APP_TITLE'] = G::LoadTranslation('ID_CASE') . ' ' . $appTitle;
         }
         if (isset($row['DEL_DELEGATE_DATE'])) {
             G::LoadClass("configuration");
             $conf = new Configurations();
             $generalConfCasesList = $conf->getConfiguration('ENVIRONMENT_SETTINGS', '');
             $cases['data'][$i]['DEL_DELEGATE_DATE'] = '';
             if (defined('SYS_SYS')) {
                 if (isset($generalConfCasesList['casesListDateFormat']) && !empty($generalConfCasesList['casesListDateFormat'])) {
                     $cases['data'][$i]['DEL_DELEGATE_DATE'] = $conf->getSystemDate($row['DEL_DELEGATE_DATE'], 'casesListDateFormat');
                 }
             }
             if ($cases['data'][$i]['DEL_DELEGATE_DATE'] == '') {
                 $cases['data'][$i]['DEL_DELEGATE_DATE'] = $conf->getSystemDate($row['DEL_DELEGATE_DATE']);
             }
         }
         if (isset($row['APP_DEL_PREVIOUS_USER'])) {
             $cases['data'][$i]['APP_DEL_PREVIOUS_USER'] = ucwords($row['APP_DEL_PREVIOUS_USER']);
         }
         // Completting with Notes
         $notes = $appNotes->getNotesList($row['APP_UID'], '', $notesStart, $notesLimit);
         $notes = $notes['array'];
         $cases['data'][$i]['NOTES_COUNT'] = $notes['totalCount'];
         $cases['data'][$i]['NOTES_LIST'] = $notes['notes'];
     }
     return $cases;
 }
开发者ID:bqevin,项目名称:processmaker,代码行数:57,代码来源:home.php

示例15: array

     print G::json_encode($result);
     break;
 case "getCasesListDateFormat":
     $result->rows = Configurations::getDateFormats();
     print G::json_encode($result);
     break;
 case "getCasesListRowNumber":
     for ($i = 10; $i <= 50; $i += 5) {
         $formats[] = array("id" => "{$i}", "name" => "{$i}");
     }
     $result->rows = $formats;
     print G::json_encode($result);
     break;
 case "save":
     $conf = new Configurations();
     $config = $conf->getConfiguration("ENVIRONMENT_SETTINGS", "");
     if (is_numeric($config)) {
         $config = array();
     }
     if (isset($_POST["userFormat"])) {
         $config['format'] = $_POST["userFormat"];
     }
     if (isset($_POST["dateFormat"])) {
         $config['dateFormat'] = $_POST["dateFormat"];
     }
     $config['startCaseHideProcessInf'] = isset($_POST["hideProcessInf"]) ? true : false;
     if (isset($_POST["casesListDateFormat"])) {
         $config['casesListDateFormat'] = $_POST["casesListDateFormat"];
     }
     if (isset($_POST["casesListDateFormat"])) {
         $config['casesListRowNumber'] = intval($_POST["casesListRowNumber"]);
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:environmentSettingsAjax.php


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