IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Langage PHP Discussion :

Parse error: parse error


Sujet :

Langage PHP

  1. #1
    Membre éclairé Avatar de Mangacker
    Profil pro
    Inscrit en
    Décembre 2006
    Messages
    452
    Détails du profil
    Informations personnelles :
    Âge : 34
    Localisation : Suisse

    Informations forums :
    Inscription : Décembre 2006
    Messages : 452
    Par défaut Parse error: parse error
    hello tout le monde

    je suis toujours en train d'effectuer des modifications sur une plateforme os-commerce dont je ne fais que la maintenance (ce n'est pas moi qui l'ai installée..), et je tombe sur un nouveau problème (qui a une solution j'espère) que je n'arrive pas à régler (mon niveau de php étant assez bas..)

    voici le message d'erreur :
    Citation Envoyé par message d'erreur
    Parse error: parse error in C:\web\wamp\www\product_info.php on line 444
    le fichier en question est le fichier joint.

    ps: la ligne d'erreur est la dernière du fichier et je n'ai pas vu de ; () [] {} qui manquerait (mais je l'ai peut être raté )

    si quelqu'un à la solution, je suis preneur..

    merci
    mangacker
    Fichiers attachés Fichiers attachés

  2. #2
    Membre émérite Avatar de Korko Fain
    Profil pro
    Étudiant
    Inscrit en
    Août 2005
    Messages
    632
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Août 2005
    Messages : 632
    Par défaut
    Peut etre dans ton fichier final.

  3. #3
    Membre éclairé Avatar de Mangacker
    Profil pro
    Inscrit en
    Décembre 2006
    Messages
    452
    Détails du profil
    Informations personnelles :
    Âge : 34
    Localisation : Suisse

    Informations forums :
    Inscription : Décembre 2006
    Messages : 452
    Par défaut
    Citation Envoyé par Korko Fain Voir le message
    Peut etre dans ton fichier final.
    le fichier final est celui qui génère l'erreur

    http://83.172.192.12/product_info.ph...iscp31cs81pdg7

    ou alors je n'ai pas compris ce que tu voulais dire

  4. #4
    Membre émérite Avatar de Korko Fain
    Profil pro
    Étudiant
    Inscrit en
    Août 2005
    Messages
    632
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Août 2005
    Messages : 632
    Par défaut
    Je te parle de celui que tu inclus à la fin.

  5. #5
    Membre éclairé Avatar de Mangacker
    Profil pro
    Inscrit en
    Décembre 2006
    Messages
    452
    Détails du profil
    Informations personnelles :
    Âge : 34
    Localisation : Suisse

    Informations forums :
    Inscription : Décembre 2006
    Messages : 452
    Par défaut
    Citation Envoyé par Korko Fain Voir le message
    Je te parle de celui que tu inclus à la fin.
    si je supprime la dernière ligne
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
    l'erreur remonte à la ligne précédente
    en plus cette page est inclue dans toutes les autres pages et cela ne pose pas de problème

  6. #6
    Membre Expert Avatar de riete
    Homme Profil pro
    DevWeb - Oléiculteur
    Inscrit en
    Avril 2006
    Messages
    1 193
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 64
    Localisation : France

    Informations professionnelles :
    Activité : DevWeb - Oléiculteur
    Secteur : Bâtiment

    Informations forums :
    Inscription : Avril 2006
    Messages : 1 193
    Par défaut
    Citation Envoyé par Mangacker Voir le message
    si je supprime la dernière ligne
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
    l'erreur remonte à la ligne précédente
    Toutes les condoléances de devoir travailler sur un code pareil

    J'allais justement te proposé de suprimer cette ligne pour déterminer si l'erreur se trouvait dans application_bottom.php ou ailleurs (bien que si elle se trouvée dans app... elle aurait été indiqué dans celui-ci).

    Enfin je pense qu'il ne te reste plus qu'a trouver la parenthèse ou accolade qui est ouverte en trop ou celle qui n'est pas fermée. Bon courage

  7. #7
    Membre éclairé Avatar de Mangacker
    Profil pro
    Inscrit en
    Décembre 2006
    Messages
    452
    Détails du profil
    Informations personnelles :
    Âge : 34
    Localisation : Suisse

    Informations forums :
    Inscription : Décembre 2006
    Messages : 452
    Par défaut
    Citation Envoyé par riete Voir le message
    Toutes les condoléances de devoir travailler sur un code pareil

    Enfin je pense qu'il ne te reste plus qu'a trouver la parenthèse ou accolade qui est ouverte en trop ou celle qui n'est pas fermée. Bon courage
    merci pour ton soutien ça fait plaisir..
    ce code n'est pas de moi et je n'ai malheureusement pas un niveau suffisant pour pouvoir résoudre tous ses problèmes mdr

    je me remets au travail pour rechercher cette parenthèse ou accolade..

    par contre si quelqu'un pense qu'il peut s'agir d'autre chose, je suis preneur..
    a+

  8. #8
    Membre éclairé Avatar de Mangacker
    Profil pro
    Inscrit en
    Décembre 2006
    Messages
    452
    Détails du profil
    Informations personnelles :
    Âge : 34
    Localisation : Suisse

    Informations forums :
    Inscription : Décembre 2006
    Messages : 452
    Par défaut
    voilà alors j'ai du nouveau..

    il ne manque pas de parenthèse, accolade ou autre cochonnerie de ce genre dans le code..

    j'ai vérifié tout le code à la main (ou à l'œil plutôt) et je n'ai rien vu qui manquait..

    j'ai aussi vérifié en comptant le nombre d'occurrences pour chaque ouverture / fermeture de chaque type () {} [] avec le notepad++ et tout concorde.


    pleeeeeaaaaaaase help me !

  9. #9
    Membre averti
    Profil pro
    Inscrit en
    Juin 2009
    Messages
    21
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2009
    Messages : 21
    Par défaut
    Bonjour,
    c'est la première fois que je poste ici mais je viens prendre des reponses à mes questions depuis un bout de temps déjà alors si je peux me rendre utile...

    Pourrais tu poster le code html généré par ta page? le problème sera peut être plus facile à cerner en voyant où commence l'erreur. D'ailleurs le parse error ne vient pas forcément d'une accolade ou d'une parenthèse. Si tu ne ferme pas un quote tu php va voir directement à la fin du script si le quote est fermé et s'il y a bien le ;. Ca pourrait expliquer l'erreur et se traduirait par une partie de code php affichée dans le code source de la page générée.

  10. #10
    Invité
    Invité(e)
    Par défaut
    Salut,

    Pourrais-tu vérifier si ta constante DIR_WS_INCLUDES contient bien une valeur?

    et ajouté dans ton code juste avant la ligne 444 un
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    <?php echo DIR_WD_INCLUDES; ?>
    Pour vérification.

  11. #11
    Membre éclairé Avatar de Mangacker
    Profil pro
    Inscrit en
    Décembre 2006
    Messages
    452
    Détails du profil
    Informations personnelles :
    Âge : 34
    Localisation : Suisse

    Informations forums :
    Inscription : Décembre 2006
    Messages : 452
    Par défaut
    Citation Envoyé par tham_ Voir le message
    Bonjour,
    c'est la première fois que je poste ici mais je viens prendre des reponses à mes questions depuis un bout de temps déjà alors si je peux me rendre utile...

    Pourrais tu poster le code html généré par ta page? le problème sera peut être plus facile à cerner en voyant où commence l'erreur. D'ailleurs le parse error ne vient pas forcément d'une accolade ou d'une parenthèse. Si tu ne ferme pas un quote tu php va voir directement à la fin du script si le quote est fermé et s'il y a bien le ;. Ca pourrait expliquer l'erreur et se traduirait par une partie de code php affichée dans le code source de la page générée.
    haha ça serait cool qu'il m'affiche quelque chose d'autre que l'erreur..
    peux-tu me dire quelle variable du php.ini il faut modifier pour que l'erreur ne bloque pas tout le script?

    Citation Envoyé par Mygale1978 Voir le message
    Salut,

    Pourrais-tu vérifier si ta constante DIR_WS_INCLUDES contient bien une valeur?

    et ajouté dans ton code juste avant la ligne 444 un
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    <?php echo DIR_WD_INCLUDES; ?>
    Pour vérification.
    l'erreur saute à la dernière ligne toujours..
    http://83.172.192.12/product_info.php?products_id=10036

  12. #12
    Invité
    Invité(e)
    Par défaut
    J'espère que tu n'as pas fait un copier-coller de ma ligne de code
    car j'ai fait une faute de frappe.
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
     
    <?php echo DIR_WS_INCLUDES; ?>
    et non 
    <?php echo DIR_WD_INCLUDES; ?>



    Si cette constante n'a pas de valeur, elle peut générer une erreur lors de la concaténation de ta chaine de caractère

  13. #13
    Membre averti
    Profil pro
    Inscrit en
    Juin 2009
    Messages
    21
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2009
    Messages : 21
    Par défaut
    Bon donc il te manque bien une accolade car quand je rajoute } à la fin de ton code le parse error disparait.

    Maintenant il ne reste plus qu'à trouver où elle devrait se trouver...

  14. #14
    Membre émérite Avatar de Korko Fain
    Profil pro
    Étudiant
    Inscrit en
    Août 2005
    Messages
    632
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant

    Informations forums :
    Inscription : Août 2005
    Messages : 632
    Par défaut
    NOON
    Je me suis pris la tête lol
    J'ai réindenter TOUT ton code
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    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
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    461
    462
    463
    464
    465
    466
    467
    468
    469
    470
    471
    472
    473
    474
    475
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
    486
    487
    488
    489
    490
    491
    492
    493
    494
    495
    496
    497
    498
    499
    500
    501
    502
    503
    504
    505
    506
    507
    508
    509
    510
    511
    512
    513
    514
    515
    516
    517
    518
    519
    520
    521
    522
    523
    524
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    535
    536
    537
    538
    539
    540
    541
    542
    543
    544
    545
    546
    547
    548
    549
    550
    551
    552
    553
    554
    555
    556
    557
    558
    559
    560
    561
    562
    563
    564
    565
    566
    567
    568
    569
    570
    571
    572
    573
    574
    575
    576
    577
    578
    579
    580
    581
    582
    <?php
    /*
      $Id: product_info.php,v 1.87 2002/08/24 10:36:31 project3000 Exp $
    
      osCommerce, Open Source E-Commerce Solutions
      http://www.oscommerce.com
    
      Copyright (c) 2002 osCommerce
    
      Released under the GNU General Public License
    */
     
    require('includes/application_top.php');
     
    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);
     
    function redefine($texto) {
    	$sql = 'SELECT * FROM lexique where tag != ""';
    	$query = mysql_query($sql);
     
    	if (mysql_num_rows($query)>0){
    		while ($dtd = mysql_fetch_object($query)){
    			$replace = $dtd->tag;
    			$replacement = '<span class="lexique" title="' . $dtd->nom . '"><a href="lexique.php?t=' . $dtd->id . '" target="_blank">' . $dtd->tag . '</a></span>';
    			$texto= str_replace($replace,$replacement,$texto);
    		}
    	}
     
    	return $texto;
    }
    ?>
    <!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; ?>" />
    		<?php
    			$title_with_bread = strip_tags($breadcrumb->trail(' &raquo; '));
    			$title_with_bread = str_replace(HEADER_TITLE_TOP . ' &raquo;', STORE_NAME . ',', $title_with_bread);
     
    			$description_with_bread = strip_tags($breadcrumb->trail(', '));
    			$description_with_bread = str_replace(HEADER_TITLE_TOP . ',', STORE_NAME . ',', $description_with_bread);
    		?>
     
    		<title><?php echo $title_with_bread; ?></title>
    		<meta name="description" content="<?php echo $description_with_bread . '. ' . META_DESCRIPTION; ?>" />
    		<meta name="keywords" content="<?php echo strtolower($description_with_bread) . ', ' . strtolower(META_KEYWORDS); ?>" />
    		<meta name="revisit-after" content="10 days" />
    		<meta name="robots" content="all" />
    		<base href="<?php echo (getenv('HTTPS') == 'on' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>" />
    		<link rel="stylesheet" type="text/css" href="stylesheet.css">
     
    		<!--
    		<link rel="alternate" type="application/rss+xml" href="rss-news.php" title="Les 10 derni&egrave;res actualit&eacute;s" />
    		<link rel="alternate" type="application/rss+xml" href="rss-products.php" title="Les 30 derniers produits ajout&eacute;s au catalogue" />
    		-->
     
    		<script language="javascript">
    		<!--
    			function popupWindow(url) {
    				window.open(
    					url,
    					'popupWindow',
    					'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150'
    				);
    			}
    		//-->
    		</script>
    	</head>
    	<body style="margin: 0;">
    		<!-- header //-->
    		<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
    		<!-- header_eof //-->
     
    		<!-- 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">
    					<form name="cart_quantity" method="post" action=<?php echo "'".tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product', 'NONSSL'); ?>>
    						<table border="0" width="100%" cellspacing="0" cellpadding="0">
    							<?php
    							//rmh M-S_multi-stores edited next line
    							$product_info = tep_db_query("select p.products_id, p.products_status, pd.products_name, pd.products_description, pd.products_interfaces, pd.products_config, p.products_model, p.products_quantity, p.products_image, p.products_image_gd, p.products_mac, p.products_pc, p.products_linux, p.products_links, pd.products_url, pd.products_url2, pd.products_url2_desc, pd.products_url3, pd.products_url3_desc, p.products_price, p.products_tar, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.products_last_modified, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_STORES . " p2s where p.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pd.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and p.products_id = p2s.products_id and p2s.stores_id = '" . STORES_ID . "' and pd.language_id = '" . $languages_id . "' and p.products_status = 1");
    							if (!tep_db_num_rows($product_info)) { // product not found in database
    							?>
    								<tr>
    									<td colspan="3" class="main"><br><?php echo TEXT_PRODUCT_NOT_FOUND; ?></td>
    								</tr>
    								<tr>
    									<td colspan="3" align="right">
    										<br />
    										<a href="<?php echo tep_href_link(FILENAME_DEFAULT, '', 'NONSSL'); ?>">
    											<?php echo tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?>
    										</a>
    									</td>
    								</tr>
    							<?php
    							} else {
    								tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and language_id = '" . $languages_id . "'");
    								$product_info_values = tep_db_fetch_array($product_info);
     
    								$specials_active = false;
    								if ($new_price = tep_get_products_special_price($product_info_values['products_id'])) {
    									$products_price = '<s>' . $currencies->display_price($product_info_values['products_price'], tep_get_tax_rate($product_info_values['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info_values['products_tax_class_id'])) . '</span>';
    									$specials_active = true;
    									$specials_expires_date = tep_date_short_diff(tep_get_specials_expires_date($product_info_values['products_id']), -1, 0, 0);
    								} else {
    									$products_price = $currencies->display_price($product_info_values['products_price'], tep_get_tax_rate($product_info_values['products_tax_class_id']));
    								}
     
    								$products_attributes = tep_db_query("select popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'");
     
    								if (tep_db_num_rows($products_attributes)) {
    									$products_attributes = '1';
    								} else {
    									$products_attributes = '0';
    								}
    							?>
     
    							<tr>
    								<td colspan="3">
    									<table border="0" width="100%" cellspacing="0" cellpadding="2">
    										<tr height="40">
    											<td class="pageHeading">
     
    											<?php
    												echo $product_info_values['products_name']; 
     
    												if (tep_products_is_new($product_info_values['products_id'])) {
    													echo '&nbsp;<img src="images/new_product.gif">';
    												}
    											?>
     
    											</td>
    											<td align="right" class="pageHeading">
     
    											<?php
    												if ($product_info_values['products_price'] != "0.0000")
    													echo $products_price;
    												else
    													echo '&nbsp;';
    											?>
     
    											</td>
    										</tr>
     
    										<?php
    											if ($specials_active && $specials_expires_date) {
    										?>
     
    										<tr>
    											<td colspan="2" align="right">
    												<span class="newItemInCart">
     
    												<?php 
    													echo TEXT_EXPIRES_DATE.$specials_expires_date;
    												?>
     
    												</span>
    											</td>
    										</tr>
     
    										<?php
    											}
     
    											if (PRODUCT_LIST_MODEL) {
    												echo 	'<tr>' . "\n" .
    														'	<td colspan="2" class="pageHeading">' . $product_info_values['products_model'] . '</td>' . "\n" .
    														'</tr>' . "\n";
    											}
    										?>
     
    									</table>
    								</td>
    							</tr>
    							<tr>
    								<td colspan="3"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
    							</tr>
    							<tr>
    								<td colspan="3" class="main">
    									<table border="0" cellspacing="0" cellpadding="2" align="right">
     
    									<?php
    										if ($product_info_values['products_image'] != '') {
    									?>
     
    										<tr>
    											<td align="center" class="smallText">
    												<?php echo tep_image(DIR_WS_IMAGES_PT . $product_info_values['products_image'], $product_info_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"'); ?>
    											</td>
    										</tr>
     
    									<?php
    										}
    									?>
     
    									</table>
    									<p>
     
    									<?php
    										$texto = preg_replace("/(\015\012)|(\015)|(\012)/","<br />", stripslashes($product_info_values['products_description'])); 
    										echo redefine($texto);
    									?>
     
    									</p>
     
    									<?php
    										if ($product_info_values['products_interfaces']) {
    											echo '<p><b>' . TEXT_PRODUCTS_INTERFACES . '</b> ' . preg_replace("/(\015\012)|(\015)|(\012)/","<br />", stripslashes($product_info_values['products_interfaces'])) . '</p>';
    										}
     
    										if ($product_info_values['products_config']) {
    											echo '<p><b>' . TEXT_PRODUCTS_CONFIG . '</b><br>' . preg_replace("/(\015\012)|(\015)|(\012)/","<br />", stripslashes($product_info_values['products_config'])) . '</p>';
    										}
     
    										if ($products_attributes == '1') {
    											$products_options_name = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "' order by products_options_name");
    											echo '<b>' . TEXT_PRODUCT_OPTIONS . '</b><br>';
    											echo '<table border="0" cellpading="0" cellspacing"0">';
    												while ($products_options_name_values = tep_db_fetch_array($products_options_name)) { 
    													$selected = 0;
    													$products_options_array = array();
    													echo '<tr>';
    														echo '<td class="main">' . $products_options_name_values['products_options_name'] . ' :</td>';
    														echo '<td>' . "\n";
    															$products_options = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . $products_options_name_values['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "' order by products_options_values_name");
    															while ($products_options_values = tep_db_fetch_array($products_options)) {
    																$products_options_array[] = array('id' => $products_options_values['products_options_values_id'], 'text' => $products_options_values['products_options_values_name']);
    																if ($products_options_values['options_values_price'] != '0') {
    																	$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options_values['price_prefix'] . ' ' . $currencies->display_price($products_options_values['options_values_price'], tep_get_tax_rate($product_info_values['products_tax_class_id'])) .') ';
    																}
    															}
     
    															echo tep_draw_pull_down_menu('id[' . $products_options_name_values['products_options_id'] . ']', $products_options_array, $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name_values['products_options_id']]);
    														echo '</td>';
    													echo '</tr>';
    												}
    											echo '</table>';
    										}
    									?>
     
    								</td>
    							</tr>
    							<tr>
    								<td colspan="3" align="right" class="main">
    									<table border="0" cellspacing="0" cellpadding="0">
    										<tr>
     
    										<?php
    											if ($product_info_values['products_mac'] != '2')
    												if ($product_info_values['products_mac'] == '1')
    													echo "<td>&nbsp;" . tep_image(DIR_WS_IMAGES . 'compatible_mac.gif', TEXT_MAC_COMPATIBLE) . "</td>";
    												else
    													echo "<td>&nbsp;" . tep_image(DIR_WS_IMAGES . 'compatible_mac_disabled.gif', TEXT_MAC_COMPATIBLE_DISABLED) . "</td>";
     
    											if ($product_info_values['products_pc'] != '2')
    												if ($product_info_values['products_pc'] == '1')
    													echo "<td>&nbsp;" . tep_image(DIR_WS_IMAGES . 'compatible_pc.gif', TEXT_PC_COMPATIBLE) . "</td>";
    												else
    													echo "<td>&nbsp;" . tep_image(DIR_WS_IMAGES . 'compatible_pc_disabled.gif', TEXT_PC_COMPATIBLE_DISABLED) . "</td>";
     
    											if ($product_info_values['products_linux'] != '2')
    												if ($product_info_values['products_linux'] == '1')
    													echo "<td>&nbsp;" . tep_image(DIR_WS_IMAGES . 'compatible_linux.gif', TEXT_LINUX_COMPATIBLE) . "</td>";
    												else
    													echo "<td>&nbsp;" . tep_image(DIR_WS_IMAGES . 'compatible_linux_disabled.gif', TEXT_LINUX_COMPATIBLE_DISABLED) . "</td>";
    										?>
     
    										</tr>
    									</table>
    								</td>
    							</tr>
    							<tr>
    								<td colspan="3" class="main">&nbsp;</td>
    							</tr>
     
    							<?php
    								if ($product_info_values['products_image_gd']) {
    							?>
     
    							<tr>
    								<td colspan="3" align="center" class="main"><?php echo tep_image(DIR_WS_IMAGES_GD . $product_info_values['products_image_gd'], $product_info_values['products_name'], '', '', ''); ?></td>
    							</tr>
    							<tr>
    								<td colspan="3" class="main">&nbsp;</td>
    							</tr>
     
    							<?php
    								}
     
    								if ($product_info_values['products_url']) {
    									if (preg_match("#^http://#i", $product_info_values['products_url'])) {
    										$the_products_url = substr($product_info_values['products_url'], 7);
    									}
    									else {
    										$the_products_url = $product_info_values['products_url'];
    									}
    							?>
     
    							<tr>
    								<td colspan="3" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($the_products_url), 'NONSSL', true, false) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . 'icons/arrow_link.gif', '', '16', '12', 'align="left"') . '</a>' . sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($the_products_url), 'NONSSL', true, false)); ?></td>
    							</tr>
     
    							<?php
    								}
     
    								if ($product_info_values['products_url2']) {
    									if (preg_match("#^http://#i", $product_info_values['products_url2'])) {
    										$the_products_url2 = substr($product_info_values['products_url2'], 7);
    									} else {
    										$the_products_url2 = $product_info_values['products_url2'];
    									}
    							?>
     
    							<tr>
    								<td colspan="3" class="main">
    								<?php
    									echo '<a href="' . tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($the_products_url2), 'NONSSL', true, false) . '" target="_blank">';
    									echo tep_image(DIR_WS_IMAGES . 'icons/arrow_link.gif', '', '16', '12', 'align="left"');
    									echo '<u>';
     
    									if ($product_info_values['products_url2_desc']) // si pas de description, on affiche le lien
    										echo $product_info_values['products_url2_desc'];
    									else
    										echo $the_products_url2;
     
    									echo '</u></a>';
    								?>
    								</td>
    							</tr>
     
    							<?php
    								}
     
    								if ($product_info_values['products_url3']) {
    									if (preg_match("#^http://#i", $product_info_values['products_url3'])) {
    										$the_products_url3 = substr($product_info_values['products_url3'], 7);
    									}
    									else {
    										$the_products_url3 = $product_info_values['products_url3'];
    									}
    							?>
     
    							<tr>
    								<td colspan="3" class="main">
    								<?php
    									echo '<a href="' . tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($the_products_url3), 'NONSSL', true, false) . '" target="_blank">';
    									echo tep_image(DIR_WS_IMAGES . 'icons/arrow_link.gif', '', '16', '12', 'align="left"');
    									echo '<u>';
    										if ($product_info_values['products_url3_desc']) // si pas de description, on affiche le lien
    											echo $product_info_values['products_url3_desc'];
    										else
    											echo $the_products_url3;
     
    										echo '</u></a>';
    								?>
    								</td>
    							</tr>
     
    							<?php			
    								}
     
    								if ($product_info_values['products_date_available'] > date('Y-m-d H:i:s')) {
    							?>
     
    							<tr>
    								<td colspan="3" class="main"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info_values['products_date_available'])); ?></td>
    							</tr>
     
    							<?php
    								}
     
    								if ($product_info_values['products_tar']) {
    									if ($new_price) {
    										$product_price_tar = get_tar_amount($new_price, $product_info_values['products_tar']);
    									} else {
    										$product_price_tar = get_tar_amount($product_info_values['products_price'], $product_info_values['products_tar']);
    									}
     
    									if ($product_price_tar > 0) {
    							?>
     
    							<tr>
    								<td colspan="3" align="right" class="main"><br />
     
    								<?php
    									echo '<a href="' . tep_href_link(FILENAME_CONDITIONS, '', 'NONSSL', true, false) . '#SWICO" target="_blank" title="Cliquez ici pour plus d\'informations">';
    									echo tep_image(DIR_WS_IMAGES . 'swico_tar.gif', '', '186', '73', '');
    									echo '</a><br>Taxe pour cet article : ';
     
    									echo $currencies->display_price($product_price_tar, tep_get_tax_rate($product_info_values['products_tax_class_id']));
     
    								?>
     
    								</td>
    							</tr>
     
    							<?php
    									}
    								}
     
    								$reviews = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and reviews_status = '1'");
     
    								$reviews_values = tep_db_fetch_array($reviews);
    							?>
     
    							<tr>
    								<td colspan="3"><br>
    									<table border="0" width="100%" cellspacing="0" cellpadding="0">
    										<tr>
    											<td class="main" valign="middle">
    												<a href="<?php echo tep_href_link(FILENAME_PRODUCT_REVIEWS, substr(tep_get_all_get_params(), 0, -1)); ?>">
    												<?php
    													echo tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS, 'align="middle"');
    												?>
    												</a>&nbsp;
     
    												<?php
    													if ($reviews_values['count'] == 0) {
    														echo TEXT_NO_CURRENT_REVIEW;
    													} else {
    														echo '(' . $reviews_values['count'] . ' ';
     
    														if ($reviews_values['count'] > 1) {
    															echo TEXT_CURRENT_REVIEWS;
    														} else {
    															echo TEXT_CURRENT_REVIEW;
    														}
     
    														echo ')';
    													}
     
    												?>
    											</td>
    											<td align="right" class="main" valign="middle">
    												<input type="hidden" name="products_id" value="<?php echo $product_info_values['products_id']; ?>">
     
    												<?php
    													if ($product_info_values['products_price'] != "0.0000")
    														echo tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);
    													else
    														echo '&nbsp;';
    												?>
    											</td>
    										</tr>
    									</table>
    								</td>
    							</tr>
     
    							<?php
    								if ($product_info_values['products_links']) {
    									$linked_products_query_raw = "select p.products_id, pd.products_name, p.products_status, p.products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_PRODUCTS_TO_STORES . " p2s on p.products_id = p2s.products_id  where p.products_status = 1 and p.products_id = pd.products_id and p2s.stores_id = '" . STORES_ID . "' and (";
     
    									$links_id = split(',', $product_info_values['products_links']);
     
    									for ($i=0;$i<count($links_id);$i++) {
    										if ($i > 0) {
    											$linked_products_query_raw .= " or ";
    										}
     
    										$linked_products_query_raw .= "p.products_id = '" . trim($links_id[$i]) . "'";
    									}
     
    									$linked_products_query_raw .= ") ORDER BY pd.products_name ASC";
    									$linked_products_query = tep_db_query($linked_products_query_raw);
     
    									$linked_products_text = '';	
    									$var1=0;
     
    									while ($linked_products = tep_db_fetch_array($linked_products_query)) {
    										if ($linked_products['products_name'] != "") {
    											$linked_products_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $linked_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . 'icons/arrow_linked_products.gif', '', '20', '13', 'align="left"') . '</a><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $linked_products['products_id']) . '"><u>' . $linked_products['products_name'] .'</u></a><br>';
     
    											if ($linked_products_text) {
    												if ($var1==0) {
    							?>
     
    							<tr>
    								<td colspan="3" class="main"><b><br><?php echo TEXT_PRODUCT_LINKED_PRODUCTS; ?></b></td>
    							</tr>
     
    							<?php
    													$var1=1;
    												}
    							?>
     
    							<tr>
    								<td width="74%" class="main"><?php echo $linked_products_text; ?></td>
    								<td width="22%" class="main"><div align="right"><strong>CHF &nbsp;</strong></div></td>
    								<td width="4%" class="main">
    									<div align="right">
    									<?php 
    										if ($product_info_values['products_price'] != "0.0000")
    											echo '<strong>'.number_format($linked_products['products_price'],2).'</strong>'; 
    										else
    											echo '&nbsp;';
    									?>
    									</div>
    								</td>
    							</tr>
     
    							<?php
    											}
    										}
    									}
    								}
    							?>
     
    							<tr>
    								<td colspan="3" class="main">&nbsp;</td>
    							</tr>
    							<!--
    							<tr>
    								<td class="main" valign="bottom">
    									<a href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO_PRINT, 'products_id=' . $product_info_values['products_id']); ?>">
    										<?php echo tep_image(DIR_WS_IMAGES . 'icons/print.gif', 'Version imprimable', '24', '24', 'align="bottom"'); ?>
    									</a>
     
    									&nbsp;&nbsp;
     
    									<a href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO_PRINT, 'products_id=' . $product_info_values['products_id']); ?>">
    										Version imprimable
    									</a>
    								</td>
    							</tr>
    							-->
    							<tr>
    								<td colspan="3" valign="middle" class="main">
    									<b>Version imprimable&nbsp;:</b>&nbsp;&nbsp;&nbsp;&nbsp;
    									<a href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO_PDF, 'products_id=' . $product_info_values['products_id']); ?>">
    										<?php echo tep_image(DIR_WS_IMAGES . 'icons/adobe_pdf.gif', 'Version imprimable au format PDF', '16', '16', 'align="bottom"'); ?>
    										&nbsp;format PDF
    									</a>
    									&nbsp;&nbsp;&nbsp;
    									<a href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO_PRINT, 'products_id=' . $product_info_values['products_id']); ?>">
    										<?php echo tep_image(DIR_WS_IMAGES . 'icons/ie.gif', 'Version imprimable au format HTML', '16', '16', 'align="bottom"'); ?>
    										&nbsp; format HTML
    									</a>
    								</td>
    							</tr>
    							<tr>
    								<td colspan="3"><br>
    								<?php
    									if ( (USE_CACHE == 'true') && !SID) {
    										echo tep_cache_also_purchased(3600);
    									} else {
    										include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
    									}
    							}
    								?>
    								</td>
    							</tr>
    						</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 //-->
     
    		<!-- footer //-->
    		<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
    		<!-- footer_eof //-->
    		<br>
    	</body>
    </html>
    <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
    Et ya pas de problème dedans ! (enfin si yen avait mais de quoi te donner un parse_error).
    Faut que tu nous montre tes fichiers inclu que tu essaye de les commenter 1 à 1 pour voir celui qui enleve le probleme.

  15. #15
    Membre éclairé Avatar de Mangacker
    Profil pro
    Inscrit en
    Décembre 2006
    Messages
    452
    Détails du profil
    Informations personnelles :
    Âge : 34
    Localisation : Suisse

    Informations forums :
    Inscription : Décembre 2006
    Messages : 452
    Par défaut
    Citation Envoyé par Korko Fain Voir le message
    NOON
    Je me suis pris la tête lol
    J'ai réindenter TOUT ton code
    mon dieu le fou..

    mais merci beaucoup
    je vous redis quoi demain pask là j'en ai ras le bol

    a+

  16. #16
    Membre éclairé Avatar de Mangacker
    Profil pro
    Inscrit en
    Décembre 2006
    Messages
    452
    Détails du profil
    Informations personnelles :
    Âge : 34
    Localisation : Suisse

    Informations forums :
    Inscription : Décembre 2006
    Messages : 452
    Par défaut
    voilà on est lundi matin et je me remets au boulo.

    j'ai remplacé mon fichier product_info.php par celui que Korko Fain m'a tout réindenté et j'ai un nouveau petit problème. la page ne s'affiche pas en entier..

    voici comme demandé les fichiers inclus, mais ce que je ne comprends pas c'est que tous ces fichiers sont inclus dans toutes les page et que la page d'accueil semble fonctionner correctement..

    ps: pour voir la page qui pose problème, il suffit de cliquer sur un objet

    @micalemnt
    Mangacker
    Fichiers attachés Fichiers attachés

Discussions similaires

  1. Réponses: 2
    Dernier message: 27/06/2007, 00h49
  2. Réponses: 4
    Dernier message: 16/10/2006, 16h16
  3. [PHP-JS] Parse error: syntax error, unexpected T_STRIN
    Par maldini dans le forum Langage
    Réponses: 4
    Dernier message: 25/07/2006, 19h49
  4. Parse error: syntax error, unexpected '}' help
    Par beur dans le forum Langage
    Réponses: 5
    Dernier message: 23/03/2006, 22h33
  5. [Configuration] Problème après l'installation (Parse error: syntax error,..)
    Par beur dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 8
    Dernier message: 21/03/2006, 15h08

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo