예제 #1
0
 function quote($method = '')
 {
     global $order, $shipping_weight, $shipping_num_boxes, $vamPrice;
     if (MODULE_SHIPPING_NEWPOST_MODE == 'price') {
         $order_total = $vamPrice->RemoveCurr($_SESSION['cart']->show_total());
     } else {
         $order_total = $shipping_weight;
     }
     $table_cost = preg_split("/[:,]/", MODULE_SHIPPING_NEWPOST_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_NEWPOST_MODE == 'weight') {
         $shipping = $shipping * $shipping_num_boxes;
     }
     $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_NEWPOST_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_NEWPOST_TEXT_WAY, 'cost' => $shipping + MODULE_SHIPPING_NEWPOST_HANDLING)));
     if ($this->tax_class > 0) {
         $this->quotes['tax'] = vam_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
     }
     if (vam_not_null($this->icon)) {
         $this->quotes['icon'] = vam_image($this->icon, $this->title);
     }
     return $this->quotes;
 }
function vam_display_banner($action, $identifier)
{
    if ($action == 'dynamic') {
        $banners_query = vam_db_query("select count(*) as count from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . $identifier . "'");
        $banners = vam_db_fetch_array($banners_query);
        if ($banners['count'] > 0) {
            $banner = vam_random_select("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . $identifier . "'");
        } else {
            return '<b>VaM Shop ERROR! (vam_display_banner(' . $action . ', ' . $identifier . ') -> No banners with group \'' . $identifier . '\' found!</b>';
        }
    } elseif ($action == 'static') {
        if (is_array($identifier)) {
            $banner = $identifier;
        } else {
            $banner_query = vam_db_query("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_id = '" . $identifier . "'");
            if (vam_db_num_rows($banner_query)) {
                $banner = vam_db_fetch_array($banner_query);
            } else {
                return '<b>VaM Shop ERROR! (vam_display_banner(' . $action . ', ' . $identifier . ') -> Banner with ID \'' . $identifier . '\' not found, or status inactive</b>';
            }
        }
    } else {
        return '<b>VaM Shop ERROR! (vam_display_banner(' . $action . ', ' . $identifier . ') -> Unknown $action parameter value - it must be either \'dynamic\' or \'static\'</b>';
    }
    if (vam_not_null($banner['banners_html_text'])) {
        $banner_string = $banner['banners_html_text'];
    } else {
        $banner_string = '<a href="' . vam_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" onclick="window.open(this.href); return false;">' . vam_image(DIR_WS_IMAGES . 'banner/' . $banner['banners_image'], $banner['banners_title']) . '</a>';
    }
    vam_update_banner_display_count($banner['banners_id']);
    return $banner_string;
}
function vam_image_button($image, $alt = '', $parameters = '')
{
    if (!empty($image) && file_exists(DIR_FS_CATALOG . DIR_WS_ICONS . 'buttons/' . $image)) {
        $content = '<span>' . vam_image(DIR_WS_CATALOG . DIR_WS_ICONS . 'buttons/' . $image, $alt, '', '', 'width="12" height="12" ' . $parameters) . '&nbsp;' . $alt . '</span>';
    } else {
        $content = '<span>' . $alt . '</span>';
    }
    return $content;
}
예제 #4
0
 function selection()
 {
     global $order;
     if (vam_not_null($this->icon)) {
         $icon = vam_image($this->icon, $this->title);
     }
     //$person_query = vam_db_query("select * from ".TABLE_PERSONS." where customers_id = '" . (int)$order->customer['id'] . "'");
     //$person_data = vam_db_fetch_array($payment_query);
     $selection = array('id' => $this->code, 'module' => $this->title, 'icon' => $icon, 'description' => $this->info, 'fields' => array(array('title' => '<div id="kvitancia">' . MODULE_PAYMENT_KVITANCIA_NAME_TITLE, 'field' => MODULE_PAYMENT_KVITANCIA_NAME_DESC), array('title' => MODULE_PAYMENT_KVITANCIA_NAME, 'field' => vam_draw_input_field('kvit_name', $order->customer['firstname'] . ' ' . $order->customer['lastname'])), array('title' => MODULE_PAYMENT_KVITANCIA_ADDRESS, 'field' => vam_draw_input_field('kvit_address', $order->customer['city'] . ' ' . $order->customer['street_address']) . MODULE_PAYMENT_KVITANCIA_ADDRESS_HELP . '</div>')));
     return $selection;
 }
 function add($message, $type = 'error')
 {
     if ($message) {
         $this->size++;
         switch ($type) {
             case 'log':
                 $this->add_log($message);
                 break;
             case 'notice':
                 $this->errors[] = array('params' => 'class="messageNotice"', 'text' => vam_image(DIR_WS_ADMIN_ICONS . 'wink.gif') . '&nbsp;' . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'wink.gif') . '&nbsp;', '', $message), 'type' => $type);
                 if (USE_LOG_SYSTEM == 'true') {
                     $this->add_log($type . ": " . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'wink.gif') . '&nbsp;', '', $message));
                 }
                 break;
             case 'removed':
                 $this->errors[] = array('params' => 'class="messageSuccess"', 'text' => vam_image(DIR_WS_ADMIN_ICONS . 'sad.gif') . '&nbsp;' . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'sad.gif') . '&nbsp;', '', $message), 'type' => $type);
                 if (USE_LOG_SYSTEM == 'true') {
                     $this->add_log($type . ": " . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'sad.gif') . '&nbsp;', '', $message));
                 }
                 break;
             case 'installed':
                 $this->errors[] = array('params' => 'class="messageSuccess"', 'text' => vam_image(DIR_WS_ADMIN_ICONS . 'biggrin.gif') . '&nbsp;' . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'biggrin.gif') . '&nbsp;', '', $message), 'type' => $type);
                 if (USE_LOG_SYSTEM == 'true') {
                     $this->add_log($type . ": " . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'biggrin.gif') . '&nbsp;', '', $message));
                 }
                 break;
             case 'warning':
                 $this->errors[] = array('params' => 'class="messageWarning"', 'text' => vam_image(DIR_WS_ADMIN_ICONS . 'tongue.gif', ICON_WARNING) . '&nbsp;' . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'tongue.gif', ICON_WARNING) . '&nbsp;', '', $message), 'type' => $type);
                 if (USE_LOG_SYSTEM == 'true') {
                     $this->add_log($type . ": " . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'tongue.gif') . '&nbsp;', '', $message));
                 }
                 break;
             case 'success':
                 $this->errors[] = array('params' => 'class="messageSuccess"', 'text' => vam_image(DIR_WS_ADMIN_ICONS . 'smile.gif', ICON_SUCCESS) . '&nbsp;' . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'smile.gif', ICON_SUCCESS) . '&nbsp;', '', $message), 'type' => $type);
                 if (USE_LOG_SYSTEM == 'true') {
                     $this->add_log($type . ": " . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'smile.gif') . '&nbsp;', '', $message));
                 }
                 break;
             case 'error':
             default:
                 $this->count_errors++;
                 $this->errors[] = array('params' => 'class="messageError"', 'text' => vam_image(DIR_WS_ADMIN_ICONS . 'shocked.gif', ICON_ERROR) . '&nbsp;' . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'shocked.gif', ICON_ERROR) . '&nbsp;', '', $message), 'type' => $type);
                 if (USE_LOG_SYSTEM == 'true') {
                     $this->add_log($type . ": " . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'shocked.gif') . '&nbsp;', '', $message));
                 }
                 //break;
                 return true;
                 //We recieved an error and main script should finish your work when this func return true.
         }
     }
     return false;
     // No message and no error! Cool!
 }
