Exemple #1
0
    }
    if ($error == true) {
        unset($_SESSION['access_allowed']);
        $messageStack->add('offline', TEXT_OFFLINE_ERROR);
    }
    $site_trail->add(NAVBAR_TITLE, xos_href_link(FILENAME_OFFLINE, '', 'SSL'));
    require DIR_WS_INCLUDES . 'html_header.php';
    //  require(DIR_WS_INCLUDES . 'boxes.php');
    //  require(DIR_WS_INCLUDES . 'header.php');
    //  require(DIR_WS_INCLUDES . 'footer.php');
    if ($messageStack->size('offline') > 0) {
        $smarty->assign('message_stack', $messageStack->output('offline'));
        $smarty->assign('message_stack_error', $messageStack->output('offline', 'error'));
        $smarty->assign('message_stack_warning', $messageStack->output('offline', 'warning'));
        $smarty->assign('message_stack_success', $messageStack->output('offline', 'success'));
    }
    $language_string = '';
    reset($lng->catalog_languages);
    if (sizeof($lng->catalog_languages) > 1) {
        while (list($key, $value) = each($lng->catalog_languages)) {
            $language_str .= ' <a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('lnc', 'cur', 'tpl', 'dfrom', 'dto')) . 'lnc=' . $key, $request_type) . '">' . xos_image(DIR_WS_IMAGES . 'catalog/templates/' . SELECTED_TPL . '/' . $value['directory'] . '/' . $value['image'], $value['name']) . '</a> ';
        }
        $smarty->assign('language_str', $language_str);
    }
    $smarty->assign(array('form_begin' => xos_draw_form('offline', xos_href_link(FILENAME_OFFLINE, 'action=process', 'SSL')), 'input_field_email_address' => xos_draw_input_field('email_address', '', 'id="email_address"'), 'input_field_password' => xos_draw_password_field('password', '', 'id="password"'), 'form_end' => '</form>'));
    $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'offline');
    $output_offline = $smarty->fetch(SELECTED_TPL . '/offline.tpl');
    $smarty->assign('central_contents', $output_offline);
    $smarty->display(SELECTED_TPL . '/frame.tpl');
    require DIR_WS_INCLUDES . 'application_bottom.php';
}
<?php

