</table></td>
<?php 
    $heading = array();
    $contents = array();
    switch ($_GET['action']) {
        case 'confirm':
            $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_CUSTOMER . '</b>');
            $contents = array('form' => smn_draw_form('affiliate', FILENAME_AFFILIATE, smn_get_all_get_params(array('acID', 'action')) . 'acID=' . $aInfo->affiliate_id . '&action=deleteconfirm'));
            $contents[] = array('text' => TEXT_DELETE_INTRO . '<br><br><b>' . $aInfo->affiliate_firstname . ' ' . $aInfo->affiliate_lastname . '</b>');
            $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . smn_href_link(FILENAME_AFFILIATE, smn_get_all_get_params(array('acID', 'action')) . 'acID=' . $aInfo->affiliate_id) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
            break;
        default:
            if (is_object($aInfo)) {
                $heading[] = array('text' => '<b>' . $aInfo->affiliate_firstname . ' ' . $aInfo->affiliate_lastname . '</b>');
                /*Added the customer id to the url by Cimi*/
                $contents[] = array('align' => 'center', 'text' => '<a href="' . smn_href_link(FILENAME_AFFILIATE, smn_get_all_get_params(array('acID', 'action', 'cID')) . 'acID=' . $aInfo->affiliate_id . '&action=edit' . '&cID=' . $aInfo->affiliate_customer_id) . '">' . smn_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . smn_href_link(FILENAME_AFFILIATE, smn_get_all_get_params(array('acID', 'action')) . 'acID=' . $aInfo->affiliate_id . '&action=confirm') . '">' . smn_image_button('button_delete.gif', IMAGE_DELETE) . '</a> <a href="' . smn_href_link(FILENAME_AFFILIATE_CONTACT, 'selected_box=affiliate&affiliate=' . $aInfo->affiliate_email_address) . '">' . smn_image_button('button_email.gif', IMAGE_EMAIL) . '</a>');
                $affiliate_sales_raw = "select count(*) as count, sum(affiliate_value) as total, sum(affiliate_payment) as payment from " . TABLE_AFFILIATE_SALES . " a left join " . TABLE_ORDERS . " o on (a.affiliate_orders_id=o.orders_id) where o.orders_status >= " . AFFILIATE_PAYMENT_ORDER_MIN_STATUS . " and  affiliate_id = '" . $aInfo->affiliate_id . "'";
                $affiliate_sales_values = smn_db_query($affiliate_sales_raw);
                $affiliate_sales = smn_db_fetch_array($affiliate_sales_values);
                $contents[] = array('text' => '<br>' . TEXT_DATE_ACCOUNT_CREATED . ' ' . smn_date_short($aInfo->date_account_created));
                $contents[] = array('text' => '' . TEXT_DATE_ACCOUNT_LAST_MODIFIED . ' ' . smn_date_short($aInfo->date_account_last_modified));
                $contents[] = array('text' => '' . TEXT_INFO_DATE_LAST_LOGON . ' ' . smn_date_short($aInfo->date_last_logon));
                $contents[] = array('text' => '' . TEXT_INFO_NUMBER_OF_LOGONS . ' ' . $aInfo->number_of_logons);
                $contents[] = array('text' => '' . TEXT_INFO_COMMISSION . ' ' . $aInfo->affiliate_commission_percent . ' %');
                $contents[] = array('text' => '' . TEXT_INFO_COUNTRY . ' ' . $aInfo->countries_name);
                $contents[] = array('text' => '' . TEXT_INFO_NUMBER_OF_SALES . ' ' . $affiliate_sales['count'], '');
                $contents[] = array('text' => '' . TEXT_INFO_SALES_TOTAL . ' ' . $currencies->display_price($affiliate_sales['total'], ''));
                $contents[] = array('text' => '' . TEXT_INFO_AFFILIATE_TOTAL . ' ' . $currencies->display_price($affiliate_sales['payment'], ''));
            }
            break;
    }
        $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" />
	    
}
?>
        </td>
      </tr>
<?php 
if ($orders_total > 0) {
    ?>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
          <tr>
            <td class="smallText" valign="top"><?php 
    echo $history_split->display_count(TEXT_DISPLAY_NUMBER_OF_ORDERS);
    ?>
</td>
            <td class="smallText" align="right"><?php 
    echo TEXT_RESULT_PAGE . ' ' . $history_split->display_links(MAX_DISPLAY_PAGE_LINKS, smn_get_all_get_params(array('page', 'info', 'x', 'y')));
    ?>
</td>
          </tr>
        </table></td>
      </tr>
<?php 
}
?>
      <tr>
        <td><?php 
echo smn_draw_separator('pixel_trans.gif', '100%', '10');
?>
</td>
      </tr>
      <tr>
  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;