예제 #6
0
 function quote($method = '')
 {
     global $order, $total_count;
     $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_ITEM_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_ITEM_TEXT_WAY, 'cost' => MODULE_SHIPPING_ITEM_COST * $total_count + MODULE_SHIPPING_ITEM_HANDLING)));
     if ($this->tax_class > 0) {
         $this->quotes['tax'] = vam_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
     }
     if (vam_not_null($this->icon)) {
         $this->quotes['icon'] = vam_image($this->icon, $this->title);
     }
     return $this->quotes;
 }
예제 #7
0
 function quote($method = '')
 {
     $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_SOGL_TEXT_TITLE);
     $this->quotes['methods'] = array(array('id' => $this->code, 'title' => MODULE_SHIPPING_SOGL_TEXT_WAY, 'cost' => 0));
     if ($this->tax_class > 0) {
         $this->quotes['tax'] = vam_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
     }
     if (vam_not_null($this->icon)) {
         $this->quotes['icon'] = vam_image($this->icon, $this->title);
     }
     return $this->quotes;
 }
예제 #8
0
 function add($message, $type = 'error')
 {
     if ($type == 'error') {
         $this->errors[] = array('params' => 'class="messageStackError"', 'text' => vam_image(DIR_WS_ICONS . 'error.gif', ICON_ERROR) . '&nbsp;' . $message);
     } elseif ($type == 'warning') {
         $this->errors[] = array('params' => 'class="messageStackWarning"', 'text' => vam_image(DIR_WS_ICONS . 'warning.gif', ICON_WARNING) . '&nbsp;' . $message);
     } elseif ($type == 'success') {
         $this->errors[] = array('params' => 'class="messageStackSuccess"', 'text' => vam_image(DIR_WS_ICONS . 'success.gif', ICON_SUCCESS) . '&nbsp;' . $message);
     } else {
         $this->errors[] = array('params' => 'class="messageStackError"', 'text' => $message);
     }
     $this->size++;
 }
function vam_image_submit($image, $alt = '', $parameters = '')
{
    if (!empty($image) && file_exists(DIR_FS_CATALOG . DIR_WS_ICONS . 'buttons/' . $image)) {
        $image_submit = '<span class="button"><button type="submit"';
        if (vam_not_null($parameters)) {
            $image_submit .= ' ' . $parameters;
        }
        $image_submit .= '>' . vam_image(DIR_WS_CATALOG . DIR_WS_ICONS . 'buttons/' . $image, $alt, '', '', 'width="12" height="12"') . '&nbsp;' . $alt . '</button></span>';
    } else {
        $image_submit = '<span class="button"><button type="submit"';
        if (vam_not_null($parameters)) {
            $image_submit .= ' ' . $parameters;
        }
        $image_submit .= '>' . $alt . '</button></span>';
    }
    return $image_submit;
}
예제 #10
0
 function selection()
 {
     if (isset($_SESSION['cart_yandex_id'])) {
         $order_id = substr($_SESSION['cart_yandex_id'], strpos($_SESSION['cart_yandex_id'], '-') + 1);
         $check_query = vam_db_query('select orders_id from ' . TABLE_ORDERS_STATUS_HISTORY . ' where orders_id = "' . (int) $order_id . '" limit 1');
         if (vam_db_num_rows($check_query) < 1) {
             vam_db_query('delete from ' . TABLE_ORDERS . ' where orders_id = "' . (int) $order_id . '"');
             vam_db_query('delete from ' . TABLE_ORDERS_TOTAL . ' where orders_id = "' . (int) $order_id . '"');
             vam_db_query('delete from ' . TABLE_ORDERS_STATUS_HISTORY . ' where orders_id = "' . (int) $order_id . '"');
             vam_db_query('delete from ' . TABLE_ORDERS_PRODUCTS . ' where orders_id = "' . (int) $order_id . '"');
             vam_db_query('delete from ' . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . ' where orders_id = "' . (int) $order_id . '"');
             vam_db_query('delete from ' . TABLE_ORDERS_PRODUCTS_DOWNLOAD . ' where orders_id = "' . (int) $order_id . '"');
             unset($_SESSION['cart_yandex_id']);
         }
     }
     if (vam_not_null($this->icon)) {
         $icon = vam_image($this->icon, $this->title);
     }
     return array('id' => $this->code, 'icon' => $icon, 'module' => $this->public_title);
 }
