• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP vam_redirect函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中vam_redirect函数的典型用法代码示例。如果您正苦于以下问题:PHP vam_redirect函数的具体用法?PHP vam_redirect怎么用?PHP vam_redirect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了vam_redirect函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: vam_Security

function vam_Security()
{
    // Cross-Site Scripting attack defense - Sent by larsneo
    // some syntax checking against injected javascript
    // extended by Neo
    if (count($_GET) > 0) {
        //        Lets now sanitize the GET vars
        //      echo '<pre>';
        //print_r ($_GET);
        //echo '</pre>';
        foreach ($_GET as $secvalue) {
            if (!is_array($secvalue)) {
                if (preg_match("/<[^>]*script.*\"?[^>]*>/i", $secvalue) || preg_match("/.*[[:space:]](or|and)[[:space:]].*(=|like).*/i", $secvalue) || preg_match("/<[^>]*object.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*iframe.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*applet.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*meta.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*style.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*form.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*window.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*alert.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*img.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*document.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*cookie.*\"?[^>]*>/i", $secvalue)) {
                    vamMailHackAttempt(__FILE__, __LINE__, 'xt:C Security Alert', 'Intrusion detection.');
                    vam_redirect(FILENAME_DEFAULT);
                }
            }
        }
    }
    //        Lets now sanitize the POST vars
    if (count($_POST) > 0) {
        foreach ($_POST as $secvalue) {
            if (!is_array($secvalue)) {
                if (preg_match("/<[^>]*script.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*object.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*iframe.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*applet.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*window.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*alert.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*document.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*cookie.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*meta.*\"?[^>]*>/i", $secvalue)) {
                    vamMailHackAttempt(__FILE__, __LINE__, 'xt:C Security Alert', 'Intrusion detection.');
                    vam_redirect(FILENAME_DEFAULT);
                }
            }
        }
    }
    //        Lets now sanitize the COOKIE vars
    if (count($_COOKIE) > 0) {
        foreach ($_COOKIE as $secvalue) {
            if (!is_array($secvalue)) {
                if (preg_match("/<[^>]*script.*\"?[^>]*>/i", $secvalue) || preg_match("/.*[[:space:]](or|and)[[:space:]].*(=|like).*/i", $secvalue) || preg_match("/<[^>]*object.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*iframe.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*applet.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*meta.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*style.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*form.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*window.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*alert.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*document.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*cookie.*\"?[^>]*>/i", $secvalue) || preg_match("/<[^>]*img.*\"?[^>]*>/i", $secvalue)) {
                    vamMailHackAttempt(__FILE__, __LINE__, 'xt:C Security Alert', 'Intrusion detection.');
                    vam_redirect(FILENAME_DEFAULT);
                }
            }
        }
    }
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:42,代码来源:vam_Security.inc.php


示例2: elseif

                        } 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
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:31,代码来源:categories.php


示例3: vam_redirect

   Released under the GNU General Public License
   --------------------------------------------------------------
   Third Party contributions:
   New Attribute Manager v4b                                Autor: Mike G | [email protected] | http://downloads.ephing.com
   copy attributes                          Autor: Hubi | http://www.netz-designer.de

   Released under the GNU General Public License
   --------------------------------------------------------------*/
