本文整理汇总了PHP中smn_db_prepare_input函数的典型用法代码示例。如果您正苦于以下问题:PHP smn_db_prepare_input函数的具体用法?PHP smn_db_prepare_input怎么用?PHP smn_db_prepare_input使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了smn_db_prepare_input函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: objectInfo
function objectInfo($object_array)
{
reset($object_array);
while (list($key, $value) = each($object_array)) {
$this->{$key} = smn_db_prepare_input($value);
}
}
示例2: send
function send($newsletter_id)
{
$mail_query = smn_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_newsletter = '1'");
$mimemessage = new email(array('X-Mailer: oscMall bulk mailer'));
$mimemessage->add_html($this->content);
$mimemessage->build_message();
while ($mail = smn_db_fetch_array($mail_query)) {
$mimemessage->send($mail['customers_firstname'] . ' ' . $mail['customers_lastname'], $mail['customers_email_address'], '', EMAIL_FROM, $this->title);
}
$newsletter_id = smn_db_prepare_input($newsletter_id);
smn_db_query("update " . TABLE_NEWSLETTERS . " set date_sent = now(), status = '1' where newsletters_id = '" . smn_db_input($newsletter_id) . "'");
}
示例3: surepay
function surepay()
{
global $_POST;
$this->code = 'surepay';
$this->title = MODULE_PAYMENT_SUREPAY_TEXT_TITLE;
$this->description = MODULE_PAYMENT_SUREPAY_TEXT_DESCRIPTION;
$this->enabled = MODULE_PAYMENT_SUREPAY_STATUS;
$this->test_mode = MODULE_PAYMENT_SUREPAY_TESTMODE;
$this->login = MODULE_PAYMENT_SUREPAY_LOGIN;
$this->password = MODULE_PAYMENT_SUREPAY_PASSWORD;
$this->cc_number = smn_db_prepare_input($_POST['surepay_cc_number']);
$this->cc_cvv2 = smn_db_prepare_input($_POST['surepay_cc_cvv2']);
$this->cc_expires_month = smn_db_prepare_input($_POST['surepay_cc_expires_month']);
$this->cc_expires_year = smn_db_prepare_input($_POST['surepay_cc_expires_year']);
$this->single = MODULE_PAYMENT_SUREPAY_SINGLE_CHECKOUT == 'True' ? true : false;
}
示例4: query
function query($order_id)
{
global $languages_id, $shipping_store;
$order_id = smn_db_prepare_input($order_id);
$order_query = smn_db_query("select customers_id, customers_name, customers_company, customers_street_address, 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_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, cc_type, cc_owner, cc_number, cc_expires, currency, currency_value, date_purchased, orders_status, last_modified from " . TABLE_ORDERS . " where orders_id = '" . (int) $order_id . "'");
$order = smn_db_fetch_array($order_query);
$totals_query = smn_db_query("select title, text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int) $order_id . "' order by sort_order");
while ($totals = smn_db_fetch_array($totals_query)) {
$this->totals[] = array('title' => $totals['title'], 'text' => $totals['text']);
}
$order_total_query = smn_db_query("select text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int) $order_id . "' and class = 'ot_total'");
$order_total = smn_db_fetch_array($order_total_query);
$shipping_method_query = smn_db_query("select title from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int) $order_id . "' and class = 'ot_shipping'");
$shipping_method = smn_db_fetch_array($shipping_method_query);
$order_status_query = smn_db_query("select orders_status_name from " . TABLE_ORDERS_STATUS . " where orders_status_id = '" . $order['orders_status'] . "' and language_id = '" . (int) $languages_id . "'");
$order_status = smn_db_fetch_array($order_status_query);
$order_store_query = smn_db_query("select store_id from " . TABLE_ORDERS . " where orders_id = '" . (int) $order_id . "'");
$order_store = smn_db_fetch_array($order_store_query);
$this->info = array('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->info_store[$order_store[store_id]] = array('shipping_cost' => $shipping_store[$order_store[store_id]]['cost'], 'shipping_method' => $shipping_store[$order_store[store_id]]['title']);
$this->customer = array('id' => $order['customers_id'], 'name' => $order['customers_name'], 'company' => $order['customers_company'], 'street_address' => $order['customers_street_address'], 'city' => $order['customers_city'], 'postcode' => $order['customers_postcode'], 'state' => $order['customers_state'], 'country' => array('title' => $order['customers_country']), 'format_id' => $order['customers_address_format_id'], 'telephone' => $order['customers_telephone'], 'email_address' => $order['customers_email_address']);
$this->delivery = array('name' => trim($order['delivery_name']), 'company' => $order['delivery_company'], 'street_address' => $order['delivery_street_address'], 'city' => $order['delivery_city'], 'postcode' => $order['delivery_postcode'], 'state' => $order['delivery_state'], 'country' => array('title' => $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'], 'city' => $order['billing_city'], 'postcode' => $order['billing_postcode'], 'state' => $order['billing_state'], 'country' => array('title' => $order['billing_country']), 'format_id' => $order['billing_address_format_id']);
$index = 0;
$orders_products_query = smn_db_query("select op.orders_products_id, op.products_id,o.store_id, op.products_name, op.products_model, op.products_price, op.products_tax, op.products_quantity, op.final_price from " . TABLE_ORDERS_PRODUCTS . " op," . TABLE_ORDERS . " o where op.orders_id = '" . (int) $order_id . "' and op.orders_id=o.orders_id");
while ($orders_products = smn_db_fetch_array($orders_products_query)) {
$this->products[$index] = array('qty' => $orders_products['products_quantity'], 'id' => $orders_products['products_id'], 'products_store_id' => $orders_products['store_id'], 'name' => $orders_products['products_name'], 'model' => $orders_products['products_model'], 'tax' => $orders_products['products_tax'], 'price' => $orders_products['products_price'], 'final_price' => $orders_products['final_price']);
$subindex = 0;
$attributes_query = smn_db_query("select products_options, products_options_values, options_values_price, price_prefix from " . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . " where orders_id = '" . (int) $order_id . "' and orders_products_id = '" . (int) $orders_products['orders_products_id'] . "'");
if (smn_db_num_rows($attributes_query)) {
while ($attributes = smn_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']);
$subindex++;
}
}
$this->info['tax_groups']["{$this->products[$index]['tax']}"] = '1';
$index++;
}
}
示例5: array
if (ACCOUNT_DOB == 'true') $sql_data_array['affiliate_dob'] = smn_date_raw($affiliate_dob);
if (ACCOUNT_GENDER == 'true') $sql_data_array['affiliate_gender'] = $affiliate_gender;
if (ACCOUNT_COMPANY == 'true') {
$sql_data_array['affiliate_company'] = $affiliate_company;
$sql_data_array['affiliate_company_taxid'] = $affiliate_company_taxid;
}
if (ACCOUNT_SUBURB == 'true') $sql_data_array['affiliate_suburb'] = $affiliate_suburb;
if (ACCOUNT_STATE == 'true') {
$sql_data_array['affiliate_state'] = $affiliate_state;
$sql_data_array['affiliate_zone_id'] = $affiliate_zone_id;
}
$sql_data_array['affiliate_date_account_last_modified'] = 'now()';*/
$sql_data_array = array('affiliate_payment_check' => $affiliate_payment_check, 'affiliate_payment_paypal' => $affiliate_payment_paypal, 'affiliate_payment_bank_name' => $affiliate_payment_bank_name, 'affiliate_payment_bank_branch_number' => $affiliate_payment_bank_branch_number, 'affiliate_payment_bank_swift_code' => $affiliate_payment_bank_swift_code, 'affiliate_payment_bank_account_name' => $affiliate_payment_bank_account_name, 'affiliate_payment_bank_account_number' => $affiliate_payment_bank_account_number, 'affiliate_homepage' => $affiliate_homepage, 'affiliate_commission_percent' => $affiliate_commission_percent, 'affiliate_agb' => '1');
if (ACCOUNT_COMPANY == 'true') {
$sql_data_array['affiliate_company_taxid'] = $affiliate_company_taxid;
}
smn_db_perform(TABLE_AFFILIATE, $sql_data_array, 'update', "affiliate_id = '" . smn_db_input($affiliate_id) . "'");
smn_redirect(smn_href_link(FILENAME_AFFILIATE, smn_get_all_get_params(array('acID', 'action')) . 'acID=' . $affiliate_id));
break;
case 'deleteconfirm':
$affiliate_id = smn_db_prepare_input($_GET['acID']);
affiliate_delete(smn_db_input($affiliate_id));
smn_redirect(smn_href_link(FILENAME_AFFILIATE, smn_get_all_get_params(array('acID', 'action'))));
break;
}
}
$content_page = basename($_SERVER['PHP_SELF']);
require 'templates/default/layout.php';
require DIR_WS_INCLUDES . 'application_bottom.php';
示例6: smn_redirect
}';
exit;
}
smn_redirect(smn_href_link(FILENAME_LOGIN, '', 'NONSSL'));
}
}
define('AFFILIATE_NOTIFY_AFTER_BILLING', 'true');
// Nofify affiliate if he got a new invoice
define('AFFILIATE_DELETE_ORDERS', 'false');
// Delete affiliate_sales if an order is deleted (Warning: Only not yet billed sales are deleted)
define('AFFILIATE_TAX_ID', '1');
// Tax Rates used for billing the affiliates
// you get this from the URl (tID) when you select you Tax Rate at the admin: tax_rates.php?tID=1
// If set, the following actions take place each time you call the admin/affiliate_summary
define('AFFILIATE_DELETE_CLICKTHROUGHS', 'false');
// (days / false) To keep the clickthrough report small you can set the days after which they are deleted (when calling affiliate_summary in the admin)
define('AFFILIATE_DELETE_AFFILIATE_BANNER_HISTORY', 'false');
// (days / false) To keep thethe table AFFILIATE_BANNER_HISTORY small you can set the days after which they are deleted (when calling affiliate_summary in the admin)
// If an order is deleted delete the sale too (optional)
if ($_GET['action'] == 'deleteconfirm' && basename($HTTP_SERVER_VARS['SCRIPT_FILENAME']) == FILENAME_ORDERS && AFFILIATE_DELETE_ORDERS == 'true') {
$affiliate_oID = smn_db_prepare_input($_GET['oID']);
smn_db_query("delete from " . TABLE_AFFILIATE_SALES . " where affiliate_orders_id = '" . smn_db_input($affiliate_oID) . "' and affiliate_billing_status != 1");
}
define('SECURITY_CODE_LENGTH', '6');
require '../includes/classes/jQuery.php';
$jQuery = new jQuery();
$jQuery->loadAllExtensions();
$jQuery->loadAllPlugins();
//
// This define('JQUERY_MENU', 'jd_menu'); ( which will be moved into the database ) has 2 values currently: jd_menu or ??// accordion
define('JQUERY_MENU', 'jd_menu');
示例7: smn_db_fetch_array
$newsletter = smn_db_fetch_array($newsletter_query);
$nInfo = new objectInfo($newsletter);
include DIR_WS_LANGUAGES . $language . '/modules/newsletters/' . $nInfo->module . substr($PHP_SELF, strrpos($PHP_SELF, '.'));
include DIR_WS_MODULES . 'newsletters/' . $nInfo->module . substr($PHP_SELF, strrpos($PHP_SELF, '.'));
$module_name = $nInfo->module;
$module = new $module_name($nInfo->title, $nInfo->content);
?>
<tr>
<td><?php
echo $module->confirm();
?>
</td>
</tr>
<?php
} elseif ($action == 'confirm_send') {
$nID = smn_db_prepare_input($HTTP_GET_VARS['nID']);
$newsletter_query = smn_db_query("select newsletters_id, title, content, module from " . TABLE_NEWSLETTERS . " where newsletters_id = '" . (int) $nID . "'");
$newsletter = smn_db_fetch_array($newsletter_query);
$nInfo = new objectInfo($newsletter);
include DIR_WS_LANGUAGES . $language . '/modules/newsletters/' . $nInfo->module . substr($PHP_SELF, strrpos($PHP_SELF, '.'));
include DIR_WS_MODULES . 'newsletters/' . $nInfo->module . substr($PHP_SELF, strrpos($PHP_SELF, '.'));
$module_name = $nInfo->module;
$module = new $module_name($nInfo->title, $nInfo->content);
?>
<tr>
<td><table border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="main" valign="middle"><?php
echo smn_image(DIR_WS_IMAGES . 'ani_send_email.gif', IMAGE_ANI_SEND_EMAIL);
?>
</td>
示例8: smn_redirect
$navigation->set_snapshot();
smn_redirect(smn_href_link(FILENAME_LOGIN, '', 'NONSSL'));
}
include 'editor.php';
require DIR_WS_CLASSES . 'customer.php';
$profile_edit = new customer($store_id);
if ($store->is_store_owner($customer_id)) {
require DIR_WS_CLASSES . 'store.php';
$store_edit = new store($store_id);
}
if (isset($_POST['action']) && $_POST['action'] == 'process') {
$error = false;
// include validation functions (right now only email address)
require DIR_WS_FUNCTIONS . 'validations.php';
if (isset($_POST['state'])) {
$zone_id = smn_db_prepare_input($_POST['state']);
} else {
$zone_id = false;
}
if (strlen($_POST['firstname']) < ENTRY_FIRST_NAME_MIN_LENGTH) {
$error = true;
$messageStack->add('account_edit', ENTRY_FIRST_NAME_ERROR);
}
if (strlen($_POST['lastname']) < ENTRY_LAST_NAME_MIN_LENGTH) {
$error = true;
$messageStack->add('account_edit', ENTRY_LAST_NAME_ERROR);
}
if (strlen($_POST['email_address']) < ENTRY_EMAIL_ADDRESS_MIN_LENGTH) {
$error = true;
$messageStack->add('account_edit', ENTRY_EMAIL_ADDRESS_ERROR);
}
示例9: smn_db_prepare_input
?>
</td>
<td class="dataTableHeadingContent" align="center"><?php
echo TABLE_HEADING_STATUS;
?>
</td>
<td class="dataTableHeadingContent" align="right"><?php
echo TABLE_HEADING_ACTION;
?>
</td>
</tr>
<?php
$categories_count = 0;
$rows = 0;
if (isset($_POST['search'])) {
$search = smn_db_prepare_input($_POST['search']);
$categories_query = smn_db_query("select cd.categories_description, c.category_head_title_tag, c.category_head_desc_tag, c.category_head_keywords_tag, c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where cd.store_id = '" . $store_id . "' and c.store_id = '" . $store_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int) $languages_id . "' and cd.categories_name like '%" . smn_db_input($search) . "%' order by c.sort_order, cd.categories_name");
} else {
$categories_query = smn_db_query("select cd.categories_description, c.category_head_title_tag, c.category_head_desc_tag, c.category_head_keywords_tag, c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where cd.store_id = '" . $store_id . "' and c.store_id = '" . $store_id . "' and c.parent_id = '" . (int) $current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int) $languages_id . "' order by c.sort_order, cd.categories_name");
}
while ($categories = smn_db_fetch_array($categories_query)) {
$categories_count++;
$rows++;
// Get parent_id for subcategories if search
if (isset($_POST['search'])) {
$cPath = $categories['parent_id'];
}
if ((!isset($_GET['cID']) && !isset($_GET['pID']) || isset($_GET['cID']) && $_GET['cID'] == $categories['categories_id']) && !isset($cInfo) && substr($action, 0, 3) != 'new') {
$category_childs = array('childs_count' => smn_childs_in_category_count($categories['categories_id']));
$category_products = array('products_count' => smn_products_in_category_count($categories['categories_id']));
$cInfo_array = array_merge($categories, $category_childs, $category_products);
示例10: isset
license@systemsmanager.net so we can mail you a copy immediately.
*/
require 'includes/application_top.php';
$action = isset($_GET['action']) ? $_GET['action'] : '';
if (smn_not_null($action)) {
switch ($action) {
case 'insert':
$zone_country_id = smn_db_prepare_input($_POST['zone_country_id']);
$zone_code = smn_db_prepare_input($_POST['zone_code']);
$zone_name = smn_db_prepare_input($_POST['zone_name']);
smn_db_query("insert into " . TABLE_ZONES . " (zone_country_id, zone_code, zone_name) values ('" . (int) $zone_country_id . "', '" . smn_db_input($zone_code) . "', '" . smn_db_input($zone_name) . "')");
smn_redirect(smn_href_link(FILENAME_ZONES));
break;
case 'save':
$zone_id = smn_db_prepare_input($_GET['cID']);
$zone_country_id = smn_db_prepare_input($_POST['zone_country_id']);
$zone_code = smn_db_prepare_input($_POST['zone_code']);
$zone_name = smn_db_prepare_input($_POST['zone_name']);
smn_db_query("update " . TABLE_ZONES . " set zone_country_id = '" . (int) $zone_country_id . "', zone_code = '" . smn_db_input($zone_code) . "', zone_name = '" . smn_db_input($zone_name) . "' where zone_id = '" . (int) $zone_id . "'");
smn_redirect(smn_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $zone_id));
break;
case 'deleteconfirm':
$zone_id = smn_db_prepare_input($_GET['cID']);
smn_db_query("delete from " . TABLE_ZONES . " where zone_id = '" . (int) $zone_id . "'");
smn_redirect(smn_href_link(FILENAME_ZONES, 'page=' . $_GET['page']));
break;
}
}
$content_page = basename($_SERVER['PHP_SELF']);
require 'templates/default/layout.php';
require DIR_WS_INCLUDES . 'application_bottom.php';
示例11: elseif
} elseif ($action == 'update_store_product') {
smn_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_id . "'");
}
}
if (USE_CACHE == 'true') {
smn_reset_cache_block('categories');
smn_reset_cache_block('also_purchased');
}
smn_redirect(html_entity_decode(smn_href_link(FILENAME_STORE_PRODUCT_CATEGORIES, 'cPath=' . $cPath . '&ID='.$store_id.'&pID=' . $products_id)));
}
}
break;
case 'copy_to_confirm':
if (isset($_POST['products_id']) && isset($_POST['categories_id'])) {
$products_id = smn_db_prepare_input($_POST['products_id']);
$categories_id = smn_db_prepare_input($_POST['categories_id']);
if ($_POST['copy_as'] == 'link') {
if ($categories_id != $current_category_id) {
$check_query = smn_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where products_id = '" . (int)$products_id . "' and categories_id = '" . (int)$categories_id . "' and store_id = '" . $store_id . "'");
$check = smn_db_fetch_array($check_query);
if ($check['total'] < '1') {
smn_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (store_id, products_id, categories_id) values ('" . (int)$store_id . "', '" . (int)$products_id . "', '" . (int)$categories_id . "')");
}
} else {
$messageStack->add_session(ERROR_CANNOT_LINK_TO_SAME_CATEGORY, 'error');
}
} elseif ($_POST['copy_as'] == 'duplicate') {
$product_query = smn_db_query("select store_id, products_quantity, products_model, products_image, products_price, products_date_available, products_weight, products_tax_class_id, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
$product = smn_db_fetch_array($product_query);
smn_db_query("insert into " . TABLE_PRODUCTS . " (store_id, products_quantity, products_model,products_image, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . (int)$store_id . "', '" . smn_db_input($product['products_quantity']) . "', '" . smn_db_input($product['products_model']) . "', '" . smn_db_input($product['products_image']) . "', '" . smn_db_input($product['products_price']) . "', now(), '" . smn_db_input($product['products_date_available']) . "', '" . smn_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')");
$dup_products_id = smn_db_insert_id();
示例12: smn_db_prepare_input
if (ACCOUNT_COMPANY == 'true') {
$company = smn_db_prepare_input($_POST['company']);
}
$firstname = smn_db_prepare_input($_POST['firstname']);
$lastname = smn_db_prepare_input($_POST['lastname']);
$street_address = smn_db_prepare_input($_POST['street_address']);
$postcode = smn_db_prepare_input($_POST['postcode']);
$city = smn_db_prepare_input($_POST['city']);
$country = smn_db_prepare_input($_POST['country']);
if (ACCOUNT_STATE == 'true') {
if (isset($_POST['zone_id'])) {
$zone_id = smn_db_prepare_input($_POST['zone_id']);
} else {
$zone_id = false;
}
$state = smn_db_prepare_input($_POST['state']);
}
if (ACCOUNT_GENDER == 'true') {
if ($gender != 'm' && $gender != 'f') {
$error = true;
$messageStack->add('addressbook', ENTRY_GENDER_ERROR);
}
}
if (strlen($firstname) < ENTRY_FIRST_NAME_MIN_LENGTH) {
$error = true;
$messageStack->add('addressbook', ENTRY_FIRST_NAME_ERROR);
}
if (strlen($lastname) < ENTRY_LAST_NAME_MIN_LENGTH) {
$error = true;
$messageStack->add('addressbook', ENTRY_LAST_NAME_ERROR);
}
示例13: elseif
} elseif ($_GET['gID'] != 'edit_group') {
$check_groups_name_query = smn_db_query("select admin_groups_name as group_name_new from " . TABLE_ADMIN_GROUPS . " where admin_groups_name like '%" . $name_replace . "%'");
$check_duplicate = smn_db_num_rows($check_groups_name_query);
if ($check_duplicate > 0) {
smn_redirect(smn_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET['gID'] . '&gName=used&action=new_group'));
} else {
$sql_product_data_array = array('products_quantity' => '1000', 'products_model' => 'mem_6_', 'products_price' => smn_db_prepare_input($_POST['admin_groups_cost']), 'products_date_available' => date('Y-m-d'), 'store_id' => 1, 'products_weight' => '0', 'products_status' => '1', 'products_tax_class_id' => '', 'products_date_added' => 'now()', 'products_image' => '', 'manufacturers_id' => '');
smn_db_perform(TABLE_PRODUCTS, $sql_product_data_array);
$products_id = smn_db_insert_id();
smn_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int) $products_id . "', '1')");
$languages = smn_get_languages();
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
$language_id = $languages[$i]['id'];
$sql_data_array = array('products_id' => $products_id, 'products_name' => smn_db_prepare_input($admin_groups_name), 'language_id' => $language_id, 'products_url' => HTTP_CATALOG_SERVER);
smn_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array);
}
$sql_data_array = array('admin_groups_name' => $admin_groups_name, 'admin_groups_store_type' => smn_db_prepare_input($_POST['admin_groups_store_types']), 'admin_groups_products_id' => $products_id, 'admin_sales_cost' => smn_db_prepare_input($_POST['admin_sales_cost']), 'admin_groups_max_products' => smn_db_prepare_input($_POST['admin_groups_max_products']));
smn_db_perform(TABLE_ADMIN_GROUPS, $sql_data_array);
$admin_groups_id = smn_db_insert_id();
$set_groups_id = smn_db_prepare_input($_POST['set_groups_id']);
$add_group_id = $set_groups_id . ',\'' . $admin_groups_id . '\'';
smn_db_query("alter table " . TABLE_ADMIN_FILES . " change admin_groups_id admin_groups_id set( " . $add_group_id . ") NOT NULL DEFAULT '1' ");
smn_redirect(smn_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $admin_groups_id));
}
}
break;
}
}
$content_page = basename($_SERVER['PHP_SELF']);
require 'templates/default/layout.php';
require DIR_WS_INCLUDES . 'application_bottom.php';
示例14: Copyright
http://www.systemsmanager.net
Portions Copyright (c) 2002 osCommerce
This source file is subject to version 2.0 of the GPL license,
that is bundled with this package in the file LICENSE. If you
did not receive a copy of the oscMall System license and are unable
to obtain it through the world-wide-web, please send a note to
license@systemsmanager.net so we can mail you a copy immediately.
*/
require 'includes/application_top.php';
reset($_GET);
while (list($key, ) = each($_GET)) {
switch ($key) {
case 'banner':
$banners_id = smn_db_prepare_input($_GET['banner']);
$banner_query = smn_db_query("select affiliate_banners_title, affiliate_banners_image, affiliate_banners_html_text from " . TABLE_AFFILIATE_BANNERS . " where affiliate_banners_id = '" . smn_db_input($banners_id) . "'");
$banner = smn_db_fetch_array($banner_query);
$page_title = $banner['affiliate_banners_title'];
if ($banner['affiliate_banners_html_text']) {
$image_source = $banner['affiliate_banners_html_text'];
} elseif ($banner['affiliate_banners_image']) {
$image_source = smn_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . $banner['affiliate_banners_image'], $page_title);
}
break;
}
}
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php
echo HTML_PARAMS;
示例15: set_newsletter
function set_newsletter($subscribe)
{
$this->newsletter = smn_db_prepare_input($subscribe);
}