$error = false;
/*
  if ( (isset($_POST['store_category']) && empty($_POST['store_category'])) &&
       (isset($_POST['dfrom']) && (empty($_POST['dfrom']) || ($_POST['dfrom'] == DOB_FORMAT_STRING))) &&
       (isset($_POST['dto']) && (empty($_POST['dto']) || ($_POST['dto'] == DOB_FORMAT_STRING))) &&
       (isset($_POST['pfrom']) && !is_numeric($_POST['pfrom'])) &&
       (isset($_POST['pto']) && !is_numeric($_POST['pto'])) ) {
*/
//echo "store:".$_POST['store_category'].":category:".$_POST['product_category'].":descrip:".$_POST['product_description'].":<br>";
if (isset($_POST['store_category']) && $_POST['store_category'] == 0 && (isset($_POST['product_category']) && $_POST['product_category'] == 0) && (isset($_POST['product_description']) && empty($_POST['product_description']))) {
    $error = true;
    $messageStack->add_session('search', ERROR_AT_LEAST_ONE_INPUT);
} else {
}
if ($error == true) {
    smn_redirect(smn_href_link(FILENAME_ADVANCED_SEARCH, 'ID=' . $store_id . '&' . smn_get_all_get_params(), 'NONSSL', true, false));
}
$breadcrumb->add(NAVBAR_TITLE_1, smn_href_link(FILENAME_ADVANCED_SEARCH));
$breadcrumb->add(NAVBAR_TITLE_2, smn_href_link(FILENAME_ADVANCED_SEARCH_RESULT, smn_get_all_get_params(), 'NONSSL', true, false));
Example #5
0
} else {
    $featured_products_query = smn_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, s.status as specstat, s.specials_new_products_price, p.products_price, p.store_id from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c left join " . TABLE_FEATURED . " f on p.products_id = f.products_id where p.store_id = '" . $store_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . $featured_products_category_id . "' and p.products_status = '1' and f.status = '1' order by rand() DESC limit " . MAX_DISPLAY_FEATURED_PRODUCTS);
}
$count = 0;
while ($featured_products = smn_db_fetch_array($featured_products_query)) {
    if ($featured_products['specials_new_products_price']) {
        $whats_new_price = '<s>' . $currencies->display_price($featured_products['products_price'], smn_get_tax_rate($featured_products['products_tax_class_id'], '', '', $featured_products['store_id'])) . '</s><br>';
        $whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($featured_products['specials_new_products_price'], smn_get_tax_rate($featured_products['products_tax_class_id'], '', '', $featured_products['store_id'])) . '</span>';
    } else {
        $whats_new_price = $currencies->display_price($featured_products['products_price'], smn_get_tax_rate($featured_products['products_tax_class_id'], '', '', $featured_products['store_id']));
    }
    $featured_products['products_description'] = smn_get_products_description($featured_products['products_id']);
    $featured_products['products_name'] = smn_get_products_name($featured_products['products_id']);
    $store_images = 'images/' . $featured_products['store_id'] . '_images/';
    ?>
    <td width="50%">
<?php 
    $info_box_contents[] = array('align' => 'center', 'text' => '<a href="' . smn_href_link(FILENAME_PRODUCT_INFO, 'ID=' . $featured_products['store_id'] . '&products_id=' . $featured_products['products_id']) . '">' . smn_image($store_images . $featured_products['products_image'], $featured_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td><td><a href="' . smn_href_link(FILENAME_PRODUCT_INFO, 'ID=' . $featured_products['store_id'] . '&products_id=' . $featured_products['products_id']) . '"></a></td><td align="center">' . $whats_new_price . '<br><br><a href="' . smn_href_link(basename($PHP_SELF), smn_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $featured_products['products_id'], 'NONSSL') . '">' . smn_image_button('button_buy_now.gif') . '</a>&nbsp;<br></td><tr><td colspan="3" align="top" valign="top" height="100">' . osc_trunc_string(strip_tags($featured_products['products_description'])) . '<br><br><a href="' . smn_href_link(FILENAME_PRODUCT_INFO, 'ID=' . $featured_products['store_id'] . '&products_id=' . $featured_products['products_id']) . '">More Info...</a>');
    new infoBox($info_box_contents);
    $info_box_contents = array();
    $info_box_contents[] = array('align' => 'left', 'text' => ' ');
    new infoBoxDefault($info_box_contents, true, true);
    //echo '</td>';
    $count++;
    if ($count > 1) {
        $count = 0;
        echo '</tr><tr>';
    }
}
?>
<!-- default_specials_eof //-->
  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.
*/
if (isset($_GET['products_id'])) {
    $boxHeading = BOX_HEADING_NOTIFICATIONS;
    $boxLink = '<a href="' . smn_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'NONSSL') . '"><img src="images/infobox/arrow_right.gif" border="0" alt="more" title=" more " width="12" height="10"></a>';
    $box_base_name = 'product_notifications';
    $box_id = $box_base_name . 'Box';
    if (smn_session_is_registered('customer_id')) {
        $check_query = smn_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . (int) $_GET['products_id'] . "' and customers_id = '" . (int) $customer_id . "'");
        $check = smn_db_fetch_array($check_query);
        $notification_exists = $check['count'] > 0 ? true : false;
    } else {
        $notification_exists = false;
    }
    if ($notification_exists == true) {
        $boxContent = '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoBoxContents"><a href="' . smn_href_link(basename($PHP_SELF), smn_get_all_get_params(array('action')) . 'action=notify_remove', $request_type) . '">' . smn_image(DIR_WS_IMAGES . 'box_products_notifications_remove.gif', IMAGE_BUTTON_REMOVE_NOTIFICATIONS) . '</a></td><td class="infoBoxContents"><a href="' . smn_href_link(basename($PHP_SELF), smn_get_all_get_params(array('action')) . 'action=notify_remove', $request_type) . '">' . sprintf(BOX_NOTIFICATIONS_NOTIFY_REMOVE, smn_get_products_name($_GET['products_id'])) . '</a></td></tr></table>';
    } else {
        $boxContent = '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoBoxContents"><a href="' . smn_href_link(basename($PHP_SELF), smn_get_all_get_params(array('action')) . 'action=notify', $request_type) . '">' . smn_image(DIR_WS_IMAGES . 'box_products_notifications.gif', IMAGE_BUTTON_NOTIFICATIONS) . '</a></td><td class="infoBoxContents"><a href="' . smn_href_link(basename($PHP_SELF), smn_get_all_get_params(array('action')) . 'action=notify', $request_type) . '">' . sprintf(BOX_NOTIFICATIONS_NOTIFY, smn_get_products_name($_GET['products_id'])) . '</a></td></tr></table>';
    }
    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 = '';
    $boxLink = '';
}
  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 (isset($_GET['reviews_id']) && smn_not_null($_GET['reviews_id']) && isset($_GET['products_id']) && smn_not_null($_GET['products_id'])) {
    $review_check_query = smn_db_query("select count(*) as total from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.reviews_id = '" . (int) $_GET['reviews_id'] . "' and r.products_id = '" . (int) $_GET['products_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int) $languages_id . "'");
    $review_check = smn_db_fetch_array($review_check_query);
    if ($review_check['total'] < 1) {
        smn_redirect(smn_href_link(FILENAME_PRODUCT_REVIEWS, smn_get_all_get_params(array('reviews_id'))));
    }
} else {
    smn_redirect(smn_href_link(FILENAME_PRODUCT_REVIEWS, smn_get_all_get_params(array('reviews_id'))));
}
smn_db_query("update " . TABLE_REVIEWS . " set reviews_read = reviews_read+1 where reviews_id = '" . (int) $_GET['reviews_id'] . "'");
/* Changed the query to get store id from the DB by Cimi on June 08,2007*/
/*$review_query = smn_db_query("select rd.reviews_text, r.reviews_rating, r.reviews_id, r.customers_name, r.date_added, r.reviews_read, p.products_id, p.products_price, p.products_tax_class_id, p.products_image, p.products_model, pd.products_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where r.reviews_id = '" . (int)$_GET['reviews_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and r.products_id = p.products_id and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '". (int)$languages_id . "'");*/
$review_query = smn_db_query("select rd.reviews_text, r.reviews_rating, r.reviews_id, r.customers_name, r.date_added, r.reviews_read,p.store_id, p.products_id, p.products_price, p.products_tax_class_id, p.products_image, p.products_model, pd.products_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where r.reviews_id = '" . (int) $_GET['reviews_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int) $languages_id . "' and r.products_id = p.products_id and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int) $languages_id . "'");
$review = smn_db_fetch_array($review_query);
if ($new_price = smn_get_products_special_price($review['products_id'])) {
    $products_price = '<s>' . $currencies->display_price($review['products_price'], smn_get_tax_rate($review['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, smn_get_tax_rate($review['products_tax_class_id'])) . '</span>';
} else {
    $products_price = $currencies->display_price($review['products_price'], smn_get_tax_rate($review['products_tax_class_id']));
}
if (smn_not_null($review['products_model'])) {
    $products_name = $review['products_name'] . '<br><span class="smallText">[' . $review['products_model'] . ']</span>';
} else {
    $products_name = $review['products_name'];
}
$breadcrumb->add(NAVBAR_TITLE, smn_href_link(FILENAME_PRODUCT_REVIEWS, smn_get_all_get_params()));
<?php 
if (smn_not_null($product_info['products_image'])) {
    ?>
<script language="javascript"><!--
/*Commented L95 and added L96 to add the store id in the url by Cimi on June 08,2007*/
//document.write('<?php 
    //echo '<a href="javascript:popupWindow(\\\'' . smn_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . smn_image($store_images  . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>';
    ?>
');
document.write('<?php 
    echo '<a href="javascript:popupWindow(\\\'' . smn_href_link(FILENAME_POPUP_IMAGE, 'ID=' . $product_info['store_id'] . '&pID=' . $product_info['products_id']) . '\\\')">' . smn_image($store_images . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>';
    ?>
');
//--></script>
<noscript>
<?php 
    echo '<a href="' . smn_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . smn_image($store_images . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>';
    ?>
</noscript>
<?php 
}
echo '<p><a href="' . smn_href_link(basename($PHP_SELF), smn_get_all_get_params(array('action')) . 'action=buy_now') . '">' . smn_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a></p>';
?>
                </td>
              </tr>
            </table>
          </td>
        </table></td>
      </tr>
    </table></form>
Example #9
0
        $product_query = smn_db_query("select p.products_id, pd.products_name, p.products_price, s.specials_new_products_price, s.expires_date from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_id = pd.products_id and pd.language_id = '" . (int) $languages_id . "' and p.products_id = s.products_id and s.specials_id = '" . (int) $_GET['sID'] . "' and s.store_id = '" . $store_id . "'");
        $product = smn_db_fetch_array($product_query);
        $sInfo = new objectInfo($product);
    } else {
        $sInfo = new objectInfo(array());
        // create an array of products on special, which will be excluded from the pull down menu of products
        // (when creating a new product on special)
        $specials_array = array();
        $specials_query = smn_db_query("select p.products_id from " . TABLE_PRODUCTS . " p, " . TABLE_SPECIALS . " s where s.products_id = p.products_id and p.store_id = s.store_id");
        while ($specials = smn_db_fetch_array($specials_query)) {
            $specials_array[] = $specials['products_id'];
        }
    }
    ?>
      <tr><form name="new_special" <?php 
    echo 'action="' . smn_href_link(FILENAME_SPECIALS, smn_get_all_get_params(array('action', 'info', 'sID')) . 'action=' . $form_action, 'NONSSL') . '"';
    ?>
 method="post"><?php 
    if ($form_action == 'update') {
        echo smn_draw_hidden_field('specials_id', $_GET['sID']);
    }
    ?>
        <td><br><table border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><?php 
    echo TEXT_SPECIALS_PRODUCT;
    ?>
&nbsp;</td>
            <td class="main"><?php 
    echo isset($sInfo->products_name) ? $sInfo->products_name . ' <small>(' . $currencies->format($sInfo->products_price) . ')</small>' : smn_draw_products_pull_down('products_id', 'style="font-size:10px"', $specials_array);
    echo smn_draw_hidden_field('products_price', isset($sInfo->products_price) ? $sInfo->products_price : '');
}
?>
      <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_HISTORY, smn_get_all_get_params(array('order_id')), '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>
    echo SITE_THEMA;
    ?>
/infobox/background_main.gif" width="100%" class="infoBoxHeading"><?php 
    echo $default_specials['products_name'];
    ?>
                        </td>
                        <td class="infoBoxHeading" nowrap>
                        <img src="includes/classes/thema/<?php 
    echo SITE_THEMA;
    ?>
/infobox/corner_right_left.gif" border="0" ></td>
                      </tr>
                    </table>
<?php 
    $default_specials['products_description'] = smn_get_products_description($default_specials['products_id']);
    $default_specials['products_name'] = smn_get_products_name($default_specials['products_id']);
    $info_box_contents[] = array('align' => 'center', 'text' => '<a href="' . smn_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $default_specials['products_id'] . '&ID=' . $default_specials['store_id']) . '">' . smn_image(DIR_WS_CATALOG_IMAGES . $default_specials['products_image'], $default_specials['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td><td><a href="' . smn_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $default_specials['products_id']) . '"></a></td><td align="center"><s>' . $currencies->display_price($default_specials['products_price'], smn_get_tax_rate($default_specials['products_tax_class_id'], '', '', $default_specials['store_id'])) . '</s><br><span class="productSpecialPrice">' . $currencies->display_price($default_specials['specials_new_products_price'], smn_get_tax_rate($default_specials['products_tax_class_id'], '', '', $default_specials['store_id'])) . '</span><br><br><a href="' . smn_href_link(basename($PHP_SELF), smn_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $default_specials['products_id'], 'NONSSL') . '">' . smn_image_button('button_buy_now.gif') . '</a>&nbsp;<br></td><tr><td colspan="3" align="top" valign="top" height="100">' . osc_trunc_string(strip_tags($default_specials['products_description'])) . '<br><br><a href="' . smn_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $default_specials['products_id']) . '">More Info...</a>
    ');
    new infoBox($info_box_contents);
    $info_box_contents = array();
    $info_box_contents[] = array('align' => 'left', 'text' => ' ');
    new infoBoxDefault($info_box_contents, true, true);
    $count++;
    if ($count > 1) {
        $count = 0;
        echo '</tr><tr>';
    }
}
?>
</tr></table></td></tr>
<!-- default_specials_eof //-->
    ?>
          <tr class="dataTableRowSelected">
            <td colspan="7" class="smallText"><?php 
    echo TEXT_NO_SALES;
    ?>
</td>
          </tr>
<?php 
}
if ($affiliate_sales_numrows > 0 && (PREV_NEXT_BAR_LOCATION == '2' || PREV_NEXT_BAR_LOCATION == '3')) {
    ?>
          <tr>
            <td colspan="7"><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td class="smallText" valign="top"><?php 
    echo $affiliate_sales_split->display_count($affiliate_sales_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_SALES);
    ?>
</td>
                <td class="smallText" align="right"><?php 
    echo $affiliate_sales_split->display_links($affiliate_sales_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], smn_get_all_get_params(array('page', 'info', 'x', 'y')));
    ?>
</td>
              </tr>
            </table></td>
          </tr>
<?php 
}
?>
        </table></td>
      </tr>
    </table>
  to obtain it through the world-wide-web, please send a note to    
  license@systemsmanager.net so we can mail you a copy immediately.
*/
?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
      <tr>
        <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading"><?php 
echo HEADING_TITLE;
?>
</td>
          </tr>
          <tr>
            <td align="right"><?php 
echo '<a href="' . smn_href_link(FILENAME_AFFILIATE, smn_get_all_get_params(array('action'))) . '">' . smn_image_button('button_back.gif', IMAGE_BACK) . '</a>';
?>
</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr class="dataTableHeadingRow">
                <td class="dataTableHeadingContent"><?php 
echo TEXT_SUMMARY_TITLE;
?>
</td>
              </tr>
        case 'PRODUCT_LIST_IMAGE':
            $order_str .= "pd.products_name";
            break;
        case 'PRODUCT_LIST_WEIGHT':
            $order_str .= "p.products_weight " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name";
            break;
        case 'PRODUCT_LIST_PRICE':
            $order_str .= "final_price " . ($sort_order == 'd' ? "desc" : "") . ", pd.products_name";
            break;
    }
}
$listing_sql = $select_str . $from_str . $where_str . $order_str;
//echo $listing_sql;
require DIR_WS_MODULES . FILENAME_PRODUCT_LISTING;
?>
        </td>
      </tr>
      <tr>
        <td><?php 
echo smn_draw_separator('pixel_trans.gif', '100%', '10');
?>
</td>
      </tr>
      <tr>
        <td class="main"><?php 
echo '<a href="' . smn_href_link(FILENAME_ADVANCED_SEARCH, smn_get_all_get_params(array('sort', 'page')), 'NONSSL', true, false) . '">' . smn_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>';
?>
</td>
      </tr>
    </table>
        }
        ?>
  <tr>
    <td width="<?php 
        echo SMALL_IMAGE_WIDTH + 10;
        ?>
