Exemple #1
0
 function quote($method = '')
 {
     global $order, $cart, $shipping_weight, $shipping_num_boxes, $store_id;
     if (MODULE_SHIPPING_TABLE_MODE == 'price') {
         $order_total = $cart->show_total($store_id);
     } else {
         $order_total = $shipping_weight;
     }
     $table_cost = split("[:,]", MODULE_SHIPPING_TABLE_COST);
     $size = sizeof($table_cost);
     for ($i = 0, $n = $size; $i < $n; $i += 2) {
         if ($order_total <= $table_cost[$i]) {
             $shipping = $table_cost[$i + 1];
             break;
         }
     }
     if (MODULE_SHIPPING_TABLE_MODE == 'weight') {
         $shipping = $shipping * $shipping_num_boxes;
     }
     $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_TABLE_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_TABLE_TEXT_WAY, 'cost' => $shipping + MODULE_SHIPPING_TABLE_HANDLING)));
     if ($this->tax_class > 0) {
         $this->quotes['tax'] = smn_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
     }
     if (smn_not_null($this->icon)) {
         $this->quotes['icon'] = smn_image($this->icon, $this->title);
     }
     return $this->quotes;
 }
 function quote($method = '')
 {
     global $order;
     $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_FREESHIPPER_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => '<FONT COLOR=FF0000><B>' . MODULE_SHIPPING_FREESHIPPER_TEXT_WAY . '</B></FONT>', 'cost' => SHIPPING_HANDLING + MODULE_SHIPPING_FREESHIPPER_COST)));
     if ($this->tax_class > 0) {
         $this->quotes['tax'] = smn_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
     }
     if (smn_not_null($this->icon)) {
         $this->quotes['icon'] = smn_image($this->icon, $this->title);
     }
     return $this->quotes;
 }
Exemple #3
0
 function quote($method = '')
 {
     global $order;
     $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_PICK_UP_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_PICK_UP_TEXT_WAY, 'cost' => MODULE_SHIPPING_PICK_UP_COST)));
     if ($this->tax_class > 0) {
         $this->quotes['tax'] = smn_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
     }
     if (smn_not_null($this->icon)) {
         $this->quotes['icon'] = smn_image($this->icon, $this->title);
     }
     return $this->quotes;
 }
 function add($class, $message, $type = 'error')
 {
     if ($type == 'error') {
         $this->messages[] = array('params' => 'class="messageStackError"', 'class' => $class, 'text' => smn_image(DIR_WS_ICONS . 'error.gif', ICON_ERROR) . '&nbsp;' . $message);
     } elseif ($type == 'warning') {
         $this->messages[] = array('params' => 'class="messageStackWarning"', 'class' => $class, 'text' => smn_image(DIR_WS_ICONS . 'warning.gif', ICON_WARNING) . '&nbsp;' . $message);
     } elseif ($type == 'success') {
         $this->messages[] = array('params' => 'class="messageStackSuccess"', 'class' => $class, 'text' => smn_image(DIR_WS_ICONS . 'success.gif', ICON_SUCCESS) . '&nbsp;' . $message);
     } else {
         $this->messages[] = array('params' => 'class="messageStackError"', 'class' => $class, 'text' => $message);
     }
 }
 function quote($method = '')
 {
     global $order, $cart, $shipping_weight;
     $dest_country = $order->delivery['country']['id'];
     $currency = $order->info['currency'];
     if ($shipping_weight > MODULE_SHIPPING_FREEAMOUNT_WEIGHT_MAX) {
         $this->quotes['error'] = MODULE_SHIPPING_FREEAMOUNT_TEXT_TO_HEIGHT . ' (' . $shipping_weight . ') ' . MODULE_SHIPPING_FREEAMOUNT_TEXT_UNIT;
     }
     if ($cart->show_total() < MODULE_SHIPPING_FREEAMOUNT_AMOUNT) {
         if (MODULE_SHIPPING_FREEAMOUNT_DISPLAY == 'False') {
             return;
         } else {
             $this->quotes['error'] = MODULE_SHIPPING_FREEAMOUNT_TEXT_ERROR;
         }
     } else {
         $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_FREEAMOUNT_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_FREEAMOUNT_TEXT_WAY, 'cost' => MODULE_SHIPPING_FREEAMOUNT_COST)));
     }
     if (smn_not_null($this->icon)) {
         $this->quotes['icon'] = smn_image($this->icon, $this->title);
     }
     return $this->quotes;
 }
