function vam_create_sort_heading($sortby, $colnum, $heading)
{
    $sort_prefix = '';
    $sort_suffix = '';
    if ($sortby) {
        $sort_prefix = '<a href="' . vam_href_link(basename($_SERVER['PHP_SELF']), vam_get_all_get_params(array('page', 'info', 'sort')) . 'page=1&sort=' . $colnum . ($sortby == $colnum . 'a' ? 'd' : 'a')) . '" title="' . TEXT_SORT_PRODUCTS . ($sortby == $colnum . 'd' || substr($sortby, 0, 1) != $colnum ? TEXT_ASCENDINGLY : TEXT_DESCENDINGLY) . TEXT_BY . $heading . '" class="productListing-heading">';
        $sort_suffix = (substr($sortby, 0, 1) == $colnum ? substr($sortby, 1, 1) == 'a' ? '+' : '-' : '') . '</a>';
    }
    return $sort_prefix . $heading . $sort_suffix;
}
Ejemplo n.º 2
0
                    //}
                } else {
                    if (isset($_SESSION['cart'])) {
                        $_SESSION['cart']->add_cart((int) $_GET['BUYproducts_id'], $_SESSION['cart']->get_quantity((int) $_GET['BUYproducts_id']) + 1);
                    } else {
                        vam_redirect(vam_href_link(FILENAME_DEFAULT));
                    }
                }
            }
            if (vam_has_product_attributes($_GET['BUYproducts_id'])) {
                if (AJAX_CART == 'false') {
                    vam_redirect(vam_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . (int) $_GET['BUYproducts_id']));
                }
            } else {
                vam_redirect(vam_href_link($goto, vam_get_all_get_params(array('action', 'BUYproducts_id'))));
            }
            break;
        case 'cust_order':
            if (isset($_GET['pid'])) {
                if (vam_has_product_attributes((int) $_GET['pid'])) {
                    vam_redirect(vam_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . (int) $_GET['pid']));
                } else {
                    $_SESSION['cart']->add_cart((int) $_GET['pid'], $_SESSION['cart']->get_quantity((int) $_GET['pid']) + 1);
                }
            }
            if (AJAX_CART == 'false') {
                vam_redirect(vam_href_link($goto, vam_get_all_get_params($parameters)));
            }
            break;
    }
}
              </tr>
            </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 
Ejemplo n.º 4
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;
 }
?>
&nbsp;<?php 
echo TAB_STATUS;
?>
</a></li>
			</ul>

        <div id="chart">

			<table border="0" width="95%" cellspacing="0" cellpadding="0">
			    <tr>
					<td valign="top" width="100%" align="center">

<?php 
include DIR_WS_CLASSES . 'ofc-library/open_flash_chart_object.php';
open_flash_chart_object('100%', 250, vam_href_link('chart_data.php', vam_get_all_get_params(), 'NONSSL'), false);
?>
					</td>
				</tr>
<?php 
if (strlen($report->previous . " " . $report->next) > 1) {
    ?>
										<tr>
											<td width=100% colspan=5>
												<table width=100%>
													<tr>
														<td align=left>
<?php 
    if (strlen($report->previous) > 0) {
        echo '<a href="' . vam_href_link(FILENAME_STATS_SALES_REPORT2, $report->previous, 'NONSSL') . '">&lt;&lt;&nbsp;' . TEXT_PREVIOUS . '</a>';
    }
Ejemplo n.º 6
0
 $heading = array();
 $contents = array();
 switch ($_GET['action']) {
     case 'delete':
         $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_ORDER . '</b>');
         $contents = array('form' => vam_draw_form('orders', FILENAME_ORDERS, vam_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=deleteconfirm'));
         $contents[] = array('text' => TEXT_INFO_DELETE_INTRO . '<br /><br /><b>' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '</b>');
         $contents[] = array('text' => '<br />' . vam_draw_checkbox_field('restock') . ' ' . TEXT_INFO_RESTOCK_PRODUCT_QUANTITY);
         $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_ORDERS, vam_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_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->orders_id . ']&nbsp;&nbsp;' . vam_datetime_short($oInfo->date_purchased) . '</b>');
             $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_ORDERS, vam_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_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_ORDERS, vam_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=delete') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</span></a>&nbsp;<a class="button" href="' . vam_href_link(FILENAME_PRINT_ORDER, 'oID=' . $oInfo->orders_id) . '" target="_blank"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/payment.png', '', '12', '12') . '&nbsp;' . BUTTON_INVOICE . '</span></a>&nbsp;<a class="button" href="' . vam_href_link(FILENAME_PRINT_PACKINGSLIP, 'oID=' . $oInfo->orders_id) . '" target="_blank"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/shipping.png', '', '12', '12') . '&nbsp;' . BUTTON_PACKINGSLIP . '</span></a>');
             if (AFTERBUY_ACTIVATED == 'true') {
                 $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_ORDERS, vam_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=afterbuy_send') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/submit.png', '', '12', '12') . '&nbsp;' . BUTTON_AFTERBUY_SEND . '</span></a>');
             }
             //$contents[] = array('align' => 'center', 'text' => '');
             $order_payment = $oInfo->payment_method;
             require DIR_FS_LANGUAGES . $_SESSION['language'] . '/modules/payment/' . $order_payment . '.php';
             $order_payment_text = constant(MODULE_PAYMENT_ . strtoupper($order_payment) . _TEXT_TITLE);
             $contents[] = array('text' => '<br />' . TEXT_DATE_ORDER_CREATED . ' ' . vam_date_short($oInfo->date_purchased));
             if (vam_not_null($oInfo->last_modified)) {
                 $contents[] = array('text' => TEXT_DATE_ORDER_LAST_MODIFIED . ' ' . vam_date_short($oInfo->last_modified));
             }
             $contents[] = array('text' => '<br />' . TEXT_INFO_PAYMENT_METHOD . ' ' . $order_payment_text);
             $contents[] = array('text' => '<br />' . ENTRY_SHIPPING_METHOD . ' ' . $oInfo->shipping_method);
             // elari added to display product list for selected order
             $order = new order($oInfo->orders_id);
             $contents[] = array('text' => $order->customer['email_address']);
             $contents[] = array('text' => $order->customer['telephone']);
Ejemplo n.º 7
0
    ?>
</td>
          </tr>