" valign="top" class="main"><?php 
        echo '<a href="' . smn_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new_array[$i]['id'] . '&ID=' . $products_new_array[$i]['store_id']) . '">' . smn_image($store_images . $products_new_array[$i]['image'], $products_new_array[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';
        ?>
</td>
    <td valign="top" class="main"><?php 
        echo '<a href="' . smn_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_new_array[$i]['id'] . '&ID=' . $products_new_array[$i]['store_id']) . '"><b><u>' . $products_new_array[$i]['name'] . '</u></b></a><br>' . TEXT_DATE_ADDED . ' ' . $products_new_array[$i]['date_added'] . '<br>' . TEXT_MANUFACTURER . ' ' . $products_new_array[$i]['manufacturer'] . '<br><br>' . TEXT_PRICE . ' ' . $products_price;
        ?>
</td>
    <td align="right" valign="middle" class="main"><?php 
        echo '<a href="' . smn_href_link(FILENAME_PRODUCTS_NEW, smn_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $products_new_array[$i]['id'] . '&ID=' . $products_new_array[$i]['store_id']) . '">' . smn_image_button('button_in_cart.gif', IMAGE_BUTTON_IN_CART) . '</a>';
        ?>
</td>
  </tr>
<?php 
        if ($i + 1 != $n) {
            ?>
  <tr>
    <td colspan="3" class="main">&nbsp;</td>
  </tr>
<?php 
        }
    }
}
?>
</table>
                }
                smn_redirect(smn_href_link(basename($PHP_SELF), smn_get_all_get_params(array('action'))));
            } else {
                $navigation->set_snapshot();
                smn_redirect(smn_href_link(FILENAME_LOGIN, '', 'NONSSL'));
            }
            break;
        case 'cust_order':
            if ($store_registered && (smn_session_is_registered('customer_id') && isset($_GET['pid']))) {
                if (smn_has_product_attributes($_GET['pid'])) {
                    smn_redirect(smn_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $_GET['pid']));
                } else {
                    $cart->add_cart($_GET['pid'], $cart->get_quantity($_GET['pid']) + 1);
                }
            }
            smn_redirect(smn_href_link($goto, smn_get_all_get_params($parameters)));
            break;
    }
}
// infobox
require DIR_WS_CLASSES . 'boxes.php';
// include the who's online functions
require DIR_WS_FUNCTIONS . 'whos_online.php';
smn_update_whos_online();
// split-page-results
require DIR_WS_CLASSES . 'split_page_results.php';
//set the layout for the the template system.....
require DIR_WS_CLASSES . 'template_setup.php';
$store_layout = new template_setup();
$store_layout->smn_set_template();
// auto activate and expire banners
          <tr>
            <td align="right" colspan="8"><table border="0" cellspacing="0" cellpadding="2">
