$contents = array('form' => xtc_draw_form('backup', BK_FILENAME, 'action=backupnow')); $contents[] = array('text' => TEXT_INFO_NEW_BACKUP); if ($messageStack->size > 0) { $contents[] = array('text' => '<br />' . xtc_draw_radio_field('compress', 'no', true) . ' ' . TEXT_INFO_USE_NO_COMPRESSION); } else { if (function_exists('gzopen')) { $contents[] = array('text' => '<br />' . xtc_draw_radio_field('compress', 'gzip', true) . ' ' . TEXT_INFO_USE_GZIP); } $contents[] = array('text' => xtc_draw_radio_field('compress', 'no') . ' ' . TEXT_INFO_USE_NO_COMPRESSION); $contents[] = array('text' => '<br />' . xtc_draw_checkbox_field('complete_inserts', 'yes', true) . ' ' . TEXT_COMPLETE_INSERTS); } $contents[] = array('align' => 'center', 'text' => '<br /><input type="submit" class="btn btn-default" onclick="this.blur();" value="' . BUTTON_BACKUP . '"/> <a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_BACKUP) . '">' . BUTTON_CANCEL . '</a>'); break; case 'restore': $heading[] = array('text' => '<b>' . $buInfo->date . '</b>'); $contents[] = array('text' => xtc_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 class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(RS_FILENAME, 'file=' . $buInfo->file . '&action=restorenow') . '">' . BUTTON_RESTORE . '</a> <a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_BACKUP, 'file=' . $buInfo->file) . '">' . BUTTON_CANCEL . '</a>'); break; case 'restorelocal': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_RESTORE_LOCAL . '</b>'); $contents = array('form' => xtc_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 />' . xtc_draw_file_field('sql_file')); $contents[] = array('text' => TEXT_INFO_RESTORE_LOCAL_RAW_FILE); $contents[] = array('align' => 'center', 'text' => '<br /><input type="submit" class="btn btn-default" onclick="this.blur();" value="' . BUTTON_UPLOAD . '"/> <a class="btn btn-default" onclick="this.blur();" href="' . xtc_href_link(FILENAME_BACKUP) . '">' . BUTTON_CANCEL . '</a>'); break; case 'delete': $heading[] = array('text' => '<b>' . $buInfo->date . '</b>'); $contents = array('form' => xtc_draw_form('delete', FILENAME_BACKUP, 'file=' . $buInfo->file . '&action=deleteconfirm')); $contents[] = array('text' => TEXT_DELETE_INTRO); $contents[] = array('text' => '<br /><b>' . $buInfo->file . '</b>');
if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') { $fsk_lock = ' and p.products_fsk18!=1'; } $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 " . $fsk_lock . " and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int) $_SESSION['languages_id'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int) $_SESSION['languages_id'] . "'"; if ($product->isProduct()) { $random_select .= " and p.products_id = '" . $product->data['products_id'] . "'"; } $random_select .= " order by r.reviews_id desc limit " . MAX_RANDOM_SELECT_REVIEWS; $random_product = xtc_random_select($random_select); if ($random_product) { // display random review box $review_query = "select substring(reviews_text, 1, 60) as reviews_text from " . TABLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . $random_product['reviews_id'] . "' and languages_id = '" . $_SESSION['languages_id'] . "'"; $review_query = xtDBquery($review_query); $review = xtc_db_fetch_array($review_query, true); $review = encode_htmlspecialchars($review['reviews_text']); $review = xtc_break_string($review, 15, '-<br />'); //BOF - Dokuman - 2010-01-29 - show review stars in box //$box_content = '<div align="center" class="bewert"><a href="' . xtc_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . xtc_image(DIR_WS_THUMBNAIL_IMAGES . $random_product['products_image'], $random_product['products_name']) . '</a></div><a href="' . xtc_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . $review . ' ..</a><br />'; $box_content = '<div align="center" class="bewert"><a href="' . xtc_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . xtc_image(DIR_WS_THUMBNAIL_IMAGES . $random_product['products_image'], $random_product['products_name']) . '</a></div><a href="' . xtc_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . $review . ' ..</a><br /><div align="center">' . xtc_image('templates/' . CURRENT_TEMPLATE . '/img/stars_' . $random_product['reviews_rating'] . '.gif', sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $random_product['reviews_rating'])) . '</div>'; //EOF - Dokuman - 2010-01-29 - show review stars in box } elseif ($product->isProduct()) { // Verhindern das Gäste oder Spamer bewerten können. www.aranowa.de if (isset($_SESSION['customer_id'])) { // display 'write a review' box $box_content = '<table border="0" cellspacing="0" cellpadding="2"><tr><td align="left" class="infoBoxContents"><a href="' . xtc_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, xtc_product_link($product->data['products_id'], $product->data['products_name'])) . '">' . BOX_REVIEWS_WRITE_REVIEW . '</a></td></tr></table>'; } } if ($box_content != '') { $box_smarty->assign('REVIEWS_LINK', xtc_href_link(FILENAME_REVIEWS)); $box_smarty->assign('BOX_CONTENT', $box_content); $box_smarty->assign('language', $_SESSION['language']);
</td> <td class="main" align="right" valign="top"><?php echo xtc_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(xtc_db_output(xtc_break_string($rInfo->reviews_text, 15))); ?> </td> </tr> </table></td> </tr> <tr> <td><?php echo xtc_draw_separator('pixel_trans.gif', '1', '10'); ?> </td> </tr> <tr> <td class="main"><b><?php echo ENTRY_RATING; ?>
// include needed functions require_once DIR_FS_INC . 'xtc_break_string.inc.php'; require_once DIR_FS_INC . 'xtc_date_long.inc.php'; // lets retrieve all $HTTP_GET_VARS keys and values.. $get_params = xtc_get_all_get_params(array('reviews_id')); $get_params = substr($get_params, 0, -1); //remove trailing & $reviews_query = "select rd.reviews_text,\n r.reviews_rating,\n r.reviews_id,\n r.products_id,\n r.customers_name,\n r.date_added,\n r.last_modified,\n r.reviews_read,\n p.products_id,\n pd.products_name,\n p.products_image\n from " . TABLE_REVIEWS . " r\n left join " . TABLE_PRODUCTS . " p on (r.products_id = p.products_id)\n left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on (p.products_id = pd.products_id \n and pd.language_id = '" . (int) $_SESSION['languages_id'] . "'), " . TABLE_REVIEWS_DESCRIPTION . " rd \n where r.reviews_id = '" . (int) $_GET['reviews_id'] . "'\n and r.reviews_id = rd.reviews_id\n and p.products_status = '1'"; $reviews_query = xtc_db_query($reviews_query); if (!xtc_db_num_rows($reviews_query)) { xtc_redirect(xtc_href_link(FILENAME_REVIEWS)); } $reviews = xtc_db_fetch_array($reviews_query); $breadcrumb->add(NAVBAR_TITLE_PRODUCT_REVIEWS, xtc_href_link(FILENAME_PRODUCT_REVIEWS, $get_params)); xtc_db_query("update " . TABLE_REVIEWS . " set reviews_read = reviews_read+1 where reviews_id = '" . $reviews['reviews_id'] . "'"); $reviews_text = xtc_break_string(encode_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', xtc_date_long($reviews['date_added'])); $smarty->assign('REVIEWS_TEXT', nl2br($reviews_text)); $smarty->assign('RATING', xtc_image('templates/' . CURRENT_TEMPLATE . '/img/stars_' . $reviews['reviews_rating'] . '.gif', sprintf(TEXT_OF_5_STARS, $reviews['reviews_rating']))); $smarty->assign('PRODUCTS_LINK', xtc_href_link(FILENAME_PRODUCT_INFO, xtc_product_link($reviews['products_id'], $reviews['products_name']))); $smarty->assign('BUTTON_BACK', '<a href="' . xtc_href_link(FILENAME_PRODUCT_REVIEWS, $get_params) . '">' . xtc_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'); $smarty->assign('BUTTON_BUY_NOW', '<a href="' . xtc_href_link(FILENAME_DEFAULT, 'action=buy_now&BUYproducts_id=' . $reviews['products_id']) . '">' . xtc_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a>'); $smarty->assign('IMAGE', '<a href="javascript:popupImageWindow(\'' . xtc_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $reviews['products_id']) . '\')">' . xtc_image(DIR_WS_THUMBNAIL_IMAGES . $reviews['products_image'], $reviews['products_name'], '', '', 'align="center" hspace="5" vspace="5"') . '<br /></a>'); $smarty->assign('language', $_SESSION['language']); // set cache ID if (!CacheCheck()) { $smarty->caching = 0; $main_content = $smarty->fetch(CURRENT_TEMPLATE . '/module/product_reviews_info.html');