<?php
/*

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2002 osCommerce

  Released under the GNU General Public License

  IMPORTANT NOTE:

  This script is not part of the official osC distribution
  but an add-on contributed to the osC community. Please
  read the README and  INSTALL documents that are provided
  with this file for further information and installation notes.

  loginbox.php -   Version 1.0
  This puts a login request in a box with a login button.
  If already logged in, will not show anything.


*/

?>
<!-- loginbox //-->
<?php
    if (!tep_session_is_registered('customer_id')) {
?>

<tr>
<td>
<TABLE cellSpacing=0 cellPadding=0 width="100%">
                    <TBODY>
                    <TR>
                      <TD colSpan=3 width="135" align="right"><IMG alt=Categories
                       src="images/box title/login.gif"></TD></TR>

                      <TD vAlign="top" width="212" align="center">
                        <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                          <TBODY>
                          <TR>
                            <TD>
                              <TABLE cellSpacing=0
                              cellPadding=0 width="100%" border=0>
                                <TBODY>

                                <TR>

                      <TD><?php

    $loginboxcontent = "
            <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
            <form name=\"login\" method=\"post\" action=\"" . tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL') . "\">
              <tr>
                <td align=\"left\" class=\"rightboxtitle\">
                  " . BOX_LOGINBOX_EMAIL . "
                </td>
              </tr>
              <tr>
                <td align=\"left\" class=\"rightboxtitle\">
                  <input type=\"text\" name=\"email_address\" maxlength=\"96\" size=\"15\" value=\"\">
                </td>
              </tr>
              <tr>
                <td align=\"left\" class=\"rightboxtitle\">
                  " . BOX_LOGINBOX_PASSWORD . "
                </td>
              </tr>
              <tr>
                <td align=\"left\" class=\"smalltext\">
                  <input type=\"password\" name=\"password\" maxlength=\"40\" size=\"15\" value=\"\"
                </td>
              </tr>
              <tr>
                <td class=\"smalltext\" align=\"center\"><br>
                  " . tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN) . "

                </td>
              </tr>



 </form>


            </table>";



    $info_box_contents = array();
    $info_box_contents[] = array('align' => 'center',
                                 'text'  => $loginboxcontent
                                );
    new rightbox($info_box_contents);

?></TD>
                    </TR>
                                </TBODY></TABLE></TD></TR></TBODY></TABLE></TD>

      <TD
                      width="7" height="1"><IMG
                        height=1
                        src="images/pixel_trans.gif"
                        width=6></TD>
    </TR>
                    <TR>
                      <TD colSpan=3 valign="top"></TD></TR></TBODY></TABLE>
       </tr>






<?php
  }
  else
  {
  
  // If you want to display anything when the user IS logged in, put it
  // in here...  Possibly a "You are logged in as :" box or something.
  }
?>
<!-- loginbox_eof //-->