<?php
    for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
      echo '              <tr>' . "\n" .
           '                <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" .
           '                <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" .
           '              </tr>' . "\n";
    }
?>
            </table></td>
          </tr>
        </table></td>
      </tr>
	<tr class="infoBoxContents"><td><?=ORDER_DELETE_DESCRIPTION?></td></tr> 
	<tr class="infoBoxContents"><?php echo smn_draw_form('order_delete', smn_href_link(FILENAME_STORE_ORDER_EDIT,  smn_get_all_get_params(array('action')) . 'action=deleteconfirm&ID='.$store_id,'NONSSL'),'POST'); ?>
        <td><?php echo smn_draw_checkbox_field('restock') . ' ' . TEXT_INFO_RESTOCK_PRODUCT_QUANTITY; ?></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_STORE_ORDER_TOOL, 'ID='.$store_id, 'NONSSL') . '">' . smn_image_button('small_back.gif', IMAGE_small_back) . '</a>'; ?></td>
                <td valign="top"><?php echo smn_image_submit('button_delete.gif', IMAGE_DELETE); ?></td>
                <td width="10"><?php echo smn_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
              </tr>
            </table></td>
          </tr>
Example #18
0
<?php

/*
  $Id: lang.php,v 1  December 13, 2003
  
  developed for
  osCommerce, Open Source E-Commerce Solutions
  http://www.com-host.com

  Copyright (c) 2003 http://www.com-host.com

Supported by osCommerce  

  Released under the GNU General Public License
*/
if (!isset($lng) || isset($lng) && !is_object($lng)) {
    include DIR_WS_CLASSES . 'language.php';
    $lng = new language();
}
$languages_string = '';
reset($lng->catalog_languages);
while (list($key, $value) = each($lng->catalog_languages)) {
    $languages_string .= ' <a href="' . smn_href_link(basename($PHP_SELF), smn_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . smn_image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a> ';
}
$info_box_contents = array();
$info_box_contents[] = array('align' => 'center', 'valign' => 'bottom', 'text' => $languages_string);
new LangBox($info_box_contents);
Example #19
0
            $out_status = true;
            break;
        case '1':
        default:
            $in_status = true;
            $out_status = false;
    }
    /* Setup Tabs - BEGIN */
    $jQuery->setGlobalVars(array('languages', 'languages_id', 'store_id', 'pInfo', 'product', 'tax_class_array', 'store', 'product_title', 'products_name', 'products_info', 'products_description', 'products_url', 'products_seo_url', 'products_duration_values', 'products_duration_text', 'product_type', 'manufacturers_array', 'in_status', 'out_status', 'in_listing_status', 'out_listing_status', 'submitButton', 'backButton'));
    $tabsArray = array();
    $tabsArray[] = array('tabID' => 'tab-name', 'filename' => 'tab_name.php', 'text' => 'Name');
    $tabsArray[] = array('tabID' => 'tab-price', 'filename' => 'tab_price.php', 'text' => 'Price');
    $tabsArray[] = array('tabID' => 'tab-description', 'filename' => 'tab_description.php', 'text' => 'Description');
    $tabsArray[] = array('tabID' => 'tab-image', 'filename' => 'tab_image.php', 'text' => 'Image');
    $submitButton = $jQuery->getPluginClass('button', array('id' => 'previewButton', 'text' => 'Preview Product', 'type' => 'submit'));
    $backButton = $jQuery->getPluginClass('button', array('id' => 'backButton', 'text' => IMAGE_BACK, 'href' => $jQuery->link(FILENAME_CATEGORIES, smn_get_all_get_params(array('action')))));
    $helpButton = $jQuery->getPluginClass('button', array('id' => 'helpButton', 'text' => 'Help'));
    $tabPanel = $jQuery->getPluginClass('tabs', array('id' => 'initialPane', 'tabDir' => DIR_FS_CATALOG . 'includes/modules/pages_tabs/categories/', 'tabs' => $tabsArray, 'footerButtons' => array($submitButton, $backButton, $helpButton), 'showFooter' => true));
    $tabPanel->setHelpButton('helpButton', true);
    ?>
