本文整理汇总了PHP中xos_db_prepare_input函数的典型用法代码示例。如果您正苦于以下问题:PHP xos_db_prepare_input函数的具体用法?PHP xos_db_prepare_input怎么用?PHP xos_db_prepare_input使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xos_db_prepare_input函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: __construct
function __construct($object_array)
{
reset($object_array);
while (list($key, $value) = each($object_array)) {
$this->{$key} = xos_db_prepare_input($value);
}
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:7,代码来源:object_info.php
示例2: query
function query($order_id)
{
$order_id = xos_db_prepare_input($order_id);
$order_query = xos_db_query("select customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, AES_DECRYPT(cc_number, 'key_cc_number') AS cc_number, cc_expires, language_id, language_directory, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int) $order_id . "'");
$order = xos_db_fetch_array($order_query);
$order_total_query = xos_db_query("select text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int) $order_id . "' and class = 'ot_total' order by orders_total_id DESC limit 1");
$order_total = xos_db_fetch_array($order_total_query);
$shipping_method_query = xos_db_query("select title from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int) $order_id . "' and class = 'ot_shipping'");
$shipping_method = xos_db_fetch_array($shipping_method_query);
$order_status_query = xos_db_query("select orders_status_name from " . TABLE_ORDERS_STATUS . " where orders_status_id = '" . $order['orders_status'] . "' and language_id = '" . (int) $_SESSION['languages_id'] . "'");
$order_status = xos_db_fetch_array($order_status_query);
$this->info = array('language_id' => $order['language_id'], 'language_directory' => $order['language_directory'], 'currency' => $order['currency'], 'currency_value' => $order['currency_value'], 'payment_method' => $order['payment_method'], 'cc_type' => $order['cc_type'], 'cc_owner' => $order['cc_owner'], 'cc_number' => $order['cc_number'], 'cc_expires' => $order['cc_expires'], 'date_purchased' => $order['date_purchased'], 'orders_status' => $order_status['orders_status_name'], 'last_modified' => $order['last_modified'], 'total' => strip_tags($order_total['text']), 'shipping_method' => substr($shipping_method['title'], -1) == ':' ? substr(strip_tags($shipping_method['title']), 0, -1) : strip_tags($shipping_method['title']));
$this->customer = array('id' => $order['customers_id'], 'name' => $order['customers_name'], 'company' => $order['customers_company'], 'street_address' => $order['customers_street_address'], 'suburb' => $order['customers_suburb'], 'city' => $order['customers_city'], 'postcode' => $order['customers_postcode'], 'state' => $order['customers_state'], 'country' => $order['customers_country'], 'format_id' => $order['customers_address_format_id'], 'telephone' => $order['customers_telephone'], 'email_address' => $order['customers_email_address']);
$this->delivery = array('name' => $order['delivery_name'], 'company' => $order['delivery_company'], 'street_address' => $order['delivery_street_address'], 'suburb' => $order['delivery_suburb'], 'city' => $order['delivery_city'], 'postcode' => $order['delivery_postcode'], 'state' => $order['delivery_state'], 'country' => $order['delivery_country'], 'format_id' => $order['delivery_address_format_id']);
if (empty($this->delivery['name']) && empty($this->delivery['street_address'])) {
$this->delivery = false;
}
$this->billing = array('name' => $order['billing_name'], 'company' => $order['billing_company'], 'street_address' => $order['billing_street_address'], 'suburb' => $order['billing_suburb'], 'city' => $order['billing_city'], 'postcode' => $order['billing_postcode'], 'state' => $order['billing_state'], 'country' => $order['billing_country'], 'format_id' => $order['billing_address_format_id']);
$index = 0;
$orders_products_query = xos_db_query("select orders_products_id, products_id, products_model, products_name, products_p_unit, products_price, final_price, products_price_text, final_price_text, total_price_text, products_tax, products_quantity from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int) $order_id . "'");
while ($orders_products = xos_db_fetch_array($orders_products_query)) {
$this->products[$index] = array('qty' => $orders_products['products_quantity'], 'id' => $orders_products['products_id'], 'model' => $orders_products['products_model'], 'name' => $orders_products['products_name'], 'packaging_unit' => $orders_products['products_p_unit'], 'tax' => $orders_products['products_tax'], 'price' => $orders_products['products_price'], 'final_price' => $orders_products['final_price'], 'price_formated' => $orders_products['products_price_text'], 'final_price_formated' => $orders_products['final_price_text'], 'total_price_formated' => $orders_products['total_price_text']);
$subindex = 0;
$attributes_query = xos_db_query("select products_options, products_options_values, options_values_price, options_values_price_text, price_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int) $order_id . "' and orders_products_id = '" . (int) $orders_products['orders_products_id'] . "'");
if (xos_db_num_rows($attributes_query)) {
while ($attributes = xos_db_fetch_array($attributes_query)) {
$this->products[$index]['attributes'][$subindex] = array('option' => $attributes['products_options'], 'value' => $attributes['products_options_values'], 'prefix' => $attributes['price_prefix'], 'price' => $attributes['options_values_price'], 'price_formated' => $attributes['options_values_price_text']);
$subindex++;
}
}
$this->info['tax_groups']["{$this->products[$index]['tax']}"] = '1';
$index++;
}
$totals_query = xos_db_query("select title, text, tax, class from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int) $order_id . "' order by sort_order, orders_total_id");
while ($totals = xos_db_fetch_array($totals_query)) {
$this->totals[] = array('title' => $totals['title'], 'text' => $totals['text'], 'tax' => $totals['tax'], 'class' => $totals['class']);
if ($totals['tax'] > -1 && ($totals['class'] == 'ot_shipping' || $totals['class'] == 'ot_loworderfee' || $totals['class'] == 'ot_cod_fee')) {
$this->info['tax_groups']["{$totals['tax']}"] = '1';
}
}
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:41,代码来源:order.php
示例3: xos_db_fetch_array
$valid_product = true;
$product_info = xos_db_fetch_array($product_info_query);
}
}
if ($valid_product == false) {
xos_redirect(xos_href_link(FILENAME_PRODUCT_INFO, 'p=' . (int) $_GET['p']), false);
}
require DIR_FS_DOCUMENT_ROOT . FILENAME_CAPTCHA;
require DIR_FS_SMARTY . 'catalog/languages/' . $_SESSION['language'] . '/' . FILENAME_TELL_A_FRIEND;
if (isset($_GET['action']) && $_GET['action'] == 'process' && isset($_POST['formid']) && $_POST['formid'] == $_SESSION['sessiontoken']) {
$error = false;
$to_email_address = xos_db_prepare_input($_POST['to_email_address']);
$to_name = xos_db_prepare_input($_POST['to_name']);
$from_email_address = xos_db_prepare_input($_POST['from_email_address']);
$from_name = xos_db_prepare_input($_POST['from_name']);
$message = xos_db_prepare_input(substr(strip_tags($_POST['message']), 0, 1000));
if (empty($from_name)) {
$error = true;
$messageStack->add('friend', ERROR_FROM_NAME);
$smarty->assign('error_from_name', true);
}
if (strlen($from_email_address) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
$error = true;
$messageStack->add('friend', ERROR_FROM_ADDRESS_MIN_LENGTH);
$smarty->assign('error_from_address', true);
} elseif (!xos_validate_email($from_email_address)) {
$error = true;
$messageStack->add('friend', ERROR_FROM_ADDRESS);
$smarty->assign('error_from_address', true);
}
if (empty($to_name)) {
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:tell_a_friend.php
示例4: xos_db_prepare_input
$firstname = xos_db_prepare_input($_POST['firstname']);
$lastname = xos_db_prepare_input($_POST['lastname']);
$street_address = xos_db_prepare_input($_POST['street_address']);
if (ACCOUNT_SUBURB == 'true') {
$suburb = xos_db_prepare_input($_POST['suburb']);
}
$postcode = xos_db_prepare_input($_POST['postcode']);
$city = xos_db_prepare_input($_POST['city']);
$country = xos_db_prepare_input($_POST['country']);
if (ACCOUNT_STATE == 'true') {
if (isset($_POST['zone_id'])) {
$zone_id = xos_db_prepare_input($_POST['zone_id']);
} else {
$zone_id = false;
}
$state = xos_db_prepare_input($_POST['state']);
}
if (ACCOUNT_GENDER == 'true') {
if ($gender != 'm' && $gender != 'f') {
$error = true;
$messageStack->add('addressbook', ENTRY_GENDER_ERROR);
$smarty->assign('gender_error', true);
}
}
if (strlen($firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {
$error = true;
$messageStack->add('addressbook', ENTRY_FIRST_NAME_ERROR);
$smarty->assign('first_name_error', true);
}
if (strlen($lastname) < ENTRY_LAST_NAME_MIN_LENGTH) {
$error = true;
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:address_book_process.php
示例5: xos_db_prepare_input
}
// needs to be included earlier to set the success message in the messageStack
require DIR_FS_SMARTY . 'catalog/languages/' . $_SESSION['language'] . '/' . FILENAME_ACCOUNT_EDIT;
if (isset($_POST['action']) && $_POST['action'] == 'process' && isset($_POST['formid']) && $_POST['formid'] == $_SESSION['sessiontoken']) {
if (ACCOUNT_GENDER == 'true') {
$gender = xos_db_prepare_input($_POST['gender']);
}
$firstname = xos_db_prepare_input($_POST['firstname']);
$lastname = xos_db_prepare_input($_POST['lastname']);
if (ACCOUNT_DOB == 'true') {
$dob = xos_db_prepare_input($_POST['dob']);
}
$email_address = xos_db_prepare_input($_POST['email_address']);
$language_id = xos_db_prepare_input($_POST['languages']);
$telephone = xos_db_prepare_input($_POST['telephone']);
$fax = xos_db_prepare_input($_POST['fax']);
$error = false;
if (ACCOUNT_GENDER == 'true') {
if ($gender != 'm' && $gender != 'f') {
$error = true;
$messageStack->add('account_edit', ENTRY_GENDER_ERROR);
}
}
if (strlen($firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {
$error = true;
$messageStack->add('account_edit', ENTRY_FIRST_NAME_ERROR);
}
if (strlen($lastname) < ENTRY_LAST_NAME_MIN_LENGTH) {
$error = true;
$messageStack->add('account_edit', ENTRY_LAST_NAME_ERROR);
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:account_edit.php
示例6: send
function send($newsletter_id)
{
global $messageStack;
if (SEND_EMAILS != 'true') {
$messageStack->add('news_email', ERROR_EMAIL_WAS_NOT_SENT, 'error');
return false;
}
$ids = $_GET['customers_chosen'];
$mail_query = xos_db_query("select s.subscriber_id, s.subscriber_email_address, s.subscriber_identity_code, c.customers_firstname, c.customers_lastname from " . TABLE_NEWSLETTER_SUBSCRIBERS . " s left join " . TABLE_CUSTOMERS . " c on s.customers_id = c.customers_id where s.subscriber_id in (" . $ids . ") order by s.customers_id");
if (empty($this->language_directory)) {
$lang_query = xos_db_query("select directory from " . TABLE_LANGUAGES . " where code = '" . xos_db_input(DEFAULT_LANGUAGE) . "'");
$lang = xos_db_fetch_array($lang_query);
$this->language_directory = $lang['directory'];
}
//Let's build a message object using the mailer class
$email_to_subscriber = new mailer();
$email_from_value = EMAIL_FROM;
$from = html_entity_decode($email_from_value, ENT_QUOTES, 'UTF-8');
$address = '';
$name = '';
$pieces = explode('<', $from);
if (count($pieces) == 2) {
$address = trim($pieces[1], " >");
$name = trim($pieces[0]);
} elseif (count($pieces) == 1) {
$pos = stripos($pieces[0], '@');
$address = $pos ? trim($pieces[0], " >") : '';
}
$email_to_subscriber->From = $address;
$email_to_subscriber->FromName = $name;
$email_to_subscriber->WordWrap = '100';
$email_to_subscriber->Subject = $this->title;
$smarty_newsletter = new Smarty();
$smarty_newsletter->template_dir = DIR_FS_SMARTY . 'catalog/templates/';
$smarty_newsletter->compile_dir = DIR_FS_SMARTY . 'catalog/templates_c/';
$smarty_newsletter->config_dir = DIR_FS_SMARTY . 'catalog/';
$smarty_newsletter->cache_dir = DIR_FS_SMARTY . 'catalog/cache/';
$smarty_newsletter->left_delimiter = '[@{';
$smarty_newsletter->right_delimiter = '}@]';
$is_html = false;
if ($this->content_text_htlm != '' && EMAIL_USE_HTML == 'true') {
$is_html = true;
$smarty_newsletter->assign(array('nl' => "\n", 'html_params' => HTML_PARAMS, 'xhtml_lang' => !empty($this->language_code) ? $this->language_code : DEFAULT_LANGUAGE, 'charset' => CHARSET, 'base_href' => substr(HTTP_SERVER, -1) == '/' ? HTTP_SERVER : '', 'content_text_htlm' => $this->content_text_htlm, 'content_text_plain' => $this->content_text_plain));
$smarty_newsletter->configLoad('languages/' . $this->language_directory . '_email.conf', 'newsletter_email_html');
$output_newsletter_email_html = $smarty_newsletter->fetch(DEFAULT_TPL . '/includes/email/newsletter_email_html.tpl');
$smarty_newsletter->configLoad('languages/' . $this->language_directory . '_email.conf', 'newsletter_email_text');
$output_newsletter_email_text = $smarty_newsletter->fetch(DEFAULT_TPL . '/includes/email/newsletter_email_text.tpl');
$email_to_subscriber->isHTML(true);
} else {
$smarty_newsletter->assign(array('nl' => "\n", 'content_text_plain' => $this->content_text_plain));
$smarty_newsletter->configLoad('languages/' . $this->language_directory . '_email.conf', 'newsletter_email_text');
$output_newsletter_email_text = $smarty_newsletter->fetch(DEFAULT_TPL . '/includes/email/newsletter_email_text.tpl');
$email_to_subscriber->isHTML(false);
}
while ($mail = xos_db_fetch_array($mail_query)) {
$link_unsubscribe = xos_catalog_href_link('newsletter_subscribe.php', 'action=unsubscribe&identity_code=' . $mail['subscriber_identity_code'], 'SSL');
if ($is_html) {
$email_to_subscriber->Body = $output_newsletter_email_html . '<a href="' . $link_unsubscribe . '" target="_blank">' . $link_unsubscribe . '</a>' . "\n" . '</div>' . "\n" . '</body>' . "\n" . '</html>' . "\n";
$email_to_subscriber->AltBody = html_entity_decode(strip_tags($output_newsletter_email_text . $link_unsubscribe), ENT_QUOTES, 'UTF-8');
} else {
$email_to_subscriber->Body = html_entity_decode(strip_tags($output_newsletter_email_text . $link_unsubscribe), ENT_QUOTES, 'UTF-8');
}
$email_to_subscriber->addAddress($mail['subscriber_email_address'], $mail['customers_firstname'] . ' ' . $mail['customers_lastname']);
if (!$email_to_subscriber->send()) {
$messageStack->add('news_email', sprintf(ERROR_PHP_MAILER, $email_to_subscriber->ErrorInfo, '<' . $mail['subscriber_email_address'] . '>'), 'error');
} else {
$messageStack->add('news_email', sprintf(NOTICE_EMAIL_SENT_TO, '<' . $mail['subscriber_email_address'] . '>'), 'success');
}
$email_to_subscriber->clearAddresses();
}
$newsletter_id = xos_db_prepare_input($newsletter_id);
xos_db_query("update " . TABLE_NEWSLETTERS . " set date_sent = now(), status = '1', locked = '0' where newsletters_id = '" . xos_db_input($newsletter_id) . "'");
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:73,代码来源:newsletter.php
示例7: array_merge
$rInfo_array = array_merge((array) $reviews, (array) $products, (array) $products_name);
$rInfo = new objectInfo($rInfo_array);
$product_image = xos_get_product_images($rInfo->products_image);
$reviews_rating = '';
for ($i = 1; $i <= 5; $i++) {
$reviews_rating .= xos_draw_radio_field('reviews_rating', $i, '', $rInfo->reviews_rating);
}
if ($product_image['name']) {
$smarty->assign('products_image', xos_image(DIR_WS_CATALOG_IMAGES . 'products/medium/' . $product_image['name'], $rInfo->products_name, '', '', 'style="margin: 5px;"'));
}
$smarty->assign(array('edit' => true, 'form_begin_review' => xos_draw_form('review', FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $_GET['rID'] . '&action=preview'), 'products_name' => $rInfo->products_name, 'customers_name' => $rInfo->customers_name, 'date_added' => xos_date_short($rInfo->date_added), 'textarea_reviews_text' => xos_draw_textarea_field('reviews_text', '60', '15', $rInfo->reviews_text), 'hidden_reviews_id' => xos_draw_hidden_field('reviews_id', $rInfo->reviews_id), 'hidden_products_id' => xos_draw_hidden_field('products_id', $rInfo->products_id), 'hidden_customers_name' => xos_draw_hidden_field('customers_name', $rInfo->customers_name), 'hidden_products_name' => xos_draw_hidden_field('products_name', $rInfo->products_name), 'hidden_products_image' => xos_draw_hidden_field('products_image', $rInfo->products_image), 'hidden_date_added' => xos_draw_hidden_field('date_added', $rInfo->date_added), 'link_filename_reviews_cancel' => xos_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $_GET['rID']), 'reviews_rating' => $reviews_rating, 'form_end' => '</form>'));
} elseif ($action == 'preview') {
if (xos_not_null($_POST)) {
$rInfo = new objectInfo($_POST);
} else {
$rID = xos_db_prepare_input($_GET['rID']);
$reviews_query = xos_db_query("select r.reviews_id, r.products_id, r.customers_name, r.date_added, r.last_modified, r.reviews_read, rd.reviews_text, r.reviews_rating from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.reviews_id = '" . (int) $rID . "' and r.reviews_id = rd.reviews_id");
$reviews = xos_db_fetch_array($reviews_query);
$products_query = xos_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int) $reviews['products_id'] . "'");
$products = xos_db_fetch_array($products_query);
$products_name_query = xos_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int) $reviews['products_id'] . "' and language_id = '" . (int) $_SESSION['used_lng_id'] . "'");
$products_name = xos_db_fetch_array($products_name_query);
$rInfo_array = array_merge((array) $reviews, (array) $products, (array) $products_name);
$rInfo = new objectInfo($rInfo_array);
}
$product_image = xos_get_product_images($rInfo->products_image);
if (xos_not_null($_POST)) {
/* Re-Post all POST'ed variables */
reset($_POST);
$hidden_post_values = '';
while (list($key, $value) = each($_POST)) {
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:reviews.php
示例8: xos_db_prepare_input
// XOS-Shop is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// XOS-Shop is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with XOS-Shop. If not, see <http://www.gnu.org/licenses/>.
////////////////////////////////////////////////////////////////////////////////
require 'includes/application_top.php';
if (!(@(include DIR_FS_SMARTY . 'catalog/templates/' . SELECTED_TPL . '/php/' . FILENAME_CONTENT) == 'overwrite_all')) {
$content_id = xos_db_prepare_input($_GET['co']);
$content_query = xos_db_query("select c.content_id, c.link_request_type, c.type, cd.name, cd.heading_title, cd.content, cd.php_source from " . TABLE_CONTENTS . " c, " . TABLE_CONTENTS_DATA . " cd where c.status = '1' and c.content_id = '" . (int) $content_id . "' and c.content_id = cd.content_id and language_id = '" . (int) $_SESSION['languages_id'] . "'");
$content = xos_db_fetch_array($content_query);
eval(' ?>' . $content['php_source'] . '<?php ');
if (in_array($content['type'], array('info', 'not_in_menu'))) {
$site_trail->add($content['name'], xos_href_link(FILENAME_CONTENT, 'co=' . $content['content_id'], !empty($content['link_request_type']) ? $content['link_request_type'] : 'NONSSL'));
}
require DIR_WS_INCLUDES . 'html_header.php';
require DIR_WS_INCLUDES . 'boxes.php';
require DIR_WS_INCLUDES . 'header.php';
require DIR_WS_INCLUDES . 'footer.php';
$back = sizeof($_SESSION['navigation']->path) - 2;
if (!empty($_SESSION['navigation']->path[$back])) {
$get_params_array = $_SESSION['navigation']->path[$back]['get'];
$get_params_array['rmp'] = '0';
$back_link = xos_href_link($_SESSION['navigation']->path[$back]['page'], xos_array_to_query_string($get_params_array, array('action', xos_session_name())), $_SESSION['navigation']->path[$back]['mode']);
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:content.php
示例9: xos_db_prepare_input
function xos_db_prepare_input($string)
{
if (is_string($string)) {
return trim(xos_sanitize_string(stripslashes($string)));
} elseif (is_array($string)) {
reset($string);
while (list($key, $value) = each($string)) {
$string[$key] = xos_db_prepare_input($value);
}
return $string;
} else {
return $string;
}
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:14,代码来源:database_mysqli.php
示例10: array
break;
}
}
$javascript = '<script type="text/javascript" src="' . DIR_WS_ADMIN . 'includes/general.js"></script>' . "\n";
if ($action == 'new_page' && WYSIWYG_FOR_PAGES == 'true') {
$javascript .= '<script type="text/javascript" src="' . DIR_WS_ADMIN . 'includes/ckeditor/ckeditor.js"></script>' . "\n";
}
require DIR_WS_INCLUDES . 'html_header.php';
require DIR_WS_INCLUDES . 'header.php';
require DIR_WS_INCLUDES . 'column_left.php';
require DIR_WS_INCLUDES . 'footer.php';
// $smarty->assign('BODY_TAG_PARAMS', 'onload="SetFocus();"');
if ($action == 'new_page') {
$parameters = array('categories_or_pages_id' => '', 'link_request_type' => '', 'page_name' => '', 'page_not_in_menu' => '', 'sort_order' => '', 'categories_or_pages_status' => '');
if (isset($_GET['cpID']) && $reload != true) {
$cpID = xos_db_prepare_input($_GET['cpID']);
$page_query = xos_db_query("select c.categories_or_pages_id, c.link_request_type, cpd.categories_or_pages_name as page_name, c.page_not_in_menu, c.sort_order, c.categories_or_pages_status from " . TABLE_CATEGORIES_OR_PAGES . " c, " . TABLE_CATEGORIES_OR_PAGES_DATA . " cpd where c.categories_or_pages_id = '" . (int) $cpID . "' and c.categories_or_pages_id = cpd.categories_or_pages_id and cpd.language_id = '" . (int) $_SESSION['used_lng_id'] . "'");
$page = xos_db_fetch_array($page_query);
$cInfo = new objectInfo($page);
} elseif (xos_not_null($_POST)) {
$cInfo = new objectInfo($_POST);
} else {
$cInfo = new objectInfo($parameters);
}
if (WYSIWYG_FOR_PAGES == 'true') {
$smarty->assign(array('wysiwyg' => true, 'link_filename_popup_file_manager_link_selection' => str_replace('&', '&', xos_href_link(FILENAME_POPUP_FILE_MANAGER, 'action=link_entrence&goto=' . DIR_FS_DOCUMENT_ROOT . 'contents')), 'link_filename_popup_file_manager_image' => str_replace('&', '&', xos_href_link(FILENAME_POPUP_FILE_MANAGER, 'action=no_link_entrence&goto=' . DIR_FS_DOCUMENT_ROOT . 'contents/image')), 'link_filename_popup_file_manager_flash' => str_replace('&', '&', xos_href_link(FILENAME_POPUP_FILE_MANAGER, 'action=no_link_entrence&goto=' . DIR_FS_DOCUMENT_ROOT . 'contents/flash')), 'page_config' => (ENABLE_SSL == 'true' ? $_SESSION['disable_ssl'] ? HTTP_SERVER : HTTPS_SERVER : HTTP_SERVER) . DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/ckconfig/page_config.js', 'page_base_href' => ENABLE_SSL == 'true' ? $_SESSION['disable_ssl'] ? HTTP_SERVER : HTTPS_SERVER : HTTP_SERVER, 'lang_code' => xos_get_languages_code()));
}
$languages = xos_get_languages();
$contents_data_array = array();
$php_code_included = false;
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:pages.php
示例11: xos_redirect
xos_redirect(xos_href_link(FILENAME_DEFAULT), false);
} elseif (!(@(include DIR_FS_SMARTY . 'catalog/templates/' . SELECTED_TPL . '/php/' . FILENAME_ACCOUNT_NEWSLETTERS) == 'overwrite_all')) {
if (!isset($_SESSION['customer_id'])) {
$_SESSION['navigation']->remove_current_page();
$_SESSION['navigation']->set_snapshot();
xos_redirect(xos_href_link(FILENAME_LOGIN, '', 'SSL'));
} elseif (NEWSLETTER_ENABLED != 'true') {
xos_redirect(xos_href_link(FILENAME_ACCOUNT, '', 'SSL'));
}
// needs to be included earlier to set the success message in the messageStack
require DIR_FS_SMARTY . 'catalog/languages/' . $_SESSION['language'] . '/' . FILENAME_ACCOUNT_NEWSLETTERS;
$newsletter_query = xos_db_query("select newsletter_status from " . TABLE_NEWSLETTER_SUBSCRIBERS . " where customers_id = '" . (int) $_SESSION['customer_id'] . "'");
$newsletter = xos_db_fetch_array($newsletter_query);
if (isset($_POST['action']) && $_POST['action'] == 'process' && isset($_POST['formid']) && $_POST['formid'] == $_SESSION['sessiontoken']) {
if (isset($_POST['newsletter_general']) && is_numeric($_POST['newsletter_general'])) {
$newsletter_general = xos_db_prepare_input($_POST['newsletter_general']);
} else {
$newsletter_general = '0';
}
if ($newsletter_general != $newsletter['newsletter_status']) {
$newsletter_general = $newsletter['newsletter_status'] == '1' ? '0' : '1';
xos_db_query("update " . TABLE_NEWSLETTER_SUBSCRIBERS . " set newsletter_status = '" . (int) $newsletter_general . "', newsletter_status_change = now() where customers_id = '" . (int) $_SESSION['customer_id'] . "'");
}
$messageStack->add_session('account', SUCCESS_NEWSLETTER_UPDATED, 'success');
xos_redirect(xos_href_link(FILENAME_ACCOUNT, '', 'SSL'));
}
$site_trail->add(NAVBAR_TITLE_1, xos_href_link(FILENAME_ACCOUNT, '', 'SSL'));
$site_trail->add(NAVBAR_TITLE_2, xos_href_link(FILENAME_ACCOUNT_NEWSLETTERS, '', 'SSL'));
$add_header = '<script type="text/javascript">' . "\n" . '/* <![CDATA[ */' . "\n" . 'function rowOverEffect(object) {' . "\n" . ' if (object.className == "module-row") object.className = "module-row-over";' . "\n" . '}' . "\n\n" . 'function rowOutEffect(object) {' . "\n" . ' if (object.className == "module-row-over") object.className = "module-row";' . "\n" . '}' . "\n\n" . 'function checkBox(object) {' . "\n" . ' document.account_newsletter.elements[object].checked = !document.account_newsletter.elements[object].checked;' . "\n" . '}' . "\n" . '/* ]]> */' . "\n" . '</script> ' . "\n";
require DIR_WS_INCLUDES . 'html_header.php';
require DIR_WS_INCLUDES . 'boxes.php';
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:account_newsletters.php
示例12: ucwords
break;
case 'group_new':
$admin_groups_name = ucwords(strtolower(xos_db_prepare_input($_POST['admin_groups_name'])));
$name_replace = preg_replace("/ /", "%", $admin_groups_name);
if ($admin_groups_name == '' || NULL || strlen($admin_groups_name) <= 5) {
xos_redirect(xos_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET[gID] . '&gName=false&action=new_group'));
} else {
$check_groups_name_query = xos_db_query("select admin_groups_name as group_name_new from " . TABLE_ADMIN_GROUPS . " where admin_groups_name like '%" . $name_replace . "%'");
$check_duplicate = xos_db_num_rows($check_groups_name_query);
if ($check_duplicate > 0) {
xos_redirect(xos_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET['gID'] . '&gName=used&action=new_group'));
} else {
$sql_data_array = array('admin_groups_name' => $admin_groups_name);
xos_db_perform(TABLE_ADMIN_GROUPS, $sql_data_array);
$admin_groups_id = xos_db_insert_id();
$set_groups_id = xos_db_prepare_input($_POST['set_groups_id']);
$add_group_id = $set_groups_id . ',\'' . $admin_groups_id . '\'';
xos_db_query("alter table " . TABLE_ADMIN_FILES . " change admin_groups_id admin_groups_id set( " . $add_group_id . ") NOT NULL DEFAULT '1' ");
xos_redirect(xos_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $admin_groups_id));
}
}
break;
}
}
$javascript = '<script type="text/javascript" src="' . DIR_WS_ADMIN . 'includes/general.js"></script>' . "\n";
require 'includes/account_check.js.php';
require DIR_WS_INCLUDES . 'html_header.php';
require DIR_WS_INCLUDES . 'header.php';
require DIR_WS_INCLUDES . 'column_left.php';
require DIR_WS_INCLUDES . 'footer.php';
if ($_GET['gPath']) {
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:admin_members.php
示例13: switch
// Released under the GNU General Public License
////////////////////////////////////////////////////////////////////////////////
require 'includes/application_top.php';
if (!(@(include DIR_FS_SMARTY . 'catalog/templates/' . SELECTED_TPL . '/php/' . FILENAME_REDIRECT) == 'overwrite_all')) {
switch ($_GET['action']) {
case 'banner':
$banner_query = xos_db_query("select banners_url from " . TABLE_BANNERS_CONTENT . " where banners_id = '" . (int) $_GET['goto'] . "' and language_id = '" . (int) $_SESSION['languages_id'] . "'");
if (xos_db_num_rows($banner_query)) {
$banner = xos_db_fetch_array($banner_query);
xos_update_banner_click_count($_GET['goto']);
xos_redirect($banner['banners_url']);
}
break;
case 'url':
if (isset($_GET['goto']) && xos_not_null($_GET['goto'])) {
$check_query = xos_db_query("select products_url from " . TABLE_PRODUCTS_DESCRIPTION . " where products_url = '" . xos_db_input(xos_db_prepare_input($_GET['goto'])) . "' limit 1");
if (xos_db_num_rows($check_query)) {
$url = xos_db_fetch_array($check_query);
xos_redirect(parse_url($url['products_url'], PHP_URL_SCHEME) ? $url['products_url'] : 'http://' . $url['products_url']);
}
}
break;
case 'manufacturer':
if (isset($_GET['m']) && xos_not_null($_GET['m'])) {
$manufacturer_query = xos_db_query("select manufacturers_url from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . (int) $_GET['m'] . "' and languages_id = '" . (int) $_SESSION['languages_id'] . "'");
if (xos_db_num_rows($manufacturer_query)) {
// url exists in selected language
$manufacturer = xos_db_fetch_array($manufacturer_query);
if (xos_not_null($manufacturer['manufacturers_url'])) {
xos_db_query("update " . TABLE_MANUFACTURERS_INFO . " set url_clicked = url_clicked+1, date_last_click = now() where manufacturers_id = '" . (int) $_GET['m'] . "' and languages_id = '" . (int) $_SESSION['languages_id'] . "'");
xos_redirect(parse_url($manufacturer['manufacturers_url'], PHP_URL_SCHEME) ? $manufacturer['manufacturers_url'] : 'http://' . $manufacturer['manufacturers_url']);
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:redirect.php
示例14: xos_redirect
<?php
if (SEND_EMAILS != 'true') {
xos_redirect(xos_href_link(FILENAME_LOGIN));
}
if (isset($_GET['action']) && $_GET['action'] == 'process' && (SESSION_FORCE_COOKIE_USE == 'true' && isset($_COOKIE[session_name()]) || SESSION_FORCE_COOKIE_USE == 'false')) {
$email_address = xos_db_prepare_input($_POST['email_address']);
$firstname = xos_db_prepare_input($_POST['firstname']);
$log_times = $_POST['log_times'] + 1;
if ($log_times >= 4) {
$_SESSION['password_forgotten'] = true;
}
// Check if email exists
$check_admin_query = xos_db_query("select admin_id as check_id, admin_firstname as check_firstname, admin_lastname as check_lastname, admin_email_address as check_email_address from " . TABLE_ADMIN . " where admin_email_address = '" . xos_db_input($email_address) . "'");
if (!xos_db_num_rows($check_admin_query)) {
$_GET['login'] = 'fail';
} else {
$check_admin = xos_db_fetch_array($check_admin_query);
if ($check_admin['check_firstname'] != $firstname) {
$_GET['login'] = 'fail';
} else {
$_GET['login'] = 'success';
$makePassword = xos_create_random_value(7);
@(require DIR_FS_SMARTY . 'admin/languages/' . $_SESSION['language'] . '/' . FILENAME_LOGIN);
$email_to_admin = new mailer($check_admin['check_firstname'] . ' ' . $check_admin['admin_lastname'], $check_admin['check_email_address'], ADMIN_EMAIL_SUBJECT, '', sprintf(ADMIN_EMAIL_TEXT, $check_admin['check_firstname'], HTTP_SERVER . DIR_WS_ADMIN, $check_admin['check_email_address'], $makePassword, STORE_OWNER), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
if (!$email_to_admin->send()) {
$mailer_error_message = sprintf(ERROR_PHPMAILER, $email_to_admin->ErrorInfo);
} else {
xos_db_query("update " . TABLE_ADMIN . " set admin_password = '" . xos_encrypt_password($makePassword) . "' where admin_id = '" . $check_admin['check_id'] . "'");
}
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:password_forgotten.php
示例15: xos_db_prepare_input
$tax_class_id = xos_db_prepare_input($_GET['tID']);
$tax_class_title = xos_db_prepare_input($_POST['tax_class_title']);
$actual_tax_class_title = xos_db_prepare_input($_POST['actual_tax_class_title']);
$tax_class_description = xos_db_prepare_input($_POST['tax_class_description']);
if (mb_strtolower($actual_tax_class_title) != mb_strtolower($tax_class_title)) {
$check_query = xos_db_query("select tax_class_title from " . TABLE_TAX_CLASS . " where tax_class_title = '" . xos_db_input($tax_class_title) . "'");
if (xos_db_num_rows($check_query) || $tax_class_title == '') {
xos_redirect(xos_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $_GET['tID'] . '&tax_class_title=' . $tax_class_title . '&tax_class_description=' . $tax_class_description . '&action=edit&error_title=' . $tax_class_title));
}
}
xos_db_query("update " . TABLE_TAX_CLASS . " set tax_class_id = '" . (int) $tax_class_id . "', tax_class_title = '" . xos_db_input($tax_class_title) . "', tax_class_description = '" . xos_db_input($tax_class_description) . "', last_modified = now() where tax_class_id = '" . (int) $tax_class_id . "'");
$smarty_cache_control->clearAllCache();
xos_redirect(xos_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tax_class_id));
break;
case 'deleteconfirm':
$tax_class_id = xos_db_prepare_input($_GET['tID']);
xos_db_query("delete from " . TABLE_TAX_CLASS . " where tax_class_id = '" . (int) $tax_class_id . "'");
$smarty_cache_control->clearAllCache();
xos_redirect(xos_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page']));
break;
}
}
$javascript = '<script type="text/javascript" src="' . DIR_WS_ADMIN . 'includes/general.js"></script>' . "\n";
require DIR_WS_INCLUDES . 'html_header.php';
require DIR_WS_INCLUDES . 'header.php';
require DIR_WS_INCLUDES . 'column_left.php';
require DIR_WS_INCLUDES . 'footer.php';
$classes_query_raw = "select tax_class_id, tax_class_title, tax_class_description, last_modified, date_added from " . TABLE_TAX_CLASS . " order by tax_class_title";
$classes_split = new splitPageResults($_GET['page'], MAX_DISPLAY_RESULTS, $classes_query_raw, $classes_query_numrows);
$classes_query = xos_db_query($classes_query_raw);
$classes_array = array();
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:tax_classes.php
示例16: sprintf
}
$gv_email->clearAddresses();
}
$_SESSION['used_lng_id'] = $used_lang_id;
}
if ($mailer_error == false) {
$messageStack->add_session('header', sprintf(NOTICE_EMAIL_SENT_TO, $mail_sent_to), 'success');
}
xos_redirect(xos_href_link(FILENAME_GV_MAIL));
}
}
$email_error = false;
$entry_email_to_error = false;
$entry_email_to_check_error = false;
if ($action == 'preview' && !empty($_POST['email_to'])) {
$email_to = xos_db_prepare_input($_POST['email_to']);
if (strlen($email_to) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
$email_error = true;
$entry_email_to_error = true;
}
if (!xos_validate_email($email_to)) {
$email_error = true;
$entry_email_to_check_error = true;
}
}
if ($action == 'preview' && empty($_POST['customers_email_address']) && empty($_POST['email_to'])) {
$messageStack->add('header', ERROR_NO_CUSTOMER_SELECTED, 'error');
}
if ($action == 'preview' && $_POST['amount'] == '') {
$messageStack->add('header', ERROR_NO_AMOUNT_SELECTED, 'error');
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:gv_mail.php
示例17: xos_date_raw
$specials_error = true;
$this_group_specials_error = true;
$spec_err_gr .= $customers_group['customers_group_id'] . ',';
}
}
$special_expires_date = xos_date_raw(xos_db_prepare_input($_POST['special_expires_date_' . $customers_group['customers_group_id']]));
$special_expires_date = date('Ymd') <= $special_expires_date && $all_specials ? $special_expires_date : 'null';
if ($customers_group['customers_group_id'] == 0) {
$default_price = xos_db_prepa
|
请发表评论