require 'includes/application_top.php';
require DIR_WS_MODULES . 'new_attributes_config.php';
require DIR_FS_INC . 'vam_findTitle.inc.php';
require_once DIR_FS_INC . 'vam_format_filesize.inc.php';
if ($_POST['cpath'] != '' && $_POST['action'] == 'change') {
    include DIR_WS_MODULES . 'new_attributes_change.php';
    vam_redirect('./' . FILENAME_CATEGORIES . '?cPath=' . $_POST['cpath'] . '&pID=' . $_POST['current_product_id']);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html <?php 
echo HTML_PARAMS;
?>
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo $_SESSION['language_charset'];
?>
">
<title><?php 
echo TITLE;
?>
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:30,代码来源:new_attributes.php


示例4: vamTemplate

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']));
$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'];
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:31,代码来源:product_reviews_info.php


示例5: vam_db_prepare_input

        case 'deleteconfirm':
            $authors_id = vam_db_prepare_input($_GET['auID']);
            vam_db_query("delete from " . TABLE_AUTHORS . " where authors_id = '" . (int) $authors_id . "'");
            vam_db_query("delete from " . TABLE_AUTHORS_INFO . " where authors_id = '" . (int) $authors_id . "'");
            if (isset($_POST['delete_articles']) && $_POST['delete_articles'] == 'on') {
                $articles_query = vam_db_query("select articles_id from " . TABLE_ARTICLES . " where authors_id = '" . (int) $authors_id . "'");
                while ($articles = vam_db_fetch_array($articles_query)) {
                    vam_remove_article($articles['articles_id']);
                }
            } else {
                vam_db_query("update " . TABLE_ARTICLES . " set authors_id = '' where authors_id = '" . (int) $authors_id . "'");
            }
            if (USE_CACHE == 'true') {
                vam_reset_cache_block('authors');
            }
            vam_redirect(vam_href_link(FILENAME_AUTHORS, 'page=' . $_GET['page']));
            break;
    }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html <?php 
echo HTML_PARAMS;
?>
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo $_SESSION['language_charset'];
?>
"> 
<title><?php 
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:31,代码来源:authors.php


示例6: before_process


