• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Configurations类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了Configurations类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: updatePageSize

function updatePageSize()
{
    G::LoadClass('configuration');
    $c = new Configurations();
    $arr['pageSize'] = $_REQUEST['size'];
    $arr['dateSave'] = date('Y-m-d H:i:s');
    $config = array();
    $config[] = $arr;
    $c->aConfig = $config;
    $c->saveConfig('skinsList', 'pageSize', '', $_SESSION['USER_LOGGED']);
    echo '{success: true}';
}
开发者ID:emildev35,项目名称:processmaker,代码行数:12,代码来源:skin_Ajax.php


示例3: getStatusCodesConfiguration

 /**
  * @param $config_file could be specified only the first time (due to option constructor of singleton)
  */
 public static function getStatusCodesConfiguration($config_file = '')
 {
     if (empty($config_file) && !file_exists($config_file)) {
         $config_file = SETUP_DIRECTORY . '/../config/status.sample.json';
     }
     return Configurations::getInstance()->getConfiguration(self::KEY_STATUS_CONFIGURATION, $config_file);
 }
开发者ID:laubosslink,项目名称:lab,代码行数:10,代码来源:utils.php


示例4: loadModel

 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return Configurations the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Configurations::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
开发者ID:kuldeepro,项目名称:yiiexam,代码行数:15,代码来源:ConfigurationsController.php


示例5: LookForChildren

/**
 * departments_Ajax.php
 *
 * ProcessMaker Open Source Edition
 * Copyright (C) 2004 - 2008 Colosa Inc.23
 *
 * 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 [email protected].
 */
function LookForChildren($parent, $level, $aDepUsers)
{
    G::LoadClass('configuration');
    $conf = new Configurations();
    $oDept = new Department();
    $allDepartments = $oDept->getDepartments($parent);
    $level++;
    $rows = array();
    foreach ($allDepartments as $department) {
        unset($depto);
        $depto['DEP_TITLE'] = str_replace(array("<", ">"), array("&lt;", "&gt;"), $department['DEP_TITLE']);
        $depto['DEP_STATUS'] = $department['DEP_STATUS'];
        if ($department['DEP_MANAGER_USERNAME'] != '') {
            $depto['DEP_MANAGER_NAME'] = $conf->usersNameFormat($department['DEP_MANAGER_USERNAME'], $department['DEP_MANAGER_FIRSTNAME'], $department['DEP_MANAGER_LASTNAME']);
        } else {
            $depto['DEP_MANAGER_NAME'] = '';
        }
        $depto['DEP_TOTAL_USERS'] = isset($aDepUsers[$department['DEP_UID']]) ? $aDepUsers[$department['DEP_UID']] : 0;
        $depto['DEP_UID'] = $department['DEP_UID'];
        $depto['DEP_MANAGER'] = $department['DEP_MANAGER'];
        $depto['DEP_PARENT'] = $department['DEP_PARENT'];
        if ($department['HAS_CHILDREN'] > 0) {
            $depto['children'] = LookForChildren($department['DEP_UID'], $level, $aDepUsers);
            $depto['iconCls'] = 'ss_sprite ss_chart_organisation';
            $depto['expanded'] = true;
        } else {
            $depto['leaf'] = true;
            if ($level == 1) {
                $depto['iconCls'] = 'ss_sprite ss_chart_organisation';
            } else {
                $depto['iconCls'] = 'ss_sprite ss_plugin';
            }
        }
        $rows[] = $depto;
    }
    return $rows;
}
开发者ID:bqevin,项目名称:processmaker,代码行数:59,代码来源:departments_Ajax.php


