function confirm() { // Get database information $dbconn =& oosDBGetConn(); $oostable =& oosDBGetTables(); $aFilename = oos_get_filename(); $mail_result1 = $dbconn->Execute("SELECT COUNT(*) AS total FROM " . $oostable['customers'] . " WHERE customers_newsletter = '1'"); $mail_result2 = $dbconn->Execute("SELECT COUNT(*) AS total FROM " . $oostable['maillist'] . " WHERE customers_newsletter = '1'"); $mail1 = $mail_result1->fields; $mail2 = $mail_result2->fields; $mail['total'] = $mail1['total'] + $mail2['total']; $confirm_string = '<table border="0" cellspacing="0" cellpadding="2">' . "\n" . ' <tr>' . "\n" . ' <td class="main"><font color="#ff0000"><b>' . sprintf(TEXT_COUNT_CUSTOMERS, $mail['total']) . '</b></font></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . oos_draw_separator('trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="main"><b>' . $this->title . '</b></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . oos_draw_separator('trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="main"><tt>' . nl2br($this->content) . '</tt></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . oos_draw_separator('trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td align="right"><a href="' . oos_href_link_admin($aFilename['newsletters'], 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm_send') . '">' . oos_image_button('send_off.gif', IMAGE_SEND) . '</a> <a href="' . oos_href_link_admin($aFilename['newsletters'], 'page=' . $_GET['page'] . '&nID=' . $_GET['nID']) . '">' . oos_image_button('cancel_off.gif', IMAGE_CANCEL) . '</a></td>' . "\n" . ' </tr>' . "\n" . '</table>'; return $confirm_string; }
$sProductListBuyNow .='<input type="hidden" name="page" value="' . $sPage .'">'; $sProductListBuyNow .='<input type="hidden" name="formid" value="' . $sFormid .'">'; $sProductListBuyNow .='<input type="hidden" name="categories" value="' . $categories .'">'; $sProductListBuyNow .='<input type="hidden" name="products_id" value="' . $nProductsId .'">'; $sProductListBuyNow .=oos_hide_session_id(); // todo remove oos_get_all_as_hidden_field $sProductListBuyNow .=oos_get_all_as_hidden_field(array('action')); $sProductListBuyNow .='<input type="hidden" name="nv" value="' . $nCurrentPageNumber .'">'; $sProductListBuyNow .=$aLang['products_order_qty_text']; $sProductListBuyNow .=' <input type="text" name="cart_quantity" value="' . $order_min . '" size="3" /><br />'; $sProductListBuyNow .=oos_image_submit('buy_now.gif', $aLang['text_buy'] . $listing['products_name'] . $aLang['text_now']); $sProductListBuyNow .='</form>'; } else { $sProductListBuyNow = '<a href="' . oos_href_link($sPage, $all_get_listing . 'action=buy_slave&slave_id=' . $listing['products_id'] . '&cart_quantity=' . $order_min ) . '" title="' . $listing['products_name'] . '">' . oos_image_button('buy_now.gif', $aLang['text_buy'] . $listing['products_name'] . $aLang['text_now']) . '</a> '; } } $aProductListing[] = array( 'products_id' => $listing['products_id'], 'products_model' => $listing['products_model'], 'products_image' => $listing['products_image'], 'products_name' => $listing['products_name'], 'manufacturers_id' => $listing['manufacturers_id'], 'manufacturers_name' => $listing['manufacturers_name'], 'products_quantity' => $listing['products_quantity'], 'products_weight' => $listing['products_weight'], 'product_list_sort_order' => $listing['products_sort_order'], 'product_list_link' => $sProductListLink,
if (PRODUCT_LISTING_WITH_QTY == '1') { $lc_text = '<form name="buy_now" action="' . OOS_HTTP_SERVER . OOS_SHOP . 'index.php" method="post">'; $lc_text .= '<input type="hidden" name="action" value="buy_now">'; $lc_text .= '<input type="hidden" name="products_id" value="' . $listing['products_id'] . '">'; $lc_text .= '<input type="hidden" name="mp" value="' . $sMp . '">'; $lc_text .= '<input type="hidden" name="file" value="' . $sFile . '">'; $lc_text .= '<input type="hidden" name="categories" value="' . $categories . '">'; $lc_text .= '<input type="hidden" name="formid" value="' . $sFormid . '">'; $lc_text .= oos_hide_session_id(); $lc_text .= oos_get_all_as_hidden_field(array('action')); $lc_text .= $aLang['products_order_qty_text']; $lc_text .= ' <input type="text" name="cart_quantity" value="' . $order_min . '" size="3" /><br />'; $lc_text .= oos_image_submit('buy_now.gif', $aLang['text_buy'] . $listing['products_name'] . $aLang['text_now']); $lc_text .= '</form>'; } else { $lc_text = '<a href="' . oos_href_link($sMp, $sFile, $all_get_listing . 'action=buy_now&products_id=' . $listing['products_id'] . '&cart_quantity=' . $order_min) . '">' . oos_image_button('buy_now.gif', $aLang['text_buy'] . $listing['products_name'] . $aLang['text_now']) . '</a> '; } } else { $lc_text = ' '; } break; case 'PRODUCT_LIST_SORT_ORDER': $lc_align = 'center'; $lc_text = ' ' . $listing['products_sort_order'] . ' '; break; } $list_box_contents[$cur_row][] = array('align' => $lc_align, 'params' => 'class="productListing-data"', 'text' => $lc_text); } // Move that ADOdb pointer! $listing_result->MoveNext(); }
function confirm() { $audience = array(); // Get database information $dbconn =& oosDBGetConn(); $oostable =& oosDBGetTables(); $aFilename = oos_get_filename(); if ($_GET['global'] == 'true') { $products_result = $dbconn->Execute("SELECT distinct customers_id FROM " . $oostable['products_notifications']); while ($products = $products_result->fields) { $audience[$products['customers_id']] = '1'; // Move that ADOdb pointer! $products_result->MoveNext(); } $customers_result = $dbconn->Execute("SELECT customers_info_id FROM " . $oostable['customers_info'] . " WHERE global_product_notifications = '1'"); while ($customers = $customers_result->fields) { $audience[$customers['customers_info_id']] = '1'; // Move that ADOdb pointer! $customers_result->MoveNext(); } } else { $chosen = $_POST['chosen']; $ids = implode(',', $chosen); $products_result = $dbconn->Execute("SELECT DISTINCT customers_id FROM " . $oostable['products_notifications'] . " WHERE products_id in (" . $ids . ")"); while ($products = $products_result->fields) { $audience[$products['customers_id']] = '1'; $products_result->MoveNext(); } $customers_result = $dbconn->Execute("SELECT customers_info_id FROM " . $oostable['customers_info'] . " WHERE global_product_notifications = '1'"); while ($customers = $customers_result->fields) { $audience[$customers['customers_info_id']] = '1'; // Move that ADOdb pointer! $customers_result->MoveNext(); } } $confirm_string = '<table border="0" cellspacing="0" cellpadding="2">' . "\n" . ' <tr>' . "\n" . ' <td class="main"><font color="#ff0000"><b>' . sprintf(TEXT_COUNT_CUSTOMERS, count($audience)) . '</b></font></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . oos_draw_separator('trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="main"><b>' . $this->title . '</b></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . oos_draw_separator('trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="main"><tt>' . nl2br($this->content) . '</tt></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . oos_draw_separator('trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . oos_draw_form('confirm', $aFilename['newsletters'], 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm_send') . "\n" . ' <td align="right">'; if (count($audience) > 0) { if ($_GET['global'] == 'true') { $confirm_string .= oos_draw_hidden_field('global', 'true'); } else { for ($i = 0, $n = count($chosen); $i < $n; $i++) { $confirm_string .= oos_draw_hidden_field('chosen[]', $chosen[$i]); } } $confirm_string .= oos_image_submit('send.gif', IMAGE_SEND) . ' '; } $confirm_string .= '<a href="' . oos_href_link_admin($aFilename['newsletters'], 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=send') . '">' . oos_image_button('back.gif', IMAGE_BACK) . '</a> <a href="' . oos_href_link_admin($aFilename['newsletters'], 'page=' . $_GET['page'] . '&nID=' . $_GET['nID']) . '">' . oos_image_button('cancel_off.gif', IMAGE_CANCEL) . '</a></td>' . "\n" . ' </tr>' . "\n" . '</table>'; return $confirm_string; }
<?php } ?> </table></td></tr> </table></td> <?php $heading = array(); $contents = array(); switch ($action) { case 'delete': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_OVERSTOCK . '</b>'); $contents = array('form' => oos_draw_form('palm_daily', $aFilename['manual_loging'], 'page=' . $_GET['page'] . '&sID=' . $sInfo->man_info_id . '&action=deleteconfirm')); $contents[] = array('text' => TEXT_INFO_DELETE_INTRO); $contents[] = array('text' => '<br /><b>' . $sInfo->contact_info_name . '</b>'); $contents[] = array('align' => 'center', 'text' => '<br />' . oos_image_swap_submits('button_delete_off.gif', IMAGE_DELETE) . ' <a href="' . oos_href_link_admin($aFilename['manual_loging'], 'page=' . $_GET['page'] . '&sID=' . $sInfo->man_info_id) . '">' . oos_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (isset($sInfo) && is_object($sInfo)) { $heading[] = array('text' => '<b>' . $sInfo->man_name . '</b>'); $contents[] = array('align' => 'center', 'text' => ''); $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_ADDED . ' ' . oos_date_short($sInfo->manual_date_added)); $contents[] = array('text' => '' . TEXT_INFO_LAST_MODIFIED . ' ' . oos_date_short($sInfo->manual_last_modified)); $contents[] = array('text' => '' . TEXT_INFO_STATUS_CHANGE . ' ' . oos_date_short($sInfo->date_status_change)); } break; } if ( (!empty($heading)) && (!empty($contents) ) ) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box; echo $box->infoBox($heading, $contents);
$sProductListBuyNow .= '<input type="hidden" name="action" value="buy_now">'; $sProductListBuyNow .= '<input type="hidden" name="products_id" value="' . $listing['products_id'] .'">'; $sProductListBuyNow .= '<input type="hidden" name="page" value="' . $sPage .'">'; $sProductListBuyNow .= '<input type="hidden" name="formid" value="' . $sFormid .'">'; $sProductListBuyNow .= $sProductListBuyNowHidden; $sProductListBuyNow .= '<input type="hidden" name="sort" value="' . $sSort .'">'; $sProductListBuyNow .= '<input type="hidden" name="nv" value="' . $nNV .'">'; $sProductListBuyNow .= $aLang['products_order_qty_text']; $sProductListBuyNow .= ' <input type="text" name="cart_quantity" value="' . $order_min . '" size="3" /><br />'; $sProductListBuyNow .= oos_image_submit('buy_now.gif', $aLang['text_buy'] . $listing['products_name'] . $aLang['text_now']); $sProductListBuyNow .= '</form>'; } else { $sProductListBuyNow = '<a href="' . oos_href_link($sPage, 'action=buy_now&sort=' . rawurlencode($sSort) . '&nv=' . $nNV . '&products_id=' . $listing['products_id'] . '&cart_quantity=' . $order_min . $all_get_listing) . '">' . oos_image_button('buy_now.gif', $aLang['text_buy'] . $listing['products_name'] . $aLang['text_now']) . '</a> '; } } else { $sProductListBuyNow = ' '; } $aProductListing[] = array( 'products_id' => $listing['products_id'], 'products_model' => $listing['products_model'], 'products_image' => $listing['products_image'], 'products_name' => $listing['products_name'], 'manufacturers_id' => $listing['manufacturers_id'], 'manufacturers_name' => $listing['manufacturers_name'], 'products_quantity' => $listing['products_quantity'],