//.........这里部分代码省略.........
                     $stock_left = $stock_values['products_quantity'] - $order->products[$i]['qty'];
                 } else {
                     $stock_left = $stock_values['products_quantity'];
                 }
                 vam_db_query("update " . TABLE_PRODUCTS . " set products_quantity = '" . $stock_left . "' where products_id = '" . vam_get_prid($order->products[$i]['id']) . "'");
                 if ($stock_left < 1 && STOCK_ALLOW_CHECKOUT == 'false') {
                     vam_db_query("update " . TABLE_PRODUCTS . " set products_status = '0' where products_id = '" . vam_get_prid($order->products[$i]['id']) . "'");
                 }
             }
         }
         // Update products_ordered (for bestsellers list)
         vam_db_query("update " . TABLE_PRODUCTS . " set products_ordered = products_ordered + " . sprintf('%d', $order->products[$i]['qty']) . " where products_id = '" . vam_get_prid($order->products[$i]['id']) . "'");
         //------insert customer choosen option to order--------
         $attributes_exist = '0';
         $products_ordered_attributes = '';
         if (isset($order->products[$i]['attributes'])) {
             $attributes_exist = '1';
             for ($j = 0, $n2 = sizeof($order->products[$i]['attributes']); $j < $n2; $j++) {
                 if (DOWNLOAD_ENABLED == 'true') {
                     $attributes_query = "select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pad.products_attributes_maxdays, pad.products_attributes_maxcount , pad.products_attributes_filename, pad.products_attributes_is_pin\n                                   from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa\n                                   left join " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad\n                                   on pa.products_attributes_id=pad.products_attributes_id\n                                   where pa.products_id = '" . $order->products[$i]['id'] . "'\n                                   and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "'\n                                   and pa.options_id = popt.products_options_id\n                                   and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "'\n                                   and pa.options_values_id = poval.products_options_values_id\n                                   and popt.language_id = '" . $_SESSION['languages_id'] . "'\n                                   and poval.language_id = '" . $_SESSION['languages_id'] . "'";
                     $attributes = vam_db_query($attributes_query);
                 } else {
                     $attributes = vam_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . $order->products[$i]['id'] . "' and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $_SESSION['languages_id'] . "' and poval.language_id = '" . $_SESSION['languages_id'] . "'");
                 }
                 $attributes_values = vam_db_fetch_array($attributes);
                 $products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name'];
             }
         }
         //------insert customer choosen option eof ----
         $total_weight += $order->products[$i]['qty'] * $order->products[$i]['weight'];
         $total_tax += vam_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty'];
         $total_cost += $total_products_price;
         $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $vamPrice->Format($order->products[$i]['final_price'], true) . $products_ordered_attributes . "\n";
     }
     // initialize templates
     $vamTemplate = new vamTemplate();
     $vamTemplate->assign('address_label_customer', vam_address_format($order->customer['format_id'], $order->customer, 1, '', '<br />'));
     $vamTemplate->assign('address_label_shipping', vam_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'));
     if ($_SESSION['credit_covers'] != '1') {
         $vamTemplate->assign('address_label_payment', vam_address_format($order->billing['format_id'], $order->billing, 1, '', '<br />'));
     }
     $vamTemplate->assign('csID', $order->customer['csID']);
     $it = 0;
     $semextrfields = vamDBquery("select * from " . TABLE_EXTRA_FIELDS . " where fields_required_email = '1'");
     while ($dataexfes = vam_db_fetch_array($semextrfields, true)) {
         $cusextrfields = vamDBquery("select * from " . TABLE_CUSTOMERS_TO_EXTRA_FIELDS . " where customers_id = '" . (int) $_SESSION['customer_id'] . "' and fields_id = '" . $dataexfes['fields_id'] . "'");
         $rescusextrfields = vam_db_fetch_array($cusextrfields, true);
         $extrfieldsinf = vamDBquery("select fields_name from " . TABLE_EXTRA_FIELDS_INFO . " where fields_id = '" . $dataexfes['fields_id'] . "' and languages_id = '" . $_SESSION['languages_id'] . "'");
         $extrfieldsres = vam_db_fetch_array($extrfieldsinf, true);
         $extra_fields .= $extrfieldsres['fields_name'] . ' : ' . $rescusextrfields['value'] . "\n";
         $vamTemplate->assign('customer_extra_fields', $extra_fields);
     }
     $order_total = $order->getTotalData($order_id);
     $vamTemplate->assign('order_data', $order->getOrderData($order_id));
     $vamTemplate->assign('order_total', $order_total['data']);
     // assign language to template for caching
     $vamTemplate->assign('language', $_SESSION['language']);
     $vamTemplate->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
     $vamTemplate->assign('logo_path', HTTP_SERVER . DIR_WS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/img/');
     $vamTemplate->assign('oID', $order_id);
     if ($order->info['payment_method'] != '' && $order->info['payment_method'] != 'no_payment') {
         include DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/' . $order->info['payment_method'] . '.php';
         $payment_method = constant(strtoupper('MODULE_PAYMENT_' . $order->info['payment_method'] . '_TEXT_TITLE'));
     }
     $vamTemplate->assign('PAYMENT_METHOD', $payment_method);
     if ($order->info['shipping_method'] != '') {
         $shipping_method = $order->info['shipping_method'];
     }
     $vamTemplate->assign('SHIPPING_METHOD', $shipping_method);
     $vamTemplate->assign('DATE', vam_date_long($order->info['date_purchased']));
     $vamTemplate->assign('NAME', $order->customer['firstname'] . ' ' . $order->customer['lastname']);
     $vamTemplate->assign('COMMENTS', $order->info['comments']);
     $vamTemplate->assign('EMAIL', $order->customer['email_address']);
     $vamTemplate->assign('PHONE', $order->customer['telephone']);
     // dont allow cache
     $vamTemplate->caching = false;
     $html_mail = $vamTemplate->fetch(CURRENT_TEMPLATE . '/mail/' . $_SESSION['language'] . '/order_mail.html');
     $txt_mail = $vamTemplate->fetch(CURRENT_TEMPLATE . '/mail/' . $_SESSION['language'] . '/order_mail.txt');
     // create subject
     $order_subject = str_replace('{$nr}', $order_id, EMAIL_BILLING_SUBJECT_ORDER);
     $order_subject = str_replace('{$date}', strftime(DATE_FORMAT_LONG), $order_subject);
     $order_subject = str_replace('{$lastname}', $order->customer['lastname'], $order_subject);
     $order_subject = str_replace('{$firstname}', $order->customer['firstname'], $order_subject);
     // send mail to admin
     vam_php_mail(EMAIL_BILLING_ADDRESS, EMAIL_BILLING_NAME, EMAIL_BILLING_ADDRESS, STORE_NAME, EMAIL_BILLING_FORWARDING_STRING, $order->customer['email_address'], $order->customer['firstname'], '', '', $order_subject, $html_mail, $txt_mail);
     // send mail to customer
     vam_php_mail(EMAIL_BILLING_ADDRESS, EMAIL_BILLING_NAME, $order->customer['email_address'], $order->customer['firstname'] . ' ' . $order->customer['lastname'], '', EMAIL_BILLING_REPLY_ADDRESS, EMAIL_BILLING_REPLY_ADDRESS_NAME, '', '', $order_subject, $html_mail, $txt_mail);
     // load the after_process function from the payment modules
     $this->after_process();
     require_once DIR_WS_INCLUDES . 'affiliate_checkout_process.php';
     $_SESSION['cart']->reset(true);
     // unregister session variables used during checkout
     unset($_SESSION['sendto']);
     unset($_SESSION['billto']);
     unset($_SESSION['shipping']);
     unset($_SESSION['payment']);
     unset($_SESSION['comments']);
     unset($_SESSION['cart_yandex_id']);
     vam_redirect(vam_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL'));
 }
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:101,代码来源:yandex_merchant.php


示例7: vam_session_unregister

            } else {
                //do nothing
                $cart->reset(true);
                // unregister session variables used during checkout
                vam_session_unregister('sendto');
                vam_session_unregister('billto');
                vam_session_unregister('shipping');
                vam_session_unregister('payment');
                vam_session_unregister('comments');
                vam_redirect(vam_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL'));
            }
        }
        //redirect
    } else {
        //finally redirect to index
        vam_redirect(vam_href_link(FILENAME_DEFAULT, '', 'SSL'));
    }
}
/**
debug function, html formatted
*/
function d($var, $echo = true)
{
    $r = '<pre>';
    $r .= htmlspecialchars(print_r($var, true));
    $r .= '</pre>';
    if ($echo) {
        echo $r;
    }
    return $r;
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:31,代码来源:validateSwedPayment.php


示例8: vam_redirect

        vam_redirect(vam_href_link(FILENAME_MODULES, 'set=' . $_GET['set'] . '&module=' . $_GET['module']));
        break;
    case 'install':
    case 'remove':
        $file_extension = substr($_SERVER['PHP_SELF'], strrpos($_SERVER['PHP_SELF'], '.'));
        $class = basename($_GET['module']);
        if (file_exists($module_directory . $class . $file_extension)) {
            include $module_directory . $class . $file_extension;
            $module = new $class(0);
            if ($_GET['action'] == 'install') {
                $module->install();
            } elseif ($_GET['action'] == 'remove') {
                $module->remove();
            }
        }
        vam_redirect(vam_href_link(FILENAME_MODULES, 'set=' . $_GET['set'] . '&module=' . $class));
        break;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html <?php 
echo HTML_PARAMS;
?>
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo $_SESSION['language_charset'];
?>
"> 
<title><?php 
echo TITLE;
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:31,代码来源:modules.php


示例9: array

            $update_sql_data = array('last_modified' => 'now()');
            $sql_data_array = vam_array_merge($sql_data_array, $update_sql_data);
            vam_db_perform(TABLE_BLACKLIST, $sql_data_array, 'update', "blacklist_id = '" . vam_db_input($blacklist_id) . "'");
        }
        if (USE_CACHE == 'true') {
            vam_reset_cache_block('blacklist');
        }
        vam_redirect(vam_href_link(FILENAME_BLACKLIST, 'page=' . $_GET['page'] . '&bID=' . $blacklist_id));
        break;
    case 'deleteconfirm':
        $blacklist_id = vam_db_prepare_input($_GET['bID']);
        vam_db_query("delete from " . TABLE_BLACKLIST . " where blacklist_id = '" . vam_db_input($blacklist_id) . "'");
        if (USE_CACHE == 'true') {
            vam_reset_cache_block('manufacturers');
        }
        vam_redirect(vam_href_link(FILENAME_BLACKLIST, 'page=' . $_GET['page']));
        break;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html <?php 
