Web Hosting Vodahost    

Home Take The Royal Tour! Order Now Features Prices
Go Back   Web Hosting > Soholaunch & Various Shopping Carts We offer > Various Shopping Carts > oScommerce

Notices

Reply
 
LinkBack Thread Tools
  #1  
Old 10-07-2007, 04:42 PM
Sergeant
 
Join Date: Jun 2007
Posts: 38
Question Error in Coding

Can anybody tell me what is wrong with this code:-

<?php
/*
$Id: boxes.php,v 1.33 2003/06/09 22:22:50 hpdl Exp $

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

Copyright (c) 2003 osCommerce

Released under the GNU General Public License
*/

class tableBox {
var $table_border = '0';
var $table_width = '100%';
var $table_cellspacing = '0';
var $table_cellpadding = '2';
var $table_parameters = '';
var $table_row_parameters = '';
var $table_data_parameters = '';

// class constructor
function tableBox($contents, $direct_output = false) {
$tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';
if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' . $this->table_parameters;
$tableBox_string .= '>' . "\n";

for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n";
$tableBox_string .= ' <tr';
if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters;
if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];
$tableBox_string .= '>' . "\n";

if (isset($contents[$i][0]) && is_array($contents[$i][0])) {
for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {
if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {
$tableBox_string .= ' <td';
if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';
if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) {
$tableBox_string .= ' ' . $contents[$i][$x]['params'];
} elseif (tep_not_null($this->table_data_parameters)) {
$tableBox_string .= ' ' . $this->table_data_parameters;
}
$tableBox_string .= '>';
if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form'];
$tableBox_string .= $contents[$i][$x]['text'];
if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= '</form>';
$tableBox_string .= '</td>' . "\n";
}
}
} else {
$tableBox_string .= ' <td';
if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"';
if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {
$tableBox_string .= ' ' . $contents[$i]['params'];
} elseif (tep_not_null($this->table_data_parameters)) {
$tableBox_string .= ' ' . $this->table_data_parameters;
}
$tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "\n";
}

$tableBox_string .= ' </tr>' . "\n";
if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "\n";
}

$tableBox_string .= '</table>' . "\n";

if ($direct_output == true) echo $tableBox_string;

return $tableBox_string;
}
}

class infoBox extends tableBox {
function infoBox($contents) {
$info_box_contents = array();
$info_box_contents[] = array('text' => $this->infoBoxContents($contents));
$this->table_cellpadding = '1';
$this->table_parameters = 'class="infoBox"';
$this->tableBox($info_box_contents, true);
}

function infoBoxContents($contents) {
$this->table_cellpadding = '3';
$this->table_parameters = 'class="infoBoxContents"';
$info_box_contents = array();
$info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
$info_box_contents[] = array(array('align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
'params' => 'class="boxText"',
'text' => (isset($contents[$i]['text']) ? $contents[$i]['text'] : '')));
}
$info_box_contents[] = array(array('text' => tep_draw_separator('pixel_trans.gif', '100%', '1')));
return $this->tableBox($info_box_contents);
}
}

class infoBoxHeading extends tableBox {
function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
$this->table_cellpadding = '0';

if ($left_corner == true) {
$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif');
} else {
$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif');
}
if ($right_arrow == true) {
$right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>';
} else {
$right_arrow = '';
}
if ($right_corner == true) {
$right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'infobox/corner_right.gif');
} else {
$right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14');
}

$info_box_contents = array();
$info_box_contents[] = array(array('params' => 'height="14" class="infoBoxHeading"',
'text' => $left_corner),
array('params' => 'width="100%" height="14" class="infoBoxHeading"',
'text' => $contents[0]['text']),
array('params' => 'height="14" class="infoBoxHeading" nowrap',
'text' => $right_corner));

$this->tableBox($info_box_contents, true);
}
}

class contentBox extends tableBox {
function contentBox($contents) {
$info_box_contents = array();
$info_box_contents[] = array('text' => $this->contentBoxContents($contents));
$this->table_cellpadding = '1';
$this->table_parameters = 'class="infoBox"';
$this->tableBox($info_box_contents, true);
}

function contentBoxContents($contents) {
$this->table_cellpadding = '4';
$this->table_parameters = 'class="infoBoxContents"';
return $this->tableBox($contents);
}
}

