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


PHP blowfishGetKey函数代码示例

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


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

示例1: array

 * 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 or write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 *
 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
 *
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 *
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
 * reasonably feasible for  technical reasons, the Appropriate Legal Notices must
 * display the words  "Powered by SugarCRM" and "Supercharged by SuiteCRM".
 ********************************************************************************/
require_once 'include/Sugarpdf/sugarpdf_config.php';
$SugarpdfSettings = array("sugarpdf_pdf_title" => array("label" => $mod_strings["PDF_TITLE"], "info_label" => $mod_strings["PDF_TITLE_INFO"], "value" => PDF_TITLE, "class" => "basic", "type" => "text"), "sugarpdf_pdf_subject" => array("label" => $mod_strings["PDF_SUBJECT"], "info_label" => $mod_strings["PDF_SUBJECT_INFO"], "value" => PDF_SUBJECT, "class" => "basic", "type" => "text"), "sugarpdf_pdf_author" => array("label" => $mod_strings["PDF_AUTHOR"], "info_label" => $mod_strings["PDF_AUTHOR_INFO"], "value" => PDF_AUTHOR, "class" => "basic", "type" => "text", "required" => "true"), "sugarpdf_pdf_keywords" => array("label" => $mod_strings["PDF_KEYWORDS"], "info_label" => $mod_strings["PDF_KEYWORDS_INFO"], "value" => PDF_KEYWORDS, "class" => "basic", "type" => "text"), "sugarpdf_pdf_header_logo" => array("label" => $mod_strings["PDF_HEADER_LOGO"], "info_label" => $mod_strings["PDF_HEADER_LOGO_INFO"], "value" => PDF_HEADER_LOGO, "path" => K_PATH_CUSTOM_IMAGES . PDF_HEADER_LOGO, "class" => "logo", "type" => "image"), "new_header_logo" => array("label" => $mod_strings["PDF_NEW_HEADER_LOGO"], "info_label" => $mod_strings["PDF_NEW_HEADER_LOGO_INFO"], "value" => "", "class" => "logo", "type" => "file"), "sugarpdf_pdf_small_header_logo" => array("label" => $mod_strings["PDF_SMALL_HEADER_LOGO"], "info_label" => $mod_strings["PDF_SMALL_HEADER_LOGO_INFO"], "value" => PDF_SMALL_HEADER_LOGO, "path" => K_PATH_CUSTOM_IMAGES . PDF_SMALL_HEADER_LOGO, "class" => "logo", "type" => "image"), "new_small_header_logo" => array("label" => $mod_strings["PDF_NEW_SMALL_HEADER_LOGO"], "info_label" => $mod_strings["PDF_NEW_SMALL_HEADER_LOGO_INFO"], "value" => "", "class" => "logo", "type" => "file"), "sugarpdf_pdf_filename" => array("label" => $mod_strings["PDF_FILENAME"], "info_label" => $mod_strings["PDF_FILENAME_INFO"], "value" => PDF_FILENAME, "class" => "advanced", "type" => "text", "required" => "true"), "sugarpdf_pdf_compression" => array("label" => $mod_strings["PDF_COMPRESSION"], "info_label" => $mod_strings["PDF_COMPRESSION_INFO"], "value" => PDF_COMPRESSION, "class" => "advanced", "type" => "bool"), "sugarpdf_pdf_jpeg_quality" => array("label" => $mod_strings["PDF_JPEG_QUALITY"], "info_label" => $mod_strings["PDF_JPEG_QUALITY_INFO"], "value" => PDF_JPEG_QUALITY, "class" => "advanced", "type" => "percent", "required" => "true"), "sugarpdf_pdf_pdf_version" => array("label" => $mod_strings["PDF_PDF_VERSION"], "info_label" => $mod_strings["PDF_PDF_VERSION_INFO"], "value" => PDF_PDF_VERSION, "class" => "advanced", "type" => "number", "required" => "true"), "sugarpdf_pdf_protection" => array("label" => $mod_strings["PDF_PROTECTION"], "info_label" => $mod_strings["PDF_PROTECTION_INFO"], "value" => explode(",", PDF_PROTECTION), "class" => "advanced", "type" => "multiselect", "selectList" => array("print" => "Print", "modify" => "Modify", "copy" => "Copy", "annot-forms" => "Annotations and forms")), "sugarpdf_pdf_user_password" => array("label" => $mod_strings["PDF_USER_PASSWORD"], "info_label" => $mod_strings["PDF_USER_PASSWORD_INFO"], "value" => blowfishDecode(blowfishGetKey('sugarpdf_pdf_user_password'), PDF_USER_PASSWORD), "class" => "advanced", "type" => "password"), "sugarpdf_pdf_owner_password" => array("label" => $mod_strings["PDF_OWNER_PASSWORD"], "info_label" => $mod_strings["PDF_OWNER_PASSWORD_INFO"], "value" => blowfishDecode(blowfishGetKey('sugarpdf_pdf_owner_password'), PDF_OWNER_PASSWORD), "class" => "advanced", "type" => "password"), "sugarpdf_pdf_acl_access" => array("label" => $mod_strings["PDF_ACL_ACCESS"], "info_label" => $mod_strings["PDF_ACL_ACCESS_INFO"], "value" => PDF_ACL_ACCESS, "class" => "advanced", "type" => "select", "selectList" => array("edit" => "Edition", "list" => "List", "detail" => "Detail", "export" => "Export"), "required" => "true"), "sugarpdf_k_small_ratio" => array("label" => $mod_strings["K_SMALL_RATIO"], "info_label" => $mod_strings["K_SMALL_RATIO_INFO"], "value" => K_SMALL_RATIO, "class" => "advanced", "type" => "number", "required" => "true"), "sugarpdf_k_cell_height_ratio" => array("label" => $mod_strings["K_CELL_HEIGHT_RATIO"], "info_label" => $mod_strings["K_CELL_HEIGHT_RATIO_INFO"], "value" => K_CELL_HEIGHT_RATIO, "class" => "advanced", "type" => "number", "required" => "true"), "sugarpdf_pdf_image_scale_ratio" => array("label" => $mod_strings["PDF_IMAGE_SCALE_RATIO"], "info_label" => $mod_strings["PDF_IMAGE_SCALE_RATIO_INFO"], "value" => PDF_IMAGE_SCALE_RATIO, "class" => "advanced", "type" => "number", "required" => "true"), "sugarpdf_pdf_unit" => array("label" => $mod_strings["PDF_UNIT"], "info_label" => $mod_strings["PDF_UNIT_INFO"], "value" => PDF_UNIT, "class" => "advanced", "type" => "select", "selectList" => array("mm" => "Millimeter", "pt" => "Point", "cm" => "Centimeter", "in" => "Inch"), "required" => "true"));
// Use the OOB directory for images if there is no image in the custom directory
$small_logo = $SugarpdfSettings['sugarpdf_pdf_small_header_logo']['path'];
$logo = $SugarpdfSettings['sugarpdf_pdf_header_logo']['path'];
if (@getimagesize($logo) === FALSE) {
    $SugarpdfSettings['sugarpdf_pdf_header_logo']['path'] = K_PATH_IMAGES . $SugarpdfSettings['sugarpdf_pdf_header_logo']['value'];
}
if (@getimagesize($small_logo) === FALSE) {
    $SugarpdfSettings['sugarpdf_pdf_small_header_logo']['path'] = K_PATH_IMAGES . $SugarpdfSettings['sugarpdf_pdf_small_header_logo']['value'];
}
开发者ID:MexinaD,项目名称:SuiteCRM,代码行数:31,代码来源:SugarpdfSettingsdefs.php