<?php 
}
if ($affiliate_sales_numrows > 0) {
    ?>
          <tr>
            <td colspan="7"><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td class="smallText" valign="top"><?php 
    echo $affiliate_sales_split->display_count($affiliate_sales_numrows, MAX_DISPLAY_ADMIN_PAGE, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_SALES);
    ?>
</td>
                <td class="smallText" align="right"><?php 
    echo $affiliate_sales_split->display_links($affiliate_sales_numrows, MAX_DISPLAY_ADMIN_PAGE, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], vam_get_all_get_params(array('page', 'info', 'x', 'y')));
    ?>
</td>
              </tr>
            </table></td>
          </tr>
<?php 
}
?>
        </table></td>
      </tr>
    </table></td>
<!-- body_text_eof //-->
  </tr>
</table>
<!-- body_eof //-->
Ejemplo n.º 8
0
    echo TEXT_NO_CLICKS;
    ?>
</td>
              </tr>
<?php 
}
?>
              <tr>
                <td class="smallText" colspan="7"><table border="0" width="100%" cellspacing="0" cellpadding="2">
                  <tr>
                    <td class="smallText" valign="top"><?php 
echo $affiliate_clickthroughs_split->display_count($affiliate_clickthroughs_numrows, MAX_DISPLAY_ADMIN_PAGE, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_CLICKS);
?>
</td>
                    <td class="smallText" align="right"><?php 
echo $affiliate_clickthroughs_split->display_links($affiliate_clickthroughs_numrows, MAX_DISPLAY_ADMIN_PAGE, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], vam_get_all_get_params(array('page', 'oID', 'action')));
?>
</td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
<!-- body_text_eof //-->
  </tr>
</table>
<!-- body_eof //-->
Ejemplo n.º 9
0
                    $tax = vam_db_fetch_array($tax_query);
                    $price = $price * ($tax[tax_rate] + 100) / 100;
                    $price_string = '' . TEXT_PRODUCTS_PRICE_INFO . '&nbsp;' . $currencies->format($price) . ' - ' . TXT_NETTO . $currencies->format($price_netto);
                }
                $contents[] = array('text' => '<div style="padding-left: 30px;">' . $price_string . '</div><div style="padding-left: 30px;">' . TEXT_PRODUCTS_DISCOUNT_ALLOWED_INFO . '&nbsp;' . $pInfo->products_discount_allowed . '</div><div style="padding-left: 30px;">' . TEXT_PRODUCTS_QUANTITY_INFO . '&nbsp;' . $pInfo->products_quantity . '</div>');
                // END IN-SOLUTION
                //$contents[] = array('text' => '<br />' . TEXT_PRODUCTS_PRICE_INFO . ' ' . $currencies->format($pInfo->products_price) . '<br />' . TEXT_PRODUCTS_QUANTITY_INFO . ' ' . $pInfo->products_quantity);
                $contents[] = array('text' => '<div style="padding-left: 30px; padding-bottom: 10px;">' . TEXT_PRODUCTS_AVERAGE_RATING . ' ' . number_format($pInfo->average_rating, 2) . ' %</div>');
                $contents[] = array('text' => '<div style="padding-left: 30px; padding-bottom: 10px;">' . TEXT_PRODUCT_LINKED_TO . '<br />' . vam_output_generated_category_path($pInfo->products_id, 'product') . '</div>');
                $contents[] = array('align' => 'center', 'text' => '<div style="padding: 10px;">' . vam_product_thumb_image($pInfo->products_image, $pInfo->products_name) . '</div><div style="padding-bottom: 10px;">' . $pInfo->products_image . '</div>');
            }
        } else {
            // create category/product info
            $heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');
            $contents[] = array('text' => sprintf(TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS, vam_get_categories_name($current_category_id, $_SESSION['languages_id'])));
            $contents[] = array('align' => 'center', 'text' => '<table border=0><tr><td align="center"><a class="button" href="' . vam_href_link(FILENAME_CATEGORIES, vam_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&action=new_category') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/categories.png', '', '12', '12') . '&nbsp;' . BUTTON_NEW_CATEGORIES . '</span></a></td></tr><tr><td align="center"><a class="button" href="' . vam_href_link(FILENAME_CATEGORIES, vam_get_all_get_params(array('cPath', 'action', 'pID', 'cID')) . 'cPath=' . $cPath . '&action=new_product') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/products.png', '', '12', '12') . '&nbsp;' . BUTTON_NEW_PRODUCTS . '</span></a></td></tr></table>');
        }
        break;
}
if (vam_not_null($heading) && vam_not_null($contents)) {
    //display info box
    echo '<td valign="top">' . "\n";
    $box = new box();
    echo $box->infoBox($heading, $contents);
    echo '</td>' . "\n";
}
?>
        </tr>
        </table>
     </td>
    </tr>
Ejemplo n.º 10
0
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(add_a_quickie.php,v 1.10 2001/12/19); www.oscommerce.com 
   (c) 2004	 xt:Commerce (add_a_quickie.php,v 1.10 2003/08/13); xt-commerce.com 

   Released under the GNU General Public License 
   -----------------------------------------------------------------------------------------
   Third Party contribution:
   Add A Quickie v1.0 Autor  Harald Ponce de Leon
    
   Released under the GNU General Public License
   ---------------------------------------------------------------------------------------*/
