Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

need to borrow a good eye again please..


lindsayanng

Recommended Posts

ok, i have been staring at this for a while, and like i said, i am NOT all that good with troubleshooting specific coding because i can not write my own code all that well.. or at all really!! I am a hack coder.. i take things and make an existing code do what i want it.. ANYWAYS.. This file is showing an error that i CAN NOT FIND because line 159 is just a simple '</form>' tag.

 

Any help is appreciated

 

<?php
/*
  $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $

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

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

// check if the 'install' directory exists, and warn of its existence
if (WARN_INSTALL_EXISTENCE == 'true') {
if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {
$messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');
}
}

// check if the configure.php file is writeable
if (WARN_CONFIG_WRITEABLE == 'true') {
if
( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) .
'/includes/configure.php')) &&
(is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) .
'/includes/configure.php')) ) {
$messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');
}
}

// check if the session folder is writeable
if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {
if (STORE_SESSIONS == '') {
if (!is_dir(tep_session_save_path())) {
$messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');
} elseif (!is_writeable(tep_session_save_path())) {
$messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');
}
}
}

// check session.auto_start is disabled
if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {
if (ini_get('session.auto_start') == '1') {
$messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');
}
}

if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {
if (!is_dir(DIR_FS_DOWNLOAD)) {
$messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');
}
}

if ($messageStack->size('header') > 0) {
echo $messageStack->output('header');
}
?>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
<tr class="headerNavigation">
<td
class="headerNavigation">  <?php echo
$breadcrumb->trail(' » '); ?></td>
<td align="right" class="headerNavigation"><?php if
($show_user_options) { ?><a href="<?php echo
tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"
class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF;
?></a>  |  <?php } ?><a
href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"
class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT;
?></a>  |  <a href="<?php echo
tep_href_link(FILENAME_SHOPPING_CART); ?>"
class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS;
?></a>  |  <a href="<?php echo
tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"
class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT;
?></a>   </td>
</tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr class="header">
<td valign="middle"><?php echo '<a href="' .
tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES .
'furryfamilylogo.jpg', 'furryfamilylogo') . '</a>';
?></td>
<td align="right"><table border="2px" cellspacing="0" cellpadding="10">
<tr>
<td class="headerCart"><b><a href="<?php echo
tep_href_link(FILENAME_SHOPPING_CART); ?>"
class="headerCart"><?php echo 'Your Cart Contents';
?></a></b><br><?php echo
$cart->count_contents() . ' Items'; ?><br><?php echo
'SubTotal:' . $currencies->format($cart->show_total());
?><br><a href="<?php echo
tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL');
?>"class="headerCart"><?php echo
HEADER_TITLE_CHECKOUT;?></a> | <a
href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"
class="headerCart"><?php echo HEADER_TITLE_MY_ACCOUNT;
?></a></td>
</tr>
</table></td>
<td align="right"><?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')) &&
(!strstr($_SERVER['PHP_SELF'],'create_account.php')) &&
!tep_session_is_registered('customer_id')) {

?>

<!-- loginbox //-->
<?php
if (!tep_session_is_registered('customer_id')) {
?>
<table border="0" cellpadding="0" cellspacing="0"><tr> <td>
<?php

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


. '<table width="310" 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="10" maxlength="100" style="width: ' . (BOX_WIDTH-30) . 'px"')
.'</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="10" maxlength="40" style="width: ' . (BOX_WIDTH-30) . 'px"')
. '</td><td class="smallText">'
. '<a href="'
. tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL')
. '">'
. BOX_LOGINBOXH_FORGOT_PASSWORD
. '</a></td></tr><tr><td class="smallText" colspan="3">'
. tep_draw_separator('pixel_trans.gif', '5', '25')
. tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN)

																									 [color="#FF0000"]HERE IS LINE 159[/color]
. '</form>'
. tep_draw_separator('pixel_trans.gif', '5', '1')
BOX_LOGINBOXH_TEXT_NEW
. '<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

} // END-IF

?>
</td>
</tr>
<?php
if (tep_session_is_registered('customer_id')) {
?>
<tr>
<tdclass="headerNavigation" align="center" colspan="3"><?php echo
'<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' .
tep_image(DIR_WS_IMAGES . 'header_account.gif', LOGIN_BOX_MY_ACCOUNT) .
'</a>  <a href="' .
tep_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL') . '">' .
tep_image(DIR_WS_IMAGES . 'header_account.gif', LOGIN_BOX_ACCOUNT_EDIT)
. '</a>  <a href="' .
tep_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL') . '">' .
tep_image(DIR_WS_IMAGES . 'header_account.gif',
LOGIN_BOX_ACCOUNT_HISTORY) . '</a>  <a
href="' . tep_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL') . '">' .
tep_image(DIR_WS_IMAGES . 'header_account.gif', LOGIN_BOX_ADDRESS_BOOK)
. '</a>  <a href="' .
tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL') . '">' .
tep_image(DIR_WS_IMAGES . 'header_account.gif',
LOGIN_BOX_PRODUCT_NOTIFICATIONS) . '</a>  <a
href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '">' .
tep_image(DIR_WS_IMAGES . 'header_account.gif', LOGIN_BOX_LOGOFF) .
'</a>'; ?></td>
</tr>
<?php
}
?>
</table>
<? //---PayPal WPP Modification START ---// ?>
<?php
if (tep_session_is_registered('customer_id')) {
$show_user_options = true;
if (tep_paypal_wpp_enabled() && tep_session_is_registered('paypal_ec_temp')) {
//If this is a temp account that'll be deleted, don't show account information
if ($paypal_ec_temp) {
$show_user_options = false;
}
}
} else {
$show_user_options = false;
}
?>

<? //---PayPal WPP Modification END ---// ?>
<?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
}
?>

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

There are several errors. I think line 159 is an error because its the </form> close tag, but there is no <form> opening tag.

 

Also, you have html code wrapped in php tags from 135 to 167.

 

 

 

Chris

Link to comment
Share on other sites

hmmi guess i gotta get Brian back up here since he was the one who wrote this

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

i tried adding the opening '<form>' to the begining of it and i still got the same error.. am i adding it in the wrong place? Where would it be added?

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

I am thinking it should be something like this...............again, my php isn't that good....so double check it.

 

<!-- loginbox //-->
<?php
if (!tep_session_is_registered('customer_id')) {
?>
<table border="0" cellpadding="0" cellspacing="0"><tr> <td>
<?php

$loginboxcontent = tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL'))
?>
<form>

<table width="310" border="0" cellspacing="0" cellpadding="0">
<tr><td colspan="3" class="smallText"><tr>
<td class="smallText"><?php'. tep_draw_separator('pixel_trans.gif', '2', '1'). BOX_LOGINBOXH_EMAIL . '
?>
</td><td  class="smallText" colspan="3"><?php'. tep_draw_input_field('email_address', '', 'size="10" maxlength="100" style="width: ' . (BOX_WIDTH-30) . 'px"').'
?>
</td></tr><tr><td class="smallText"><?php'. tep_draw_separator('pixel_trans.gif', '2', '1'). BOX_LOGINBOXH_PASSWORD. '
?>
</td><td class="smallText"><?php' . tep_draw_password_field('password', '', 'size="10" maxlength="40" style="width: ' . (BOX_WIDTH-30) . 'px"'). ' ?>
</td><td class="smallText"><?php echo '<a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . TEXT_PASSWORD_FORGOTTEN . '</a>'; ?>. '</a></td>
</tr><tr><td class="smallText" colspan="3"><?php'. tep_draw_separator('pixel_trans.gif', '5', '25')
. tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN)' ?>
</form>
<?php . tep_draw_separator('pixel_trans.gif', '5', '1')BOX_LOGINBOXH_TEXT_NEW. '') .
?>
<?php echo ' <a href=" '. tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'). '">'. ' ' . BOX_LOGINBOXH_NEW,''?>
</a></td></tr></table>'
<?php
$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

} // END-IF

?>
</td>
</tr>
<?php

Link to comment
Share on other sites

there is no more error.. I didnt REALLY need to change anything, it just copied wrong.. i did it the write way, from my laptop and everything is great.. that ENTIRE code is screwy.. so anyone who sees this post.. DONT COPY WHAT I PASTED..

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

I see a couple of problems:

1) you're missing a semicolon (;) after

 

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

 

and

 

2)

<form>

 

is no good. That tag should include method= and action= attributes, at a minimum. It looks like your code got royally fubarred when you cut and pasted. Start over.

Link to comment
Share on other sites

yep.. I did start over and now everything is working perfectly.. thanks for the look!

A great place for newbies to start

Road Map to oscommerce File Structure

DO NOT PM ME FOR HELP. My time is valuable, unless i ask you to PM me, please dont. You will get better help if you post publicly. I am not as good at this as you think anyways!

 

HOWEVER, you can visit my blog (go to my profile to see it) and post a question there, i will find time to get back and answer you

 

Proud Memeber of the CODE BREAKERS CLUB!!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...