</td> <td class="main" align="right" valign="top"><?php echo smn_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . $rInfo->products_image, $rInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"'); ?> </td> </tr> </table> </tr> <tr> <td><table witdh="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td valign="top" class="main"><b><?php echo ENTRY_REVIEW; ?> </b><br><br><?php echo nl2br(smn_db_output(smn_break_string($rInfo->reviews_text, 15))); ?> </td> </tr> </table></td> </tr> <tr> <td><?php echo smn_draw_separator('pixel_trans.gif', '1', '10'); ?> </td> </tr> <tr> <td class="main"><b><?php echo ENTRY_RATING; ?>
if (file_exists(LOCAL_EXE_GZIP)) { $contents[] = array('text' => '<br>' . smn_draw_radio_field('compress', 'gzip') . ' ' . TEXT_INFO_USE_GZIP); } if (file_exists(LOCAL_EXE_ZIP)) { $contents[] = array('text' => smn_draw_radio_field('compress', 'zip') . ' ' . TEXT_INFO_USE_ZIP); } if ($dir_ok == true) { $contents[] = array('text' => '<br>' . smn_draw_checkbox_field('download', 'yes') . ' ' . TEXT_INFO_DOWNLOAD_ONLY . '*<br><br>*' . TEXT_INFO_BEST_THROUGH_HTTPS); } else { $contents[] = array('text' => '<br>' . smn_draw_radio_field('download', 'yes', true) . ' ' . TEXT_INFO_DOWNLOAD_ONLY . '*<br><br>*' . TEXT_INFO_BEST_THROUGH_HTTPS); } $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_backup.gif', IMAGE_BACKUP) . ' <a href="' . smn_href_link(FILENAME_BACKUP) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; case 'restore': $heading[] = array('text' => '<b>' . $buInfo->date . '</b>'); $contents[] = array('text' => smn_break_string(sprintf(TEXT_INFO_RESTORE, DIR_FS_BACKUP . ($buInfo->compression != TEXT_NO_EXTENSION ? substr($buInfo->file, 0, strrpos($buInfo->file, '.')) : $buInfo->file), $buInfo->compression != TEXT_NO_EXTENSION ? TEXT_INFO_UNPACK : ''), 35, ' ')); $contents[] = array('align' => 'center', 'text' => '<br><a href="' . smn_href_link(FILENAME_BACKUP, 'file=' . $buInfo->file . '&action=restorenow') . '">' . smn_image_button('button_restore.gif', IMAGE_RESTORE) . '</a> <a href="' . smn_href_link(FILENAME_BACKUP, 'file=' . $buInfo->file) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; case 'restorelocal': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_RESTORE_LOCAL . '</b>'); $contents = array('form' => smn_draw_form('restore', FILENAME_BACKUP, 'action=restorelocalnow', 'post', 'enctype="multipart/form-data"')); $contents[] = array('text' => TEXT_INFO_RESTORE_LOCAL . '<br><br>' . TEXT_INFO_BEST_THROUGH_HTTPS); $contents[] = array('text' => '<br>' . smn_draw_file_field('sql_file')); $contents[] = array('text' => TEXT_INFO_RESTORE_LOCAL_RAW_FILE); $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_restore.gif', IMAGE_RESTORE) . ' <a href="' . smn_href_link(FILENAME_BACKUP) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; case 'delete': $heading[] = array('text' => '<b>' . $buInfo->date . '</b>'); $contents = array('form' => smn_draw_form('delete', FILENAME_BACKUP, 'file=' . $buInfo->file . '&action=deleteconfirm')); $contents[] = array('text' => TEXT_DELETE_INTRO); $contents[] = array('text' => '<br><b>' . $buInfo->file . '</b>');
<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'); ?>
$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 = '';