<script language="Javascript">
 $(document).ready(function (){
<?php 
    echo $jQuery->getScriptOutput();
    ?>
 });
</script>
<form id="form-new_product" action="<?php 
    echo smn_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '') . '&action=new_product_preview');
    ?>
" method="post" enctype="multipart/form-data">
    $orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . $languages_id . "' and s.orders_status_id = '" . smn_db_input($status) . "' and ot.class = 'ot_total' order by o.orders_id DESC";
} else {
    $orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . $languages_id . "' and ot.class = 'ot_total' order by o.orders_id DESC";
}
$orders_query = smn_db_query($orders_query_raw);
$row = 0;
while ($orders = smn_db_fetch_array($orders_query)) {
    if ($row % 2 == 0) {
        echo '<tr class="dataTableRow">';
    } else {
        '<tr class="dataTableRowSelected">';
    }
    ?>
              
                <td class="dataTableContent"><?php 
    echo '<a href="' . smn_href_link(FILENAME_ORDERS, smn_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders['orders_id'] . '&action=edit') . '">' . smn_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a>&nbsp;' . $orders['customers_name'];
    ?>
</td>
                <td class="dataTableContent" align="right"><?php 
    echo strip_tags($orders['order_total']);
    ?>
</td>
                <td class="dataTableContent" align="center"><?php 
    echo smn_datetime_short($orders['date_purchased']);
    ?>
</td>
                <td class="dataTableContent" align="right"><?php 
    echo $orders['orders_status_name'];
    ?>
</td>
<?php 
      </tr>
      <tr>
        <td>
          <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<!-- list of products -->
<?php 
        while ($downloads_values = smn_db_fetch_array($downloads_query)) {
            list($dt_year, $dt_month, $dt_day) = explode('-', $downloads_values['date_purchased_day']);
            $download_timestamp = mktime(23, 59, 59, $dt_month, $dt_day + $downloads_values['download_maxdays'], $dt_year);
            $download_expiry = date('Y-m-d H:i:s', $download_timestamp);
            if ($downloads_values['download_count'] > 0 && file_exists(DIR_FS_DOWNLOAD . $downloads_values['orders_products_filename']) && ($downloads_values['download_maxdays'] == 0 || $download_timestamp > time())) {
                $n = $n + 1;
                echo '			  <tr class="infoBoxContents">' . "\n";
                echo '            <td align="left">#' . $n . '</td>' . "\n";
                echo '            <td align="left">' . smn_image_button("button_archive.gif", 'Archive', 'onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . smn_href_link('download_files.php', smn_get_all_get_params(array('dID', 'action')) . 'action=archive' . '&aID=' . $downloads_values['orders_products_download_id'] . '\'"')) . '</td>' . "\n";
                echo '            <td><a href="' . smn_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $downloads_values['products_id'], 'NONSSL') . '">' . $downloads_values['products_name'] . '</a></td>' . "\n";
                echo '            <td><a href="' . smn_href_link(FILENAME_DOWNLOAD, 'order=' . $downloads_values['orders_id'] . '&id=' . $downloads_values['orders_products_download_id']) . '">' . $downloads_values['orders_products_filename'] . '</a></td>' . "\n";
                echo '            <td>' . TABLE_HEADING_DOWNLOAD_DATE . smn_date_long($download_expiry) . '</td>' . "\n";
                echo '            <td align="right">' . $downloads_values['download_count'] . TABLE_HEADING_DOWNLOAD_COUNT . '</td>' . "\n";
                echo '          </tr>' . "\n";
            }
        }
        ?>
            </tr>
          </table>
        </td>
      </tr>