示例6: sendEmail

 /**
  * Sends an email with a link, for resetting the password.
  *
  * @return boolean whether the email was send
  */
 public function sendEmail()
 {
     /* @var $user User */
     $user = User::findOne(['status' => User::STATUS_ACTIVE, 'email' => $this->email]);
     if ($user) {
         if (!User::isPasswordResetTokenValid($user->password_reset_token)) {
             $user->generatePasswordResetToken();
         }
         if ($user->save()) {
             $admin_email = Configurations::find()->where(['key' => 'admin_email'])->one();
             return \Yii::$app->mailer->compose(['html' => 'passwordResetToken-html', 'text' => 'passwordResetToken-text'], ['user' => $user])->setFrom($admin_email->value)->setTo($this->email)->setSubject('Password reset for ' . \Yii::$app->name)->send();
         }
     }
     return false;
 }
开发者ID:Junaid-Farid,项目名称:staylance-new,代码行数:20,代码来源:PasswordResetRequestForm.php


示例7: actionIndex

 public function actionIndex()
 {
     //to hide welcome message - Rajith
     if (isset($_POST['hide'])) {
         //permanant hide
         if (isset($_POST['dontshow'])) {
             $config = Configurations::model()->findByAttributes(array('id' => 21));
             if ($config != NULL) {
                 $config->config_value = 1;
                 $config->save();
             }
         }
         $this->redirect(array('/mailbox'));
     }
     //check
     $config = Configurations::model()->findByAttributes(array('id' => 21));
     if ($config != NULL) {
         if ($config->config_value) {
             $this->redirect(array('/mailbox'));
         }
     }
     $this->render(Yii::app()->getModule('message')->viewPath . '/index');
 }
开发者ID:SoftScape,项目名称:open-school-CE,代码行数:23,代码来源:IndexController.php


示例8: Publisher

 *
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email [email protected].
 */
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');
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:skinsList.php


示例9: actionAjax_delete

 public function actionAjax_delete()
 {
     $id = $_POST['id'];
     $deleted = $this->loadModel($id);
     $deleted_batch_id = $deleted->batch_id;
     // Saving the id of the batch that is going to be deleted.
     if ($deleted->delete()) {
         //Adding activity to feed via saveFeed($initiator_id,$activity_type,$goal_id,$goal_name,$field_name,$initial_field_value,$new_field_value)
         ActivityFeed::model()->saveFeed(Yii::app()->user->Id, '13', $deleted_batch_id, ucfirst($deleted->name), NULL, NULL, NULL);
         // For SMS
         $sms_settings = SmsSettings::model()->findAll();
         $to = '';
         if ($sms_settings[0]->is_enabled == '1' and $sms_settings[5]->is_enabled == '1') {
             // Checking if SMS is enabled.
             $students = Students::model()->findAll("batch_id=:x", array(':x' => $deleted_batch_id));
             //Selecting students of the batch
             foreach ($students as $student) {
                 if ($student->phone1) {
                     // Checking if phone number is provided
                     $to = $student->phone1;
                 } elseif ($student->phone2) {
                     $to = $student->phone2;
                 }
                 if ($to != '') {
                     // Sending SMS to each student
                     $college = Configurations::model()->findByPk(1);
                     $from = $college->config_value;
                     $message = $deleted->name . ' is cancelled';
                     SmsSettings::model()->sendSms($to, $from, $message);
                 }
             }
         }
         // End For SMS
         // Delete Exam and exam score
         $exam = Exams::model()->findAllByAttributes(array('exam_group_id' => $id));
         //print_r($exam);
         foreach ($exam as $exam1) {
             $examscore = ExamScores::model()->findAllByAttributes(array('exam_id' => $exam1->id));
             foreach ($examscore as $examscore1) {
                 $examscore1->delete();
             }
             $exam1->delete();
         }
         // End Delete Exam and exam score
         echo json_encode(array('success' => true));
         exit;
     } else {
         echo json_encode(array('success' => false));
         exit;
     }
 }
开发者ID:akilraj1255,项目名称:rajeshwari,代码行数:51,代码来源:Backup+1+of+ExamController.php