function smn_image_button($image, $alt = '', $params = '')
{
    global $language;
    return smn_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $params);
}
        $info_box_contents[] = array('align' => 'left', 'text' => TEXT_XSELL_PRODUCTS);
        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 //-->

        }
        ?>
</td>
                <td class="dataTableContent" align="center"><?php 
        if ($newsletters['locked'] > 0) {
            echo smn_image(DIR_WS_ICONS . 'locked.gif', ICON_LOCKED);
        } else {
            echo smn_image(DIR_WS_ICONS . 'unlocked.gif', ICON_UNLOCKED);
        }
        ?>
</td>
                <td class="dataTableContent" align="right"><?php 
        if (isset($nInfo) && is_object($nInfo) && $newsletters['newsletters_id'] == $nInfo->newsletters_id) {
            echo smn_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', '');
        } else {
            echo '<a href="' . smn_href_link(FILENAME_NEWSLETTERS, 'page=' . $HTTP_GET_VARS['page'] . '&nID=' . $newsletters['newsletters_id']) . '">' . smn_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>';
        }
        ?>
&nbsp;</td>
              </tr>
<?php 
    }
    ?>
              <tr>
                <td colspan="6"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                  <tr>
                    <td class="smallText" valign="top"><?php 
    echo $newsletters_split->display_count($newsletters_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_NEWSLETTERS);
    ?>
</td>
                    <td class="smallText" align="right"><?php 
*/
?>
  
     <?php 
echo smn_draw_form('password_forgotten', smn_href_link(FILENAME_PASSWORD_FORGOTTEN, 'action=process', 'NONSSL'));
?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading"><?php 
echo HEADING_TITLE;
?>
</td>
            <td class="pageHeading" align="right"><?php 
echo smn_image(DIR_WS_IMAGES . 'table_background_password_forgotten.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>
<?php 
if ($messageStack->size('password_forgotten') > 0) {
    ?>
      <tr>
    }
    if (isset($tcInfo) && is_object($tcInfo) && $classes['tax_class_id'] == $tcInfo->tax_class_id) {
        echo '              <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . smn_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tcInfo->tax_class_id . '&action=edit') . '\'">' . "\n";
    } else {
        echo '              <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . smn_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $classes['tax_class_id']) . '\'">' . "\n";
    }
    ?>
                <td class="dataTableContent"><?php 
    echo $classes['tax_class_title'];
    ?>
</td>
                <td class="dataTableContent" align="right"><?php 
    if (isset($tcInfo) && is_object($tcInfo) && $classes['tax_class_id'] == $tcInfo->tax_class_id) {
        echo smn_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', '');
    } else {
        echo '<a href="' . smn_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $classes['tax_class_id']) . '">' . smn_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>';
    }
    ?>
&nbsp;</td>
              </tr>
<?php 
}
?>
              <tr>
                <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                  <tr>
                    <td class="smallText" valign="top"><?php 
echo $classes_split->display_count($classes_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_TAX_CLASSES);
?>
</td>
                    <td class="smallText" align="right"><?php 
<?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>
            <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
              <tr>
                <td width="50%" align="right"><?php 
echo smn_image(DIR_WS_IMAGES . 'checkout_bullet.gif');
?>
</td>
                <td width="50%"><?php 
echo smn_draw_separator('pixel_silver.gif', '100%', '1');
?>
</td>
              </tr>
            </table></td>
            <td width="25%"><?php 
echo smn_draw_separator('pixel_silver.gif', '100%', '1');
?>
</td>
            <td width="25%"><?php 
