Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

login in box help


bobtech99

Recommended Posts

Would anyone know how to take this code out of it table box and background

Here is the example I would like to to clean up and remove table borders and the info box contents

login_header.gif

 

Here is the code I am using

<?php

/*

IMPORTANT NOTE:

  This is not part of the official osC distribution

  but an add-on contributed to the osC community. Please

  read the README document that are provided

  with this file for further information and installation notes.

 

  This puts a login request in a box with a login button.

  If already logged in, will not show anything.

 

  Modified to utilize SSL to bypass Security Alert

 

  LoginboxV5.4_header http://avzwebdesign.nl/oscommerce/

*/

 

if ( (!strstr($_SERVER['PHP_SELF'],'login.php'))

and

(!strstr($_SERVER['PHP_SELF'],'create_account.php'))

and

!tep_session_is_registered('customer_id')

)  {

?>

<!-- loginbox //-->

<?php

    if (!tep_session_is_registered('customer_id')) {

?>

                              <!--START HEADER LOGIN HERE -->

 

                              <?php

 

$loginboxcontent = tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL'))

          . '<table  bgcolor="#FFFFFF"width="250" border="0" cellspacing="0" cellpadding="0"><tr><td colspan="3" class="smallText">'

        .'<tr><td class="smallText">'

        . tep_draw_separator('pixel_trans.gif', '2', '1')

        . BOX_LOGINBOXH_EMAIL

        . '</td><td  class="smallText" colspan="3">'

          . tep_draw_input_field('email_address', '', 'size="20" maxlength="100" style="border: 1px dotted #C0C0C0"')

        .'</td></tr><tr><td class="smallText">'

        . tep_draw_separator('pixel_trans.gif', '2', '1')

        . BOX_LOGINBOXH_PASSWORD

        . '</td><td class="smallText">'

        . tep_draw_password_field('password', '', 'size="20" maxlength="40" style="border: 1px dotted #C0C0C0"')

        . '</a></td></tr><tr><td class="smallText" colspan="3">'

        . tep_draw_separator('pixel_trans.gif', '65', '25')

        . tep_image_submit('button_quickfind_login.gif', IMAGE_BUTTON_LOGIN)

          . '</form>'

        . tep_draw_separator('pixel_trans.gif', '5', '1')

        . tep_draw_separator('pixel_trans.gif', '5', '25')

        . '<a href="'

        . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL')

        . '">'

        . BOX_LOGINBOXH_NEW

        . '</a></td></tr></table>'

                  ;       

         

$info_box_contents = array();

    $info_box_contents[] = array('align' => '',

                                'text'  => $loginboxcontent);

    new infoBox($info_box_contents);

?>

            </td>

          </tr></table>

<?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 //-->

<?php

// WebMakers.com Added: My Account Info Box

} else {

  if (tep_session_is_registered('customer_id')) {

?>

 

<!-- my_account_info //-->

  <table width="310"><tr>

            <td>

<?php

 

 

  $info_box_contents = array();

  $info_box_contents[] = array('align' => 'left',

                              'text'  => '<table width="310" border="0" cellspacing="0" cellpadding="0"><tr><td class="smallText" colspan="2">'

          . tep_draw_separator('pixel_trans.gif', '2', '1')

          . '<b><center>'

          . tep_customer_greeting()

          .'</b></center></td></tr><tr><td class="smallText">'

          . '<tr><td class="smallText" colspan="2">'

          . tep_draw_separator('pixel_trans.gif', '2', '20')

          . '<b>'

          . BOX_HEADING_LOGIN_BOX_MY_ACCOUNT

          .'</b></td></tr><tr><td class="smallText">'

          . tep_draw_separator('pixel_trans.gif', '2', '15') .

  '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') .'">' . LOGIN_BOX_MY_ACCOUNT . '</a><td class="smallText">' .

                                          '<a href="' . tep_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL') .'">' . LOGIN_BOX_ACCOUNT_EDIT . '</a></td></tr><tr><td class="smallText">' . tep_draw_separator('pixel_trans.gif', '2', '1') .

                                          '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL') .'">' . LOGIN_BOX_ACCOUNT_HISTORY . '</a><td class="smallText">' .

                                          '<a href="' . tep_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL') .'">' . LOGIN_BOX_ADDRESS_BOOK . '</a></td></tr><tr><td class="smallText">'  . tep_draw_separator('pixel_trans.gif', '', '1') .

                                          '<a href="' . tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'NONSSL') .'">' . LOGIN_BOX_PRODUCT_NOTIFICATIONS . '</a><td class="smallText">' .

                                          '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'NONSSL') .'">' . LOGIN_BOX_LOGOFF . '</a></td></tr></table>');

  new infoBox($info_box_contents);

?>

            </td>

          </tr></table>

<!-- my_account_info_eof //-->

 

<?php

  } // END-IF SESSION REGISTERED

 

} // END-IF

 

?>

<?php

  if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

  <tr class="headerError">

    <td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td>

  </tr>

</table>

<?php

  }

 

  if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

  <tr class="headerInfo">

    <td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>

  </tr>

</table><?php

  }

?>

                            <!-- END HEADER LOGIN HERE -->

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...