示例10: getOwnerByDasUid

    /**
     * Get list All owners of dashboards
     *
     * @access public
     * @param array $options, Data for list
     * @return array
     *
     * @author Marco Antonio Nina <[email protected]>
     * @copyright Colosa - Bolivia
     */
    public function getOwnerByDasUid($options = array())
    {
        Validator::isArray($options, '$options');
        
        G::LoadClass("dashboards");
        $das_uid = isset( $options["das_uid"] ) ? $options["das_uid"] : "";
        $start = isset( $options["start"] ) ? $options["start"] : "0";
        $limit = isset( $options["limit"] ) ? $options["limit"] : "";
        $search = isset( $options["search"] ) ? $options["search"] : "";
        $paged = isset( $options["paged"] ) ? $options["paged"] : true;
        $type = "extjs";

        $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();
            $configList = $conf->getConfiguration('ENVIRONMENT_SETTINGS', '');
            if (isset($configList['casesListRowNumber'])) {
                $limit = (int)$configList['casesListRowNumber'];
            } else {
                $limit = 25;
            }
        } else {
            $limit = (int)$limit;
        }

        $dashboards = new \Dashboards();
        $result = $dashboards->getOwnerByDasUid($das_uid, $start, $limit, $search);


        if ($paged == false) {
            $response = $result['data'];
        } else {
            $response['totalCount'] = $result['totalCount'];
            $response['start'] = $start+1;
            $response['limit'] = $limit;
            $response['search']   = $search;

            $response['owner'] = $result['data'];
        }
        return $response;
    }   
开发者ID:hpx2206,项目名称:processmaker-1,代码行数:58,代码来源:Dashboard.php


示例11: array

     if ($aFields['AUTH_SOURCE_PROVIDER'] != 'ldap') {
         $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();
开发者ID:nshong,项目名称:processmaker,代码行数:31,代码来源:authSources_Ajax.php


示例12: gotDirectoryStructureVer2

 /**
  * Extract the structure version value from serializated table field and check it.
  * @return true if the version is bigger than 1
  */
 public function gotDirectoryStructureVer2()
 {
     G::LoadClass("configuration");
     $configuration = new Configurations();
     if (defined('SYS_SYS') && $configuration->exists("ENVIRONMENT_SETTINGS")) {
         return $configuration->getDirectoryStructureVer() > 1;
     }
     return false;
 }
开发者ID:nhenderson,项目名称:processmaker,代码行数:13,代码来源:class.g.php


示例13: getList


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

                $listpeer = 'ListUnassignedPeer';

                break;

        }





        // Validate filters

        $filters["start"] = (int)$filters["start"];

        $filters["start"] = abs($filters["start"]);

        if ($filters["start"] != 0) {

            $filters["start"]+1;

        }



        $filters["limit"] = (int)$filters["limit"];

        $filters["limit"] = abs($filters["limit"]);

        if ($filters["limit"] == 0) {

            G::LoadClass("configuration");

            $conf = new \Configurations();

            $generalConfCasesList = $conf->getConfiguration('ENVIRONMENT_SETTINGS', '');

            if (isset($generalConfCasesList['casesListRowNumber'])) {

                $filters["limit"] = (int)$generalConfCasesList['casesListRowNumber'];

            } else {

                $filters["limit"] = 25;

            }

        } else {

            $filters["limit"] = (int)$filters["limit"];

        }



        $filters["sort"] = G::toUpper($filters["sort"]);

        $columnsList = $listpeer::getFieldNames(\BasePeer::TYPE_FIELDNAME);

        if (!(in_array($filters["sort"], $columnsList))) {

            $filters["sort"] = '';

        }

开发者ID:rrsc,项目名称:processmaker,代码行数:65,代码来源:Lists.php


