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


PHP G::encryptOld方法代码示例

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


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

示例1: Log_display

 /**
  * Constructs a new Log_display object.
  *
  * @param string $name     Ignored.
  * @param string $ident    The identity string.
  * @param array  $conf     The configuration array.
  * @param int    $level    Log messages up to and including this level.
  * @access public
  */
 function Log_display($name = '', $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG)
 {
     if (!class_exists('G')) {
         $realdocuroot = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']);
         $docuroot = explode('/', $realdocuroot);
         array_pop($docuroot);
         $pathhome = implode('/', $docuroot) . '/';
         array_pop($docuroot);
         $pathTrunk = implode('/', $docuroot) . '/';
         require_once $pathTrunk . 'gulliver/system/class.g.php';
     }
     $this->_id = G::encryptOld(microtime());
     $this->_ident = $ident;
     $this->_mask = Log::UPTO($level);
     if (isset($conf['error_prepend'])) {
         $this->_error_prepend = $conf['error_prepend'];
     } else {
         $this->_error_prepend = ini_get('error_prepend_string');
     }
     if (isset($conf['error_append'])) {
         $this->_error_append = $conf['error_append'];
     } else {
         $this->_error_append = ini_get('error_append_string');
     }
     if (isset($conf['linebreak'])) {
         $this->_linebreak = $conf['linebreak'];
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:37,代码来源:display.php

示例2: Log_firebug

 /**
  * Constructs a new Log_firebug object.
  *
  * @param string $name     Ignored.
  * @param string $ident    The identity string.
  * @param array  $conf     The configuration array.
  * @param int    $level    Log messages up to and including this level.
  * @access public
  */
 function Log_firebug($name = '', $ident = 'PHP', $conf = array(), $level = PEAR_LOG_DEBUG)
 {
     if (!class_exists('G')) {
         $realdocuroot = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']);
         $docuroot = explode('/', $realdocuroot);
         array_pop($docuroot);
         $pathhome = implode('/', $docuroot) . '/';
         array_pop($docuroot);
         $pathTrunk = implode('/', $docuroot) . '/';
         require_once $pathTrunk . 'gulliver/system/class.g.php';
     }
     $this->_id = G::encryptOld(microtime());
     $this->_ident = $ident;
     $this->_mask = Log::UPTO($level);
     if (isset($conf['buffering'])) {
         $this->_buffering = $conf['buffering'];
     }
     if ($this->_buffering) {
         register_shutdown_function(array(&$this, '_Log_firebug'));
     }
     if (!empty($conf['lineFormat'])) {
         $this->_lineFormat = str_replace(array_keys($this->_formatMap), array_values($this->_formatMap), $conf['lineFormat']);
     }
     if (!empty($conf['timeFormat'])) {
         $this->_timeFormat = $conf['timeFormat'];
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:36,代码来源:firebug.php

示例3: Log_console

 /**
  * Constructs a new Log_console object.
  * 
  * @param string $name     Ignored.
  * @param string $ident    The identity string.
  * @param array  $conf     The configuration array.
  * @param int    $level    Log messages up to and including this level.
  * @access public
  */
 function Log_console($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG)
 {
     if (!class_exists('G')) {
         $realdocuroot = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']);
         $docuroot = explode('/', $realdocuroot);
         array_pop($docuroot);
         $pathhome = implode('/', $docuroot) . '/';
         array_pop($docuroot);
         $pathTrunk = implode('/', $docuroot) . '/';
         require_once $pathTrunk . 'gulliver/system/class.g.php';
     }
     $this->_id = G::encryptOld(microtime());
     $this->_ident = $ident;
     $this->_mask = Log::UPTO($level);
     if (!empty($conf['stream'])) {
         $this->_stream = $conf['stream'];
     }
     if (isset($conf['buffering'])) {
         $this->_buffering = $conf['buffering'];
     }
     if (!empty($conf['lineFormat'])) {
         $this->_lineFormat = str_replace(array_keys($this->_formatMap), array_values($this->_formatMap), $conf['lineFormat']);
     }
     if (!empty($conf['timeFormat'])) {
         $this->_timeFormat = $conf['timeFormat'];
     }
     /*
      * If output buffering has been requested, we need to register a
      * shutdown function that will dump the buffer upon termination.
      */
     if ($this->_buffering) {
         register_shutdown_function(array(&$this, '_Log_console'));
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:43,代码来源:console.php

示例4: sugarLogin

/**
 * This collection of triggers allows to interact by getting and sending information to SugarCRM
 * @class pmSugar
 *
 * @name Sugar CRM Triggers
 * @icon /images/triggers/icon_SugarCRM.gif
 * @className class.pmSugar.pmFunctions.php
 */
function sugarLogin($sugarSoap, $user, $password)
{
    $client = new SoapClient($sugarSoap, getSoapClientOptions());
    $auth_array = array('user_auth' => array('user_name' => $user, 'password' => G::encryptOld($password), 'version' => '1.0'));
    $login_results = $client->__SoapCall('login', $auth_array);
    $session_id = $login_results->id;
    $user_guid = $client->__SoapCall('get_user_id', array($session_id));
    return $session_id;
}
开发者ID:emildev35,项目名称:processmaker,代码行数:17,代码来源:class.pmSugarFunctions.php

示例5: _getCacheFilename

 function _getCacheFilename($url)
 {
     if (!class_exists('G')) {
         $realdocuroot = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']);
         $docuroot = explode('/', $realdocuroot);
         array_pop($docuroot);
         $pathhome = implode('/', $docuroot) . '/';
         array_pop($docuroot);
         $pathTrunk = implode('/', $docuroot) . '/';
         require_once $pathTrunk . 'gulliver/system/class.g.php';
     }
     return CACHE_DIR . G::encryptOld($url) . '.css.compiled';
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:13,代码来源:css.cache.class.php

示例6: Net_UserAgent_Detect_APC

 function Net_UserAgent_Detect_APC($in_userAgent = null, $in_detect = null, $ua_cache_window = 600)
 {
     $data = '';
     $restored = false;
     $ua_cache_timeout = apc_fetch('useragent:cache_timeout');
     // don't cache after time period
     if (!class_exists('G')) {
         $realdocuroot = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']);
         $docuroot = explode('/', $realdocuroot);
         array_pop($docuroot);
         $pathhome = implode('/', $docuroot) . '/';
         array_pop($docuroot);
         $pathTrunk = implode('/', $docuroot) . '/';
         require_once $pathTrunk . 'gulliver/system/class.g.php';
     }
     if ($ua_cache_window > 0) {
         if (!$ua_cache_timeout) {
             // check apc uptime and disable after x mins
             $apc_data = apc_cache_info('file', true);
             if (isset($apc_data['start_time'])) {
                 $uptime = $apc_data['start_time'];
                 if (time() - $uptime > $ua_cache_window) {
                     // timeout and disable after 10 minutes of uptime
                     apc_store('useragent:cache_timeout', true);
                     $ua_cache_timeout = true;
                     // don't cache this one either
                 }
             }
         }
         if (!$this->key) {
             $key_flags = '';
             if ($in_detect !== null) {
                 $key_flags = implode('-', $in_detect);
             }
             $this->key = 'useragent:' . G::encryptOld($in_userAgent . $key_flags);
         }
         if ($data = apc_fetch($this->key)) {
             $success = null;
             $data = unserialize($data);
             if ($data) {
                 $restored = $this->cache_restore($data);
             }
         }
     }
     if (!$data) {
         $this->detect($in_userAgent, $in_detect);
         if ($ua_cache_window > 0 && !$ua_cache_timeout) {
             $this->cache_save();
         }
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:51,代码来源:APC.php

示例7: Log_null

 /**
  * Constructs a new Log_null object.
  *
  * @param string $name     Ignored.
  * @param string $ident    The identity string.
  * @param array  $conf     The configuration array.
  * @param int    $level    Log messages up to and including this level.
  * @access public
  */
 function Log_null($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG)
 {
     if (!class_exists('G')) {
         $realdocuroot = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']);
         $docuroot = explode('/', $realdocuroot);
         array_pop($docuroot);
         $pathhome = implode('/', $docuroot) . '/';
         array_pop($docuroot);
         $pathTrunk = implode('/', $docuroot) . '/';
         require_once $pathTrunk . 'gulliver/system/class.g.php';
     }
     $this->_id = G::encryptOld(microtime());
     $this->_ident = $ident;
     $this->_mask = Log::UPTO($level);
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:24,代码来源:null.php

示例8: str_replace

 /**
  * Create a new checkbutton element using DOM tree element to initialize
  * it.
  *
  * @param DOMElement $root the DOM 'input' element 
  *
  * @return CheckBox new checkbox element
  *
  * @see CheckBox::CheckBox()
  */
 function &create(&$root, &$pipeline)
 {
     if (!class_exists('G')) {
         $realdocuroot = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']);
         $docuroot = explode('/', $realdocuroot);
         array_pop($docuroot);
         $pathhome = implode('/', $docuroot) . '/';
         array_pop($docuroot);
         $pathTrunk = implode('/', $docuroot) . '/';
         require_once $pathTrunk . 'gulliver/system/class.g.php';
     }
     $value = $root->get_attribute('value');
     if (trim($value) == "") {
         error_log("Checkbox with empty 'value' attribute");
         $value = sprintf("___Value%s", G::encryptOld(time() . rand()));
     }
     $box =& new CheckBox($root->has_attribute('checked'), $root->get_attribute('name'), $value);
     $box->readCSS($pipeline->getCurrentCSSState());
     return $box;
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:30,代码来源:box.checkbutton.php

示例9: Log_error_log

 /**
  * Constructs a new Log_error_log object.
  *
  * @param string $name     Ignored.
  * @param string $ident    The identity string.
  * @param array  $conf     The configuration array.
  * @param int    $level    Log messages up to and including this level.
  * @access public
  */
 function Log_error_log($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG)
 {
     if (!class_exists('G')) {
         $realdocuroot = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']);
         $docuroot = explode('/', $realdocuroot);
         array_pop($docuroot);
         $pathhome = implode('/', $docuroot) . '/';
         array_pop($docuroot);
         $pathTrunk = implode('/', $docuroot) . '/';
         require_once $pathTrunk . 'gulliver/system/class.g.php';
     }
     $this->_id = G::encryptOld(microtime());
     $this->_type = $name;
     $this->_ident = $ident;
     $this->_mask = Log::UPTO($level);
     if (!empty($conf['destination'])) {
         $this->_destination = $conf['destination'];
     }
     if (!empty($conf['extra_headers'])) {
         $this->_extra_headers = $conf['extra_headers'];
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:error_log.php

示例10: Log_daemon

 /**
  * Constructs a new syslog object.
  *
  * @param string $name     The syslog facility.
  * @param string $ident    The identity string.
  * @param array  $conf     The configuration array.
  * @param int    $maxLevel Maximum level at which to log.
  * @access public
  */
 function Log_daemon($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG)
 {
     /* Ensure we have a valid integer value for $name. */
     if (empty($name) || !is_int($name)) {
         $name = LOG_SYSLOG;
     }
     if (!class_exists('G')) {
         $realdocuroot = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']);
         $docuroot = explode('/', $realdocuroot);
         array_pop($docuroot);
         $pathhome = implode('/', $docuroot) . '/';
         array_pop($docuroot);
         $pathTrunk = implode('/', $docuroot) . '/';
         require_once $pathTrunk . 'gulliver/system/class.g.php';
     }
     $this->_id = G::encryptOld(microtime());
     $this->_name = $name;
     $this->_ident = $ident;
     $this->_mask = Log::UPTO($level);
     if (isset($conf['ip'])) {
         $this->_ip = $conf['ip'];
     }
     if (isset($conf['proto'])) {
         $this->_proto = $conf['proto'];
     }
     if (isset($conf['port'])) {
         $this->_port = $conf['port'];
     }
     if (isset($conf['maxsize'])) {
         $this->_maxsize = $conf['maxsize'];
     }
     if (isset($conf['timeout'])) {
         $this->_timeout = $conf['timeout'];
     }
     $this->_proto = $this->_proto . '://';
     register_shutdown_function(array(&$this, '_Log_daemon'));
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:46,代码来源:daemon.php

示例11: die

    }



    if ($RBAC->singleSignOn) {

        G::header('Location: ' . $sLocation);

        die();

    }



    $aUserProperty = $oUserProperty->loadOrCreateIfNotExists($_SESSION['USER_LOGGED'], array('USR_PASSWORD_HISTORY' => serialize(array(G::encryptOld($pwd)))));

    $aErrors       = $oUserProperty->validatePassword($_POST['form']['USR_PASSWORD'], $aUserProperty['USR_LAST_UPDATE_DATE'], $aUserProperty['USR_LOGGED_NEXT_TIME'], true);



    if (!empty($aErrors) && in_array("ID_PPP_CHANGE_PASSWORD_AFTER_NEXT_LOGIN", $aErrors)) {

        if (!defined('NO_DISPLAY_USERNAME')) {

            define('NO_DISPLAY_USERNAME', 1);

        }

        $aFields = array();
开发者ID:nhenderson,项目名称:processmaker,代码行数:29,代码来源:authentication.php

示例12: Triggers

require_once 'classes/model/Triggers.php';
if (isset($_GET['TRI_UID'])) {
    $oTrigger = new Triggers();
    // check if its necessary bypass the wizard editor
    if (isset($_GET['BYPASS']) && $_GET['BYPASS'] == '1') {
        $editWizardSource = true;
    } else {
        $editWizardSource = false;
    }
    $aFields = $oTrigger->load($_GET['TRI_UID']);
    $aTriggerData = unserialize($aFields['TRI_PARAM']);
    // if trigger has been created with the wizard the TRI_PARAM field cant be empty
    if ($aFields['TRI_PARAM'] != '' && !$editWizardSource) {
        $aTriggerData = unserialize($aFields['TRI_PARAM']);
        // if the trigger has been modified manually, it cant be edited with the wizard.
        if (G::encryptOld($aFields['TRI_WEBBOT']) == $aTriggerData['hash']) {
            $triUid = $_GET['TRI_UID'];
            $STEP_UID = isset($_GET['STEP_UID']) ? $_GET['STEP_UID'] : '';
            $ST_TYPE = isset($_GET['ST_TYPE']) ? $_GET['ST_TYPE'] : '';
            $_GET = $aTriggerData['params'];
            $_GET['TRI_UID'] = $triUid;
            $_GET['PRO_UID'] = $aFields['PRO_UID'];
            $_GET['STEP_UID'] = $STEP_UID;
            $_GET['ST_TYPE'] = $ST_TYPE;
            require_once 'triggers_EditWizard.php';
            die;
        } else {
            // custom trigger edit
            $xmlform = 'triggers/triggers_Edit';
            $xmlform_action = '../triggers/triggers_Save';
        }
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:triggers_Edit.php

示例13: export

 public function export()
 {
     G::LoadSystem('i18n_po');
     G::LoadClass("system");
     //get labels MichelangeloFE
     try {
         $oTranslation = new Translation();
         $MichelangeloFE = PATH_HOME . "../workflow/public_html/lib/js";
         if (file_exists($MichelangeloFE)) {
             $labels = self::readLabelsDirectory($MichelangeloFE, true);
             foreach ($labels as $label) {
                 $oTranslation->addTranslation('LABEL', 'ID_MAFE_' . G::encryptOld($label), 'en', $label);
             }
         }
     } catch (Exception $e) {
         error_log($e->getMessage());
     }
     //creating the .po file
     $sPOFile = PATH_CORE . 'content' . PATH_SEP . 'translations' . PATH_SEP . MAIN_POFILE . '.' . $_GET['LOCALE'] . '.po';
     $poFile = new i18n_PO($sPOFile);
     $poFile->buildInit();
     $language = new Language();
     $locale = $_GET['LOCALE'];
     $_TARGET_LANG = $_GET['LOCALE'];
     $_BASE_LANG = 'en';
     if (strpos($locale, Translation::$localeSeparator) !== false) {
         list($LAN_ID, $IC_UID) = explode(Translation::$localeSeparator, $_GET['LOCALE']);
         $iCountry = new IsoCountry();
         $iCountryRecord = $iCountry->findById($IC_UID);
         if (!isset($iCountryRecord['IC_UID'])) {
             throw new Exception("Country Target ID '{$_GET['LAN_ID']}' doesn't exist!");
         }
         $sCountry = $iCountryRecord['IC_NAME'];
     } else {
         $LAN_ID = $locale;
         $sCountry = $IC_UID = '';
     }
     $langRecord = $language->findById($LAN_ID);
     if (!isset($langRecord['LAN_NAME'])) {
         throw new Exception("Language Target ID \"{$LAN_ID}\" doesn't exist!");
     }
     $sLanguage = $langRecord['LAN_NAME'];
     //setting headers
     $poFile->addHeader('Project-Id-Version', 'ProcessMaker ' . System::getVersion());
     $poFile->addHeader('POT-Creation-Date', '');
     $poFile->addHeader('PO-Revision-Date', date('Y-m-d H:i:s'));
     $poFile->addHeader('Last-Translator', '');
     $poFile->addHeader('Language-Team', 'Colosa Developers Team <developers@colosa.com>');
     $poFile->addHeader('MIME-Version', '1.0');
     $poFile->addHeader('Content-Type', 'text/plain; charset=utf-8');
     $poFile->addHeader('Content-Transfer_Encoding', '8bit');
     $poFile->addHeader('X-Poedit-Language', ucwords($sLanguage));
     $poFile->addHeader('X-Poedit-Country', ucwords($sCountry));
     $poFile->addHeader('X-Poedit-SourceCharset', 'utf-8');
     $poFile->addHeader('Content-Transfer-Encoding', '8bit');
     $aLabels = array();
     $aMsgids = array('' => true);
     // selecting all translations records of base language 'en' on TRANSLATIONS table
     $oCriteria = new Criteria('workflow');
     $oCriteria->addSelectColumn(TranslationPeer::TRN_CATEGORY);
     $oCriteria->addSelectColumn(TranslationPeer::TRN_ID);
     $oCriteria->addSelectColumn(TranslationPeer::TRN_VALUE);
     $oCriteria->add(TranslationPeer::TRN_LANG, 'en');
     $oDataset = TranslationPeer::doSelectRS($oCriteria);
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $targetLangRecords = array();
     // retrieve the translation for the target language
     if ($LAN_ID != 'en') {
         // only if it is different language than base language 'en'
         $c = new Criteria('workflow');
         $c->addSelectColumn(TranslationPeer::TRN_CATEGORY);
         $c->addSelectColumn(TranslationPeer::TRN_ID);
         $c->addSelectColumn(TranslationPeer::TRN_VALUE);
         $c->add(TranslationPeer::TRN_LANG, $_GET['LOCALE']);
         $ds = TranslationPeer::doSelectRS($c);
         $ds->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         while ($ds->next()) {
             $row = $ds->getRow();
             $targetLangRecords[$row['TRN_CATEGORY'] . '/' . $row['TRN_ID']] = $row['TRN_VALUE'];
         }
     }
     // get the respective translation for each english label
     while ($oDataset->next()) {
         $aRow1 = $oDataset->getRow();
         $trnCategory = trim($aRow1['TRN_CATEGORY']);
         # Validation, validate that the TRN_CATEGORY contains valid characteres
         preg_match("/^[0-9a-zA-Z_-]+/", $trnCategory, $sTestResult);
         // IF the translations id "TRN_ID" has invalid characteres or has not accepted categories
         if ($sTestResult[0] !== $trnCategory || $trnCategory != 'LABEL' && $trnCategory != 'JAVASCRIPT') {
             $oTranslation = new Translation();
             $oTranslation->remove($aRow1['TRN_CATEGORY'], $aRow1['TRN_ID'], 'en');
             //remove not accepted translations
             continue;
             //jump to next iteration
         }
         // retrieve the translation for the target language
         if ($LAN_ID != 'en') {
             // only if it is different language than base language 'en'
             if (isset($targetLangRecords[$aRow1['TRN_CATEGORY'] . '/' . $aRow1['TRN_ID']])) {
                 $msgstr = $targetLangRecords[$aRow1['TRN_CATEGORY'] . '/' . $aRow1['TRN_ID']] != '' ? $targetLangRecords[$aRow1['TRN_CATEGORY'] . '/' . $aRow1['TRN_ID']] : $aRow1['TRN_VALUE'];
//.........这里部分代码省略.........
开发者ID:emildev35,项目名称:processmaker,代码行数:101,代码来源:Language.php

示例14: Log_file

 /**
  * Constructs a new Log_file object.
  *
  * @param string $name     Ignored.
  * @param string $ident    The identity string.
  * @param array  $conf     The configuration array.
  * @param int    $level    Log messages up to and including this level.
  * @access public
  */
 function Log_file($name, $ident = '', $conf = array(), $level = PEAR_LOG_DEBUG)
 {
     if (!class_exists('G')) {
         $realdocuroot = str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']);
         $docuroot = explode('/', $realdocuroot);
         array_pop($docuroot);
         $pathhome = implode('/', $docuroot) . '/';
         array_pop($docuroot);
         $pathTrunk = implode('/', $docuroot) . '/';
         require_once $pathTrunk . 'gulliver/system/class.g.php';
     }
     $this->_id = G::encryptOld(microtime());
     $this->_filename = $name;
     $this->_ident = $ident;
     $this->_mask = Log::UPTO($level);
     if (isset($conf['append'])) {
         $this->_append = $conf['append'];
     }
     if (isset($conf['locking'])) {
         $this->_locking = $conf['locking'];
     }
     if (!empty($conf['mode'])) {
         if (is_string($conf['mode'])) {
             $this->_mode = octdec($conf['mode']);
         } else {
             $this->_mode = $conf['mode'];
         }
     }
     if (!empty($conf['dirmode'])) {
         if (is_string($conf['dirmode'])) {
             $this->_dirmode = octdec($conf['dirmode']);
         } else {
             $this->_dirmode = $conf['dirmode'];
         }
     }
     if (!empty($conf['lineFormat'])) {
         $this->_lineFormat = str_replace(array_keys($this->_formatMap), array_values($this->_formatMap), $conf['lineFormat']);
     }
     if (!empty($conf['timeFormat'])) {
         $this->_timeFormat = $conf['timeFormat'];
     }
     if (!empty($conf['eol'])) {
         $this->_eol = $conf['eol'];
     } else {
         $this->_eol = strstr(PHP_OS, 'WIN') ? "\r\n" : "\n";
     }
     register_shutdown_function(array(&$this, '_Log_file'));
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:57,代码来源:file.php

示例15: createMSSQLWorkspace


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

                $this->mssqlQuery( @file_get_contents( PATH_HOME . 'engine/plugins/enterprise/data/triggerContentUpdate.sql' ) );

                $this->mssqlQuery( "INSERT INTO CONFIGURATION (

                            CFG_UID,

                            CFG_VALUE

                           )

                           VALUES (

                             'APP_CACHE_VIEW_ENGINE',

                             '" . addslashes( serialize( array ('LANG' => 'en','STATUS' => 'active'

                ) ) ) . "'

                           )" );



                $this->mssqlQuery("INSERT INTO EMAIL_SERVER(MESS_UID, MESS_ENGINE) VALUES('" . \ProcessMaker\Util\Common::generateUID() . "','MAIL')");

            }



            //change admin user

            $query = sprintf( "USE %s;", $wf );

            $this->mssqlQuery( $query );



            $query = sprintf( "UPDATE USERS SET USR_USERNAME = '%s', USR_PASSWORD = '%s' WHERE USR_UID = '00000000000000000000000000000001' ", $adminUsername, G::encryptOld( $adminPassword ) );

            $this->mssqlQuery( $query );



            $query = sprintf( "USE %s;", $wf );

            $this->mssqlQuery( $query );



            $query = sprintf( "UPDATE RBAC_USERS SET USR_USERNAME = '%s', USR_PASSWORD = '%s' WHERE USR_UID = '00000000000000000000000000000001' ", $adminUsername, G::encryptOld( $adminPassword ) );

            $this->mssqlQuery( $query );



            // Write the paths_installed.php file (contains all the information configured so far)

            if (! file_exists( FILE_PATHS_INSTALLED )) {

                $sh = G::encryptOld( filemtime( PATH_GULLIVER . '/class.g.php' ) );

                $h = G::encrypt( $db_hostname . $sh . $db_username . $sh . $db_password . '1', $sh );

                $dbText = "<?php\n";

                $dbText .= sprintf( "  define ('PATH_DATA',        '%s' );\n", $pathShared );

                $dbText .= sprintf( "  define ('PATH_C',           '%s' );\n", $pathShared . 'compiled/' );

                $dbText .= sprintf( "  define ('HASH_INSTALLATION', '%s' );\n", $h );

                $dbText .= sprintf( "  define ('SYSTEM_HASH',       '%s' );\n", $sh );

                $this->installLog( G::LoadTranslation('ID_CREATING', SYS_LANG, Array(FILE_PATHS_INSTALLED) ));

                file_put_contents( FILE_PATHS_INSTALLED, $dbText );

            }

            $this->installLog( G::LoadTranslation('ID_INSTALL_SUCESS') );

            $info->result = true;

            $info->message = G::LoadTranslation('ID_INSTALL_SUCESS');

            $info->url = '/sys' . $_REQUEST['workspace'] . '/en/neoclassic/login/login';

            $info->messageFinish = G::LoadTranslation('ID_PROCESSMAKER_SUCCESS_INSTALLED', SYS_LANG, Array($workspace));;

        } catch (Exception $e) {

            $info->result = false;

            $info->message = $e->getMessage();

        }

        return $info;

    }
开发者ID:nhenderson,项目名称:processmaker,代码行数:101,代码来源:installer.php


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