echo HTML_PARAMS;
?>
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo $_SESSION['language_charset'];
?>
">
<title><?php 
echo TITLE;
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:31,代码来源:blacklist.php


示例10: elseif

        $messageStack->add('account_password', ENTRY_PASSWORD_CURRENT_ERROR);
    } elseif (strlen($password_new) < ENTRY_PASSWORD_MIN_LENGTH) {
        $error = true;
        $messageStack->add('account_password', ENTRY_PASSWORD_NEW_ERROR);
    } elseif ($password_new != $password_confirmation) {
        $error = true;
        $messageStack->add('account_password', ENTRY_PASSWORD_NEW_ERROR_NOT_MATCHING);
    }
    if ($error == false) {
        $check_customer_query = vam_db_query("select customers_password from " . TABLE_CUSTOMERS . " where customers_id = '" . (int) $_SESSION['customer_id'] . "'");
        $check_customer = vam_db_fetch_array($check_customer_query);
        if (vam_validate_password($password_current, $check_customer['customers_password'])) {
            vam_db_query("UPDATE " . TABLE_CUSTOMERS . " SET customers_password = '" . vam_encrypt_password($password_new) . "', customers_last_modified=now() WHERE customers_id = '" . (int) $_SESSION['customer_id'] . "'");
            vam_db_query("UPDATE " . TABLE_CUSTOMERS_INFO . " SET customers_info_date_account_last_modified = now() WHERE customers_info_id = '" . (int) $_SESSION['customer_id'] . "'");
            $messageStack->add_session('account', SUCCESS_PASSWORD_UPDATED, 'success');
            vam_redirect(vam_href_link(FILENAME_ACCOUNT, '', 'SSL'));
        } else {
            $error = true;
            $messageStack->add('account_password', ERROR_CURRENT_PASSWORD_NOT_MATCHING);
        }
    }
}
$breadcrumb->add(NAVBAR_TITLE_1_ACCOUNT_PASSWORD, vam_href_link(FILENAME_ACCOUNT, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2_ACCOUNT_PASSWORD, vam_href_link(FILENAME_ACCOUNT_PASSWORD, '', 'SSL'));
require DIR_WS_INCLUDES . 'header.php';
if ($messageStack->size('account_password') > 0) {
    $vamTemplate->assign('error', $messageStack->output('account_password'));
}
$vamTemplate->assign('FORM_ACTION', vam_draw_form('account_password', vam_href_link(FILENAME_ACCOUNT_PASSWORD, '', 'SSL'), 'post', 'onsubmit="return checkform(this);"') . vam_draw_hidden_field('action', 'process') . vam_draw_hidden_field('required', 'password_current,password_new,password_confirmation', 'id="required"'));
$vamTemplate->assign('INPUT_ACTUAL', vam_draw_password_fieldNote(array('name' => 'password_current', 'text' => '&nbsp;' . (vam_not_null(ENTRY_PASSWORD_CURRENT_TEXT) ? '<span class="Requirement">' . ENTRY_PASSWORD_CURRENT_TEXT . '</span>' : '')), '', 'id="password_current"'));
$vamTemplate->assign('ENTRY_PASSWORD_CURRENT_ERROR', ENTRY_PASSWORD_CURRENT_ERROR);
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:31,代码来源:account_password.php


示例11: vam_db_query

if (isset($_GET['gv_no'])) {
    $error = true;
    $gv_query = vam_db_query("select c.coupon_id, c.coupon_amount from " . TABLE_COUPONS . " c, " . TABLE_COUPON_EMAIL_TRACK . " et where coupon_code = '" . vam_db_input($_GET['gv_no']) . "' and c.coupon_id = et.coupon_id");
    if (vam_db_num_rows($gv_query) > 0) {
        $coupon = vam_db_fetch_array($gv_query);
        $redeem_query = vam_db_query("select coupon_id from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . $coupon['coupon_id'] . "'");
        if (vam_db_num_rows($redeem_query) == 0) {
            // check for required session variables
            $_SESSION['gv_id'] = $coupon['coupon_id'];
            $error = false;
        } else {
            $error = true;
        }
    }
} else {
    vam_redirect(FILENAME_DEFAULT);
}
if (!$error && isset($_SESSION['customer_id'])) {
    // Update redeem status
    $gv_query = vam_db_query("insert into  " . TABLE_COUPON_REDEEM_TRACK . " (coupon_id, customer_id, redeem_date, redeem_ip) values ('" . $coupon['coupon_id'] . "', '" . $_SESSION['customer_id'] . "', now(),'" . $REMOTE_ADDR . "')");
    $gv_update = vam_db_query("update " . TABLE_COUPONS . " set coupon_active = 'N' where coupon_id = '" . $coupon['coupon_id'] . "'");
    vam_gv_account_update($_SESSION['customer_id'], $_SESSION['gv_id']);
    unset($_SESSION['gv_id']);
}
$breadcrumb->add(NAVBAR_GV_REDEEM);
$coupon_r = $vamPrice->CalculateCurr($coupon['coupon_amount']);
// if we get here then either the url gv_no was not set or it was invalid
// so output a message.
$vamTemplate->assign('coupon_amount', $vamPrice->Format($coupon_r, true));
$vamTemplate->assign('error', $error);
$vamTemplate->assign('LINK_DEFAULT', '<a class="button" href="' . vam_href_link(FILENAME_DEFAULT) . '">' . vam_image_button('submit.png', IMAGE_BUTTON_CONTINUE) . '</a>');
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:31,代码来源:gv_redeem.php


示例12: vam_db_perform

                vam_db_perform(TABLE_PRODUCTS, array('products_id' => $products_id, 'products_last_modified' => 'now()', 'products_price' => $products_price, 'products_image' => $products_image, 'group_permission_0' => 1, 'group_permission_1' => 1, 'group_permission_2' => 1, 'group_permission_3' => 1, 'products_startpage' => 1, 'products_status' => $products_status, 'products_quantity' => $products_quantity, 'products_date_available' => 'now()'));
                vam_db_perform(TABLE_PRODUCTS_DESCRIPTION, array('products_id' => $products_id, 'products_name' => $products_name, 'products_description' => $products_description, 'language_id' => $_SESSION['languages_id']));
                vam_db_perform(TABLE_PRODUCTS_TO_CATEGORIES, array('products_id' => $products_id, 'categories_id' => $categoryId));
                $count_add++;
            }
            $count++;
        }
        $messageStack->add_session(TEXT_YML_UPDATED . $count_upd, 'success');
        $messageStack->add_session(TEXT_YML_CHANGED . ($count - $count_upd), 'success');
        $messageStack->add_session(TEXT_YML_ADDED . $count_add, 'success');
        $messageStack->add_session(TEXT_YML_CAT_ADDED . $count_cat_add, 'success');
        $messageStack->add_session(TEXT_YML_CAT_UPDATED . $count_cat_upd, 'success');
    } else {
        $messageStack->add_session(TEXT_YML_ERROR, 'error');
    }
    vam_redirect(vam_href_link(FILENAME_YML_IMPORT));
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html <?php 
echo HTML_PARAMS;
?>
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo $_SESSION['language_charset'];
?>
"> 
<title><?php 
echo TITLE;
?>
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:31,代码来源:yml_import.php


