Beezer2005 Posted March 20, 2006 Posted March 20, 2006 Hi..I've installed three different versions of this contrib. a couple times for some and keep getting the same error no matter what I do. I've searched the forums and found others experiencing the same problem but didn't see any fixes. PLEASE HELP, I'm going nuts. Error Code: Parse error: parse error, unexpected ';', expecting T_FUNCTION in /home/rubarts4/public_html/shop/admin/includes/modules/newsletters/newsletter.php on line 121 The file in question: <?php /* $Id: newsletter.php,v 1.1 2002/03/08 18:38:18 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2002 osCommerce Released under the GNU General Public License */ // ################# Contribution Newsletter v050 ############## class newsletter { var $show_choose_audience, $newsletters_id, $module_subscribers, $title, $header, $content, $unsubscribea, $unsubscribeb; function newsletter($newsletters_id, $module_subscribers, $title, $header, $content, $unsubscribea, $unsubscribeb) { $this->show_choose_audience = false; $this->newsletters_id = $newsletters_id; $this->module_subscribers = $module_subscribers; $this->title = $title; $this->header = $header; $this->content = $content; $this->unsubscribea = $unsubscribea; $this->unsubscribeb = $unsubscribeb; // ################# END - Contribution Newsletter v050 ############# function choose_audience() { return false; } function confirm() { global $HTTP_GET_VARS; $mail_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS . " where customers_newsletter = '1'"); $mail = tep_db_fetch_array($mail_query); // ################# Contribution Newsletter v050 ############## $confirm_string = '<table border="0" cellspacing="0" cellpadding="2">' . "\n" . ' <tr>' . "\n" . ' <td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="main"><font color="#ff0000"><b>' . tep_draw_separator('pixel_trans.gif', '20', '1') . TEXT_TITRE_INFO . '</b></font></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="main">' . sprintf(TEXT_COUNT_CUSTOMERS, $mail['count']) . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="main">' . TEXT_BULLETIN_NUMB . "?" . '<font color="#0000ff">' . $this->newsletters_id . '</font></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="main">' . TEXT_MODULE . "?" . '<font color="#0000ff">' . $this->module_subscribers . '</font></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="main">' . TEXT_TITRE_MAIL . "?" . '<font color="#0000ff">' . $this->title . '</font></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="main"><font color="#ff0000"><b>' . tep_draw_separator('pixel_trans.gif', '20', '1') . TEXT_TITRE_VIEW . '</b></font></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="main"><tt>' . $this->header . '</tt></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="main"><tt>' . $this->content . '</tt></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="main"><tt>' . $this->unsubscribea . '</tt></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="main"><tt>' . $this->unsubscribeb . '</tt></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . tep_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td align="right"><a href="' . tep_href_link(FILENAME_NEWSLETTERS, 'page=' . $HTTP_GET_VARS['page'] . '&nID=' . $HTTP_GET_VARS['nID'] . '&action=confirm_send') . '">' . tep_image_button('button_send.gif', IMAGE_SEND) . '</a> <a href="' . tep_href_link(FILENAME_NEWSLETTERS, 'page=' . $HTTP_GET_VARS['page'] . '&nID=' . $HTTP_GET_VARS['nID']) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a></td>' . "\n" . ' </tr>' . "\n" . '</table>'; // ################# END - Contribution Newsletter v050 ############## // ################# Contribution Newsletter v050 ############## function send($newsletter_id) { $mail_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_newsletter = '1'"); while ($mail = tep_db_fetch_array($mail_query)) { $mimemessage = new email(array('X-Mailer: osCommerce bulk mailer')); // Pr?paration de l'envoie du mail en HTML $mimemessage->add_html_newsletter($this->header . "\n" . $this->content . "\n" . $this->unsubscribea . "'" . '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '">' . HTTP_SERVER . DIR_WS_CATALOG . FILENAME_UNSUBSCRIBE . "?email=" . $mail['customers_email_address'] . '</a>' . "\n" . $this->unsubscribeb); $mimemessage->build_message(); // ################# END - Contribution Newsletter v050 ############# $mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', EMAIL_FROM, $this->title); } $newsletter_id = tep_db_prepare_input($newsletter_id); tep_db_query("update " . TABLE_NEWSLETTERS . " set date_sent = now(), status = '1' where newsletters_id = '" . tep_db_input($newsletter_id) . "'"); } } } ?> :huh: Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.