예제 #11
0
 function selection()
 {
     if (isset($_SESSION['cart_aviso_id'])) {
         $order_id = substr($_SESSION['cart_aviso_id'], strpos($_SESSION['cart_aviso_id'], '-') + 1);
         $check_query = vam_db_query('select orders_id from ' . TABLE_ORDERS_STATUS_HISTORY . ' where orders_id = "' . (int) $order_id . '" limit 1');
         if (vam_db_num_rows($check_query) < 1) {
             vam_db_query('delete from ' . TABLE_ORDERS . ' where orders_id = "' . (int) $order_id . '"');
             vam_db_query('delete from ' . TABLE_ORDERS_TOTAL . ' where orders_id = "' . (int) $order_id . '"');
             vam_db_query('delete from ' . TABLE_ORDERS_STATUS_HISTORY . ' where orders_id = "' . (int) $order_id . '"');
             vam_db_query('delete from ' . TABLE_ORDERS_PRODUCTS . ' where orders_id = "' . (int) $order_id . '"');
             vam_db_query('delete from ' . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . ' where orders_id = "' . (int) $order_id . '"');
             vam_db_query('delete from ' . TABLE_ORDERS_PRODUCTS_DOWNLOAD . ' where orders_id = "' . (int) $order_id . '"');
             unset($_SESSION['cart_aviso_id']);
         }
     }
     if (vam_not_null($this->icon)) {
         $icon = vam_image($this->icon, $this->title);
     }
     return array('id' => $this->code, 'module' => $this->title, 'icon' => $icon, 'description' => $this->info, 'fields' => array(array('title' => '<div id="aviso">' . MODULE_PAYMENT_AVISO_NAME_TITLE, 'field' => MODULE_PAYMENT_AVISO_NAME_DESC), array('title' => MODULE_PAYMENT_AVISO_TELEPHONE, 'field' => vam_draw_input_field('aviso_telephone', $order->customer['telephone']) . MODULE_PAYMENT_AVISO_TELEPHONE_HELP . '</div>')));
 }
예제 #12
0
 function quote($method = '')
 {
     global $vamPrice;
     if ($vamPrice->RemoveCurr($_SESSION['cart']->show_total()) < MODULE_SHIPPING_FREEAMOUNT_AMOUNT && MODULE_SHIPPING_FREEAMOUNT_DISPLAY == 'False') {
         return;
     }
     $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_FREEAMOUNT_TEXT_TITLE);
     if ($vamPrice->RemoveCurr($_SESSION['cart']->show_total()) < MODULE_SHIPPING_FREEAMOUNT_AMOUNT) {
         $this->quotes['error'] = sprintf(MODULE_SHIPPING_FREEAMOUNT_TEXT_WAY, $vamPrice->Format(MODULE_SHIPPING_FREEAMOUNT_AMOUNT, true, 0, true));
     } else {
         $this->quotes['methods'] = array(array('id' => $this->code, 'title' => sprintf(MODULE_SHIPPING_FREEAMOUNT_TEXT_WAY, $vamPrice->Format(MODULE_SHIPPING_FREEAMOUNT_AMOUNT, true, 0, true)), 'cost' => 0));
     }
     if ($this->tax_class > 0) {
         $this->quotes['tax'] = vam_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
     }
     if (vam_not_null($this->icon)) {
         $this->quotes['icon'] = vam_image($this->icon, $this->title);
     }
     return $this->quotes;
 }
예제 #13
0
 function quote()
 {
     global $order, $shipping_weight;
     $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_CHRONOPOST_TEXT_TITLE, 'methods' => array());
     if (vam_not_null($this->icon)) {
         $this->quotes['icon'] = vam_image($this->icon, $this->title);
     }
     if ($this->tax_class > 0) {
         $this->quotes['tax'] = vam_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
     }
     $dest_country = $order->delivery['country']['iso_code_2'];
     $dest_zone = 0;
     for ($i = 1; $i <= $this->num_chronopost; $i++) {
         $countries_table = constant('MODULE_SHIPPING_CHRONOPOST_COUNTRIES_' . $i);
         $country = preg_split("/[,]/", $countries_table);
         if (in_array($dest_country, $country)) {
             $dest_zone = $i;
             break;
         }
     }
     if ($dest_zone == 0) {
         $this->quotes['error'] = MODULE_SHIPPING_CHRONOPOST_INVALID_ZONE;
         return $this->quotes;
     }
     $table = preg_split("/[:,]/", constant('MODULE_SHIPPING_CHRONOPOST_COST_' . $dest_zone));
     $cost = -1;
     for ($i = 0, $n = sizeof($table); $i < $n; $i += 2) {
         if ($shipping_weight <= $table[$i]) {
             $cost = $table[$i + 1] + MODULE_SHIPPING_CHRONOPOST_HANDLING + SHIPPING_HANDLING;
             break;
         }
     }
     if ($cost == -1) {
         $this->quotes['error'] = MODULE_SHIPPING_CHRONOPOST_UNDEFINED_RATE;
         return $this->quotes;
     }
     $this->quotes['methods'][] = array('id' => $this->code, 'title' => MODULE_SHIPPING_CHRONOPOST_TEXT_WAY . ' ' . $order->delivery['country']['title'], 'cost' => $cost + MODULE_SHIPPING_CHRONOPOST_HANDLING + SHIPPING_HANDLING);
     return $this->quotes;
 }
            </table></td>
<?php 
    $heading = array();
    $contents = array();
    switch ($_GET['action']) {
        case 'delete':
            $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_PAYMENT . '</b>');
            $contents = array('form' => vam_draw_form('payment', FILENAME_AFFILIATE_PAYMENT, vam_get_all_get_params(array('pID', 'action')) . 'pID=' . $pInfo->affiliate_payment_id . '&action=deleteconfirm'));
            $contents[] = array('text' => TEXT_INFO_DELETE_INTRO . '<br>');
            $contents[] = array('align' => 'center', 'text' => '<br><span class="button"><button type="submit" value="' . BUTTON_DELETE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</button></span><a class="button" href="' . vam_href_link(AFFILIATE_PAYMENT, vam_get_all_get_params(array('pID', 'action')) . 'pID=' . $pInfo->affiliate_payment_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
            break;
        default:
            if (is_object($pInfo)) {
                $heading[] = array('text' => '<b>[' . $pInfo->affiliate_payment_id . ']&nbsp;&nbsp;' . vam_datetime_short($pInfo->affiliate_payment_date) . '</b>');
                $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_AFFILIATE_PAYMENT, vam_get_all_get_params(array('pID', 'action')) . 'pID=' . $pInfo->affiliate_payment_id . '&action=edit') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/edit.png', '', '12', '12') . '&nbsp;' . BUTTON_EDIT . '</span></a> <a class="button" href="' . vam_href_link(FILENAME_AFFILIATE_PAYMENT, vam_get_all_get_params(array('pID', 'action')) . 'pID=' . $pInfo->affiliate_payment_id . '&action=delete') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</span></a>');
                $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_AFFILIATE_INVOICE, 'pID=' . $pInfo->affiliate_payment_id) . '" TARGET="_blank"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/payment.png', '', '12', '12') . '&nbsp;' . BUTTON_INVOICE . '</span></a> ');
            }
            break;
    }
    if (vam_not_null($heading) && vam_not_null($contents)) {
        echo '            <td  width="25%" valign="top">' . "\n";
        $box = new box();
        echo $box->infoBox($heading, $contents);
        echo '            </td>' . "\n";
    }
    ?>
          </tr>
        </table></td>
      </tr>
