Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

T Variable Error


DawnG

Recommended Posts

Hi I hope someone can help me with this error as I have no idea how to fix it.

 

 

Parse error: syntax error, unexpected T_VARIABLE in /home/retrobra/public_html/shop/checkout_success.php on line 58

 

<?php
/*
 $Id: checkout_success.php,v 1.49 2003/06/09 23:03:53 hpdl Exp $[/b]
[b]  osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com[/b]
[b]  Copyright (c) 2003 osCommerce[/b]
[b]  Released under the GNU General Public License
*/[/b]
[b]  require('includes/application_top.php');[/b]
[b]// if the customer is not logged on, redirect them to the shopping cart page
 if (!tep_session_is_registered('customer_id')) {
   tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
 }[/b]
[b]  if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'update')) {
   $notify_string = 'action=notify&';
   $notify = $HTTP_POST_VARS['notify'];
   if (!is_array($notify)) $notify = array($notify);
   for ($i=0, $n=sizeof($notify); $i<$n; $i++) {
  $notify_string .= 'notify[]=' . $notify[$i] . '&';
   }
   if (strlen($notify_string) > 0) $notify_string = substr($notify_string, 0, -1);[/b]
[b]    tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));
 }[/b]
[b]  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_SUCCESS);[/b]
[b]  $breadcrumb->add(NAVBAR_TITLE_1);
 $nochex_query = tep_db_query("select o.orders_status,p.* from " . TABLE_ORDERS . " o LEFT JOIN " . TABLE_NOCHEX_APC_TXN . " p on p.nc_order_id = o.orders_id AND o.customers_id = '" . (int)$customer_id . "' order by o.date_purchased desc limit 1");
 $nochex_apc = tep_db_fetch_array($nochex_query);[/b]
[b]  if ($nochex_apc['nochex_reponse']=='AUTHORISED') {
  $NAVBAR_TITLE_2 = NOCHEX_NAVBAR_TITLE_2_OK;
  $HEADING_TITLE = NOCHEX_HEADING_TITLE_OK;
  $TEXT_SUCCESS = NOCHEX_TEXT_SUCCESS_OK;
   $cart->reset(TRUE);
 } else if ($nochex_apc['nochex_response']=='DECLINED') {
   $NAVBAR_TITLE_2 = NOCHEX_NAVBAR_TITLE_2_FAILED;
   $HEADING_TITLE = NOCHEX_HEADING_TITLE_FAILED;
   $TEXT_SUCCESS = NOCHEX_TEXT_SUCCESS_FAILED;
 } else if ($nochex_apc['orders_status']==50000) {
  $NAVBAR_TITLE_2 = NOCHEX_NAVBAR_TITLE_2_PENDING;
  $HEADING_TITLE = NOCHEX_HEADING_TITLE_PENDING;
  $TEXT_SUCCESS = NOCHEX_TEXT_SUCCESS_PENDING;
 } else {
   $NAVBAR_TITLE_2 = NAVBAR_TITLE_2;
   $HEADING_TITLE = HEADING_TITLE;
   $TEXT_SUCCESS = TEXT_SUCCESS;
 };
 $breadcrumb->add($NAVBAR_TITLE_2)[/b]
[b]  $global_query = tep_db_query("select global_product_notifications from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "'");
 $global = tep_db_fetch_array($global_query);[/b]
[b]  if ($global['global_product_notifications'] != '1') {
   $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where customers_id = '" . (int)$customer_id . "' order by date_purchased desc limit 1");
   $orders = tep_db_fetch_array($orders_query);[/b]
[b]    $products_array = array();
   $products_query = tep_db_query("select products_id, products_name from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$orders['orders_id'] . "' order by products_name");
   while ($products = tep_db_fetch_array($products_query)) {
  $products_array[] = array('id' => $products['products_id'],
						    'text' => $products['products_name']);
   }
 }
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script type="text/javascript">[/b]
[b]  var _gaq = _gaq || [];[/b]
[b]  _gaq.push(['_setAccount', 'UA-3108652-3']);[/b]
[b]  _gaq.push(['_trackPageview']);[/b]
[b]  (function() {[/b]
[b]    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;[/b]
[b]    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';[/b]
[b]    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);[/b]
[b]  })();[/b]
[b]</script>[/b]
[b]</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->[/b]
[b]<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
   <td width="100%" valign="top"><?php echo tep_draw_form('order', tep_href_link(FILENAME_CHECKOUT_SUCCESS, 'action=update', 'SSL')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td><table border="0" width="100%" cellspacing="4" cellpadding="2">
	  <tr>
	    <td valign="top"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE); ?></td>
	    <td valign="top" class="main"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?><div align="center" class="pageHeading"><?php echo HEADING_TITLE; ?></div><br><?php echo TEXT_SUCCESS; ?><br><br>
<?php
 if ($global['global_product_notifications'] != '1') {
   echo TEXT_NOTIFY_PRODUCTS . '<br><p class="productsNotifications">';[/b]
[b]    $products_displayed = array();
   for ($i=0, $n=sizeof($products_array); $i<$n; $i++) {
  if (!in_array($products_array[$i]['id'], $products_displayed)) {
    echo tep_draw_checkbox_field('notify[]', $products_array[$i]['id']) . ' ' . $products_array[$i]['text'] . '<br>';
    $products_displayed[] = $products_array[$i]['id'];
  }
   }[/b]
[b]    echo '</p>';
 } else {
   echo TEXT_SEE_ORDERS . '<br><br>' . TEXT_CONTACT_STORE_OWNER;
 }
?>
	    <h3><?php echo TEXT_THANKS_FOR_SHOPPING; ?></h3></td>
	  </tr>
    </table></td>
  </tr>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
    <td align="right" class="main"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
  </tr>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
    <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
	    <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
		    <td width="50%" align="right"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
		    <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		  </tr>
	    </table></td>
	    <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
	    <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
	    <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
		    <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		    <td width="50%"><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
		  </tr>
	    </table></td>
	  </tr>
	  <tr>
	    <td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_DELIVERY; ?></td>
	    <td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>
	    <td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
	    <td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
	  </tr>
    </table></td>
  </tr>
<?php if (DOWNLOAD_ENABLED == 'true') include(DIR_WS_MODULES . 'downloads.php'); ?>
   </table></form></td>
<!-- body_text_eof //-->
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->[/b]
[b]<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
<!-- Google Code for Retro-Brands Sale Conversion Page -->[/b]
[b]<script type="text/javascript">[/b]
[b]/* <![CDATA[ */[/b]
[b]var google_conversion_id = 1069284703;[/b]
[b]var google_conversion_language = "en";[/b]
[b]var google_conversion_format = "2";[/b]
[b]var google_conversion_color = "ffffff";[/b]
[b]var google_conversion_label = "aC1sCNnppAIQ3_rv_QM";[/b]
[b]var google_conversion_value = 0;[/b]
[b]/* ]]> */[/b]
[b]</script>[/b]
[b]<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">[/b]
[b]</script>[/b]
[b]<noscript>[/b]
[b]<div style="display:inline;">[/b]
[b]<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/conversion/1069284703/?label=aC1sCNnppAIQ3_rv_QM&guid=ON&script=0"/>[/b]
[b]</div>[/b]
[b]</noscript>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
Link to comment
Share on other sites

It's hard to see past all those silly bold tags ([ b ] and [ /b ]). Please don't post code with them added.

 

If I counted up the lines correctly, 58 is the } just before the <!doctype line. Yet, I don't see anything wrong in that area. Do you agree with that line number, or did you modify the file (split lines or remove lines)?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...