本文整理汇总了PHP中fn_delete_notification函数的典型用法代码示例。如果您正苦于以下问题:PHP fn_delete_notification函数的具体用法?PHP fn_delete_notification怎么用?PHP fn_delete_notification使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fn_delete_notification函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fn_settings_actions_shippings_edost_enabled
/**
* Check if RUB currency is active and used as a primary.
*
* @param mixed $new_value New values of shipping_edost_enabled setting
* @param mixed $old_value Old values of shipping_edost_enabled setting
*/
function fn_settings_actions_shippings_edost_enabled(&$new_value, $old_value)
{
$currencies = Registry::get('currencies');
if ($new_value == 'Y' && (empty($currencies[CURRENCY_RUB]) || $currencies[CURRENCY_RUB]['is_primary'] == 'N')) {
fn_delete_notification('changes_saved');
fn_set_notification('E', __('warning'), __('edost_activation_error'));
$new_value = 'N';
}
}
示例2: update
public function update($id, $params)
{
$data = array();
$status = Response::STATUS_BAD_REQUEST;
unset($params['category_id']);
$lang_code = $this->safeGet($params, 'lang_code', DEFAULT_LANGUAGE);
$category_id = fn_update_category($params, $id, $lang_code);
$this->prepareImages($params, $id);
$updated = fn_attach_image_pairs('category_main', 'category', $id, DESCR_SL);
if ($category_id || $updated) {
if ($updated && fn_notification_exists('extra', '404')) {
fn_delete_notification('404');
}
$status = Response::STATUS_OK;
$data = array('category_id' => $id);
}
return array('status' => $status, 'data' => $data);
}
示例3: fn_hybrid_auth_link
function fn_hybrid_auth_link($user_data, $auth_data, $provider)
{
if (empty($user_data['user_id'])) {
fn_hybrid_auth_link_provider($user_data['user_id'], $auth_data->identifier, $provider);
}
$user_status = empty($user_data['user_id']) ? LOGIN_STATUS_USER_NOT_FOUND : fn_login_user($user_data['user_id']);
$redirect_url = !empty($_REQUEST['redirect_url']) ? $_REQUEST['redirect_url'] : fn_url();
if ($user_status == LOGIN_STATUS_USER_DISABLED) {
fn_set_notification('E', __('error'), __('error_account_disabled'));
} elseif ($user_status == LOGIN_STATUS_USER_NOT_FOUND) {
fn_delete_notification('user_exist');
fn_set_notification('W', __('warning'), __('hybrid_auth.cant_create_profile'));
}
return $redirect_url;
}
示例4: fn_add_breadcrumb
if (AREA != 'A') {
fn_add_breadcrumb(__('recover_password'));
}
Registry::get('view')->assign('view_mode', 'simple');
}
if ($mode == 'ekey_login') {
$ekey = !empty($_REQUEST['ekey']) ? $_REQUEST['ekey'] : '';
$redirect_url = fn_url();
$result = fn_recover_password_login($ekey);
if (!is_null($result)) {
if ($result === LOGIN_STATUS_USER_NOT_FOUND || $result === LOGIN_STATUS_USER_DISABLED) {
$redirect_url = fn_url();
} elseif ($result === false) {
$redirect_url = fn_url();
} else {
fn_delete_notification('notice_text_change_password');
if (!empty($_REQUEST['redirect_url'])) {
$redirect_url = $_REQUEST['redirect_url'];
if (strpos($redirect_url, '://') === false) {
$redirect_url = 'http://' . $redirect_url;
}
} else {
$redirect_url = fn_url();
}
}
}
fn_redirect($redirect_url, true);
}
//
// Display login form in the mainbox
//
示例5: array
}
return array(CONTROLLER_STATUS_REDIRECT, fn_query_remove(REAL_URL, 'skey'));
}
// UK Cookies Law
if (Registry::get('settings.Security.uk_cookies_law') == 'Y') {
if (!empty($_REQUEST['cookies_accepted']) && $_REQUEST['cookies_accepted'] == 'Y') {
Tygh::$app['session']['cookies_accepted'] = true;
}
if (!defined('AJAX_REQUEST') && empty(Tygh::$app['session']['cookies_accepted'])) {
$url = fn_link_attach(Registry::get('config.current_url'), 'cookies_accepted=Y');
$url = str_replace('&', '&', $url);
$text = __('uk_cookies_law', array('[url]' => $url));
fn_delete_notification('uk_cookies_law');
fn_set_notification('W', __('warning'), $text, 'K', 'uk_cookies_law');
} else {
fn_delete_notification('uk_cookies_law');
}
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
return;
}
//
// Check if store is closed
//
if (Registry::get('settings.General.store_mode') == 'Y') {
if (!empty($_REQUEST['store_access_key'])) {
Tygh::$app['session']['store_access_key'] = $_GET['store_access_key'];
}
if (!fn_check_permissions(Registry::get('runtime.controller'), Registry::get('runtime.mode'), 'trusted_controllers')) {
if (empty(Tygh::$app['session']['store_access_key']) || Tygh::$app['session']['store_access_key'] != Registry::get('settings.General.store_access_key')) {
if (defined('AJAX_REQUEST')) {
示例6: onSuccessPackageInstall
public function onSuccessPackageInstall()
{
fn_delete_notification('upgrade_center:core');
}
示例7: fn_settings_actions_stores_share_users
function fn_settings_actions_stores_share_users(&$new_value, $old_value)
{
$emails = fn_get_double_user_emails();
if (!empty($emails)) {
fn_delete_notification('changes_saved');
fn_set_notification('E', __('error'), __('ult_share_users_setting_disabled'));
$new_value = $old_value;
}
}
示例8: fn_set_notification
fn_set_notification('E', __('error'), __('text_allowed_to_upload_file_extension', array('[ext]' => implode(',', Registry::get('config.allowed_pack_exts')))));
} else {
$upgrade_pack = $upgrade_pack[0];
$app->uploadUpgradePack($upgrade_pack);
}
return array(CONTROLLER_STATUS_REDIRECT, 'upgrade_center.manage');
}
if ($mode == 'install') {
if (!empty($_REQUEST['change_ftp_settings'])) {
Log::instance($_REQUEST['id'])->add('Update FTP connection settings');
foreach ($_REQUEST['change_ftp_settings'] as $setting_name => $value) {
Settings::instance()->updateValue($setting_name, $value, '', true);
Registry::set('settings.Upgrade_center.' . $setting_name, $value);
}
}
fn_delete_notification('uc.timeout_check_success');
list($result, $data) = $app->install($_REQUEST['id'], $_REQUEST);
if ($result === UpgradeCenter::PACKAGE_INSTALL_RESULT_FAIL) {
$view = Tygh::$app['view'];
$view->assign('validation_result', $result);
$view->assign('validation_data', $data);
$view->assign('id', str_replace('.', '_', $_REQUEST['id']));
$view->assign('type', $_REQUEST['type']);
$view->assign('caption', __('continue'));
$view->assign('show_pre_upgrade_notice', false);
if (defined('AJAX_REQUEST')) {
Tygh::$app['ajax']->updateRequest();
}
$view->display('views/upgrade_center/components/notices.tpl');
$view->display('views/upgrade_center/components/install_button.tpl');
exit;
示例9: TwigmoConnector
$connector = new TwigmoConnector();
$action = 'te';
$connector->authPage($action);
exit;
}
if ($mode == 'update' && $_REQUEST['addon'] == 'twigmo') {
if (!empty($_REQUEST['tw_settings'])) {
$company_id = fn_twg_get_current_company_id();
TwigmoSettings::set(array('customer_connections' => array($company_id => $_REQUEST['tw_settings'])));
}
return array(CONTROLLER_STATUS_REDIRECT, 'addons.update?addon=twigmo');
}
} elseif ($mode == 'update') {
if ($_REQUEST['addon'] == 'twigmo') {
if (!empty($_REQUEST['selected_section']) and $_REQUEST['selected_section'] == 'twigmo_addon') {
fn_delete_notification('twigmo_upgrade');
}
if (!fn_twg_is_updated()) {
fn_set_notification('W', __('notice'), __('twgadmin_reinstall'));
}
$company_id = fn_twg_get_current_company_id();
$view = Registry::get('view');
$view->assign('default_logo', TwigmoImage::getDefaultLogoUrl($company_id));
$urls = TwigmoConnector::getMobileScriptsUrls();
$view->assign('favicon', $urls['favicon']);
$view->assign('logo_object_id', $company_id * 10 + 1);
$view->assign('favicon_object_id', $company_id * 10 + 2);
$tw_register['version'] = TWIGMO_VERSION;
$view->assign('tw_register', $tw_register);
$view->assign('next_version_info', TwigmoUpgrade::getNextVersionInfo());
$view->assign('twg_is_connected', TwigmoConnector::anyFrontendIsConnected());
示例10: fn_delete_notification
// PCI DSS Compliance
$auth['password_change_timestamp'] = !empty($auth['password_change_timestamp']) ? $auth['password_change_timestamp'] : 0;
$time_diff = TIME - $auth['password_change_timestamp'];
$expire = Registry::get('settings.Security.admin_password_expiration_period') * SECONDS_IN_DAY;
if (!isset($auth['first_expire_check'])) {
$auth['first_expire_check'] = true;
}
// Make user change the password if:
// - password has expired
// - this is the first admin's login and change_admin_password_on_first_login is enabled
// - this is the first vendor admin's login
if (empty($auth['password_change_timestamp']) && (Registry::get('settings.Security.change_admin_password_on_first_login') == 'Y' || !empty($auth['company_id'])) || $expire && $time_diff >= $expire) {
$_SESSION['auth']['forced_password_change'] = true;
if ($auth['first_expire_check']) {
// we can redirect only on first check, else we can corrupt some admin's working processes ( such as ajax requests
fn_delete_notification('insecure_password');
$return_url = !empty($_REQUEST['return_url']) ? $_REQUEST['return_url'] : Registry::get('config.current_url');
return array(CONTROLLER_STATUS_REDIRECT, "auth.password_change?return_url=" . urlencode($return_url));
} else {
if (!fn_notification_exists('E', 'password_expire')) {
fn_set_notification('E', fn_get_lang_var('warning'), str_replace('[link]', fn_url('profiles.update', 'A'), fn_get_lang_var('error_password_expired_change')), true, 'password_expire');
}
}
} else {
$auth['first_expire_check'] = false;
}
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
return;
}
// Get base menu
示例11: fn_specific_development_before_login
function fn_specific_development_before_login($request, $redirect_url)
{
if (!empty($request['token'])) {
$auth =& $auth;
$_request = array();
$_request[] = 'apiKey=' . Registry::get('addons.specific_development.apikey');
$_request[] = 'token=' . $request['token'];
list($header, $_result) = fn_https_request('POST', 'https://rpxnow.com/api/v2/auth_info', $_request);
$data = fn_from_json($_result, true);
if (isset($data['stat']) && $data['stat'] == 'ok') {
$user_data = array();
$user_data = db_get_row('SELECT user_id, password FROM ?:users WHERE janrain_identifier = ?s', md5($data['profile']['identifier']));
if (empty($user_data['user_id'])) {
Registry::get('settings.General.address_position') == 'billing_first' ? $address_zone = 'b' : ($address_zone = 's');
$user_data = array();
$user_data['janrain_identifier'] = md5($data['profile']['identifier']);
$user_data['email'] = !empty($data['profile']['verifiedEmail']) ? $data['profile']['verifiedEmail'] : (!empty($data['profile']['email']) ? $data['profile']['email'] : $data['profile']['displayName'] . '@' . $data['profile']['preferredUsername'] . '.com');
$user_data['user_login'] = !empty($data['profile']['verifiedEmail']) ? $data['profile']['verifiedEmail'] : (!empty($data['profile']['email']) ? $data['profile']['email'] : $data['profile']['displayName'] . '@' . $data['profile']['preferredUsername'] . '.com');
$user_data['user_type'] = 'C';
$user_data['is_root'] = 'N';
$user_data['password1'] = $user_data['password2'] = '';
$user_data['title'] = 'mr';
$user_data[$address_zone . '_firstname'] = !empty($data['profile']['name']['givenName']) ? $data['profile']['name']['givenName'] : $data['profile']['displayName'];
$user_data[$address_zone . '_lastname'] = !empty($data['profile']['name']['familyName']) ? $data['profile']['name']['familyName'] : '';
list($user_data['user_id'], $profile_id) = fn_update_user('', $user_data, $auth, true, false, false);
}
$user_status = empty($user_data['user_id']) ? LOGIN_STATUS_USER_NOT_FOUND : fn_login_user($user_data['user_id']);
if ($user_status == LOGIN_STATUS_OK) {
if (empty($user_data['password'])) {
$subscriber = db_get_row("SELECT * FROM ?:subscribers WHERE email = ?s", $user_data['email']);
if (empty($subscriber)) {
$c_data = array('email' => $user_data['email'], 'timestamp' => TIME);
$subscriber_id = db_query("INSERT INTO ?:subscribers ?e", $c_data);
$_data['subscriber_id'] = $subscriber_id;
$_data['list_id'] = "1";
$_data['timestamp'] = TIME;
$_data['activation_key'] = md5(uniqid(rand()));
$_data['unsubscribe_key'] = md5(uniqid(rand()));
db_query("INSERT INTO ?:user_mailing_lists ?e", $_data);
} else {
$subscriber_id = $subscriber['subscriber_id'];
}
$redirect_url = 'checkout.checkout&edit_step=step_two&from_step=step_one';
} else {
$redirect_url = !empty($_REQUEST['return_url']) ? $_REQUEST['return_url'] : $index_script;
}
} elseif ($user_status == LOGIN_STATUS_USER_DISABLED) {
fn_set_notification('E', fn_get_lang_var('error'), fn_get_lang_var('error_account_disabled'));
fn_save_post_data();
$redirect_url = !empty($_REQUEST['return_url']) ? $_REQUEST['return_url'] : $index_script;
} elseif ($user_status == LOGIN_STATUS_USER_NOT_FOUND) {
fn_delete_notification('user_exist');
fn_set_notification('W', fn_get_lang_var('warning'), fn_get_lang_var('janrain_cant_create_profile'));
$redirect_url = !empty($_REQUEST['return_url']) ? $_REQUEST['return_url'] : $index_script;
}
fn_delete_user($user_data['user_id']);
}
unset($request['token']);
} elseif (empty($_REQUEST['user_login']) || empty($_REQUEST['password'])) {
$redirect_url = !empty($_REQUEST['return_url']) ? $_REQUEST['return_url'] : $index_script;
}
}
示例12: fn_update_user
//.........这里部分代码省略.........
}
if ($msg) {
fn_set_notification('E', __('error'), implode('<br />', $msg));
}
// Check last 4 passwords
if (!empty($user_id)) {
$prev_passwords = !empty($current_user_data['last_passwords']) ? explode(',', $current_user_data['last_passwords']) : array();
if (!empty($_SESSION['auth']['forced_password_change'])) {
// if forced password change - new password can't be equal to current password.
$prev_passwords[] = $current_user_data['password'];
}
if (in_array(fn_generate_salted_password($user_data['password1'], $current_user_data['salt']), $prev_passwords)) {
$valid_passwords = false;
fn_set_notification('E', __('error'), __('error_password_was_used'));
} else {
if (count($prev_passwords) >= 5) {
array_shift($prev_passwords);
}
$user_data['last_passwords'] = implode(',', $prev_passwords);
}
}
}
// PCI DSS Compliance
if (!$valid_passwords) {
return false;
}
$user_data['salt'] = fn_generate_salt();
$user_data['password'] = fn_generate_salted_password($user_data['password1'], $user_data['salt']);
if ($user_data['password'] != $current_user_data['password'] && !empty($user_id)) {
// if user set current password - there is no necessity to update password_change_timestamp
$user_data['password_change_timestamp'] = $_SESSION['auth']['password_change_timestamp'] = TIME;
}
unset($_SESSION['auth']['forced_password_change']);
fn_delete_notification('password_expire');
}
}
$user_data['status'] = AREA != 'A' || empty($user_data['status']) ? $current_user_data['status'] : $user_data['status'];
// only administrator can change user status
// Fill the firstname, lastname and phone from the billing address if the profile was created or updated through the admin area.
if (AREA == 'A' || Registry::get('settings.Checkout.address_position') == 'billing_first') {
$main_address_zone = BILLING_ADDRESS_PREFIX;
$alt_address_zone = SHIPPING_ADDRESS_PREFIX;
} else {
$main_address_zone = SHIPPING_ADDRESS_PREFIX;
$alt_address_zone = BILLING_ADDRESS_PREFIX;
}
$user_data = fn_fill_contact_info_from_address($user_data, $main_address_zone, $alt_address_zone);
if (!fn_allowed_for('ULTIMATE')) {
//for ult company_id was set before
fn_set_company_id($user_data);
}
if (!empty($current_user_data['is_root']) && $current_user_data['is_root'] == 'Y') {
$user_data['is_root'] = 'Y';
} else {
$user_data['is_root'] = 'N';
}
// check if it is a root admin
$is_root_admin_exists = db_get_field("SELECT user_id FROM ?:users WHERE company_id = ?i AND is_root = 'Y' AND user_id != ?i", $user_data['company_id'], !empty($user_id) ? $user_id : 0);
$user_data['is_root'] = empty($is_root_admin_exists) && $user_data['user_type'] !== 'C' ? 'Y' : 'N';
unset($user_data['user_id']);
if (!empty($user_id)) {
db_query("UPDATE ?:users SET ?u WHERE user_id = ?i", $user_data, $user_id);
fn_clean_usergroup_links($user_id, $current_user_data['user_type'], $user_data['user_type']);
fn_log_event('users', 'update', array('user_id' => $user_id));
} else {
if (!isset($user_data['password_change_timestamp'])) {
示例13: onSuccessPackageInstall
/**
* Callback after package installed
* @param $content_schema
* @param $information_schema
*/
public function onSuccessPackageInstall($content_schema, $information_schema)
{
fn_delete_notification($this->notification_key);
}
示例14: die
<?php
/***************************************************************************
* *
* Copyright (c) 2004 Simbirsk Technologies Ltd. All rights reserved. *
* *
* This is commercial software, only users who have purchased a valid *
* license and accept to the terms of the License Agreement can install *
* and use this program. *
* *
****************************************************************************
* PLEASE READ THE FULL TEXT OF THE SOFTWARE LICENSE AGREEMENT IN THE *
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
****************************************************************************/
//
// $Id: index.php 7688 2009-07-10 05:58:05Z zeke $
//
if (!defined('AREA')) {
die('Access denied');
}
// Generate dashboard
if ($mode == 'index') {
$events = fn_get_recurring_events();
if (!fn_is_empty($events)) {
$msg = fn_get_lang_var('rb_have_events');
$msg = str_replace('[link]', fn_url("subscriptions.events"), $msg);
fn_delete_notification('rb_events');
fn_set_notification('N', fn_get_lang_var('notice'), $msg, true, 'rb_events');
}
}
示例15: list
$user_data['title'] = !empty($data['profile']['honorificPrefix']) ? $data['profile']['honorificPrefix'] : 'mr';
$user_data[$address_zone . '_firstname'] = !empty($data['profile']['name']['givenName']) ? $data['profile']['name']['givenName'] : $data['profile']['displayName'];
$user_data[$address_zone . '_lastname'] = !empty($data['profile']['name']['familyName']) ? $data['profile']['name']['familyName'] : '';
list($user_data['user_id'], $profile_id) = fn_update_user('', $user_data, $auth, true, true, false);
}
$user_status = empty($user_data['user_id']) ? LOGIN_STATUS_USER_NOT_FOUND : fn_login_user($user_data['user_id']);
if ($user_status == LOGIN_STATUS_OK) {
if (empty($user_data['password'])) {
fn_set_notification('W', __('warning'), __('janrain_need_update_profile'));
$redirect_url = 'profiles.update';
} else {
$redirect_url = !empty($_REQUEST['return_url']) ? $_REQUEST['return_url'] : fn_url();
}
} elseif ($user_status == LOGIN_STATUS_USER_DISABLED) {
fn_set_notification('E', __('error'), __('error_account_disabled'));
$redirect_url = !empty($_REQUEST['return_url']) ? $_REQUEST['return_url'] : fn_url();
} elseif ($user_status == LOGIN_STATUS_USER_NOT_FOUND) {
fn_delete_notification('user_exist');
fn_set_notification('W', __('warning'), __('janrain_cant_create_profile'));
$redirect_url = !empty($_REQUEST['return_url']) ? $_REQUEST['return_url'] : fn_url();
}
}
unset($_REQUEST['token']);
} elseif (empty($_REQUEST['user_login']) || empty($_REQUEST['password'])) {
$redirect_url = !empty($_REQUEST['return_url']) ? $_REQUEST['return_url'] : fn_url();
}
if (!empty($redirect_url)) {
return array(CONTROLLER_STATUS_REDIRECT, !empty($redirect_url) ? $redirect_url : fn_url());
}
}
}