<?php 
}
예제 #15
0
   (c) 2003	 nextcommerce (header.php,v 1.17 2003/08/24); www.nextcommerce.org
   (c) 2004	 xt:Commerce (header.php,v 1.17 2003/08/24); xt-commerce.com

   Released under the GNU General Public License 
   --------------------------------------------------------------*/
if ($messageStack->size > 0) {
    echo $messageStack->output();
}
?>

<!-- шапка -->        
          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="200" align="left" class="header">
              <a href="start.php"><?php 
echo vam_image(DIR_WS_IMAGES . 'logo.png', 'VamShop');
?>
</a>
              </td>
              <td width="370" align="center" class="header">
              &nbsp;
              </td>
              <td width="300" class="header">
              &nbsp;
              </td>
            </tr>
</table>

<?php 
if (ADMIN_DROP_DOWN_NAVIGATION == 'true') {
    ?>
vam_db_query("update " . TABLE_REVIEWS . " set reviews_read = reviews_read+1 where reviews_id = '" . $reviews['reviews_id'] . "'");
$reviews_text = vam_break_string(htmlspecialchars($reviews['reviews_text']), 60, '-<br />');
require DIR_WS_INCLUDES . 'header.php';
$vamTemplate->assign('PRODUCTS_NAME', $reviews['products_name']);
$vamTemplate->assign('AUTHOR', $reviews['customers_name']);
$vamTemplate->assign('DATE', vam_date_long($reviews['date_added']));
$vamTemplate->assign('REVIEWS_TEXT', nl2br($reviews_text));
$vamTemplate->assign('RATING', vam_image('templates/' . CURRENT_TEMPLATE . '/img/stars_' . $reviews['reviews_rating'] . '.gif', sprintf(TEXT_OF_5_STARS, $reviews['reviews_rating'])));
$vamTemplate->assign('PRODUCTS_LINK', vam_href_link(FILENAME_PRODUCT_INFO, vam_product_link($reviews['products_id'], $reviews['products_name'])));
$vamTemplate->assign('BUTTON_BACK', '<a class="button" href="' . vam_href_link(FILENAME_PRODUCT_REVIEWS, $get_params) . '">' . vam_image_button('back.png', IMAGE_BUTTON_BACK) . '</a>');
$vamTemplate->assign('BUTTON_BUY_NOW', '<a class="button" href="' . vam_href_link(FILENAME_DEFAULT, 'action=buy_now&BUYproducts_id=' . $reviews['products_id']) . '">' . vam_image_button('buy.png', IMAGE_BUTTON_IN_CART) . '</a>');
$products_image = DIR_WS_THUMBNAIL_IMAGES . $reviews['products_image'];
if (!is_file($products_image)) {
    $products_image = DIR_WS_THUMBNAIL_IMAGES . '../noimage.gif';
}
$image = vam_image($products_image, $reviews['products_name'], '', '', 'hspace="5" vspace="5"');
$vamTemplate->assign('IMAGE', $image);
$vamTemplate->assign('language', $_SESSION['language']);
// set cache ID
if (!CacheCheck()) {
    $vamTemplate->caching = 0;
    $main_content = $vamTemplate->fetch(CURRENT_TEMPLATE . '/module/product_reviews_info.html');
} else {
    $vamTemplate->caching = 1;
    $vamTemplate->cache_lifetime = CACHE_LIFETIME;
    $vamTemplate->cache_modified_check = CACHE_CHECK;
    $cache_id = $_SESSION['language'] . $reviews['reviews_id'];
    $main_content = $vamTemplate->fetch(CURRENT_TEMPLATE . '/module/product_reviews_info.html', $cache_id);
}
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->assign('main_content', $main_content);
예제 #17
0
 switch ($action) {
     case 'delete':
         $heading[] = array('text' => '<b>' . TEXT_HEADING_DELETE_AUTHOR . '</b>');
         $contents = array('form' => vam_draw_form('authors', FILENAME_AUTHORS, 'page=' . $_GET['page'] . '&auID=' . $auInfo->authors_id . '&action=deleteconfirm'));
         $contents[] = array('text' => TEXT_DELETE_INTRO);
         $contents[] = array('text' => '<br><b>' . $auInfo->authors_name . '</b>');
         if ($auInfo->articles_count > 0) {
             $contents[] = array('text' => '<br>' . vam_draw_checkbox_field('delete_articles') . ' ' . TEXT_DELETE_ARTICLES);
             $contents[] = array('text' => '<br>' . sprintf(TEXT_DELETE_WARNING_ARTICLES, $auInfo->articles_count));
         }
         $contents[] = array('align' => 'center', 'text' => '<br>' . '<span class="button"><button type="submit" value="' . BUTTON_DELETE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</button></span>' . ' <a class="button" href="' . vam_href_link(FILENAME_AUTHORS, 'page=' . $_GET['page'] . '&auID=' . $auInfo->authors_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
         break;
     default:
         if (isset($auInfo) && is_object($auInfo)) {
             $heading[] = array('text' => '<b>' . $auInfo->authors_name . '</b>');
             $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_AUTHORS, 'page=' . $_GET['page'] . '&auID=' . $auInfo->authors_id . '&action=edit') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/edit.png', '', '12', '12') . '&nbsp;' . BUTTON_EDIT . '</span></a> <a class="button" href="' . vam_href_link(FILENAME_AUTHORS, 'page=' . $_GET['page'] . '&auID=' . $auInfo->authors_id . '&action=delete') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</span></a>');
             $contents[] = array('text' => '<br>' . TEXT_DATE_ADDED . ' ' . vam_date_short($auInfo->date_added));
             if (vam_not_null($auInfo->last_modified)) {
                 $contents[] = array('text' => TEXT_LAST_MODIFIED . ' ' . vam_date_short($auInfo->last_modified));
             }
             $contents[] = array('text' => '<br>' . TEXT_ARTICLES . ' ' . $auInfo->articles_count);
         }
         break;
 }
 if (vam_not_null($heading) && vam_not_null($contents)) {
     echo '            <td width="25%" valign="top">' . "\n";
     $box = new box();
     echo $box->infoBox($heading, $contents);
     echo '            </td>' . "\n";
 }
 ?>
<?php

/*
  $Id: attributeManagerPlaceHolder.inc.php,v 1.0 21/02/06 Sam West$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Released under the GNU General Public License
  
  Copyright © 2006 Kangaroo Partners
  http://kangaroopartners.com
  osc@kangaroopartners.com
*/
require_once 'attributeManager/classes/attributeManagerConfig.class.php';
if (isset($_GET['pID'])) {
    require_once 'attributeManager/classes/stopDirectAccess.class.php';
    stopDirectAccess::authorise(AM_SESSION_VALID_INCLUDE);
    echo '<div id="attributeManager">';
    echo '</div>';
} else {
    echo '<div id="topBar">';
    echo '<table><tr><td>' . vam_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</td><td>' . AM_AJAX_FIRST_SAVE . '</td></tr></table>';
    echo '</div>';
}
예제 #19
0
}
$product_info_query = vam_db_query("select pd.products_name from " . TABLE_PRODUCTS_DESCRIPTION . " pd left join " . TABLE_PRODUCTS . " p on pd.products_id = p.products_id where pd.language_id = '" . (int) $_SESSION['languages_id'] . "' and p.products_status = '1' and pd.products_id = '" . (int) $_GET['products_id'] . "'");
if (!vam_db_num_rows($product_info_query)) {
    vam_redirect(vam_href_link(FILENAME_REVIEWS));
}
$product_info = vam_db_fetch_array($product_info_query);
$breadcrumb->add(NAVBAR_TITLE_PRODUCT_REVIEWS, vam_href_link(FILENAME_PRODUCT_REVIEWS, $get_params));
require DIR_WS_INCLUDES . 'header.php';
$vamTemplate->assign('PRODUCTS_NAME', $product_info['products_name']);
$data_reviews = array();
$reviews_query = vam_db_query("select reviews_rating, reviews_id, customers_name, date_added, last_modified, reviews_read from " . TABLE_REVIEWS . " where products_id = '" . (int) $_GET['products_id'] . "' order by reviews_id DESC");
if (vam_db_num_rows($reviews_query)) {
    $row = 0;
    while ($reviews = vam_db_fetch_array($reviews_query)) {
        $row++;
        $data_reviews[] = array('ID' => $reviews['reviews_id'], 'AUTHOR' => '<a href="' . vam_href_link(FILENAME_PRODUCT_REVIEWS_INFO, $get_params . '&reviews_id=' . $reviews['reviews_id']) . '">' . $reviews['customers_name'] . '</a>', 'DATE' => vam_date_short($reviews['date_added']), 'RATING' => vam_image('templates/' . CURRENT_TEMPLATE . '/img/stars_' . $reviews['reviews_rating'] . '.gif', sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $reviews['reviews_rating'])), 'TEXT' => vam_break_string(htmlspecialchars($reviews['reviews_text']), 60, '-<br />'));
    }
}
$vamTemplate->assign('module_content', $data_reviews);
$vamTemplate->assign('BUTTON_BACK', '<a class="button" href="' . vam_href_link(FILENAME_PRODUCT_INFO, $get_params_back) . '">' . vam_image_button('back.png', IMAGE_BUTTON_BACK) . '</a>');
$vamTemplate->assign('BUTTON_WRITE', '<a class="button" href="' . vam_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, $get_params) . '">' . vam_image_button('add.png', IMAGE_BUTTON_WRITE_REVIEW) . '</a>');
$vamTemplate->assign('language', $_SESSION['language']);
// set cache ID
if (!CacheCheck()) {
    $vamTemplate->caching = 0;
    $main_content = $vamTemplate->fetch(CURRENT_TEMPLATE . '/module/product_reviews.html');
} else {
    $vamTemplate->caching = 1;
    $vamTemplate->cache_lifetime = CACHE_LIFETIME;
    $vamTemplate->cache_modified_check = CACHE_CHECK;
    $cache_id = $_SESSION['language'] . $_GET['products_id'];
예제 #20
0
require_once DIR_FS_INC . 'vam_random_charcode.inc.php';
require_once DIR_FS_INC . 'vam_render_vvcode.inc.php';
// create smarty elements
if (isset($_POST['firstname'])) {
    $firstname = $_POST['firstname'];
}
if (isset($_POST['phone'])) {
    $phone = $_POST['phone'];
}
if (isset($_POST['message_body'])) {
    $message_body = stripslashes($_POST['message_body']);
}
if (isset($_POST['phone'])) {
    $subject = $_POST['subject'];
    $txt_mail = 'tel: ' . $phone . " " . $message_body;
    // отправка данных
    vam_php_mail('', EMAIL_SUPPORT_NAME, EMAIL_SUPPORT_ADDRESS, STORE_NAME, EMAIL_SUPPORT_FORWARDING_STRING, '', $firstname, '', '', $subject, '', $txt_mail);
    die('Спасибо. Ваше сообщение отправлено. Вскоре мы Вам перезвоним.');
}
$vamTemplate = new vamTemplate();
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->assign('CAPTCHA_IMG', vam_image(HTTP_SERVER . DIR_WS_CATALOG . FILENAME_DISPLAY_CAPTCHA, 'captcha', '150', '', 'name="captcha" '));
$vamTemplate->assign('CAPTCHA_INPUT', vam_draw_input_field('captcha', '', 'size="6" maxlength="6"', 'text', false));
$vamTemplate->assign('FORM_ACTION', vam_draw_form('callback_form', '') . vam_draw_hidden_field('action', 'process') . vam_draw_hidden_field('products_id', $_GET['products_id']));
$vamTemplate->assign('INPUT_FIRSTNAME', vam_draw_input_field('firstname', $firstname, 'size="30" maxlength="100"', 'text', true));
$vamTemplate->assign('INPUT_LASTNAME', vam_draw_input_field('phone', $phone, 'size="30" maxlength="100"', 'text', true));
$vamTemplate->assign('INPUT_TEXT', vam_draw_textarea_field('message_body', 'soft', 30, 3, $message_body));
$vamTemplate->assign('FORM_END', '</form>');
$vamTemplate->assign('BUTTON_SUBMIT', '<a class="button" id="callback_send" href="javascript:void(0);">' . vam_image_button('submit.png', IMAGE_BUTTON_SEND) . '</a>');
$vamTemplate->assign('BUTTON_CONTINUE', '<a class="button" href="javascript:void(0);" onclick="$(\'#showCart\').dialog(\'close\');">' . vam_image_button('back.png', IMAGE_BUTTON_BACK) . '</a>');
$vamTemplate->display(CURRENT_TEMPLATE . '/module/callback_form.html');
예제 #21
0
 function getBuyNowButtonNew($id, $name)
 {
     global $PHP_SELF;
     if (AJAX_CART == 'true' && !vam_has_product_attributes($id)) {
         $link = '<a href="' . vam_href_link(basename($PHP_SELF), 'action=buy_now&BUYproducts_id=' . $id . '&' . vam_get_all_get_params(array('action')), 'NONSSL') . '" onclick="doBuyNow(\'' . $id . '\',\'1\'); return false;">' . vam_image('templates/' . CURRENT_TEMPLATE . '/buttons/' . $_SESSION['language'] . '/button_buy_now.png', TEXT_BUY . $name . TEXT_NOW) . '</a>';
     } else {
         $link = '<a href="' . vam_href_link(basename($PHP_SELF), 'action=buy_now&BUYproducts_id=' . $id . '&' . vam_get_all_get_params(array('action')), 'NONSSL') . '">' . vam_image('templates/' . CURRENT_TEMPLATE . '/buttons/' . $_SESSION['language'] . '/button_buy_now.png', TEXT_BUY . $name . TEXT_NOW) . '</a>';
     }
     return $link;
 }
예제 #22
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 vam_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 vam_image(DIR_WS_IMAGES . 'icon_arrow_right.gif');
    } else {
        echo '<a href="' . vam_href_link(FILENAME_GV_SENT, 'page=' . $_GET['page'] . '&gid=' . $gv_list['coupon_id']) . '">' . vam_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_ADMIN_PAGE, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_GIFT_VOUCHERS);
?>
</td>
                    <td class="smallText" align="right"><?php 
예제 #23
0
                </table>
              </div>
              <div id="tab_6" class="content">
                <table border="0" cellspacing="0" cellpadding="1">
                  <tr align="left">
                    <td valign="top" class="main"><?php 
echo TEXT_TITLE_6;
?>
&nbsp;</td>
                    <td><table border="0" cellspacing="0" cellpadding="0">
<?php 
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
    ?>
                      <tr>
                        <td valign="top"><?php 
    echo vam_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']);
    ?>
</td>
                        <td class="main"><?php 
    echo vam_draw_textarea_field('products_tab_6[' . $languages[$i]['id'] . ']', 'soft', '120', '15', isset($products_tab_6[$languages[$i]['id']]) ? $products_tab_6[$languages[$i]['id']] : $products_tabs[$languages[$i]['id']]['6']);
    ?>
</td>
                      </tr>
                      <tr>
                        <td><?php 
    echo vam_draw_separator('pixel_trans.gif', '100%', '10');
    ?>
</td>
                      </tr>
<?php 
}
    ?>
</td>
                <td><?php 
    echo vam_draw_textarea_field('message', 'soft', '60', '15');
    ?>
</td>
              </tr>
              <tr>
                <td colspan="2"><?php 
    echo vam_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
              </tr>
              <tr>
                <td colspan="2" align="right"><?php 
    echo '<span class="button"><button type="submit" class="button" value="' . BUTTON_SEND . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/submit.png', '', '12', '12') . '&nbsp;' . BUTTON_SEND . '</button></span>';
    ?>
