<?php
/*
  www.oscGold.com (C) Kamelia-Net Jacek Krysiak
  modul oscGold wer 4.0
*/
$corner_left = 'rounded';
$corner_right = 'rounded';
$boxContent_attributes = ' align="center"';
$box_base_name = 'loginbox';

$box_id = $box_base_name . 'Box'; 
require(DIR_WS_LANGUAGES . $language . '/' . $box_base_name . '_box.php');

if ( (!strstr($_SERVER['PHP_SELF'],'login.php')) and (!strstr($_SERVER['PHP_SELF'],'create_account.php')) and !tep_session_is_registered('customer_id') ) {
    if (!tep_session_is_registered('customer_id')) {
     $boxHeading = BOX_LOGIN_HEADING;
     $boxContent = '
     <div class="logow1">
        '.tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL')).'
        <div class="logow2"><span class="boxText">'. ENTRY_EMAIL_NICK . '</span></div>
        <div><input type="text" name="email_address" maxlength="96" style="width:100%" value=""></div>
        <div class="logow2"><span class="boxText">'. ENTRY_PASSWORD . '</span></div>
        <div><input type="password" name="password" maxlength="40" style="width:100%" value=""></div>
        <div class="logow3">'. tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN) . '</div>
        </form>
        <div class="logow4">
            <div class="logow5"><a class="boxLink" href="' . tep_href_link(FILENAME_LOGIN,'act=register', 'SSL') . '">' . LOGIN_BOX_SECURE_LOGIN . '</a></div>
            <div class="logow5"><a class="boxLink" href="' . tep_href_link(FILENAME_CREATE_ACCOUNT,'act=register','SSL') . '">' . LOGIN_BOX_NEW_USER . '</a></div>
            <div class="logow5"><a class="boxLink" href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . LOGIN_BOX_PASSWORD_FORGOTTEN . '</a></div>
        </div>
     </div>';
     $boxContent = optimize_html($boxContent);
     include (bts_select('boxes', $box_base_name)); // BTS 1.5
    }
 } else {
  if (tep_session_is_registered('customer_id') && $customer_id != 0 && !tep_session_is_registered('customer_is_guest')) {
    $boxHeading = BOX_HEADING_LOGIN_BOX_MY_ACCOUNT;
    $boxContent = '<div class="box_kont">';
    $boxContent .= '<div class="box_list"><a class="boxLink" href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . LOGIN_BOX_MY_ACCOUNT . '</a></div>';   
    if (file_exists(DIR_WS_TEMPLATES . 'images/infobox/category_line.gif')) {
        $boxContent .= '<div class="box_line">' . tep_image(DIR_WS_TEMPLATES . 'images/infobox/category_line.gif') . '</div>';
    } 
    $boxContent .= '<div class="box_list"><a class="boxLink" href="' . tep_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL') . '">' . LOGIN_BOX_ACCOUNT_EDIT . '</a></div>';   
    if (file_exists(DIR_WS_TEMPLATES . 'images/infobox/category_line.gif')) {
        $boxContent .= '<div class="box_line">' . tep_image(DIR_WS_TEMPLATES . 'images/infobox/category_line.gif') . '</div>';
    }
    $boxContent .= '<div class="box_list"><a class="boxLink" href="' . tep_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL') . '">' . LOGIN_BOX_ADDRESS_BOOK . '</a></div>';   
    if (file_exists(DIR_WS_TEMPLATES . 'images/infobox/category_line.gif')) {
        $boxContent .= '<div class="box_line">' . tep_image(DIR_WS_TEMPLATES . 'images/infobox/category_line.gif') . '</div>';
    }
    $boxContent .= '<div class="box_list"><a class="boxLink" href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL') . '">' . LOGIN_BOX_ACCOUNT_HISTORY . '</a></div>';   
    if (file_exists(DIR_WS_TEMPLATES . 'images/infobox/category_line.gif')) {
        $boxContent .= '<div class="box_line">' . tep_image(DIR_WS_TEMPLATES . 'images/infobox/category_line.gif') . '</div>';
    }
    $boxContent .= '<div class="box_list"><a class="boxLink" href="' . tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'NONSSL') . '">' . LOGIN_BOX_PRODUCT_NOTIFICATIONS . '</a></div>';   
    if (file_exists(DIR_WS_TEMPLATES . 'images/infobox/category_line.gif')) {
        $boxContent .= '<div class="box_line">' . tep_image(DIR_WS_TEMPLATES . 'images/infobox/category_line.gif') . '</div>';
    }
    $boxContent .= '<div class="box_list"><a class="boxLink" href="' . tep_href_link(FILENAME_LOGOFF, '', 'NONSSL') . '">' . HEADER_TITLE_LOGOFF . '</a></div>';   
    if (file_exists(DIR_WS_TEMPLATES . 'images/infobox/category_line.gif')) {
        $boxContent .= '<div class="box_line">' . tep_image(DIR_WS_TEMPLATES . 'images/infobox/category_line.gif') . '</div>';
    }    
    $boxContent .= '</div>';
    include (bts_select('boxes', $box_base_name));
 }
}
?>