<?php 
        if (!strstr($PHP_SELF, FILENAME_ACCOUNT_HISTORY_INFO)) {
            ?>
        <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 class="main"><?php 
    echo '<a href="' . smn_href_link(FILENAME_PRODUCT_REVIEWS, smn_get_all_get_params()) . '">' . smn_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>';
    ?>
</td>
<?php 
    if ($product_master['product_master_status'] != 1) {
        ?>
 
                <td class="main" align="right"><?php 
        echo smn_draw_hidden_field('products_id', $product_info['products_id']) . smn_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART);
        ?>
</td></form>
<?php 
    }
    ?>
 
                <td width="10"><?php 
    }
} else {
    ?>
              <tr class="productListing-odd">
                <td colspan="7" class="smallText"><?php 
    echo TEXT_NO_CLICKS;
    ?>
</td>
              </tr>
<?php 
}
?>
              <tr>
                <td class="smallText" colspan="7"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                  <tr>
                    <td class="smallText" valign="top"><?php 
echo $affiliate_clickthroughs_split->display_count($affiliate_clickthroughs_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_CLICKS);
?>
</td>
                    <td class="smallText" align="right"><?php 
echo $affiliate_clickthroughs_split->display_links($affiliate_clickthroughs_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], smn_get_all_get_params(array('page', 'oID', 'action')));
?>
</td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
    </table>
