?> </td> <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php if ($addresses['address_book_id'] == $sendto) { echo ' <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n"; } else { echo ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n"; } ?> <td width="10"><?php echo smn_draw_separator('pixel_trans.gif', '10', '1'); ?> </td> <td class="main" colspan="2"><b><?php echo smn_output_string_protected($addresses['firstname'] . ' ' . $addresses['lastname']); ?> </b></td> <td class="main" align="right"><?php echo smn_draw_radio_field('address', $addresses['address_book_id'], $addresses['address_book_id'] == $sendto); ?> </td> <td width="10"><?php echo smn_draw_separator('pixel_trans.gif', '10', '1'); ?> </td> </tr> <tr> <td width="10"><?php echo smn_draw_separator('pixel_trans.gif', '10', '1'); ?>
} if (!smn_validate_email($from_email_address)) { $error = true; $messageStack->add('friend', ERROR_FROM_ADDRESS); } if (empty($to_name)) { $error = true; $messageStack->add('friend', ERROR_TO_NAME); } if (!smn_validate_email($to_email_address)) { $error = true; $messageStack->add('friend', ERROR_TO_ADDRESS); } if ($error == false) { $email_subject = sprintf(TEXT_EMAIL_SUBJECT, $from_name, $store->get_store_name()); $email_body = sprintf(TEXT_EMAIL_INTRO, $to_name, $from_name, $product_info['products_name'], $store->get_store_name()) . "\n\n"; if (smn_not_null($message)) { $email_body .= $message . "\n\n"; } $email_body .= sprintf(TEXT_EMAIL_LINK, smn_href_link(FILENAME_PRODUCT_INFO, 'ID=' . $product_info['store_id'] . '&products_id=' . $_GET['products_id'])) . "\n\n" . sprintf(TEXT_EMAIL_SIGNATURE, $store->get_store_name() . "\n" . HTTP_SERVER . DIR_WS_CATALOG . "\n"); smn_mail($to_name, $to_email_address, $email_subject, $email_body, $from_name, $from_email_address); $messageStack->add_session('header', sprintf(TEXT_EMAIL_SUCCESSFUL_SENT, $product_info['products_name'], smn_output_string_protected($to_name)), 'success'); smn_redirect(smn_href_link(FILENAME_PRODUCT_INFO, 'ID=' . $product_info['store_id'] . '&products_id=' . $_GET['products_id'])); } } elseif (smn_session_is_registered('customer_id')) { $account_query = smn_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int) $customer_id . "'"); $account = smn_db_fetch_array($account_query); $from_name = $account['customers_firstname'] . ' ' . $account['customers_lastname']; $from_email_address = $account['customers_email_address']; } $breadcrumb->add(NAVBAR_TITLE, smn_href_link(FILENAME_TELL_A_FRIEND, 'ID=' . $product_info['store_id'] . '&products_id=' . $_GET['products_id']));
<td class="main"><?php echo '<b>' . TEXT_ORDER_NUMBER . '</b> ' . $history['orders_id']; ?> </td> <td class="main" align="right"><?php echo '<b>' . TEXT_ORDER_STATUS . '</b> ' . $history['orders_status_name']; ?> </td> </tr> </table> <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="2" cellpadding="4"> <tr> <td class="main" width="50%" valign="top"><?php echo '<b>' . TEXT_ORDER_DATE . '</b> ' . smn_date_long($history['date_purchased']) . '<br><b>' . $order_type . '</b> ' . smn_output_string_protected($order_name); ?> </td> <td class="main" width="30%" valign="top"><?php echo '<b>' . TEXT_ORDER_PRODUCTS . '</b> ' . $products['count'] . '<br><b>' . TEXT_ORDER_COST . '</b> ' . strip_tags($history['order_total']); ?> </td> <td class="main" width="20%"><?php //echo '<a href="' . smn_href_link(FILENAME_ACCOUNT_HISTORY_INFO, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'order_id=' . $history['orders_id'], 'NONSSL') . '">' . smn_image_button('small_view.gif', SMALL_IMAGE_BUTTON_VIEW) . '</a>'; ?> </td> </tr> </table></td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo smn_draw_separator('pixel_trans.gif', '10', '1'); ?> </td> <td width="<?php echo SMALL_IMAGE_WIDTH + 10; ?> " align="center" valign="top" class="main"><?php echo '<a href="' . smn_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $reviews['products_id'] . '&reviews_id=' . $reviews['reviews_id']) . '">' . smn_image(DIR_WS_IMAGES . $reviews['products_image'], $reviews['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; ?> </td> <td valign="top" class="main"><?php echo smn_break_string(smn_output_string_protected($reviews['reviews_text']), 60, '-<br>') . (strlen($reviews['reviews_text']) >= 100 ? '..' : '') . '<br><br><i>' . sprintf(TEXT_REVIEW_RATING, smn_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> <td width="10" align="right"><?php echo smn_draw_separator('pixel_trans.gif', '10', '1'); ?> </td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo smn_draw_separator('pixel_trans.gif', '100%', '10'); ?>
function smn_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) { global $HTTP_GET_VARS, $HTTP_POST_VARS; $field = '<textarea name="' . smn_output_string($name) . '" wrap="' . smn_output_string($wrap) . '" cols="' . smn_output_string($width) . '" rows="' . smn_output_string($height) . '"'; if (smn_not_null($parameters)) { $field .= ' ' . $parameters; } $field .= '>'; if ($reinsert_value == true && (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name]) || isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name]))) { if (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) { $field .= smn_output_string_protected(stripslashes($HTTP_GET_VARS[$name])); } elseif (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) { $field .= smn_output_string_protected(stripslashes($HTTP_POST_VARS[$name])); } } elseif (smn_not_null($text)) { $field .= $text; } $field .= '</textarea>'; return $field; }
?> </b></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBoxNotice"> <tr class="infoBoxNoticeContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><?php echo smn_draw_separator('pixel_trans.gif', '10', '1'); ?> </td> <td class="main" width="100%" valign="top"><?php echo smn_output_string_protected($error['error']); ?> </td> <td><?php echo smn_draw_separator('pixel_trans.gif', '10', '1'); ?> </td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo smn_draw_separator('pixel_trans.gif', '100%', '10'); ?>
?> </td> </tr> <tr> <td><?php echo smn_draw_separator('pixel_trans.gif', '100%', '10'); ?> </td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo nl2br(smn_output_string_protected($order->info['comments'])) . smn_draw_hidden_field('comments', $order->info['comments']); ?> </td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo smn_draw_separator('pixel_trans.gif', '100%', '10'); ?> </td> </tr> <?php }
function smn_address_format($address_format_id, $address, $html, $boln, $eoln) { $address_format_query = smn_db_query("select address_format as format from " . TABLE_ADDRESS_FORMAT . " where address_format_id = '" . (int) $address_format_id . "'"); $address_format = smn_db_fetch_array($address_format_query); $company = smn_output_string_protected($address['company']); if (isset($address['firstname']) && smn_not_null($address['firstname'])) { $firstname = smn_output_string_protected($address['firstname']); $lastname = smn_output_string_protected($address['lastname']); } elseif (isset($address['name']) && smn_not_null($address['name'])) { $firstname = smn_output_string_protected($address['name']); $lastname = ''; } else { $firstname = ''; $lastname = ''; } $street = smn_output_string_protected($address['street_address']); $suburb = smn_output_string_protected($address['suburb']); $city = smn_output_string_protected($address['city']); $state = smn_output_string_protected($address['state']); if (isset($address['country_id']) && smn_not_null($address['country_id'])) { $country = smn_get_country_name($address['country_id']); if (isset($address['zone_id']) && smn_not_null($address['zone_id'])) { $state = smn_get_zone_code($address['country_id'], $address['zone_id'], $state); } } elseif (isset($address['country']) && smn_not_null($address['country'])) { $country = smn_output_string_protected($address['country']); } else { $country = ''; } $postcode = smn_output_string_protected($address['postcode']); $zip = $postcode; if ($html) { // HTML Mode $HR = '<hr>'; $hr = '<hr>'; if ($boln == '' && $eoln == "\n") { // Values not specified, use rational defaults $CR = '<br>'; $cr = '<br>'; $eoln = $cr; } else { // Use values supplied $CR = $eoln . $boln; $cr = $CR; } } else { // Text Mode $CR = $eoln; $cr = $CR; $HR = '----------------------------------------'; $hr = '----------------------------------------'; } $statecomma = ''; $streets = $street; if ($suburb != '') { $streets = $street . $cr . $suburb; } if ($country == '') { $country = smn_output_string_protected($address['country']); } if ($state != '') { $statecomma = $state . ', '; } $fmt = $address_format['format']; eval("\$address = \"{$fmt}\";"); if (ACCOUNT_COMPANY == 'true' && smn_not_null($company)) { $address = $company . $cr . $address; } return $address; }
function smn_customer_greeting() { global $customer_id, $customer_first_name; if (smn_session_is_registered('customer_first_name') && smn_session_is_registered('customer_id')) { $greeting_string = sprintf(TEXT_GREETING_PERSONAL, smn_output_string_protected($customer_first_name), smn_href_link(FILENAME_PRODUCTS_NEW)); } else { $greeting_string = sprintf(TEXT_GREETING_GUEST, smn_href_link(FILENAME_LOGIN, '', 'NONSSL'), smn_href_link(FILENAME_CREATE_ACCOUNT, '', 'NONSSL')); } return $greeting_string; }
<tr> <td><?php echo smn_draw_separator('pixel_trans.gif', '100%', '10'); ?> </td> </tr> <?php } ?> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo '<b>' . SUB_TITLE_FROM . '</b> ' . smn_output_string_protected($customer['customers_firstname'] . ' ' . $customer['customers_lastname']); ?> </td> </tr> <tr> <td class="main"><b><?php echo SUB_TITLE_REVIEW; ?> </b></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td><?php
</b></td> </tr> <tr> <td><?php echo smn_draw_separator('pixel_trans.gif', '100%', '10'); ?> </td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php $statuses_query = smn_db_query("select os.orders_status_name, osh.date_added, osh.comments from " . TABLE_ORDERS_STATUS . " os, " . TABLE_ORDERS_STATUS_HISTORY . " osh where osh.orders_id = '" . (int) $_GET['order_id'] . "' and osh.orders_status_id = os.orders_status_id and os.language_id = '" . (int) $languages_id . "' and os.public_flag = '1' order by osh.date_added"); while ($statuses = smn_db_fetch_array($statuses_query)) { echo ' <tr>' . "\n" . ' <td class="main" valign="top" width="70">' . smn_date_short($statuses['date_added']) . '</td>' . "\n" . ' <td class="main" valign="top" width="70">' . $statuses['orders_status_name'] . '</td>' . "\n" . ' <td class="main" valign="top">' . (empty($statuses['comments']) ? ' ' : nl2br(smn_output_string_protected($statuses['comments']))) . '</td>' . "\n" . ' </tr>' . "\n"; } ?> </table></td> </tr> </table></td> </tr> <?php if (DOWNLOAD_ENABLED == 'true') { include DIR_WS_MODULES . 'downloads.php'; } ?> <tr> <td><?php echo smn_draw_separator('pixel_trans.gif', '100%', '10'); ?>
} ?> <tr class="moduleRow" onMouseOver="rowOverEffect(this)" onMouseOut="rowOutEffect(this)" onClick="document.location.href='<?php echo smn_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $orders['orders_id'], 'NONSSL'); ?> '"> <td class="main" width="80"><?php echo smn_date_short($orders['date_purchased']); ?> </td> <td class="main"><?php echo '#' . $orders['orders_id']; ?> </td> <td class="main"><?php echo smn_output_string_protected($order_name) . ', ' . $order_country; ?> </td> <td class="main"><?php echo $orders['orders_status_name']; ?> </td> <td class="main" align="right"><?php echo $orders['order_total']; ?> </td> <td class="main" align="right"><?php echo '<a href="' . smn_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $orders['orders_id'], 'NONSSL') . '">' . smn_image_button('small_view.gif', SMALL_IMAGE_BUTTON_VIEW) . '</a>'; ?> </td> </tr>
$boxHeading = BOX_HEADING_REVIEWS; $boxLink = '<a href="' . smn_href_link(FILENAME_REVIEWS) . '"><img src="images/infobox/arrow_right.gif" border="0" alt="more" title=" more " width="12" height="10"></a>'; $box_base_name = 'reviews'; $box_id = $box_base_name . 'Box'; $random_select = "select r.store_id, r.reviews_id, r.reviews_rating, p.products_id, p.store_id, p.products_image, pd.products_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.store_id = '" . $store_id . "' and 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($_GET['products_id'])) { $random_select .= " and p.products_id = '" . (int) $_GET['products_id'] . "'"; } $random_select .= " order by r.reviews_id desc limit " . MAX_RANDOM_SELECT_REVIEWS; $random_product = smn_random_select($random_select); $store_images = 'images/' . $random_product['store_id'] . '_images/'; if ($random_product) { // display random review box $review_query = smn_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 . "'"); $reviews_text = smn_db_fetch_array($review_query); $reviews_text = smn_break_string(smn_output_string_protected($reviews_text['reviews_text']), 15, '-<br>'); $boxContent = '<div align="center"><a href="' . smn_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'ID=' . $random_product['store_id'] . '&products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . smn_image($store_images . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></div><a href="' . smn_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'ID=' . $random_product['store_id'] . '&products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . $reviews_text . ' ..</a><br><div align="center">' . smn_image(DIR_WS_IMAGES . 'store_images/' . 'stars_' . $random_product['reviews_rating'] . '.gif', sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $random_product['reviews_rating'])) . '</div>'; } elseif (isset($_GET['products_id'])) { // display 'write a review' box $boxContent = '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoBoxContents"><a href="' . smn_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'products_id=' . $_GET['products_id']) . '">' . smn_image(DIR_WS_IMAGES . 'box_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a></td><td class="infoBoxContents"><a href="' . smn_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'products_id=' . $_GET['products_id']) . '">' . BOX_REVIEWS_WRITE_REVIEW . '</a></td></tr></table>'; } else { // display 'no reviews' box $boxContent = BOX_REVIEWS_NO_REVIEWS; } if (file_exists(DIR_WS_BOX_TEMPLATES . $box_base_name . '.php')) { require DIR_WS_BOX_TEMPLATES . $box_base_name . '.php'; } else { require DEFAULT_TEMPLATENAME_BOX; } $boxContent_attributes = ''; $boxLink = '';
<td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php $orders_query = smn_db_query("select o.orders_id, o.date_purchased, o.delivery_name, o.delivery_country, o.billing_name, o.billing_country, ot.text as order_total, s.orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$customer_id . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.public_flag = '1' order by orders_id desc limit 3"); while ($orders = smn_db_fetch_array($orders_query)) { if (smn_not_null($orders['delivery_name'])) { $order_name = $orders['delivery_name']; $order_country = $orders['delivery_country']; } else { $order_name = $orders['billing_name']; $order_country = $orders['billing_country']; } ?> <tr class="moduleRow" onMouseOver="rowOverEffect(this)" onMouseOut="rowOutEffect(this)" onClick="document.location.href='<?php echo smn_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $orders['orders_id'], 'NONSSL'); ?>'"> <td class="main" width="80"><?php echo smn_date_short($orders['date_purchased']); ?></td> <td class="main"><?php echo '#' . $orders['orders_id']; ?></td> <td class="main"><?php echo smn_output_string_protected($order_name) . ', ' . $order_country; ?></td> <td class="main"><?php echo $orders['orders_status_name']; ?></td> <td class="main" align="right"><?php echo $orders['order_total']; ?></td> <td class="main" align="right"><?php echo '<a href="' . smn_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $orders['orders_id'].'&ID='.$store_id, 'NONSSL') . '">' . smn_image_button('small_view.gif', SMALL_IMAGE_BUTTON_VIEW) . '</a>'; ?></td> </tr> <?php } ?> </table></td> <td><?php echo smn_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr>