本文整理汇总了PHP中fn_save_post_data函数的典型用法代码示例。如果您正苦于以下问题:PHP fn_save_post_data函数的具体用法?PHP fn_save_post_data怎么用?PHP fn_save_post_data使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fn_save_post_data函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
}
if ($mode == 'customer_info') {
$redirect_params = array();
$cart['guest_checkout'] = !empty($_REQUEST['guest_checkout']);
if (Registry::get('settings.Checkout.disable_anonymous_checkout') == 'Y' && empty($cart['user_data']['email']) && fn_image_verification('checkout', $_REQUEST) == false) {
fn_save_post_data('user_data');
return array(CONTROLLER_STATUS_REDIRECT, 'checkout.checkout?login_type=guest');
}
$profile_fields = fn_get_profile_fields('O');
$user_profile = array();
if (!empty($_REQUEST['user_data'])) {
if (empty($auth['user_id']) && !empty($_REQUEST['user_data']['email'])) {
$email_exists = fn_is_user_exists(0, $_REQUEST['user_data']);
if (!empty($email_exists)) {
fn_set_notification('E', __('error'), __('error_user_exists'));
fn_save_post_data('user_data');
return array(CONTROLLER_STATUS_REDIRECT, 'checkout.checkout');
}
}
$user_data = $_REQUEST['user_data'];
unset($user_data['user_type']);
if (!empty($cart['user_data'])) {
$cart['user_data'] = fn_array_merge($cart['user_data'], $user_data);
} else {
$cart['user_data'] = $user_data;
}
// Fill shipping info with billing if needed
if (empty($_REQUEST['ship_to_another'])) {
fn_fill_address($cart['user_data'], $profile_fields);
}
// Add descriptions for countries and states
示例2: die
* 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. *
****************************************************************************/
use Tygh\Registry;
if (!defined('BOOTSTRAP')) {
die('Access denied');
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($mode == 'send_form') {
$suffix = '';
if (fn_image_verification('use_for_form_builder', $_REQUEST) == false) {
fn_save_post_data('form_values');
return array(CONTROLLER_STATUS_REDIRECT, "pages.view?page_id={$_REQUEST['page_id']}");
}
if (fn_send_form($_REQUEST['page_id'], empty($_REQUEST['form_values']) ? array() : $_REQUEST['form_values'])) {
$suffix = '&sent=Y';
}
return array(CONTROLLER_STATUS_OK, "pages.view?page_id={$_REQUEST['page_id']}" . $suffix);
}
return;
}
if ($mode == 'view' && !empty($_REQUEST['page_id'])) {
$page_is_https = db_get_field("SELECT value FROM ?:form_options WHERE element_type = ?s AND page_id = ?i", FORM_IS_SECURE, $_REQUEST['page_id']);
// if form is secure, redirect to https connection
if (!defined('HTTPS') && $page_is_https == 'Y') {
return array(CONTROLLER_STATUS_REDIRECT, Registry::get('config.https_location') . '/' . Registry::get('config.current_url'));
} elseif (defined('HTTPS') && Registry::get('settings.Security.keep_https') != 'Y' && $page_is_https != 'Y') {
示例3: die
* 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. *
****************************************************************************/
use Tygh\Registry;
use Tygh\Mailer;
if (!defined('BOOTSTRAP')) {
die('Access denied');
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($mode == 'send') {
if (fn_image_verification('use_for_email_share', $_REQUEST) == false) {
fn_save_post_data('send_data');
return array(CONTROLLER_STATUS_REDIRECT);
}
if (!empty($_REQUEST['send_data']['to_email'])) {
$lnk = fn_url(Registry::get('config.current_url'));
$redirect_url = fn_query_remove($_REQUEST['redirect_url'], 'selected_section');
$index_script = Registry::get('config.customer_index');
if (strpos($lnk, $index_script) !== false) {
$redirect_url = str_replace($index_script, '', $redirect_url);
}
$lnk .= $redirect_url;
$from = array('email' => !empty($_REQUEST['send_data']['from_email']) ? $_REQUEST['send_data']['from_email'] : Registry::get('settings.Company.company_users_department'), 'name' => !empty($_REQUEST['send_data']['from_name']) ? $_REQUEST['send_data']['from_name'] : Registry::get('settings.Company.company_name'));
$mail_sent = Mailer::sendMail(array('to' => $_REQUEST['send_data']['to_email'], 'from' => $from, 'data' => array('link' => $lnk, 'send_data' => $_REQUEST['send_data']), 'tpl' => 'addons/social_buttons/mail.tpl'), 'C');
if ($mail_sent == true) {
fn_set_notification('N', __('notice'), __('text_email_sent'));
}
示例4: fn_save_post_data
} else {
fn_save_post_data('company_data', 'update');
}
}
if (fn_allowed_for('ULTIMATE') && !empty($company_id)) {
fn_ult_set_company_settings_information($_REQUEST['update'], $company_id);
}
}
//
// Processing updating of company element
//
if ($mode == 'update') {
if (!empty($_REQUEST['company_data']['company'])) {
if (!empty($_REQUEST['company_id']) && Registry::get('runtime.company_id') && Registry::get('runtime.company_id') != $_REQUEST['company_id']) {
fn_company_access_denied_notification();
fn_save_post_data('company_data', 'update');
} else {
// Updating company record
fn_update_company($_REQUEST['company_data'], $_REQUEST['company_id'], DESCR_SL);
}
if (fn_allowed_for('ULTIMATE') && !empty($_REQUEST['company_id'])) {
fn_ult_set_company_settings_information($_REQUEST['update'], $_REQUEST['company_id']);
fn_clear_cache('registry');
// clean up block cache to re-generate storefront urls
}
}
$suffix = ".update?company_id={$_REQUEST['company_id']}";
}
if ($mode == 'm_delete') {
if (!empty($_REQUEST['company_ids'])) {
foreach ($_REQUEST['company_ids'] as $v) {
示例5: fn_email_is_blocked
function fn_email_is_blocked($user_data, $reset_email = false)
{
$auth =& $_SESSION['auth'];
$email = trim($user_data['email']);
if (!fn_validate_email($email, false)) {
return false;
}
$restricted = db_get_field("SELECT COUNT(*) FROM ?:access_restriction WHERE type IN ('ed', 'es') AND status = 'A' AND ?s LIKE REPLACE(REPLACE(REPLACE(value, '_', '\\_'), '?', '_'), '*', '%')", $email);
if (!empty($restricted)) {
if ($reset_email && $auth) {
$uid = AREA == 'C' || AREA == 'P' || empty($_REQUEST['user_id']) ? $auth['user_id'] : $_REQUEST['user_id'];
$_POST['user_data']['email'] = db_get_field("SELECT email FROM ?:users WHERE user_id = ?i", $uid);
}
fn_save_post_data();
fn_set_notification('E', fn_get_lang_var('error'), str_replace('[email]', $user_data['email'], fn_get_lang_var('text_email_is_blocked')));
return true;
}
return false;
}
示例6: die
use Tygh\Registry;
use Tygh\Pdf;
use RusPostBlank\RusPostBlank;
if (!defined('BOOTSTRAP')) {
die('Access denied');
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($mode == 'print') {
if (!empty($_REQUEST['order_id'])) {
$order_id = $_REQUEST['order_id'];
$order_info = fn_get_order_info($order_id, false, true, false, true);
if (empty($order_info)) {
exit;
}
$view = Tygh::$app['view'];
fn_save_post_data('blank_data');
$lang_code = 'ru';
$params = $_REQUEST['blank_data'];
$total_declared = '';
if (!empty($params['total_cen'])) {
$total_declared = $params['total_cen'];
}
$params['total_declared'] = $total_declared;
list($total_declared, $params['declared_rub'], $params['declared_kop']) = fn_rus_postblank_rub_kop_price($total_declared);
$total_imposed = '';
if (!empty($params['total_cod'])) {
$total_imposed = $params['total_cod'];
}
$params['total_imposed'] = $total_imposed;
list($total_imposed, $params['imposed_rub'], $params['imposed_kop']) = fn_rus_postblank_rub_kop_price($total_imposed);
if (!empty($params['imposed_total']) && $params['imposed_total'] == 'Y') {
示例7: fn_update_company
function fn_update_company($company_data, $company_id = 0, $lang_code = CART_LANGUAGE)
{
$_data = $company_data;
// Check if company with same email already exists
$is_exist = db_get_field("SELECT email FROM ?:companies WHERE email = ?s AND company_id != ?i", $_data['email'], $company_id);
if (!empty($is_exist)) {
fn_save_post_data();
$_text = PRODUCT_TYPE == 'MULTIVENDOR' ? 'error_vendor_exists' : 'error_supplier_exists';
fn_set_notification('E', fn_get_lang_var('error'), fn_get_lang_var($_text));
return false;
}
$_data['shippings'] = empty($company_data['shippings']) ? '' : fn_create_set($company_data['shippings']);
// add new company
if (empty($company_id)) {
// company title can't be empty
if (empty($company_data['company'])) {
return false;
}
$company_id = db_query("INSERT INTO ?:companies ?e", $_data);
if (empty($company_id)) {
return false;
}
$old_logos = array();
// Adding same company descriptions for all cart languages
$_data = array('company_id' => $company_id, 'company_description' => !empty($company_data['company_description']) ? $company_data['company_description'] : '');
if (PRODUCT_TYPE == 'MULTIVENDOR') {
foreach ((array) Registry::get('languages') as $_data['lang_code'] => $_v) {
db_query("INSERT INTO ?:company_descriptions ?e", $_data);
}
}
// update product
} else {
if (isset($company_data['company']) && empty($company_data['company'])) {
unset($company_data['company']);
}
db_query("UPDATE ?:companies SET ?u WHERE company_id = ?i", $_data, $company_id);
$old_logos = db_get_field("SELECT logos FROM ?:companies WHERE company_id = ?i", $company_id);
$old_logos = !empty($old_logos) ? unserialize($old_logos) : array();
if (PRODUCT_TYPE == 'MULTIVENDOR') {
// Updating company description
$descr = !empty($company_data['company_description']) ? $company_data['company_description'] : '';
db_query("UPDATE ?:company_descriptions SET company_description = ?s WHERE company_id = ?i AND lang_code = ?s", $descr, $company_id, DESCR_SL);
}
}
// Do not upload logo if a dummy company is being added.
if (!empty($_data['email'])) {
fn_companies_update_logos($company_id, $old_logos);
}
/*
if (empty($product_id)) {
$create = true;
// product title can't be empty
if(empty($product_data['product'])) {
return false;
}
$product_id = db_query("INSERT INTO ?:products ?e", $_data);
if (empty($product_id)) {
return false;
}
//
// Adding same product descriptions for all cart languages
//
$_data = $product_data;
$_data['product_id'] = $product_id;
$_data['product'] = trim($_data['product'], " -");
foreach ((array)Registry::get('languages') as $_data['lang_code'] => $_v) {
db_query("INSERT INTO ?:product_descriptions ?e", $_data);
}
// update product
} else {
if (isset($product_data['product']) && empty($product_data['product'])) {
unset($product_data['product']);
}
db_query("UPDATE ?:products SET ?u WHERE product_id = ?i", $_data, $product_id);
$_data = $product_data;
if (!empty($_data['product'])){
$_data['product'] = trim($_data['product'], " -");
}
db_query("UPDATE ?:product_descriptions SET ?u WHERE product_id = ?i AND lang_code = ?s", $_data, $product_id, $lang_code);
}
// Log product add/update
fn_log_event('products', !empty($create) ? 'create' : 'update', array(
'product_id' => $product_id
));
if (!empty($product_data['product_features'])) {
$i_data = array(
'product_id' => $product_id,
'lang_code' => $lang_code
);
//.........这里部分代码省略.........
示例8: array
}
}
}
return array(CONTROLLER_STATUS_OK, 'storage.manage');
}
if ($mode == 'update_cdn') {
// update
if (Cdn::instance()->getOption('host')) {
$distribution_data = Cdn::instance()->updateDistribution(Registry::get('config.http_host'), $_REQUEST['cdn_data']);
} else {
$distribution_data = Cdn::instance()->createDistribution(Registry::get('config.http_host'), $_REQUEST['cdn_data']);
}
if ($distribution_data !== false) {
Cdn::instance()->save(fn_array_merge($_REQUEST['cdn_data'], $distribution_data));
} else {
fn_save_post_data('cdn_data');
}
return array(CONTROLLER_STATUS_OK, 'storage.cdn');
}
return;
}
if ($mode == 'manage') {
$storage_data = fn_restore_post_data('storage_data');
if (empty($storage_data)) {
$storage_data = Registry::get('runtime.storage');
}
Registry::get('view')->assign('current_storage', Registry::get('runtime.storage.storage'));
Registry::get('view')->assign('storage_data', $storage_data);
Registry::get('view')->assign('amazon_data', array('regions' => fn_get_amazon_regions()));
} elseif ($mode == 'clear_cache') {
fn_clear_cache();
示例9: isset
$_SESSION['cart'] = isset($_SESSION['cart']) ? $_SESSION['cart'] : array();
$cart =& $_SESSION['cart'];
if (empty($cart)) {
fn_clear_cart($cart, true);
}
$_SESSION['customer_auth'] = isset($_SESSION['customer_auth']) ? $_SESSION['customer_auth'] : array();
$customer_auth =& $_SESSION['customer_auth'];
if (empty($customer_auth)) {
$customer_auth = fn_fill_auth(array(), array(), false, 'C');
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if ($mode == 'update') {
if ($template_id = fn_update_ebay_template($_REQUEST['template_data'], $_REQUEST['template_id'])) {
return array(CONTROLLER_STATUS_OK, 'ebay.update?template_id=' . $template_id);
} else {
fn_save_post_data('template_data');
fn_delete_notification('changes_saved');
}
return array(CONTROLLER_STATUS_OK, 'ebay.add');
}
if ($mode == 'm_delete') {
foreach ($_REQUEST['template_ids'] as $template_id) {
fn_delete_ebay_template($template_id);
}
}
if ($mode == 'export') {
$products_data = db_get_hash_multi_array("SELECT product_id,company_id,ebay_template_id FROM ?:products WHERE product_id IN (?n)", array('company_id', 'product_id'), $_REQUEST['product_ids']);
$template_ids = array();
if (!empty($products_data)) {
foreach ($products_data as $company_id => $products) {
foreach ($products as $product_id => $product) {
示例10: fn_checkout_update_steps
/**
* Update steps data handler
*
* @param array $cart Cart
* @param array $auth Auth
* @param array $params Params
* @return array
*/
function fn_checkout_update_steps(&$cart, &$auth, $params)
{
$redirect_params = array();
$user_data = !empty($params['user_data']) ? $params['user_data'] : array();
unset($user_data['user_type']);
if (!empty($auth['user_id'])) {
if (isset($user_data['profile_id'])) {
if (empty($user_data['profile_id'])) {
$user_data['profile_type'] = 'S';
}
$profile_id = $user_data['profile_id'];
} elseif (!empty($cart['profile_id'])) {
$profile_id = $cart['profile_id'];
} else {
$profile_id = db_get_field("SELECT profile_id FROM ?:user_profiles WHERE user_id = ?i AND profile_type = 'P'", $auth['user_id']);
}
$user_data['user_id'] = $auth['user_id'];
$current_user_data = fn_get_user_info($auth['user_id'], true, $profile_id);
if ($profile_id != NULL) {
$cart['profile_id'] = $profile_id;
}
$errors = false;
// Update contact information
if (($params['update_step'] == 'step_one' || $params['update_step'] == 'step_two') && !empty($user_data['email'])) {
// Check email
$email_exists = fn_is_user_exists($auth['user_id'], $user_data);
if (!empty($email_exists)) {
fn_set_notification('E', __('error'), __('error_user_exists'));
$redirect_params['edit_step'] = $params['update_step'];
$errors = true;
$params['next_step'] = $params['update_step'];
}
}
// Update billing/shipping information
if ($params['update_step'] == 'step_two' || $params['update_step'] == 'step_one' && !$errors) {
if (!empty($user_data)) {
$user_data = fn_array_merge($current_user_data, $user_data);
$user_data['user_type'] = !empty($current_user_data['user_type']) ? $current_user_data['user_type'] : AREA;
$user_data = fn_fill_contact_info_from_address($user_data);
}
$user_data = fn_array_merge($current_user_data, $user_data);
if (empty($params['ship_to_another'])) {
$profile_fields = fn_get_profile_fields('O');
fn_fill_address($user_data, $profile_fields);
}
// Check if we need to send notification with new email to customer
$email = db_get_field('SELECT email FROM ?:users WHERE user_id = ?i', $auth['user_id']);
$send_notification = false;
if (isset($user_data['email']) && $user_data['email'] != $email) {
$send_notification = true;
}
list($user_id, $profile_id) = fn_update_user($auth['user_id'], $user_data, $auth, !empty($params['ship_to_another']), $send_notification, false);
$cart['profile_id'] = $profile_id;
}
// Add/Update additional fields
if (!empty($user_data['fields'])) {
fn_store_profile_fields($user_data, array('U' => $auth['user_id'], 'P' => $profile_id), 'UP');
// FIXME
}
} elseif (Registry::get('settings.Checkout.disable_anonymous_checkout') != 'Y') {
if (empty($auth['user_id']) && !empty($user_data['email'])) {
$email_exists = fn_is_user_exists(0, $user_data);
if (!empty($email_exists)) {
fn_set_notification('E', __('error'), __('error_user_exists'));
fn_save_post_data('user_data');
if (!empty($params['guest_checkout'])) {
$redirect_params['edit_step'] = $params['step_two'];
$redirect_params['guest_checkout'] = 1;
}
return $redirect_params;
}
}
if (isset($user_data['fields'])) {
$fields = fn_array_merge(isset($cart['user_data']['fields']) ? $cart['user_data']['fields'] : array(), $user_data['fields']);
}
if ($params['update_step'] == 'step_two' && !empty($user_data)) {
$user_data = fn_fill_contact_info_from_address($user_data);
}
$cart['user_data'] = fn_array_merge($cart['user_data'], $user_data);
// Fill shipping info with billing if needed
if (empty($params['ship_to_another']) && $params['update_step'] == 'step_two') {
$profile_fields = fn_get_profile_fields('O');
fn_fill_address($cart['user_data'], $profile_fields);
}
if (!empty($cart['user_data']['b_vat_id']) && !empty($cart['user_data']['b_country'])) {
if (fn_check_vat_id($user_data['b_vat_id'], $cart['user_data']['b_country'])) {
fn_set_notification('N', __('notice'), __('vat_id_number_is_valid'));
} else {
fn_set_notification('E', __('error'), __('vat_id_number_is_not_valid'));
$cart['user_data']['b_vat_id'] = '';
return $redirect_params;
}
//.........这里部分代码省略.........
示例11: fn_companies_filter_company_product_categories
//
// Create/update product
//
if ($mode == 'update') {
if (!empty($_REQUEST['product_data']['product'])) {
fn_companies_filter_company_product_categories($_REQUEST, $_REQUEST['product_data']);
if (empty($_REQUEST['product_data']['category_ids'])) {
fn_set_notification('E', __('error'), __('category_is_empty'));
return array(CONTROLLER_STATUS_REDIRECT, !empty($_REQUEST['product_id']) ? 'products.update?product_id=' . $_REQUEST['product_id'] : 'products.add');
} else {
$_REQUEST['product_data']['category_ids'] = explode(',', $_REQUEST['product_data']['category_ids']);
}
$product_id = fn_update_product($_REQUEST['product_data'], $_REQUEST['product_id'], DESCR_SL);
if ($product_id === false) {
// Some error occured
fn_save_post_data('product_data');
return array(CONTROLLER_STATUS_REDIRECT, !empty($_REQUEST['product_id']) ? 'products.update?product_id=' . $_REQUEST['product_id'] : 'products.add');
}
}
if (!empty($_REQUEST['product_id'])) {
if (!empty($_REQUEST['add_users'])) {
// Updating product subscribers
$users = db_get_array("SELECT user_id, email FROM ?:users WHERE user_id IN (?n)", $_REQUEST['add_users']);
if (!empty($users)) {
foreach ($users as $user) {
$subscription_id = db_get_field("SELECT subscription_id FROM ?:product_subscriptions WHERE product_id = ?i AND email = ?s", $_REQUEST['product_id'], $user['email']);
if (empty($subscription_id)) {
$subscription_id = db_query("INSERT INTO ?:product_subscriptions ?e", array('product_id' => $_REQUEST['product_id'], 'user_id' => $user['user_id'], 'email' => $user['email']));
} else {
db_query("REPLACE INTO ?:product_subscriptions ?e", array('subscription_id' => $subscription_id, 'product_id' => $_REQUEST['product_id'], 'user_id' => $user['user_id'], 'email' => $user['email']));
}
示例12: 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;
}
}
示例13: die
* (c) 2004 Vladimir V. Kalynyak, Alexey V. Vinokurov, Ilya M. Shalnev *
* *
* 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. *
****************************************************************************/
if (!defined('BOOTSTRAP')) {
die('Access denied');
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$return_url = !empty($_REQUEST['return_url']) ? $_REQUEST['return_url'] : '';
if ($mode == 'request') {
if (fn_image_verification('call_request', $_REQUEST) == false) {
fn_save_post_data('call_data');
} elseif (!empty($_REQUEST['call_data'])) {
$product_data = !empty($_REQUEST['product_data']) ? $_REQUEST['product_data'] : array();
if ($res = fn_do_call_request($_REQUEST['call_data'], $product_data, $_SESSION['cart'], $_SESSION['auth'])) {
if (!empty($res['error'])) {
fn_set_notification('E', __('error'), $res['error']);
} elseif (!empty($res['notice'])) {
fn_set_notification('N', __('notice'), $res['notice']);
}
}
}
}
return array(CONTROLLER_STATUS_OK, $return_url);
}
示例14: die
* "copyright.txt" FILE PROVIDED WITH THIS DISTRIBUTION PACKAGE. *
****************************************************************************/
use Tygh\Registry;
use Tygh\Mailer;
if (!defined('BOOTSTRAP')) {
die('Access denied');
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$discussion_settings = Registry::get('addons.discussion');
$discussion_object_types = fn_get_discussion_objects();
$suffix = '';
if ($mode == 'add') {
$suffix = '&selected_section=discussion';
if (AREA == 'C') {
if (fn_image_verification('use_for_discussion', $_REQUEST) == false) {
fn_save_post_data('post_data');
return array(CONTROLLER_STATUS_REDIRECT, $_REQUEST['redirect_url'] . $suffix);
}
}
$post_data = $_REQUEST['post_data'];
if (!empty($post_data['thread_id'])) {
$object = fn_discussion_get_object_by_thread($post_data['thread_id']);
if (empty($object)) {
fn_set_notification('E', __('error'), __('cant_find_thread'));
return array(CONTROLLER_STATUS_REDIRECT, $_REQUEST['redirect_url'] . $suffix);
}
$object_name = $discussion_object_types[$object['object_type']];
$object_data = fn_get_discussion_object_data($object['object_id'], $object['object_type']);
$ip = fn_get_ip();
$post_data['ip_address'] = $ip['host'];
$post_data['status'] = 'A';
示例15: isset
$account_data['fields'] = isset($_REQUEST['user_data']['fields']) ? $_REQUEST['user_data']['fields'] : '';
$account_data['admin_firstname'] = isset($_REQUEST['company_data']['admin_firstname']) ? $_REQUEST['company_data']['admin_firstname'] : '';
$account_data['admin_lastname'] = isset($_REQUEST['company_data']['admin_lastname']) ? $_REQUEST['company_data']['admin_lastname'] : '';
$data['request_account_data'] = serialize($account_data);
if (empty($data['request_user_id'])) {
$login_condition = empty($data['request_account_name']) ? '' : db_quote(" OR user_login = ?s", $data['request_account_name']);
$user_account_exists = db_get_field("SELECT user_id FROM ?:users WHERE email = ?s ?p", $data['email'], $login_condition);
if ($user_account_exists) {
fn_save_post_data('user_data', 'company_data');
fn_set_notification('E', __('error'), __('error_user_exists'));
return array(CONTROLLER_STATUS_REDIRECT, 'companies.apply_for_vendor');
}
}
$result = fn_update_company($data);
if (!$result) {
fn_save_post_data('user_data', 'company_data');
fn_set_notification('E', __('error'), __('text_error_adding_request'));
return array(CONTROLLER_STATUS_REDIRECT, 'companies.apply_for_vendor');
}
$msg = Tygh::$app['view']->fetch('views/companies/components/apply_for_vendor.tpl');
fn_set_notification('I', __('information'), $msg);
// Notify user department on the new vendor application
Mailer::sendMail(array('to' => 'default_company_users_department', 'from' => 'default_company_users_department', 'data' => array('company_id' => $result, 'company' => $data), 'tpl' => 'companies/apply_for_vendor_notification.tpl'), 'A', Registry::get('settings.Appearance.backend_default_language'));
$return_url = !empty($_SESSION['apply_for_vendor']['return_url']) ? $_SESSION['apply_for_vendor']['return_url'] : fn_url('');
unset($_SESSION['apply_for_vendor']['return_url']);
return array(CONTROLLER_STATUS_REDIRECT, $return_url);
}
}
if (fn_allowed_for('ULTIMATE')) {
if ($mode == 'entry_page') {
$countries = array();