</td>
              </tr>
            </table></td>
          </form></tr>
<?php 
}
?>
<!-- body_text_eof //-->
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
<!-- body_eof //-->
예제 #25
0
        }
        $contents[] = array('align' => 'center', 'text' => '<br /><span class="button"><button type="submit" value="' . BUTTON_UPDATE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/submit.png', '', '12', '12') . '&nbsp;' . BUTTON_INSERT . '</button></span> <a class="button" href="' . vam_href_link(FILENAME_SHIPPING_STATUS, 'page=' . $_GET['page'] . '&oID=' . $oInfo->shipping_status_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
        break;
    case 'delete':
        $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_SHIPPING_STATUS . '</b>');
        $contents = array('form' => vam_draw_form('status', FILENAME_SHIPPING_STATUS, 'page=' . $_GET['page'] . '&oID=' . $oInfo->shipping_status_id . '&action=deleteconfirm'));
        $contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
        $contents[] = array('text' => '<br /><b>' . $oInfo->shipping_status_name . '</b>');
        if ($remove_status) {
            $contents[] = array('align' => 'center', 'text' => '<br /><span class="button"><button type="submit" value="' . BUTTON_DELETE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</button></span> <a class="button" href="' . vam_href_link(FILENAME_SHIPPING_STATUS, 'page=' . $_GET['page'] . '&oID=' . $oInfo->shipping_status_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
        }
        break;
    default:
        if (is_object($oInfo)) {
            $heading[] = array('text' => '<b>' . $oInfo->shipping_status_name . '</b>');
            $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_SHIPPING_STATUS, 'page=' . $_GET['page'] . '&oID=' . $oInfo->shipping_status_id . '&action=edit') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/edit.png', '', '12', '12') . '&nbsp;' . BUTTON_EDIT . '</span></a> <a class="button" href="' . vam_href_link(FILENAME_SHIPPING_STATUS, 'page=' . $_GET['page'] . '&oID=' . $oInfo->shipping_status_id . '&action=delete') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</span></a>');
            $shipping_status_inputs_string = '';
            $languages = vam_get_languages();
            for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
                $shipping_status_inputs_string .= '<br />' . $languages[$i]['name'] . ':&nbsp;' . vam_get_shipping_status_name($oInfo->shipping_status_id, $languages[$i]['id']);
            }
            $contents[] = array('text' => $shipping_status_inputs_string);
        }
        break;
}
if (vam_not_null($heading) && vam_not_null($contents)) {
    echo '            <td width="25%" valign="top">' . "\n";
    $box = new box();
    echo $box->infoBox($heading, $contents);
    echo '            </td>' . "\n";
}
?>
</td>
                    <td class="smallText" align="right"><?php 
