</td> <td class="main" align="right" valign="top"><?php echo olc_image(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(olc_db_output(olc_break_string($rInfo->reviews_text, 15))); ?> </td> </tr> </table></td> </tr> <tr> <td><?php echo olc_draw_separator('pixel_trans.gif', '1', '10'); ?> </td> </tr> <tr> <td class="main"><b><?php echo ENTRY_RATING; ?>
$languages_id = "languages_id = '" . SESSION_LANGUAGE_ID . APOS; $language_id = "language_id = '" . SESSION_LANGUAGE_ID . APOS; $review_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\n\twhere\n\tp.products_status = '1' and\n\tp.products_id = r.products_id " . $fsk_lock . " and\n\tr.reviews_id = rd.reviews_id and\n\trd." . $languages_id . " and\n\tp.products_id = pd.products_id and\n\tpd." . $language_id; $products_id = (int) $_GET['products_id']; if ($products_id) { $review_select .= " and p.products_id = '" . $products_id . APOS; } $review_select .= " order by r.reviews_id desc limit " . MAX_RANDOM_SELECT_REVIEWS; $random_product = olc_random_select($review_select); if ($random_product && sizeof($random_product) > 0) { // display random review box $reviews_id = $random_product['reviews_id']; $review_query = olc_db_query(SELECT . "substring(reviews_text, 1, 60) as reviews_text from " . TABLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . $reviews_id . "' and " . $languages_id); $review = olc_db_fetch_array($review_query); $review = htmlspecialchars($review['reviews_text']); $review = olc_break_string($review, 15, DASH . HTML_BR); $parameters = $products_id_text . $random_product['products_id'] . '&reviews_id=' . $reviews_id; $link = olc_href_link(FILENAME_PRODUCT_REVIEWS_INFO, $parameters); $link = HTML_A_START . $link . '">'; $products_name = $random_product['products_name']; $reviews_rating = $random_product['reviews_rating']; $box_content = ' <div align="center"> ' . $link . olc_image(DIR_WS_THUMBNAIL_IMAGES . $random_product['products_image'], $products_name) . ' </a> </div> ' . $link . $review . ' ..</a> <br/> <div align="center">' . olc_image(DIR_WS_IMAGES . 'stars_' . $reviews_rating . '.gif', sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $reviews_rating)) . ' </div>'; } elseif ($products_id) {
include 'includes/application_top.php'; // include needed functions require_once DIR_FS_INC . 'olc_break_string.inc.php'; require_once DIR_FS_INC . 'olc_date_long.inc.php'; require_once DIR_FS_INC . 'olc_image_button.inc.php'; // lets retrieve all $HTTP_GET_VARS keys and values.. $get_params = olc_get_all_get_params(array('reviews_id')); $get_params = substr($get_params, 0, -1); //remove trailing & $reviews_query = olc_db_query("select rd.reviews_text, r.reviews_rating, r.reviews_id, r.products_id, r.customers_name, r.date_added, r.last_modified, r.reviews_read, p.products_id, pd.products_name, p.products_image from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd left join " . TABLE_PRODUCTS . " p on (r.products_id = p.products_id) left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on (p.products_id = pd.products_id and pd.language_id = '" . SESSION_LANGUAGE_ID . "') where r.reviews_id = '" . (int) $_GET['reviews_id'] . "' and r.reviews_id = rd.reviews_id and p.products_status = '1'"); if (!olc_db_num_rows($reviews_query)) { olc_redirect(olc_href_link(FILENAME_REVIEWS)); } $reviews = olc_db_fetch_array($reviews_query); $breadcrumb->add(NAVBAR_TITLE_PRODUCT_REVIEWS, olc_href_link(FILENAME_PRODUCT_REVIEWS, $get_params)); olc_db_query(SQL_UPDATE . TABLE_REVIEWS . " set reviews_read = reviews_read+1 where reviews_id = '" . $reviews['reviews_id'] . APOS); $reviews_text = olc_break_string(htmlspecialchars($reviews['reviews_text']), 60, '-<br/>'); require DIR_WS_INCLUDES . 'header.php'; $smarty->assign('PRODUCTS_NAME', $reviews['products_name']); $smarty->assign('AUTHOR', $reviews['customers_name']); $smarty->assign('DATE', olc_date_long($reviews['date_added'])); $smarty->assign('REVIEWS_TEXT', nl2br($reviews_text)); $smarty->assign('RATING', olc_image(DIR_WS_IMAGES . 'stars_' . $reviews['reviews_rating'] . '.gif', sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $reviews['reviews_rating']))); $link = olc_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $reviews['products_id'], NONSSL, false, true, false); $smarty->assign('PRODUCTS_LINK', $link); $smarty->assign('BUTTON_BACK', HTML_A_START . olc_href_link(FILENAME_PRODUCT_REVIEWS, $get_params) . '">' . olc_image_button('button_back.gif', IMAGE_BUTTON_BACK) . HTML_A_END); $smarty->assign('PRODUCTS_BUTTON_BUY_NOW', HTML_A_START . olc_href_link(FILENAME_DEFAULT, 'action=buy_now&BUYproducts_id=' . $reviews['products_id']) . '">' . olc_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . HTML_A_END); $smarty->assign('IMAGE', HTML_A_START . 'javascript:popupImageWindow(\'' . olc_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $reviews['products_id']) . '\')">' . olc_image(DIR_WS_THUMBNAIL_IMAGES . $reviews['products_image'], $reviews['products_name'], '', '', 'align="center" hspace="5" vspace="5"') . '<br/></a>'); $main_content = $smarty->fetch(CURRENT_TEMPLATE_MODULE . 'product_reviews_info' . HTML_EXT, SMARTY_CACHE_ID); require BOXES; $smarty->display(INDEX_HTML);
$contents = array('form' => olc_draw_form('backup', FILENAME_BACKUP, 'action=backupnow')); $contents[] = array('text' => TEXT_INFO_NEW_BACKUP); if ($messageStack->size > 0) { $contents[] = array('text' => HTML_BR . olc_draw_radio_field('compress', 'no', true) . BLANK . TEXT_INFO_USE_NO_COMPRESSION); $contents[] = array('text' => HTML_BR . olc_draw_radio_field('download', 'yes', true) . BLANK . TEXT_INFO_DOWNLOAD_ONLY . '*<br/><br/>*' . TEXT_INFO_BEST_THROUGH_HTTPS); } else { $contents[] = array('text' => HTML_BR . olc_draw_radio_field('compress', 'gzip', true) . BLANK . TEXT_INFO_USE_GZIP); $contents[] = array('text' => olc_draw_radio_field('compress', 'zip') . BLANK . TEXT_INFO_USE_ZIP); $contents[] = array('text' => olc_draw_radio_field('compress', 'no') . BLANK . TEXT_INFO_USE_NO_COMPRESSION); $contents[] = array('text' => HTML_BR . olc_draw_checkbox_field('download', 'yes') . BLANK . TEXT_INFO_DOWNLOAD_ONLY . '*<br/><br/>*' . TEXT_INFO_BEST_THROUGH_HTTPS); } $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_backup.gif', IMAGE_BACKUP) . ' <a href="' . olc_href_link(FILENAME_BACKUP) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END); break; case 'restore': $heading[] = array('text' => HTML_B_START . $buInfo->date . HTML_B_END); $contents[] = array('text' => olc_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, BLANK)); $contents[] = array('align' => 'center', 'text' => '<br/><a href="' . olc_href_link(FILENAME_BACKUP, 'file=' . $buInfo->file . '&action=restorenow') . '">' . olc_image_button('button_restore.gif', IMAGE_RESTORE) . '</a> <a href="' . olc_href_link(FILENAME_BACKUP, 'file=' . $buInfo->file) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END); break; case 'restorelocal': $heading[] = array('text' => HTML_B_START . TEXT_INFO_HEADING_RESTORE_LOCAL . HTML_B_END); $contents = array('form' => olc_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' => HTML_BR . olc_draw_file_field('sql_file')); $contents[] = array('text' => TEXT_INFO_RESTORE_LOCAL_RAW_FILE); $contents[] = array('align' => 'center', 'text' => HTML_BR . olc_image_submit('button_restore.gif', IMAGE_restore) . ' <a href="' . olc_href_link(FILENAME_BACKUP) . '">' . olc_image_button('button_cancel.gif', IMAGE_CANCEL) . HTML_A_END); break; case 'delete': $heading[] = array('text' => HTML_B_START . $buInfo->date . HTML_B_END); $contents = array('form' => olc_draw_form('delete', FILENAME_BACKUP, 'file=' . $buInfo->file . '&action=deleteconfirm')); $contents[] = array('text' => TEXT_DELETE_INTRO); $contents[] = array('text' => '<br/><b>' . $buInfo->file . HTML_B_END);