// reset var
$box = new vamTemplate();
$box_content = '';
$box->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
$box->assign('FORM_ACTION', '<form id="quick_add" method="post" action="' . vam_href_link(basename($PHP_SELF), vam_get_all_get_params(array('action')) . 'action=add_a_quickie', 'NONSSL') . '">');
$box->assign('INPUT_FIELD', vam_draw_input_field('quickie', '', 'id="quick_add_quickie"'));
$box->assign('SUBMIT_BUTTON', vam_image_submit('search.png', BOX_HEADING_ADD_PRODUCT_ID));
$box->assign('FORM_END', '</form>');
$box->assign('BOX_CONTENT', $box_content);
$box->assign('language', $_SESSION['language']);
// set cache ID
if (!CacheCheck()) {
    $box->caching = 0;
    $box_add_a_quickie = $box->fetch(CURRENT_TEMPLATE . '/boxes/box_add_a_quickie.html');
} else {
    $box->caching = 1;
    $box->cache_lifetime = CACHE_LIFETIME;
    $box->cache_modified_check = CACHE_CHECK;
    $cache_id = $_SESSION['language'];
    $box_add_a_quickie = $box->fetch(CURRENT_TEMPLATE . '/boxes/box_add_a_quickie.html', $cache_id);
Ejemplo n.º 11
0
while ($products = vam_db_fetch_array($products_query_raw)) {
    $rows++;
    if ($rows / 2 == floor($rows / 2)) {
        $css_class = 'view_data_even';
    } else {
        $css_class = 'view_data_odd';
    }
    $price = $products['products_price'];
    $price = vam_round($price, PRICE_PRECISION);
    ?>
              <tr>
                <td class="<?php 
    echo $css_class;
    ?>
"><a href="<?php 
    echo vam_href_link(FILENAME_CATEGORIES, vam_get_all_get_params(array('pID', 'action')) . 'pID=' . $products['products_id'] . '&action=new_product');
    ?>
"><?php 
    echo $products['products_name'];
    ?>
</a></td>
                <td class="<?php 
    echo $css_class;
    ?>
"><?php 
    echo $currencies->format($price);
    ?>
</td>
                <td class="<?php 
    echo $css_class;
    ?>
}
if (strlen($_GET['pfrom']) > 0 && !(($errorno & 10000) == 10000) && strlen($_GET['pto']) > 0 && !(($errorno & 100000) == 100000)) {
    if ($pfrom_to_check > $pto_to_check) {
        $errorno += 1000000;
        $error = 1;
    }
}
if (strlen($_GET['keywords']) > 0) {
    if (!vam_parse_search_string(stripslashes($_GET['keywords']), $search_keywords)) {
        $errorno += 10000000;
        $error = 1;
        $keyerror = 1;
    }
}
if ($error == 1 && $keyerror != 1) {
    vam_redirect(vam_href_link(FILENAME_ADVANCED_SEARCH, 'errorno=' . $errorno . '&' . vam_get_all_get_params(array('x', 'y'))));
} else {
    /*
     *    search process starts here
     */
    $breadcrumb->add(NAVBAR_TITLE1_ADVANCED_SEARCH, vam_href_link(FILENAME_ADVANCED_SEARCH));
    $breadcrumb->add(NAVBAR_TITLE2_ADVANCED_SEARCH, vam_href_link(FILENAME_ADVANCED_SEARCH_RESULT, 'keywords=' . htmlspecialchars(vam_db_input($_GET['keywords'])) . '&search_in_description=' . vam_db_input($_GET['search_in_description']) . '&categories_id=' . (int) $_GET['categories_id'] . '&inc_subcat=' . vam_db_input($_GET['inc_subcat']) . '&manufacturers_id=' . (int) $_GET['manufacturers_id'] . '&pfrom=' . vam_db_input($_GET['pfrom']) . '&pto=' . vam_db_input($_GET['pto']) . '&dfrom=' . vam_db_input($_GET['dfrom']) . '&dto=' . vam_db_input($_GET['dto'])));
    require DIR_WS_INCLUDES . 'header.php';
    // define additional filters //
    //fsk18 lock
    if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
        $fsk_lock = " AND p.products_fsk18 != '1' ";
    } else {
        unset($fsk_lock);
    }
    //group check
Ejemplo n.º 13
0
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(currencies.php,v 1.16 2003/02/12); www.oscommerce.com 
   (c) 2003	 nextcommerce (currencies.php,v 1.11 2003/08/17); www.nextcommerce.org
   (c) 2004	 xt:Commerce (currencies.php,v 1.11 2003/08/13); xt-commerce.com 

   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
// include functions
require_once DIR_FS_INC . 'vam_hide_session_id.inc.php';
if (isset($vamPrice) && is_object($vamPrice)) {
    $currencies_string = '';
    $count_cur = '';
    reset($vamPrice->currencies);
    while (list($key, $value) = each($vamPrice->currencies)) {
        $count_cur++;
        $currencies_string .= ' <a href="' . vam_href_link(basename($PHP_SELF), 'currency=' . $key . '&' . vam_get_all_get_params(array('language', 'currency')), $request_type) . '">' . $value['title'] . '</a> ';
    }
    $hidden_get_variables = '';
    reset($_GET);
    while (list($key, $value) = each($_GET)) {
        if ($key != 'currency' && $key != vam_session_name() && $key != 'x' && $key != 'y') {
            $hidden_get_variables .= vam_draw_hidden_field($key, $value);
        }
    }
}
// dont show box if there's only 1 currency
if ($count_cur > 1) {
    $box->assign('BOX_CONTENT', $currencies_string . $hidden_get_variables);
    $box->assign('language', $_SESSION['language']);
    // set cache ID
    if (!CacheCheck()) {
Ejemplo n.º 14
0
        $product = vam_db_fetch_array($product_query);
        $sInfo = new objectInfo($product);
    } else {
        $sInfo = new objectInfo(array());
        // create an array of products on special, which will be excluded from the pull down menu of products
        // (when creating a new product on special)
        $specials_array = array();
        $specials_query = vam_db_query("select p.products_id from " . TABLE_PRODUCTS . " p, " . TABLE_SPECIALS . " s where s.products_id = p.products_id");
        while ($specials = vam_db_fetch_array($specials_query)) {
            $specials_array[] = $specials['products_id'];
        }
    }
    $per = $sInfo->discount_type == "p" ? "%" : "";
    ?>
<form name="new_special" <?php 
    echo 'action="' . vam_href_link(FILENAME_CATEGORY_SPECIALS, vam_get_all_get_params(array('action', 'info', 'sID')) . 'action=' . $form_action, 'NONSSL') . '"';
    ?>
 method="post">
        <td><br /><table border="0" cellspacing="0" cellpadding="2">
      <tr><?php 
    if ($form_action == 'update') {
        echo vam_draw_hidden_field('specials_id', $_GET['sID']);
    }
    ?>
        <td><br>
          <table border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><?php 
    echo TEXT_SPECIALS_CATEGORY;
    ?>
&nbsp;</td>
Ejemplo n.º 15
0
                        } elseif (vam_not_null($_POST['dest_category_id'])) {
                            $dest_category_id = vam_db_prepare_input($_POST['dest_category_id']);
                            if ($_POST['copy_as'] == 'link') {
                                $catfunc->link_product($product_id, $dest_category_id);
                            } elseif ($_POST['copy_as'] == 'duplicate') {
                                $catfunc->duplicate_product($product_id, $dest_category_id);
                            } else {
                                $messageStack->add_session('Copy type not specified.', 'error');
                            }
                        }
                    }
                }
                vam_redirect(vam_href_link(FILENAME_CATEGORIES, 'cPath=' . $dest_category_id . '&' . vam_get_all_get_params(array('cPath', 'action', 'pID', 'cID'))));
            }
            // --- MULTI COPY ENDS ---
            vam_redirect(vam_href_link(FILENAME_CATEGORIES, 'cPath=' . $_GET['cPath'] . '&' . vam_get_all_get_params(array('cPath', 'action', 'pID', 'cID'))));
            break;
            #EOB multi_action_confirm
    }
    //EOB switch action
}
//EOB if action
// check if the catalog image directory exists
if (is_dir(DIR_FS_CATALOG_IMAGES)) {
    if (!is_writeable(DIR_FS_CATALOG_IMAGES)) {
        $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_NOT_WRITEABLE, 'error');
    }
} else {
    $messageStack->add(ERROR_CATALOG_IMAGE_DIRECTORY_DOES_NOT_EXIST, 'error');
}
// end of pre-checks and actions, HTML output follows
Ejemplo n.º 16
0
     }
     if ($cInfo->customers_id == 1 && $_SESSION['customer_id'] == 1) {
         $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_CUSTOMERS, vam_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/edit.png', '', '12', '12') . '&nbsp;' . BUTTON_EDIT . '</span></a>');
     }
     if ($cInfo->customers_id != 1) {
         $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_CUSTOMERS, vam_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=confirm') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</span></a>');
     }
     if ($cInfo->customers_id != 1) {
         $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_CUSTOMERS, vam_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=editstatus') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/customer_status.png', '', '12', '12') . '&nbsp;' . BUTTON_STATUS . '</span></a>');
     }
     // elari cs v3.x changed for added accounting module
     if ($cInfo->customers_id != 1) {
         $contents[] = array('align' => 'center', 'text' => '<a class="button" ' . ($cs_id != 0 ? 'onClick="alert(\'Сначала определите пользователя в группу Админ (кнопка Статус покупателя)!\\nДоступ в админку можно настраивать только для пользователей, состоящих в группе Админ.\');"' : '') . ' href="' . vam_href_link(FILENAME_ACCOUNTING, vam_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/gear.png', '', '12', '12') . '&nbsp;' . BUTTON_ACCOUNTING . '</span></a>');
     }
     // elari cs v3.x changed for added iplog module
     $contents[] = array('align' => 'center', 'text' => '<table><tr><td style="text-align: center;"><a class="button" href="' . vam_href_link(FILENAME_ORDERS, 'cID=' . $cInfo->customers_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/categories.png', '', '12', '12') . '&nbsp;' . BUTTON_ORDERS . '</span></a></td><td style="text-align: center;"><a class="button" href="' . vam_href_link(FILENAME_MAIL, 'selected_box=tools&customer=' . $cInfo->customers_email_address) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/email.png', '', '12', '12') . '&nbsp;' . BUTTON_EMAIL . '</span></a></td></tr><tr><td style="text-align: center;"><a class="button" href="' . vam_href_link(FILENAME_CUSTOMERS, vam_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=iplog') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/ip.png', '', '12', '12') . '&nbsp;' . BUTTON_IPLOG . '</span></a></td><td style="text-align: center;"><a class="button" href="' . vam_href_link(FILENAME_CUSTOMERS, vam_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=new_order') . '" onClick="return confirm(\'' . NEW_ORDER . '\')"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/add.png', '', '12', '12') . '&nbsp;' . BUTTON_NEW_ORDER . '</span></a></td></tr></table>');
     $contents[] = array('text' => '<br />' . TEXT_DATE_ACCOUNT_CREATED . ' ' . vam_date_short($cInfo->date_account_created));
     $contents[] = array('text' => '<br />' . TEXT_DATE_ACCOUNT_LAST_MODIFIED . ' ' . vam_date_short($cInfo->date_account_last_modified));
     $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_LAST_LOGON . ' ' . vam_date_short($cInfo->date_last_logon));
     $contents[] = array('text' => '<br />' . TEXT_INFO_NUMBER_OF_LOGONS . ' ' . $cInfo->number_of_logons);
     $contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY . ' ' . $cInfo->countries_name);
     $contents[] = array('text' => '<br />' . TEXT_INFO_NUMBER_OF_REVIEWS . ' ' . $cInfo->number_of_reviews);
 }
 if ($_GET['action'] == 'iplog') {
     if (isset($_GET['cID'])) {
         $contents[] = array('text' => '<br /><b>IPLOG :');
         $customers_id = vam_db_prepare_input($_GET['cID']);
         $customers_log_info_array = vam_get_user_info($customers_id);
         if (vam_db_num_rows($customers_log_info_array)) {
             while ($customers_log_info = vam_db_fetch_array($customers_log_info_array)) {
                 $contents[] = array('text' => '<tr>' . "\n" . '<td class="smallText">' . $customers_log_info['customers_ip_date'] . ' ' . $customers_log_info['customers_ip'] . ' ' . $customers_log_info['customers_advertiser']);
Ejemplo n.º 17
0
    ?>
				  
		    <li><?php 
    echo '<a class="button" href="' . vam_href_link(FILENAME_PRINT_ORDER, 'oID=' . $_GET['oID']) . '" TARGET="_blank"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/payment.png', '', '12', '12') . '&nbsp;' . BUTTON_INVOICE . '</span></a>';
    ?>
</li>
		    <li><?php 
    echo '<a class="button" href="' . vam_href_link(FILENAME_PRINT_PACKINGSLIP, 'oID=' . $_GET['oID']) . '" TARGET="_blank"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/shipping.png', '', '12', '12') . '&nbsp;' . BUTTON_PACKINGSLIP . '</span></a>';
    ?>
</li>
		    <li><?php 
    echo '<a class="button" href="' . vam_href_link(FILENAME_ORDERS, vam_get_all_get_params(array('oID', 'action')) . 'oID=' . $_GET['oID'] . '&action=edit') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/back.png', '', '12', '12') . '&nbsp;' . BUTTON_BACK_TO_ORDER . '</span></a>';
    ?>
</li>
		    <li><?php 
    echo '<a class="button" href="' . vam_href_link(FILENAME_ORDERS, vam_get_all_get_params(array('action'))) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/back.png', '', '12', '12') . '&nbsp;' . BUTTON_BACK_TO_ORDERS_LIST . '</span></a> ';
    ?>
</li>
		  </ul>
      
	  </div>

  	    <div id="ordersMessageStack"></div>
	   
<div id="tabs">

			<ul>
				<li><a href="#customer"><?php 
    echo vam_image(DIR_WS_IMAGES . 'icons/tabs/customer.png', '', '16', '16');
    ?>
&nbsp;<?php 
Ejemplo n.º 18
0
            <td class="main"><?php 
echo vam_draw_textarea_field('mail_comments', 'soft', '60', '5', $mail_comments);
?>
</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php 
echo vam_draw_separator('pixel_trans.gif', '1', '10');
?>
</td>
      </tr>
      <tr>
        <td align="right" class="main"><?php 
echo '<span class="button"><button type="submit" value="' . BUTTON_INSERT . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/submit.png', '', '12', '12') . '&nbsp;' . BUTTON_INSERT . '</button></span> <a class="button" href="' . vam_href_link(FILENAME_CUSTOMERS, vam_get_all_get_params(array('action'))) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>';
?>
</td>
      </tr></form>
      </table></td>
      </tr>
    </table></td>
<!-- body_text_eof //-->
  </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php 
require DIR_WS_INCLUDES . 'footer.php';
?>
Ejemplo n.º 19
0
    $history_query = vam_db_query($history_split->sql_query);
    while ($history = vam_db_fetch_array($history_query)) {
        $products_query = vam_db_query("select count(*) as count from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . $history['orders_id'] . "'");
        $products = vam_db_fetch_array($products_query);
        if (vam_not_null($history['delivery_name'])) {
            $order_type = TEXT_ORDER_SHIPPED_TO;
            $order_name = $history['delivery_name'];
        } else {
            $order_type = TEXT_ORDER_BILLED_TO;
            $order_name = $history['billing_name'];
        }
        $module_content[] = array('ORDER_ID' => $history['orders_id'], 'ORDER_STATUS' => $history['orders_status_name'], 'ORDER_DATE' => vam_date_long($history['date_purchased']), 'ORDER_PRODUCTS' => $products['count'], 'ORDER_TOTAL' => strip_tags($history['order_total']), 'ORDER_BUTTON' => '<a class="button" href="' . vam_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'page=' . (empty($_GET['page']) ? "1" : (int) $_GET['page']) . '&order_id=' . $history['orders_id'], 'SSL') . '">' . vam_image_button('view.png', SMALL_IMAGE_BUTTON_VIEW) . '</a>');
    }
}
if ($orders_total > 0) {
    $vamTemplate->assign('SPLIT_BAR', TEXT_RESULT_PAGE . ' ' . $history_split->display_links(MAX_DISPLAY_PAGE_LINKS, vam_get_all_get_params(array('page', 'info', 'x', 'y'))));
    $vamTemplate->assign('SPLIT_BAR_PAGES', $history_split->display_count(TEXT_DISPLAY_NUMBER_OF_ORDERS));
}
$vamTemplate->assign('order_content', $module_content);
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->assign('BUTTON_BACK', '<a class="button" href="' . vam_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . vam_image_button('back.png', IMAGE_BUTTON_BACK) . '</a>');
$vamTemplate->caching = 0;
$main_content = $vamTemplate->fetch(CURRENT_TEMPLATE . '/module/account_history.html');
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->assign('main_content', $main_content);
$vamTemplate->caching = 0;
if (!defined(RM)) {
    $vamTemplate->load_filter('output', 'note');
}
$template = file_exists('templates/' . CURRENT_TEMPLATE . '/' . FILENAME_ACCOUNT_HISTORY . '.html') ? CURRENT_TEMPLATE . '/' . FILENAME_ACCOUNT_HISTORY . '.html' : CURRENT_TEMPLATE . '/index.html';
$vamTemplate->display($template);
Ejemplo n.º 20
0
              <tr>
                <td class="<?php 
    echo $css_class;
    ?>
" align="left"><a href="<?php 
    echo vam_href_link(FILENAME_CUSTOMERS, vam_get_all_get_params(array('cID')) . 'cID=' . $customers['customers_id'] . '&action=edit');
    ?>
"><?php 
    echo $customers['customers_lastname'];
    ?>
</a></td>
                <td class="<?php 
    echo $css_class;
    ?>
" align="left"><a href="<?php 
    echo vam_href_link(FILENAME_CUSTOMERS, vam_get_all_get_params(array('cID')) . 'cID=' . $customers['customers_id'] . '&action=edit');
    ?>
"><?php 
    echo $customers['customers_firstname'];
    ?>
</a></td>
                <td class="<?php 
    echo $css_class;
    ?>
"><?php 
    echo $customers['customers_date_added'];
    ?>
</td>
              </tr>
<?php 
}
Ejemplo n.º 21
0
    $listing_sql = "select a.articles_id, a.articles_image, a.authors_id, a.articles_date_added, ad.articles_name, ad.articles_description, ad.articles_head_desc_tag, au.authors_name, td.topics_name, a2t.topics_id from " . TABLE_ARTICLES . " a left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_DESCRIPTION . " ad, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_status = '1' and a.articles_id = a2t.articles_id and ad.articles_id = a2t.articles_id and ad.language_id = '" . (int) $_SESSION['languages_id'] . "' and td.language_id = '" . (int) $_SESSION['languages_id'] . "' and a2t.topics_id = '" . (int) $current_topic_id . "' order by a.sort_order, ad.articles_name";
}
if ($_GET['akeywords'] != "") {
    $_GET['akeywords'] = urldecode($_GET['akeywords']);
    if (isset($_GET['description'])) {
        $listing_sql = "select ad.articles_name, a.articles_image, a.articles_date_added, a.articles_date_available, a.articles_id, ad.articles_description from " . TABLE_ARTICLES_DESCRIPTION . " ad inner join " . TABLE_ARTICLES . " a on ad.articles_id = a.articles_id where a.articles_status = '1' and ad.language_id = '" . (int) $_SESSION['languages_id'] . "' and (ad.articles_name like '%" . $_GET['akeywords'] . "%' or ad.articles_description like '%" . $_GET['akeywords'] . "%' or ad.articles_head_desc_tag like '%" . $_GET['akeywords'] . "%' or ad.articles_head_keywords_tag like '%" . $_GET['akeywords'] . "%' or ad.articles_head_title_tag like '%" . $_GET['akeywords'] . "%') order by ad.articles_name ASC";
    } else {
        $listing_sql = "select ad.articles_name, a.articles_image, a.articles_date_added, a.articles_date_available, a.articles_id, ad.articles_description from " . TABLE_ARTICLES_DESCRIPTION . " ad inner join " . TABLE_ARTICLES . " a on ad.articles_id = a.articles_id where a.articles_status='1' and ad.language_id = '" . (int) $_SESSION['languages_id'] . "' and (ad.articles_name like '%" . $_GET['akeywords'] . "%' or ad.articles_head_desc_tag like '%" . $_GET['akeywords'] . "%' or ad.articles_head_keywords_tag like '%" . $_GET['akeywords'] . "%' or ad.articles_head_title_tag like '%" . $_GET['akeywords'] . "%') order by a.sort_order, ad.articles_name ASC";
    }
}
if ($topic_depth == 'top' || !isset($_GET['tPath'])) {
    $listing_sql = "select a.articles_id, a.articles_image, a.articles_date_added, a.articles_date_available, ad.articles_name, ad.articles_description, ad.articles_head_desc_tag, ad.articles_viewed, au.authors_id, au.authors_name, td.topics_id, td.topics_name from " . TABLE_ARTICLES . " a left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id, " . TABLE_ARTICLES_DESCRIPTION . " ad where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_id = a2t.articles_id and a.articles_status = '1' and a.articles_id = ad.articles_id and ad.language_id = '" . (int) $_SESSION['languages_id'] . "' and td.language_id = '" . (int) $_SESSION['languages_id'] . "' ORDER BY IF (`a`.`articles_date_available`,`a`.`articles_date_available`, `a`.`articles_date_added`) DESC";
}
$articles_split = new splitPageResults($listing_sql, $_GET['page'], MAX_ARTICLES_PER_PAGE);
if ($articles_split->number_of_rows > 0) {
    $vamTemplate->assign('NAVIGATION_BAR', $articles_split->display_links(MAX_DISPLAY_PAGE_LINKS, vam_get_all_get_params(array('page', 'info', 'x', 'y'))));
    $vamTemplate->assign('NAVIGATION_BAR_PAGES', $articles_split->display_count(TEXT_DISPLAY_NUMBER_OF_ARTICLES));
}
$module_content = '';
if ($articles_split->number_of_rows > 0) {
    $vamTemplate->assign('no_articles', 'false');
    $articles_query = vam_db_query($articles_split->sql_query);
    while ($articles = vam_db_fetch_array($articles_query)) {
        /*
        $qI=0; $qIcon='';
        if ($qI=strpos($$articles['content'],'src="')) {
        $qI=$qI+5;
        $qIcon=substr ($$articles['content'] , $qI);
        $qI=strpos($qIcon,'"');
        $qIcon='<img class="newsImage" src="'.substr ($qIcon, 0,$qI).'" alt="Image" />';
        }
Ejemplo n.º 22
0
    if (SPECIFICATIONS_FILTER_SUBCATEGORIES == 'True' && count($subcategories_array) > 0) {
        $category_ids = $current_category_id . ',' . implode(',', $subcategories_array);
        $listing_sql .= '   ' . "and p2c.categories_id in (" . $category_ids . ") \n";
    } else {
        $listing_sql .= '   ' . "and p2c.categories_id = '" . (int) $current_category_id . "' \n";
    }
}
// if ($current_category_id
$listing_sql .= '   ' . $fsk_lock;
$listing_sql .= '   ' . $group_check;
$listing_sql .= '   ' . $sorting;
// print $listing_sql . "<br>\n";
// Add Filter to Breadcrumbs if selected
if (SPECIFICATIONS_FILTER_BREADCRUMB == 'True') {
    foreach ($specs_array_breadcrumb as $crumb) {
        $breadcrumb->add($crumb['specification_name'] . ' : ' . $crumb['value'] . ' <span class="close">[X]</span>', vam_href_link(FILENAME_PRODUCTS_FILTERS, vam_get_all_get_params(array('f' . $crumb['specifications_id']))));
    }
}
?>

<?php 
// Show the Filters module here if set in Admin
//  if (SPECIFICATIONS_FILTERS_MODULE == 'True') {
//  require (DIR_WS_MODULES . 'products_filter.php');
// }
?>

<?php 
require DIR_WS_INCLUDES . 'header.php';
include DIR_WS_MODULES . FILENAME_PRODUCT_LISTING;
$vamTemplate->assign('category_depth', true);
Ejemplo n.º 23
0
        }
        if ($number_of_sales / 2 == floor($number_of_sales / 2)) {
            $affiliate_sales_table .= '<tr class="productListing-even">';
        } else {
            $affiliate_sales_table .= '<tr class="productListing-odd">';
        }
        $affiliate_sales_table .= '<td class="smallText" align="center">' . vam_date_short($affiliate_sales['affiliate_date']) . '</td>';
        $affiliate_sales_table .= '<td class="smallText" align="right">' . $vamPrice->Format($affiliate_sales['affiliate_value'], true) . '</td>';
        $affiliate_sales_table .= '<td class="smallText" align="right">' . $affiliate_sales['affiliate_percent'] . " %" . '</td>';
        $affiliate_sales_table .= '<td class="smallText" align="right">' . ($affiliate_sales['level'] > 0 ? $affiliate_sales['level'] : TEXT_AFFILIATE_PERSONAL_LEVEL_SHORT) . '</td>';
        $affiliate_sales_table .= '<td class="smallText" align="right">' . $vamPrice->Format($affiliate_sales['affiliate_payment'], true) . '</td>';
        $affiliate_sales_table .= '<td class="smallText" align="right">' . ($affiliate_sales['orders_status'] != '' ? $affiliate_sales['orders_status'] : TEXT_DELETED_ORDER_BY_ADMIN) . '</td>';
        $affiliate_sales_table .= '</tr>';
    } while ($affiliate_sales = vam_db_fetch_array($affiliate_sales_values));
    $vamTemplate->assign('affiliate_sales_table', $affiliate_sales_table);
}
if ($affiliate_sales_split->number_of_rows > 0) {
    $vamTemplate->assign('affiliate_sales_count', $affiliate_sales_split->display_count(TEXT_DISPLAY_NUMBER_OF_SALES));
    $vamTemplate->assign('affiliate_sales_links', $affiliate_sales_split->display_links(MAX_DISPLAY_PAGE_LINKS, vam_get_all_get_params(array('page', 'info', 'x', 'y'))));
}
$vamTemplate->assign('affiliate_sales_total', $vamPrice->Format($sum_of_earnings, true));
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->caching = 0;
$main_content = $vamTemplate->fetch(CURRENT_TEMPLATE . '/module/affiliate_sales.html');
$vamTemplate->assign('main_content', $main_content);
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->caching = 0;
if (!defined(RM)) {
    $vamTemplate->load_filter('output', 'note');
}
$vamTemplate->display(CURRENT_TEMPLATE . '/index.html');
Ejemplo n.º 24
0
    ?>
</td>
                <td class="dataTableContent" align="center" width="40"><?php 
    echo $countries['countries_iso_code_2'];
    ?>
</td>
                <td class="dataTableContent" align="center" width="40"><?php 
    echo $countries['countries_iso_code_3'];
    ?>
</td>
                <td class="dataTableContent" align="center">
<?php 
    if ($countries['status'] == '1') {
        echo vam_image(DIR_WS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_GREEN, 10, 10) . '&nbsp;&nbsp;<a href="' . vam_href_link(FILENAME_COUNTRIES, vam_get_all_get_params(array('page', 'action', 'cID')) . 'action=setlflag&flag=0&cID=' . $countries['countries_id'] . '&page=' . $_GET['page']) . '">' . vam_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', IMAGE_ICON_STATUS_RED_LIGHT, 10, 10) . '</a>';
    } else {
        echo '<a href="' . vam_href_link(FILENAME_COUNTRIES, vam_get_all_get_params(array('page', 'action', 'cID')) . 'action=setlflag&flag=1&cID=' . $countries['countries_id'] . '&page=' . $_GET['page']) . '">' . vam_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', IMAGE_ICON_STATUS_GREEN_LIGHT, 10, 10) . '</a>&nbsp;&nbsp;' . vam_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED, 10, 10);
    }
    ?>
                </td>                
                <td class="dataTableContent" align="right"><?php 
    if (is_object($cInfo) && $countries['countries_id'] == $cInfo->countries_id) {
        echo vam_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', '');
    } else {
        echo '<a href="' . vam_href_link(FILENAME_COUNTRIES, 'page=' . $_GET['page'] . '&cID=' . $countries['countries_id']) . '">' . vam_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>';
    }
    ?>
&nbsp;</td>
              </tr>
<?php 
}
?>
Ejemplo n.º 25
0
echo TABLE_HEADING_ACTION;
?>
&nbsp;</td>
              </tr>
<?php 
$gv_query_raw = "select c.coupon_amount, c.coupon_code, c.coupon_id, et.sent_firstname, et.sent_lastname, et.customer_id_sent, et.emailed_to, et.date_sent, c.coupon_id from " . TABLE_COUPONS . " c, " . TABLE_COUPON_EMAIL_TRACK . " et where c.coupon_id = et.coupon_id";
$gv_split = new splitPageResults($_GET['page'], MAX_DISPLAY_ADMIN_PAGE, $gv_query_raw, $gv_query_numrows);
$gv_query = vam_db_query($gv_query_raw);
while ($gv_list = vam_db_fetch_array($gv_query)) {
    if ((!$_GET['gid'] || @$_GET['gid'] == $gv_list['coupon_id']) && !$gInfo) {
        $gInfo = new objectInfo($gv_list);
    }
    if (is_object($gInfo) && $gv_list['coupon_id'] == $gInfo->coupon_id) {
        echo '              <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . vam_href_link('gv_sent.php', vam_get_all_get_params(array('gid', 'action')) . 'gid=' . $gInfo->coupon_id . '&action=edit') . '\'">' . "\n";
    } else {
        echo '              <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . vam_href_link('gv_sent.php', vam_get_all_get_params(array('gid', 'action')) . 'gid=' . $gv_list['coupon_id']) . '\'">' . "\n";
    }
    ?>
                <td class="dataTableContent"><?php 
    echo $gv_list['sent_firstname'] . ' ' . $gv_list['sent_lastname'];
    ?>
</td>
                <td class="dataTableContent" align="center"><?php 
    echo $currencies->format($gv_list['coupon_amount']);
    ?>
</td>
                <td class="dataTableContent" align="center"><?php 
    echo $gv_list['coupon_code'];
    ?>
</td>
                <td class="dataTableContent" align="right"><?php 
Ejemplo n.º 26
0
            $product = vam_db_fetch_array($product_query);
            $fInfo = new objectInfo($product);
        } else {
            $fInfo = new objectInfo(array());
            // create an array of featured products, which will be excluded from the pull down menu of products
            // (when creating a new featured product)
            $featured_array = array();
            $featured_query = vam_db_query("select p.products_id from " . TABLE_PRODUCTS . " p, " . TABLE_FEATURED . " s where s.products_id = p.products_id");
            while ($featured = vam_db_fetch_array($featured_query)) {
                $featured_array[] = $featured['products_id'];
            }
        }
    }
    ?>
      <tr><form name="new_featured" <?php 
    echo 'action="' . vam_href_link(FILENAME_FEATURED, vam_get_all_get_params(array('action', 'info', 'fID')) . 'action=' . $form_action, 'NONSSL') . '"';
    ?>
 method="post"><?php 
    if ($form_action == 'update') {
        echo vam_draw_hidden_field('featured_id', $_GET['fID']);
    }
    ?>
        <td><br /><table border="0" cellspacing="0" cellpadding="2">

                <td class="main"><?php 
    echo TEXT_FEATURED_PRODUCT;
    ?>
&nbsp;</td>
	    <td class="main">
<?php 
    if ($_GET['action'] == 'new' && isset($_GET['prodID'])) {
   (c) 2002-2003 osCommerce(product_reviews_info.php,v 1.47 2003/02/13); www.oscommerce.com
   (c) 2003	 nextcommerce (product_reviews_info.php,v 1.12 2003/08/17); www.nextcommerce.org 
   (c) 2004	 xt:Commerce (product_reviews_info.php,v 1.12 2003/08/17); xt-commerce.com 

   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
include 'includes/application_top.php';
// create template elements
$vamTemplate = new vamTemplate();
// include boxes
require DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php';
// include needed functions
require_once DIR_FS_INC . 'vam_break_string.inc.php';
require_once DIR_FS_INC . 'vam_date_long.inc.php';
// lets retrieve all $HTTP_GET_VARS keys and values..
$get_params = vam_get_all_get_params(array('reviews_id'));
$get_params = substr($get_params, 0, -1);
//remove trailing &
$reviews_query = "select rd.reviews_text, r.reviews_rating, r.reviews_id, r.products_id, r.customers_name, r.date_added, r.last_modified, r.reviews_read, p.products_id, pd.products_name, p.products_image from " . TABLE_REVIEWS . " r left join " . TABLE_PRODUCTS . " p on (r.products_id = p.products_id) left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on (p.products_id = pd.products_id and pd.language_id = '" . (int) $_SESSION['languages_id'] . "'), " . TABLE_REVIEWS_DESCRIPTION . " rd where r.reviews_id = '" . (int) $_GET['reviews_id'] . "' and r.reviews_id = rd.reviews_id and p.products_status = '1'";
$reviews_query = vam_db_query($reviews_query);
if (!vam_db_num_rows($reviews_query)) {
    vam_redirect(vam_href_link(FILENAME_REVIEWS));
}
$reviews = vam_db_fetch_array($reviews_query);
$breadcrumb->add(NAVBAR_TITLE_PRODUCT_REVIEWS, vam_href_link(FILENAME_PRODUCT_REVIEWS, $get_params));
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']));
Ejemplo n.º 28
0
 $contents = array();
 switch ($_GET['action']) {
     case 'delete_faq':
         //generate box for confirming a faqdeletion
         $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_ITEM . '</b>');
         $contents = array('form' => vam_draw_form('faq', FILENAME_FAQ, vam_get_all_get_params(array('action')) . 'action=delete_faq_confirm') . vam_draw_hidden_field('faq_id', $_GET['faq_id']));
         $contents[] = array('text' => TEXT_DELETE_ITEM_INTRO);
         $contents[] = array('text' => '<br><b>' . $selected_item['question'] . '</b>');
         $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_FAQ, vam_get_all_get_params(array('faq_id', 'action')) . 'faq_id=' . $selected_item['faq_id']) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . '&nbsp;' . BUTTON_CANCEL . '</span></a>');
         break;
     default:
         if ($rows > 0) {
             if (is_object($fInfo)) {
                 //an item is selected, so make the side box
                 $heading[] = array('text' => '<b>' . $fInfo->question . '</b>');
                 $contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_FAQ, vam_get_all_get_params(array('faq_id', 'action')) . 'faq_id=' . $fInfo->faq_id . '&action=new_faq') . '"><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_FAQ, vam_get_all_get_params(array('faq_id', 'action')) . 'faq_id=' . $fInfo->faq_id . '&action=delete_faq') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . '&nbsp;' . BUTTON_DELETE . '</span></a>');
                 $contents[] = array('text' => '<br>' . $fInfo->answer);
             }
         } else {
             // create category/product info
             $heading[] = array('text' => '<b>' . EMPTY_CATEGORY . '</b>');
             $contents[] = array('text' => sprintf(TEXT_NO_CHILD_CATEGORIES_OR_PRODUCTS, $parent_categories_name));
         }
         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";
 }
Ejemplo n.º 29
0
$module_content = '';
$row = 0;
$featured_query = vam_db_query($featured_split->sql_query);
while ($featured = vam_db_fetch_array($featured_query)) {
    $module_content[] = $product->buildDataArray($featured);
}
if ($featured_split->number_of_rows > 0) {
    $vamTemplate->assign('NAVBAR', TEXT_RESULT_PAGE . ' ' . $featured_split->display_links(MAX_DISPLAY_PAGE_LINKS, vam_get_all_get_params(array('page', 'info', 'x', 'y'))));
    $vamTemplate->assign('NAVBAR_PAGES', $featured_split->display_count(TEXT_DISPLAY_NUMBER_OF_FEATURED));
}
/* sort, on page */
$vamTemplate->assign('LINK_PAGE', vam_href_link(basename($PHP_SELF), vam_get_all_get_params(array('page', 'on_page', 'sort', 'direction', 'info', 'x', 'y')) . 'on_page='));
$vamTemplate->assign('LINK_sort_name_asc', vam_href_link(basename($PHP_SELF), vam_get_all_get_params(array('page', 'sort', 'direction', 'info', 'x', 'y')) . 'sort=name&direction=asc'));
$vamTemplate->assign('LINK_sort_name_desc', vam_href_link(basename($PHP_SELF), vam_get_all_get_params(array('page', 'sort', 'direction', 'info', 'x', 'y')) . 'sort=name&direction=desc'));
$vamTemplate->assign('LINK_sort_price_asc', vam_href_link(basename($PHP_SELF), vam_get_all_get_params(array('page', 'sort', 'direction', 'info', 'x', 'y')) . 'sort=price&direction=asc'));
$vamTemplate->assign('LINK_sort_price_desc', vam_href_link(basename($PHP_SELF), vam_get_all_get_params(array('page', 'sort', 'direction', 'info', 'x', 'y')) . 'sort=price&direction=desc'));
/* /sort, on page */
$vamTemplate->assign('section', 'featured');
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->assign('module_content', $module_content);
$vamTemplate->caching = 0;
//switch display mode
$listing_template = 'product_tops_list.html';
if (isset($_SESSION['listing_tops_template'])) {
    $listing_template = $_SESSION['listing_tops_template'];
}
if ($listing_template == 'product_tops_list.html') {
    $vamTemplate->assign('LISTING_TEMPLATE', 'product_tops_columns.html');
    $vamTemplate->assign('LISTING_TEMPLATE_TEXT', 'плиткой');
} else {
    $vamTemplate->assign('LISTING_TEMPLATE', 'product_tops_list.html');
Ejemplo n.º 30
0
function vam_sorting($page, $sort)
{
    switch ($page) {
        case FILENAME_CUSTOMERS:
            $nav = '&nbsp;<a href="' . vam_href_link(FILENAME_CUSTOMERS, 'sorting=' . $sort . '&' . vam_get_all_get_params(array('action', 'sorting'))) . '">+</a>';
            $nav .= '<a href="' . vam_href_link(FILENAME_CUSTOMERS, 'sorting=' . $sort . '-desc&' . vam_get_all_get_params(array('action', 'sorting'))) . '">-</a>&nbsp;';
            break;
        case FILENAME_CATEGORIES:
            $nav = '&nbsp;<a href="' . vam_href_link(FILENAME_CATEGORIES, 'sorting=' . $sort . '&' . vam_get_all_get_params(array('action', 'sorting'))) . '">+</a>';
            $nav .= '<a href="' . vam_href_link(FILENAME_CATEGORIES, 'sorting=' . $sort . '-desc&' . vam_get_all_get_params(array('action', 'sorting'))) . '">-</a>&nbsp;';
            break;
    }
    return $nav;
}