本文整理汇总了PHP中tep_db_perform函数的典型用法代码示例。如果您正苦于以下问题:PHP tep_db_perform函数的具体用法?PHP tep_db_perform怎么用?PHP tep_db_perform使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tep_db_perform函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: setProductDescription2
function setProductDescription2($products_id, $focus = null)
{
use_class('element');
$q = tep_db_query("SELECT * FROM products_description2 WHERE products_id={$products_id}");
$pd2 = tep_db_fetch_array($q);
$elements_used = $this->retrieveElementsUsed($products_id);
if (!is_null($focus) && !is_array($focus)) {
$focus = explode(',', $focus);
}
$need_tobe_filled_c = is_null($focus) || in_array('c', $focus) && ($pd2['clasp_type'] == '' || $pd2['clasp_type'] == 0) ? true : false;
$need_tobe_filled_s = is_null($focus) || in_array('s', $focus) && ($pd2['setting_type'] == '' || $pd2['setting_type'] == 0) ? true : false;
if ($need_tobe_filled_c || $need_tobe_filled_s) {
$sda = array();
foreach ($elements_used as $eid) {
$el = new element($eid);
if ($need_tobe_filled_c && !isset($sda['clasp_type']) && $sda['clasp_type'] == '') {
$sda['clasp_type'] = $el->attributes['clasp']['id'];
}
if ($need_tobe_filled_s && !isset($sda['setting_type']) && $sda['setting_type'] == '') {
$sda['setting_type'] = $el->attributes['setting']['id'];
}
}
if (count($sda) > 0) {
if (tep_db_num_rows($q) > 0) {
tep_db_perform('products_description2', $sda, 'update', "products_id={$products_id}");
} else {
$sda['products_id'] = $products_id;
tep_db_perform('products_description2', $sda);
}
}
}
}
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:32,代码来源:seProductDescription2.php
示例2: affiliate_insert
function affiliate_insert($sql_data_array, $affiliate_parent = 0)
{
// LOCK TABLES
tep_db_query("LOCK TABLES " . TABLE_AFFILIATE . " WRITE");
if ($affiliate_parent > 0) {
$affiliate_root_query = tep_db_query("select affiliate_root, affiliate_rgt, affiliate_lft�from " . TABLE_AFFILIATE . " where affiliate_id = '" . $affiliate_parent . "' ");
// Check if we have a parent affiliate
if ($affiliate_root_array = tep_db_fetch_array($affiliate_root_query)) {
tep_db_query("update " . TABLE_AFFILIATE . " SET affiliate_lft = affiliate_lft + 2 WHERE affiliate_root = '" . $affiliate_root_array['affiliate_root'] . "' and affiliate_lft > " . $affiliate_root_array['affiliate_rgt'] . " AND affiliate_rgt >= " . $affiliate_root_array['affiliate_rgt'] . " ");
tep_db_query("update " . TABLE_AFFILIATE . " SET affiliate_rgt = affiliate_rgt + 2 WHERE affiliate_root = '" . $affiliate_root_array['affiliate_root'] . "' and affiliate_rgt >= " . $affiliate_root_array['affiliate_rgt'] . " ");
$sql_data_array['affiliate_root'] = $affiliate_root_array['affiliate_root'];
$sql_data_array['affiliate_lft'] = $affiliate_root_array['affiliate_rgt'];
$sql_data_array['affiliate_rgt'] = $affiliate_root_array['affiliate_rgt'] + 1;
tep_db_perform(TABLE_AFFILIATE, $sql_data_array);
$affiliate_id = tep_db_insert_id();
}
// no parent -> new root
} else {
$sql_data_array['affiliate_lft'] = '1';
$sql_data_array['affiliate_rgt'] = '2';
tep_db_perform(TABLE_AFFILIATE, $sql_data_array);
$affiliate_id = tep_db_insert_id();
tep_db_query("update " . TABLE_AFFILIATE . " set affiliate_root = '" . $affiliate_id . "' where affiliate_id = '" . $affiliate_id . "' ");
}
// UNLOCK TABLES
tep_db_query("UNLOCK TABLES");
return $affiliate_id;
}
开发者ID:digideskio,项目名称:oscmax2,代码行数:28,代码来源:affiliate_functions.php
示例3: updateOrder
function updateOrder($orderId, $orderStatusId, $comment, $notify)
{
$order_status_history_data_array = array('orders_id' => $orderId, 'orders_status_id' => $orderStatusId, 'comments' => $comment, 'customer_notified' => '0', 'date_added' => 'now()');
tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $order_status_history_data_array);
$order_data_array = array('orders_id' => $orderId, 'orders_status' => $orderStatusId);
tep_db_perform(TABLE_ORDERS, array('orders_status' => $orderStatusId), 'update', "orders_id = {$orderId}");
}
开发者ID:TodoPago,项目名称:Plugin-OsCommerce,代码行数:7,代码来源:todopago_push_notification.php
示例4: add
function add($products_id, $type, $links_id, $prepared = false)
{
if (is_array($links_id) && count($links_id) > 0) {
if (!$prepared) {
$products_id = tep_db_prepare_input($products_id);
$type = tep_db_prepare_input($type);
}
$plids = array();
foreach ($links_id as $lid) {
if (!$prepared) {
$lid = tep_db_prepare_input($lid);
}
if (intval($lid) != 0 && $products_id != $lid) {
//$check_exist = tep_db_query("SELECT products_linking_id FROM products_linking WHERE products_id=$products_id AND type='$type' AND links_id=$lid");
$check_exist = tep_db_query("SELECT products_linking_id FROM products_linking WHERE products_id={$products_id} AND links_id={$lid}");
if (tep_db_num_rows($check_exist) == 0) {
$sda = array();
$sda['products_id'] = $products_id;
$sda['type'] = $type;
$sda['links_id'] = $lid;
$sda['date_added'] = date('Y-m-d H:i:s');
tep_db_perform('products_linking', $sda);
$plids[] = tep_db_insert_id();
}
}
}
} else {
if ($links_id != '') {
$links = explode(',', $links_id);
$plids = $this->add($products_id, $type, $links, $prepared);
}
}
return $plids;
}
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:34,代码来源:products_linking_php4.php
示例5: createNewCategoryTop
/**
* Create a new category top
* @param String $name Name of new category top
* @param Boolean $is_using_size True if category is using size instead of length
* @return Int ID of new category top or 0 if insert failed
*/
public static function createNewCategoryTop($name, $is_using_size)
{
$sda = array();
$sda[self::COLNAME_NAME] = $name;
$sda[self::COLNAME_SIZE] = $is_using_size ? '1' : '0';
tep_db_perform(self::TABLENAME, $sda);
return tep_db_insert_id();
}
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:14,代码来源:CategoryTop.php
示例6: addImportedOrder
function addImportedOrder($download_id, $orders_id)
{
$o_sda = array();
$o_sda['jng_sp_download_id'] = $download_id;
$o_sda['jng_sp_orders_id'] = $orders_id;
$o_sda['date_added'] = date('Y-m-d H:i:s');
tep_db_perform('jng_sp_download_orders', $o_sda);
}
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:8,代码来源:jng_sp_download.php
示例7: update
function update($id, $sda, $updateby = null)
{
if (!is_null($updateby)) {
$sda['last_update_by'] = $updateby;
}
$sda['last_update_time'] = date('Y-m-d H:i:s');
$result = tep_db_perform('minierp_todos', $sda, 'update', "minierp_todos_id={$id}");
return $result;
}
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:9,代码来源:minierp_todos.php
示例8: setAsFree
function setAsFree($ean_no)
{
//BEFORE USING THIS FUNCTION
//PLEASE MAKE SURE PRODUCT IS NEVER ACTIVATED TO ANY SALES PARTNER
//DO NOT SET FREE THE EAN IF PRODUCT IS ALREADY ACTIVATED
$r = tep_db_perform('products', array('products_ean' => ''), 'update', "products_ean='{$ean_no}'");
$r = tep_db_perform('products_articles', array('products_ean' => ''), 'update', "products_ean='{$ean_no}'");
$result = tep_db_query("UPDATE products_ean SET status='0'" . " WHERE ean_no='{$ean_no}'");
return $result;
}
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:10,代码来源:products_ean.php
示例9: generateKeywords
function generateKeywords($product_id)
{
use_class('styles');
use_class('Product');
use_class('ProductAttribute');
$class_s = new styles();
$keywords = array();
$product = new Product($product_id);
$language_id = 2;
//Step 1 (Brand)
if ($product->brand_id == 24) {
$keywords = array(strtolower($product->brand_name), 'eli', 'silberschmuck', '925', 'junger', 'modischer', 'trendy', 'fashion');
} elseif ($product->brand_id == 3) {
$keywords = array(strtolower($product->brand_name), 'vergoldet', 'golden', 'gold', 'vermeil');
} elseif ($product->brand_id == 7) {
$keywords = array(strtolower($product->brand_name), 'perlenschmuck', 'brautschmuck', 'hochzeit');
}
//Step 2 (Symbol)
$symbol = $class_s->getProductStyle($product_id);
if ($symbol['Symbol'] > 0) {
$style = new ProductAttribute($symbol['Symbol']);
if ($symbol['Symbol'] != '') {
array_push($keywords, strtolower($style->displayAttributeName($product_id, ProductAttribute::GROUP_ID_SYMBOL, $language_id)));
}
}
//Step 3 (Basic)
array_push($keywords, 'günstiger', 'frau', 'freundin', 'geschenk', 'juwelier');
//Step 4 (Material)
$materials = array();
$q = "SELECT ptpm.products_materials_id AS id" . " , material_name AS name" . " FROM products_to_products_materials ptpm" . " INNER JOIN products_materials pm" . " ON pm.products_materials_id = ptpm.products_materials_id" . " WHERE ptpm.products_id = {$product_id}";
$r = tep_db_query($q);
while ($row = tep_db_fetch_array($r)) {
$materials[$row['id']] = $row['name'];
}
foreach ($materials as $key => $value) {
if ($key == 4 || $key == 2) {
list($material_name2, $material_name1, $material_name3) = split(",", $value);
array_push($keywords, strtolower($material_name2), 'glamourös', 'funkelnd', 'glitzernd', 'strass', 'festlich', 'elegant');
} else {
list($material_name2, $material_name1, $material_name3) = split(",", $value);
array_push($keywords, strtolower($material_name2));
}
}
//Step 5 (Color)
$color = $product->getColors($language_id);
array_push($keywords, strtolower($color));
//Step 6 (Rest of the products)
array_push($keywords, 'basic', 'klassik', 'klassisch', 'schlicht', 'elegant', 'zeitlos', 'sportlich', 'dezent', 'filigran', 'zart', 'schlicht');
$final_k = implode(',', $keywords);
//echo $pid." = ".$final_k;
$sda = array();
$sda['products_head_keywords_tag'] = $final_k;
tep_db_perform('products_description', $sda, 'update', "products_id={$product_id} AND language_id={$language_id}");
}
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:54,代码来源:temp-generate-keywords-jewelry.php
示例10: add
/**
* Add new data to Report COGS table. Existing data will be removed and
* replaced with new data.
* @global Array $bgst
* @param Int $jng_sp_id
* @param String $base_date
* @param String $ean
* @param Int $products_id
* @param Int $articles_id
* @param String $complexity
* @param Int $qty_sold
* @param Int $qty_return
* @param Float $price_total
* @param Float $matexp_total
* @param Float $cogs_total
* @param Float $vat
* @param Float $cash_discount_pct
* @param Float $price_total_before_return
*/
public static function add($jng_sp_id, $base_date, $ean, $products_id, $articles_id, $complexity, $qty_sold, $qty_return, $price_total, $matexp_total, $cogs_total, $vat, $cash_discount_pct, $price_total_before_return)
{
global $bgst;
if (!isset($bgst)) {
die('GLOBAL BEST GOOD SETTINGS ($bgst) NEEDEED FOR ReportCOGS::add');
}
self::remove($jng_sp_id, $base_date, $ean);
$qty = $qty_sold - $qty_return;
$qty_before_return = $qty_sold;
$price_average = $qty == 0 ? 0 : $price_total / $qty;
$price_average_before_return = $qty_sold == 0 ? 0 : $price_total_before_return / $qty_before_return;
$matexp_average = $qty == 0 ? 0 : $matexp_total / $qty;
$cogs_average = $qty == 0 ? 0 : $cogs_total / $qty;
$cogs = new ProductCOGS($matexp_average, $complexity);
$cash_discount_total = $cash_discount_pct * $price_total;
$cash_discount_total_before_return = $cash_discount_pct * $price_total_before_return;
$net_sales_total = $price_total / (1 + $vat) - $cash_discount_total;
$net_sales_total_before_return = $price_total_before_return / (1 + $vat) - $cash_discount_total_before_return;
$gross_profit_total = $net_sales_total - $qty * $cogs->value;
$gross_profit_total_pct = $net_sales_total == 0 ? 0 : $gross_profit_total / $net_sales_total;
$sda = array();
$sda['jng_sp_id'] = $jng_sp_id;
$sda['base_date'] = date('Y-m-d', strtotime($base_date));
$sda['products_ean'] = $ean;
$sda['products_id'] = $products_id;
$sda['articles_id'] = $articles_id;
$sda['quantity_sold'] = $qty_sold;
$sda['quantity_return'] = $qty_return;
$sda['quantity'] = $qty;
$sda['price_total'] = $price_total;
//equal gross sales
$sda['price_total_before_return'] = $price_total_before_return;
$sda['matexp_total'] = $matexp_total;
$sda['price'] = $price_average;
$sda['price_before_return'] = $price_average_before_return;
$sda['matexp'] = $matexp_average;
$sda['matexp_indirect'] = $cogs->indirect_material_expense;
$sda['cost_complexity'] = $cogs->cost_based_on_complexity;
$sda['cost_variable'] = $cogs->cost_variable;
$sda['cost_fixed'] = $cogs->cost_fixed;
$sda['cost_handling'] = $cogs->cost_handling;
$sda['cogs'] = $cogs->value;
$sda['cogs_average'] = $cogs_average;
$sda['cogs_total'] = $cogs_total;
$sda['vat'] = $vat;
$sda['cash_discount_percent'] = $cash_discount_pct;
$sda['cash_discount_total'] = $cash_discount_total;
$sda['cash_discount_total_before_return'] = $cash_discount_total_before_return;
$sda['net_sales_total'] = $net_sales_total;
$sda['net_sales_total_before_return'] = $net_sales_total_before_return;
$sda['gross_profit_total'] = $gross_profit_total;
$sda['gross_profit_total_percent'] = $gross_profit_total_pct;
tep_db_perform('report_cogs', $sda);
}
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:73,代码来源:ReportCOGS.php
示例11: updateDescription
/**
* Update Measurements Description
* @param int $measurements_id
* @param int $languages_id
* @param array $measurements_data
*/
public function updateDescription($measurements_id, $languages_id, $measurements_data)
{
$q_check = "SELECT * FROM measurements_description" . " WHERE measurements_id = {$measurements_id} AND languages_id = {$languages_id}";
$check_query = tep_db_query($q_check);
if (tep_db_num_rows($check_query) == 0) {
$measurements_data['measurements_id'] = $measurements_id;
$measurements_data['languages_id'] = $languages_id;
tep_db_perform('measurements_description', $measurements_data);
} else {
$filter_update = "measurements_id = {$measurements_id} AND languages_id = {$languages_id}";
tep_db_perform('measurements_description', $measurements_data, 'update', $filter_update);
}
}
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:19,代码来源:ProductMeasurement.php
示例12: addNewDescription
function addNewDescription($design_id, $design_description, $updateby, $reminder)
{
$sdo = array();
$sdo['reminder'] = $reminder;
$result = tep_db_perform('projectplan_newdesign', $sdo, 'update', "project_id={$design_id}");
$sda = array();
$sda['project_id'] = $design_id;
$sda['project_description'] = $design_description;
$sda['last_update_by'] = $updateby;
$sda['last_update_time'] = date('Y-m-d H:i:s');
tep_db_perform('projectplan_description', $sda);
$newid = tep_db_insert_id();
return $newid;
}
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:14,代码来源:project_plan_comment.php
示例13: removeLike
function removeLike($user_id)
{
$deleted = false;
$fk = array_search($user_id, $this->list);
if ($fk !== false) {
unset($this->list[$fk]);
$this->list_raw = implode(',', $this->list);
$sda = array();
$sda[$this->column_name] = $this->list_raw;
tep_db_perform($this->table_name, $sda, 'update', "{$this->column_id_name}={$this->column_id_value}");
$deleted = true;
}
return $deleted;
}
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:14,代码来源:likes.php
示例14: log
function log($module, $action, $result, $request, $response, $server, $is_ipn = false)
{
global $customer_id;
$do_log = false;
if (in_array(OSCOM_APP_PAYPAL_LOG_TRANSACTIONS, array('1', '0'))) {
$do_log = true;
if (OSCOM_APP_PAYPAL_LOG_TRANSACTIONS == '0' && $result === 1) {
$do_log = false;
}
}
if ($do_log !== true) {
return false;
}
$filter = array('ACCT', 'CVV2', 'ISSUENUMBER');
$request_string = '';
if (is_array($request)) {
foreach ($request as $key => $value) {
if (strpos($key, '_nh-dns') !== false || in_array($key, $filter)) {
$value = '**********';
}
$request_string .= $key . ': ' . $value . "\n";
}
} else {
$request_string = $request;
}
$response_string = '';
if (is_array($response)) {
foreach ($response as $key => $value) {
if (is_array($value)) {
if (function_exists('http_build_query')) {
$value = http_build_query($value);
}
} elseif (strpos($key, '_nh-dns') !== false || in_array($key, $filter)) {
$value = '**********';
}
$response_string .= $key . ': ' . $value . "\n";
}
} else {
$response_string = $response;
}
$data = array('customers_id' => tep_session_is_registered('customer_id') ? $customer_id : 0, 'module' => $module, 'action' => $action . ($is_ipn === true ? ' [IPN]' : ''), 'result' => $result, 'server' => $server == 'live' ? 1 : -1, 'request' => trim($request_string), 'response' => trim($response_string), 'ip_address' => sprintf('%u', ip2long($this->getIpAddress())), 'date_added' => 'now()');
tep_db_perform('oscom_app_paypal_log', $data);
}
开发者ID:katapofatico,项目名称:Responsive-osCommerce,代码行数:43,代码来源:OSCOM_PayPal.php
示例15: tep_update_information_languages
function tep_update_information_languages($language_id = 0)
{
global $languages, $languages_id, $gID;
if ($language_id == 0) {
$language_id = $languages_id;
}
// Count all items
$information_query = tep_db_query("select count(*) as information_count from " . TABLE_INFORMATION . " where information_group_id = '" . (int) $gID . "'");
$information = tep_db_fetch_array($information_query);
$information_count_all = $information['information_count'];
// Count items for main language
$information_query = tep_db_query("select count(*) as information_count from " . TABLE_INFORMATION . " where information_group_id = '" . (int) $gID . "' and language_id = '" . (int) $language_id . "'");
$information = tep_db_fetch_array($information_query);
$information_count_single = $information['information_count'];
if ($information_count_all != $information_count_single * sizeof($languages)) {
// Create array of language id's in information table
$information_query = tep_db_query("select language_id from " . TABLE_INFORMATION . " where information_group_id = '" . (int) $gID . "' group by language_id");
while ($information_language = tep_db_fetch_array($information_query)) {
$information_languages[] = $information_language['language_id'];
}
// Create array of language id's in languages
foreach ($languages as $language) {
$languages_ids[] = $language['id'];
}
// Remove entries with languages no longer being used
foreach ($information_languages as $_language_id) {
if (!in_array($_language_id, $languages_ids)) {
tep_db_query("delete from " . TABLE_INFORMATION . " where information_group_id = '" . (int) $gID . "' and language_id = '" . (int) $_language_id . "'");
}
}
$information_query = tep_db_query("select * from " . TABLE_INFORMATION . " where information_group_id = '" . (int) $gID . "' and language_id = '" . (int) $language_id . "'");
while ($information = tep_db_fetch_array($information_query)) {
foreach ($languages_ids as $_language_id) {
if (!in_array($_language_id, $information_languages)) {
$sql_data_array = array('language_id' => $_language_id, 'visible' => tep_db_prepare_input($information['visible']), 'show_in_infobox' => tep_db_prepare_input($information['show_in_infobox']), 'sort_order' => tep_db_prepare_input($information['sort_order']), 'information_id' => tep_db_prepare_input($information['information_id']), 'information_group_id' => tep_db_prepare_input($information['information_group_id']), 'information_title' => tep_db_prepare_input($information['information_title']), 'information_description' => tep_db_prepare_input($information['information_description']), 'information_url' => tep_db_prepare_input($information['information_url']), 'information_target' => tep_db_prepare_input($information['information_target']), 'info_cg_hide' => tep_db_prepare_input($information['info_cg_hide']));
tep_db_perform(TABLE_INFORMATION, $sql_data_array);
}
}
}
}
}
开发者ID:digideskio,项目名称:oscmax2,代码行数:41,代码来源:information_manager.php
示例16: setParams
function setParams($products_id, $param_code)
{
use_class('products_minierp');
$class_pm = new products_minierp();
if ($param_code == 'M') {
$param_id_arrays = $class_pm->loadProductMaterials($products_id);
$field_name = 'material';
} elseif ($param_code == 'C') {
$param_id_arrays = $class_pm->loadColorPattern($products_id);
$field_name = 'color';
} else {
$param_id_arrays = array();
$field_name = '';
}
if ($field_name != '') {
if (count($param_id_arrays) == 0) {
$sda = array($field_name => '');
tep_db_perform('jng_sp_catalog', $sda, 'update', "products_id = {$products_id}");
} else {
use_class('jng_sp_catalog');
$class_jc = new jng_sp_catalog();
$q = tep_db_query("SELECT jng_sp_catalog_id, jng_sp_id FROM jng_sp_catalog WHERE products_id = {$products_id}");
$sp_list = array();
while ($row = tep_db_fetch_array($q)) {
$sp_list[$row['jng_sp_catalog_id']] = $row['jng_sp_id'];
}
foreach ($sp_list as $catalog_id => $jng_sp_id) {
$sp_params_raw = $this->load($jng_sp_id, $param_code);
$sp_params = array();
foreach ($sp_params_raw as $spr) {
if (in_array($spr['param_id'], $param_id_arrays)) {
$sp_params[] = $spr['param_value'];
}
}
$sda = array($field_name => implode(', ', $sp_params));
$class_jc->updateField($catalog_id, $sda);
}
}
}
}
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:40,代码来源:jng_sp_catalog_params.php
示例17: setReceiveDate
function setReceiveDate($package_id, $date = null)
{
if (is_null($date)) {
$date = date('Y-m-d H:i:s');
}
$psda = array('received_date' => $date);
tep_db_perform('minierp_packages', $psda, 'update', "packages_id={$package_id}");
}
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:8,代码来源:minierp_packages.php
示例18: array
$error = MIN_WIDTH_NOT_MET;
} else {
if (number_format(trim($_POST['height']), 2, '.', '') <= 0) {
$error = MIN_HEIGHT_NOT_MET;
} else {
if (number_format(trim($_POST['empty_weight']), 2, '.', '') < 0) {
$error = MIN_EMPTY_WEIGHT_NOT_MET;
} else {
if (number_format(trim($_POST['max_weight']), 2, '.', '') < 0) {
$error = MIN_MAX_WEIGHT_NOT_MET;
} else {
$sql_data_array = array('package_name' => $_POST['name'], 'package_description' => $_POST['description'], 'package_length' => $_POST['length'], 'package_width' => $_POST['width'], 'package_height' => $_POST['height'], 'package_empty_weight' => $_POST['empty_weight'], 'package_max_weight' => $_POST['max_weight'], 'package_cost' => $_POST['cost']);
if ($_POST["Action"] == "newpackage") {
tep_db_perform(TABLE_PACKAGING, $sql_data_array);
} else {
tep_db_perform(TABLE_PACKAGING, $sql_data_array, "update", "package_id = '" . $_POST['id'] . "'");
}
}
}
}
}
}
}
//********** Delete Package
if ($_POST['id'] != "" && $_POST["Action"] == "deletepackage") {
tep_db_query("delete from " . TABLE_PACKAGING . " where package_id = '" . $_POST['id'] . "'");
}
// ********* Display Packages
DisplayPackages($activeid, $error);
switch ($_GET['Action']) {
case "shownewpackageform":
开发者ID:digideskio,项目名称:oscmax2,代码行数:31,代码来源:packaging.php
示例19: tep_db_query
$comment = 'ungültiges Benachrichtigung Passwort' . "\n";
}
// check if order exists
$order_query = tep_db_query("select * from " . TABLE_ORDERS . " where orders_id = '" . (int) $order_id . "' and customers_id = '" . (int) $customer_id . "'");
if (tep_db_num_rows($order_query) > 0) {
$order = tep_db_fetch_array($order_query);
if ($order['orders_status'] == MODULE_PAYMENT_SOFORTUEBERWEISUNG_DIRECT_PREPARE_ORDER_STATUS_ID) {
$total_query = tep_db_query("select value from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int) $order_id . "' and class = 'ot_total' limit 1");
$total = tep_db_fetch_array($total_query);
$order_total_integer = number_format($total['value'] * $currencies->get_value('EUR'), 2, '.', '') * 100;
if ($order_total_integer < 1) {
$order_total_integer = '000';
} elseif ($order_total_integer < 10) {
$order_total_integer = '00' . $order_total_integer;
} elseif ($order_total_integer < 100) {
$order_total_integer = '0' . $order_total_integer;
}
if ((int) $betrag_integer == (int) $order_total_integer) {
$comment = 'Zahlung durch Sofortüberweisung Benachrichtigung bestätigt!';
} else {
$comment = "Sofortüberweisungs Transaktionscheck fehlgeschlagen. Bitte manuell überprüfen\n" . $betrag_integer / 100 . '!=' . $order_total_integer / 100;
}
if (MODULE_PAYMENT_SOFORTUEBERWEISUNG_DIRECT_STORE_TRANSACTION_DETAILS == 'True') {
$comment .= "\n" . serialize($_GET) . "\n" . serialize($_POST);
}
$order_status = MODULE_PAYMENT_SOFORTUEBERWEISUNG_DIRECT_ORDER_STATUS_ID > 0 ? (int) MODULE_PAYMENT_SOFORTUEBERWEISUNG_DIRECT_ORDER_STATUS_ID : (int) DEFAULT_ORDERS_STATUS_ID;
$sql_data_array = array('orders_id' => (int) $order_id, 'orders_status_id' => $order_status, 'date_added' => 'now()', 'customer_notified' => '0', 'comments' => $comment);
tep_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);
tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . $order_status . "', last_modified = now() where orders_id = '" . (int) $order_id . "'");
}
}
开发者ID:digideskio,项目名称:oscmax2,代码行数:31,代码来源:callback.php
示例20: install
private function install()
{
//Check if translations are available
parent::checkTranslations(dirname(__FILE__), $this->getTranslations());
$install_array = array('status' => array('type' => 'config', 'value' => 'true', 'options' => array('true', 'false')), 'login' => array('type' => 'config', 'value' => 'true', 'options' => array('true', 'false')), 'create_account' => array('type' => 'config', 'value' => 'true', 'options' => array('true', 'false')), 'change_billing_address' => array('type' => 'config', 'value' => 'true', 'options' => array('true', 'false')), 'billing_name' => array('type' => 'field', 'input' => 'text', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'billing', 'label' => 'Naam + Familienaam', 'dbvalue' => 'entry_firstname', 'expression' => "/^[\\D]+[\\s][\\D]+\$/", 'error' => 'Vul a.u.b. een volledige naam in.', 'sort_order' => 1), 'billing_company' => array('type' => 'field', 'input' => 'text', 'value' => 'false', 'options' => array('true', 'false'), 'block' => 'billing', 'label' => 'Bedrijf', 'dbvalue' => 'entry_company', 'condition' => "!tep_session_is_registered('customer_id')", 'sort_order' => 2), 'billing_tva_intracom' => array('type' => 'field', 'input' => 'text', 'value' => 'false', 'options' => array('true', 'false'), 'block' => 'billing', 'label' => 'BTW nr.', 'dbvalue' => 'billing_tva_intracom', 'condition' => "!tep_session_is_registered('customer_id')", 'sort_order' => 3), 'billing_street_address' => array('type' => 'field', 'input' => 'text', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'billing', 'label' => 'Straat + nr.', 'dbvalue' => 'entry_street_address', 'expression' => "/^[\\D]+[\\s][\\d]+[\\D]{0,3}+\$/", 'error' => 'Vul a.u.b. een straat + nummer in.', 'sort_order' => 4), 'billing_city' => array('type' => 'field', 'input' => 'text', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'billing', 'label' => 'Gemeente', 'dbvalue' => 'entry_city', 'expression' => "/^[\\D]+[\\s]?[\\D]*\$/", 'error' => 'Vul a.u.b. een gemeente in.', 'sort_order' => 5), 'billing_postcode' => array('type' => 'field', 'input' => 'text', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'billing', 'label' => 'Postcode', 'dbvalue' => 'entry_postcode', 'expression' => "/^[a-zA-Z0-9]+\$/", 'error' => 'Vul a.u.b. een postcode in.', 'sort_order' => 6), 'billing_country' => array('type' => 'dropdown', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'billing', 'label' => 'Land', 'dbvalue' => 'entry_country_id', 'expression' => "/^[1-9][0-9]*\$/", 'error' => 'Kies a.u.b. een land.', 'sort_order' => 7), 'customers_telephone' => array('type' => 'field', 'input' => 'tel', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'billing', 'label' => 'Tel.', 'dbvalue' => 'customers_telephone', 'function' => "validate_phone", 'error' => 'Vul a.u.b. een telefoon nummer in.', 'sort_order' => 8), 'customers_email_address' => array('type' => 'field', 'input' => 'email', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'billing', 'label' => 'E-mailadres', 'dbvalue' => 'customers_email_address', 'function' => "validate_email", 'error' => 'Vul a.u.b. een geldig e-mail adres in.', 'sort_order' => 9), 'delivery_name' => array('type' => 'field', 'input' => 'text', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'delivery', 'label' => 'Naam + Familienaam', 'dbvalue' => 'entry_firstname', 'expression' => "/^[\\D]+[\\s][\\D]+\$/", 'error' => 'Vul a.u.b. een volledige naam in.', 'sort_order' => 1), 'delivery_company' => array('type' => 'field', 'input' => 'text', 'value' => 'false', 'options' => array('true', 'false'), 'block' => 'delivery', 'label' => 'Bedrijf', 'dbvalue' => 'entry_company', 'condition' => "!tep_session_is_registered('customer_id')", 'sort_order' => 2), 'delivery_tva_intracom' => array('type' => 'field', 'input' => 'text', 'value' => 'false', 'options' => array('true', 'false'), 'block' => 'delivery', 'label' => 'BTW nr.', 'dbvalue' => '', 'condition' => "!tep_session_is_registered('customer_id')", 'sort_order' => 3), 'delivery_street_address' => array('type' => 'field', 'input' => 'text', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'delivery', 'label' => 'Straat + nr.', 'dbvalue' => 'entry_street_address', 'expression' => "/^[\\D]+[\\s][\\d]+[\\D]{0,3}+\$/", 'error' => 'Vul a.u.b. een straat + nummer in.', 'sort_order' => 4), 'delivery_city' => array('type' => 'field', 'input' => 'text', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'delivery', 'label' => 'Gemeente', 'dbvalue' => 'entry_city', 'expression' => "/^[\\D]+[\\s]?[\\D]*\$/", 'error' => 'Vul a.u.b. een gemeente in.', 'sort_order' => 5), 'delivery_postcode' => array('type' => 'field', 'input' => 'text', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'delivery', 'label' => 'Postcode', 'dbvalue' => 'entry_postcode', 'expression' => "/^[a-zA-Z0-9]+\$/", 'error' => 'Vul a.u.b. een postcode in.', 'sort_order' => 6), 'delivery_country' => array('type' => 'dropdown', 'value' => 'true', 'options' => array('true', 'false'), 'block' => 'delivery', 'label' => 'Land', 'dbvalue' => 'entry_country_id', 'expression' => "/^[1-9][0-9]*\$/", 'error' => 'Kies a.u.b. een land.', 'sort_order' => 7));
tep_db_query('CREATE TABLE checkout_' . get_class($this) . '(
`id` INT(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY(id),
`name` VARCHAR(255),
`type` VARCHAR(255),
`input` VARCHAR(255),
`value` VARCHAR(255),
`options` VARCHAR(255),
`block` VARCHAR(255),
`label` VARCHAR(255),
`dbvalue` VARCHAR(255),
`expression` VARCHAR(255),
`function` VARCHAR(255),
`condition` VARCHAR(255),
`error` VARCHAR(255),
`sort_order` INT(11))');
tep_db_query('CREATE INDEX name ON checkout_' . get_class($this) . ' (name)');
tep_db_query('CREATE INDEX type ON checkout_' . get_class($this) . ' (type)');
foreach ($install_array as $key => $value) {
$db_array = array();
$db_array['name'] = $key;
foreach ($value as $name => $data) {
if (is_array($data)) {
$data = serialize($data);
}
$db_array[$name] = $data;
}
tep_db_perform('checkout_' . get_class($this), $db_array, 'insert');
}
}
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:35,代码来源:Customers_info_module.php
注:本文中的tep_db_perform函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论