function confirm() { global $_GET; $mail_query = smn_db_query("select count(*) as count from " . TABLE_CUSTOMERS . " where customers_newsletter = '1'"); $mail = smn_db_fetch_array($mail_query); $confirm_string = '<table border="0" cellspacing="0" cellpadding="2">' . "\n" . ' <tr>' . "\n" . ' <td class="main"><font color="#ff0000"><b>' . sprintf(TEXT_COUNT_CUSTOMERS, $mail['count']) . '</b></font></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . smn_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="main"><b>' . $this->title . '</b></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . smn_draw_separator('pixel_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>' . smn_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td align="right"><a href="' . smn_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm_send') . '">' . smn_image_button('button_send.gif', IMAGE_SEND) . '</a> <a href="' . smn_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID']) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a></td>' . "\n" . ' </tr>' . "\n" . '</table>'; return $confirm_string; }
function smn_redirect($url) { global $logger; if (strstr($url, "\n") != false || strstr($url, "\r") != false) { smn_redirect(smn_href_link(FILENAME_DEFAULT, '', 'NONSSL', false)); } header('Location: ' . $url); if (STORE_PAGE_PARSE_TIME == 'true') { if (!is_object($logger)) { $logger = new logger(); } $logger->timer_stop(); } exit; }
function smn_show_category($counter, $store_id) { global $foo, $boxContent, $id, $aa; for ($a = 0; $a < $foo[$counter]['level']; $a++) { if ($a == $foo[$counter]['level'] - 1) { $boxContent .= "<span class='subCat'> |_ </span>"; } else { $boxContent .= "<span class='subCat'> </span>"; } } if ($foo[$counter]['level'] == 0) { if ($aa == 1) { $boxContent .= ""; } else { $aa = 1; } } $boxContent .= '<a href="'; if ($foo[$counter]['parent'] == 0) { /*Added $store_id in $cPath_new to get the store id in the url by Cimi on June 08,2007*/ $cPath_new = 'ID=' . $store_id . '&cPath=' . $counter; } else { /*Added $store_id in $cPath_new to get the store id in the url by Cimi on June 08,2007*/ $cPath_new = 'ID=' . $store_id . '&cPath=' . $foo[$counter]['path']; } $boxContent .= smn_href_link(FILENAME_DEFAULT, $cPath_new); $boxContent .= '">'; if ($id && in_array($counter, $id)) { $boxContent .= "<span class='subCat'>"; } // display category name $boxContent .= $foo[$counter]['name']; if ($id && in_array($counter, $id)) { $boxContent .= '</span>'; } $boxContent .= '</a>'; $boxContent .= '<br>'; if ($foo[$counter]['next_id']) { /*Added parameter $store_id in the function to get the store id in the url by Cimi on June 08,2007*/ smn_show_category($foo[$counter]['next_id'], $store_id); } }
function display_links($query_numrows, $max_rows_per_page, $max_page_links, $current_page_number, $parameters = '', $page_name = 'page') { global $PHP_SELF; if (smn_not_null($parameters) && substr($parameters, -1) != '&') { $parameters .= '&'; } // calculate number of pages needing links $num_pages = ceil($query_numrows / $max_rows_per_page); $pages_array = array(); for ($i = 1; $i <= $num_pages; $i++) { $pages_array[] = array('id' => $i, 'text' => $i); } if ($num_pages > 1) { $display_links = smn_draw_form('pages', basename($PHP_SELF), '', 'get'); if ($current_page_number > 1) { $display_links .= '<a href="' . smn_href_link(basename($PHP_SELF), $parameters . $page_name . '=' . ($current_page_number - 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_PREV . '</a> '; } else { $display_links .= PREVNEXT_BUTTON_PREV . ' '; } $display_links .= sprintf(TEXT_RESULT_PAGE, smn_draw_pull_down_menu($page_name, $pages_array, $current_page_number, 'onChange="this.form.submit();"'), $num_pages); if ($current_page_number < $num_pages && $num_pages != 1) { $display_links .= ' <a href="' . smn_href_link(basename($PHP_SELF), $parameters . $page_name . '=' . ($current_page_number + 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_NEXT . '</a>'; } else { $display_links .= ' ' . PREVNEXT_BUTTON_NEXT; } if ($parameters != '') { if (substr($parameters, -1) == '&') { $parameters = substr($parameters, 0, -1); } $pairs = explode('&', $parameters); while (list(, $pair) = each($pairs)) { list($key, $value) = explode('=', $pair); $display_links .= smn_draw_hidden_field(rawurldecode($key), rawurldecode($value)); } } $display_links .= smn_hide_session_id() . '</form>'; } else { $display_links = sprintf(TEXT_RESULT_PAGE, $num_pages, $num_pages); } return $display_links; }
function smn_show_store_category($store_counter) { global $stree, $boxContent, $sPath_array; for ($i = 0; $i < $stree[$store_counter]['level']; $i++) { $boxContent .= " "; } $boxContent .= '<a href="'; if ($stree[$store_counter]['parent'] == 0) { $sPath_new = 'sPath=' . $store_counter; } else { $sPath_new = 'sPath=' . $stree[$store_counter]['path']; } $boxContent .= smn_href_link(FILENAME_STORE_LISTING, $sPath_new) . '">'; if (isset($sPath_array) && in_array($store_counter, $sPath_array)) { $boxContent .= '<b>'; } // display category name $boxContent .= $stree[$store_counter]['name']; if (isset($sPath_array) && in_array($store_counter, $sPath_array)) { $boxContent .= '</b>'; } if (smn_has_store_category_subcategories($store_counter)) { $boxContent .= '->'; } $boxContent .= '</a>'; if (SHOW_COUNTS == 'true') { $store_in_category = smn_count_store_in_category($store_counter); if ($store_in_category > 0) { $boxContent .= ' (' . $store_in_category . ')'; } } $boxContent .= '<br>'; if ($stree[$store_counter]['next_id'] != false) { smn_show_store_category($stree[$store_counter]['next_id']); } }
} elseif ($_GET['gID'] != 'edit_group') { $check_groups_name_query = smn_db_query("select admin_groups_name as group_name_new from " . TABLE_ADMIN_GROUPS . " where admin_groups_name like '%" . $name_replace . "%'"); $check_duplicate = smn_db_num_rows($check_groups_name_query); if ($check_duplicate > 0) { smn_redirect(smn_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET['gID'] . '&gName=used&action=new_group')); } else { $sql_product_data_array = array('products_quantity' => '1000', 'products_model' => 'mem_6_', 'products_price' => smn_db_prepare_input($_POST['admin_groups_cost']), 'products_date_available' => date('Y-m-d'), 'store_id' => 1, 'products_weight' => '0', 'products_status' => '1', 'products_tax_class_id' => '', 'products_date_added' => 'now()', 'products_image' => '', 'manufacturers_id' => ''); smn_db_perform(TABLE_PRODUCTS, $sql_product_data_array); $products_id = smn_db_insert_id(); smn_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int) $products_id . "', '1')"); $languages = smn_get_languages(); for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { $language_id = $languages[$i]['id']; $sql_data_array = array('products_id' => $products_id, 'products_name' => smn_db_prepare_input($admin_groups_name), 'language_id' => $language_id, 'products_url' => HTTP_CATALOG_SERVER); smn_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array); } $sql_data_array = array('admin_groups_name' => $admin_groups_name, 'admin_groups_store_type' => smn_db_prepare_input($_POST['admin_groups_store_types']), 'admin_groups_products_id' => $products_id, 'admin_sales_cost' => smn_db_prepare_input($_POST['admin_sales_cost']), 'admin_groups_max_products' => smn_db_prepare_input($_POST['admin_groups_max_products'])); smn_db_perform(TABLE_ADMIN_GROUPS, $sql_data_array); $admin_groups_id = smn_db_insert_id(); $set_groups_id = smn_db_prepare_input($_POST['set_groups_id']); $add_group_id = $set_groups_id . ',\'' . $admin_groups_id . '\''; smn_db_query("alter table " . TABLE_ADMIN_FILES . " change admin_groups_id admin_groups_id set( " . $add_group_id . ") NOT NULL DEFAULT '1' "); smn_redirect(smn_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $admin_groups_id)); } } break; } } $content_page = basename($_SERVER['PHP_SELF']); require 'templates/default/layout.php'; require DIR_WS_INCLUDES . 'application_bottom.php';
</table></td> <?php $heading = array(); $contents = array(); switch ($action) { case 'delete': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_REVIEW . '</b>'); $contents = array('form' => smn_draw_form('reviews', FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=deleteconfirm')); $contents[] = array('text' => TEXT_INFO_DELETE_REVIEW_INTRO); $contents[] = array('text' => '<br><b>' . $rInfo->products_name . '</b>'); $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . smn_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (isset($rInfo) && is_object($rInfo)) { $heading[] = array('text' => '<b>' . $rInfo->products_name . '</b>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . smn_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=edit') . '">' . smn_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . smn_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=delete') . '">' . smn_image_button('button_delete.gif', IMAGE_DELETE) . '</a>'); $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_ADDED . ' ' . smn_date_short($rInfo->date_added)); if (smn_not_null($rInfo->last_modified)) { $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED . ' ' . smn_date_short($rInfo->last_modified)); } $contents[] = array('text' => '<br>' . smn_info_image($rInfo->products_image, $rInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT)); $contents[] = array('text' => '<br>' . TEXT_INFO_REVIEW_AUTHOR . ' ' . $rInfo->customers_name); $contents[] = array('text' => TEXT_INFO_REVIEW_RATING . ' ' . smn_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . 'stars_' . $rInfo->reviews_rating . '.gif')); $contents[] = array('text' => TEXT_INFO_REVIEW_READ . ' ' . $rInfo->reviews_read); $contents[] = array('text' => '<br>' . TEXT_INFO_REVIEW_SIZE . ' ' . $rInfo->reviews_text_size . ' bytes'); $contents[] = array('text' => '<br>' . TEXT_INFO_PRODUCTS_AVERAGE_RATING . ' ' . number_format($rInfo->average_rating, 2) . '%'); } break; } if (smn_not_null($heading) && smn_not_null($contents)) { echo ' <td width="25%" valign="top">' . "\n";
Portions Copyright (c) 2002 osCommerce This source file is subject to version 2.0 of the GPL license, that is bundled with this package in the file LICENSE. If you did not receive a copy of the oscMall System license and are unable to obtain it through the world-wide-web, please send a note to license@systemsmanager.net so we can mail you a copy immediately. */ ?> <!-- articles //--> <?php $boxHeading = BOX_HEADING_ARTICLES; $box_base_name = 'articles'; $box_id = $box_base_name . 'Box'; $boxContent = ''; $articles_query = smn_db_query("select distinct page_name from " . TABLE_DYNAMIC_PAGE_INDEX . " where page_type='articles' and store_id='" . $store_id . "' order by page_name"); // Display a drop-down while ($articles_values = smn_db_fetch_array($articles_query)) { $name = str_replace('_', ' ', $articles_values['page_name']); $boxContent .= '<a href="' . smn_href_link(FILENAME_ARTICLES, 'ID=1&type=' . $articles_values['page_name']) . '">' . $name . '</a><br>'; } $boxContent .= smn_hide_session_id(); $boxContent .= '<br><br>'; 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 = ''; ?> <!-- articles_eof //-->
<tr> <td valign="top"><br> <?php $heading = array(); $contents = array(); $heading[] = array('params' => 'class="menuBoxHeading"', 'text' => 'oscMall System'); $contents[] = array('params' => 'class="infoBox"', 'text' => '<a href="http://download.systemsmanager.net" target="_blank">' . BOX_ENTRY_SUPPORT_SITE . '</a><br>' . '<a href="http://forum.systemsmanager.net/" target="_blank">' . BOX_ENTRY_SUPPORT_FORUMS . '</a><br>' . '<a href="http://www.systemsmanager.net/" target="_blank">' . BOX_ENTRY_MAILING_LISTS . '</a><br>' . '<a href="http://forum.systemsmanager.net/" target="_blank">' . BOX_ENTRY_BUG_REPORTS . '</a><br>' . '<a href="javascript:popupWindow(\'' . DIR_WS_HELP . FILENAME_POPUP_HELP . '?HelpID=' . str_replace('.php', '', basename($PHP_SELF)) . '\')">' . BOX_ENTRY_INFORMATION_PORTAL . '</a>'); $box = new box(); echo $box->menuBox($heading, $contents); echo '<br>'; $orders_contents = ''; $orders_status_query = smn_db_query("select orders_status_name, orders_status_id from " . TABLE_ORDERS_STATUS . " where language_id = '" . $languages_id . "'"); while ($orders_status = smn_db_fetch_array($orders_status_query)) { $orders_pending_query = smn_db_query("select count(*) as count from " . TABLE_ORDERS . " where orders_status = '" . $orders_status['orders_status_id'] . "' and store_id = '" . $store_id . "'"); $orders_pending = smn_db_fetch_array($orders_pending_query); $orders_contents .= '<a href="' . smn_href_link(FILENAME_ORDERS, 'selected_box=customers&status=' . $orders_status['orders_status_id']) . '">' . $orders_status['orders_status_name'] . '</a>: ' . $orders_pending['count'] . '<br>'; } $orders_contents = substr($orders_contents, 0, -4); $heading = array(); $contents = array(); $heading[] = array('params' => 'class="menuBoxHeading"', 'text' => BOX_TITLE_ORDERS); $contents[] = array('params' => 'class="infoBox"', 'text' => $orders_contents); $box = new box(); echo $box->menuBox($heading, $contents); echo '<br>'; $customers_query = smn_db_query("select count(*) as count from " . TABLE_CUSTOMERS); $customers = smn_db_fetch_array($customers_query); $products_query = smn_db_query("select count(*) as count from " . TABLE_PRODUCTS . " where products_status = '1' and store_id = '" . $store_id . "'"); $products = smn_db_fetch_array($products_query); $reviews_query = smn_db_query("select count(*) as count from " . TABLE_REVIEWS . " where store_id = '" . $store_id . "'"); $reviews = smn_db_fetch_array($reviews_query);
</table></td> </tr> </table></td> </tr> <?php if ($process == true) { ?> <tr> <td><?php echo smn_draw_separator('pixel_trans.gif', '100%', '10'); ?> </td> </tr> <tr> <td><?php echo '<a href="' . smn_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'NONSSL') . '">' . smn_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?> </td> </tr> <?php } ?> <tr> <td><?php echo smn_draw_separator('pixel_trans.gif', '100%', '10'); ?> </td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr>
<?php /* Copyright (c) 2002 - 2006 SystemsManager.Net SystemsManager Technologies oscMall System Version 4 http://www.systemsmanager.net Portions Copyright (c) 2002 osCommerce This source file is subject to version 2.0 of the GPL license, that is bundled with this package in the file LICENSE. If you did not receive a copy of the oscMall System license and are unable to obtain it through the world-wide-web, please send a note to license@systemsmanager.net so we can mail you a copy immediately. */ global $page_name; if (!smn_session_is_registered('affiliate_id')) { $navigation->set_snapshot(); smn_redirect(smn_href_link(FILENAME_AFFILIATE, '', 'NONSSL')); } $breadcrumb->add(NAVBAR_TITLE, smn_href_link(FILENAME_AFFILIATE_CLICKS, '', 'NONSSL')); $affiliate_clickthroughs_raw = "\n select a.*, pd.products_name from " . TABLE_AFFILIATE_CLICKTHROUGHS . " a \n left join " . TABLE_PRODUCTS . " p on (p.products_id = a.affiliate_products_id) \n left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on (pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "') \n where a.affiliate_id = '" . $affiliate_id . "' ORDER BY a.affiliate_clientdate desc\n "; $affiliate_clickthroughs_split = new splitPageResults($affiliate_clickthroughs_raw, MAX_DISPLAY_SEARCH_RESULTS); $affiliate_clickthroughs_numrows_raw = "select count(*) as count from " . TABLE_AFFILIATE_CLICKTHROUGHS . " where affiliate_id = '" . $affiliate_id . "'"; $affiliate_clickthroughs_query = smn_db_query($affiliate_clickthroughs_numrows_raw); $affiliate_clickthroughs_numrows = smn_db_fetch_array($affiliate_clickthroughs_query); $affiliate_clickthroughs_numrows = $affiliate_clickthroughs_numrows['count']; ?>
/* Copyright (c) 2002 - 2006 SystemsManager.Net SystemsManager Technologies oscMall System Version 4 http://www.systemsmanager.net Portions Copyright (c) 2002 osCommerce This source file is subject to version 2.0 of the GPL license, that is bundled with this package in the file LICENSE. If you did not receive a copy of the oscMall System license and are unable to obtain it through the world-wide-web, please send a note to license@systemsmanager.net so we can mail you a copy immediately. */ $boxHeading = ""; $box_base_name = 'search2'; $box_id = $box_base_name . 'Box'; $boxContent = smn_draw_form('quick_find', smn_href_link(FILENAME_ADVANCED_SEARCH_RESULT, 'ID=1', 'NONSSL', false), 'post'); $boxContent .= '<table HEIGHT="40" CELLSPACING="0" CELLPADDING="0" align="left"><tr><td HEIGHT="40" class="search_css">' . 'SEARCH: '; $boxContent .= smn_draw_pull_down_menu('categories_id', smn_get_categories_extended(array(array('id' => '', 'text' => 'All Stores'))), '0', '') . ' '; $boxContent .= smn_draw_hidden_field('search_in_description', '1'); $boxContent .= '<br/>FOR: ' . smn_draw_input_field('keywords', '', 'size="20" maxlength="30" ') . ' ' . smn_hide_session_id() . smn_image_submit('button_quick_find.gif', 'Go Search', 'align="absmiddle"'); $boxContent .= ' <a href="' . smn_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>'; $boxContent .= '</td></tr></table></form>'; 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 = '';
$mail_query = smn_db_query("select distinct(customers.customers_email_address), customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . ", " . TABLE_ORDERS . " where customers.customers_id = orders.customers_id and orders.store_id = " . $store_id . " and customers_newsletter = '1' group by customers.customers_id"); $mail_sent_to = TEXT_NEWSLETTER_CUSTOMERS; break; default: $customers_email_address = smn_db_prepare_input($_POST['customers_email_address']); $mail_query = smn_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_email_address = '" . smn_db_input($customers_email_address) . "'"); $mail_sent_to = $_POST['customers_email_address']; break; } $from = smn_db_prepare_input($_POST['from']); $subject = smn_db_prepare_input($_POST['subject']); $message = smn_db_prepare_input($_POST['message']); //Let's build a message object using the email class $mimemessage = new email(array('X-Mailer: osCommerce')); // add the message to the object $mimemessage->add_text($message); $mimemessage->build_message(); while ($mail = smn_db_fetch_array($mail_query)) { $mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', $from, $subject); } smn_redirect(smn_href_link(FILENAME_MAIL, 'mail_sent_to=' . urlencode($mail_sent_to))); } if ($action == 'preview' && !isset($_POST['customers_email_address'])) { $messageStack->add(ERROR_NO_CUSTOMER_SELECTED, 'error'); } if (isset($_GET['mail_sent_to'])) { $messageStack->add(sprintf(NOTICE_EMAIL_SENT_TO, $_GET['mail_sent_to']), 'success'); } $content_page = basename($_SERVER['PHP_SELF']); require 'templates/default/layout.php'; require DIR_WS_INCLUDES . 'application_bottom.php';
$email_text = sprintf(EMAIL_GREET_MR, $lastname); } else { $email_text = sprintf(EMAIL_GREET_MS, $lastname); } } else { $email_text = sprintf(EMAIL_GREET_NONE, $firstname); } $email_text .= EMAIL_WELCOME . EMAIL_CONTACT . EMAIL_WARNING; if (NEW_SIGNUP_GIFT_VOUCHER_AMOUNT > 0) { $coupon_code = create_coupon_code(); $insert_query = smn_db_query("insert into " . TABLE_COUPONS . " (coupon_code, coupon_type, coupon_amount, date_created) values ('" . $coupon_code . "', 'G', '" . NEW_SIGNUP_GIFT_VOUCHER_AMOUNT . "', now())"); $insert_id = smn_db_insert_id($insert_query); $insert_query = smn_db_query("insert into " . TABLE_COUPON_EMAIL_TRACK . " (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('" . $insert_id . "', '0', 'Admin', '" . $email_address . "', now() )"); $email_text .= sprintf(EMAIL_GV_INCENTIVE_HEADER, $currencies->format(NEW_SIGNUP_GIFT_VOUCHER_AMOUNT)) . "\n\n" . sprintf(EMAIL_GV_REDEEM, $coupon_code) . "\n\n" . EMAIL_GV_LINK . smn_href_link(FILENAME_GV_REDEEM, 'gv_no=' . $coupon_code, 'NONSSL', false) . "\n\n"; } if (NEW_SIGNUP_DISCOUNT_COUPON != '') { $coupon_code = NEW_SIGNUP_DISCOUNT_COUPON; $coupon_query = smn_db_query("select * from " . TABLE_COUPONS . " where coupon_code = '" . $coupon_code . "'"); $coupon = smn_db_fetch_array($coupon_query); $coupon_id = $coupon['coupon_id']; $coupon_desc_query = smn_db_query("select * from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $coupon_id . "' and language_id = '" . (int) $languages_id . "'"); $coupon_desc = smn_db_fetch_array($coupon_desc_query); $insert_query = smn_db_query("insert into " . TABLE_COUPON_EMAIL_TRACK . " (coupon_id, customer_id_sent, sent_firstname, emailed_to, date_sent) values ('" . $coupon_id . "', '0', 'Admin', '" . $email_address . "', now() )"); $email_text .= EMAIL_COUPON_INCENTIVE_HEADER . "\n" . sprintf("%s", $coupon_desc['coupon_description']) . "\n\n" . sprintf(EMAIL_COUPON_REDEEM, $coupon['coupon_code']) . "\n\n" . "\n\n"; } smn_mail($name, $email_address, EMAIL_SUBJECT, $email_text, $store->get_store_owner(), $store->get_store_owner_email_address()); smn_redirect(smn_href_link(FILENAME_CREATE_ACCOUNT_SUCCESS, '', 'NONSSL')); } } $breadcrumb->add(NAVBAR_TITLE, smn_href_link(FILENAME_CREATE_ACCOUNT, '', 'NONSSL'));
echo $currencies->format($gv_list['coupon_amount']); ?> </td> <td class="dataTableContent" align="center"><?php echo $gv_list['coupon_code']; ?> </td> <td class="dataTableContent" align="right"><?php echo smn_date_short($gv_list['date_sent']); ?> </td> <td class="dataTableContent" align="right"><?php if (is_object($gInfo) && $gv_list['coupon_id'] == $gInfo->coupon_id) { echo smn_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '<a href="' . smn_href_link(FILENAME_GV_SENT, 'page=' . $_GET['page'] . '&gid=' . $gv_list['coupon_id']) . '">' . smn_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td> </tr> <?php } ?> <tr> <td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" valign="top"><?php echo $gv_split->display_count($gv_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_GIFT_VOUCHERS); ?> </td> <td class="smallText" align="right"><?php
} $left = !$left; } } $dir->close(); } ?> </tr> </table></td> </tr> <tr> <td><?php echo smn_draw_separator('pixel_trans.gif', '1', '10'); ?> </td> </tr> <tr> <td align="right"><?php echo '<a href="' . smn_href_link(FILENAME_FILE_MANAGER, 'current_path=' . DIR_FS_CATALOG_LANGUAGES . $_GET['lngdir']) . '">' . smn_image_button('button_file_manager.gif', IMAGE_FILE_MANAGER) . '</a>'; ?> </td> </tr> <?php } ?> </table></td> </tr> </table>
new contentBoxHeading($info_box_contents); $row = 0; $col = 0; $info_box_contents = array(); while ($xsell = smn_db_fetch_array($xsell_query)) { $xsell['specials_new_products_price'] = smn_get_products_special_price($xsell['products_id']); $store_images = 'images/' . $xsell['store_id'] . '_images/'; if ($xsell['specials_new_products_price']) { $xsell_price = '<s>' . $currencies->display_price($xsell['products_price'], smn_get_tax_rate($xsell['products_tax_class_id'], '', '', $xsell['store_id'])) . '</s><br>'; $xsell_price .= '<span class="productSpecialPrice">' . $currencies->display_price($xsell['specials_new_products_price'], smn_get_tax_rate($xsell['products_tax_class_id'], '', '', $xsell['store_id'])) . '</span>'; } else { $xsell_price = $currencies->display_price($xsell['products_price'], smn_get_tax_rate($xsell['products_tax_class_id'], '', '', $xsell['store_id'])); } $info_box_contents[$row][$col] = array('text' => '<TABLE><TR><TD align="center" class="infoBoxContents" width="100"><div align="left"> <a href="' . smn_href_link(FILENAME_PRODUCT_INFO, 'ID=' . $xsell['store_id'] . '&products_id=' . $xsell['products_id']) . '">' . smn_image($store_images . $xsell['products_image'], $xsell['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></TD><TD class="infoBoxContents"> <a href="' . smn_href_link(FILENAME_PRODUCT_INFO, 'ID=' . $xsell['store_id'] . '&products_id=' . $xsell['products_id']) . '</a><br>' . TEXT_PRICE_SOLO . '<br>' . $currencies->display_price($xsell['products_price'], smn_get_tax_rate($xsell['products_tax_class_id'], '', '', $xsell['store_id'])) . '</div></td></tr></table>'); $col++; if ($col > 0) { $col = 0; $row++; } } new contentBox($info_box_contents); $info_box_contents = array(); $info_box_contents[] = array('align' => 'left', 'text' => ' '); new infoBoxDefault($info_box_contents, true, true); ?> <!-- xsell_products_eof //-->
function process_button() { global $_POST, $order, $currencies, $currency; global $store; switch (MODULE_PAYMENT_IPAYMENT_CURRENCY) { case 'Always EUR': $trx_currency = 'EUR'; break; case 'Always USD': $trx_currency = 'USD'; break; case 'Either EUR or USD, else EUR': if ($currency == 'EUR' || $currency == 'USD') { $trx_currency = $currency; } else { $trx_currency = 'EUR'; } break; case 'Either EUR or USD, else USD': if ($currency == 'EUR' || $currency == 'USD') { $trx_currency = $currency; } else { $trx_currency = 'USD'; } break; } $process_button_string = smn_draw_hidden_field('silent', '1') . smn_draw_hidden_field('trx_paymenttyp', 'cc') . smn_draw_hidden_field('trxuser_id', MODULE_PAYMENT_IPAYMENT_USER_ID) . smn_draw_hidden_field('trxpassword', MODULE_PAYMENT_IPAYMENT_PASSWORD) . smn_draw_hidden_field('item_name', $store->get_store_name()) . smn_draw_hidden_field('trx_currency', $trx_currency) . smn_draw_hidden_field('trx_amount', number_format($order->info['total'] * 100 * $currencies->get_value($trx_currency), 0, '', '')) . smn_draw_hidden_field('cc_expdate_month', $_POST['ipayment_cc_expires_month']) . smn_draw_hidden_field('cc_expdate_year', $_POST['ipayment_cc_expires_year']) . smn_draw_hidden_field('cc_number', $_POST['ipayment_cc_number']) . smn_draw_hidden_field('cc_checkcode', $_POST['ipayment_cc_checkcode']) . smn_draw_hidden_field('addr_name', $_POST['ipayment_cc_owner']) . smn_draw_hidden_field('addr_email', $order->customer['email_address']) . smn_draw_hidden_field('redirect_url', smn_href_link(FILENAME_CHECKOUT_PROCESS, '', 'NONSSL', true)) . smn_draw_hidden_field('silent_error_url', smn_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code . '&ipayment_cc_owner=' . urlencode($_POST['ipayment_cc_owner']), 'NONSSL', true)); return $process_button_string; }
$contents[] = array('text' => TEXT_INFO_EDIT_INTRO); $contents[] = array('text' => '<br>' . TEXT_INFO_CLASS_TITLE . '<br>' . smn_draw_input_field('tax_class_title', $tcInfo->tax_class_title)); $contents[] = array('text' => '<br>' . TEXT_INFO_CLASS_DESCRIPTION . '<br>' . smn_draw_input_field('tax_class_description', $tcInfo->tax_class_description)); $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . smn_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tcInfo->tax_class_id) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; case 'delete': $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_TAX_CLASS . '</b>'); $contents = array('form' => smn_draw_form('classes', FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tcInfo->tax_class_id . '&action=deleteconfirm')); $contents[] = array('text' => TEXT_INFO_DELETE_INTRO); $contents[] = array('text' => '<br><b>' . $tcInfo->tax_class_title . '</b>'); $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . smn_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tcInfo->tax_class_id) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (isset($tcInfo) && is_object($tcInfo)) { $heading[] = array('text' => '<b>' . $tcInfo->tax_class_title . '</b>'); $contents[] = array('align' => 'center', 'text' => '<a href="' . smn_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tcInfo->tax_class_id . '&action=edit') . '">' . smn_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . smn_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tcInfo->tax_class_id . '&action=delete') . '">' . smn_image_button('button_delete.gif', IMAGE_DELETE) . '</a>'); $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_ADDED . ' ' . smn_date_short($tcInfo->date_added)); $contents[] = array('text' => '' . TEXT_INFO_LAST_MODIFIED . ' ' . smn_date_short($tcInfo->last_modified)); $contents[] = array('text' => '<br>' . TEXT_INFO_CLASS_DESCRIPTION . '<br>' . $tcInfo->tax_class_description); } break; } if (smn_not_null($heading) && smn_not_null($contents)) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box(); echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> </table></td>
?> <tr> <td><?php echo smn_draw_separator('pixel_trans.gif', '100%', '10'); ?> </td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <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><?php echo '<a href="' . smn_href_link(FILENAME_ACCOUNT, '', 'NONSSL') . '">' . smn_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?> </td> <td width="10"><?php echo smn_draw_separator('pixel_trans.gif', '10', '1'); ?> </td> </tr> </table></td> </tr> </table></td> </tr> </table>
<td class="main"><table border="0" width="40%" cellspacing="0" cellpadding="0" align="right"> <tr> <td><?php new InfoBoxHeading(array(array('text' => BOX_INFORMATION_HEADING))); ?> </td> </tr> <tr> <td><?php new infoBox(array(array('text' => BOX_INFORMATION))); ?> </td> </tr> </table><?php echo TEXT_INFORMATION; ?> </td> </tr> <tr> <td><?php echo smn_draw_separator('pixel_trans.gif', '100%', '10'); ?> </td> </tr> <tr> <td align="right" class="main"><?php echo '<a href="' . smn_href_link(FILENAME_LOGIN) . '">' . smn_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?> </td> </tr> </table>
title: "' . addslashes($module->title) . '", code: "' . $module->code . '", sort_order: "' . $module->sort_order . '", status: "' . ($module->enabled ? 'true' : 'false') . '" }'; exit; break; } } /* Common Elements For Tabs - BEGIN */ $commonCancelButton = $jQuery->getPluginClass('button', array('id' => 'cancel_button', 'text' => 'Cancel')); $commonDeleteButton = $jQuery->getPluginClass('button', array('id' => 'delete_button', 'text' => 'Delete')); $commonSaveButton = $jQuery->getPluginClass('button', array('id' => 'save_button', 'type' => 'submit', 'text' => 'Save')); /* Common Elements For Tabs - END */ /* Common Grid Elements - BEGIN */ $modulesGridEditButton = $jQuery->getPluginClass('button', array('id' => 'modulesGridEditButton', 'text' => 'Edit Module', 'hidden' => true)); $modulesGridUninstallButton = $jQuery->getPluginClass('button', array('id' => 'modulesGridUninstallButton', 'text' => 'Uninstall Module', 'hidden' => true)); $modulesGridInstallButton = $jQuery->getPluginClass('button', array('id' => 'modulesGridInstallButton', 'text' => 'Install Module')); $modulesGridColumns = array(array('id' => 'title', 'text' => 'Module Name'), array('id' => 'sort_order', 'text' => 'Sort Order'), array('id' => 'code', 'text' => 'Code', 'hidden' => true), array('id' => 'status', 'text' => 'Status', 'hidden' => true)); /* Common Grid Elements - END */ $jQuery->setGlobalVars(array('languages', 'languages_id', 'store_id', 'modulesGridEditButton', 'modulesGridUninstallButton', 'modulesGridInstallButton', 'commonSaveButton', 'commonDeleteButton', 'commonCancelButton', 'paymentModules', 'shippingModules', 'orderTotalModules', 'modulesGridColumns', 'store')); $tabsArray = array(); $tabsArray[] = array('tabID' => 'tab-payment', 'filename' => 'tab_payment.php', 'text' => 'Payment Modules'); $tabsArray[] = array('tabID' => 'tab-shipping', 'filename' => 'tab_shipping.php', 'text' => 'Shipping Modules'); $tabsArray[] = array('tabID' => 'tab-order_total', 'filename' => 'tab_order_total.php', 'text' => 'Order Total Modules'); $tabPanelHelpButton = $jQuery->getPluginClass('button', array('id' => 'helpButton', 'text' => 'Help')); $tabPanelBackButton = $jQuery->getPluginClass('button', array('id' => 'backButton', 'text' => 'Back To Account', 'href' => smn_href_link(FILENAME_ACCOUNT, 'ID=' . $store_id))); $tabPanel = $jQuery->getPluginClass('tabs', array('id' => 'initialPane', 'tabDir' => DIR_FS_CATALOG . 'includes/modules/pages_tabs/store_modules/', 'tabs' => $tabsArray, 'footerButtons' => array($tabPanelBackButton, $tabPanelHelpButton), 'showFooter' => true)); $tabPanel->setHelpButton('helpButton', true); $breadcrumb->add(NAVBAR_TITLE, smn_href_link(FILENAME_STORE_MODULES));
<?php /* Copyright (c) 2002 - 2006 SystemsManager.Net SystemsManager Technologies oscMall System Version 4 http://www.systemsmanager.net Portions Copyright (c) 2002 osCommerce This source file is subject to version 2.0 of the GPL license, that is bundled with this package in the file LICENSE. If you did not receive a copy of the oscMall System license and are unable to obtain it through the world-wide-web, please send a note to license@systemsmanager.net so we can mail you a copy immediately. */ global $page_name; $breadcrumb->add(NAVBAR_TITLE_1); $breadcrumb->add(NAVBAR_TITLE_2); if (sizeof($navigation->snapshot) > 0) { $origin_href = smn_href_link($navigation->snapshot['page'], smn_array_to_string($navigation->snapshot['get'], array(smn_session_name())), $navigation->snapshot['mode']); $navigation->clear_snapshot(); } else { $origin_href = smn_href_link(FILENAME_DEFAULT); }
$storeData[] = '[' . implode(',', $rowData) . ']'; } } ?> <div id="productListing"></div> <div id="productListing_preview" style="padding-top:10px;"></div> <textarea id="preview-tpl" style="display:none;"> <div class="post-data"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td><img src="{image}"></td> <td>{description}</td> </tr> <tr> <td colspan="2" align="right"><a href="<?php echo smn_href_link(basename($PHP_SELF), smn_get_all_get_params(array('action')) . 'action=buy_now&ID={store_id}&products_id={product_id}'); ?> "><?php echo smn_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW); ?> </a></tD> </tr> </table> </div> </textarea> <link rel="stylesheet" type="text/css" href="ext/<?php echo EXTJS_VERSION; ?> /resources/css/ext-all.css" />
} echo '{success:true}'; } else { echo '{ success: false, errors: { message: "' . addslashes(str_replace("\n", '', nl2br($messageStack->outputPlain('account_edit')))) . '" } }'; } exit; } $account_query = smn_db_query("select c.*, ab.* from " . TABLE_CUSTOMERS . " c, " . TABLE_ADDRESS_BOOK . " ab where ab.customers_id = '" . (int) $customer_id . "' and c.customers_id = '" . (int) $customer_id . "' and ab.address_book_id = c.customers_default_address_id"); $account = smn_db_fetch_array($account_query); $breadcrumb->add(NAVBAR_TITLE_1, smn_href_link(FILENAME_ACCOUNT, 'ID=' . $store_id, 'NONSSL')); $breadcrumb->add(NAVBAR_TITLE_2, smn_href_link(FILENAME_ACCOUNT_EDIT, 'ID=' . $store_id, 'NONSSL')); $store_categories = $spath_setup->smn_get_store_category_tree('0', '', '0'); $countries = smn_get_countries(); $Qzone = smn_db_query('select zone_name from ' . TABLE_ZONES . ' where (zone_code = "' . strtoupper($customerInfo->address_data['entry_state']) . '" || zone_name = "' . $customerInfo->address_data['entry_state'] . '")'); if (smn_db_num_rows($Qzone)) { $zone = smn_db_fetch_array($Qzone); $customerInfo->address_data['entry_state'] = $zone['zone_name']; } /* Common Elements For Tabs - BEGIN */ $commonCancelButton = $jQuery->getPluginClass('button', array('id' => 'cancel_button', 'text' => 'Cancel')); $commonDeleteButton = $jQuery->getPluginClass('button', array('id' => 'delete_button', 'text' => 'Delete')); $commonSaveButton = $jQuery->getPluginClass('button', array('id' => 'save_button', 'type' => 'submit', 'text' => 'Save')); /* Common Elements For Tabs - END */ /* Setup Tabs - BEGIN */ $jQuery->setGlobalVars(array('languages', 'languages_id', 'store_id', 'commonSaveButton', 'commonDeleteButton', 'commonCancelButton', 'account', 'customerInfo', 'customer_store_id', 'affiliate_id', 'customersStore', 'store_categories', 'countries')); $tabsArray = array();
$email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_AFFILIATE_PAYMENT_NUMBER . ' ' . $pID . "\n" . EMAIL_TEXT_INVOICE_URL . ' ' . smn_catalog_href_link(FILENAME_CATALOG_AFFILIATE_PAYMENT_INFO, 'payment_id=' . $pID, 'NONSSL') . "\n" . EMAIL_TEXT_PAYMENT_BILLED . ' ' . smn_date_long($check_status['affiliate_payment_date']) . "\n\n" . sprintf(EMAIL_TEXT_STATUS_UPDATE, $payments_status_array[$status]); smn_mail($check_status['affiliate_firstname'] . ' ' . $check_status['affiliate_lastname'], $check_status['affiliate_email_address'], EMAIL_TEXT_SUBJECT, nl2br($email), STORE_OWNER, AFFILIATE_EMAIL_ADDRESS); $affiliate_notified = '1'; } smn_db_query("insert into " . TABLE_AFFILIATE_PAYMENT_STATUS_HISTORY . " (affiliate_payment_id, affiliate_new_value, affiliate_old_value, affiliate_date_added, affiliate_notified) values ('" . smn_db_input($pID) . "', '" . smn_db_input($status) . "', '" . $check_status['affiliate_payment_status'] . "', now(), '" . $affiliate_notified . "')"); $order_updated = true; } if ($order_updated) { $messageStack->add_session(SUCCESS_PAYMENT_UPDATED, 'success'); } smn_redirect(smn_href_link(FILENAME_AFFILIATE_PAYMENT, smn_get_all_get_params(array('action')) . 'action=edit')); break; case 'deleteconfirm': $pID = smn_db_prepare_input($_GET['pID']); smn_db_query("delete from " . TABLE_AFFILIATE_PAYMENT . " where affiliate_payment_id = '" . smn_db_input($pID) . "'"); smn_db_query("delete from " . TABLE_AFFILIATE_PAYMENT_STATUS_HISTORY . " where affiliate_payment_id = '" . smn_db_input($pID) . "'"); smn_redirect(smn_href_link(FILENAME_AFFILIATE_PAYMENT, smn_get_all_get_params(array('pID', 'action')))); break; } if ($_GET['action'] == 'edit' && smn_not_null($_GET['pID'])) { $pID = smn_db_prepare_input($_GET['pID']); $payments_query = smn_db_query("select p.*, a.affiliate_payment_check, a.affiliate_payment_paypal, a.affiliate_payment_bank_name, a.affiliate_payment_bank_branch_number, a.affiliate_payment_bank_swift_code, a.affiliate_payment_bank_account_name, a.affiliate_payment_bank_account_number from " . TABLE_AFFILIATE_PAYMENT . " p, " . TABLE_AFFILIATE . " a where affiliate_payment_id = '" . smn_db_input($pID) . "' and a.affiliate_id = p.affiliate_id"); $payments_exists = true; if (!($payments = smn_db_fetch_array($payments_query))) { $payments_exists = false; $messageStack->add(sprintf(ERROR_PAYMENT_DOES_NOT_EXIST, $pID), 'error'); } } $content_page = basename($_SERVER['PHP_SELF']); require 'templates/default/layout.php'; require DIR_WS_INCLUDES . 'application_bottom.php';
} smn_redirect(html_entity_decode(smn_href_link(FILENAME_STORE_PRODUCT_CATEGORIES, 'cPath=' . $categories_id . '&ID='.$store_id.'&pID=' . $products_id))); break; case 'new_product_preview': if (! checkVoucherPermissions($store_id, $_POST['products_model'])) { $messageStack->add(ERROR_VENDORS_CANT_ADD_VOUCHERS, 'error'); $allow_insert = 'false'; } else { // copy image only if modified $allowed_files_types = array('gif', 'jpg', 'jpeg', 'png'); $products_image = new upload('products_image'); $products_image->set_destination(DIR_FS_CATALOG_IMAGES); $products_image->set_extensions($allowed_files_types); if ($products_image->parse() && $products_image->save()) { $products_image_name = $products_image->filename; } else { $products_image_name = (isset($_POST['products_previous_image']) ? $_POST['products_previous_image'] : ''); } } break; } } // check if the catalog image directory exists if (is_dir(DIR_FS_CATALOG_IMAGES)) { if (!is_writeable(DIR_FS_CATALOG_IMAGES)) $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error'); } else { $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error'); } $breadcrumb->add(NAVBAR_TITLE, smn_href_link(FILENAME_STORE_PRODUCT_CATEGORIES, 'ID='.$store_id, 'NONSSL')); ?>
$contents = array(); switch ($action) { case 'delete': $heading[] = array('text' => '<b>' . $nInfo->title . '</b>'); $contents = array('form' => smn_draw_form('newsletters', FILENAME_NEWSLETTERS, 'page=' . $HTTP_GET_VARS['page'] . '&nID=' . $nInfo->newsletters_id . '&action=deleteconfirm')); $contents[] = array('text' => TEXT_INFO_DELETE_INTRO); $contents[] = array('text' => '<br><b>' . $nInfo->title . '</b>'); $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . smn_href_link(FILENAME_NEWSLETTERS, 'page=' . $HTTP_GET_VARS['page'] . '&nID=' . $HTTP_GET_VARS['nID']) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (is_object($nInfo)) { $heading[] = array('text' => '<b>' . $nInfo->title . '</b>'); if ($nInfo->locked > 0) { $contents[] = array('align' => 'center', 'text' => '<a href="' . smn_href_link(FILENAME_NEWSLETTERS, 'page=' . $HTTP_GET_VARS['page'] . '&nID=' . $nInfo->newsletters_id . '&action=new') . '">' . smn_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . smn_href_link(FILENAME_NEWSLETTERS, 'page=' . $HTTP_GET_VARS['page'] . '&nID=' . $nInfo->newsletters_id . '&action=delete') . '">' . smn_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . smn_href_link(FILENAME_NEWSLETTERS, 'page=' . $HTTP_GET_VARS['page'] . '&nID=' . $nInfo->newsletters_id . '&action=preview') . '">' . smn_image_button('button_preview.gif', IMAGE_PREVIEW) . '</a> <a href="' . smn_href_link(FILENAME_NEWSLETTERS, 'page=' . $HTTP_GET_VARS['page'] . '&nID=' . $nInfo->newsletters_id . '&action=send') . '">' . smn_image_button('button_send.gif', IMAGE_SEND) . '</a> <a href="' . smn_href_link(FILENAME_NEWSLETTERS, 'page=' . $HTTP_GET_VARS['page'] . '&nID=' . $nInfo->newsletters_id . '&action=unlock') . '">' . smn_image_button('button_unlock.gif', IMAGE_UNLOCK) . '</a>'); } else { $contents[] = array('align' => 'center', 'text' => '<a href="' . smn_href_link(FILENAME_NEWSLETTERS, 'page=' . $HTTP_GET_VARS['page'] . '&nID=' . $nInfo->newsletters_id . '&action=preview') . '">' . smn_image_button('button_preview.gif', IMAGE_PREVIEW) . '</a> <a href="' . smn_href_link(FILENAME_NEWSLETTERS, 'page=' . $HTTP_GET_VARS['page'] . '&nID=' . $nInfo->newsletters_id . '&action=lock') . '">' . smn_image_button('button_lock.gif', IMAGE_LOCK) . '</a>'); } $contents[] = array('text' => '<br>' . TEXT_NEWSLETTER_DATE_ADDED . ' ' . smn_date_short($nInfo->date_added)); if ($nInfo->status == '1') { $contents[] = array('text' => TEXT_NEWSLETTER_DATE_SENT . ' ' . smn_date_short($nInfo->date_sent)); } } break; } if (smn_not_null($heading) && smn_not_null($contents)) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box(); echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?>
echo smn_draw_textarea_field('mainpage', 'text', '80', '20', $store->get_store_description(), ''); $java_editor = 'mainpage'; ?> </td> </tr> <tr> <td><?php echo smn_draw_separator('pixel_trans.gif', '1', '10'); ?> </td> </tr> <tr> </td> <td align="left" class="main"> <?php echo smn_image_submit('button_save.gif', IMAGE_SAVE) . ' '; echo '<a href="' . smn_href_link(FILENAME_TEXT_EDITOR) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a> '; ?> </td> </tr> <tr> <td><?php echo smn_draw_separator('pixel_trans.gif', '1', '20'); ?> </td> </tr> <tr> <td align="center" class="main"><a href="http://www.systemsmanager.net"><b>Copyright © 2005 SystemsManager Technologies</b></a> </tr> </table></td> </form></tr> </table></td>
$entry = smn_db_fetch_array($entry_query); } elseif (isset($_GET['delete']) && is_numeric($_GET['delete'])) { if ($_GET['delete'] == $customer_default_address_id) { $messageStack->add_session('addressbook', WARNING_PRIMARY_ADDRESS_DELETION, 'warning'); smn_redirect(smn_href_link(FILENAME_ADDRESS_BOOK, '', 'NONSSL')); } else { $check_query = smn_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where address_book_id = '" . (int) $_GET['delete'] . "' and customers_id = '" . (int) $customer_id . "'"); $check = smn_db_fetch_array($check_query); if ($check['total'] < 1) { $messageStack->add_session('addressbook', ERROR_NONEXISTING_ADDRESS_BOOK_ENTRY); smn_redirect(smn_href_link(FILENAME_ADDRESS_BOOK, '', 'NONSSL')); } } } else { $entry = array(); } if (!isset($_GET['delete']) && !isset($_GET['edit'])) { if (smn_count_customer_address_book_entries() >= MAX_ADDRESS_BOOK_ENTRIES) { $messageStack->add_session('addressbook', ERROR_ADDRESS_BOOK_FULL); smn_redirect(smn_href_link(FILENAME_ADDRESS_BOOK, '', 'NONSSL')); } } $breadcrumb->add(NAVBAR_TITLE_1, smn_href_link(FILENAME_ACCOUNT, '', 'NONSSL')); $breadcrumb->add(NAVBAR_TITLE_2, smn_href_link(FILENAME_ADDRESS_BOOK, '', 'NONSSL')); if (isset($_GET['edit']) && is_numeric($_GET['edit'])) { $breadcrumb->add(NAVBAR_TITLE_MODIFY_ENTRY, smn_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'edit=' . $_GET['edit'], 'NONSSL')); } elseif (isset($_GET['delete']) && is_numeric($_GET['delete'])) { $breadcrumb->add(NAVBAR_TITLE_DELETE_ENTRY, smn_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'delete=' . $_GET['delete'], 'NONSSL')); } else { $breadcrumb->add(NAVBAR_TITLE_ADD_ENTRY, smn_href_link(FILENAME_ADDRESS_BOOK_PROCESS, '', 'NONSSL')); }