示例13: vam_href_link

            $link = vam_href_link(FILENAME_NEWSLETTER, 'action=activate&email=' . $email_address . '&key=' . $vlcode, 'NONSSL');
            $sql_data_array = array('customers_email_address' => vam_db_input($email_address), 'customers_id' => vam_db_input($_SESSION['customer_id']), 'customers_status' => 2, 'customers_firstname' => vam_db_input($firstname), 'customers_lastname' => vam_db_input($lastname), 'mail_status' => '1', 'mail_key' => vam_db_input($vlcode), 'date_added' => 'now()');
            vam_db_perform(TABLE_NEWSLETTER_RECIPIENTS, $sql_data_array);
            // assign vars
            $vamTemplate->assign('LINK', $link);
        } else {
            $vamTemplate->assign('LINK', false);
        }
        $html_mail = $vamTemplate->fetch(CURRENT_TEMPLATE . '/mail/' . $_SESSION['language'] . '/create_account_mail.html');
        $vamTemplate->caching = 0;
        $txt_mail = $vamTemplate->fetch(CURRENT_TEMPLATE . '/mail/' . $_SESSION['language'] . '/create_account_mail.txt');
        vam_php_mail(EMAIL_SUPPORT_ADDRESS, EMAIL_SUPPORT_NAME, $email_address, $name, EMAIL_SUPPORT_FORWARDING_STRING, EMAIL_SUPPORT_REPLY_ADDRESS, EMAIL_SUPPORT_REPLY_ADDRESS_NAME, '', '', EMAIL_SUPPORT_SUBJECT, $html_mail, $txt_mail);
        if (!isset($_SESSION['sendto'])) {
            $_SESSION['sendto'] = $_SESSION['customer_default_address_id'];
        }
        vam_redirect(vam_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'));
    }
}
if ($messageStack->size('checkout_alternative') > 0) {
    $vamTemplate->assign('error', $messageStack->output('checkout_alternative'));
}
if (ACCOUNT_GENDER == 'true') {
    $vamTemplate->assign('gender', '1');
    $vamTemplate->assign('INPUT_MALE', vam_draw_radio_field(array('name' => 'gender', 'suffix' => MALE), 'm', '', 'id="gender" checked="checked"'));
    $vamTemplate->assign('INPUT_FEMALE', vam_draw_radio_field(array('name' => 'gender', 'suffix' => FEMALE, 'text' => vam_not_null(ENTRY_GENDER_TEXT) ? '<span class="Requirement">' . ENTRY_GENDER_TEXT . '</span>' : ''), 'f', '', 'id="gender"'));
} else {
    $vamTemplate->assign('gender', '0');
}
$vamTemplate->assign('INPUT_FIRSTNAME', vam_draw_input_fieldNote(array('name' => 'firstname', 'text' => '&nbsp;' . (vam_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="Requirement">' . ENTRY_FIRST_NAME_TEXT . '</span>' : '')), '', 'id="firstname"'));
if (ACCOUNT_SECOND_NAME == 'true') {
    $vamTemplate->assign('secondname', '1');
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:31,代码来源:checkout_alternative.php


示例14: vam_db_prepare_input

        }
        $_SESSION['billto'] = vam_db_prepare_input($_POST['address']);
        $check_address_query = vam_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $_SESSION['customer_id'] . "' and address_book_id = '" . $_SESSION['billto'] . "'");
        $check_address = vam_db_fetch_array($check_address_query);
        if ($check_address['total'] == '1') {
            if ($reset_payment == true) {
                unset($_SESSION['payment']);
            }
            vam_redirect(vam_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
        } else {
            unset($_SESSION['billto']);
        }
        // no addresses to select from - customer decided to keep the current assigned address
    } else {
        $_SESSION['billto'] = $_SESSION['customer_default_address_id'];
        vam_redirect(vam_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
    }
}
// if no billing destination address was selected, use their own address as default
if (!isset($_SESSION['billto'])) {
    $_SESSION['billto'] = $_SESSION['customer_default_address_id'];
}
$breadcrumb->add(NAVBAR_TITLE_1_PAYMENT_ADDRESS, vam_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2_PAYMENT_ADDRESS, vam_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL'));
$addresses_count = vam_count_customer_address_book_entries();
require DIR_WS_INCLUDES . 'header.php';
$vamTemplate->assign('FORM_ACTION', vam_draw_form('checkout_address', vam_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL'), 'post', 'onsubmit="return checkform(this);"') . vam_draw_hidden_field('required', 'gender,firstname,lastname,address,postcode,city,state,country', 'id="required"'));
if ($messageStack->size('checkout_address') > 0) {
    $vamTemplate->assign('error', $messageStack->output('checkout_address'));
}
if ($process == false) {
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:31,代码来源:checkout_payment_address.php


示例15: str_replace

     // dont allow cache
     $vamTemplate->caching = false;
     $html_mail = $vamTemplate->fetch(CURRENT_TEMPLATE . '/mail/' . $_SESSION['language'] . '/order_mail.html');
     $txt_mail = $vamTemplate->fetch(CURRENT_TEMPLATE . '/mail/' . $_SESSION['language'] . '/order_mail.txt');
     // create subject
     $order_subject = str_replace('{$nr}', $oID, EMAIL_BILLING_SUBJECT_ORDER);
     $order_subject = str_replace('{$date}', strftime(DATE_FORMAT_LONG), $order_subject);
     $order_subject = str_replace('{$lastname}', $order->customer['lastname'], $order_subject);
     $order_subject = str_replace('{$firstname}', $order->customer['firstname'], $order_subject);
     // send mail to admin
     vam_php_mail(EMAIL_BILLING_ADDRESS, EMAIL_BILLING_NAME, EMAIL_BILLING_ADDRESS, STORE_NAME, EMAIL_BILLING_FORWARDING_STRING, $order->customer['email_address'], $order->customer['firstname'], '', '', $order_subject, $html_mail, $txt_mail);
     // send mail to customer
     vam_php_mail(EMAIL_BILLING_ADDRESS, EMAIL_BILLING_NAME, $order->customer['email_address'], $order->customer['firstname'] . ' ' . $order->customer['lastname'], '', EMAIL_BILLING_REPLY_ADDRESS, EMAIL_BILLING_REPLY_ADDRESS_NAME, '', '', $order_subject, $html_mail, $txt_mail);
     //do the dirty
     $messageStack->add_session(SUCCESS_EMAIL_SENT, 'success');
     vam_redirect(vam_href_link(FILENAME_ORDERS_EDIT, vam_get_all_get_params(array('action')) . 'action=edit'));
     break;
     ////
     // Edit Order
 ////
 // Edit Order
 case 'edit':
     if (!isset($_GET['oID'])) {
         $messageStack->add(ERROR_NO_ORDER_SELECTED, 'error');
         break;
     }
     $oID = vam_db_prepare_input($_GET['oID']);
     $orders_query = vam_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int) $oID . "'");
     $order_exists = true;
     if (!vam_db_num_rows($orders_query)) {
         $order_exists = false;
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:31,代码来源:edit_orders.php


示例16: vamTemplate

   --------------------------------------------------------------*/
require 'includes/application_top.php';
require_once DIR_FS_CATALOG . 'includes/external/phpmailer/class.phpmailer.php';
require_once DIR_FS_INC . 'vam_php_mail.inc.php';
// initiate template engine for mail
$vamTemplate = new vamTemplate();
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
$custid = $_POST['custid'];
// Delete Entry Begin
if ($_GET['action'] == 'delete') {
    $reset_query_raw = "delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id={$_GET['customer_id']}";
    vam_db_query($reset_query_raw);
    $reset_query_raw2 = "delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id={$_GET['customer_id']}";
    vam_db_query($reset_query_raw2);
    vam_redirect(vam_href_link(FILENAME_RECOVER_CART_SALES, 'delete=1&customer_id=' . $_GET['customer_id'] . '&tdate=' . $_GET['tdate']));
}
if ($_GET['delete']) {
    $messageStack->add(MESSAGE_STACK_CUSTOMER_ID . $_GET['customer_id'] . MESSAGE_STACK_DELETE_SUCCESS, 'success');
}
// Delete Entry End
/**
 * CONFIGURATION VARIABLES
 */
// E-mail Time to Live :: Default=90
$EMAIL_TTL = 90;
// Default number of days to look back from today for
// abadoned carts, today equals 0 (zero) :: Default=10
$BASE_DAYS = 10;
// Display item attributes. Some sites have attributes
// for their items some do not, if you need them
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:31,代码来源:recover_cart_sales.php


示例17: vam_check_permission

function vam_check_permission($pagename)
{
    if ($pagename != 'index') {
        $access_permission_query = vam_db_query("select `" . $pagename . "` from " . TABLE_ADMIN_ACCESS . " where customers_id = '" . $_SESSION['customer_id'] . "'");
        $access_permission = vam_db_fetch_array($access_permission_query);
        if ($_SESSION['customers_status']['customers_status_id'] == '0' && $access_permission[$pagename] == '1') {
            return true;
        } else {
            return false;
        }
    } else {
        vam_redirect(vam_href_link(FILENAME_LOGIN));
    }
}
开发者ID:nomadcomanche,项目名称:zdorov_shop,代码行数:14,代码来源:general.php


示例18: vamTemplate


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP var2json函数代码示例发布时间:2022-05-23
下一篇:
PHP vam_php_mail函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap