function vam_hide_session_id() { global $session_started; if ($session_started == true && defined('SID') && vam_not_null(SID)) { return vam_draw_hidden_field(vam_session_name(), vam_session_id()); } }
function vam_get_all_get_params($exclude_array = '') { global $InputFilter; if (!is_array($exclude_array)) { $exclude_array = array(); } $get_url = ''; if (is_array($_GET) && sizeof($_GET) > 0) { reset($_GET); foreach ($_GET as $key => $value) { if (is_array($value)) { foreach ($value as $new_key => $new_value) { if (!in_array($key, $exclude_array)) { $get_url .= $key . '[' . $new_key . ']' . '=' . rawurlencode(stripslashes($new_value)) . '&'; } } } elseif (strlen($value) > 0 && $key != vam_session_name() && $key != 'error' && !in_array($key, $exclude_array) && $key != 'x' && $key != 'y') { $get_url .= $key . '=' . rawurlencode(stripslashes($value)) . '&'; } } } return $get_url; }
<?php echo vam_draw_form('status', FILENAME_ORDERS, '', 'get'); ?> <?php echo HEADING_TITLE_STATUS . ' ' . vam_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), $orders_statuses), $_GET['status'], 'onChange="this.form.submit();"') . vam_draw_hidden_field(vam_session_name(), vam_session_id()); ?> </form> </td> <td align="right"> <?php echo vam_draw_form('orders', FILENAME_ORDERS, '', 'get'); ?> <?php echo HEADING_TITLE_SEARCH . ' ' . vam_draw_input_field('oID', '', 'size="12"') . vam_draw_hidden_field('action', 'edit') . vam_draw_hidden_field(vam_session_name(), vam_session_id()); ?> </form> </td> </tr> </table> </td> </tr> <tr> <td> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr>
<?php /* $Id: attributeManagerHeader.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 */ if ('new_product' == $_GET['action'] || 'update_product' == $_GET['action']) { $amSessionVar = vam_session_name() . '=' . vam_session_id(); echo <<<HEADER <script language="JavaScript" type="text/JavaScript"> \tvar productsId='{$_GET['pID']}'; \tvar pageAction='{$_GET['action']}'; \tvar sessionId='{$amSessionVar}'; </script> <script language="JavaScript" type="text/JavaScript" src="attributeManager/javascript/requester.js"></script> <script language="JavaScript" type="text/JavaScript" src="attributeManager/javascript/alertBoxes.js"></script> <script language="JavaScript" type="text/JavaScript" src="attributeManager/javascript/attributeManager.js"></script> <link rel="stylesheet" type="text/css" href="attributeManager/css/attributeManager.css" /> HEADER; } ?>
function vam_get_hidden_get_variables($exclude_array) { if (!is_array($exclude_array)) { $exclude_array = array(); } $html_string = ''; if (is_array($_GET) && sizeof($_GET) > 0) { reset($_GET); foreach ($_GET as $key => $value) { if (is_array($value)) { foreach ($value as $new_key => $new_value) { if (!in_array($key, $exclude_array)) { $html_string .= vam_draw_hidden_field($key . '[' . $new_key . ']', $new_value); } } } elseif (strlen($value) > 0 && $key != vam_session_name() && $key != 'error' && !in_array($key, $exclude_array) && $key != 'x' && $key != 'y') { $html_string .= vam_draw_hidden_field($key, $value); } } } return $html_string; }
function process_button() { global $order, $vamPrice; $worldpay_url = vam_session_name() . '=' . vam_session_id(); $total = number_format($vamPrice->CalculateCurr($order->info['total']), $vamPrice->get_decimal_places($_SESSION['currency']), '.', ''); $process_button_string = vam_draw_hidden_field('instId', MODULE_PAYMENT_WORLDPAY_ID) . vam_draw_hidden_field('currency', $_SESSION['currency']) . vam_draw_hidden_field('desc', 'Purchase from ' . STORE_NAME) . vam_draw_hidden_field('cartId', $worldpay_url) . vam_draw_hidden_field('amount', $total); // Pre Auth Mod 3/1/2002 - Graeme Conkie if (MODULE_PAYMENT_WORLDPAY_USEPREAUTH == 'True') { $process_button_string .= vam_draw_hidden_field('authMode', MODULE_PAYMENT_WORLDPAY_PREAUTH); } // Ian-san: Create callback and language links here 6/4/2003: $language_code_raw = vam_db_query("select code from " . TABLE_LANGUAGES . " where languages_id ='" . $_SESSION['languages_id'] . "'"); $language_code_array = vam_db_fetch_array($language_code_raw); $language_code = $language_code_array['code']; $address = htmlspecialchars($order->customer['street_address'] . "\n" . $order->customer['suburb'] . "\n" . $order->customer['city'] . "\n" . $order->customer['state'], ENT_QUOTES); $process_button_string .= vam_draw_hidden_field('testMode', MODULE_PAYMENT_WORLDPAY_MODE) . vam_draw_hidden_field('name', $order->customer['firstname'] . ' ' . $order->customer['lastname']) . vam_draw_hidden_field('address', $address) . vam_draw_hidden_field('postcode', $order->customer['postcode']) . vam_draw_hidden_field('country', $order->customer['country']['iso_code_2']) . vam_draw_hidden_field('tel', $order->customer['telephone']) . vam_draw_hidden_field('myvar', 'Y') . vam_draw_hidden_field('fax', $order->customer['fax']) . vam_draw_hidden_field('email', $order->customer['email_address']) . vam_draw_hidden_field('lang', $language_code) . vam_draw_hidden_field('MC_callback', vam_href_link(wpcallback) . '.php') . vam_draw_hidden_field('MC_sid', $sid); // Ian-san: Added MD5 here 6/4/2003: if (MODULE_PAYMENT_WORLDPAY_USEMD5 == '1') { $md5_signature_fields = 'amount:language:email'; $md5_signature = MODULE_PAYMENT_WORLDPAY_MD5KEY . ':' . number_format($order->info['total'] * $currencies->get_value($currency), $currencies->get_decimal_places($currency), '.', '') . ':' . $language_code . ':' . $order->customer['email_address']; $md5_signature_md5 = md5($md5_signature); $process_button_string .= vam_draw_hidden_field('signatureFields', $md5_signature_fields) . vam_draw_hidden_field('signature', $md5_signature_md5); } return $process_button_string; }
function process_button() { global $order; $sequence = rand(1, 1000); if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) { $total = $order->info['total'] + $order->info['tax']; } else { $total = $order->info['total']; } $process_button_string = vam_draw_hidden_field('x_Login', MODULE_PAYMENT_AUTHORIZENET_LOGIN) . vam_draw_hidden_field('x_Card_Num', $this->cc_card_number) . vam_draw_hidden_field('x_Exp_Date', $this->cc_expiry_month . substr($this->cc_expiry_year, -2)) . vam_draw_hidden_field('x_Amount', round($total, 2)) . vam_draw_hidden_field('x_Relay_URL', vam_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', false)) . vam_draw_hidden_field('x_Method', MODULE_PAYMENT_AUTHORIZENET_METHOD == 'Credit Card' ? 'CC' : 'ECHECK') . vam_draw_hidden_field('x_Version', '3.0') . vam_draw_hidden_field('x_Cust_ID', $_SESSION['customer_id']) . vam_draw_hidden_field('x_Email_Customer', MODULE_PAYMENT_AUTHORIZENET_EMAIL_CUSTOMER == 'True' ? 'TRUE' : 'FALSE') . vam_draw_hidden_field('x_first_name', $order->billing['firstname']) . vam_draw_hidden_field('x_last_name', $order->billing['lastname']) . vam_draw_hidden_field('x_address', $order->billing['street_address']) . vam_draw_hidden_field('x_city', $order->billing['city']) . vam_draw_hidden_field('x_state', $order->billing['state']) . vam_draw_hidden_field('x_zip', $order->billing['postcode']) . vam_draw_hidden_field('x_country', $order->billing['country']['title']) . vam_draw_hidden_field('x_phone', $order->customer['telephone']) . vam_draw_hidden_field('x_email', $order->customer['email_address']) . vam_draw_hidden_field('x_ship_to_first_name', $order->delivery['firstname']) . vam_draw_hidden_field('x_ship_to_last_name', $order->delivery['lastname']) . vam_draw_hidden_field('x_ship_to_address', $order->delivery['street_address']) . vam_draw_hidden_field('x_ship_to_city', $order->delivery['city']) . vam_draw_hidden_field('x_ship_to_state', $order->delivery['state']) . vam_draw_hidden_field('x_ship_to_zip', $order->delivery['postcode']) . vam_draw_hidden_field('x_ship_to_country', $order->delivery['country']['title']) . vam_draw_hidden_field('x_Customer_IP', $_SERVER['REMOTE_ADDR']) . $this->InsertFP(MODULE_PAYMENT_AUTHORIZENET_LOGIN, MODULE_PAYMENT_AUTHORIZENET_TXNKEY, round($total, 2), $sequence); if (MODULE_PAYMENT_AUTHORIZENET_TESTMODE == 'Test') { $process_button_string .= vam_draw_hidden_field('x_Test_Request', 'TRUE'); } $process_button_string .= vam_draw_hidden_field(vam_session_name(), vam_session_id()); return $process_button_string; }
?> </td> <td class="dataTableContent" align="center"><?php echo $whos_online['ip_address']; ?> </td> <td class="dataTableContent"><?php echo date('H:i:s', $whos_online['time_entry']); ?> </td> <td class="dataTableContent" align="center"><?php echo date('H:i:s', $whos_online['time_last_click']); ?> </td> <td class="dataTableContent"><?php if (preg_match('/^(.*)' . vam_session_name() . '=[a-f,0-9]+[&]*(.*)/', $whos_online['last_page_url'], $array)) { echo $array[1] . $array[2]; } else { echo $whos_online['last_page_url']; } ?> </td> </tr> <?php } ?> <tr> <td class="smallText" colspan="7"><?php echo sprintf(TEXT_NUMBER_OF_CUSTOMERS, vam_db_num_rows($whos_online_query)); ?> </td>
function before_process() { if ($_POST['valid'] == 'true') { if ($remote_host = getenv('REMOTE_HOST')) { if ($remote_host != 'secpay.com') { $remote_host = gethostbyaddr($remote_host); } if ($remote_host != 'secpay.com') { vam_redirect(vam_href_link(FILENAME_CHECKOUT_PAYMENT, vam_session_name() . '=' . $_POST[vam_session_name()] . '&payment_error=' . $this->code, 'SSL', false, false)); } } else { vam_redirect(vam_href_link(FILENAME_CHECKOUT_PAYMENT, vam_session_name() . '=' . $_POST[vam_session_name()] . '&payment_error=' . $this->code, 'SSL', false, false)); } } }
if ($messageStack->size('addressbook') > 0) { $vamTemplate->assign('error', $messageStack->output('addressbook')); } if (isset($_GET['delete'])) { $vamTemplate->assign('delete', '1'); $vamTemplate->assign('ADDRESS', vam_address_label($_SESSION['customer_id'], $_GET['delete'], true, ' ', '<br />')); $vamTemplate->assign('BUTTON_BACK', '<a class="button" href="' . vam_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL') . '">' . vam_image_button('back.png', IMAGE_BUTTON_BACK) . '</a>'); $vamTemplate->assign('BUTTON_DELETE', '<a class="button" href="' . vam_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'delete=' . $_GET['delete'] . '&action=deleteconfirm', 'SSL') . '">' . vam_image_button('delete.png', IMAGE_BUTTON_DELETE) . '</a>'); } else { include DIR_WS_MODULES . 'address_book_details.php'; if (isset($_GET['edit']) && is_numeric($_GET['edit'])) { $vamTemplate->assign('BUTTON_BACK', '<a class="button" href="' . vam_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL') . '">' . vam_image_button('back.png', IMAGE_BUTTON_BACK) . '</a>'); $vamTemplate->assign('BUTTON_UPDATE', vam_draw_hidden_field('action', 'update') . vam_draw_hidden_field('edit', $_GET['edit']) . vam_image_submit('update.png', IMAGE_BUTTON_UPDATE)); } else { if (sizeof($_SESSION['navigation']->snapshot) > 0) { $back_link = vam_href_link($_SESSION['navigation']->snapshot['page'], vam_array_to_string($_SESSION['navigation']->snapshot['get'], array(vam_session_name())), $_SESSION['navigation']->snapshot['mode']); } else { $back_link = vam_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL'); } $vamTemplate->assign('BUTTON_BACK', '<a class="button" href="' . $back_link . '">' . vam_image_button('back.png', IMAGE_BUTTON_BACK) . '</a>'); $vamTemplate->assign('BUTTON_UPDATE', vam_draw_hidden_field('action', 'process') . vam_image_submit('submit.png', IMAGE_BUTTON_CONTINUE)); } $vamTemplate->assign('FORM_END', '</form>'); } $vamTemplate->assign('language', $_SESSION['language']); $vamTemplate->caching = 0; $main_content = $vamTemplate->fetch(CURRENT_TEMPLATE . '/module/address_book_process.html'); $vamTemplate->assign('language', $_SESSION['language']); $vamTemplate->assign('main_content', $main_content); $vamTemplate->caching = 0; if (!defined(RM)) {
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()) { $box->caching = 0; $box_currencies = $box->fetch(CURRENT_TEMPLATE . '/boxes/box_currencies.html'); } else { $box->caching = 1; $box->cache_lifetime = CACHE_LIFETIME;
} else { $filterlist_sql = "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . $current_category_id . "' order by m.manufacturers_name"; } } $filterlist_query = vamDBquery($filterlist_sql); if (vam_db_num_rows($filterlist_query, true) > 1) { $manufacturer_dropdown = vam_draw_form('filter', vam_href_link(FILENAME_DEFAULT, 'cat=' . $current_category_id), 'get'); if (isset($_GET['manufacturers_id'])) { $manufacturer_dropdown .= vam_draw_hidden_field('manufacturers_id', (int) $_GET['manufacturers_id']); $options = array(array('text' => TEXT_ALL_CATEGORIES)); } else { $manufacturer_dropdown .= vam_draw_hidden_field('cat', $_GET['cat']); $options = array(array('text' => TEXT_ALL_MANUFACTURERS)); } $manufacturer_dropdown .= vam_draw_hidden_field('sort', $_GET['sort']); $manufacturer_dropdown .= vam_draw_hidden_field(vam_session_name(), vam_session_id()); global $current_category_id; while ($filterlist = vam_db_fetch_array($filterlist_query, true)) { $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']); if (isset($current_category_id)) { $manufacturer_sort .= '<a href="' . vam_href_link(FILENAME_DEFAULT, 'cat=' . $current_category_id . '&filter_id=' . $filterlist['id']) . '">' . $filterlist['name'] . '</a> '; } else { $manufacturer_sort .= '<a href="' . vam_href_link(FILENAME_DEFAULT, 'filter_id=' . $filterlist['id']) . '">' . $filterlist['name'] . '</a> '; } } $manufacturer_sort .= '<a href="' . vam_href_link(FILENAME_DEFAULT, 'cat=' . $current_category_id) . '">' . TEXT_ALL_MANUFACTURERS . '</a> '; $manufacturer_dropdown .= vam_draw_pull_down_menu('filter_id', $options, $_GET['filter_id'], 'onchange="this.form.submit()"'); $manufacturer_dropdown .= '</form>' . "\n"; } } // Get the right image for the top-right
function vam_session_recreate() { if (PHP_VERSION >= 4.1) { $session_backup = $_SESSION; unset($_COOKIE[vam_session_name()]); vam_session_destroy(); if (STORE_SESSIONS == 'mysql') { session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc'); } vam_session_start(); $_SESSION = $session_backup; unset($session_backup); } }
</button></span> </form> </td> </tr> <tr> <td class="pageHeading"><hr noshade><?php echo CROSS_SELLING_SEARCH; ?> <table> <br><br> <tr class="dataTableRow"> <?php echo vam_draw_form('product_search', FILENAME_CATEGORIES, '', 'GET'); echo vam_draw_hidden_field('action', 'edit_crossselling'); echo vam_draw_hidden_field(vam_session_name(), vam_session_id()); echo vam_draw_hidden_field('current_product_id', $_GET['current_product_id']); echo vam_draw_hidden_field('cpath', $_GET['cpath']); ?> <td class="dataTableContent" width="40"><?php echo vam_draw_input_field('search', '', 'size="30"'); ?> </td> <td class="dataTableContent"> <?php echo '<span class="button"><button type="submit" value="' . BUTTON_SEARCH . '"/>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/search.png', '', '12', '12') . ' ' . BUTTON_SEARCH . '</button></span>'; ?> </td> </form> </tr> </table>
<h1 class="contentBoxHeading"><?php echo HEADING_TITLE; ?> </h1> </td> <td align="right"> <?php echo vam_draw_form('goto', FILENAME_CATEGORIES, '', 'get'); echo HEADING_TITLE_GOTO . ' ' . vam_draw_pull_down_menu('cPath', vam_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"') . vam_draw_hidden_field(vam_session_name(), vam_session_id()); ?> </form> </td> <td align="right"> <?php echo vam_draw_form('search', FILENAME_CATEGORIES, '', 'get'); echo HEADING_TITLE_SEARCH . ' ' . vam_draw_input_field('search') . vam_draw_hidden_field(vam_session_name(), vam_session_id()); ?> </form> </td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php //----- new_category / edit_category (when ALLOW_CATEGORY_DESCRIPTIONS is 'true') ----- if ($_GET['action'] == 'new_category' || $_GET['action'] == 'edit_category') { include DIR_WS_MODULES . 'new_category.php'; } elseif ($_GET['action'] == 'new_product') {
function debug() { for ($i = 0, $n = sizeof($this->path); $i < $n; $i++) { echo $this->path[$i]['page'] . '?'; while (list($key, $value) = each($this->path[$i]['get'])) { echo $key . '=' . $value . '&'; } if (sizeof($this->path[$i]['post']) > 0) { echo '<br />'; while (list($key, $value) = each($this->path[$i]['post'])) { echo ' <b>' . $key . '=' . $value . '</b><br />'; } } echo '<br />'; } if (sizeof($this->snapshot) > 0) { echo '<br /><br />'; echo $this->snapshot['mode'] . ' ' . $this->snapshot['page'] . '?' . vam_array_to_string($this->snapshot['get'], array(vam_session_name())) . '<br />'; } }
echo TEXT_EASYPOPULATE_QUICK_LINKS_18; ?> <?php echo EP_EXCEL_SAFE_OUTPUT == true ? ".csv" : ".txt"; ?> <?php echo TEXT_EASYPOPULATE_QUICK_LINKS_6; ?> </a><br /> <!-- VJ product attributes begin //--> <?php if (EP_PRODUCTS_WITH_ATTRIBUTES == true) { ?> <a href="easypopulate.php?download=tempfile&dltype=attrib<?php if (defined('SID') && vam_not_null(SID)) { echo '&' . vam_session_name() . '=' . vam_session_id(); } ?> "><?php echo TEXT_EASYPOPULATE_QUICK_LINKS_19; ?> <?php echo EP_EXCEL_SAFE_OUTPUT == true ? ".csv" : ".txt"; ?> <?php echo TEXT_EASYPOPULATE_QUICK_LINKS_6; ?> </a><br /> <?php } ?>