class contentBoxHeading extends tableBox {
function contentBoxHeading($contents) {
$this->table_width = '100%';
$this->table_cellpadding = '0';

$info_box_contents = array();
$info_box_contents[] = array(array('params' => 'height="14" class="infoBoxHeading"',
'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif')),
array('params' => 'height="14" class="infoBoxHeading" width="100%"',
'text' => $contents[0]['text']),
array('params' => 'height="14" class="infoBoxHeading"',
'text' => tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif')));

$this->tableBox($info_box_contents, true);
}
}

class errorBox extends tableBox {
function errorBox($contents) {
$this->table_data_parameters = 'class="errorBox"';
$this->tableBox($contents, true);
}
}

class productListingBox extends tableBox {
function productListingBox($contents) {
$this->table_parameters = 'class="productListing"';
$this->tableBox($contents, true);
}
}
class SideinfoBoxHeading extends tableBox {
function SideinfoBoxHeading($contents, $left_corner = true,
$right_corner = true, $right_arrow = false) {
$this->table_cellpadding = '0';
$left_corner = tep_image(DIR_WS_IMAGES .
'infobox/corner_left.gif');
if ($right_arrow == true) {
$right_arrow = '<a class="infoboxheadinglink" href="' .
$right_arrow . '">' . $contents[0]['text'] . ' &raquo;</a>';
} else {
$right_arrow = $contents[0]['text'];
}
$right_corner = tep_image(DIR_WS_IMAGES .
'infobox/corner_right.gif');
$info_box_contents = array();
$info_box_contents[] = array('params' => 'width="100%"
class="SideinfoBoxHeading"',
'text' => $right_arrow);
$this->tableBox($info_box_contents, true);
}
}class SideinfoBox extends tableBox {
function SideinfoBox($contents) {
$info_box_contents = array();
$info_box_contents[] = array('text' => $this-
>SideinfoBoxContents($contents));
$this->table_cellpadding = '0';
$this->table_parameters = 'class="SideinfoBox"';
$this->tableBox($info_box_contents, true);
}
function SideinfoBoxContents($contents) {
$this->table_cellpadding = '0';
$this->table_parameters = 'class="SideinfoBoxContents"';
$info_box_contents = array();
$info_box_contents[] = array(array('text' =>
tep_draw_separator('pixel_trans.gif', '100%', '1')));
for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
$info_box_contents[] = array(array('align' =>
(isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
'form' => (isset($contents[$i]['form']) ?
$contents[$i]['form'] : ''),
'params' => 'class="boxText"',
'text' => (isset($contents[$i]['text']) ?
$contents[$i]['text'] : '')));
}
$info_box_contents[] = array(array('text' =>
tep_draw_separator('pixel_trans.gif', '100%', '1')));
return $this->tableBox($info_box_contents);
}
}?>

I get this message when trying to view site:-
Parse error: syntax error, unexpected '>' in /home/yxgblfan/public_html/includes/classes/boxes.php on line 202 which refers to the code above.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2  
Old 10-08-2007, 01:06 AM
Karen Mac's Avatar
Lieutenant General
 
Join Date: Apr 2006
Posts: 3,528
Send a message via MSN to Karen Mac
Default Re: Error in Coding

Liz,

I have your email, i just havent had time to deal with it. Had a busy day with family, and if you can be patient, Ill look if someone from here doesnt before i get to it.

Karen
__________________
KMAC Enterprise
Granny's Country Nook 10%Off, your code: Forum Discounts
Charming Noveltees~Sports Logos Charms, Jewelry, Collectibles- 10% off, your code: VodaHost
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old 10-08-2007, 01:57 AM
Sergeant
 
Join Date: Jun 2007
Posts: 38
Default Re: Error in Coding

OK thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old 10-08-2007, 02:00 AM
Karen Mac's Avatar
Lieutenant General
 
Join Date: Apr 2006
Posts: 3,528
Send a message via MSN to Karen Mac
Default Re: Error in Coding

Okies.. around line 202.. actually was a lil further up in dreamweaver you have this:

class infoBoxHeading extends tableBox {
function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
$this->table_cellpadding = '0';


And i believe it should be

class infoBoxHeading extends tableBox {
function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
$this=>table_cellpadding = '0';

All the rest of those lil buggers are equals signs but that one.. so that has to be it.

Karen
__________________
KMAC Enterprise
Granny's Country Nook 10%Off, your code: Forum Discounts
Charming Noveltees~Sports Logos Charms, Jewelry, Collectibles- 10% off, your code: VodaHost
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old 10-08-2007, 05:01 AM
Watdaflip's Avatar
Brigadier General
 
Join Date: Sep 2005
Location: Cincinnati, Ohio
Posts: 1,640
Default Re: Error in Coding

no it should be $this->

On line 201-202 there is this code

$info_box_contents[] = array('text' => $this-
>SideinfoBoxContents($contents));

delete the return so it looks like this

$info_box_contents[] = array('text' => $this->SideinfoBoxContents($contents));

see if that fixes it
__________________

Register/Login Script
Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old 10-08-2007, 06:04 AM
Karen Mac's Avatar
Lieutenant General
 
Join Date: Apr 2006
Posts: 3,528
Send a message via MSN to Karen Mac
Default Re: Error in Coding

Ya.. that fixed it... she got that later.. in between emails. Thanks tho...

Karen
__________________
KMAC Enterprise
Granny's Country Nook 10%Off, your code: Forum Discounts
Charming Noveltees~Sports Logos Charms, Jewelry, Collectibles- 10% off, your code: VodaHost
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +1. The time now is 11:52 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC7
2007 VodaHost.com - All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55