本文整理汇总了PHP中oos_db_prepare_input函数的典型用法代码示例。如果您正苦于以下问题:PHP oos_db_prepare_input函数的具体用法?PHP oos_db_prepare_input怎么用?PHP oos_db_prepare_input使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了oos_db_prepare_input函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: query
function query($order_id)
{
$order_id = oos_db_prepare_input($order_id);
$nLanguageID = isset($_SESSION['language_id']) ? $_SESSION['language_id'] + 0 : 1;
// Get database information
$dbconn =& oosDBGetConn();
$oostable =& oosDBGetTables();
$orderstable = $oostable['orders'];
$sql = "SELECT customers_id, customers_name, customers_number, customers_company, customers_street_address,\n customers_suburb, customers_city, customers_postcode, customers_state,\n customers_country, customers_telephone, customers_email_address,\n customers_address_format_id, delivery_name, delivery_company,\n delivery_street_address, delivery_suburb, delivery_city, delivery_postcode,\n delivery_state, delivery_country, delivery_address_format_id, billing_name,\n billing_company, billing_street_address, billing_suburb, billing_city,\n billing_postcode, billing_state, billing_country, billing_address_format_id,\n payment_method, cc_type, cc_owner, cc_number, cc_expires, cc_cvv, cc_start, cc_issue,\n currency, currency_value, date_purchased, campaigns, orders_status, last_modified\n FROM {$orderstable}\n WHERE orders_id = '" . intval($order_id) . "'";
$order = $dbconn->GetRow($sql);
$orders_totaltable = $oostable['orders_total'];
$sql = "SELECT title, text\n FROM {$orders_totaltable}\n WHERE orders_id = '" . intval($order_id) . "'\n ORDER BY sort_order";
$this->totals = $dbconn->GetAll($sql);
$orders_totaltable = $oostable['orders_total'];
$sql = "SELECT text\n FROM {$orders_totaltable}\n WHERE orders_id = '" . intval($order_id) . "'\n AND class = 'ot_total'";
$order_total_text = $dbconn->GetOne($sql);
$orders_totaltable = $oostable['orders_total'];
$sql = "SELECT title\n FROM {$orders_totaltable}\n WHERE orders_id = '" . intval($order_id) . "'\n AND class = 'ot_shipping'";
$shipping_method_title = $dbconn->GetOne($sql);
$orders_statustable = $oostable['orders_status'];
$sql = "SELECT orders_status_name\n FROM {$orders_statustable}\n WHERE orders_status_id = '" . $order['orders_status'] . "'\n AND orders_languages_id = '" . intval($nLanguageID) . "'";
$orders_status_name = $dbconn->GetOne($sql);
$campaignstable = $oostable['campaigns'];
$sql = "SELECT campaigns_name\n FROM {$campaignstable}\n WHERE campaigns_id = '" . $order['campaigns'] . "'\n AND campaigns_languages_id = '" . intval($nLanguageID) . "'";
$campaigns_name = $dbconn->GetOne($sql);
$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'], 'cc_start' => $order['cc_start'], 'cc_issue' => $order['cc_issue'], 'cc_cvv' => $order['cc_cvv'], 'date_purchased' => $order['date_purchased'], 'campaigns' => $campaigns_name, 'orders_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'], 'number' => $order['customers_number'], '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_productstable = $oostable['orders_products'];
$sql = "SELECT orders_products_id, products_id, products_name, products_model,\n products_ean, products_serial_number, products_price, products_tax,\n products_quantity, final_price\n FROM {$orders_productstable}\n WHERE orders_id = '" . intval($order_id) . "'";
$orders_products_result = $dbconn->Execute($sql);
while ($orders_products = $orders_products_result->fields) {
$this->products[$index] = array('qty' => $orders_products['products_quantity'], 'id' => $orders_products['products_id'], 'name' => $orders_products['products_name'], 'model' => $orders_products['products_model'], 'ean' => $orders_products['products_ean'], 'serial_number' => $orders_products['products_serial_number'], 'tax' => $orders_products['products_tax'], 'price' => $orders_products['products_price'], 'final_price' => $orders_products['final_price']);
$subindex = 0;
$orders_products_attributestable = $oostable['orders_products_attributes'];
$sql = "SELECT products_options, products_options_values, options_values_price, price_prefix\n FROM {$orders_products_attributestable}\n WHERE orders_id = '" . intval($order_id) . "'\n AND orders_products_id = '" . $orders_products['orders_products_id'] . "'";
$attributes_result = $dbconn->Execute($sql);
if ($attributes_result->RecordCount()) {
while ($attributes = $attributes_result->fields) {
$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++;
// Move that ADOdb pointer!
$attributes_result->MoveNext();
}
}
$this->info['tax_groups']["{$this->products[$index]['tax']}"] = '1';
$index++;
// Move that ADOdb pointer!
$orders_products_result->MoveNext();
}
}
示例2: array
$newsfeed_title_array = $_POST['newsfeed_title'];
$newsfeed_description_array = $_POST['newsfeed_description'];
$lang_id = $languages[$i]['id'];
$sql_data_array = array('newsfeed_name' => oos_db_prepare_input($newsfeed_name_array[$lang_id]), 'newsfeed_title' => oos_db_prepare_input($newsfeed_title_array[$lang_id]), 'newsfeed_description' => oos_db_prepare_input($newsfeed_description_array[$lang_id]));
if ($action == 'insert') {
$insert_sql_data = array('newsfeed_id' => $newsfeed_id, 'newsfeed_languages_id' => $lang_id);
$sql_data_array = array_merge($sql_data_array, $insert_sql_data);
oos_db_perform($oostable['newsfeed_info'], $sql_data_array);
} elseif ($action == 'save') {
oos_db_perform($oostable['newsfeed_info'], $sql_data_array, 'update', "newsfeed_id = '" . oos_db_input($newsfeed_id) . "' and newsfeed_languages_id = '" . intval($lang_id) . "'");
}
}
oos_redirect_admin(oos_href_link_admin($aFilename['rss_conf'], 'page=' . $_GET['page'] . '&nID=' . $newsfeed_id));
break;
case 'deleteconfirm':
$newsfeed_id = oos_db_prepare_input($_GET['nID']);
if (isset($_POST['delete_image']) && $_POST['delete_image'] == 'on') {
$newsfeedtable = $oostable['newsfeed'];
$newsfeed_result = $dbconn->Execute("SELECT newsfeed_image FROM {$newsfeedtable} WHERE newsfeed_id = '" . oos_db_input($newsfeed_id) . "'");
$newsfeed = $newsfeed_result->fields;
$image_location = OOS_ABSOLUTE_PATH . OOS_IMAGES . $newsfeed['newsfeed_image'];
if (file_exists($image_location)) {
@unlink($image_location);
}
}
$newsfeedtable = $oostable['newsfeed'];
$dbconn->Execute("DELETE FROM {$newsfeedtable} WHERE newsfeed_id = '" . oos_db_input($newsfeed_id) . "'");
$newsfeed_infotable = $oostable['newsfeed_info'];
$dbconn->Execute("DELETE FROM {$newsfeed_infotable} WHERE newsfeed_id = '" . oos_db_input($newsfeed_id) . "'");
oos_redirect_admin(oos_href_link_admin($aFilename['rss_conf'], 'page=' . $_GET['page']));
break;
示例3: oos_db_prepare_input
for ($i = 0, $n = count($languages); $i < $n; $i++) {
$manufacturers_url_array = oos_db_prepare_input($_POST['manufacturers_url']);
$lang_id = $languages[$i]['id'];
$sql_data_array = array('manufacturers_url' => oos_db_prepare_input($manufacturers_url_array[$lang_id]));
if ($action == 'insert') {
$insert_sql_data = array('manufacturers_id' => $manufacturers_id, 'manufacturers_languages_id' => $lang_id);
$sql_data_array = array_merge($sql_data_array, $insert_sql_data);
oos_db_perform($oostable['manufacturers_info'], $sql_data_array);
} elseif ($action == 'save') {
oos_db_perform($oostable['manufacturers_info'], $sql_data_array, 'update', "manufacturers_id = '" . oos_db_input($manufacturers_id) . "' and manufacturers_languages_id = '" . intval($lang_id) . "'");
}
}
oos_redirect_admin(oos_href_link_admin($aFilename['manufacturers'], 'page=' . $_GET['page'] . '&mID=' . $manufacturers_id));
break;
case 'deleteconfirm':
$manufacturers_id = oos_db_prepare_input($_GET['mID']);
if (isset($_POST['delete_image']) && $_POST['delete_image'] == 'on') {
$manufacturerstable = $oostable['manufacturers'];
$manufacturer_result = $dbconn->Execute("SELECT manufacturers_image FROM {$manufacturerstable} WHERE manufacturers_id = '" . oos_db_input($manufacturers_id) . "'");
$manufacturer = $manufacturer_result->fields;
$image_location = OOS_ABSOLUTE_PATH . OOS_IMAGES . $manufacturer['manufacturers_image'];
if (file_exists($image_location)) {
@unlink($image_location);
}
}
$manufacturerstable = $oostable['manufacturers'];
$dbconn->Execute("DELETE FROM {$manufacturerstable} WHERE manufacturers_id = '" . oos_db_input($manufacturers_id) . "'");
$manufacturers_infotable = $oostable['manufacturers_info'];
$dbconn->Execute("DELETE FROM {$manufacturers_infotable} WHERE manufacturers_id = '" . oos_db_input($manufacturers_id) . "'");
if (isset($_POST['delete_products']) && $_POST['delete_products'] == 'on') {
$productstable = $oostable['products'];
示例4: date
$quote_function = 'quote_' . CURRENCY_SERVER_PRIMARY . '_currency';
$rate = $quote_function($currency['code']);
if (empty($rate) && oos_is_not_null(CURRENCY_SERVER_BACKUP)) {
$quote_function = 'quote_' . CURRENCY_SERVER_BACKUP . '_currency';
$rate = $quote_function($currency['code']);
}
if (oos_is_not_null($rate)) {
$dbconn->Execute("UPDATE " . $oostable['currencies'] . " SET value = '" . $rate . "', last_updated = '" . date("Y-m-d H:i:s", time()) . "' WHERE currencies_id = '" . $currency['currencies_id'] . "'");
}
// Move that ADOdb pointer!
$currency_result->MoveNext();
}
oos_redirect_admin(oos_href_link_admin($aFilename['currencies'], 'page=' . $_GET['page'] . '&cID=' . $_GET['cID']));
break;
case 'delete':
$currencies_id = oos_db_prepare_input($_GET['cID']);
$currency_result = $dbconn->Execute("SELECT code FROM " . $oostable['currencies'] . " WHERE currencies_id = '" . oos_db_input($currencies_id) . "'");
$currency = $currency_result->fields;
$remove_currency = true;
if ($currency['code'] == DEFAULT_CURRENCY) {
$remove_currency = false;
$messageStack->add(ERROR_REMOVE_DEFAULT_CURRENCY, 'error');
}
break;
}
}
require 'includes/oos_header.php';
?>
<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
<tr>
示例5: objectInfo
$newsletter = $newsletter_result->fields;
$nInfo = new objectInfo($newsletter);
include 'includes/languages/' . $_SESSION['language'] . '/modules/newsletters/' . $nInfo->module . substr($_SERVER['PHP_SELF'], strrpos($_SERVER['PHP_SELF'], '.'));
include 'includes/modules/newsletters/' . $nInfo->module . substr($_SERVER['PHP_SELF'], strrpos($_SERVER['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 = oos_db_prepare_input($_GET['nID']);
$newsletterstable = $oostable['newsletters'];
$newsletter_result = $dbconn->Execute("SELECT newsletters_id, title, content, module FROM {$newsletterstable} WHERE newsletters_id = '" . oos_db_input($nID) . "'");
$newsletter = $newsletter_result->fields;
$nInfo = new objectInfo($newsletter);
include 'includes/languages/' . $_SESSION['language'] . '/modules/newsletters/' . $nInfo->module . substr($_SERVER['PHP_SELF'], strrpos($_SERVER['PHP_SELF'], '.'));
include 'includes/modules/newsletters/' . $nInfo->module . substr($_SERVER['PHP_SELF'], strrpos($_SERVER['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 oos_image(OOS_IMAGES . 'ani_send_email.gif', IMAGE_ANI_SEND_EMAIL);
?>
示例6: array
$ticket_prioritys[] = array('id' => $ticket_priority['ticket_priority_id'], 'text' => $ticket_priority['ticket_priority_name']);
$ticket_priority_array[$ticket_priority['ticket_priority_id']] = $ticket_priority['ticket_priority_name'];
$ticket_priority_result->MoveNext();
}
$ticket_statuses = array();
$ticket_status_array = array();
$ticket_statustable = $oostable['ticket_status'];
$sql = "SELECT ticket_status_id, ticket_status_name\n FROM {$ticket_statustable}\n WHERE ticket_languages_id = '" . intval($nLanguageID) . "'";
$ticket_status_result = $dbconn->Execute($sql);
while ($ticket_status = $ticket_status_result->fields) {
$ticket_statuses[] = array('id' => $ticket_status['ticket_status_id'], 'text' => $ticket_status['ticket_status_name']);
$ticket_status_array[$ticket_status['ticket_status_id']] = $ticket_status['ticket_status_name'];
$ticket_status_result->MoveNext();
}
if (isset($_GET['tlid'])) {
$tlid = oos_db_prepare_input($_GET['tlid']);
}
if (isset($_POST['tlid'])) {
$tlid = oos_prepare_input($_POST['tlid']);
}
if (strlen($tlid) < 10) {
unset($tlid);
}
// Form was submitted
$bError = false;
if (isset($_POST['action']) && $_POST['action'] == 'send' && (isset($_SESSION['formid']) && $_SESSION['formid'] == $_POST['formid']) && isset($tlid)) {
$status = oos_prepare_input($_POST['status']);
$department = oos_prepare_input($_POST['department']);
$priority = oos_prepare_input($_POST['priority']);
$enquiry = oos_prepare_input($_POST['enquiry']);
// Check Message length
示例7: array
}
$insert_sql_data = array('products_status_id' => $products_status_id, 'products_status_languages_id' => $lang_id);
$sql_data_array = array_merge($sql_data_array, $insert_sql_data);
oos_db_perform($oostable['products_status'], $sql_data_array);
} elseif ($action == 'save') {
oos_db_perform($oostable['products_status'], $sql_data_array, 'update', "products_status_id = '" . oos_db_input($products_status_id) . "' and products_status_languages_id = '" . intval($lang_id) . "'");
}
}
if (isset($_POST['default']) && $_POST['default'] == 'on') {
$configurationtable = $oostable['configuration'];
$dbconn->Execute("UPDATE {$configurationtable} SET configuration_value = '" . oos_db_input($products_status_id) . "' WHERE configuration_key = 'DEFAULT_PRODUTS_STATUS_ID'");
}
oos_redirect_admin_admin(oos_href_link_admin($aFilename['products_status'], 'page=' . $_GET['page'] . '&psID=' . $products_status_id));
break;
case 'deleteconfirm':
$psID = oos_db_prepare_input($_GET['psID']);
/*
$products_status_result = $dbconn->Execute("SELECT configuration_value FROM " . $oostable['configuration'] . " WHERE configuration_key = 'DEFAULT_PRODUTS_STATUS_ID'");
$products_status = $products_status_result->fields;
if ($products_status['configuration_value'] == $psID) {
$dbconn->Execute("UPDATE " . $oostable['configuration'] . " SET configuration_value = '' WHERE configuration_key = 'DEFAULT_PRODUTS_STATUS_ID'");
}
*/
$products_statustable = $oostable['products_status'];
$dbconn->Execute("DELETE FROM {$products_statustable} WHERE products_status_id = '" . oos_db_input($psID) . "'");
oos_redirect_admin_admin(oos_href_link_admin($aFilename['products_status'], 'page=' . $_GET['page']));
break;
}
}
require 'includes/oos_header.php';
?>
示例8: oos_get_categories
function oos_get_categories($aCategories = '', $parent_id = '0', $indent = '')
{
$parent_id = oos_db_prepare_input($parent_id);
$nGroupID = intval($_SESSION['member']->group['id']);
if (!is_array($aCategories)) $aCategories = array();
// Get database information
$dbconn =& oosDBGetConn();
$oostable =& oosDBGetTables();
$nLanguageID = isset($_SESSION['language_id']) ? $_SESSION['language_id']+0 : 1;
$categoriestable = $oostable['categories'];
$categories_descriptiontable = $oostable['categories_description'];
$query = "SELECT c.categories_id, c.categories_status, cd.categories_name
FROM $categoriestable c,
$categories_descriptiontable cd
WHERE ( c.access = '0' OR c.access = '" . intval($nGroupID) . "' )
AND c.categories_status = '1'
AND c.parent_id = '" . oos_db_input($parent_id) . "'
AND c.categories_id = cd.categories_id
AND cd.categories_languages_id = '" . intval($nLanguageID) . "'
ORDER BY sort_order, cd.categories_name";
$result =& $dbconn->Execute($query);
while ($categories = $result->fields)
{
$aCategories[] = array('id' => $categories['categories_id'],
'text' => $indent . $categories['categories_name']);
if ($categories['categories_id'] != $parent_id) {
$aCategories = oos_get_categories($aCategories, $categories['categories_id'], $indent . ' ');
}
// Move that ADOdb pointer!
$result->MoveNext();
}
// Close result set
$result->Close();
return $aCategories;
}
示例9: oos_db_prepare_input
$admin_email_address = oos_db_prepare_input($_POST['admin_email_address']);
$stored_email[] = 'NONE';
$admintable = $oostable['admin'];
$check_email_query = "SELECT admin_email_address FROM " . $admintable . " WHERE admin_id <> " . $admin_id . "";
$check_email_result =& $dbconn->Execute($check_email_query);
while ($check_email = $check_email_result->fields) {
$stored_email[] = $check_email['admin_email_address'];
// Move that ADOdb pointer!
$check_email_result->MoveNext();
}
// Close result set
$check_email_result->Close();
if (in_array($_POST['admin_email_address'], $stored_email)) {
oos_redirect_admin(oos_href_link_admin($aFilename['admin_account'], 'action=edit_process&error=email'));
} else {
$sql_data_array = array('admin_firstname' => oos_db_prepare_input($_POST['admin_firstname']), 'admin_lastname' => oos_db_prepare_input($_POST['admin_lastname']), 'admin_email_address' => oos_db_prepare_input($_POST['admin_email_address']), 'admin_password' => oos_encrypt_password(oos_db_prepare_input($_POST['admin_password'])), 'admin_modified' => '" . date("Y-m-d H:i:s", time()) . "');
oos_db_perform($oostable['admin'], $sql_data_array, 'update', 'admin_id = \'' . $admin_id . '\'');
//oos_mail($_POST['admin_firstname'] . ' ' . $_POST['admin_lastname'], $_POST['admin_email_address'], ADMIN_EMAIL_SUBJECT, sprintf(ADMIN_EMAIL_TEXT, $_POST['admin_firstname'], OOS_HTTP_SERVER . OOS_SHOP . 'admin/', $_POST['admin_email_address'], $hiddenPassword, STORE_OWNER), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
oos_redirect_admin(oos_href_link_admin($aFilename['admin_account'], 'page=' . $_GET['page'] . '&mID=' . $admin_id));
}
break;
}
}
require 'includes/oos_header.php';
require 'includes/account_check.js.php';
?>
<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
<tr>
<td width="<?php
echo BOX_WIDTH;
示例10: array
$sql_data_array_url = array('information_url' => oos_db_prepare_input($information_url_array[$lang_id]));
$sql_data_array_head = array('information_heading_title' => oos_db_prepare_input($information_heading_title_array[$lang_id]));
$sql_data_array_desc = array('information_description' => oos_db_prepare_input($information_description_array[$lang_id]));
$sql_data_array = array_merge($sql_data_array, $sql_data_array_url, $sql_data_array_desc, $sql_data_array_head);
if ($action == 'insert') {
$insert_sql_data = array('information_id' => $information_id, 'information_languages_id' => $lang_id);
$sql_data_array = array_merge($sql_data_array, $insert_sql_data);
oos_db_perform($oostable['information_description'], $sql_data_array);
} elseif ($action == 'save') {
oos_db_perform($oostable['information_description'], $sql_data_array, 'update', "information_id = '" . oos_db_input($information_id) . "' AND information_languages_id = '" . intval($lang_id) . "'");
}
}
oos_redirect_admin(oos_href_link_admin($aFilename['information'], 'page=' . $_GET['page'] . '&mID=' . $information_id));
break;
case 'deleteconfirm':
$information_id = oos_db_prepare_input($_GET['mID']);
if ($information_id > 5) {
if (isset($_POST['delete_image']) && $_POST['delete_image'] == 'on') {
$informationtable = $oostable['information'];
$informations_result = $dbconn->Execute("SELECT information_image FROM {$informationtable} WHERE information_id = '" . oos_db_input($information_id) . "'");
$informations = $informations_result->fields;
$image_location = OOS_ABSOLUTE_PATH . OOS_IMAGES . $informations['information_image'];
if (file_exists($image_location)) {
@unlink($image_location);
}
}
$informationtable = $oostable['information'];
$dbconn->Execute("DELETE FROM {$informationtable} WHERE information_id = '" . oos_db_input($information_id) . "'");
$information_descriptiontable = $oostable['information_description'];
$dbconn->Execute("DELETE FROM {$information_descriptiontable} WHERE information_id = '" . oos_db_input($information_id) . "'");
}
示例11: oos_draw_form
$form_action = $_GET['cID'] ? 'update_category' : 'insert_category';
echo oos_draw_form($form_action, $aFilename['categories'], 'categories=' . $categories . '&cID=' . $_GET['cID'] . '&action=' . $form_action, 'post', 'enctype="multipart/form-data"');
$languages = oos_get_languages();
for ($i = 0; $i < count($languages); $i++) {
if (isset($_GET['read']) && $_GET['read'] == 'only') {
$cInfo->categories_name = oos_get_category_name($cInfo->categories_id, $languages[$i]['id']);
$cInfo->categories_heading_title = oos_get_category_heading_title($cInfo->categories_id, $languages[$i]['id']);
$cInfo->categories_description = oos_get_category_description($cInfo->categories_id, $languages[$i]['id']);
$cInfo->categories_description_meta = oos_get_category_description_meta($cInfo->categories_id, $languages[$i]['id']);
$cInfo->categories_keywords_meta = oos_get_category_keywords_meta($cInfo->categories_id, $languages[$i]['id']);
} else {
$cInfo->categories_name = oos_db_prepare_input($categories_name[$languages[$i]['id']]);
$cInfo->categories_heading_title = oos_db_prepare_input($categories_heading_title[$languages[$i]['id']]);
$cInfo->categories_description = oos_db_prepare_input($categories_description[$languages[$i]['id']]);
$cInfo->categories_description_meta = oos_db_prepare_input($categories_description_meta[$languages[$i]['id']]);
$cInfo->categories_keywords_meta = oos_db_prepare_input($categories_keywords_meta[$languages[$i]['id']]);
}
?>
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading"><?php
echo oos_image(OOS_SHOP_IMAGES . 'flags/' . $languages[$i]['iso_639_2'] . '.gif', $languages[$i]['name']) . ' ' . $cInfo->categories_heading_title;
?>
</td>
</tr>
</table></td>
</tr>
<tr>
<td><?php
echo oos_draw_separator('trans.gif', '1', '10');
示例12: define
define('OOS_VALID_MOD', 'yes');
require 'includes/oos_main.php';
if (!isset($_SESSION['login_id'])) {
oos_redirect_admin(oos_href_link_admin($aFilename['login'], '', 'SSL'));
}
if ( !current_user_can('popup_image') )
oos_redirect_admin(oos_href_link_admin($aFilename['forbiden']));
reset($_GET);
while (list($key, ) = each($_GET)) {
switch ($key) {
case 'banner':
$banners_id = oos_db_prepare_input($_GET['banner']);
$bannerstable = $oostable['banners'];
$banner_result = $dbconn->Execute("SELECT banners_title, banners_image, banners_html_text FROM $bannerstable WHERE banners_id = '" . oos_db_input($banners_id) . "'");
$banner = $banner_result->fields;
$page_title = $banner['banners_title'];
if ($banner['banners_html_text']) {
$image_source = $banner['banners_html_text'];
} elseif ($banner['banners_image']) {
$image_source = oos_image(OOS_HTTP_SERVER . '/' . OOS_IMAGES . $banner['banners_image'], $page_title);
}
break;
}
}
示例13: VALUES
case 'insert':
$tax_classtable = $oostable['tax_class'];
$dbconn->Execute("INSERT INTO $tax_classtable (tax_class_title, tax_class_description, date_added) VALUES ('" . oos_db_input($tax_class_title) . "', '" . oos_db_input($tax_class_description) . "', '" . date("Y-m-d H:i:s", time()) . "')");
oos_redirect_admin(oos_href_link_admin($aFilename['tax_classes']));
break;
case 'save':
$tax_class_id = oos_db_prepare_input($_GET['tID']);
$tax_classtable = $oostable['tax_class'];
$dbconn->Execute("UPDATE $tax_classtable SET tax_class_id = '" . oos_db_input($tax_class_id) . "', tax_class_title = '" . oos_db_input($tax_class_title) . "', tax_class_description = '" . oos_db_input($tax_class_description) . "', last_modified = '" . date("Y-m-d H:i:s", time()) . "' WHERE tax_class_id = '" . oos_db_input($tax_class_id) . "'");
oos_redirect_admin(oos_href_link_admin($aFilename['tax_classes'], 'page=' . $_GET['page'] . '&tID=' . $tax_class_id));
break;
case 'deleteconfirm':
$tax_class_id = oos_db_prepare_input($_GET['tID']);
$tax_classtable = $oostable['tax_class'];
$dbconn->Execute("DELETE FROM $tax_classtable WHERE tax_class_id = '" . oos_db_input($tax_class_id) . "'");
oos_redirect_admin(oos_href_link_admin($aFilename['tax_classes'], 'page=' . $_GET['page']));
break;
}
}
require 'includes/oos_header.php';
?>
<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
<tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<?php require 'includes/oos_blocks.php'; ?>
</table></td>
示例14: ucwords
case 'group_new':
$admin_groups_name = ucwords(strtolower(oos_db_prepare_input($_POST['admin_groups_name'])));
$name_replace = preg_replace("/ /", "%", $admin_groups_name);
if ($admin_groups_name == '' || NULL || strlen($admin_groups_name) <= 5) {
oos_redirect_admin(oos_href_link_admin($aFilename['admin_members'], 'gID=' . $_GET[gID] . '&gName=false&action=new_group'));
} else {
$check_groups_name_query = "SELECT admin_groups_name as group_name_new FROM " . $oostable['admin_groups'] . " WHERE admin_groups_name like '%" . $name_replace . "%'";
$check_groups_name_result =& $dbconn->Execute($check_groups_name_query);
$check_duplicate = $check_groups_name_result->RecordCount();
if ($check_duplicate > 0) {
oos_redirect_admin(oos_href_link_admin($aFilename['admin_members'], 'gID=' . $_GET['gID'] . '&gName=used&action=new_group'));
} else {
$sql_data_array = array('admin_groups_name' => $admin_groups_name);
oos_db_perform($oostable['admin_groups'], $sql_data_array);
$admin_groups_id = $dbconn->Insert_ID();
$set_groups_id = oos_db_prepare_input($_POST['set_groups_id']);
$add_group_id = $set_groups_id . ',\'' . $admin_groups_id . '\'';
$query = "alter table " . $oostable['admin_files'] . " change admin_groups_id admin_groups_id set( " . $add_group_id . ") NOT NULL DEFAULT '1' ";
$dbconn->Execute($query);
oos_redirect_admin(oos_href_link_admin($aFilename['admin_members'], 'gID=' . $admin_groups_id));
}
}
break;
}
}
require 'includes/oos_header.php';
require 'includes/account_check.js.php';
?>
<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
<tr>
示例15: oos_db_prepare_input
echo TABLE_HEADING_PUBLISHED;
?>
</td>
<td class="dataTableHeadingContent" align="left"><?php
echo TABLE_HEADING_ARTICLES;
?>
</td>
<td class="dataTableHeadingContent" align="right"><?php
echo TABLE_HEADING_ACTION;
?>
</td>
</tr>
<?php
$search = '';
if (isset($_GET['categories'])) {
$categories = oos_db_prepare_input($_GET['categories']);
$search = "WHERE newsfeed_categories_id = '" . $categories . "'";
}
$newsfeed_manager_result_raw = "SELECT\n newsfeed_manager_id, newsfeed_categories_id, newsfeed_manager_name,\n newsfeed_manager_link, newsfeed_manager_languages_id, newsfeed_manager_numarticles,\n newsfeed_manager_refresh, newsfeed_manager_status, newsfeed_manager_date_added,\n newsfeed_manager_last_modified, newsfeed_manager_sort_order\n FROM\n " . $oostable['newsfeed_manager'] . "\n " . $search . "\n ORDER BY\n newsfeed_manager_name";
$newsfeed_manager_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $newsfeed_manager_result_raw, $newsfeed_manager_result_numrows);
$newsfeed_manager_result = $dbconn->Execute($newsfeed_manager_result_raw);
while ($newsfeed_manager = $newsfeed_manager_result->fields) {
if ((!isset($_GET['nmID']) || isset($_GET['nmID']) && $_GET['nmID'] == $newsfeed_manager['newsfeed_manager_id']) && !isset($nmInfo) && substr($action, 0, 3) != 'new') {
$nmInfo = new objectInfo($newsfeed_manager);
}
if (isset($nmInfo) && is_object($nmInfo) && $newsfeed_manager['newsfeed_manager_id'] == $nmInfo->newsfeed_manager_id) {
echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . oos_href_link_admin($aFilename['newsfeed_manager'], oos_get_all_get_params(array('nmID', 'action')) . 'nmID=' . $nmInfo->newsfeed_manager_id . '&action=edit') . '\'">' . "\n";
} else {
echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . oos_href_link_admin($aFilename['newsfeed_manager'], oos_get_all_get_params(array('nmID')) . 'nmID=' . $newsfeed_manager['newsfeed_manager_id']) . '\'">' . "\n";
}
?>