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


PHP Configuration::update方法代码示例

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


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

示例1: UpdateConfiguration

 function UpdateConfiguration($data, $fields)
 {
     try {
         $Configuration = new Configuration();
         $result = $Configuration->update($fields);
         return $result;
     } catch (Exception $e) {
         return array('Exception!! ' => $e->getMessage());
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:10,代码来源:classConfigurationTest.php

示例2: putConfigByUsr

    /**
     * Put Dashboard configuration by UserUid
     *
     * @param array $arrayData Data
     * @param string $usrUid
     *
     * return array
     *
     * @author Jenny Murillo <jennylee@colosa.com>
     */
    public function putConfigByUsr($arrayData, $usrUid)
    {
    	$oConfig = new \Configuration();
    	
    	$cnfgData = array();
    	if($oConfig->exists('DASHBOARDS_SETTINGS', '', '', $usrUid, '') == true){
    		$data = $oConfig->load('DASHBOARDS_SETTINGS', '', '', $usrUid, '');
    		$cnfgData = unserialize($data['CFG_VALUE']);
    	}

    	if($arrayData['dashData']==""){
    		foreach($cnfgData as $dashId=>$dashData) {
    			$cnfgData[$dashData['dashId']]['dashFavorite'] = 0;
    		}
    		$cnfgData[$arrayData['dashId']]['dashId'] = $arrayData['dashId'];
    		$cnfgData[$arrayData['dashId']]['dashFavorite'] = $arrayData['dashFavorite'];
    		$cnfgData[$arrayData['dashId']]['dashData'] = $arrayData['dashData'];
    	} else{
    		$cnfgData[$arrayData['dashId']] = $arrayData;
    	}

    	$data['CFG_UID'] = 'DASHBOARDS_SETTINGS';
    	$data['OBJ_UID'] = '';
    	$data['CFG_VALUE'] = serialize($cnfgData);
    	$data['USR_UID'] = $usrUid;
    	$data['PRO_UID'] = "";
    	$data['APP_UID'] = "";

    	$response = $oConfig->update($data);
    	return $response;
    }
开发者ID:hpx2206,项目名称:processmaker-1,代码行数:41,代码来源:Dashboard.php

示例3: deleteProcess

 public function deleteProcess($sProcessUID, $flagRemoveCases = true)
 {
     try {
         //G::LoadClass('case');
         //G::LoadClass('reportTables');
         //Instance all classes necesaries
         $oProcess = new \Process();
         $oDynaform = new \Dynaform();
         $oInputDocument = new \InputDocument();
         $oOutputDocument = new \OutputDocument();
         $oTrigger = new \Triggers();
         $oRoute = new \Route();
         $oGateway = new \Gateway();
         $oEvent = new \Event();
         $oSwimlaneElement = new \SwimlanesElements();
         $oConfiguration = new \Configuration();
         $oDbSource = new \DbSource();
         $oReportTable = new \ReportTables();
         $oCaseTracker = new \CaseTracker();
         $oCaseTrackerObject = new \CaseTrackerObject();
         //Update PROCESS_FILES_CHECKED
         $configuration = \ConfigurationPeer::retrieveByPK("PROCESS_FILES_CHECKED", "", "", "", "");
         if (!is_null($configuration)) {
             $arrayProjectUid = unserialize($configuration->getCfgValue());
             unset($arrayProjectUid[$sProcessUID]);
             $conf = new \Configuration();
             $result = $conf->update(array("CFG_UID" => "PROCESS_FILES_CHECKED", "OBJ_UID" => "", "CFG_VALUE" => serialize($arrayProjectUid), "PRO_UID" => "", "USR_UID" => "", "APP_UID" => ""));
         }
         //Delete the applications of process
         if ($flagRemoveCases) {
             $case = new \Cases();
             $criteria = new \Criteria("workflow");
             $criteria->addSelectColumn(\ApplicationPeer::APP_UID);
             $criteria->add(\ApplicationPeer::PRO_UID, $sProcessUID, \Criteria::EQUAL);
             $rsCriteria = \ApplicationPeer::doSelectRS($criteria);
             $rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
             while ($rsCriteria->next()) {
                 $row = $rsCriteria->getRow();
                 $result = $case->removeCase($row["APP_UID"]);
             }
         }
         //Delete the tasks of process
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(\TaskPeer::PRO_UID, $sProcessUID);
         $oDataset = \TaskPeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         while ($aRow = $oDataset->getRow()) {
             //$this->deleteTask($aRow['TAS_UID']);
             $oTasks = new \Tasks();
             $oTasks->deleteTask($aRow['TAS_UID']);
             $oDataset->next();
         }
         //Delete the dynaforms of process
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(\DynaformPeer::PRO_UID, $sProcessUID);
         $oDataset = \DynaformPeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         while ($aRow = $oDataset->getRow()) {
             $oDynaform->remove($aRow['DYN_UID']);
             $oDataset->next();
         }
         //Delete the input documents of process
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(\InputDocumentPeer::PRO_UID, $sProcessUID);
         $oDataset = \InputDocumentPeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         while ($aRow = $oDataset->getRow()) {
             $oInputDocument->remove($aRow['INP_DOC_UID']);
             $oDataset->next();
         }
         //Delete the output documents of process
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(\OutputDocumentPeer::PRO_UID, $sProcessUID);
         $oDataset = \OutputDocumentPeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         while ($aRow = $oDataset->getRow()) {
             $oOutputDocument->remove($aRow['OUT_DOC_UID']);
             $oDataset->next();
         }
         //Delete the triggers of process
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(\TriggersPeer::PRO_UID, $sProcessUID);
         $oDataset = \TriggersPeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         while ($aRow = $oDataset->getRow()) {
             $oTrigger->remove($aRow['TRI_UID']);
             $oDataset->next();
         }
         //Delete the routes of process
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(\RoutePeer::PRO_UID, $sProcessUID);
         $oDataset = \RoutePeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         while ($aRow = $oDataset->getRow()) {
//.........这里部分代码省略.........
开发者ID:emildev35,项目名称:processmaker,代码行数:101,代码来源:Workflow.php

示例4: saveConfiguration

 /**
  * getting Save email configuration
  * @autor Alvaro  <alvaro@colosa.com>
  */
 public function saveConfiguration()
 {
     require_once 'classes/model/Configuration.php';
     try {
         $oConfiguration = new Configuration();
         $aFields['MESS_PASSWORD'] = $_POST['passwd'];
         if ($_POST['passwdHide'] != '') {
             $aFields['MESS_PASSWORD'] = $_POST['passwdHide'];
         }
         $aFields['MESS_PASSWORD_HIDDEN'] = '';
         $passwd = $aFields['MESS_PASSWORD'];
         $passwdDec = G::decrypt($passwd, 'EMAILENCRYPT');
         $auxPass = explode('hash:', $passwdDec);
         if (count($auxPass) > 1) {
             if (count($auxPass) == 2) {
                 $passwd = $auxPass[1];
             } else {
                 array_shift($auxPass);
                 $passwd = implode('', $auxPass);
             }
         }
         $aFields['MESS_PASSWORD'] = $passwd;
         if ($aFields['MESS_PASSWORD'] != '') {
             $aFields['MESS_PASSWORD'] = 'hash:' . $aFields['MESS_PASSWORD'];
             $aFields['MESS_PASSWORD'] = G::encrypt($aFields['MESS_PASSWORD'], 'EMAILENCRYPT');
         }
         $aFields['MESS_ENABLED'] = isset($_POST['EnableEmailNotifications']) ? $_POST['EnableEmailNotifications'] : '';
         $aFields['MESS_ENABLED'] = $aFields['MESS_ENABLED'] == 'true' ? '1' : $aFields['MESS_ENABLED'];
         $aFields['MESS_ENGINE'] = $_POST['EmailEngine'];
         $aFields['MESS_SERVER'] = trim($_POST['server']);
         $aFields['MESS_RAUTH'] = isset($_POST['req_auth']) ? $_POST['req_auth'] : '';
         $aFields['MESS_RAUTH'] = $aFields['MESS_RAUTH'] == 'true' ? '1' : $aFields['MESS_RAUTH'];
         $aFields['MESS_PORT'] = $_POST['port'];
         $aFields['MESS_ACCOUNT'] = $_POST['from'];
         $aFields['MESS_BACKGROUND'] = '';
         //isset($_POST['background']) ? $_POST['background'] : '';
         $aFields['MESS_EXECUTE_EVERY'] = '';
         //$_POST['form']['MESS_EXECUTE_EVERY'];
         $aFields['MESS_SEND_MAX'] = '';
         //$_POST['form']['MESS_SEND_MAX'];
         $aFields['SMTPSecure'] = $_POST['UseSecureCon'];
         $aFields['SMTPSecure'] = $aFields['SMTPSecure'] == 'No' ? 'none' : $aFields['SMTPSecure'];
         $aFields['MAIL_TO'] = $_POST['eMailto'];
         $aFields['MESS_TRY_SEND_INMEDIATLY'] = $_POST['SendaTestMail'];
         //isset($_POST['form']['MESS_TRY_SEND_INMEDIATLY']) ? $_POST['form']['MESS_TRY_SEND_INMEDIATLY'] : '';
         $aFields['MESS_TRY_SEND_INMEDIATLY'] = $aFields['MESS_TRY_SEND_INMEDIATLY'] == 'true' ? '1' : $aFields['MESS_TRY_SEND_INMEDIATLY'];
         $CfgUid = 'Emails';
         $ObjUid = '';
         $ProUid = '';
         $UsrUid = '';
         $AppUid = '';
         if ($oConfiguration->exists($CfgUid, $ObjUid, $ProUid, $UsrUid, $AppUid)) {
             $oConfiguration->update(array('CFG_UID' => 'Emails', 'OBJ_UID' => '', 'CFG_VALUE' => serialize($aFields), 'PRO_UID' => '', 'USR_UID' => '', 'APP_UID' => ''));
             $this->success = 'true';
             $this->msg = 'Saved';
         } else {
             $oConfiguration->create(array('CFG_UID' => 'Emails', 'OBJ_UID' => '', 'CFG_VALUE' => serialize($aFields), 'PRO_UID' => '', 'USR_UID' => '', 'APP_UID' => ''));
             $this->success = 'true';
             $this->msg = 'Saved';
         }
     } catch (Exception $e) {
         $this->success = false;
         $this->msg = $e->getMessage();
     }
 }
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:69,代码来源:adminProxy.php

示例5: processFilesUpgrade

    /**
     * Process-Files upgrade
     *
     * @param string $projectUid Unique id of Project
     *
     * return void
     */
    public function processFilesUpgrade($projectUid = "")
    {
        try {
            //Set variables
            $conf = new \Configuration();

            //Create/Get PROCESS_FILES_CHECKED
            $arrayProjectUid = array();

            $configuration = \ConfigurationPeer::retrieveByPK("PROCESS_FILES_CHECKED", "", "", "", "");

            if (is_null($configuration)) {
                $result = $conf->create(array(
                    "CFG_UID"   => "PROCESS_FILES_CHECKED",
                    "OBJ_UID"   => "",
                    "CFG_VALUE" => serialize($arrayProjectUid),
                    "PRO_UID"   => "",
                    "USR_UID"   => "",
                    "APP_UID"   => ""
                ));
            } else {
                $arrayProjectUid = unserialize($configuration->getCfgValue());
            }

            //Set variables
            $arrayPath = array("templates" => PATH_DATA_MAILTEMPLATES, "public" => PATH_DATA_PUBLIC);
            $flagProjectUid = false;

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

            $criteria->addSelectColumn(\BpmnProjectPeer::PRJ_UID);

            if ($projectUid != "") {
                $criteria->add(
                    $criteria->getNewCriterion(\BpmnProjectPeer::PRJ_UID, $arrayProjectUid, \Criteria::NOT_IN)->addAnd(
                    $criteria->getNewCriterion(\BpmnProjectPeer::PRJ_UID, $projectUid, \Criteria::EQUAL))
                );
            } else {
                $criteria->add(\BpmnProjectPeer::PRJ_UID, $arrayProjectUid, \Criteria::NOT_IN);
            }

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

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

                foreach ($arrayPath as $key => $value) {
                    $path = $key;
                    $dir  = $value . $row["PRJ_UID"];

                    if (is_dir($dir)) {
                        if ($dirh = opendir($dir)) {
                            while (($file = readdir($dirh)) !== false) {
                                if ($file != "" && $file != "." && $file != "..") {
                                    $f = $dir . PATH_SEP . $file;

                                    if (is_file($f)) {
                                        $arrayProcessFilesData = $this->getFileManagerUid($f);

                                        if (is_null($arrayProcessFilesData["PRF_UID"])) {
                                            rename($dir . PATH_SEP . $file, $dir . PATH_SEP . $file . ".tmp");

                                            $arrayData = array(
                                                "prf_path"     => $path,
                                                "prf_filename" => $file,
                                                "prf_content"  => ""
                                            );

                                            $arrayData = $this->addProcessFilesManager($row["PRJ_UID"], "00000000000000000000000000000001", $arrayData);

                                            rename($dir . PATH_SEP . $file . ".tmp", $dir . PATH_SEP . $file);
                                        }
                                    }
                                }
                            }

                            closedir($dirh);
                        }
                    }
                }

                $arrayProjectUid[$row["PRJ_UID"]] = $row["PRJ_UID"];
                $flagProjectUid = true;
            }

            //Update PROCESS_FILES_CHECKED
            if ($flagProjectUid) {
                $result = $conf->update(array(
                    "CFG_UID"   => "PROCESS_FILES_CHECKED",
                    "OBJ_UID"   => "",
                    "CFG_VALUE" => serialize($arrayProjectUid),
//.........这里部分代码省略.........
开发者ID:rrsc,项目名称:processmaker,代码行数:101,代码来源:FilesManager.php

示例6: Configuration

 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 *
 */
require_once 'classes/model/Configuration.php';
$oConfiguration = new Configuration();
$aFields['MESS_ENABLED'] = isset($_POST['form']['MESS_ENABLED']) ? $_POST['form']['MESS_ENABLED'] : '';
$aFields['MESS_ENGINE'] = isset($_POST['form']['MESS_ENABLED']) ? $_POST['form']['MESS_ENGINE'] : '';
$aFields['MESS_SERVER'] = isset($_POST['form']['MESS_ENABLED']) ? trim($_POST['form']['MESS_SERVER']) : '';
$aFields['MESS_RAUTH'] = isset($_POST['form']['MESS_ENABLED']) ? isset($_POST['form']['MESS_RAUTH']) ? $_POST['form']['MESS_RAUTH'] : '' : '';
$aFields['MESS_PORT'] = isset($_POST['form']['MESS_ENABLED']) ? $_POST['form']['MESS_PORT'] : '';
$aFields['MESS_ACCOUNT'] = isset($_POST['form']['MESS_ENABLED']) ? $_POST['form']['MESS_ACCOUNT'] : '';
$aFields['MESS_PASSWORD'] = isset($_POST['form']['MESS_ENABLED']) ? $_POST['form']['MESS_PASSWORD'] : '';
$aFields['MESS_PASSWORD_HIDDEN'] = isset($_POST['form']['MESS_ENABLED']) ? $_POST['form']['MESS_PASSWORD_HIDDEN'] : '';
if ($aFields['MESS_PASSWORD_HIDDEN'] != '') {
    $aFields['MESS_PASSWORD'] = $aFields['MESS_PASSWORD_HIDDEN'];
}
$aFields['MESS_PASSWORD_HIDDEN'] = '';
$aPasswd = G::decrypt($aFields['MESS_PASSWORD'], 'EMAILENCRYPT');
if (strpos($aPasswd, 'hash:') !== true && $aFields['MESS_PASSWORD'] != '') {
    // for plain text
    $aFields['MESS_PASSWORD'] = 'hash:' . $aFields['MESS_PASSWORD'];
    $aFields['MESS_PASSWORD'] = G::encrypt($aFields['MESS_PASSWORD'], 'EMAILENCRYPT');
}
$aFields['MESS_BACKGROUND'] = isset($_POST['form']['MESS_ENABLED']) ? isset($_POST['form']['MESS_BACKGROUND']) ? $_POST['form']['MESS_BACKGROUND'] : '' : '';
$aFields['MESS_EXECUTE_EVERY'] = isset($_POST['form']['MESS_ENABLED']) ? $_POST['form']['MESS_EXECUTE_EVERY'] : '';
$aFields['MESS_SEND_MAX'] = isset($_POST['form']['MESS_ENABLED']) ? $_POST['form']['MESS_SEND_MAX'] : '';
$aFields['SMTPSecure'] = isset($_POST['form']['MESS_ENABLED']) ? $_POST['form']['SMTPSecure'] : '';
$aFields['MESS_TRY_SEND_INMEDIATLY'] = isset($_POST['form']['MESS_ENABLED']) ? isset($_POST['form']['MESS_TRY_SEND_INMEDIATLY']) ? $_POST['form']['MESS_TRY_SEND_INMEDIATLY'] : '' : '';
$oConfiguration->update(array('CFG_UID' => 'Emails', 'OBJ_UID' => '', 'CFG_VALUE' => serialize($aFields), 'PRO_UID' => '', 'USR_UID' => '', 'APP_UID' => ''));
G::SendTemporalMessage('ID_CHANGES_SAVED', 'TMP-INFO', 'label', 4, '100%');
G::header('location: emails');
开发者ID:nshong,项目名称:processmaker,代码行数:31,代码来源:emails_Save.php

示例7: Criteria

    $oCriteria = new Criteria('workflow');
    $oCriteria->add(ConfigurationPeer::CFG_UID, 'StartNewCase');
    $oCriteria->add(ConfigurationPeer::USR_UID, $_SESSION['USER_LOGGED']);
    $conf = ConfigurationPeer::doSelect($oCriteria);
    $listType = $conf[0]->getCfgValue();
}
if (isset($_GET['change'])) {
    $listType = $_GET['change'];
    $aData['CFG_UID'] = 'StartNewCase';
    $aData['OBJ_UID'] = '';
    $aData['CFG_VALUE'] = $listType;
    $aData['PRO_UID'] = '';
    $aData['USR_UID'] = $_SESSION['USER_LOGGED'];
    $aData['APP_UID'] = '';
    $oConfig = new Configuration();
    $oConfig->update($aData);
}
/* Render page */
$G_PUBLISH = new Publisher();
$aFields['CHANGE_LINK'] = G::LoadTranslation('ID_CHANGE_VIEW');
if (isset($aMessage)) {
    $G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $aMessage);
}
if ($listType == 'dropdown') {
    $G_PUBLISH->AddContent('xmlform', 'xmlform', $sXmlForm, '', $aFields, 'cases_Save');
}
if ($listType == 'link') {
    if ($bCanStart) {
        $sXmlForm = 'cases/cases_NewRadioGroup.xml';
    }
    $G_PUBLISH->AddContent('xmlform', 'xmlform', $sXmlForm, '', $aFields, 'cases_Save');
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:cases_New.php


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