$contents = array();
switch ($action) {
    case 'edit_process':
        $heading_title = '<b>' . TEXT_INFO_HEADING_DEFAULT . '</b>';
        $contents[] = array('text' => TEXT_INFO_INTRO_EDIT_PROCESS . xos_draw_hidden_field('id_info', $myAccount['admin_id']));
        break;
    case 'check_account':
        $heading_title = '<b>' . TEXT_INFO_HEADING_CONFIRM_PASSWORD . '</b>';
        $contents[] = array('text' => TEXT_INFO_INTRO_CONFIRM_PASSWORD . xos_draw_hidden_field('id_info', $myAccount['admin_id']));
        if ($_GET['error']) {
            $contents[] = array('text' => TEXT_INFO_INTRO_CONFIRM_PASSWORD_ERROR);
        }
        $contents[] = array('text' => xos_draw_password_field('password_confirmation'));
        $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_ADMIN_ACCOUNT) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_BACK . ' "><span>' . BUTTON_TEXT_BACK . '</span></a><a href="" onclick="account.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CONFIRM . ' "><span>' . BUTTON_TEXT_CONFIRM . '</span></a><br />&nbsp;');
        break;
    default:
        $heading_title = '<b>' . TEXT_INFO_HEADING_DEFAULT . '</b>';
        $contents[] = array('text' => TEXT_INFO_INTRO_DEFAULT);
        if ($myAccount['admin_email_address'] == 'admin@localhost') {
            $contents[] = array('text' => sprintf(TEXT_INFO_INTRO_DEFAULT_FIRST, $myAccount['admin_firstname']) . '<br />&nbsp;');
        } elseif ($myAccount['admin_modified'] == '0000-00-00 00:00:00' || $myAccount['admin_logdate'] <= 1) {
            $contents[] = array('text' => sprintf(TEXT_INFO_INTRO_DEFAULT_FIRST_TIME, $myAccount['admin_firstname']) . '<br />&nbsp;');
        }
}
$smarty->assign(array('info_box_heading_title' => $heading_title, 'info_box_contents' => $contents));
$output_infobox_admin_account = $smarty->fetch(ADMIN_TPL . '/includes/boxes/infobox_admin_account.tpl');
$smarty->clearAssign(array('info_box_heading_title', 'info_box_contents'));
$smarty->assign('infobox_admin_account', $output_infobox_admin_account);
return 'overwrite_all';
//              osCommerce, Open Source E-Commerce Solutions
//              http://www.oscommerce.com
//              Copyright (c) 2002 osCommerce
//              filename: search.php
//
//              Released under the GNU General Public License
////////////////////////////////////////////////////////////////////////////////
if (!(@(include DIR_FS_SMARTY . 'catalog/templates/' . SELECTED_TPL . '/php/includes/boxes/login_my_account.php') == 'overwrite_all')) {
    if (CACHE_LEVEL > 1 && !isset($_SESSION['customer_id']) && (isset($_COOKIE[session_name()]) && !isset($_GET[session_name()]) || SESSION_FORCE_COOKIE_USE == 'true')) {
        $smarty->caching = 1;
        $cache_id = 'L2|box_login_my_account|' . $_SESSION['language'] . '-' . $_GET['lnc'] . '-' . $_GET[session_name()] . '-' . $session_started . '-' . SELECTED_TPL . '-' . $_SESSION['currency'];
    }
    if (!$smarty->isCached(SELECTED_TPL . '/includes/boxes/login_my_account.tpl', $cache_id)) {
        if (isset($_SESSION['customer_first_name']) && isset($_SESSION['customer_id'])) {
            if (ACCOUNT_GENDER == 'true' && isset($_SESSION['customer_gender']) && $_SESSION['customer_gender'] != '') {
                $box_welcome_string = sprintf(BOX_TEXT_GREETING_PERSONAL, ($_SESSION['customer_gender'] == 'm' ? MALE_ADDRESS : FEMALE_ADDRESS) . '<br />' . xos_output_string_protected($_SESSION['customer_first_name']) . ' ' . xos_output_string_protected($_SESSION['customer_lastname']));
            } else {
                $box_welcome_string = sprintf(BOX_TEXT_GREETING_PERSONAL, xos_output_string_protected($_SESSION['customer_first_name']) . ' ' . xos_output_string_protected($_SESSION['customer_lastname']));
            }
        } else {
            $box_welcome_string = BOX_TEXT_GREETING_GUEST;
        }
        if (SEND_EMAILS == 'true') {
            $smarty->assign('box_login_my_account_link_filename_password_forgotten', xos_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL'));
        }
        $smarty->assign(array('box_login_my_account_link_filename_create_account' => xos_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'box_login_my_account_link_filename_account' => xos_href_link(FILENAME_ACCOUNT, '', 'SSL'), 'box_login_my_account_link_filename_account_edit' => xos_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL'), 'box_login_my_account_link_filename_account_history' => xos_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'), 'box_login_my_account_link_filename_address_book' => xos_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL'), 'box_login_my_account_link_filename_account_notifications' => PRODUCT_NOTIFICATION_ENABLED == 'true' ? xos_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL') : '', 'box_login_my_account_link_filename_logoff' => xos_href_link(FILENAME_LOGOFF, '', 'SSL'), 'box_login_my_account_display_box_my_account' => isset($_SESSION['customer_id']) ? true : false, 'box_login_my_account_welcome_string' => $box_welcome_string, 'box_login_my_account_input_field_email_address' => xos_draw_input_field('email_address', '', 'class="form-control input-sm" id="box_login_email_address" size="10" maxlength="40" style="width: 130px"'), 'box_login_my_account_input_field_password' => xos_draw_password_field('password', '', 'class="form-control input-sm" id="box_login_password" size="10" style="width: 130px"'), 'box_login_my_account_form_begin' => xos_draw_form('box_login', xos_href_link(FILENAME_LOGIN, 'action=process', 'SSL'), 'post', '', true), 'box_login_my_account_form_end' => '</form>'));
    }
    $output_login_my_account = $smarty->fetch(SELECTED_TPL . '/includes/boxes/login_my_account.tpl', $cache_id);
    $smarty->caching = 0;
    $smarty->assign('box_login_my_account', $output_login_my_account);
}
Exemple #4
0
//              MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//              GNU General Public License for more details.
//
//              You should have received a copy of the GNU General Public License
//              along with XOS-Shop.  If not, see <http://www.gnu.org/licenses/>.
//------------------------------------------------------------------------------
// this file is based on:
//              osCommerce, Open Source E-Commerce Solutions
//              http://www.oscommerce.com
//              Copyright (c) 2003 osCommerce
//              filename: install_5.php
//
//              Released under the GNU General Public License
////////////////////////////////////////////////////////////////////////////////
reset($_POST);
$hidden_fields = '';
while (list($key, $value) = each($_POST)) {
    if ($key != 'x' && $key != 'y' && $key != 'DB_SERVER' && $key != 'DB_SERVER_USERNAME' && $key != 'DB_SERVER_PASSWORD' && $key != 'DB_DATABASE' && $key != 'USE_PCONNECT' && $key != 'STORE_SESSIONS') {
        if (is_array($value)) {
            for ($i = 0; $i < sizeof($value); $i++) {
                $hidden_fields .= xos_draw_hidden_field($key . '[]', $value[$i]);
            }
        } else {
            $hidden_fields .= xos_draw_hidden_field($key, $value);
        }
    }
}
$smarty->assign(array('form_begin' => '<form name="install" action="install.php?step=6" method="post">', 'form_end' => '</form>', 'input_field_server' => xos_draw_input_field('DB_SERVER'), 'input_field_username' => xos_draw_input_field('DB_SERVER_USERNAME'), 'password_field' => xos_draw_password_field('DB_SERVER_PASSWORD'), 'input_field_database' => xos_draw_input_field('DB_DATABASE'), 'checkbox_field_pconnect' => xos_draw_checkbox_field('USE_PCONNECT', 'true'), 'radio_field_store_sessions_files' => xos_draw_radio_field('STORE_SESSIONS', 'files', isset($_POST['STORE_SESSIONS']) ? '' : true), 'radio_field_store_sessions_mysql' => xos_draw_radio_field('STORE_SESSIONS', 'mysql'), 'href_link_index' => 'index.php?lang=' . $_POST['language_code'], 'hidden_fields' => $hidden_fields));
$output_install_5 = $smarty->fetch('install_5.tpl');
$smarty->clearAssign(array('form_begin', 'form_end', 'input_field_server', 'input_field_username', 'password_field', 'input_field_database', 'checkbox_field_pconnect', 'radio_field_store_sessions_files', 'radio_field_store_sessions_mysql', 'href_link_index', 'hidden_fields'));
$smarty->assign('install_inner_content', $output_install_5);
 require DIR_WS_INCLUDES . 'footer.php';
 if ($action == 'edit_process') {
     $smarty->assign('form_begin_save_account', xos_draw_form('account', FILENAME_ADMIN_ACCOUNT, 'action=save_account', 'post', 'enctype="multipart/form-data"'));
 } elseif ($action == 'check_account') {
     $smarty->assign('form_begin_check_password', xos_draw_form('account', FILENAME_ADMIN_ACCOUNT, 'action=check_password', 'post', 'enctype="multipart/form-data"'));
 } else {
     $smarty->assign('form_begin_check_account', xos_draw_form('account', FILENAME_ADMIN_ACCOUNT, 'action=check_account', 'post', 'enctype="multipart/form-data"'));
 }
 if ($action == 'edit_process') {
     $smarty->assign('link_filename_admin_account', xos_href_link(FILENAME_ADMIN_ACCOUNT));
     if (isset($_SESSION['confirm_account'])) {
         $smarty->assign('confirm_account', true);
     }
 }
 if ($action == 'edit_process' && isset($_SESSION['confirm_account'])) {
     $smarty->assign(array('input_admin_firstname' => xos_draw_input_field('admin_firstname', $myAccount['admin_firstname']), 'input_admin_lastname' => xos_draw_input_field('admin_lastname', $myAccount['admin_lastname']), 'input_admin_password' => xos_draw_password_field('admin_password'), 'input_admin_password_confirm' => xos_draw_password_field('admin_password_confirm')));
     if ($_GET['error'] == 'email_used') {
         $smarty->assign(array('email_used' => TEXT_INFO_ERROR_EMAIL_USED, 'input_admin_email_address' => xos_draw_input_field('admin_email_address')));
     } elseif ($_GET['error'] == 'email_not_valid') {
         $smarty->assign(array('email_not_valid' => TEXT_INFO_ERROR_EMAIL_NOT_VALID, 'input_admin_email_address' => xos_draw_input_field('admin_email_address')));
     } else {
         $smarty->assign('input_admin_email_address', xos_draw_input_field('admin_email_address', $myAccount['admin_email_address']));
     }
 } else {
     if (isset($_SESSION['confirm_account'])) {
         unset($_SESSION['confirm_account']);
     }
     $smarty->assign(array('admin_firstname' => $myAccount['admin_firstname'], 'admin_lastname' => $myAccount['admin_lastname'], 'admin_email_address' => $myAccount['admin_email_address'], 'admin_groups_name' => $myAccount['admin_groups_name'], 'admin_created' => $myAccount['admin_created'], 'admin_lognum' => $myAccount['admin_lognum'], 'admin_logdate' => $myAccount['admin_logdate']));
 }
 $smarty->assign(array('BODY_TAG_PARAMS' => 'onload="SetFocus();"', 'admin_modified' => $myAccount['admin_modified'], 'form_end' => '</form>'));
 require DIR_WS_BOXES . 'infobox_admin_account.php';