echo smn_draw_separator('pixel_silver.gif', '100%', '1');
?>
Exemple #12
0
$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);
$heading = array();
$contents = array();
$heading[] = array('params' => 'class="menuBoxHeading"', 'text' => BOX_TITLE_STATISTICS);
$contents[] = array('params' => 'class="infoBox"', 'text' => BOX_ENTRY_CUSTOMERS . ' ' . $customers['count'] . '<br>' . BOX_ENTRY_PRODUCTS . ' ' . $products['count'] . '<br>' . BOX_ENTRY_REVIEWS . ' ' . $reviews['count']);
$box = new box();
echo $box->menuBox($heading, $contents);
echo '<br>';
$contents = array();
if (getenv('HTTPS') == 'on') {
    $size = getenv('SSL_CIPHER_ALGKEYSIZE') ? getenv('SSL_CIPHER_ALGKEYSIZE') . '-bit' : '<i>' . BOX_CONNECTION_UNKNOWN . '</i>';
    $contents[] = array('params' => 'class="infoBox"', 'text' => smn_image(DIR_WS_ICONS . 'locked.gif', ICON_LOCKED, '', '', 'align="right"') . sprintf(BOX_CONNECTION_PROTECTED, $size));
} else {
    $contents[] = array('params' => 'class="infoBox"', 'text' => smn_image(DIR_WS_ICONS . 'unlocked.gif', ICON_UNLOCKED, '', '', 'align="right"') . BOX_CONNECTION_UNPROTECTED);
}
$box = new box();
echo $box->tableBlock($contents);
?>
                    </td>
                  </tr>
                </table></td>
                <td width="460"><table border="0" width="460" height="390" cellspacing="0" cellpadding="2">
                  <tr>
                    <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                      <tr><?php 
echo smn_draw_form('languages', 'index.php', '', 'get');
?>
                        <td class="heading"><?php 
echo HEADING_TITLE;
Exemple #13
0
         $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";
     $box = new box();
     echo $box->infoBox($heading, $contents);
     echo '            </td>' . "\n";
 }
 ?>
       </tr>
     </table></td>
} 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 //-->
             $products[$i][$option]['options_values_id'] = $value;
             $products[$i][$option]['products_options_values_name'] = $attributes_values['products_options_values_name'];
             $products[$i][$option]['options_values_price'] = $attributes_values['options_values_price'];
             $products[$i][$option]['price_prefix'] = $attributes_values['price_prefix'];
         }
     }
 }
 for ($i = 0, $n = sizeof($products); $i < $n; $i++) {
     if ($i / 2 == floor($i / 2)) {
         $info_box_contents[] = array('params' => 'class="productListing-even"');
     } else {
         $info_box_contents[] = array('params' => 'class="productListing-odd"');
     }
     $cur_row = sizeof($info_box_contents) - 1;
     $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => smn_draw_checkbox_field('cart_delete[]', $products[$i]['id']));
     $products_name = '<table border="0" cellspacing="2" cellpadding="2">' . '  <tr>' . '    <td class="productListing-data" align="center"><a href="' . smn_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . smn_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' . '    <td class="productListing-data" valign="top"><a href="' . smn_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>';
     if (STOCK_CHECK == 'true') {
         $stock_check = smn_check_stock($products[$i]['id'], $products[$i]['quantity']);
         if (smn_not_null($stock_check)) {
             $any_out_of_stock = 1;
             $products_name .= $stock_check;
         }
     }
     if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
         reset($products[$i]['attributes']);
         while (list($option, $value) = each($products[$i]['attributes'])) {
             $products_name .= '<br><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>';
         }
     }
     $products_name .= '    </td>' . '  </tr>' . '</table>';
     $info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"', 'text' => $products_name);
