[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/includes/boxes/ -> loginbox.php (source)

   1  <?php
   2  /* 

   3    

   4    

   5    osCMax Power E-Commerce

   6    http://oscdox.com

   7  

   8    Copyright 2006 osCMax2005 osCMax, 2002 osCommerce

   9  

  10    Released under the GNU General Public License

  11  

  12    IMPORTANT NOTE:

  13  

  14    This script is not part of the official osC distribution

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

  16    read the README and  INSTALL documents that are provided

  17    with this file for further information and installation notes.

  18  

  19    loginbox.php -   Version 5.4

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

  21    If already logged in, will not show anything.

  22  

  23    Modified to utilize SSL to bypass Security Alert

  24  */
  25  
  26  if ((!strstr($_SERVER['PHP_SELF'],'login.php')) && (!strstr($_SERVER['PHP_SELF'],'create_account.php')) && (!strstr($_SERVER['PHP_SELF'],'Order_Info.php')) && (!strstr($_SERVER['PHP_SELF'],'Order_Info_Process.php')) && (!tep_session_is_registered('customer_id')))
  27  
  28  {
  29  
  30  if (!tep_session_is_registered('customer_id')) {
  31          
  32    $boxHeading = BOX_HEADING_LOGIN_BOX;
  33    $corner_left = 'square';
  34    $corner_right = 'square';
  35    $box_base_name = 'loginbox'; // for easy unique box template setup (added BTSv1.2)

  36  
  37    $box_id = $box_base_name . 'Box';  // for CSS styling paulm (editted BTSv1.2)

  38  //  $boxContent_attributes = ' align="center"';

  39    
  40  //    $boxContent = array();

  41  //    $boxContent[] = array('text'  => BOX_HEADING_LOGIN_BOX);

  42  
  43  //    new infoBoxHeading($boxContent, false, false);

  44  // WebMakers.com Added: Do not show if on login or create account or PWA screen

  45  
  46  ?>
  47  <!-- loginbox bof //-->
  48  <?php
  49  
  50    
  51   // $boxContent = '<table border="0" width="100%" cellspacing="0" cellpadding="0">';

  52   // $boxContent .= '<tr><td align="center" valign="top">';

  53      $boxContent = tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL'));
  54      $boxContent .= BOX_LOGINBOX_EMAIL . '<br>' . tep_draw_input_field('email_address', '', 'size="10" maxlength="100" style="width: ' . (BOX_WIDTH-30) . 'px"') . '<br>';
  55      $boxContent .= BOX_LOGINBOX_PASSWORD . '<br>' . tep_draw_password_field('password', '', 'size="10" maxlength="40" style="width: ' . (BOX_WIDTH-30) . 'px"') . '<br>';
  56      $boxContent .= tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN);
  57      $boxContent .= '<br></form>';
  58      $boxContent .= '<a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '" >' . BOX_LOGINBOX_FORGOT_PASSWORD . '</a>';
  59    $boxContent .= '<br>' . '<a href="' . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'). '">' . BOX_LOGINBOX_TEXT_NEW. '</a>';
  60  //  $boxContent .= '</td></tr></table>';

  61    
  62    
  63  //     $boxContent = array();

  64  //  $boxContent[] = array('align' => 'center',

  65  //                        'text'  => $loginboxcontent);

  66  //  new infoBox($boxContent);

  67  
  68  
  69  //  } else {

  70    // If you want to display anything when the user IS logged in, put it

  71    // in here...  Possibly a "You are logged in as :" box or something.

  72    
  73  include (bts_select('boxes', $box_base_name)); // BTS 1.5

  74   }
  75   
  76  ?>
  77  <!-- loginbox_eof //-->
  78  <?php 
  79  } else {
  80  
  81  ?>
  82  
  83  <?php
  84  
  85  
  86  // WebMakers.com Added: My Account Info Box (but not for PWA clients

  87    
  88    if ((tep_session_is_registered('customer_id')) && (!tep_session_is_registered('noaccount'))) {
  89    
  90  ?>
  91  <!-- my_account_info //-->
  92  <?php
  93  
  94    $boxHeading = BOX_HEADING_LOGIN_BOX_MY_ACCOUNT;
  95    $corner_left = 'square';
  96    $corner_right = 'square';
  97    $box_base_name = 'loginbox'; // for easy unique box template setup (added BTSv1.2)

  98  
  99    $box_id = $box_base_name . 'Box';  // for CSS styling paulm (editted BTSv1.2)

 100    
 101  //  $boxContent = array();

 102  //  $boxContent[] = BOX_HEADING_LOGIN_BOX_MY_ACCOUNT;

 103  //  new infoBoxHeading($boxContent, false, false);

 104  //  $boxContent = array();

 105  
 106    $boxContent = '<a href="' . tep_href_link(FILENAME_PRODUCTS_NEW, '', 'SSL') . '">' . LOGIN_BOX_PRODUCTS_NEW . '</a><br>' .
 107                  '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . LOGIN_BOX_MY_ACCOUNT . '</a><br>' .
 108                  '<a href="' . tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL') . '">' . LOGIN_BOX_ACCOUNT_HISTORY . '</a><br>' .
 109                  '<a href="' . tep_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL') . '">' . LOGIN_BOX_ACCOUNT_EDIT . '</a><br>' .
 110                  '<a href="' . tep_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL') . '">' . LOGIN_BOX_ADDRESS_BOOK . '</a><br>' .
 111                  '<a href="' . tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'NONSSL') . '">' . LOGIN_BOX_PRODUCT_NOTIFICATIONS . '</a><br>' .
 112                  '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'NONSSL') . '">' . LOGIN_BOX_LOGOFF . '</a>';
 113  
 114   // new infoBox($boxContent);

 115  
 116   
 117   
 118  
 119  include (bts_select('boxes', $box_base_name)); // BTS 1.5

 120  
 121  ?>
 122  <!-- my_account_info eof //-->
 123  <?php
 124    }
 125  }
 126  
 127  ?>


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7