Exemple #6
0
                $_SESSION['login_firstname'] = $check_admin['login_firstname'];
                $actionRecorder->_user_id = $check_admin['login_id'];
                $actionRecorder->record();
                //$date_now = date('Ymd');
                xos_db_query("update " . TABLE_ADMIN . " set admin_logdate = now(), admin_lognum = admin_lognum+1 where admin_id = '" . $_SESSION['login_id'] . "'");
                if ($login_lognum == 0 || !$login_logdate || $login_email_address == 'admin@localhost' || $login_modified == '0000-00-00 00:00:00') {
                    xos_redirect(xos_href_link(FILENAME_ADMIN_ACCOUNT, 'selected_box=0'));
                } else {
                    xos_redirect(xos_href_link(FILENAME_DEFAULT));
                }
            }
        }
    } else {
        $login_error = sprintf(ERROR_ACTION_RECORDER, defined('MODULE_ACTION_RECORDER_ADMIN_LOGIN_MINUTES') ? (int) MODULE_ACTION_RECORDER_ADMIN_LOGIN_MINUTES : 5);
    }
}
$javascript = '<script type="text/javascript">' . "\n" . '/* <![CDATA[ */' . "\n" . 'function center() {' . "\n" . '  var height = document.getElementById("text").offsetHeight;' . "\n" . '  var marg = (height / 2);' . "\n" . '  document.getElementById("spacer").style.margin = "-" + marg + "px" + " 0px" + " 0px" + " 0px";' . "\n" . '}' . "\n\n" . '$(function(){' . "\n" . '  if (document.cookie.indexOf("' . xos_session_name() . '=' . xos_session_id() . '") != -1) {' . "\n" . '    $("#cookie_error").css("visibility", "hidden");' . "\n" . '  }' . "\n" . '});' . "\n" . '/* ]]> */' . "\n" . '</script>' . "\n";
require DIR_WS_INCLUDES . 'html_header_with_special_stylesheet.php';
require DIR_WS_INCLUDES . 'footer.php';
if (SESSION_FORCE_COOKIE_USE == 'true' && !isset($_COOKIE[session_name()])) {
    $smarty->assign('cookie_not_accepted', true);
}
$smarty->assign('login_fail', $login_error);
if (SEND_EMAILS == 'true') {
    // Passwort anfordern ist aus Sicherheitsgruenden nicht sinnvoll.
    //    $smarty->assign('link_filename_password_forgotten', xos_href_link(FILENAME_PASSWORD_FORGOTTEN));
}
$smarty->assign(array('link_filename_default' => xos_href_link(FILENAME_DEFAULT), 'link_catalog' => xos_catalog_href_link(), 'form_login_begin' => xos_draw_form('login', FILENAME_LOGIN, 'action=process'), 'input_email_address' => xos_draw_input_field('email_address'), 'input_password' => xos_draw_password_field('password'), 'form_end' => '</form>'));
$smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'login');
$smarty->display(ADMIN_TPL . '/login.tpl');
return 'overwrite_all';
                xos_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_account_last_modified = now() where customers_info_id = '" . (int) $_SESSION['customer_id'] . "'");
                $messageStack->add_session('account', SUCCESS_PASSWORD_UPDATED, 'success');
                xos_redirect(xos_href_link(FILENAME_ACCOUNT, '', 'SSL'));
            } else {
                $error = true;
                $messageStack->add('account_password', ERROR_CURRENT_PASSWORD_NOT_MATCHING);
            }
        }
        if ($error == true) {
            $smarty->assign('password_error', true);
        }
    }
    $site_trail->add(NAVBAR_TITLE_1, xos_href_link(FILENAME_ACCOUNT, '', 'SSL'));
    $site_trail->add(NAVBAR_TITLE_2, xos_href_link(FILENAME_ACCOUNT_PASSWORD, '', 'SSL'));
    require DIR_WS_INCLUDES . 'html_header.php';
    require DIR_WS_INCLUDES . 'boxes.php';
    require DIR_WS_INCLUDES . 'header.php';
    require DIR_WS_INCLUDES . 'footer.php';
    if ($messageStack->size('account_password') > 0) {
        $smarty->assign('message_stack', $messageStack->output('account_password'));
        $smarty->assign('message_stack_error', $messageStack->output('account_password', 'error'));
        $smarty->assign('message_stack_warning', $messageStack->output('account_password', 'warning'));
        $smarty->assign('message_stack_success', $messageStack->output('account_password', 'success'));
    }
    $smarty->assign(array('form_begin' => xos_draw_form('account_password', xos_href_link(FILENAME_ACCOUNT_PASSWORD, '', 'SSL'), 'post', 'onsubmit="return true;"', true), 'hidden_field' => xos_draw_hidden_field('action', 'process'), 'input_password_current' => xos_draw_password_field('password_current', '', 'class="form-control" id="password_current"') . '&nbsp;' . (xos_not_null(ENTRY_PASSWORD_CURRENT_TEXT) ? '<span class="input-requirement">' . ENTRY_PASSWORD_CURRENT_TEXT . '</span>' : ''), 'input_password_new' => xos_draw_password_field('password_new', '', 'class="form-control" id="password_new"') . '&nbsp;' . (xos_not_null(ENTRY_PASSWORD_NEW_TEXT) ? '<span class="input-requirement">' . ENTRY_PASSWORD_NEW_TEXT . '</span>' : ''), 'input_password_confirmation' => xos_draw_password_field('password_confirmation', '', 'class="form-control" id="password_confirmation"') . '&nbsp;' . (xos_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="input-requirement">' . ENTRY_PASSWORD_CONFIRMATION_TEXT . '</span>' : ''), 'link_filename_account' => xos_href_link(FILENAME_ACCOUNT, '', 'SSL'), 'form_end' => '</form>'));
    $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'account_password');
    $output_account_password = $smarty->fetch(SELECTED_TPL . '/account_password.tpl');
    $smarty->assign('central_contents', $output_account_password);
    $smarty->display(SELECTED_TPL . '/frame.tpl');
    require DIR_WS_INCLUDES . 'application_bottom.php';
}
//              Released under the GNU General Public License
////////////////////////////////////////////////////////////////////////////////
if (!(@(include DIR_FS_SMARTY . 'admin/templates/' . ADMIN_TPL . '/php/includes/boxes/infobox_admin_account.php') == 'overwrite_all')) {
    $contents = array();
    switch ($action) {
        case 'edit_process':
            $heading_title = '<b>' . TEXT_INFO_HEADING_DEFAULT . '</b>';
            $contents[] = array('text' => TEXT_INFO_INTRO_EDIT_PROCESS . xos_draw_hidden_field('id_info', $myAccount['admin_id']));
            break;
        case 'check_account':
            $heading_title = '<b>' . TEXT_INFO_HEADING_CONFIRM_PASSWORD . '</b>';
            $contents[] = array('text' => TEXT_INFO_INTRO_CONFIRM_PASSWORD . xos_draw_hidden_field('id_info', $myAccount['admin_id']));
            if ($_GET['error']) {
                $contents[] = array('text' => TEXT_INFO_INTRO_CONFIRM_PASSWORD_ERROR);
            }
            $contents[] = array('text' => '<div class="form-group">' . xos_draw_password_field('password_confirmation', '', false, 'class="form-control"') . '</div>');
            $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_ADMIN_ACCOUNT) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_BACK . ' ">' . BUTTON_TEXT_BACK . '</a><a href="" onclick="account.submit(); return false" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CONFIRM . ' ">' . BUTTON_TEXT_CONFIRM . '</a><br />&nbsp;');
            break;
        default:
            $heading_title = '<b>' . TEXT_INFO_HEADING_DEFAULT . '</b>';
            $contents[] = array('text' => TEXT_INFO_INTRO_DEFAULT);
            if ($myAccount['admin_email_address'] == 'admin@localhost') {
                $contents[] = array('text' => sprintf(TEXT_INFO_INTRO_DEFAULT_FIRST, $myAccount['admin_firstname']) . '<br />&nbsp;');
            } elseif ($myAccount['admin_modified'] == '0000-00-00 00:00:00' || $myAccount['admin_logdate'] <= 1) {
                $contents[] = array('text' => sprintf(TEXT_INFO_INTRO_DEFAULT_FIRST_TIME, $myAccount['admin_firstname']) . '<br />&nbsp;');
            }
    }
    $smarty->assign(array('info_box_heading_title' => $heading_title, 'info_box_contents' => $contents));
    $output_infobox_admin_account = $smarty->fetch(ADMIN_TPL . '/includes/boxes/infobox_admin_account.tpl');
    $smarty->clearAssign(array('info_box_heading_title', 'info_box_contents'));
    $smarty->assign('infobox_admin_account', $output_infobox_admin_account);
    }
    reset($lng->catalog_languages);
    if (sizeof($lng->catalog_languages) > 1) {
        $lang_array = array();
        $languages_selected = '';
        while (list($key, $value) = each($lng->catalog_languages)) {
            $lang_array[] = array('id' => $value['id'], 'text' => $value['name']);
            if (!empty($language_id)) {
                $languages_selected = $language_id;
            } elseif ($value['id'] == $_SESSION['languages_id']) {
                $languages_selected = $value['id'];
            }
        }
        $smarty->assign(array('languages' => true, 'pull_down_menu_languages' => xos_draw_pull_down_menu('languages', $lang_array, $languages_selected, 'class="form-control" id="languages"')));
    }
    $popup_status_query = xos_db_query("select status from " . TABLE_CONTENTS . "  where type = 'system_popup' and status = '1' and content_id = '7' LIMIT 1");
    $back = sizeof($_SESSION['navigation']->path) - 2;
    if (!empty($_SESSION['navigation']->path[$back])) {
        $get_params_array = $_SESSION['navigation']->path[$back]['get'];
        $get_params_array['rmp'] = '0';
        $back_link = xos_href_link($_SESSION['navigation']->path[$back]['page'], xos_array_to_query_string($get_params_array, array('action', xos_session_name())), $_SESSION['navigation']->path[$back]['mode']);
    } else {
        $back_link = 'javascript:history.go(-1)';
    }
    $smarty->assign(array('form_begin' => xos_draw_form('create_account', xos_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'post', 'onsubmit="return check_form_password(create_account);"', true), 'hidden_field' => xos_draw_hidden_field('action', 'process'), 'link_filename_login' => xos_href_link(FILENAME_LOGIN, xos_get_all_get_params(), 'SSL'), 'link_filename_popup_content_7' => xos_db_num_rows($popup_status_query) ? xos_href_link(FILENAME_POPUP_CONTENT, 'co=7', $request_type) : '', 'input_firstname' => xos_draw_input_field('firstname', '', 'class="form-control" id="firstname"') . '&nbsp;' . (xos_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="input-requirement">' . ENTRY_FIRST_NAME_TEXT . '</span>' : ''), 'input_lastname' => xos_draw_input_field('lastname', '', 'class="form-control" id="lastname"') . '&nbsp;' . (xos_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="input-requirement">' . ENTRY_LAST_NAME_TEXT . '</span>' : ''), 'input_email_address' => xos_draw_input_field('email_address', '', 'class="form-control" id="email_address"') . '&nbsp;' . (xos_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="input-requirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>' : ''), 'input_street_address' => xos_draw_input_field('street_address', '', 'class="form-control" id="street_address"') . '&nbsp;' . (xos_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<span class="input-requirement">' . ENTRY_STREET_ADDRESS_TEXT . '</span>' : ''), 'input_postcode' => xos_draw_input_field('postcode', '', 'class="form-control" id="postcode"') . '&nbsp;' . (xos_not_null(ENTRY_POST_CODE_TEXT) ? '<span class="input-requirement">' . ENTRY_POST_CODE_TEXT . '</span>' : ''), 'input_city' => xos_draw_input_field('city', '', 'class="form-control" id="city"') . '&nbsp;' . (xos_not_null(ENTRY_CITY_TEXT) ? '<span class="input-requirement">' . ENTRY_CITY_TEXT . '</span>' : ''), 'input_country' => xos_get_country_list('country', '', 'class="form-control" id="country"') . '&nbsp;' . (xos_not_null(ENTRY_COUNTRY_TEXT) ? '<span class="input-requirement">' . ENTRY_COUNTRY_TEXT . '</span>' : ''), 'input_telephone' => xos_draw_input_field('telephone', '', 'class="form-control" id="telephone"') . '&nbsp;' . (xos_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="input-requirement">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>' : ''), 'input_fax' => xos_draw_input_field('fax', '', 'class="form-control" id="fax"') . '&nbsp;' . (xos_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="input-requirement">' . ENTRY_FAX_NUMBER_TEXT . '</span>' : ''), 'input_newsletter' => NEWSLETTER_ENABLED == 'true' ? xos_draw_checkbox_field('newsletter', '1', '', 'id="newsletter"') . '&nbsp;' . (xos_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="input-requirement">' . ENTRY_NEWSLETTER_TEXT . '</span>' : '') : '', 'input_password' => xos_draw_password_field('password', '', 'class="form-control" id="password"') . '&nbsp;' . (xos_not_null(ENTRY_PASSWORD_TEXT) ? '<span class="input-requirement">' . ENTRY_PASSWORD_TEXT . '</span>' : ''), 'input_confirmation' => xos_draw_password_field('confirmation', '', 'class="form-control" id="confirmation"') . '&nbsp;' . (xos_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="input-requirement">' . ENTRY_PASSWORD_CONFIRMATION_TEXT . '</span>' : ''), 'link_back' => $back_link, 'form_end' => '</form>'));
    $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'create_account');
    $output_create_account = $smarty->fetch(SELECTED_TPL . '/create_account.tpl');
    $smarty->assign('central_contents', $output_create_account);
    $smarty->display(SELECTED_TPL . '/frame.tpl');
    require DIR_WS_INCLUDES . 'application_bottom.php';
}
Exemple #10
0
        $smarty->assign('message_stack_error', $messageStack->output('login', 'error'));
        $smarty->assign('message_stack_warning', $messageStack->output('login', 'warning'));
        $smarty->assign('message_stack_success', $messageStack->output('login', 'success'));
    }
    if ($_SESSION['cart']->count_contents() > 0) {
        $smarty->assign('cart_contents', true);
    }
    if (SEND_EMAILS == 'true') {
        $smarty->assign('link_filename_password_forgotten', xos_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL'));
    }
    if ($_GET['skip'] != 'true' && $_POST['email_address'] == SPPC_TOGGLE_LOGIN_PASSWORD && $error != true) {
        $smarty->assign('form_begin', xos_draw_form('login', xos_href_link(FILENAME_LOGIN, 'action=process&skip=true', 'SSL'), 'post', '', true));
    } else {
        $smarty->assign('form_begin', xos_draw_form('login', xos_href_link(FILENAME_LOGIN, 'action=process', 'SSL'), 'post', '', true));
    }
    $back = sizeof($_SESSION['navigation']->path) - 2;
    if (!empty($_SESSION['navigation']->path[$back])) {
        $get_params_array = $_SESSION['navigation']->path[$back]['get'];
        $get_params_array['rmp'] = '0';
        $back_link = xos_href_link($_SESSION['navigation']->path[$back]['page'], xos_array_to_query_string($get_params_array, array('action', xos_session_name())), $_SESSION['navigation']->path[$back]['mode']);
    } else {
        $back_link = 'javascript:history.go(-1)';
    }
    $popup_status_query = xos_db_query("select status from " . TABLE_CONTENTS . "  where type = 'system_popup' and status = '1' and content_id = '10' LIMIT 1");
    $smarty->assign(array('link_filename_create_account' => xos_href_link(FILENAME_CREATE_ACCOUNT, 'rmp=0', 'SSL'), 'link_back' => $back_link, 'input_field_email_address' => xos_draw_input_field('email_address', '', 'class="form-control" id="email_address"'), 'input_field_password' => xos_draw_password_field('password', '', 'class="form-control" id="password"'), 'link_filename_popup_content_10' => xos_db_num_rows($popup_status_query) ? xos_href_link(FILENAME_POPUP_CONTENT, 'co=10', $request_type) : '', 'store_name' => STORE_NAME, 'form_end' => '</form>'));
    $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'login');
    $output_login = $smarty->fetch(SELECTED_TPL . '/login.tpl');
    $smarty->assign('central_contents', $output_login);
    $smarty->display(SELECTED_TPL . '/frame.tpl');
    require DIR_WS_INCLUDES . 'application_bottom.php';
}