Exemple #16
0
function smn_display_banner($action, $identifier)
{
    if ($action == 'dynamic') {
        $banners_query = smn_db_query("select count(*) as count from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . $identifier . "'");
        $banners = smn_db_fetch_array($banners_query);
        if ($banners['count'] > 0) {
            $banner = smn_random_select("select banners_group, banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . $identifier . "'");
        } else {
            return '<b>smn ERROR! (smn_display_banner(' . $action . ', ' . $identifier . ') -> No banners with group \'' . $identifier . '\' found!</b>';
        }
    } elseif ($action == 'static') {
        if (is_array($identifier)) {
            $banner = $identifier;
        } else {
            $banner_query = smn_db_query("select banners_group, banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_id = '" . (int) $identifier . "'");
            if (smn_db_num_rows($banner_query)) {
                $banner = smn_db_fetch_array($banner_query);
            } else {
                return '<b>smn ERROR! (smn_display_banner(' . $action . ', ' . $identifier . ') -> Banner with ID \'' . $identifier . '\' not found, or status inactive</b>';
            }
        }
    } else {
        return '<b>smn ERROR! (smn_display_banner(' . $action . ', ' . $identifier . ') -> Unknown $action parameter value - it must be either \'dynamic\' or \'static\'</b>';
    }
    if (smn_not_null($banner['banners_html_text'])) {
        $banner_string = $banner['banners_html_text'];
    } else {
        // systemsmanager begin - Nov 30, 2005
        $banner_string = '<a href="' . smn_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" target="_blank">' . smn_image('images/' . $banner['banners_image'], $banner['banners_title'], $banner['banners_group'] === 'Side' ? '154' : '') . '</a>';
    }
    smn_update_banner_display_count($banner['banners_id']);
    return $banner_string;
}
  to obtain it through the world-wide-web, please send a note to    
  license@systemsmanager.net so we can mail you a copy immediately.
*/
require 'includes/application_top.php';
reset($_GET);
while (list($key, ) = each($_GET)) {
    switch ($key) {
        case 'banner':
            $banners_id = smn_db_prepare_input($_GET['banner']);
            $banner_query = smn_db_query("select affiliate_banners_title, affiliate_banners_image, affiliate_banners_html_text from " . TABLE_AFFILIATE_BANNERS . " where affiliate_banners_id = '" . smn_db_input($banners_id) . "'");
            $banner = smn_db_fetch_array($banner_query);
            $page_title = $banner['affiliate_banners_title'];
            if ($banner['affiliate_banners_html_text']) {
                $image_source = $banner['affiliate_banners_html_text'];
            } elseif ($banner['affiliate_banners_image']) {
                $image_source = smn_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . $banner['affiliate_banners_image'], $page_title);
            }
            break;
    }
}
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php 
echo HTML_PARAMS;
?>
>
<head>
<title><?php 
echo $page_title;
?>
</title>
        echo $admin['admin_email_address'];
        ?>
</td>
                <td class="dataTableContent" align="center"><?php 
        echo $admin_group['admin_groups_name'];
        ?>
</td>
                <td class="dataTableContent" align="center"><?php 
        echo $admin['admin_lognum'];
        ?>
</td>
                <td class="dataTableContent" align="right"><?php 
        if (is_object($mInfo) && $admin['admin_id'] == $mInfo->admin_id) {
            echo smn_image(DIR_WS_IMAGES . 'icon_arrow_right.gif');
        } else {
            echo '<a href="' . smn_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $_GET['page'] . '&mID=' . $admin['admin_id']) . '">' . smn_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>';
        }
        ?>
&nbsp;</td>
              </tr>
<?php 
    }
    ?>
              <tr>
                <td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                  <tr>
                    <td class="smallText" valign="top"><?php 
    echo $db_admin_split->display_count($db_admin_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_MEMBERS);
    ?>