Example #24
0
                    $customer_notified = '1';
                }
                smn_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) values ('" . (int) $oID . "', '" . smn_db_input($status) . "', now(), '" . smn_db_input($customer_notified) . "', '" . smn_db_input($comments) . "')");
                $order_updated = true;
            }
            if ($order_updated == true) {
                $messageStack->add_session(SUCCESS_ORDER_UPDATED, 'success');
            } else {
                $messageStack->add_session(WARNING_ORDER_NOT_UPDATED, 'warning');
            }
            smn_redirect(smn_href_link(FILENAME_ORDERS, smn_get_all_get_params(array('action')) . 'action=edit'));
            break;
        case 'deleteconfirm':
            $oID = smn_db_prepare_input($_GET['oID']);
            smn_remove_order($oID, $_POST['restock']);
            smn_redirect(smn_href_link(FILENAME_ORDERS, smn_get_all_get_params(array('oID', 'action'))));
            break;
    }
}
if ($action == 'edit' && isset($_GET['oID'])) {
    $oID = smn_db_prepare_input($_GET['oID']);
    $orders_query = smn_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int) $oID . "'");
    $order_exists = true;
    if (!smn_db_num_rows($orders_query)) {
        $order_exists = false;
        $messageStack->add(sprintf(ERROR_ORDER_DOES_NOT_EXIST, $oID), 'error');
    }
}
include DIR_WS_CLASSES . 'order.php';
$content_page = basename($_SERVER['PHP_SELF']);
require 'templates/default/layout.php';
            <td class="pageHeading" align="right"><?php 
echo smn_image(DIR_WS_IMAGES . 'table_background_account.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT);
?>
</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php 
echo smn_draw_separator('pixel_trans.gif', '100%', '10');
?>
</td>
      </tr>
      <tr>
        <td class="smallText"><br><?php 
echo sprintf(TEXT_ORIGIN_LOGIN, smn_href_link(FILENAME_LOGIN, smn_get_all_get_params(), 'NONSSL'));
?>
</td>
      </tr>
      <tr>
        <td><?php 
echo smn_draw_separator('pixel_trans.gif', '100%', '10');
?>
</td>
      </tr>
<?php 
if ($messageStack->size('create_account') > 0) {
    ?>
      <tr>
        <td><?php 
    echo $messageStack->output('create_account');
Example #26
0
            }
            break;
        case 'deleteconfirm':
            $customers_id = smn_db_prepare_input($_GET['cID']);
            if (isset($_POST['delete_reviews']) && $_POST['delete_reviews'] == 'on') {
                $reviews_query = smn_db_query("select reviews_id from " . TABLE_REVIEWS . " where customers_id = '" . (int) $customers_id . "'");
                while ($reviews = smn_db_fetch_array($reviews_query)) {
                    smn_db_query("delete from " . TABLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . (int) $reviews['reviews_id'] . "'");
                }
                smn_db_query("delete from " . TABLE_REVIEWS . " where customers_id = '" . (int) $customers_id . "'");
            } else {
                smn_db_query("update " . TABLE_REVIEWS . " set customers_id = null where customers_id = '" . (int) $customers_id . "'");
            }
            smn_db_query("delete from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int) $customers_id . "'");
            smn_db_query("delete from " . TABLE_CUSTOMERS . " where customers_id = '" . (int) $customers_id . "'");
            smn_db_query("delete from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int) $customers_id . "'");
            smn_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int) $customers_id . "'");
            smn_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int) $customers_id . "'");
            smn_db_query("delete from " . TABLE_WHOS_ONLINE . " where customer_id = '" . (int) $customers_id . "'");
            smn_db_query("delete from " . TABLE_PRODUCTS_NOTIFICATIONS . " where customers_id = '" . (int) $customers_id . "'");
            smn_redirect(smn_href_link(FILENAME_CUSTOMERS, smn_get_all_get_params(array('cID', 'action'))));
            break;
        default:
            $customers_query = smn_db_query("select c.customers_id, c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, a.entry_company, a.entry_street_address, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, c.customers_newsletter, c.customers_default_address_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '" . (int) $_GET['cID'] . "'");
            $customers = smn_db_fetch_array($customers_query);
            $cInfo = new objectInfo($customers);
    }
}
$content_page = basename($_SERVER['PHP_SELF']);
require 'templates/default/layout.php';
require DIR_WS_INCLUDES . 'application_bottom.php';
Example #27
0
echo TABLE_HEADING_ACTION;
?>
&nbsp;</td>
              </tr>
