} if ($error == false) { $check_customer_query = olc_db_query("select customers_password from " . TABLE_CUSTOMERS . " where customers_id = '" . (int) $_SESSION['customer_id'] . APOS); $check_customer = olc_db_fetch_array($check_customer_query); if (olc_validate_password($password_current, $check_customer['customers_password'])) { olc_db_query(SQL_UPDATE . TABLE_CUSTOMERS . " set customers_password = '******' where customers_id = '" . (int) $_SESSION['customer_id'] . APOS); olc_db_query(SQL_UPDATE . TABLE_CUSTOMERS_INFO . " set customers_info_date_account_last_modified = now() where customers_info_id = '" . (int) $_SESSION['customer_id'] . APOS); $messageStack->add_session('account', SUCCESS_PASSWORD_UPDATED, 'success'); olc_redirect(olc_href_link(FILENAME_ACCOUNT)); } else { $error = true; $messageStack->add('account_password', ERROR_CURRENT_PASSWORD_NOT_MATCHING); } } } $breadcrumb->add(NAVBAR_TITLE_1_ACCOUNT_PASSWORD, olc_href_link(FILENAME_ACCOUNT)); $breadcrumb->add(NAVBAR_TITLE_2_ACCOUNT_PASSWORD, olc_href_link(FILENAME_ACCOUNT_PASSWORD)); require DIR_WS_INCLUDES . 'header.php'; if ($messageStack->size('account_password') > 0) { $smarty->assign('error', $messageStack->output('account_password')); } $smarty->assign('FORM_ACTION', olc_draw_form('account_password', olc_href_link(FILENAME_ACCOUNT_PASSWORD), 'post', 'onsubmit="return check_form(account_password);"') . olc_draw_hidden_field('action', 'process')); $smarty->assign('INPUT_ACTUAL', olc_draw_password_field('password_current') . HTML_NBSP . (olc_not_null(ENTRY_PASSWORD_CURRENT_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_CURRENT_TEXT . '</span>' : '')); $smarty->assign('INPUT_NEW', olc_draw_password_field('password_new') . HTML_NBSP . (olc_not_null(ENTRY_PASSWORD_NEW_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_NEW_TEXT . '</span>' : '')); $smarty->assign('INPUT_CONFIRM', olc_draw_password_field('password_confirmation') . HTML_NBSP . (olc_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="inputRequirement">' . ENTRY_PASSWORD_CONFIRMATION_TEXT . '</span>' : '')); $smarty->assign('BUTTON_BACK', HTML_A_START . olc_href_link(FILENAME_ACCOUNT) . '">' . olc_image_button('button_back.gif', IMAGE_BUTTON_BACK) . HTML_A_END); $smarty->assign('BUTTON_SUBMIT', olc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE)); $main_content = $smarty->fetch(CURRENT_TEMPLATE_MODULE . 'account_password' . HTML_EXT, SMARTY_CACHE_ID); $smarty->assign(MAIN_CONTENT, $main_content); require BOXES; $smarty->display(INDEX_HTML);
$homepage_content = $a_homepage . olc_draw_hidden_field('a_homepage'); } } else { $homepage_content = olc_draw_input_field('a_homepage', $affiliate['affiliate_homepage']) . HTML_NBSP . ENTRY_AFFILIATE_HOMEPAGE_TEXT; } $module_smarty->assign('homepage_content', $homepage_content); if ($is_read_only == false) { $module_smarty->assign('PASSWORD_READONLY', FALSE_STRING_S); if ($error == true) { $module_smarty->assign('error', TRUE_STRING_S); if ($entry_password_error == true) { $password_content = olc_draw_password_field('a_password') . HTML_NBSP . ENTRY_PASSWORD_ERROR; } else { $password_content = PASSWORD_HIDDEN . olc_draw_hidden_field('a_password') . olc_draw_hidden_field('a_confirmation'); } } else { $password_content = olc_draw_password_field('a_password') . HTML_NBSP . ENTRY_PASSWORD_TEXT; } if ($error == false || $entry_password_error == true) { $password_confirmation_content = olc_draw_password_field('a_confirmation') . HTML_NBSP . ENTRY_PASSWORD_CONFIRMATION_TEXT; } $agb_content = olc_draw_checkbox_field('a_agb', $value = '1', $checked = $affiliate['affiliate_agb']) . sprintf(ENTRY_AFFILIATE_ACCEPT_AGB, olc_href_link(FILENAME_CONTENT, 'coID=900', SSL)); if ($entry_agb_error == true) { $agb_content .= HTML_BR . ENTRY_AFFILIATE_AGB_ERROR; } $module_smarty->assign('agb_content', $agb_content); $module_smarty->assign('password_content', $password_content); $module_smarty->assign('password_confirmation_content', $password_confirmation_content); } $module = $module_smarty->fetch(CURRENT_TEMPLATE_MODULE . 'affiliate_account_details' . HTML_EXT, $cacheid); $smarty->assign(MAIN_CONTENT, $module);
$check_affiliate = olc_db_fetch_array($check_affiliate_query); // Check that password is good if (!olc_validate_password($affiliate_password, $check_affiliate['affiliate_password'])) { $_GET['login'] = '******'; } else { $_SESSION['affiliate_id'] = $check_affiliate['affiliate_id']; $date_now = date('Ymd'); olc_db_query(SQL_UPDATE . TABLE_AFFILIATE . " set affiliate_date_of_last_logon = now(), affiliate_number_of_logons = affiliate_number_of_logons + 1 where affiliate_id = '" . $_SESSION['affiliate_id'] . APOS); olc_redirect(olc_href_link(FILENAME_AFFILIATE_SUMMARY, '', SSL)); } } } $breadcrumb->add(NAVBAR_TITLE, olc_href_link(FILENAME_AFFILIATE, '', SSL)); require DIR_WS_INCLUDES . 'header.php'; if (isset($_GET['login']) && $_GET['login'] == 'fail') { $info_message = TRUE_STRING_S; } else { $info_message = FALSE_STRING_S; } $smarty->assign('info_message', $info_message); $smarty->assign('FORM_ACTION', olc_draw_form('login', olc_href_link(FILENAME_AFFILIATE, 'action=process', SSL))); $smarty->assign('LINK_TERMS', '<a href="' . olc_href_link(FILENAME_CONTENT, 'coID=900', SSL) . '">'); $smarty->assign('INPUT_AFFILIATE_USERNAME', olc_draw_input_field('affiliate_username')); $smarty->assign('INPUT_AFFILIATE_PASSWORD', olc_draw_password_field('affiliate_password')); $smarty->assign('LINK_PASSWORD_FORGOTTEN', HTML_A_START . olc_href_link(FILENAME_AFFILIATE_PASSWORD_FORGOTTEN, '', SSL) . '">'); $smarty->assign('LINK_SIGNUP', HTML_A_START . olc_href_link(FILENAME_AFFILIATE_SIGNUP, '', SSL) . '">' . olc_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . HTML_A_END); $smarty->assign('BUTTON_LOGIN', olc_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN)); $main_content = $smarty->fetch(CURRENT_TEMPLATE_MODULE . 'affiliate_affiliate' . HTML_EXT, SMARTY_CACHE_ID); $smarty->assign(MAIN_CONTENT, $main_content); require BOXES; $smarty->display(INDEX_HTML);
require DIR_WS_INCLUDES . 'header.php'; if ($_GET['info_message']) { $info_message = $_GET['info_message']; } $smarty->assign('info_message', $info_message); $smarty->assign('account_option', ACCOUNT_OPTIONS); $smarty->assign('BUTTON_NEW_ACCOUNT', HTML_A_START . olc_href_link(FILENAME_CREATE_ACCOUNT) . '">' . olc_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . HTML_A_END); $smarty->assign('BUTTON_LOGIN', olc_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN)); //---PayPal WPP Modification START ---// if ($checkout_login) { $smarty->assign('BUTTON_EC_CHECKOUT_TEXT', TEXT_PAYPALWPP_EC_HEADER); $smarty->assign('BUTTON_EC_CHECKOUT', HTML_A_START . olc_href_link(FILENAME_EC_PROCESS, EMPTY_STRING, SSL) . '">' . '<img border="0" src="' . MODULE_PAYMENT_PAYPAL_EC_BUTTON_URL . '" title="' . TEXT_PAYPALWPP_EC_BUTTON_TEXT . '">' . HTML_A_END); } //---PayPal WPP Modification END ---// $smarty->assign('BUTTON_GUEST', HTML_A_START . olc_href_link(FILENAME_CREATE_GUEST_ACCOUNT) . '">' . olc_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . HTML_A_END); //W. Kaiser - AJAX $smarty->assign('FORM_ACTION', olc_draw_form('login', olc_href_link(FILENAME_LOGIN, 'action=process'))); //W. Kaiser - AJAX $smarty->assign('INPUT_MAIL', olc_draw_input_field('email_address', EMPTY_STRING, 'maxlength="96" size="35"')); $smarty->assign('INPUT_PASSWORD', olc_draw_password_field('password', EMPTY_STRING, 'maxlength="30" size="35"')); $smarty->assign('LINK_LOST_PASSWORD', olc_href_link(FILENAME_PASSWORD_FORGOTTEN)); $main_content = $smarty->fetch(CURRENT_TEMPLATE_MODULE . 'login' . HTML_EXT, SMARTY_CACHE_ID); $smarty->assign(MAIN_CONTENT, $main_content); $omit_login_box = USE_AJAX; //W. Kaiser - AJAX if (!isset($order_step)) { require BOXES; } $smarty->display(INDEX_HTML); } }
function display_input_field($smarty_name, $IsPasswordField, $field_backcolor, $field_desc, $field_desc_size, $field_name, $field_value, $field_length, $field_size, $field_values_array, $error, $entry_error, $entry_error_desc, $add_html, $AJAX_validate = false, $AJAX_required = false, $AJAX_add_span = false) { global $display_text, $IsUserMode; if ($IsUserMode) { global $smarty; } field_init($field_name, $field_desc, $field_desc_size, $field_backcolor, $error, $entry_error, $entry_error_desc, $field_name == ENTRY_STATE_TEXT_LOCAL); $field_size = 'maxlength="' . $field_length . '" size="' . $field_size . '"'; $required = $error == NOT_REQUIRED ? false : !$error; if ($IsPasswordField) { $display_text .= olc_draw_password_field($field_name, $field_value, $field_size, $required); } else { if ((int) $error == NO_INPUT) { $display_text .= $field_value . olc_draw_hidden_field($field_name, $field_value); } else { if ($IsUserMode) { $display_text .= olc_draw_input_field($field_name, $field_value, $field_size, "text", true, $AJAX_validate, $AJAX_required, $field_desc, $AJAX_add_span); } else { $display_text .= olc_draw_input_field($field_name, $field_value, $field_size, $required); } } } if ($IsUserMode) { if ($AJAX_add_span) { $display_text .= ' </span>'; } } field_output($field_name, $smarty_name, $add_html); }
Third Party contributions: Loginbox V1.0 Aubrey Kilian <*****@*****.**> Released under the GNU General Public License ---------------------------------------------------------------------------------------*/ olc_smarty_init($box_smarty, $cacheid); if (isset($_SESSION['customer_id']) || $omit_login_box) { if (IS_AJAX_PROCESSING) { $box_loginbox = HTML_NBSP; } } else { require_once DIR_FS_INC . 'olc_image_submit.inc.php'; require_once DIR_FS_INC . 'olc_draw_password_field.inc.php'; //W. Kaiser - AJAX $box_smarty->assign('FORM_ACTION', olc_draw_form("login_box", olc_href_link(FILENAME_LOGIN, 'action=process', SSL))); //W. Kaiser - AJAX $box_smarty->assign('TEXT_EMAIL', BOX_LOGINBOX_EMAIL); $box_smarty->assign('FIELD_EMAIL', olc_draw_input_field('email_address', EMPTY_STRING, ' maxlength="96" size="15"')); $box_smarty->assign('TEXT_PWD', BOX_LOGINBOX_PASSWORD); $box_smarty->assign('FIELD_PWD', olc_draw_password_field('password', EMPTY_STRING, 'maxlength="30" size="15"')); if (OL_COMMERCE) { $file = FILENAME_PASSWORD_FORGOTTEN; } else { $file = FILENAME_PASSWORD_DOUBLE_OPT; } $box_smarty->assign('LINK_LOST_PASSWORD', olc_href_link($file, EMPTY_STRING, SSL)); $box_smarty->assign('BUTTON', olc_image_submit('button_login_small.gif', IMAGE_BUTTON_LOGIN)); $box_loginbox = $box_smarty->fetch(CURRENT_TEMPLATE_BOXES . 'box_login' . HTML_EXT); } $smarty->assign('box_LOGIN', $box_loginbox); //W. Kaiser - AJAX
require_once DIR_FS_INC . 'olc_not_null.inc.php'; require_once DIR_FS_INC . 'olc_href_link.inc.php'; require_once DIR_FS_INC . 'olc_check_agent.inc.php'; $main_content = ' <html><head><title></title></head><body> <h3>CAO-Faktura - OL-Commerce Shopanbindung</h3> <p> ' . olc_draw_form('cao', basename($PHP_SELF), 'get') . ' <table border="0" width="300" id="table1"> <tr> <td>Email: </td> <td>' . olc_draw_input_field('user', '', 'size="20"') . '</td> </tr> <tr> <td>Password: </td> <td>' . olc_draw_password_field('password', '', 'size="20"') . '</td> </tr> <tr> <td> </td> <td><input type="submit" value="Absenden" name="B1"> <input type="reset" value="Zurücksetzen" name="B2"></td> </tr> </table> <p> </p> <p> </p> </form></p> </body></html> '; echo $main_content; exit; } else { // security 1.check if admin user with this mailadress exits, and got access to xml-export