<br><?php 
    echo $db_admin_split->display_links($db_admin_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']);
}
if ($task == 'prep_edit_form') {
    echo "<form name='edit_form' action='{$PHP_SELF}' method='post'>\n";
    $n = count($languages);
    reset($languages);
    for ($i = 0; $i < $n; $i++) {
        $additional_info_query_raw = "SELECT add_desc_id,\n\t\t\tcontext,\n\t\t\tcontext_value,\n\t\t\tadditional_description,\n\t\t\tlanguage,\n\t\t\tsort_order \n\tFROM " . TABLE_ADD_INFO . " where context='{$what_info}'\n             and    context_value='{$what_info_id}'\n             and    language = '" . $languages[$i]['directory'] . "'\n             order by sort_order,language  ";
        $additional_info_query = smn_db_query($additional_info_query_raw);
        if (mysql_num_rows($additional_info_query) == '1') {
            $action = 'update';
        } else {
            $action = 'insert';
        }
        $additional_info = smn_db_fetch_array($additional_info_query);
        echo "<input type='hidden' name='action[]' value='{$action}'>\n";
        echo smn_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']);
        echo "<br>\n";
        echo smn_draw_textarea_field('description[]', 'soft', '70', '10', $additional_info['additional_description']);
        echo "<input type='hidden' name='lang[]' value='" . $languages[$i]['directory'] . "'><br>\n";
    }
    echo "<input type='hidden' name='context' value='{$what_info}'>\n";
    echo "<input type='hidden' name='context_value'  value='{$what_info_id}'>\n";
    echo "<input type='submit' name='submit' value='submit'>\n";
    echo "<input type='hidden' name='task' value='process_edit'>\n";
    echo "</form>\n";
}
if ($HTTP_POST_VARS['task'] == 'process_edit') {
    $n_action = count($HTTP_POST_VARS['action']);
    reset($HTTP_POST_VARS['action']);
    for ($ia = 0; $ia < $n_action; $ia++) {
        $add_text = $HTTP_POST_VARS['description'][$ia];
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo CHARSET;
?>
">
<title><?php 
echo $product_info['products_name'];
?>
</title>
<base href="<?php 
echo ($request_type == 'NONSSL' ? HTTP_SERVER : HTTPS_SERVER) . DIR_WS_CATALOG;
?>
">
<script language="javascript"><!--
var i=0;
function resize() {
  if (navigator.appName == 'Netscape') i=40;
  if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i);
  self.focus();
}
//--></script>
</head>
<body onLoad="resize();">
<?php 
echo smn_image($store_images . $products_image, $products_name);
?>
</body>
</html>
<?php 
require 'includes/application_bottom.php';
Exemple #21
0
    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>';
    }
    ?>
&nbsp;</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 
if (isset($cPath) && $cPath != '') {
    if (strpos('_', $cPath)) {
        // check to see if there are deeper categories within the current category
        $category_links = array_reverse($cPath_array);
        for ($i = 0, $n = sizeof($category_links); $i < $n; $i++) {
            $categories_query = smn_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.store_id= '" . $store->get_store_id() . "' and c.parent_id = '" . (int) $category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int) $languages_id . "'");
            $categories = smn_db_fetch_array($categories_query);
            if ($categories['total'] < 1) {
                // do nothing, go through the loop
            } else {
                $categories_query = smn_db_query("select c.categories_id, cd.categories_description, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.store_id= '" . $store->get_store_id() . "' and c.parent_id = '" . (int) $category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int) $languages_id . "' order by sort_order, cd.categories_name");
                break;
                // we've found the deepest category the customer is in
            }
        }
    }
} else {
    $categories_query = smn_db_query("select c.categories_id, cd.categories_description, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.store_id= '" . $store->get_store_id() . "' and c.parent_id = '" . (int) $current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int) $languages_id . "' order by sort_order, cd.categories_name");
}
$number_of_categories = smn_db_num_rows($categories_query);
$rows = 0;
while ($categories = smn_db_fetch_array($categories_query)) {
    $rows++;
    $cPath_new = smn_get_path($categories['categories_id']);
    $width = (int) (100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';
    echo '                <td align="center" class="smallText" width="' . $width . '" valign="top"><a href="' . smn_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . smn_image(DIR_WS_IMAGES . $categories['categories_image'], '', SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT, 'onmouseover=\'toolTip("' . ($categories['categories_description'] == '' ? $categories['categories_name'] : $categories['categories_description']) . '",this)\'') . '<br>' . $categories['categories_name'] . '</a></td>' . "\n";
    if ($rows / MAX_DISPLAY_CATEGORIES_PER_ROW == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) && $rows != $number_of_categories) {
        echo '              </tr>' . "\n";
        echo '              <tr>' . "\n";
    }
}
*/
?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
      <tr>
        <td class="pageHeading_orig"><?php 
