本文整理汇总了PHP中lc_redirect函数的典型用法代码示例。如果您正苦于以下问题:PHP lc_redirect函数的具体用法?PHP lc_redirect怎么用?PHP lc_redirect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了lc_redirect函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: execute
function execute()
{
global $lC_Database, $lC_Session, $lC_NavigationHistory, $lC_Customer;
if (!$lC_Customer->isLoggedOn()) {
$lC_NavigationHistory->setSnapshot();
lc_redirect(lc_href_link(FILENAME_ACCOUNT, 'login', 'SSL'));
return false;
}
$id = false;
foreach ($_GET as $key => $value) {
if ((preg_match('/^[0-9]+(#?([0-9]+:?[0-9]+)+(;?([0-9]+:?[0-9]+)+)*)*$/', $key) || preg_match('/^[a-zA-Z0-9 -_]*$/', $key)) && $key != $lC_Session->getName()) {
$id = $key;
}
break;
}
if ($id !== false && lC_Product::checkEntry($id)) {
$lC_Product = new lC_Product($id);
$Qcheck = $lC_Database->query('select products_id from :table_products_notifications where customers_id = :customers_id and products_id = :products_id limit 1');
$Qcheck->bindTable(':table_products_notifications', TABLE_PRODUCTS_NOTIFICATIONS);
$Qcheck->bindInt(':customers_id', $lC_Customer->getID());
$Qcheck->bindInt(':products_id', $lC_Product->getID());
$Qcheck->execute();
if ($Qcheck->numberOfRows() > 0) {
$Qn = $lC_Database->query('delete from :table_products_notifications where customers_id = :customers_id and products_id = :products_id');
$Qn->bindTable(':table_products_notifications', TABLE_PRODUCTS_NOTIFICATIONS);
$Qn->bindInt(':customers_id', $lC_Customer->getID());
$Qn->bindInt(':products_id', $lC_Product->getID());
$Qn->execute();
}
}
lc_redirect(lc_href_link(basename($_SERVER['SCRIPT_FILENAME']), lc_get_all_get_params(array('action'))));
}
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:32,代码来源:notify_remove.php
示例2: _process
protected function _process()
{
global $lC_MessageStack, $lC_Database, $lC_Language, $lC_Vqmod;
require_once $lC_Vqmod->modCheck('includes/classes/account.php');
$Qcheck = $lC_Database->query('select customers_id, customers_firstname, customers_lastname, customers_gender, customers_email_address, customers_password from :table_customers where customers_email_address = :customers_email_address limit 1');
$Qcheck->bindTable(':table_customers', TABLE_CUSTOMERS);
$Qcheck->bindValue(':customers_email_address', $_POST['email_address']);
$Qcheck->execute();
if ($Qcheck->numberOfRows() === 1) {
$password = lc_create_random_string(ACCOUNT_PASSWORD);
if (lC_Account::savePassword($password, $Qcheck->valueInt('customers_id'))) {
if (ACCOUNT_GENDER > -1) {
if ($data['gender'] == 'm') {
$email_text = sprintf($lC_Language->get('email_addressing_gender_male'), $Qcheck->valueProtected('customers_lastname')) . "\n\n";
} else {
$email_text = sprintf($lC_Language->get('email_addressing_gender_female'), $Qcheck->valueProtected('customers_lastname')) . "\n\n";
}
} else {
$email_text = sprintf($lC_Language->get('email_addressing_gender_unknown'), $Qcheck->valueProtected('customers_firstname') . ' ' . $Qcheck->valueProtected('customers_lastname')) . "\n\n";
}
$email_text .= sprintf($lC_Language->get('email_password_reminder_body'), getenv('REMOTE_ADDR'), STORE_NAME, $password, STORE_OWNER_EMAIL_ADDRESS);
lc_email($Qcheck->valueProtected('customers_firstname') . ' ' . $Qcheck->valueProtected('customers_lastname'), $Qcheck->valueProtected('customers_email_address'), sprintf($lC_Language->get('email_password_reminder_subject'), STORE_NAME), $email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
}
lc_redirect(lc_href_link(FILENAME_ACCOUNT, 'login&success=' . urlencode($lC_Language->get('success_password_forgotten_sent')), 'SSL'));
} else {
$lC_MessageStack->add('password_forgotten', $lC_Language->get('error_password_forgotten_no_email_address_found'));
}
}
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:28,代码来源:password_forgotten.php
示例3: _process
protected function _process()
{
global $lC_Database, $lC_Session, $lC_Language, $lC_ShoppingCart, $lC_MessageStack, $lC_Customer, $lC_NavigationHistory, $lC_Vqmod;
require $lC_Vqmod->modCheck('includes/classes/account.php');
if (lC_Account::checkEntry($_POST['email_address'])) {
if (lC_Account::checkPassword($_POST['password'], $_POST['email_address'])) {
if (SERVICE_SESSION_REGENERATE_ID == '1') {
$lC_Session->recreate();
}
$lC_Customer->setCustomerData(lC_Account::getID($_POST['email_address']));
$Qupdate = $lC_Database->query('update :table_customers set date_last_logon = :date_last_logon, number_of_logons = number_of_logons+1 where customers_id = :customers_id');
$Qupdate->bindTable(':table_customers', TABLE_CUSTOMERS);
$Qupdate->bindRaw(':date_last_logon', 'now()');
$Qupdate->bindInt(':customers_id', $lC_Customer->getID());
$Qupdate->execute();
if ($lC_ShoppingCart->hasContents() === true) {
$lC_ShoppingCart->synchronizeWithDatabase();
}
$lC_NavigationHistory->removeCurrentPage();
lC_Cache::clearAll();
if ($lC_NavigationHistory->hasSnapshot()) {
$lC_NavigationHistory->redirectToSnapshot();
} else {
lc_redirect(lc_href_link(FILENAME_DEFAULT, null, 'AUTO'));
}
} else {
$lC_MessageStack->add('login', $lC_Language->get('error_login_no_match'));
}
} else {
$lC_MessageStack->add('login', $lC_Language->get('error_login_no_match'));
}
}
开发者ID:rajeshb001,项目名称:loaded7,代码行数:32,代码来源:login.php
示例4: _process
protected function _process()
{
global $lC_Language, $lC_MessageStack, $lC_Product;
if (empty($_POST['from_name'])) {
$lC_MessageStack->add('tell_a_friend', $lC_Language->get('error_tell_a_friend_customers_name_empty'));
}
if (!lc_validate_email_address($_POST['from_email_address'])) {
$lC_MessageStack->add('tell_a_friend', $lC_Language->get('error_tell_a_friend_invalid_customers_email_address'));
}
if (empty($_POST['to_name'])) {
$lC_MessageStack->add('tell_a_friend', $lC_Language->get('error_tell_a_friend_friends_name_empty'));
}
if (!lc_validate_email_address($_POST['to_email_address'])) {
$lC_MessageStack->add('tell_a_friend', $lC_Language->get('error_tell_a_friend_invalid_friends_email_address'));
}
if ($lC_MessageStack->size('tell_a_friend') < 1) {
$email_subject = sprintf($lC_Language->get('email_tell_a_friend_subject'), lc_sanitize_string($_POST['from_name']), STORE_NAME);
$email_body = sprintf($lC_Language->get('email_tell_a_friend_intro'), lc_sanitize_string($_POST['to_name']), lc_sanitize_string($_POST['from_name']), $lC_Product->getTitle(), STORE_NAME) . "\n\n";
if (!empty($_POST['message'])) {
$email_body .= lc_sanitize_string($_POST['message']) . "\n\n";
}
$email_body .= sprintf($lC_Language->get('email_tell_a_friend_link'), lc_href_link(HTTP_SERVER . DIR_WS_CATALOG . FILENAME_PRODUCTS, $lC_Product->getKeyword(), 'NONSSL', false)) . "\n\n" . sprintf($lC_Language->get('email_tell_a_friend_signature'), STORE_NAME . "\n" . HTTP_SERVER . DIR_WS_CATALOG . "\n");
lc_email(lc_sanitize_string($_POST['to_name']), lc_sanitize_string($_POST['to_email_address']), $email_subject, $email_body, lc_sanitize_string($_POST['from_name']), lc_sanitize_string($_POST['from_email_address']));
lc_redirect(lc_href_link(FILENAME_PRODUCTS, 'tell_a_friend&' . $lC_Product->getID() . '&success=' . urlencode(sprintf($lC_Language->get('success_tell_a_friend_email_sent'), $lC_Product->getTitle(), lc_output_string_protected($_POST['to_name'])))));
}
}
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:26,代码来源:tell_a_friend.php
示例5: execute
function execute()
{
global $lC_Session, $lC_ShoppingCart;
if (is_numeric($_GET['item'])) {
$lC_ShoppingCart->remove($_GET['item']);
}
lc_redirect(lc_href_link(FILENAME_CHECKOUT));
}
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:8,代码来源:cart_remove.php
示例6: _process
protected function _process()
{
global $lC_MessageStack, $lC_Database, $lC_Language, $lC_Customer, $lC_Vqmod;
require_once $lC_Vqmod->modCheck('includes/classes/account.php');
$data = array();
if (ACCOUNT_GENDER >= 0) {
if (isset($_POST['gender']) && ($_POST['gender'] == 'm' || $_POST['gender'] == 'f')) {
$data['gender'] = $_POST['gender'];
} else {
$lC_MessageStack->add('account_edit', $lC_Language->get('field_customer_gender_error'));
}
}
if (isset($_POST['firstname']) && strlen(trim($_POST['firstname'])) >= ACCOUNT_FIRST_NAME) {
$data['firstname'] = $_POST['firstname'];
} else {
$lC_MessageStack->add('account_edit', sprintf($lC_Language->get('field_customer_first_name_error'), ACCOUNT_FIRST_NAME));
}
if (isset($_POST['lastname']) && strlen(trim($_POST['lastname'])) >= ACCOUNT_LAST_NAME) {
$data['lastname'] = $_POST['lastname'];
} else {
$lC_MessageStack->add('account_edit', sprintf($lC_Language->get('field_customer_last_name_error'), ACCOUNT_LAST_NAME));
}
if (ACCOUNT_DATE_OF_BIRTH == '1') {
$dateParts = explode("/", $_POST['dob']);
if (isset($_POST['dob']) && checkdate($dateParts[0], $dateParts[1], $dateParts[2])) {
$data['dob'] = @mktime(0, 0, 0, $dateParts[0], $dateParts[1], $dateParts[2]);
} else {
$lC_MessageStack->add('account_edit', $lC_Language->get('field_customer_date_of_birth_error'));
}
}
if (isset($_POST['email_address']) && strlen(trim($_POST['email_address'])) >= ACCOUNT_EMAIL_ADDRESS) {
if (lc_validate_email_address($_POST['email_address'])) {
if (lC_Account::checkDuplicateEntry($_POST['email_address']) === false) {
$data['email_address'] = $_POST['email_address'];
} else {
$lC_MessageStack->add('account_edit', $lC_Language->get('field_customer_email_address_exists_error'));
}
} else {
$lC_MessageStack->add('account_edit', $lC_Language->get('field_customer_email_address_check_error'));
}
} else {
$lC_MessageStack->add('account_edit', sprintf($lC_Language->get('field_customer_email_address_error'), ACCOUNT_EMAIL_ADDRESS));
}
if ($lC_MessageStack->size('account_edit') === 0) {
if (lC_Account::saveEntry($data)) {
// reset the session variables
if (ACCOUNT_GENDER > -1) {
$lC_Customer->setGender($data['gender']);
}
$lC_Customer->setFirstName(trim($data['firstname']));
$lC_Customer->setLastName(trim($data['lastname']));
$lC_Customer->setEmailAddress($data['email_address']);
$lC_MessageStack->add('account', $lC_Language->get('success_account_updated'), 'success');
}
lc_redirect(lc_href_link(FILENAME_ACCOUNT, null, 'SSL'));
}
}
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:57,代码来源:edit.php
示例7: _process
protected function _process()
{
global $lC_Language, $lC_MessageStack;
$name = lc_sanitize_string($_POST['name']);
$email_address = lc_sanitize_string($_POST['email']);
$inquiry = lc_sanitize_string($_POST['inquiry']);
if (lc_validate_email_address($email_address)) {
lc_email(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, $lC_Language->get('contact_email_subject'), $inquiry, $name, $email_address);
lc_redirect(lc_href_link(FILENAME_INFO, 'contact&success=' . urlencode($lC_Language->get('contact_email_sent_successfully')), 'AUTO'));
} else {
$lC_MessageStack->add('contact', $lC_Language->get('field_customer_email_address_check_error'));
}
}
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:13,代码来源:contact.php
示例8: __construct
public function __construct()
{
global $lC_Language, $lC_Database, $lC_MessageStack;
if (!isset($_GET['set'])) {
$_GET['set'] = 'members';
}
$action = isset($_GET['gid']) && !empty($_GET['gid']) ? 'edit' : 'insert';
switch ($_GET['set']) {
case 'groups':
$this->_page_title = $lC_Language->get('heading_title_groups');
$this->_page_name = 'groups';
$this->_page_contents = 'groups.php';
if (isset($_GET['process'])) {
$result = array();
switch (strtolower($_GET['process'])) {
case 'edit':
$result = lC_Administrators_Admin::saveGroup($_GET['gid'], $_POST);
break;
default:
$result = lC_Administrators_Admin::saveGroup(NULL, $_POST);
}
if ($result['rpcStatus'] != 1 || $lC_Database->isError()) {
if ($lC_Database->isError()) {
$lC_MessageStack->add($this->_module, $lC_Database->getError(), 'error');
} else {
$lC_MessageStack->add($this->_module, $lC_Language->get('ms_error_action_not_performed'), 'error');
}
}
$_SESSION['messageToStack'] = $lC_MessageStack->getAll();
lc_redirect_admin(lc_href_link_admin(FILENAME_DEFAULT, $this->_module . '&set=groups'));
}
break;
case 'access':
if ($action == 'insert' && (int) $_SESSION['admin']['access'][$this->_module] < 2) {
lc_redirect(lc_href_link_admin(FILENAME_DEFAULT, 'error_pages&set=no_access'));
}
if ($action != 'insert' && (int) $_SESSION['admin']['access'][$this->_module] < 3) {
lc_redirect(lc_href_link_admin(FILENAME_DEFAULT, 'error_pages&set=no_access'));
}
$this->_page_title = $action == 'insert' ? $lC_Language->get('heading_title_new_group') : $lC_Language->get('heading_title_edit_group');
$this->_page_name = 'access';
$this->_page_contents = 'access.php';
break;
case 'members':
default:
$this->_page_title = $lC_Language->get('heading_title');
$this->_page_name = 'members';
$this->_page_contents = 'main.php';
break;
}
}
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:51,代码来源:administrators.php
示例9: execute
function execute()
{
global $lC_Database, $lC_Session, $lC_NavigationHistory, $lC_Customer;
if (!$lC_Customer->isLoggedOn()) {
$lC_NavigationHistory->setSnapshot();
lc_redirect(lc_href_link(FILENAME_ACCOUNT, 'login', 'SSL'));
return false;
}
$notifications = array();
if (isset($_GET['products']) && !empty($_GET['products'])) {
$products_array = explode(';', $_GET['products']);
foreach ($products_array as $product_id) {
if (is_numeric($product_id) && !in_array($product_id, $notifications)) {
$notifications[] = $product_id;
}
}
} else {
$id = false;
foreach ($_GET as $key => $value) {
if ((preg_match('/^[0-9]+(#?([0-9]+:?[0-9]+)+(;?([0-9]+:?[0-9]+)+)*)*$/', $key) || preg_match('/^[a-zA-Z0-9 -_]*$/', $key)) && $key != $lC_Session->getName()) {
$id = $key;
}
break;
}
if ($id !== false && lC_Product::checkEntry($id)) {
$lC_Product = new lC_Product($id);
$notifications[] = $lC_Product->getID();
}
}
if (!empty($notifications)) {
foreach ($notifications as $product_id) {
$Qcheck = $lC_Database->query('select products_id from :table_products_notifications where customers_id = :customers_id and products_id = :products_id limit 1');
$Qcheck->bindTable(':table_products_notifications', TABLE_PRODUCTS_NOTIFICATIONS);
$Qcheck->bindInt(':customers_id', $lC_Customer->getID());
$Qcheck->bindInt(':products_id', $product_id);
$Qcheck->execute();
if ($Qcheck->numberOfRows() < 1) {
$Qn = $lC_Database->query('insert into :table_products_notifications (products_id, customers_id, date_added) values (:products_id, :customers_id, :date_added)');
$Qn->bindTable(':table_products_notifications', TABLE_PRODUCTS_NOTIFICATIONS);
$Qn->bindInt(':products_id', $product_id);
$Qn->bindInt(':customers_id', $lC_Customer->getID());
$Qn->bindRaw(':date_added', 'now()');
$Qn->execute();
}
}
}
lc_redirect(lc_href_link(basename($_SERVER['SCRIPT_FILENAME']), lc_get_all_get_params(array('action'))));
}
开发者ID:rajeshb001,项目名称:loaded7,代码行数:48,代码来源:notify_add.php
示例10: execute
function execute()
{
global $lC_Session, $lC_ShoppingCart, $lC_Product, $lC_Language, $lC_Customer;
if (!isset($lC_Product)) {
$id = false;
foreach ($_GET as $key => $value) {
if ((is_numeric($key) || preg_match('/^[a-zA-Z0-9 -_]*$/', $key)) && $key != $lC_Session->getName()) {
$id = $key;
}
break;
}
if ($id !== false && lC_Product::checkEntry($id)) {
$lC_Product = new lC_Product($id);
}
}
if (isset($lC_Product)) {
// VQMOD-hookpoint; DO NOT MODIFY OR REMOVE THE LINE BELOW
$quantity = isset($_POST['quantity']) && !empty($_POST['quantity']) ? (int) $_POST['quantity'] : 1;
if ($lC_Product->hasVariants()) {
if (isset($_POST['variants']) && is_array($_POST['variants']) && !empty($_POST['variants'])) {
if ($lC_Product->variantExists($_POST['variants'])) {
$lC_ShoppingCart->add($lC_Product->getProductVariantID($_POST['variants']), $quantity);
} else {
lc_redirect(lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword() . '&error=' . urlencode($lC_Language->get('variant_combo_not_available'))));
return false;
}
} else {
lc_redirect(lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword()));
return false;
}
} else {
if (isset($_GET['info']) && $_GET['info'] == '1') {
} else {
if ($lC_Product->hasSubProducts($lC_Product->getID()) || $lC_Product->hasSimpleOptions()) {
lc_redirect(lc_href_link(FILENAME_PRODUCTS, $lC_Product->getKeyword()));
}
}
if (isset($_POST['quantity']) && is_array($_POST['quantity'])) {
foreach ($_POST['quantity'] as $product_id => $quantity) {
$lC_ShoppingCart->add((int) $product_id, (int) $quantity);
}
} else {
$lC_ShoppingCart->add($lC_Product->getID(), $quantity);
}
}
}
lc_redirect(lc_href_link(FILENAME_CHECKOUT));
}
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:48,代码来源:cart_add.php
示例11: _process
function _process()
{
$notify_string = '';
$products_array = isset($_POST['notify']) ? $_POST['notify'] : array();
if (!is_array($products_array)) {
$products_array = array($products_array);
}
$notifications = array();
foreach ($products_array as $product_id) {
if (is_numeric($product_id) && !in_array($product_id, $notifications)) {
$notifications[] = $product_id;
}
}
if (!empty($notifications)) {
$notify_string = 'action=notify_add&products=' . implode(';', $notifications);
}
lc_redirect(lc_href_link(FILENAME_DEFAULT, $notify_string, 'AUTO'));
}
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:18,代码来源:success.php
示例12: lC_Account_Orders
public function lC_Account_Orders()
{
global $lC_Services, $lC_Language, $lC_Customer, $lC_Breadcrumb, $lC_Vqmod;
require $lC_Vqmod->modCheck('includes/classes/order.php');
$this->_page_title = $lC_Language->get('orders_heading');
$lC_Language->load('order');
if ($lC_Services->isStarted('breadcrumb')) {
$lC_Breadcrumb->add($lC_Language->get('breadcrumb_my_orders'), lc_href_link(FILENAME_ACCOUNT, $this->_module, 'SSL'));
if (is_numeric($_GET[$this->_module])) {
$lC_Breadcrumb->add(sprintf($lC_Language->get('breadcrumb_order_information'), $_GET[$this->_module]), lc_href_link(FILENAME_ACCOUNT, $this->_module . '=' . $_GET[$this->_module], 'SSL'));
}
}
if (is_numeric($_GET[$this->_module])) {
if (lC_Order::getCustomerID($_GET[$this->_module]) !== $lC_Customer->getID()) {
lc_redirect(lc_href_link(FILENAME_ACCOUNT, $this->_module, 'SSL'));
}
$this->_page_title = sprintf($lC_Language->get('order_information_heading'), $_GET[$this->_module]);
$this->_page_contents = 'account_history_info.php';
}
}
开发者ID:rajeshb001,项目名称:loaded7,代码行数:20,代码来源:orders.php
示例13: _process
protected function _process()
{
global $lC_MessageStack, $lC_Database, $lC_Language, $lC_Customer, $Qnewsletter;
if (isset($_POST['newsletter_general']) && is_numeric($_POST['newsletter_general'])) {
$newsletter_general = $_POST['newsletter_general'];
} else {
$newsletter_general = '0';
}
if ($newsletter_general != $Qnewsletter->valueInt('customers_newsletter')) {
$newsletter_general = $Qnewsletter->value('customers_newsletter') == '1' ? '0' : '1';
$Qupdate = $lC_Database->query('update :table_customers set customers_newsletter = :customers_newsletter where customers_id = :customers_id');
$Qupdate->bindTable(':table_customers', TABLE_CUSTOMERS);
$Qupdate->bindInt(':customers_newsletter', $newsletter_general);
$Qupdate->bindInt(':customers_id', $lC_Customer->getID());
$Qupdate->execute();
if ($Qupdate->affectedRows() === 1) {
$lC_MessageStack->add('account', $lC_Language->get('success_newsletter_updated'), 'success');
}
}
lc_redirect(lc_href_link(FILENAME_ACCOUNT, null, 'SSL'));
}
开发者ID:rajeshb001,项目名称:loaded7,代码行数:21,代码来源:newsletters.php
示例14: execute
function execute()
{
global $lC_ShoppingCart;
// update cart qty
if (isset($_POST['products']) && is_array($_POST['products']) && !empty($_POST['products'])) {
foreach ($_POST['products'] as $item_id => $quantity) {
if (!is_numeric($item_id) || !is_numeric($quantity)) {
return false;
}
$lC_ShoppingCart->update($item_id, $quantity);
}
}
// remove cart items
if (isset($_POST['delete']) && is_array($_POST['delete']) && !empty($_POST['delete'])) {
foreach ($_POST['delete'] as $item_id => $confirm) {
if (!is_numeric($item_id)) {
return false;
}
$lC_ShoppingCart->remove($item_id);
}
}
lc_redirect(lc_href_link(FILENAME_CHECKOUT));
}
开发者ID:rajeshb001,项目名称:itpl_loaded7,代码行数:23,代码来源:cart_update.php
示例15: _process
protected function _process()
{
global $lC_MessageStack, $lC_Database, $lC_Language, $lC_Vqmod;
require_once $lC_Vqmod->modCheck('includes/classes/account.php');
if (!isset($_POST['password_current']) || strlen(trim($_POST['password_current'])) < ACCOUNT_PASSWORD) {
$lC_MessageStack->add('account_password', sprintf($lC_Language->get('field_customer_password_current_error'), ACCOUNT_PASSWORD));
} elseif (!isset($_POST['password_new']) || strlen(trim($_POST['password_new'])) < ACCOUNT_PASSWORD) {
$lC_MessageStack->add('account_password', sprintf($lC_Language->get('field_customer_password_new_error'), ACCOUNT_PASSWORD));
} elseif (!isset($_POST['password_confirmation']) || trim($_POST['password_new']) != trim($_POST['password_confirmation'])) {
$lC_MessageStack->add('account_password', $lC_Language->get('field_customer_password_new_mismatch_with_confirmation_error'));
}
if ($lC_MessageStack->size('account_password') === 0) {
if (lC_Account::checkPassword(trim($_POST['password_current']))) {
if (lC_Account::savePassword(trim($_POST['password_new']))) {
lc_redirect(lc_href_link(FILENAME_ACCOUNT, 'success=' . urlencode($lC_Language->get('success_password_updated')), 'SSL'));
} else {
$lC_MessageStack->add('account_password', sprintf($lC_Language->get('field_customer_password_new_error'), ACCOUNT_PASSWORD));
}
} else {
$lC_MessageStack->add('account_password', $lC_Language->get('error_current_password_not_matching'));
}
}
}
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:23,代码来源:password.php
示例16: _delete
protected function _delete($id)
{
global $lC_MessageStack, $lC_Language, $lC_Customer;
if ($id != $lC_Customer->getDefaultAddressID()) {
if (lC_AddressBook::deleteEntry($id)) {
$lC_MessageStack->add('address_book', $lC_Language->get('success_address_book_entry_deleted'), 'success');
}
} else {
$lC_MessageStack->add('address_book', $lC_Language->get('warning_primary_address_deletion'), 'warning');
}
lc_redirect(lc_href_link(FILENAME_ACCOUNT, 'address_book', 'SSL'));
}
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:12,代码来源:address_book.php
示例17: start
/**
* Verify an existing session ID and create or resume the session if the existing session ID is valid
*
* @access public
* @return boolean
*/
public function start()
{
$sane_session_id = true;
if (isset($_GET[$this->_name]) && (empty($_GET[$this->_name]) || ctype_alnum($_GET[$this->_name]) === false)) {
$sane_session_id = false;
} elseif (isset($_POST[$this->_name]) && (empty($_POST[$this->_name]) || ctype_alnum($_POST[$this->_name]) === false)) {
$sane_session_id = false;
} elseif (isset($_COOKIE[$this->_name]) && (empty($_COOKIE[$this->_name]) || ctype_alnum($_COOKIE[$this->_name]) === false)) {
$sane_session_id = false;
}
if ($sane_session_id === false) {
if (isset($_COOKIE[$this->_name])) {
setcookie($this->_name, '', time() - 42000, $this->getCookieParameters('path'), $this->getCookieParameters('domain'));
}
lc_redirect(lc_href_link(FILENAME_DEFAULT, null, 'NONSSL', false));
} else {
if (isset($_GET['lCsid']) && $_GET['lCsid'] != NULL && isset($_GET['qr']) && $_GET['qr'] == '1') {
$this->_is_started = true;
$this->_id = $_GET['lCsid'];
session_id($_GET['lCsid']);
session_start();
unset($_SESSION['lC_Customer_data']);
$_SESSION['lC_Customer_data']['email_address'] = $_GET['email'];
return true;
} else {
if (isset($_GET['lCAdminID']) && $_GET['lCAdminID'] != NULL) {
$this->_is_started = true;
$this->_id = $_GET['lCAdminID'];
session_id($_GET['lCAdminID']);
session_start();
return true;
} else {
if (session_start()) {
$this->_is_started = true;
$this->_id = session_id();
return true;
}
}
}
}
return false;
}
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:48,代码来源:session.php
示例18: _process
protected function _process($id)
{
global $lC_Language, $lC_MessageStack, $lC_Customer, $lC_Reviews;
$data = array('products_id' => $id);
if ($lC_Customer->isLoggedOn()) {
$data['customer_id'] = $lC_Customer->getID();
$data['customer_name'] = $lC_Customer->getName();
} else {
$data['customer_id'] = '0';
$data['customer_name'] = $_POST['customer_name'];
}
if (strlen(trim($_POST['review'])) < REVIEW_TEXT_MIN_LENGTH) {
$lC_MessageStack->add('reviews', sprintf($lC_Language->get('js_review_text'), REVIEW_TEXT_MIN_LENGTH));
} else {
$data['review'] = $_POST['review'];
}
if ($_POST['rating'] < 1 || $_POST['rating'] > 5) {
$lC_MessageStack->add('reviews', $lC_Language->get('js_review_rating'));
} else {
$data['rating'] = $_POST['rating'];
}
if ($lC_MessageStack->size('reviews') < 1) {
if ($lC_Reviews->is_moderated === true) {
$data['status'] = '0';
$lC_MessageStack->add('reviews', $lC_Language->get('success_review_moderation'), 'success');
} else {
$data['status'] = '1';
$lC_MessageStack->add('reviews', $lC_Language->get('success_review_new'), 'success');
}
lC_Reviews::saveEntry($data);
lc_redirect(lc_href_link(FILENAME_PRODUCTS, 'reviews&' . $id));
}
}
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:33,代码来源:reviews.php
示例19: redirectToSnapshot
public function redirectToSnapshot()
{
$target = $this->getSnapshotURL(true);
$this->resetSnapshot();
lc_redirect($target);
}
开发者ID:abhiesa-tolexo,项目名称:loaded7,代码行数:6,代码来源:navigation_history.php
示例20: lC_Checkout_Payment
public function lC_Checkout_Payment()
{
global $lC_Database, $lC_Session, $lC_ShoppingCart, $lC_Customer, $lC_Services, $lC_Language, $lC_NavigationHistory, $lC_Breadcrumb, $lC_Payment, $lC_MessageStack, $lC_Vqmod;
require $lC_Vqmod->modCheck('includes/classes/address_book.php');
if ($lC_Customer->isLoggedOn() === false) {
$lC_NavigationHistory->setSnapshot();
lc_redirect(lc_href_link(FILENAME_ACCOUNT, 'login', 'SSL'));
}
if ($lC_ShoppingCart->hasContents() === false) {
lc_redirect(lc_href_link(FILENAME_CHECKOUT, null, 'SSL'));
}
// if no shipping method has been selected, redirect the customer to the shipping method selection page
if ($lC_ShoppingCart->hasShippingMethod() === false) {
if (defined('SKIP_CHECKOUT_SHIPPING_PAGE') && SKIP_CHECKOUT_SHIPPING_PAGE == '1') {
if (lC_AddressBook::numberOfEntries() < 1) {
lc_redirect(lc_href_link(FILENAME_CHECKOUT, 'payment_address', 'SSL'));
}
} else {
lc_redirect(lc_href_link(FILENAME_CHECKOUT, 'shipping', 'SSL'));
}
} else {
if (defined('SKIP_CHECKOUT_SHIPPING_PAGE') && SKIP_CHECKOUT_SHIPPING_PAGE == '1') {
if (lC_AddressBook::numberOfEntries() < 1) {
lc_redirect(lc_href_link(FILENAME_CHECKOUT, 'payment_address', 'SSL'));
}
}
}
// Stock Check
if (STOCK_CHECK == '1' && AUTODISABLE_OUT_OF_STOCK_PRODUCT == '1') {
foreach ($lC_ShoppingCart->getProducts() as $products) {
if ($lC_ShoppingCart->isInStock($products['id']) === false) {
lc_redirect(lc_href_link(FILENAME_CHECKOUT, 'SSL'));
break;
}
}
}
$this->_page_title = $lC_Language->get('payment_method_heading');
if ($lC_Services->isStarted('breadcrumb')) {
$lC_Breadcrumb->add($lC_Language->get('breadcrumb_checkout_payment'), lc_href_link(FILENAME_CHECKOUT, $this->_module, 'SSL'));
}
// redirect to the billing address page when no default address exists
if ($lC_Customer->hasDefaultAddress() === false) {
$this->_page_title = $lC_Language->get('payment_address_heading');
$this->_page_contents = 'checkout_payment_address.php';
$this->addJavascriptPhpFilename('templates/' . $this->getCode() . '/javascript/addressBookDetails.js.php');
} else {
// if no billing destination address was selected, use the customers own address as default
if ($lC_ShoppingCart->hasBillingAddress() == false) {
$lC_ShoppingCart->setBillingAddress($lC_Customer->getDefaultAddressID());
} else {
// verify the selected billing address
$Qcheck = $lC_Database->query('select address_book_id from :table_address_book where address_book_id = :address_book_id and customers_id = :customers_id limit 1');
$Qcheck->bindTable(':table_address_book', TABLE_ADDRESS_BOOK);
$Qcheck->bindInt(':address_book_id', $lC_ShoppingCart->getBillingAddress('id'));
$Qcheck->bindInt(':customers_id', $lC_Customer->getID());
$Qcheck->execute();
if ($Qcheck->numberOfRows() !== 1) {
$lC_ShoppingCart->setBillingAddress($lC_Customer->getDefaultAddressID());
$lC_ShoppingCart->resetBillingMethod();
}
}
// load all enabled payment modules
include $lC_Vqmod->modCheck('includes/classes/payment.php');
$lC_Payment = new lC_Payment();
$this->addJavascriptBlock($lC_Payment->getJavascriptBlocks());
}
if (isset($_GET['payment_error'])) {
$lC_MessageStack->add('checkout_payment', urldecode($_GET['payment_error']), 'error');
}
if (isset($_SESSION['messageToStack']) && !empty($_SESSION['messageToStack'])) {
$lC_MessageStack->__construct();
}
// ppec inject
if (isset($_GET['skip']) && $_GET['skip'] == 'no' || isset($_GET['payment_error'])) {
if (isset($_SESSION['SKIP_PAYMENT_PAGE'])) {
unset($_SESSION['SKIP_PAYMENT_PAGE']);
}
if (isset($_SESSION['cartSync'])) {
unset($_SESSION['cartSync']);
}
} else {
if (isset($_SESSION['SKIP_PAYMENT_PAGE']) && $_SESSION['SKIP_PAYMENT_PAGE'] === TRUE) {
lc_redirect(lc_href_link(FILENAME_CHECKOUT, 'confirmation', 'SSL'));
}
}
}
开发者ID:rajeshb001,项目名称:loaded7,代码行数:86,代码来源:payment.php
注:本文中的lc_redirect函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论