<?php 
$gv_query_raw = "select c.coupon_amount, c.coupon_code, c.coupon_id, et.sent_firstname, et.sent_lastname, et.customer_id_sent, et.emailed_to, et.date_sent, c.coupon_id from " . TABLE_COUPONS . " c, " . TABLE_COUPON_EMAIL_TRACK . " et where c.store_id = et.store_id and c.coupon_id = et.coupon_id";
$gv_query = smn_db_query($gv_query_raw);
$gv_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $gv_query_raw, $gv_query_numrows);
while ($gv_list = smn_db_fetch_array($gv_query)) {
    if ((!$_GET['gid'] || @$_GET['gid'] == $gv_list['coupon_id']) && !$gInfo) {
        $gInfo = new objectInfo($gv_list);
    }
    if (is_object($gInfo) && $gv_list['coupon_id'] == $gInfo->coupon_id) {
        echo '              <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . smn_href_link('gv_sent.php', smn_get_all_get_params(array('gid', 'action')) . 'gid=' . $gInfo->coupon_id . '&action=edit') . '\'">' . "\n";
    } else {
        echo '              <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . smn_href_link('gv_sent.php', smn_get_all_get_params(array('gid', 'action')) . 'gid=' . $gv_list['coupon_id']) . '\'">' . "\n";
    }
    ?>
                <td class="dataTableContent"><?php 
    echo $gv_list['sent_firstname'] . ' ' . $gv_list['sent_lastname'];
    ?>
</td>
                <td class="dataTableContent" align="center"><?php 
    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 
Example #28
0
function smn_create_sort_heading($sortby, $colnum, $heading)
{
    global $PHP_SELF;
    $sort_prefix = '';
    $sort_suffix = '';
    if ($sortby) {
        $sort_prefix = '<a href="' . smn_href_link(basename($PHP_SELF), smn_get_all_get_params(array('page', 'info', 'sort')) . 'page=1&sort=' . $colnum . ($sortby == $colnum . 'a' ? 'd' : 'a')) . '" title="' . smn_output_string(TEXT_SORT_PRODUCTS . ($sortby == $colnum . 'd' || substr($sortby, 0, 1) != $colnum ? TEXT_ASCENDINGLY : TEXT_DESCENDINGLY) . TEXT_BY . $heading) . '" class="productListing-heading">';
        $sort_suffix = (substr($sortby, 0, 1) == $colnum ? substr($sortby, 1, 1) == 'a' ? '+' : '-' : '') . '</a>';
    }
    return $sort_prefix . $heading . $sort_suffix;
}
                $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';
Example #30
0
            </table></td>
<?php 
    $heading = array();
    $contents = array();
    switch ($action) {
        case 'delete':
            $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_ORDER . '</b>');
            $contents = array('form' => smn_draw_form('orders', FILENAME_ORDERS, smn_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=deleteconfirm'));
            $contents[] = array('text' => TEXT_INFO_DELETE_INTRO . '<br><br><b>' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '</b>');
            $contents[] = array('text' => '<br>' . smn_draw_checkbox_field('restock') . ' ' . TEXT_INFO_RESTOCK_PRODUCT_QUANTITY);
            $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . smn_href_link(FILENAME_ORDERS, smn_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
            break;
        default:
            if (isset($oInfo) && is_object($oInfo)) {
                $heading[] = array('text' => '<b>[' . $oInfo->orders_id . ']&nbsp;&nbsp;' . smn_datetime_short($oInfo->date_purchased) . '</b>');
                $contents[] = array('align' => 'center', 'text' => '<a href="' . smn_href_link(FILENAME_ORDERS, smn_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '">' . smn_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . smn_href_link(FILENAME_ORDERS, smn_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=delete') . '">' . smn_image_button('button_delete.gif', IMAGE_DELETE) . '</a>');
                $contents[] = array('align' => 'center', 'text' => '<a href="' . smn_href_link(FILENAME_ORDERS_INVOICE, 'oID=' . $oInfo->orders_id) . '" TARGET="_blank">' . smn_image_button('button_invoice.gif', IMAGE_ORDERS_INVOICE) . '</a> <a href="' . smn_href_link(FILENAME_ORDERS_PACKINGSLIP, 'oID=' . $oInfo->orders_id) . '" TARGET="_blank">' . smn_image_button('button_packingslip.gif', IMAGE_ORDERS_PACKINGSLIP) . '</a>');
                $contents[] = array('text' => '<br>' . TEXT_DATE_ORDER_CREATED . ' ' . smn_date_short($oInfo->date_purchased));
                if (smn_not_null($oInfo->last_modified)) {
                    $contents[] = array('text' => TEXT_DATE_ORDER_LAST_MODIFIED . ' ' . smn_date_short($oInfo->last_modified));
                }
                $contents[] = array('text' => '<br>' . TEXT_INFO_PAYMENT_METHOD . ' ' . $oInfo->payment_method);
            }
            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";
    }