echo nl2br(STORE_NAME_ADDRESS);
?>
</td>
        <td class="pageHeading_orig" align="center"><?php 
echo HEADING_TITLE;
?>
</td>
        <td class="pageHeading_orig" align="right"><?php 
echo smn_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce', '204', '50');
?>
</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="2">
      <tr>
        <td><?php 
echo smn_draw_separator();
?>
</td>
      </tr>
      <tr>
        <td valign="top"><table border="0" cellspacing="0" cellpadding="2">
     for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
         $manufacturer_inputs_string .= '<br>' . smn_image(DIR_WS_CATALOG_LANGUAGES . 'images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . smn_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']');
     }
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURERS_URL . $manufacturer_inputs_string);
     $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . smn_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $_GET['mID']) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 case 'edit':
     $heading[] = array('text' => '<b>' . TEXT_HEADING_EDIT_MANUFACTURER . '</b>');
     $contents = array('form' => smn_draw_form('manufacturers', FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=save', 'post', 'enctype="multipart/form-data"'));
     $contents[] = array('text' => TEXT_EDIT_INTRO);
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURERS_NAME . '<br>' . smn_draw_input_field('manufacturers_name', $mInfo->manufacturers_name));
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURERS_IMAGE . '<br>' . smn_draw_file_field('manufacturers_image') . '<br>' . $mInfo->manufacturers_image);
     $manufacturer_inputs_string = '';
     $languages = smn_get_languages();
     for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
         $manufacturer_inputs_string .= '<br>' . smn_image(DIR_WS_CATALOG_LANGUAGES . 'images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . smn_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']', smn_get_manufacturer_url($mInfo->manufacturers_id, $languages[$i]['id']));
     }
     $contents[] = array('text' => '<br>' . TEXT_MANUFACTURERS_URL . $manufacturer_inputs_string);
     $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_save.gif', IMAGE_SAVE) . ' <a href="' . smn_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
 case 'delete':
     $heading[] = array('text' => '<b>' . TEXT_HEADING_DELETE_MANUFACTURER . '</b>');
     $contents = array('form' => smn_draw_form('manufacturers', FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=deleteconfirm'));
     $contents[] = array('text' => TEXT_DELETE_INTRO);
     $contents[] = array('text' => '<br><b>' . $mInfo->manufacturers_name . '</b>');
     $contents[] = array('text' => '<br>' . smn_draw_checkbox_field('delete_image', '', true) . ' ' . TEXT_DELETE_IMAGE);
     if ($mInfo->products_count > 0) {
         $contents[] = array('text' => '<br>' . smn_draw_checkbox_field('delete_products') . ' ' . TEXT_DELETE_PRODUCTS);
         $contents[] = array('text' => '<br>' . sprintf(TEXT_DELETE_WARNING_PRODUCTS, $mInfo->products_count));
     }
     $contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . smn_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
Exemple #25
0
  
  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. 
*/
?>
    <table border="0" width="100%" cellspacing="0" cellpadding="0">
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td><?php 
echo smn_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE);
?>
</td>
            <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td class="pageHeading" align="center"><?php 
echo HEADING_TITLE;
?>
</td>
              </tr>
              <tr>
                <td><?php 
echo smn_draw_separator('pixel_trans.gif', '100%', '10');
?>
</td>
              </tr>
Exemple #26
0
</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php 
echo smn_draw_separator('pixel_trans.gif', '100%', '10');
?>
</td>
      </tr>
<?php 
if ($_GET['action'] == 'process') {
    ?>
      <tr>
        <td class="main"><?php 
    echo smn_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE, '0', '0', 'align="left"') . TEXT_SUCCESS;
    ?>
<br><br><?php 
    echo 'gv ' . $id1;
    ?>
</td>
      </tr>
      <tr>
        <td align="right"><br><a href="<?php 
    echo smn_href_link(FILENAME_DEFAULT, '', 'NONSSL');
    ?>
"><?php 
    echo smn_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE);
    ?>
</a></td>
      </tr>
  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. 