示例14: getAllProcesses

 public function getAllProcesses($start, $limit, $category = null, $processName = null, $counters = true, $reviewSubProcess = false, $userLogged = "")
 {
     require_once PATH_RBAC . "model/RbacUsers.php";
     require_once "classes/model/ProcessCategory.php";
     require_once "classes/model/Users.php";
     $user = new RbacUsers();
     $aProcesses = array();
     $categories = array();
     $oCriteria = new Criteria('workflow');
     $oCriteria->addSelectColumn(ProcessPeer::PRO_UID);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_PARENT);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_STATUS);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_TYPE);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_CATEGORY);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_UPDATE_DATE);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_CREATE_DATE);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_CREATE_USER);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_DEBUG);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_TYPE_PROCESS);
     $oCriteria->addSelectColumn(UsersPeer::USR_UID);
     $oCriteria->addSelectColumn(UsersPeer::USR_USERNAME);
     $oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
     $oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME);
     $oCriteria->addSelectColumn(ProcessCategoryPeer::CATEGORY_UID);
     $oCriteria->addSelectColumn(ProcessCategoryPeer::CATEGORY_NAME);
     $oCriteria->add(ProcessPeer::PRO_UID, '', Criteria::NOT_EQUAL);
     $oCriteria->add(ProcessPeer::PRO_STATUS, 'DISABLED', Criteria::NOT_EQUAL);
     if ($reviewSubProcess) {
         $oCriteria->add(ProcessPeer::PRO_SUBPROCESS, '1', Criteria::NOT_EQUAL);
     }
     if (isset($category)) {
         $oCriteria->add(ProcessPeer::PRO_CATEGORY, $category, Criteria::EQUAL);
     }
     $oCriteria->addJoin(ProcessPeer::PRO_CREATE_USER, UsersPeer::USR_UID, Criteria::LEFT_JOIN);
     $oCriteria->addJoin(ProcessPeer::PRO_CATEGORY, ProcessCategoryPeer::CATEGORY_UID, Criteria::LEFT_JOIN);
     if ($this->sort == "PRO_CREATE_DATE") {
         if ($this->dir == "DESC") {
             $oCriteria->addDescendingOrderByColumn(ProcessPeer::PRO_CREATE_DATE);
         } else {
             $oCriteria->addAscendingOrderByColumn(ProcessPeer::PRO_CREATE_DATE);
         }
     }
     if ($userLogged != "") {
         $oCriteria->add($oCriteria->getNewCriterion(ProcessPeer::PRO_TYPE_PROCESS, "PUBLIC", Criteria::EQUAL)->addOr($oCriteria->getNewCriterion(ProcessPeer::PRO_CREATE_USER, $userLogged, Criteria::EQUAL)));
     }
     $this->tmpCriteria = clone $oCriteria;
     //execute a query to obtain numbers, how many cases there are by process
     if ($counters) {
         $casesCnt = $this->getCasesCountInAllProcesses();
     }
     // getting bpmn projects
     $c = new Criteria('workflow');
     $c->addSelectColumn(BpmnProjectPeer::PRJ_UID);
     $ds = ProcessPeer::doSelectRS($c, Propel::getDbConnection('workflow_ro'));
     $ds->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $bpmnProjects = array();
     while ($ds->next()) {
         $row = $ds->getRow();
         $bpmnProjects[] = $row['PRJ_UID'];
     }
     //execute the query
     $oDataset = ProcessPeer::doSelectRS($oCriteria);
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $processes = array();
     $uids = array();
     while ($oDataset->next()) {
         $row = $oDataset->getRow();
         $row["PROJECT_TYPE"] = $row["PRO_TYPE"] == "NORMAL" ? in_array($row["PRO_UID"], $bpmnProjects) ? "bpmn" : "classic" : $row["PRO_TYPE"];
         $processes[] = $row;
         $uids[] = $processes[sizeof($processes) - 1]['PRO_UID'];
     }
     //process details will have the info about the processes
     $processesDetails = array();
     //now get the labels for all process, using an array of Uids,
     $c = new Criteria('workflow');
     //$c->add ( ContentPeer::CON_CATEGORY, 'PRO_TITLE', Criteria::EQUAL );
     $c->add(ContentPeer::CON_LANG, defined('SYS_LANG') ? SYS_LANG : 'en', Criteria::EQUAL);
     $c->add(ContentPeer::CON_ID, $uids, Criteria::IN);
     $dt = ContentPeer::doSelectRS($c, Propel::getDbConnection('workflow_ro'));
     $dt->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     while ($dt->next()) {
         $row = $dt->getRow();
         $processesDetails[$row['CON_ID']][$row['CON_CATEGORY']] = $row['CON_VALUE'];
     }
     G::loadClass('configuration');
     $oConf = new Configurations();
     $oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', '');
     foreach ($processes as $process) {
         $proTitle = isset($processesDetails[$process['PRO_UID']]) && isset($processesDetails[$process['PRO_UID']]['PRO_TITLE']) ? $processesDetails[$process['PRO_UID']]['PRO_TITLE'] : '';
         $proDescription = isset($processesDetails[$process['PRO_UID']]) && isset($processesDetails[$process['PRO_UID']]['PRO_DESCRIPTION']) ? $processesDetails[$process['PRO_UID']]['PRO_DESCRIPTION'] : '';
         $process["PRO_TYPE_PROCESS"] = $process["PRO_TYPE_PROCESS"] == "PUBLIC" ? G::LoadTranslation("ID_PUBLIC") : G::LoadTranslation("ID_PRIVATE");
         // verify if the title is already set on the current language
         if (trim($proTitle) == '') {
             // if not, then load the record to generate content for current language
             $proData = $this->load($process['PRO_UID']);
             $proTitle = $proData['PRO_TITLE'];
             $proDescription = $proData['PRO_DESCRIPTION'];
         }
         //filtering by $processName
         if (isset($processName) && $processName != '' && stripos($proTitle, $processName) === false) {
//.........这里部分代码省略.........
开发者ID:emildev35,项目名称:processmaker,代码行数:101,代码来源:Process.php


示例15: actionCreate

 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     $model = new Guardians();
     $check_flag = 0;
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if ($_POST['student_id']) {
         $guardian = Students::model()->findByAttributes(array('id' => $_POST['student_id']));
         $gid = $guardian->parent_id;
     } elseif ($_POST['guardian_id']) {
         $gid = $_POST['guardian_id'];
     } elseif ($_POST['guardian_mail']) {
         $gid = $_POST['guardian_mail'];
     }
     if ($gid != NULL and $gid != 0) {
         $model = Guardians::model()->findByAttributes(array('id' => $gid));
         $this->render('create', array('model' => $model, 'radio_flag' => 1, 'guardian_id' => $gid));
     } elseif ((isset($_POST['student_id']) or isset($_POST['guardian_id']) or isset($_POST['guardian_mail'])) and ($gid == NULL or $gid == 0)) {
         Yii::app()->user->setFlash('errorMessage', UserModule::t("Guardian not found..!"));
     }
     if (isset($_POST['Guardians'])) {
         $model->attributes = $_POST['Guardians'];
         $model->validate();
         if ($_POST['Guardians']['user_create'] == 1) {
             $check_flag = 1;
         }
         //print_r($_POST['Guardians']); exit;
         if ($model->save()) {
             //echo $model->ward_id; exit;
             $student = Students::model()->findByAttributes(array('id' => $model->ward_id));
             $student->saveAttributes(array('parent_id' => $model->id));
             if ($_POST['Guardians']['user_create'] == 0) {
                 //adding user for current guardian
                 $user = new User();
                 $profile = new Profile();
                 $user->username = substr(md5(uniqid(mt_rand(), true)), 0, 10);
                 $user->email = $model->email;
                 $user->activkey = UserModule::encrypting(microtime() . $model->first_name);
                 $password = substr(md5(uniqid(mt_rand(), true)), 0, 10);
                 $user->password = UserModule::encrypting($password);
                 $user->superuser = 0;
                 $user->status = 1;
                 if ($user->save()) {
                     //assign role
                     $authorizer = Yii::app()->getModule("rights")->getAuthorizer();
                     $authorizer->authManager->assign('parent', $user->id);
                     //profile
                     $profile->firstname = $model->first_name;
                     $profile->lastname = $model->last_name;
                     $profile->user_id = $user->id;
                     $profile->save();
                     //saving user id to guardian table.
                     $model->saveAttributes(array('uid' => $user->id));
                     //$model->uid = $user->id;
                     //$model->save();
                     // for sending sms
                     $sms_settings = SmsSettings::model()->findAll();
                     $to = '';
                     if ($sms_settings[0]->is_enabled == '1' and $sms_settings[2]->is_enabled == '1') {
                         // Checking if SMS is enabled.
                         if ($model->mobile_phone) {
                             $to = $model->mobile_phone;
                         }
                         if ($to != '') {
                             // Send SMS if phone number is provided
                             $college = Configurations::model()->findByPk(1);
                             $from = $college->config_value;
                             $message = 'Welcome to ' . $college->config_value;
                             SmsSettings::model()->sendSms($to, $from, $message);
                         }
                         // End send SMS
                     }
                     // End check if SMS is enabled
                     UserModule::sendMail($model->email, UserModule::t("You registered from {site_name}", array('{site_name}' => Yii::app()->name)), UserModule::t("Please login to your account with your email id as username and password {password}", array('{password}' => $password)));
                 }
             }
             $this->redirect(array('addguardian', 'id' => $model->ward_id));
         }
     }
     $this->render('create', array('model' => $model, 'check_flag' => $check_flag));
 }
开发者ID:SoftScape,项目名称:open-school-CE,代码行数:85,代码来源:GuardiansController.php


示例16: Exception

        $_GET['DEL_INDEX'] = $oCase->getCurrentDelegation($_GET['APP_UID'], $_SESSION['USER_LOGGED']);
        if (is_null($_GET['APP_UID'])) {
            throw new Exception(G::LoadTranslation('ID_CASE_DOES_NOT_EXISTS'));
        }
        if (is_null($_GET['DEL_INDEX'])) {
            throw new Exception(G::LoadTranslation('ID_CASE_IS_CURRENTLY_WITH_ANOTHER_USER'));
        }
    } else {
        throw new Exception("Application ID or Delegation Index is missing!. The System can't open the case.");
    }
}
require_once "classes/model/Step.php";
G::LoadClass("configuration");
G::LoadClass("case");
$oCase = new Cases();
$conf = new Configurations();
$oHeadPublisher =& headPublisher::getSingleton();
$oHeadPublisher->addExtJsScript('app/main', true);
$oHeadPublisher->addExtJsScript('cases/open', true);
$oHeadPublisher->assign('FORMATS', $conf->getFormats());
$uri = '';
foreach ($_GET as $k => $v) {
    $uri .= $uri == '' ? "{$k}={$v}" : "&{$k}={$v}";
}
//$case = $oCase->loadCase( $_GET['APP_UID'], $_GET['DEL_INDEX'] );
if (isset($_GET['action']) && $_GET['action'] == 'jump') {
    $case = $oCase->loadCase($_GET['APP_UID'], $_GET['DEL_INDEX'], $_GET['action']);
} else {
    $case = $oCase->loadCase($_GET['APP_UID'], $_GET['DEL_INDEX']);
}
if (!isset($_GET['to_revise'])) {
开发者ID:norahmollo,项目名称:processmaker,代码行数:31,代码来源:open.php


示例17:

                        <?php 
 $logo = Logo::model()->findAll();
 ?>
                         <?php 
 if ($logo != NULL) {
     //Yii::app()->runController('Configurations/displayLogoImage/id/'.$logo[0]->primaryKey);
     echo '<img src="uploadedfiles/school_logo/' . $logo[0]->photo_file_name . '" alt="' . $logo[0]->photo_file_name . '" class="imgbrder" width="100%" />';
 }
 ?>
             </td>
             <td align="center" valign="middle" class="first" style="width:300px;">
                 <table width="100%" border="0" cellspacing="0" cellpadding="0">
                     <tr>
                         <td class="listbxtop_hdng first" style="text-align:left; font-size:22px; width:300px;  padding-left:10px;">
                             <?php 
 $college = Configurations::model()->findAll();
 ?>
                             <?php 
 echo $college[0]->config_value;
 ?>
                         </td>
                     </tr>
                     <tr>
                         <td class="listbxtop_hdng first" style="text-align:left; font-size:14px; padding-left:10px;">
                             <?php 
 echo $college[1]->config_value;
 ?>
                         </td>
                     </tr>
                     <tr>
                         <td class="listbxtop_hdng first" style="text-align:left; font-size:14px; padding-left:10px;">
开发者ID:akilraj1255,项目名称:rajeshwari,代码行数:31,代码来源:studentexampdf.php


示例18: getAdditionalFields

/**
 * loads the PM Table field list from the database based in an action parameter
 * then assemble the List of fields with these data, for the configuration in cases list.
 *
 * @param String $action
 * @return Array $config
 *
 */
function getAdditionalFields($action, $confCasesList = array())
{
    $config = new Configurations();
    $arrayConfig = $config->casesListDefaultFieldsAndConfig($action);
    if (is_array($confCasesList) && count($confCasesList) > 0 && count($confCasesList["second"]["data"]) > 0) {
        //For the case list builder in the enterprise plugin
        $caseColumns = array();
        $caseReaderFields = array();
        $caseReaderFieldsAux = array();
        foreach ($confCasesList["second"]["data"] as $index1 => $value1) {
            $arrayField = $value1;
            if ($arrayField["fieldType"] != "key") {
                $arrayAux = array();
                foreach ($arrayField as $index2 => $value2) {
                    if ($index2 != "gridIndex" && $index2 != "fieldType") {
                        $indexAux = $index2;
                        $valueAux = $value2;
                        switch ($index2) {
                            case "name":
                                $indexAux = "dataIndex";
                                break;
                            case "label":
                                $indexAux = "header";
                                if (preg_match("/^\\*\\*(.+)\\*\\*\$/", $value2, $arrayMatch)) {
                                    $valueAux = G::LoadTranslation($arrayMatch[1]);
                                }
                                break;
                        }
                        $arrayAux[$indexAux] = $valueAux;
                    }
                }
                $caseColumns[] = $arrayAux;
                $caseReaderFields[] = array("name" => $arrayField["name"]);
                $caseReaderFieldsAux[] = $arrayField["name"];
            }
        }
        foreach ($arrayConfig["caseReaderFields"] as $index => $value) {
            if (!in_array($value["name"], $caseReaderFieldsAux)) {
                $caseReaderFields[] = $value;
            }
        }
        $arrayConfig = array("caseColumns" => $caseColumns, "caseReaderFields" => $caseReaderFields, "rowsperpage" => $confCasesList["rowsperpage"], "dateformat" => $confCasesList["dateformat"]);
    }
    return $arrayConfig;
}
开发者ID:norahmollo,项目名称:processmaker,代码行数:53,代码来源:casesListExtJs.php


示例19: switch

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


示例20: Configurations




global $_DBArray;

$_DBArray ['langOptions'] = $availableLangArray;



G::LoadClass('configuration');

//BootStrap::LoadClass('configuration');



$oConf = new Configurations();

$oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', '');



$myUrl = explode("/", $_SERVER["REQUEST_URI"]);



if (isset($myUrl) && $myUrl != "") {

    $aFields["USER_LANG"] = $myUrl[2];

} else {
开发者ID:rrsc,项目名称:processmaker,代码行数:27,代码来源:login.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Configurator类代码示例发布时间:2022-05-23
下一篇:
PHP ConfigurationPeer类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap