vjboc Posted October 2, 2009 Posted October 2, 2009 I am getting an error on the front page. Parse error: syntax error, unexpected $end in /home7/soundwa2/public_html/store/includes/boxes/reviews.php on line 200 I was trying to delete the photo in the review box and I did something t screw it up. This is the review.php code: <?php /* $Id: reviews.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_REVIEWS); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_REVIEWS)); ?> <!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; ?>"> <script type="text/javascript" src="iepngfix_tilebg.js"></script> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <style type="text/css"> .ie6_png {behavior: url("iepngfix.htc") } .ie6_png img {behavior: url("iepngfix.htc") } .ie6_png input {behavior: url("iepngfix.htc") } </style> </head> <body> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" class="<?php echo MAIN_TABLE; ?>" cellspacing="0" cellpadding="0"> <tr> <td class="<?php echo BOX_WIDTH_TD_LEFT; ?>"><table border="0" class="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="0"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td class="<?php echo CONTENT_WIDTH_TD; ?>"><?php echo panel_top(); ?> <?php echo tep_draw_top();?> <?php new contentBoxHeading_ProdNew($info_box_contents);?> <?php $reviews_query_raw = "select r.reviews_id, left(rd.reviews_text, 100) as reviews_text, r.reviews_rating, r.date_added, p.products_id, pd.products_name, p.products_image, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and rd.languages_id = '" . (int)$languages_id . "' order by r.reviews_id DESC"; $reviews_split = new splitPageResults($reviews_query_raw, MAX_DISPLAY_NEW_REVIEWS); if ($reviews_split->number_of_rows > 0) { if ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3')) { ?> <?php echo tep_draw_result1_top(); ?> <table border="0" cellspacing="0" cellpadding="0" class="result result_top_padd"> <tr> <td><?php echo $reviews_split->display_count(TEXT_DISPLAY_NUMBER_OF_REVIEWS); ?></td> <td class="result_right"><?php echo TEXT_RESULT_PAGE . ' ' . $reviews_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info'))); ?></td> </tr> </table> <?php echo tep_draw_result1_bottom(); ?> <?php } ?> <?php echo tep_draw1_top();?> <?php echo tep_pixel_trans();?> <?php $reviews_query = tep_db_query($reviews_split->sql_query); while ($reviews = tep_db_fetch_array($reviews_query)) { ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo '<b><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $reviews['products_id'] . '&reviews_id=' . $reviews['reviews_id']) . '">' . $reviews['products_name'] . '</a></b> <span class="smallText">' . sprintf(TEXT_REVIEW_BY, tep_output_string_protected($reviews['customers_name'])) . '</span>'; ?></td> <td class="smallText vam" align="right"><?php echo sprintf(TEXT_REVIEW_DATE_ADDED, tep_date_long($reviews['date_added'])); ?></td> </tr> </table> <?php echo tep_pixel_trans();?> <?php /* echo tep_draw_infoBox_top(); */?> <table border="0" width="100%" cellspacing="0" cellpadding="2"><tr> <td width="<?php echo SMALL_IMAGE_WIDTH + 10; ?>" align="center" class="main"><?php echo tep_draw_prod_pic_top().'<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $reviews['products_id'] . '&reviews_id=' . $reviews['reviews_id']) . '">' . tep_image(DIR_WS_IMAGES . $reviews['products_image'], $reviews['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'. tep_draw_prod_pic_bottom(); ?></td> <td class="main" style="padding-left:9px;"><?php echo tep_break_string(tep_output_string_protected($reviews['reviews_text']), 60, '-<br>') . ((strlen($reviews['reviews_text']) >= 100) ? '..' : '') . '<br><br><i>' . sprintf(TEXT_REVIEW_RATING, tep_image(DIR_WS_IMAGES . 'stars_' . $reviews['reviews_rating'] . '.gif', sprintf(TEXT_OF_5_STARS, $reviews['reviews_rating'])), sprintf(TEXT_OF_5_STARS, $reviews['reviews_rating'])) . '</i>'; ?></td> </tr> </table> <?php /* echo tep_draw_infoBox_bottom(); */?> <?php echo tep_pixel_trans();?> <?php } ?> <?php } else { ?> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td><?php new infoBox_content_box(array(array('text' => TEXT_NO_REVIEWS))); ?></td> </tr> </table> <?php echo tep_pixel_trans();?> <?php /* $Id: reviews.php,v 1.37 2003/06/09 22:20:28 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ ?> <!-- reviews //--> <tr> <td> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_REVIEWS); new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_REVIEWS)); $random_select = "select r.reviews_id, r.reviews_rating, p.products_id, p.products_image, pd.products_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"; if (isset($HTTP_GET_VARS['products_id'])) { $random_select .= " and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"; } $random_select .= " order by r.reviews_id desc limit " . MAX_RANDOM_SELECT_REVIEWS; $random_product = tep_random_select($random_select); $info_box_contents = array(); if ($random_product) { // display random review box $rand_review_query = tep_db_query("select substring(reviews_text, 1, 60) as reviews_text from " . TABLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . (int)$random_product['reviews_id'] . "' and languages_id = '" . (int)$languages_id . "'"); $rand_review = tep_db_fetch_array($rand_review_query); $rand_review_text = tep_break_string(tep_output_string_protected($rand_review['reviews_text']), 15, '-<br>'); $name_prod = '<span><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . $random_product['products_name']. '</a></span>'; $review_prod = substr(strip_tags($rand_review_text),0,MAX_DESCR_REVIEWS).'...' ; $pic_prod = '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT) . '</a>'; $info_box_contents[] = array('text' => ' <table cellpadding="0" cellspacing="0" border="0"> <tr><td class="name_padd">'.$name_prod.'</td></tr> <tr><td class="pic_padd">'.tep_draw_prod_pic2_top().''.$pic_prod.''.tep_draw_prod_pic2_bottom().'</td></tr> <tr><td class="name_padd vam">'.$review_prod.'</td></tr> <tr><td class="star_padd"> ' . tep_image(DIR_WS_IMAGES . 'stars_' . $random_product['reviews_rating'] . '.gif' , sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $random_product['reviews_rating'])) . '</td></tr> </table> '); } elseif (isset($HTTP_GET_VARS['products_id'])) { // display 'write a review' box $info_box_contents[] = array('text' => ' <table border="0" cellspacing="5" cellpadding="0"> <tr><td class="">'.tep_draw_prod_pic2_top().'<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'products_id=' . $HTTP_GET_VARS['products_id']) . '">' . tep_image(DIR_WS_IMAGES . 'box_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a>'.tep_draw_prod_pic2_bottom().'</td> <td width="100%"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'products_id=' . $HTTP_GET_VARS['products_id']) . '">' . BOX_REVIEWS_WRITE_REVIEW .'</a></td> </tr> </table> '); } else { // display 'no reviews' box $info_box_contents[] = array('text' => ' <table cellpadding="0" cellspacing="0" border="0" width="100%"> <tr><td>'.BOX_REVIEWS_NO_REVIEWS.'</td></tr> </table>'); } new infoBox($info_box_contents); ?> </td> </tr> <!-- reviews_eof //-->
germ Posted October 3, 2009 Posted October 3, 2009 OK.. I'll bite... I honestly don't mean this the way it's gonna sound, but did you mess it up as bad as it looks or did you just accidentally copy/paste some code into the post more than once? :unsure: If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
vjboc Posted October 3, 2009 Author Posted October 3, 2009 Jim I don't know how I had the code for both review.php in one thing. Jim Thanks for pointing that out. How do I get rid of the annoying image in the review box in left column, Thats what messed it up to begin with. Vinny
germ Posted October 4, 2009 Posted October 4, 2009 If you haven't found a solution yet try this: Change this code: <table border="0" cellspacing="5" cellpadding="0"> <tr>[b][color="#FF0000"]<!--[/color][/b] <td class="">'.tep_draw_prod_pic2_top().'<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'products_id=' . $HTTP_GET_VARS['products_id']) . '">' . tep_image(DIR_WS_IMAGES . 'box_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a>'.tep_draw_prod_pic2_bottom().'</td> [b][color="#FF0000"]//-->[/color][/b] <td width="100%"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'products_id=' . $HTTP_GET_VARS['products_id']) . '">' . BOX_REVIEWS_WRITE_REVIEW .'</a></td> </tr> </table The parts I added are in RED I just used HTML comment tags to "comment out" the image code. Backup the file first. I think this will do what you want. If this doesn't do what you want I'll need a link to something that has a review so I can see exactly what image you're talking about. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Recommended Posts
Archived
This topic is now archived and is closed to further replies.