*/
?>
    <table border="0" width="100%" cellspacing="0" cellpadding="0">
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td class="pageHeading"><?php 
echo HEADING_TITLE;
?>
</td>
            <td class="pageHeading" align="right"><?php 
echo smn_image(DIR_WS_IMAGES . 'table_background_specials.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="main"><table border="0" width="40%" cellspacing="0" cellpadding="0" align="right">
          <tr>
            <td><?php 
    <td><?php 
    echo smn_draw_separator('pixel_trans.gif', '100%', '15');
    ?>
</td>
  </tr>
  <tr> 
    <td><table border="0" align="center" width="100%" cellspacing="0" cellpadding="0">
      <tr> 
        <td><table border="0" align="center" width="75%" cellspacing="0" cellpadding="0">
          <tr> 
            <td class="pageHeading"><?php 
    echo nl2br($store->get_store_name_address());
    ?>
</td>
            <td class="pageHeading" align="right"><?php 
    echo smn_image(DIR_WS_IMAGES . $store->get_store_logo(), $store->get_store_name());
    ?>
</td>
          </tr>
          <tr> 
            <td colspan="2"><?php 
    echo smn_draw_separator('pixel_trans.gif', '100%', '20');
    ?>
</td>
          </tr>
          <tr> 
            <td colspan="2" align="center" class="titleHeading"><b><?php 
    echo TITLE_PRINT_ORDER . '&nbsp;' . $_GET['order_id'];
    ?>
</b></td>
          </tr>
            echo $language_list_query['text_content'];
            ?>
</td>
          </tr>
<?php 
        }
        ?>
      <tr>
        <td><?php 
        echo smn_draw_separator('pixel_trans.gif', '1', '20');
        ?>
</td>
      </tr>          
          <tr>
            <td class="main" valign="top" align="left"><?php 
        echo $languages[$i]['directory'] . '&nbsp;&nbsp;' . smn_image(DIR_WS_CATALOG_LANGUAGES . 'images/' . $languages[$i]['image'], $languages[$i]['name']);
        ?>
&nbsp;&nbsp;&nbsp;</td>
          </tr>
          <tr>
          <td class="main" align="center">
<?php 
        echo smn_draw_textarea_field('file_content[' . $languages[$i]['id'] . ']', 'text', '80', '20', $language_list_query['text_content'], '');
        $java_editor = 'file_content[' . $languages[$i]['id'] . ']';
        ?>
           </td>     
             </tr>
          <tr>
            <td><?php 
        echo smn_draw_separator('pixel_trans.gif', '1', '10');
        ?>
        }
        if (isset($zInfo) && is_object($zInfo) && $zones['geo_zone_id'] == $zInfo->geo_zone_id) {
            echo '                  <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . smn_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $zInfo->geo_zone_id . '&action=list') . '\'">' . "\n";
        } else {
            echo '                  <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . smn_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $zones['geo_zone_id']) . '\'">' . "\n";
        }
        ?>
                <td class="dataTableContent"><?php 
        echo '<a href="' . smn_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $zones['geo_zone_id'] . '&action=list') . '">' . smn_image(DIR_WS_ICONS . 'folder.gif', ICON_FOLDER) . '</a>&nbsp;' . $zones['geo_zone_name'];
        ?>
</td>
                <td class="dataTableContent" align="right"><?php 
        if (isset($zInfo) && is_object($zInfo) && $zones['geo_zone_id'] == $zInfo->geo_zone_id) {
            echo smn_image(DIR_WS_IMAGES . 'icon_arrow_right.gif');
        } else {
            echo '<a href="' . smn_href_link(FILENAME_GEO_ZONES, 'zpage=' . $_GET['zpage'] . '&zID=' . $zones['geo_zone_id']) . '">' . smn_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>';
        }
        ?>
&nbsp;</td>
              </tr>
<?php 
    }
    ?>
              <tr>
                <td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                  <tr>
                    <td class="smallText"><?php 
    echo $zones_split->display_count($zones_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['zpage'], TEXT_DISPLAY_NUMBER_OF_TAX_ZONES);
    ?>
</td>
                    <td class="smallText" align="right"><?php