RDV+DIAL chat illimit� dans ta r�g!
no save
Assistance
Achat
News

Forum | programmation
parse error, expecting `T_OLD_FUNCTION' or `T
gnoute, le sam. 21 oct. 2006 à 14:32:21
Bonjour,

Je fait un site oscommerce et j'ai une erreur que j'arrive pas à résoudre :
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in c:\program files\easyphp1-8\www\catalog\admin\includes\classes\box.php on line 75


voilà le code :
<?php
/*
$Id: box.php,v 1.7 2003/06/20 16:23:08 hpdl Exp $

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

Copyright (c) 2003 osCommerce

Released under the GNU General Public License

Example usage:

$heading = array();
$heading[] = array('params' => 'class="menuBoxHeading"',
'text' => BOX_HEADING_TOOLS,
'link' => tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('selected_box')) . 'selected_box=tools'));

$contents = array();
$contents[] = array('text' => SOME_TEXT);

$box = new box;
echo $box->infoBox($heading, $contents);
*/

class box extends tableBlock {
function box() {
$this->heading = array();
$this->contents = array();
}

function infoBox($heading, $contents) {
$this->table_row_parameters = 'class="infoBoxHeading"';
$this->table_data_parameters = 'class="infoBoxHeading"';
$this->heading = $this->tableBlock($heading);

$this->table_row_parameters = '';
$this->table_data_parameters = 'class="infoBoxContent"';
$this->contents = $this->tableBlock($contents);

return $this->heading . $this->contents;
}

function menuBox($heading, $contents) {
global $menu_dhtml; // add for dhtml_menu
if ($menu_dhtml == false ) { // add for dhtml_menu
$this->table_data_parameters = 'class="menuBoxHeading"';
if (isset($heading[0]['link'])) {
$this->table_data_parameters .= ' onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . $heading[0]['link'] . '\'"';
$heading[0]['text'] = ' <a href="' . $heading[0]['link'] . '" class="menuBoxHeadingLink">' . $heading[0]['text'] . '</a> ';
} else {
$heading[0]['text'] = ' ' . $heading[0]['text'] . ' ';
}
$this->heading = $this->tableBlock($heading);
$this->table_data_parameters = 'class="menuBoxContent"';
$this->contents = $this->tableBlock($contents);
return $this->heading . $this->contents;
} else {
// Replaced this to make sure that the correct id is passed to the menu
$url = parse_url($heading[0]['link']);
$params = explode("&", $url["query"]);
foreach($params AS $param) {
list($key, $value) = explode("=", $param);
if ($key == "selected_box")
$selected = $value;
}
// Eof replacement
$dhtml_contents = $contents[0]['text'];
$change_style = array ('<br>'=>' ','<BR>'=>' ', 'a href='=> 'a class="menuItem" href=','class="menuBoxContentLink"'=>' ');
$dhtml_contents = strtr($dhtml_contents,$change_style);
$dhtml_contents = '<div id="'.$selected.'Menu" class="menu" onmouseover="menuMouseover(event)">'. $dhtml_contents . '</div>';
return $dhtml_contents;
}
}
?>

quelqu'un aurait une idée ?

merci


Ssylvainsab
oct. 06
Suivant
REPONSES
Ssylvainsab
oct. 06
gnoute
oct. 06
gnoute
oct. 06
Ssylvainsab
oct. 06
gnoute
oct. 06
Ssylvainsab
oct. 06
aurelien
avr. 07
Version Web
Réalisé par RedShift
no save