echo $products_split->display_links($products_query_numrows, MAX_DISPLAY_ADMIN_PAGE, MAX_DISPLAY_PAGE_LINKS, $_GET['page']);
?>
</td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
<?php 
$heading = array();
$contents = array();
if (is_object($pInfo)) {
    $heading[] = array('text' => '<b>' . $pInfo->products_name . '</b>');
    $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_CATEGORIES, 'pID=' . $pInfo->products_id . '&action=new_product') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/edit.png', '', '12', '12') . '&nbsp;' . BUTTON_EDIT . '</span></a>');
    $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_EXPECTED . ' ' . vam_date_short($pInfo->products_date_available));
}
if (vam_not_null($heading) && vam_not_null($contents)) {
    echo '            <td width="25%" valign="top">' . "\n";
    $box = new box();
    echo $box->infoBox($heading, $contents);
    echo '            </td>' . "\n";
}
?>
          </tr>
        </table></td>
      </tr>
    </table></td>
<!-- body_text_eof //-->
  </tr>
 function quote($method = '')
 {
     global $order, $shipping_weight, $vamPrice;
     $home = false;
     $dest_country = $order->delivery['country']['iso_code_2'];
     $dest_province = $order->delivery['state'];
     $dest_zone_id;
     //Если страна Россия, то цену смотрим по региону
     //"домашняя" страна.
     if ($dest_country == "RU") {
         $dest_zone_id = $dest_province;
         $home = true;
     } else {
         $dest_zone_id = $dest_country;
     }
     $dest_zone = 0;
     $error = false;
     $err_msg;
     //смотрим нужный регион
     if ($home) {
         for ($i = 1; $i <= 5; $i++) {
             $zones_table = constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_STATES_' . $i);
             $zones = preg_split("/[,]/", $zones_table);
             if (in_array($dest_zone_id, $zones)) {
                 $dest_zone = $i;
                 break;
             }
         }
     } else {
         $zones_table = constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_COUNTRY_1');
         $zones = preg_split("/[,]/", $zones_table);
         if (in_array($dest_zone_id, $zones)) {
             $dest_zone = 21;
         } else {
             $zones_table = constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_COUNTRY_2');
             $zones = preg_split("/[,]/", $zones_table);
             if (in_array($dest_zone_id, $zones) || in_array('*', $zones)) {
                 $dest_zone = 22;
             }
         }
     }
     //узнаем посылка или бандероль
     //вес заказа меньше максимального для бандероли
     $need_wr = MODULE_SHIPPING_RUSSIANPOSTPREPAY_WRAPPER_MAXWEIGHT < $shipping_weight ? MODULE_SHIPPING_RUSSIANPOSTPREPAY_WRAPPERS_OR_PARCEL == 'True' ? 1 : 0 : 1;
     //$wrapper = 0 - посылка
     //$wrapper = 1 - бандероль
     $wrapper = MODULE_SHIPPING_RUSSIANPOSTPREPAY_WRAPPER_STATUS == 'True' && $need_wr ? $this->is_wrapper($_SESSION['cart']->get_products()) : 0;
     if ($wrapper == 0 && MODULE_SHIPPING_RUSSIANPOSTPREPAY_PARCEL_STATUS != 'True') {
         return false;
     }
     $mode = $wrapper == 1 ? 'WRAPPER' : 'PARCEL';
     //высчитываем на сколько посылок/бандеролей нужно разбить заказ
     $need_parcel = 1;
     $maxweight = constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_' . ($dest_zone < 20 ? $mode : 'INTER') . '_MAXWEIGHT');
     if ($shipping_weight > $maxweight) {
         $need_parcel = ceil($shipping_weight / $maxweight);
     }
     if ($dest_zone == 0) {
         $error = true;
         $err_msg = MODULE_SHIPPING_RUSSIANPOSTPREPAY_INVALID_ZONE;
     } else {
         //отправление по России
         if ($dest_zone < 20) {
             $shipping = -1;
             $zones_cost = constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_STATES_PRICE_' . $mode . '_' . $dest_zone);
             $cost_table = preg_split("/[:,]/", $zones_cost);
             $shipping = $this->price($cost_table, $shipping_weight, $need_parcel, $maxweight, constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_' . ($dest_zone < 20 ? $mode : 'INTER') . '_REG'));
             $shipping_method = constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_TEXT_WAY_' . $mode) . ' <nobr>(' . $order->delivery['state'] . ' - ' . $shipping_weight . ' ' . MODULE_SHIPPING_RUSSIANPOSTPREPAY_TEXT_UNITS . '</nobr> <nobr>[' . constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_' . $mode . '_NEED') . $this->om_number($need_parcel, array(constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_' . $mode . '_1'), constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_' . $mode . '_2'), constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_' . $mode . '_5'))) . ']</nobr>)';
         } else {
             $shipping = -1;
             $zones_cost = constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_COUNTRY_PRICE_' . ($dest_zone == '21' ? 1 : 2));
             $cost_table = preg_split("/[:,]/", $zones_cost);
             $shipping = $this->price($cost_table, $shipping_weight, $need_parcel, $maxweight, constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_' . ($dest_zone < 20 ? $mode : 'INTER') . '_REG'));
             $shipping_method = constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_TEXT_WAY_COUNTRY') . ' <nobr>(' . $order->delivery['country']['title'] . ' - ' . $shipping_weight . ' ' . MODULE_SHIPPING_RUSSIANPOSTPREPAY_TEXT_UNITS . '</nobr> <nobr>[' . constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_INTER_NEED') . $this->om_number($need_parcel, array(constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_INTER_1'), constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_INTER_2'), constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_INTER_5'))) . ']</nobr>)';
         }
         if ($shipping == 0) {
             $shipping = -1;
         }
         if ($shipping == -1) {
             $error = true;
             $err_msg = MODULE_SHIPPING_RUSSIANPOSTPREPAY_UNDEFINED_RATE;
         } else {
             /**** Формула подсчёта цены ****/
             //внутренние отправления
             if ($dest_zone < 20) {
                 /*-- Оценочная стоимость в настройках --*/
                 $appraisal = 0;
                 if (constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_' . $mode . '_INSURANCE_PRICE') != 0) {
                     $appraisal = strpos(constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_' . $mode . '_INSURANCE_PRICE'), '%') === false ? constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_' . $mode . '_INSURANCE_PRICE') : substr(constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_' . $mode . '_INSURANCE_PRICE'), 0, strpos(constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_' . $mode . '_INSURANCE_PRICE'), '%'));
                     $appraisal_proc = strpos(constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_' . $mode . '_INSURANCE_PRICE'), '%') === false ? false : true;
                 }
                 $appraisal = intval($appraisal);
                 //оценочная стоимость
                 if ($appraisal > 0) {
                     //процент от суммы
                     if ($appraisal_proc) {
                         $appraisal_price = ($shipping + $_SESSION['cart']->show_total() / 100) * $appraisal;
                     } else {
                         $appraisal_price = $appraisal;
                     }
                 } else {
                     //доставка + сумма заказа
                     $appraisal_price = $shipping + $_SESSION['cart']->show_total();
                 }
                 //высчитываем страховую стоимость
                 $insurance_price = $this->insurance($appraisal_price, intval(constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_' . $mode . '_INSURANCE')));
                 //итоговая стоимость доставки = доставка + плата за сбор посылки + страховой процент
                 $shipping_cost = $shipping + $insurance_price;
                 //БЕСПЛАТНАЯ ДОСТАВКА
                 if (intval(constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_' . $mode . '_FREE')) > 0) {
                     if ($_SESSION['cart']->show_total() >= intval(constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_' . $mode . '_FREE'))) {
                         $shipping_cost = 0;
                     }
                 }
             } else {
                 //итоговая стоимость доставки = доставка + плата за сбор посылки
                 $shipping_cost = $shipping;
                 //БЕСПЛАТНАЯ ДОСТАВКА
                 if (intval(constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_INTER_FREE')) > 0) {
                     if ($_SESSION['cart']->show_total() >= intval(constant('MODULE_SHIPPING_RUSSIANPOSTPREPAY_INTER_FREE'))) {
                         $shipping_cost = 0;
                     }
                 }
             }
         }
     }
     $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_RUSSIANPOSTPREPAY_TEXT_TITLE_PREPAY, 'methods' => array(array('id' => $this->code, 'title' => $shipping_method, 'cost' => ceil($shipping_cost))));
     if ($this->tax_class > 0) {
         $this->quotes['tax'] = vam_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
     }
     if (vam_not_null($this->icon)) {
         $this->quotes['icon'] = vam_image($this->icon, $this->title);
     }
     if ($error == true) {
         $this->quotes['error'] = $err_msg;
     }
     return $this->quotes;
 }
예제 #28
0
        ?>
 </td>
  </tr>

<?php 
    }
    ?>

</table>
<span class="button"><button type="submit" class="button" value="<?php 
    echo BUTTON_SAVE;
    ?>
" onClick="return confirm('<?php 
    echo SAVE_ENTRY;
    ?>
')"><?php 
    echo vam_image(DIR_WS_IMAGES . 'icons/buttons/save.png', '', '12', '12');
    ?>
&nbsp;<?php 
    echo BUTTON_SAVE;
    ?>
</button></span>
</form>
<?php 
}
?>

</td>
</tr>
</td>
                </tr>
                <tr>
                  <td align="center" class="dataTableContent" colspan="4"><b><?php 
echo TEXT_SUMMARY;
?>
</b></td>
                </tr>
                <tr>
                  <td colspan="4"><?php 
echo vam_draw_separator();
?>
</td>
                </tr>
                <tr>
                  <td align="right" class="dataTableContent" colspan="4"><?php 
echo '<a class="button" href="' . vam_href_link(FILENAME_AFFILIATE_CLICKS, 'acID=' . $_GET['acID']) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/information.png', '', '12', '12') . '&nbsp;' . IMAGE_CLICKTHROUGHS . '</span></a> <a class="button" href="' . vam_href_link(FILENAME_AFFILIATE_SALES, 'acID=' . $_GET['acID']) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/information.png', '', '12', '12') . '&nbsp;' . IMAGE_SALES . '</span></a>';
?>
</td>
                </tr>
              </center>
            </table></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
<!-- body_text_eof //-->
  </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
예제 #30
0
                    }
                } else {
                    if (strlen($value['value']) > 30) {
                        $keys .= substr($value['value'], 0, 30) . ' ...';
                    } else {
                        $keys .= $value['value'];
                    }
                }
                $keys .= '<br /><br />';
            }
            $keys = substr($keys, 0, strrpos($keys, '<br /><br />'));
            $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_MODULES, 'set=' . $_GET['set'] . '&module=' . $mInfo->code . '&action=remove') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_MODULE_REMOVE . '</span></a> <a class="button" href="' . vam_href_link(FILENAME_MODULES, 'set=' . $_GET['set'] . '&module=' . $_GET['module'] . '&action=edit') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/edit.png', '', '12', '12') . '&nbsp;' . BUTTON_EDIT . '</span></a>');
            $contents[] = array('text' => '<br />' . $mInfo->description);
            $contents[] = array('text' => '<br />' . $keys);
        } else {
            $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_MODULES, 'set=' . $_GET['set'] . '&module=' . $mInfo->code . '&action=install') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/submit.png', '', '12', '12') . '&nbsp;' . BUTTON_MODULE_INSTALL . '</span></a>');
            $contents[] = array('text' => '<br />' . $mInfo->description);
        }
        break;
}
if (vam_not_null($heading) && vam_not_null($contents)) {
    echo '            <td width="25%" valign="top">' . "\n";
    $box = new box();
    echo $box->infoBox($heading, $contents);
    echo '            </td>' . "\n";
}
?>
          </tr>
        </table></td>
      </tr>
    </table></td>