</tr> <?php if ($pInfo->products_date_available > date('Y-m-d')) { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_PRODUCT_DATE_AVAILABLE, oos_date_long($pInfo->products_date_available)); ?> </td> </tr> <?php } else { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_PRODUCT_DATE_ADDED, oos_date_long($pInfo->products_date_added)); ?> </td> </tr> <?php } ?> <tr> <td><?php echo oos_draw_separator('trans.gif', '1', '10'); ?> </td> </tr> <?php } if (isset($_GET['read']) && $_GET['read'] == 'only') {
$reviews_split = new splitPageResults($nCurrentPageNumber, MAX_DISPLAY_NEW_REVIEWS, $reviews_result_raw, $reviews_numrows); $reviews_result = $dbconn->Execute($reviews_result_raw); $aReviews = array(); while ($reviews = $reviews_result->fields) { $aReviews[] = array('id' => $reviews['reviews_id'], 'products_id' => $reviews['products_id'], 'reviews_id' => $reviews['reviews_id'], 'products_name' => $reviews['products_name'], 'products_image' => $reviews['products_image'], 'authors_name' => $reviews['customers_name'], 'review' => htmlspecialchars(substr($reviews['reviews_text'], 0, 250)) . '..', 'rating' => $reviews['reviews_rating'], 'word_count' => oosWordCount($reviews['reviews_text'], ' '), 'date_added' => oos_date_long($reviews['date_added'])); $reviews_result->MoveNext(); } // links breadcrumb $oBreadcrumb->add($aLang['navbar_title']); $oos_pagetitle = $oBreadcrumb->trail_title(' » '); $oos_pagetitle .= '»' . OOS_META_TITLE; // assign Smarty variables; $oSmarty->assign( array( 'pagetitle' => htmlspecialchars($oos_pagetitle), 'meta_description' => htmlspecialchars($oos_meta_description), 'meta_keywords' => htmlspecialchars($oos_meta_keywords),
} $UpdateOrders .= " where orders_id = '" . oos_db_input($oID) . "';"; $dbconn->Execute($UpdateOrders); $order_updated = true; $check_status_result = $dbconn->Execute("select customers_name, customers_email_address, orders_status, date_purchased from " . $oostable['orders'] . " where orders_id = '" . (int) $oID . "'"); $check_status = $check_status_result->fields; // Update Status History & Email Customer if Necessary if ($order->info['orders_status'] != $status) { // Notify Customer $customer_notified = '0'; if (isset($_POST['notify']) && $_POST['notify'] == 'on') { $notify_comments = ''; if (isset($_POST['notify_comments']) && $_POST['notify_comments'] == 'on') { $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "\n\n"; } $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . oos_catalog_link($aFilename['catalog_account_history_info'], 'order_id=' . $oID, 'SSL') . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . oos_date_long($check_status['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]); oos_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); $customer_notified = '1'; } // "Status History" table has gone through a few // different changes, so here are different versions of // the status update. // NOTE: Theoretically, there shouldn't be a // orders_status field in the ORDERS table. It // should really just use the latest value from // this status history table. if ($CommentsWithStatus) { $dbconn->Execute("insert into " . $oostable['orders_status_history'] . "\n (orders_id, orders_status_id, date_added, customer_notified, comments)\n values ('" . oos_db_input($oID) . "', '" . oos_db_input($status) . "', '" . date("Y-m-d H:i:s", time()) . "', " . oos_db_input($customer_notified) . ", '" . oos_db_input($comments) . "')"); } else { if ($OldNewStatusValues) { $dbconn->Execute("insert into " . $oostable['orders_status_history'] . "\n (orders_id, new_value, old_value, date_added, customer_notified)\n values ('" . oos_db_input($oID) . "', '" . oos_db_input($status) . "', '" . $order->info['orders_status'] . "', '" . date("Y-m-d H:i:s", time()) . "', " . oos_db_input($customer_notified) . ")");
</tr> </table> </td> </tr> <?php if ($pInfo->products_date_available > date('Y-m-d')) { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_PRODUCT_DATE_AVAILABLE, oos_date_long($pInfo->products_date_available)); ?></td> </tr> <?php } else { ?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_PRODUCT_DATE_ADDED, oos_date_long($pInfo->products_date_added)); ?></td> </tr> <?php } ?> <tr> <td><?php echo oos_draw_separator('trans.gif', '1', '10'); ?></td> </tr> <?php } if (isset($_GET['read']) && ($_GET['read'] == 'only')) { if (isset($_GET['origin'])) { $pos_params = strpos($_GET['origin'], '?', 0); if ($pos_params != false) { $back_url = substr($_GET['origin'], 0, $pos_params); $back_url_params = substr($_GET['origin'], $pos_params + 1);
?> <tr class="dataTableRow" onMouseOver="this.className='dataTableRowOver';this.style.cursor='hand'" onMouseOut="this.className='dataTableRow'"> <?php switch ($srView) { case '3': ?> <td class="dataTableContent" align="right"><?php echo oos_date_long(date("Y-m-d\\ H:i:s", $sr->showDate)) . " - " . oos_date_short(date("Y-m-d\\ H:i:s", $sr->showDateEnd)); ?> </td> <?php break; case '4': ?> <td class="dataTableContent" align="right"><?php echo oos_date_long(date("Y-m-d\\ H:i:s", $sr->showDate)); ?> </td> <?php break; default: ?> <td class="dataTableContent" align="right"><?php echo oos_date_short(date("Y-m-d\\ H:i:s", $sr->showDate)) . " - " . oos_date_short(date("Y-m-d\\ H:i:s", $sr->showDateEnd)); ?> </td> <?php } ?> <td class="dataTableContent" align="right"><?php echo $info[0]['order'];
while ($sr->actDate < $sr->endDate) { $info = $sr->getNext(); $last = count($info) - 1; if ($srExp < 2) { ?> <tr class="dataTableRow" onMouseOver="this.className='dataTableRowOver';this.style.cursor='hand'" onMouseOut="this.className='dataTableRow'"> <?php switch ($srView) { case '3': ?> <td class="dataTableContent" align="right"><?php echo oos_date_long(date("Y-m-d\ H:i:s", $sr->showDate)) . " - " . oos_date_short(date("Y-m-d\ H:i:s", $sr->showDateEnd)); ?></td> <?php break; case '4': ?> <td class="dataTableContent" align="right"><?php echo oos_date_long(date("Y-m-d\ H:i:s", $sr->showDate)); ?></td> <?php break; default; ?> <td class="dataTableContent" align="right"><?php echo oos_date_short(date("Y-m-d\ H:i:s", $sr->showDate)) . " - " . oos_date_short(date("Y-m-d\ H:i:s", $sr->showDateEnd)); ?></td> <?php } ?> <td class="dataTableContent" align="right"><?php echo $info[0]['order']; ?></td> <td class="dataTableContent" align="right"><?php echo $info[$last - 1]['totitem']; ?></td> <td class="dataTableContent" align="right"><?php echo $currencies->format($info[$last - 1]['totsum']);?></td> <td class="dataTableContent" align="right"><?php echo $currencies->format($info[0]['shipping']);?></td> </tr> <?php } else {
require 'includes/info_message.php'; require 'includes/oos_blocks.php'; } if (USE_CACHE == '1' && !SID) { $oSmarty->caching = 2; $oSmarty->cache_lifetime = 2 * 24 * 3600; } if (!$oSmarty->is_cached($aOption['template_main'], $contents_cache_id)) { require 'includes/languages/' . $sLanguage . '/reviews_reviews.php'; $reviewstable = $oostable['reviews']; $productstable = $oostable['products']; $reviews_descriptiontable = $oostable['reviews_description']; $products_descriptiontable = $oostable['products_description']; $reviews_result_raw = "SELECT r.reviews_id, rd.reviews_text, r.reviews_rating, r.date_added, p.products_id,\n pd.products_name, p.products_image, r.customers_name\n FROM {$reviewstable} r,{$reviews_descriptiontable} rd,\n {$productstable} p, {$products_descriptiontable} pd\n WHERE p.products_status >= '1'\n AND p.products_id = r.products_id\n AND r.reviews_id = rd.reviews_id\n AND p.products_id = pd.products_id\n AND pd.products_languages_id = '" . intval($nLanguageID) . "'\n AND rd.reviews_languages_id = '" . intval($nLanguageID) . "'\n ORDER BY r.reviews_id DESC"; $reviews_split = new splitPageResults($_GET['page'], MAX_DISPLAY_NEW_REVIEWS, $reviews_result_raw, $reviews_numrows); $reviews_result = $dbconn->Execute($reviews_result_raw); $aReviews = array(); while ($reviews = $reviews_result->fields) { $aReviews[] = array('id' => $reviews['reviews_id'], 'products_id' => $reviews['products_id'], 'reviews_id' => $reviews['reviews_id'], 'products_name' => $reviews['products_name'], 'products_image' => $reviews['products_image'], 'authors_name' => $reviews['customers_name'], 'review' => htmlspecialchars(substr($reviews['reviews_text'], 0, 250)) . '..', 'rating' => $reviews['reviews_rating'], 'word_count' => oosWordCount($reviews['reviews_text'], ' '), 'date_added' => oos_date_long($reviews['date_added'])); $reviews_result->MoveNext(); } // links breadcrumb $oBreadcrumb->add($aLang['navbar_title'], oos_href_link($aModules['reviews'], $aFilename['reviews_reviews'])); $oSmarty->assign(array('oos_breadcrumb' => $oBreadcrumb->trail(BREADCRUMB_SEPARATOR), 'oos_heading_title' => $aLang['heading_title'], 'oos_heading_image' => 'specials.gif', 'oos_page_split' => $reviews_split->display_count($reviews_numrows, MAX_DISPLAY_NEW_REVIEWS, $_GET['page'], $aLang['text_display_number_of_reviews']), 'oos_display_links' => $reviews_split->display_links($reviews_numrows, MAX_DISPLAY_NEW_REVIEWS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], oos_get_all_get_parameters(array('page', 'info'))), 'oos_page_numrows' => $reviews_numrows, 'oos_reviews_array' => $aReviews)); } $oSmarty->assign('oosPageNavigation', $oSmarty->fetch($aOption['page_navigation'], $contents_cache_id)); $oSmarty->assign('oosPageHeading', $oSmarty->fetch($aOption['page_heading'], $contents_cache_id)); $oSmarty->assign('contents', $oSmarty->fetch($aOption['template_main'], $contents_cache_id)); $oSmarty->caching = false; // display the template require 'includes/oos_display.php';