示例2: displayListPlain

 function displayListPlain($layout_def)
 {
     $value = $this->_get_list_value($layout_def);
     require_once "include/utils/encryption_utils.php";
     $value = blowfishDecode(blowfishGetKey('encrypt_field'), $value);
     return $value;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:7,代码来源:SugarWidgetFieldencrypt.php

示例3: getLoginInfo

 static function getLoginInfo($application, $includeInactive = false)
 {
     global $current_user;
     $eapmBean = new EAPM();
     if (isset($_SESSION['EAPM'][$application]) && !$includeInactive) {
         if (is_array($_SESSION['EAPM'][$application])) {
             $eapmBean->fromArray($_SESSION['EAPM'][$application]);
         } else {
             return null;
         }
     } else {
         $queryArray = array('assigned_user_id' => $current_user->id, 'application' => $application, 'deleted' => 0);
         if (!$includeInactive) {
             $queryArray['validated'] = 1;
         }
         $eapmBean = $eapmBean->retrieve_by_string_fields($queryArray);
         // Don't cache the include inactive results
         if (!$includeInactive) {
             if ($eapmBean != null) {
                 $_SESSION['EAPM'][$application] = $eapmBean->toArray();
             } else {
                 $_SESSION['EAPM'][$application] = '';
                 return null;
             }
         }
     }
     if (isset($eapmBean->password)) {
         require_once "include/utils/encryption_utils.php";
         $eapmBean->password = blowfishDecode(blowfishGetKey('encrypt_field'), $eapmBean->password);
     }
     return $eapmBean;
 }
开发者ID:BMLP,项目名称:memoryhole-ansible,代码行数:32,代码来源:EAPM.php

示例4: getLicenseData

 /**
  * Get the already stored license data.
  * @param string $uid
  * @return \stdClass
  */
 public function getLicenseData($uid)
 {
     $result = new stdClass();
     $result->success = false;
     $key = blowfishGetKey('ProcessMaker');
     //TODO DELETE THIS LINE
     //$result->success = true;
     //return $result;
     //Verify if activationCode exist in DB
     $rs = $this->amBean->retrieve_by_string_fields(array("acm_uid" => $uid));
     if (empty($rs)) {
         $result->message = translate('LBL_PMSE_ADAM_LICENSEMANAGER_MESSAGE_IDFIELDMISSING', $this->moduleName);
         return $result;
     }
     try {
         $license = json_decode($this->crypt->openLicense($key, $rs->acm_data));
     } catch (Exception $e) {
         $result->message = $e->getMessage();
         return $result;
     }
     if (empty($license)) {
         $result->message = translate('LBL_PMSE_ADAM_LICENSEMANAGER_MESSAGE_NOTVALID', $this->moduleName);
         return $result;
     } else {
         if (!isset($license->lic_max_admins)) {
             $result->message = translate('LBL_PMSE_ADAM_LICENSEMANAGER_MESSAGE_ADMINISTRATORMISSING', $this->moduleName);
             return $result;
         } else {
             $result->lic_max_admins = $license->lic_max_admins;
         }
         if (!isset($license->lic_max_users)) {
             $result->message = translate('LBL_PMSE_ADAM_LICENSEMANAGER_MESSAGE_USERSMISSING', $this->moduleName);
             return $result;
         } else {
             $result->lic_max_users = $license->lic_max_users;
         }
         if (!isset($license->lic_max_cases)) {
             $result->message = translate('LBL_PMSE_ADAM_LICENSEMANAGER_MESSAGE_CASESMISSING', $this->moduleName);
             return $result;
         } else {
             $result->lic_max_cases = $license->lic_max_cases;
         }
         if (!isset($license->lic_product_expiration_date)) {
             $result->message = translate('LBL_PMSE_ADAM_LICENSEMANAGER_MESSAGE_PRODUCTDATEMISSING', $this->moduleName);
             return $result;
         } else {
             $result->lic_product_expiration_date = $license->lic_product_expiration_date;
         }
         if (!isset($license->lic_support_expiration_date)) {
             $result->message = translate('LBL_PMSE_ADAM_LICENSEMANAGER_MESSAGE_SUPPORTDATEMISSING', $this->moduleName);
             return $result;
         } else {
             $result->lic_support_expiration_date = $license->lic_support_expiration_date;
         }
         if (!isset($license->lic_enabled_br)) {
             $result->message = translate('LBL_PMSE_ADAM_LICENSEMANAGER_MESSAGE_BUSSINESRULESMISSING', $this->moduleName);
             return $result;
         } else {
             $result->lic_enabled_br = (bool) $license->lic_enabled_br;
         }
         $result->success = true;
     }
     return $result;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:69,代码来源:PMSELicenseManager.php

示例5: getLicensePermissions

 /**
  * Process The license Permissions based on the active license data,
  * if this data doesn't exists a default configuration is used instead, this one doesn't have any permissions
  * @return array
  */
 public function getLicensePermissions()
 {
     $this->licensePermissions = new stdClass();
     if (!isset($_SESSION['PMSE'])) {
         $this->licenseData = $this->licenseManager->getActiveLicenseData();
         $this->licenseActivationData = $this->getLicenseActivationData();
         $this->licenseData->lic_max_cases = isset($this->licenseData->lic_max_cases) ? $this->licenseData->lic_max_cases : 0;
         $this->licenseData->lic_max_users = isset($this->licenseData->lic_max_users) ? $this->licenseData->lic_max_users : 0;
         $this->licenseData->lic_max_admins = isset($this->licenseData->lic_max_admins) ? $this->licenseData->lic_max_admins : 0;
         $this->licenseData->lic_product_expiration_date = isset($this->licenseData->lic_product_expiration_date) ? $this->licenseData->lic_product_expiration_date : '1900-01-01';
         $this->licenseData->lic_enabled_br = isset($this->licenseData->lic_enabled_br) ? $this->licenseData->lic_enabled_br : false;
         $this->licensePermissions->canExecuteCases = false;
         $this->licensePermissions->canStartCases = false;
         $this->licensePermissions->canAssignUserDashlets = false;
         $this->licensePermissions->canAssignAdminDashlets = false;
         $this->licensePermissions->canExecuteBusinessRules = false;
         if ($this->licenseData->lic_max_cases > $this->licenseActivationData->casesNumber) {
             $this->licensePermissions->canStartCases = true;
         }
         if ($this->licenseData->lic_max_users > $this->licenseActivationData->assignedUserDashlets) {
             $this->licensePermissions->canAssignUserDashlets = true;
         }
         if ($this->licenseData->lic_max_admins > $this->licenseActivationData->assignedAdminDashlets) {
             $this->licensePermissions->canAssignAdminDashlets = true;
         }
         $expirationDate = new DateTime($this->licenseData->lic_product_expiration_date);
         if ($expirationDate > $this->licenseActivationData->actualDate) {
             $this->licensePermissions->canExecuteCases = true;
         }
         $this->licensePermissions->canExecuteBusinessRules = $this->licenseData->lic_enabled_br;
         $_SESSION['PMSE'] = blowfishEncode(blowfishGetKey('ProcessMaker'), base64_encode(serialize($this->licensePermissions)));
     } else {
         $this->licensePermissions = unserialize(base64_decode(blowfishDecode(blowfishGetKey('ProcessMaker'), $_SESSION['PMSE'])));
     }
     return $this->licensePermissions;
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:41,代码来源:PMSEAccessManager.php

示例6: retrieve

 public function retrieve($id = -1, $encode = true, $deleted = true)
 {
     $results = parent::retrieve($id, $encode, $deleted);
     $this->mail_smtppass = $this->mail_smtppass ? blowfishDecode(blowfishGetKey('OutBoundEmail'), $this->mail_smtppass) : null;
     return $results;
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:6,代码来源:OutboundEmailAccounts.php

示例7: save

 /**
  * saves an instance
  */
 function save()
 {
     require_once 'include/utils/encryption_utils.php';
     if (empty($this->id) || $this->new_with_id) {
         if (empty($this->id)) {
             $this->id = create_guid();
         }
         $cols = '';
         $values = '';
         foreach ($this->field_defs as $def) {
             if (!empty($cols)) {
                 $cols .= ", ";
             }
             if (!empty($values)) {
                 $values .= ", ";
             }
             $cols .= $def;
             $pattern = '\\';
             if ($def == 'mail_smtppass' && !empty($this->{$def})) {
                 $this->{$def} = blowfishEncode(blowfishGetKey('OutBoundEmail'), $this->{$def});
             }
             // if
             if ($def == 'mail_smtpauth_req' || $def == 'mail_smtpssl') {
                 if (empty($this->{$def})) {
                     $this->{$def} = 0;
                 }
                 $values .= $this->{$def};
             } elseif ($def == 'mail_smtpuser' && strpos($this->{$def}, '\\')) {
                 //bug 41766: taking care of '\' in username
                 $temp = explode('\\', $this->{$def});
                 $this->{$def} = $temp[0] . '\\\\' . $temp[1];
                 $values .= "{$def} = '{$this->{$def}}'";
             } else {
                 $values .= "'{$this->{$def}}'";
             }
         }
         $q = "INSERT INTO outbound_email ({$cols}) VALUES ({$values})";
     } else {
         $values = array();
         foreach ($this->field_defs as $def) {
             switch ($def) {
                 case 'mail_smtpport':
                 case 'mail_smtpauth_req':
                 case 'mail_smtpssl':
                     if (empty($this->{$def})) {
                         $this->{$def} = 0;
                     }
                     $values[] = "{$def} = {$this->{$def}}";
                     break;
                 case 'mail_smtppass':
                     if (!empty($this->mail_smtppass)) {
                         $this->mail_smtppass = blowfishEncode(blowfishGetKey('OutBoundEmail'), $this->mail_smtppass);
                     } else {
                         // ignore empty password unless username is empty too
                         if (!empty($this->mail_smtpuser)) {
                             continue;
                         }
                     }
                     $values[] = "{$def} = '{$this->{$def}}'";
                     break;
                 case 'mail_smtpuser':
                     if (strpos($this->{$def}, '\\')) {
                         //bug 41766: taking care of '\' in username
                         $temp = explode('\\', $this->{$def});
                         $this->{$def} = $temp[0] . '\\\\' . $temp[1];
                     }
                 default:
                     $values[] = "{$def} = '{$this->{$def}}'";
             }
         }
         $q = "UPDATE outbound_email SET " . implode(', ', $values) . " WHERE id = '{$this->id}'";
     }
     $this->db->query($q, true);
     return $this;
 }
开发者ID:omusico,项目名称:sugar_work,代码行数:78,代码来源:OutboundEmail.php

示例8: getEncryptKey

 protected function getEncryptKey()
 {
     if (empty(self::$field_key[$this->module_key])) {
         self::$field_key[$this->module_key] = blowfishGetKey($this->module_key);
     }
     return self::$field_key[$this->module_key];
 }
开发者ID:jglaine,项目名称:sugar761-ent,代码行数:7,代码来源:SugarBean.php

示例9: loadConfig

 public function loadConfig()
 {
     $config = array();
     $dir = str_replace('_', '/', get_class($this));
     if (file_exists("modules/Connectors/connectors/sources/{$dir}/config.php")) {
         require "modules/Connectors/connectors/sources/{$dir}/config.php";
     }
     if (file_exists("custom/modules/Connectors/connectors/sources/{$dir}/config.php")) {
         require "custom/modules/Connectors/connectors/sources/{$dir}/config.php";
     }
     $this->_config = $config;
     // Handle decryption
     if (isset($this->_config['encrypt_properties']) && is_array($this->_config['encrypt_properties']) && isset($this->_config['properties'])) {
         require_once 'include/utils/encryption_utils.php';
         foreach ($this->_config['encrypt_properties'] as $name) {
             if (isset($this->_config['properties'][$name])) {
                 $this->_config['properties'][$name] = blowfishDecode(blowfishGetKey('encrypt_field'), $this->_config['properties'][$name]);
             }
         }
     }
     //If there are no required config fields specified, we will default them to all be required
     if (empty($this->_required_config_fields)) {
         foreach ($this->_config['properties'] as $id => $value) {
             $this->_required_config_fields[] = $id;
         }
     }
 }
开发者ID:nartnik,项目名称:sugarcrm_test,代码行数:27,代码来源:source.php

示例10: save

 /**
  * saves an instance
  */
 function save()
 {
     require_once 'include/utils/encryption_utils.php';
     if (empty($this->id) || $this->new_with_id) {
         if (empty($this->id)) {
             $this->id = create_guid();
         }
         $cols = '';
         $values = '';
         foreach ($this->field_defs as $def) {
             if (!empty($cols)) {
                 $cols .= ", ";
             }
             if (!empty($values)) {
                 $values .= ", ";
             }
             $cols .= $def;
             if ($def == 'mail_smtppass' && !empty($this->mail_smtppass)) {
                 $this->mail_smtppass = blowfishEncode(blowfishGetKey('OutBoundEmail'), $this->mail_smtppass);
             }
             // if
             if ($def == 'mail_smtpauth_req' || $def == 'mail_smtpssl') {
                 if (empty($this->{$def})) {
                     $this->{$def} = 0;
                 }
                 $values .= "{$this->{$def}}";
             } else {
                 $values .= "'{$this->{$def}}'";
             }
         }
         $q = "INSERT INTO outbound_email ({$cols}) VALUES ({$values})";
     } else {
         $values = "";
         foreach ($this->field_defs as $def) {
             if (!empty($values)) {
                 $values .= ", ";
             }
             if ($def == 'mail_smtppass' && !empty($this->{$def})) {
                 $this->{$def} = blowfishEncode(blowfishGetKey('OutBoundEmail'), $this->{$def});
             }
             // if
             if ($def == 'mail_smtpauth_req' || $def == 'mail_smtpssl') {
                 if (empty($this->{$def})) {
                     $this->{$def} = 0;
                 }
                 $values .= "{$def} = {$this->{$def}}";
             } else {
                 $values .= "{$def} = '{$this->{$def}}'";
             }
         }
         $q = "UPDATE outbound_email SET {$values} WHERE id = '{$this->id}'";
     }
     $this->db->query($q, true);
     return $this;
 }
开发者ID:aldridged,项目名称:gtg-sugar,代码行数:58,代码来源:OutboundEmail.php

示例11: sugar_die

 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by SugarCRM".
 ********************************************************************************/
if (!is_admin($current_user)) {
    sugar_die('Admin Only');
}
require_once 'include/Sugarpdf/sugarpdf_config.php';
$SugarpdfSettings = array("sugarpdf_pdf_author" => array("label" => $mod_strings["PDF_AUTHOR"], "info_label" => $mod_strings["PDF_AUTHOR_INFO"], "value" => PDF_AUTHOR, "class" => "basic", "type" => "text", "required" => "true"), "sugarpdf_pdf_header_logo" => array("label" => $mod_strings["PDF_HEADER_LOGO"], "info_label" => $mod_strings["PDF_HEADER_LOGO_INFO"], "value" => PDF_HEADER_LOGO, "path" => K_PATH_IMAGES . PDF_HEADER_LOGO, "class" => "basic", "type" => "image"), "new_header_logo" => array("label" => $mod_strings["PDF_NEW_HEADER_LOGO"], "info_label" => $mod_strings["PDF_NEW_HEADER_LOGO_INFO"], "value" => "", "class" => "basic", "type" => "file"), "sugarpdf_pdf_header_logo_width" => array("label" => $mod_strings["PDF_HEADER_LOGO_WIDTH"], "info_label" => $mod_strings["PDF_HEADER_LOGO_WIDTH_INFO"], "value" => PDF_HEADER_LOGO_WIDTH, "class" => "basic", "type" => "number", "required" => "true"), "sugarpdf_pdf_header_string" => array("label" => $mod_strings["PDF_HEADER_STRING"], "info_label" => $mod_strings["PDF_HEADER_STRING_INFO"], "value" => PDF_HEADER_STRING, "class" => "basic", "type" => "text"), "sugarpdf_pdf_header_title" => array("label" => $mod_strings["PDF_HEADER_TITLE"], "info_label" => $mod_strings["PDF_HEADER_TITLE_INFO"], "value" => PDF_HEADER_TITLE, "class" => "basic", "type" => "text"), "sugarpdf_pdf_filename" => array("label" => $mod_strings["PDF_FILENAME"], "info_label" => $mod_strings["PDF_FILENAME_INFO"], "value" => PDF_FILENAME, "class" => "basic", "type" => "text", "required" => "true"), "sugarpdf_pdf_title" => array("label" => $mod_strings["PDF_TITLE"], "info_label" => $mod_strings["PDF_TITLE_INFO"], "value" => PDF_TITLE, "class" => "basic", "type" => "text"), "sugarpdf_pdf_subject" => array("label" => $mod_strings["PDF_SUBJECT"], "info_label" => $mod_strings["PDF_SUBJECT_INFO"], "value" => PDF_SUBJECT, "class" => "basic", "type" => "text"), "sugarpdf_pdf_keywords" => array("label" => $mod_strings["PDF_KEYWORDS"], "info_label" => $mod_strings["PDF_KEYWORDS_INFO"], "value" => PDF_KEYWORDS, "class" => "basic", "type" => "text"));
if (!empty($_POST['save'])) {
    $error = checkUploadImage();
    if (empty($error)) {
        $focus = new Administration();
        foreach ($SugarpdfSettings as $k => $v) {
            if ($v['type'] == 'password') {
                if (isset($_POST[$k])) {
                    $_POST[$k] = blowfishEncode(blowfishGetKey($k), $_POST[$k]);
                }
            }
        }
        $focus->saveConfig();
        header('Location: index.php?module=Administration&action=index');
    }
}
if (!empty($_POST['restore'])) {
    $focus = new Administration();
    foreach ($_POST as $key => $val) {
        $prefix = $focus->get_config_prefix($key);
        if (in_array($prefix[0], $focus->config_categories)) {
            $result = $focus->db->query("SELECT count(*) AS the_count FROM config WHERE category = '{$prefix[0]}' AND name = '{$prefix[1]}'");
            $row = $focus->db->fetchByAssoc($result, -1, true);
            if ($row['the_count'] != 0) {
开发者ID:nerdystudmuffin,项目名称:dashlet-subpanels,代码行数:31,代码来源:SugarpdfSettings.php

示例12: _providerEmailTemplateFormat

 public function _providerEmailTemplateFormat()
 {
     require_once "include/utils/encryption_utils.php";
     return array(array(blowfishEncode(blowfishGetKey('encrypt_field'), 'Test value'), 'Test value'));
 }
开发者ID:rgauss,项目名称:sugarcrm_dev,代码行数:5,代码来源:SugarFieldEncryptTest.php

示例13: initConfig

 /**
  * Initialize config - decrypt encrypted fields
  */
 public function initConfig()
 {
     if ($this->config_decrypted) {
         return;
     }
     // Handle decryption
     require_once 'include/utils/encryption_utils.php';
     if (!empty($this->_config['encrypt_properties']) && is_array($this->_config['encrypt_properties']) && !empty($this->_config['properties'])) {
         foreach ($this->_config['encrypt_properties'] as $name) {
             if (!empty($this->_config['properties'][$name])) {
                 $this->_config['properties'][$name] = blowfishDecode(blowfishGetKey('encrypt_field'), $this->_config['properties'][$name]);
             }
         }
     }
     $this->config_decrypted = true;
 }
开发者ID:rgauss,项目名称:sugarcrm_dev,代码行数:19,代码来源:source.php

示例14: repairAccount

 /**
  * repairs the encrypted password for a given I-E account
  * @return bool True on success
  */
 function repairAccount()
 {
     for ($i = 0; $i < 3; $i++) {
         if ($i != 0) {
             // decode is performed on retrieve already
             $this->email_password = blowfishDecode(blowfishGetKey('InboundEmail'), $this->email_password);
         }
         if ($this->connectMailserver() == 'true') {
             $this->save();
             // save decoded password (is encoded on save())
             return true;
         }
     }
     return false;
 }
开发者ID:netconstructor,项目名称:sugarcrm_dev,代码行数:19,代码来源:InboundEmail.php

示例15: decrypt_after_retrieve

 /**
  * Decode and decrypt a base 64 encoded string with field type 'encrypt' in this bean using Blowfish.
  * @param STRING value - an encrypted and base 64 encoded string.
  * @return string
  */
 function decrypt_after_retrieve($value)
 {
     require_once "include/utils/encryption_utils.php";
     return blowfishDecode(blowfishGetKey('encrypt_field'), $value);
 }
开发者ID:rgauss,项目名称:sugarcrm_dev,代码行数:10,代码来源:SugarBean.php


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