<?php
/**
 *\licence GPL 2005-2010  The osCSS developers - osCSS Open Source E-commerce
 *\portion code Copyright (c) 2002 osCommerce
 *\package osCSS-2 <www http://www.oscss.org>
 *\version 2.1.0
 *\date  28/11/10, 08:18
 *\author oscim <mail aurelien@oscim.fr> <www http://www.oscim.fr>
 *\encode UTF-8
 *\group boxes
 *\file includes/boxes/login_box.php
*/

  $s='';
  if (tep_session_is_registered('customer_first_name') && tep_session_is_registered('customer_id')) {
    $s.='<div class="back_login" ><p>'. __('Bienvenue ').'</p><br />'."\n";
      $s.='<p class="createAccount"><a  href="'. tep_href_link(FILENAME_LOGOFF) .'">'. __('Fermeture de session') .'</a></p>'."\n";
    $s.='</div>'."\n";
  } else {
    if (_cst_bool('LOGIN_SET_SNAPSHOT')) {
      $navigation = $page->return_object('navigation_history');
      $navigation->set_snapshot();
    }
    $s.=tep_draw_form('login_form_box', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL'));
    $s.='<fieldset class="back_login">'."\n";
      $s.='<p class="inputLog">'."\n";
        $s.=tep_draw_input_field('email_address','login_email','email', 'onclick="this.value=\'\'"');
      $s.='</p>'."\n";
      $s.='<p class="inputLog">'."\n";
        $s.=tep_draw_password_field('password','login_password','0123','onclick="this.value=\'\'"')."\n";
      $s.='</p>'."\n";
      $s.='<p class="formBt">'."\n";
        $s.='<input type="submit" class="submitBt" value="'.__('Valider').'"  />'."\n";
      $s.='</p>'."\n";
    $s.='</fieldset>'."\n";
    $s.='<p class="createAccount">'."\n";
      $s.='<a href="'.tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL').'">'.__('Créer un compte').'</a>'."\n";
    $s.='</p>'."\n";
    $s.='</form>'."\n";
  }
 $array= array('title'=>'','content'=>tep_output_string_protected($s,false,true));
?>
