public function __construct($module = '') { global $aLang; if (defined('MODULE_SHIPPING_INSTALLED') && !oos_empty(MODULE_SHIPPING_INSTALLED)) { $this->modules = explode(';', MODULE_SHIPPING_INSTALLED); $include_modules = array(); if ( (!empty($module)) && (in_array(substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($_SERVER['PHP_SELF'], (strrpos($_SERVER['PHP_SELF'], '.')+1)), $this->modules)) ) { $include_modules[] = array('class' => substr($module['id'], 0, strpos($module['id'], '_')), 'file' => substr($module['id'], 0, strpos($module['id'], '_')) . '.' . substr($_SERVER['PHP_SELF'], (strrpos($_SERVER['PHP_SELF'], '.')+1))); } else { reset($this->modules); while (list(, $value) = each($this->modules)) { $class = substr($value, 0, strrpos($value, '.')); $include_modules[] = array('class' => $class, 'file' => $value); } } $sLanguage = oos_var_prep_for_os($_SESSION['language']); $nArrayCountModules = count($include_modules); for ($i=0, $n=$nArrayCountModules; $i<$n; $i++) { include 'includes/languages/' . $sLanguage . '/modules/shipping/' . $include_modules[$i]['file']; include 'includes/modules/shipping/' . $include_modules[$i]['file']; $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class']; } } }
/** * Generate a path to categories * * @param $current_category_id * @return string */ function oos_get_path($current_category_id = '', $parent_id = '', $gparent_id = '') { global $aCategoryPath; // Get database information $dbconn =& oosDBGetConn(); $oostable =& oosDBGetTables(); if (!empty($current_category_id)) { $cp_size = count($aCategoryPath); if ($cp_size == 0) { $categories_new = $current_category_id; } else { $categories_new = ''; if (oos_empty($parent_id) || oos_empty($gparent_id) ) { $categoriestable = $oostable['categories']; $query = "SELECT c.parent_id, p.parent_id as gparent_id FROM $categoriestable AS c, $categoriestable AS p WHERE c.categories_id = '" . intval($aCategoryPath[($cp_size-1)]) . "' AND p.categories_id = '" . intval($current_category_id) . "'"; $parent_categories = $dbconn->GetRow($query); $gparent_id = $parent_categories['gparent_id']; $parent_id = $parent_categories['parent_id']; } if ($parent_id == $gparent_id) { for ($i=0; $i < ($cp_size - 1); $i++) { $categories_new .= '_' . $aCategoryPath[$i]; } } else { for ($i=0; $i < $cp_size; $i++) { $categories_new .= '_' . $aCategoryPath[$i]; } } $categories_new .= '_' . $current_category_id; if (substr($categories_new, 0, 1) == '_') { $categories_new = substr($categories_new, 1); } } } else { $categories_new = implode('_', $aCategoryPath); } return 'categories=' . $categories_new; }
public function __construct() { global $aLang; if (defined('MODULE_ORDER_TOTAL_INSTALLED') && !oos_empty(MODULE_ORDER_TOTAL_INSTALLED)) { $this->modules = explode(';', MODULE_ORDER_TOTAL_INSTALLED); $sLanguage = oos_var_prep_for_os($_SESSION['language']); reset($this->modules); while (list(, $value) = each($this->modules)) { include 'includes/languages/' . $sLanguage . '/modules/order_total/' . $value; include 'includes/modules/order_total/' . $value; $class = substr($value, 0, strrpos($value, '.')); $GLOBALS[$class] = new $class; } } }
function send($newsletter_id) { $audience = array(); // Get database information $dbconn =& oosDBGetConn(); $oostable =& oosDBGetTables(); if ($_POST['global'] == 'true') { $products_result = $dbconn->Execute("SELECT distinct pn.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address FROM " . $oostable['customers'] . " c, " . $oostable['products_notifications'] . " pn WHERE c.customers_id = pn.customers_id"); while ($products = $products_result->fields) { $audience[$products['customers_id']] = array('firstname' => $products['customers_firstname'], 'lastname' => $products['customers_lastname'], 'email_address' => $products['customers_email_address']); // Move that ADOdb pointer! $products_result->MoveNext(); } $customers_result = $dbconn->Execute("SELECT c.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address FROM " . $oostable['customers'] . " c, " . $oostable['customers_info'] . " ci WHERE c.customers_id = ci.customers_info_id AND ci.global_product_notifications = '1'"); while ($customers = $customers_result->fields) { $audience[$customers['customers_id']] = array('firstname' => $customers['customers_firstname'], 'lastname' => $customers['customers_lastname'], 'email_address' => $customers['customers_email_address']); // Move that ADOdb pointer! $customers_result->MoveNext(); } } else { $chosen = $_POST['chosen']; $ids = implode(',', $chosen); $products_result = $dbconn->Execute("SELECT distinct pn.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address FROM " . $oostable['customers'] . " c, " . $oostable['products_notifications'] . " pn WHERE c.customers_id = pn.customers_id AND pn.products_id in (" . $ids . ")"); while ($products = $products_result->fields) { $audience[$products['customers_id']] = array('firstname' => $products['customers_firstname'], 'lastname' => $products['customers_lastname'], 'email_address' => $products['customers_email_address']); // Move that ADOdb pointer! $products_result->MoveNext(); } $customers_result = $dbconn->Execute("SELECT c.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address FROM " . $oostable['customers'] . " c, " . $oostable['customers_info'] . " ci WHERE c.customers_id = ci.customers_info_id AND ci.global_product_notifications = '1'"); while ($customers = $customers_result->fields) { $audience[$customers['customers_id']] = array('firstname' => $customers['customers_firstname'], 'lastname' => $customers['customers_lastname'], 'email_address' => $customers['customers_email_address']); // Move that ADOdb pointer! $customers_result->MoveNext(); } } $send_mail = new PHPMailer(); $send_mail->PluginDir = OOS_ABSOLUTE_PATH . 'includes/lib/phpmailer/'; $sLang = isset($_SESSION['iso_639_1']) ? $_SESSION['iso_639_1'] : 'en'; $send_mail->SetLanguage($sLang, OOS_ABSOLUTE_PATH . 'includes/lib/phpmailer/language/'); $send_mail->CharSet = CHARSET; $send_mail->IsMail(); $send_mail->From = STORE_OWNER_EMAIL_ADDRESS; $send_mail->FromName = STORE_OWNER; $send_mail->Mailer = EMAIL_TRANSPORT; // Add smtp values if needed if (EMAIL_TRANSPORT == 'smtp') { $send_mail->IsSMTP(); // set mailer to use SMTP $send_mail->SMTPAuth = OOS_SMTPAUTH; // turn on SMTP authentication $send_mail->Username = OOS_SMTPUSER; // SMTP username $send_mail->Password = OOS_SMTPPASS; // SMTP password $send_mail->Host = OOS_SMTPHOST; // specify main and backup server } else { // Set sendmail path if (EMAIL_TRANSPORT == 'sendmail') { if (!oos_empty(OOS_SENDMAIL)) { $send_mail->Sendmail = OOS_SENDMAIL; $send_mail->IsSendmail(); } } } $send_mail->Subject = $this->title; reset($audience); while (list($key, $value) = each($audience)) { $send_mail->Body = $this->content; $send_mail->AddAddress($value['email_address'], $value['firstname'] . ' ' . $value['lastname']); $send_mail->Send(); // Clear all addresses and attachments for next loop $send_mail->ClearAddresses(); $send_mail->ClearAttachments(); } $newsletter_id = oos_db_prepare_input($newsletter_id); $dbconn->Execute("UPDATE " . $oostable['newsletters'] . " SET date_sent = '" . date("Y-m-d H:i:s", time()) . "', status = '1' WHERE newsletters_id = '" . oos_db_input($newsletter_id) . "'"); }
} return $campaigns_array; } $action = isset($_GET['action']) ? $_GET['action'] : ''; if (!empty($action)) { switch ($action) { case 'insert': case 'save': $campaigns_id = oos_db_prepare_input($_GET['cID']); $languages = oos_get_languages(); for ($i = 0, $n = count($languages); $i < $n; $i++) { $campaigns_name_array = $_POST['campaigns_name']; $lang_id = $languages[$i]['id']; $sql_data_array = array('campaigns_name' => oos_db_prepare_input($campaigns_name_array[$lang_id])); if ($action == 'insert') { if (oos_empty($campaigns_id)) { $campaignstable = $oostable['campaigns']; $next_id_result = $dbconn->Execute("SELECT max(campaigns_id) as campaigns_id FROM {$campaignstable}"); $next_id = $next_id_result->fields; $campaigns_id = $next_id['campaigns_id'] + 1; } $insert_sql_data = array('campaigns_id' => $campaigns_id, 'campaigns_languages_id' => $lang_id); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); oos_db_perform($oostable['campaigns'], $sql_data_array); } elseif ($action == 'save') { oos_db_perform($oostable['campaigns'], $sql_data_array, 'update', "campaigns_id = '" . oos_db_input($campaigns_id) . "' and campaigns_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($campaigns_id) . "' WHERE configuration_key = 'DEFAULT_CAMPAIGNS_ID'");
// Add smtp values if needed if (EMAIL_TRANSPORT == 'smtp') { $send_mail->IsSMTP(); // set mailer to use SMTP $send_mail->SMTPAuth = OOS_SMTPAUTH; // turn on SMTP authentication $send_mail->Username = OOS_SMTPUSER; // SMTP username $send_mail->Password = OOS_SMTPPASS; // SMTP password $send_mail->Host = OOS_SMTPHOST; // specify main and backup server } else { // Set sendmail path if (EMAIL_TRANSPORT == 'sendmail') { if (!oos_empty(OOS_SENDMAIL)) { $send_mail->Sendmail = OOS_SENDMAIL; $send_mail->IsSendmail(); } } } $send_mail->Subject = $subject; $send_mail->Body = $message; $send_mail->AddAddress($_POST['email_to'], 'Friend'); $send_mail->Send(); $send_mail->ClearAddresses(); $send_mail->ClearAttachments(); // Now create the coupon email entry $couponstable = $oostable['coupons']; $insert_result = $dbconn->Execute("INSERT INTO {$couponstable} (coupon_code, coupon_type, coupon_amount, date_created) VALUES ('" . $id1 . "', 'G', '" . $_POST['amount'] . "', '" . date("Y-m-d H:i:s", time()) . "')"); $insert_id = $dbconn->Insert_ID();
/** * Mail function (uses phpMailer) */ function oos_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) { if (preg_match('~[\r\n]~', $to_name)) return false; if (preg_match('~[\r\n]~', $to_email_address)) return false; if (preg_match('~[\r\n]~', $email_subject)) return false; if (preg_match('~[\r\n]~', $from_email_name)) return false; if (preg_match('~[\r\n]~', $from_email_address)) return false; $sLang = (isset($_SESSION['iso_639_1']) ? $_SESSION['iso_639_1'] : 'en'); // Instantiate a new mail object $mail = new PHPMailer; $mail->PluginDir = OOS_ABSOLUTE_PATH . 'includes/lib/phpmailer/'; $mail->SetLanguage( $sLang, OOS_ABSOLUTE_PATH . 'includes/lib/phpmailer/language/' ); $mail->CharSet = CHARSET; $mail->IsMail(); $mail->From = $from_email_address ? $from_email_address : STORE_OWNER_EMAIL_ADDRESS; $mail->FromName = $from_email_name ? $from_email_name : STORE_OWNER; $mail->Mailer = EMAIL_TRANSPORT; // Add smtp values if needed if ( EMAIL_TRANSPORT == 'smtp' ) { $mail->IsSMTP(); // set mailer to use SMTP $mail->SMTPAuth = OOS_SMTPAUTH; // turn on SMTP authentication $mail->Username = OOS_SMTPUSER; // SMTP username $mail->Password = OOS_SMTPPASS; // SMTP password $mail->Host = OOS_SMTPHOST; // specify main and backup server } else // Set sendmail path if ( EMAIL_TRANSPORT == 'sendmail' ) { if (!oos_empty(OOS_SENDMAIL)) { $mail->Sendmail = OOS_SENDMAIL; $mail->IsSendmail(); } } $mail->AddAddress($to_email_address, $to_name); $mail->Subject = $email_subject; // Build the text version $text = strip_tags($email_text); if (EMAIL_USE_HTML == '1') { $mail->IsHTML(true); $mail->Body = $email_text; $mail->AltBody = $text; } else { $mail->Body = $text; } // Send message $mail->Send(); }
$action = (isset($_GET['action']) ? $_GET['action'] : ''); if (!empty($action)) { switch ($action) { case 'insert': case 'save': $ticket_priority_id = oos_db_prepare_input($_GET['oID']); $languages = oos_get_languages(); $ticket_priority_name_array = $_POST['ticket_priority_name']; for ($i = 0; $i < count($languages); $i++) { $lang_id = $languages[$i]['id']; $sql_data_array = array('ticket_priority_name' => oos_db_prepare_input($ticket_priority_name_array[$lang_id])); if ($action == 'insert') { if (oos_empty($ticket_priority_id)) { $ticket_prioritytable = $oostable['ticket_priority']; $next_id_result = $dbconn->Execute("SELECT max(ticket_priority_id) as ticket_priority_id FROM $ticket_prioritytable"); $next_id = $next_id_result->fields; $ticket_priority_id = $next_id['ticket_priority_id'] + 1; } $insert_sql_data = array('ticket_priority_id' => $ticket_priority_id, 'ticket_languages_id' => $lang_id); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); oos_db_perform($oostable['ticket_priority'], $sql_data_array); } elseif ($action == 'save') { oos_db_perform($oostable['ticket_priority'], $sql_data_array, 'update', "ticket_priority_id = '" . oos_db_input($ticket_priority_id) . "' and ticket_languages_id = '" . intval($lang_id) . "'"); }
/** * Mail function (uses phpMailer) */ function oos_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address, $add_attachment = false) { global $oEvent; if (!$oEvent->installed_plugin('mail')) return false; if (preg_match('~[\r\n]~', $to_name)) return false; if (preg_match('~[\r\n]~', $to_email_address)) return false; if (preg_match('~[\r\n]~', $email_subject)) return false; if (preg_match('~[\r\n]~', $from_email_name)) return false; if (preg_match('~[\r\n]~', $from_email_address)) return false; $sLang = (isset($_SESSION['iso_639_1']) ? $_SESSION['iso_639_1'] : 'en'); // require the mail classes MyOOS_CoreApi::requireOnce('lib/phpmailer/class.phpmailer.php'); // Instantiate a new mail object $mail = new PHPMailer; $mail->ClearAllRecipients(); $mail->ClearAddresses(); $mail->ClearAttachments(); $mail->PluginDir = OOS_ABSOLUTE_PATH . 'includes/lib/phpmailer/'; $mail->SetLanguage( $sLang, OOS_ABSOLUTE_PATH . 'includes/lib/phpmailer/language/' ); $mail->CharSet = CHARSET; $mail->IsMail(); $mail->From = $from_email_address ? $from_email_address : STORE_OWNER_EMAIL_ADDRESS; $mail->FromName = $from_email_name ? $from_email_name : STORE_OWNER; $mail->Mailer = EMAIL_TRANSPORT; // Add smtp values if needed if ( EMAIL_TRANSPORT == 'smtp' ) { $mail->IsSMTP(); // set mailer to use SMTP $mail->SMTPAuth = OOS_SMTPAUTH; // turn on SMTP authentication $mail->Username = OOS_SMTPUSER; // SMTP username $mail->Password = OOS_SMTPPASS; // SMTP password $mail->Host = OOS_SMTPHOST; // specify main and backup server } else // Set sendmail path if ( EMAIL_TRANSPORT == 'sendmail' ) { if (!oos_empty(OOS_SENDMAIL)) { $mail->Sendmail = OOS_SENDMAIL; $mail->IsSendmail(); } } $mail->AddAddress($to_email_address, $to_name); $mail->Subject = $email_subject; // Build the text version $text = strip_tags($email_text); if (EMAIL_USE_HTML == '1') { $mail->IsHTML(true); $mail->Body = $email_text; $mail->AltBody = $text; } else { $mail->Body = $text; } if ($add_attachment === true) { // Get database information $dbconn =& oosDBGetConn(); $oostable =& oosDBGetTables(); $files_uploadedtable = $oostable['files_uploaded']; $query = "SELECT files_uploaded_id, files_uploaded_name FROM $files_uploadedtable WHERE sesskey = '" . oos_session_id() . "'"; $files_uploaded_result = $dbconn->Execute($query); if ($files_uploaded_result->RecordCount() > 0) { while ($files_uploaded = $files_uploaded_result->fields) { $sDir = OOS_UPLOADS; if (substr($sDir, -1) != '/') $sDir .= '/'; $sFile = $sDir. $files_uploaded['files_uploaded_id'] . $files_uploaded['files_uploaded_name']; $mail->AddAttachment($sFile, $files_uploaded['files_uploaded_name']); // Move that ADOdb pointer! $files_uploaded_result->MoveNext(); } } } // Send message $mail->Send(); }
/** * Hide form elements */ function oos_hide_session_id() { if (defined('SID') && !oos_empty(SID)) return oos_draw_hidden_field(oos_session_name(), oos_session_id()); }
$newsfeed_categories_result->Close(); return $newsfeed_categories_array; } $action = isset($_GET['action']) ? $_GET['action'] : ''; if (!empty($action)) { switch ($action) { case 'insert': case 'save': $newsfeed_categories_id = oos_db_prepare_input($_GET['ncID']); $languages = oos_get_languages(); for ($i = 0, $n = count($languages); $i < $n; $i++) { $newsfeed_categories_name_array = $_POST['newsfeed_categories_name']; $lang_id = $languages[$i]['id']; $sql_data_array = array('newsfeed_categories_name' => oos_db_prepare_input($newsfeed_categories_name_array[$lang_id])); if ($action == 'insert') { if (oos_empty($newsfeed_categories_id)) { $newsfeed_categoriestable = $oostable['newsfeed_categories']; $next_id_result = $dbconn->Execute("SELECT max(newsfeed_categories_id) as newsfeed_categories_id FROM {$newsfeed_categoriestable}"); $next_id = $next_id_result->fields; $newsfeed_categories_id = $next_id['newsfeed_categories_id'] + 1; } $insert_sql_data = array('newsfeed_categories_id' => $newsfeed_categories_id, 'newsfeed_categories_languages_id' => $lang_id); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); oos_db_perform($oostable['newsfeed_categories'], $sql_data_array); } elseif ($action == 'save') { oos_db_perform($oostable['newsfeed_categories'], $sql_data_array, 'update', "newsfeed_categories_id = '" . oos_db_input($newsfeed_categories_id) . "' and newsfeed_categories_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($newsfeed_categories_id) . "' WHERE configuration_key = 'DEFAULT_NEWSFEED_CATEGOREIS_ID'");
---------------------------------------------------------------------- */ define('OOS_VALID_MOD', 'yes'); require 'includes/oos_main.php'; $action = isset($_GET['action']) ? $_GET['action'] : ''; if (!empty($action)) { switch ($action) { case 'insert': case 'save': $ticket_admin_id = oos_db_prepare_input($_GET['oID']); $languages = oos_get_languages(); $ticket_admin_name_array = $_POST['ticket_admin_name']; for ($i = 0; $i < count($languages); $i++) { $lang_id = $languages[$i]['id']; $sql_data_array = array('ticket_admin_name' => oos_db_prepare_input($ticket_admin_name_array[$lang_id])); if ($action == 'insert') { if (oos_empty($ticket_admin_id)) { $ticket_adminstable = $oostable['ticket_admins']; $next_id_result = $dbconn->Execute("SELECT max(ticket_admin_id) as ticket_admin_id FROM {$ticket_adminstable}"); $next_id = $next_id_result->fields; $ticket_admin_id = $next_id['ticket_admin_id'] + 1; } $insert_sql_data = array('ticket_admin_id' => $ticket_admin_id, 'ticket_languages_id' => $lang_id); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); oos_db_perform($oostable['ticket_admins'], $sql_data_array); } elseif ($action == 'save') { oos_db_perform($oostable['ticket_admins'], $sql_data_array, 'update', "ticket_admin_id = '" . oos_db_input($ticket_admin_id) . "' and ticket_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($ticket_admin_id) . "' WHERE configuration_key = 'TICKET_DEFAULT_ADMIN_ID'");
define('OOS_VALID_MOD', 'yes'); require 'includes/oos_main.php'; $action = isset($_GET['action']) ? $_GET['action'] : ''; if (!empty($action)) { switch ($action) { case 'insert': case 'save': $ticket_reply_id = oos_db_prepare_input($_GET['oID']); $languages = oos_get_languages(); $ticket_reply_name_array = $_POST['ticket_reply_name']; $ticket_reply_text_array = $_POST['ticket_reply_text']; for ($i = 0; $i < count($languages); $i++) { $lang_id = $languages[$i]['id']; $sql_data_array = array('ticket_reply_name' => oos_db_prepare_input($ticket_reply_name_array[$lang_id]), 'ticket_reply_text' => oos_db_prepare_input($ticket_reply_text_array[$lang_id])); if ($action == 'insert') { if (oos_empty($ticket_reply_id)) { $ticket_replytable = $oostable['ticket_reply']; $next_id_result = $dbconn->Execute("SELECT max(ticket_reply_id) as ticket_reply_id FROM {$ticket_replytable}"); $next_id = $next_id_result->fields; $ticket_reply_id = $next_id['ticket_reply_id'] + 1; } $insert_sql_data = array('ticket_reply_id' => $ticket_reply_id, 'ticket_languages_id' => $lang_id); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); oos_db_perform($oostable['ticket_reply'], $sql_data_array); } elseif ($action == 'save') { oos_db_perform($oostable['ticket_reply'], $sql_data_array, 'update', "ticket_reply_id = '" . oos_db_input($ticket_reply_id) . "' and ticket_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($ticket_reply_id) . "' WHERE configuration_key = 'TICKET_DEFAULT_REPLY_ID'");
$sPingUrl = "http://www.google.com/webmasters/sitemaps/ping?sitemap=" . urlencode($pingUrl); $pingres = MyOOS_Utilities::RemoteOpen($sPingUrl); if ($pingres == NULL || $pingres === false) { trigger_error("Failed to ping Google: " . htmlspecialchars(strip_tags($pingres)),E_USER_NOTICE); } //Ping Ask.com $sPingUrl = "http://submissions.ask.com/ping?sitemap=" . urlencode($pingUrl); $pingres = MyOOS_Utilities::RemoteOpen($sPingUrl); if ($pingres == NULL || $pingres === false || strpos($pingres,"successfully received and added")===false) { //Ask.com returns 200 OK even if there was an error, so we need to check the content. trigger_error("Failed to ping Ask.com: " . htmlspecialchars(strip_tags($pingres)),E_USER_NOTICE); } //Ping YAHOO if (!oos_empty(YAHOOKEY)) { $sPingUrl = "http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid=" . YAHOOKEY . "&url=" . urlencode($pingUrl); $pingres = MyOOS_Utilities::RemoteOpen($sPingUrl); if ($pingres==NULL || $pingres===false || strpos(strtolower($pingres),"success")===false) { trigger_error("Failed to ping YAHOO: " . htmlspecialchars(strip_tags($pingres)),E_USER_NOTICE); } } //Ping Bing $sPingUrl = "http://www.bing.com/webmaster/ping.aspx?siteMap=" . urlencode($pingUrl); $pingres = MyOOS_Utilities::RemoteOpen($sPingUrl); if ($pingres==NULL || $pingres===false || strpos($pingres,"Thanks for submitting your sitemap")===false) { trigger_error("Failed to ping Bing: " . htmlspecialchars(strip_tags($pingres)),E_USER_NOTICE); } } else {
$page_type_result->Close(); return $page_type_array; } $action = isset($_GET['action']) ? $_GET['action'] : ''; if (!empty($action)) { switch ($action) { case 'insert': case 'save': $page_type_id = oos_db_prepare_input($_GET['ptID']); $languages = oos_get_languages(); for ($i = 0, $n = count($languages); $i < $n; $i++) { $page_type_name_array = $_POST['page_type_name']; $lang_id = $languages[$i]['id']; $sql_data_array = array('page_type_name' => oos_db_prepare_input($page_type_name_array[$lang_id])); if ($action == 'insert') { if (oos_empty($page_type_id)) { $next_id_result = $dbconn->Execute("SELECT max(page_type_id) as page_type_id FROM " . $oostable['page_type'] . ""); $next_id = $next_id_result->fields; $page_type_id = $next_id['page_type_id'] + 1; } $insert_sql_data = array('page_type_id' => $page_type_id, 'page_type_languages_id' => $lang_id); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); oos_db_perform($oostable['page_type'], $sql_data_array); } elseif ($action == 'save') { oos_db_perform($oostable['page_type'], $sql_data_array, 'update', "page_type_id = '" . oos_db_input($page_type_id) . "' and page_type_languages_id = '" . intval($lang_id) . "'"); } } oos_redirect_admin(oos_href_link_admin($aFilename['content_page_type'], 'page=' . $_GET['page'] . '&ptID=' . $page_type_id)); break; case 'deleteconfirm': $ptID = oos_db_prepare_input($_GET['ptID']);
$sLanguage = oos_var_prep_for_os($_SESSION['language']); require 'includes/languages/' . $sLanguage . '.php'; require 'includes/languages/' . $sLanguage . '/checkout_process.php'; require 'includes/functions/function_address.php'; // if the customer is not logged on, redirect them to the login page if ( !isset( $_SESSION['customer_id'] ) || !is_numeric( $_SESSION['customer_id'] )) { $_SESSION['navigation']->set_snapshot(array('mode' => 'SSL', 'page' =>$aPages['checkout_payment'])); MyOOS_CoreApi::redirect(oos_href_link($aPages['login'], '', 'SSL')); } if (!isset($_SESSION['sendto'])) { MyOOS_CoreApi::redirect(oos_href_link($aPages['checkout_payment'], '', 'SSL')); } if ( (!oos_empty(MODULE_PAYMENT_INSTALLED)) && (!isset($_SESSION['payment'])) ) { MyOOS_CoreApi::redirect(oos_href_link($aPages['checkout_payment'], '', 'SSL')); } // avoid hack attempts during the checkout procedure by checking the internal cartID if (isset($_SESSION['cart']->cartID) && isset($_SESSION['cartID'])) { if ($_SESSION['cart']->cartID != $_SESSION['cartID']) { MyOOS_CoreApi::redirect(oos_href_link($aPages['checkout_shipping'], '', 'SSL')); } } // load selected payment module require 'includes/classes/class_payment.php'; $oPaymentModules = new payment($_SESSION['payment']); // load the selected shipping module
---------------------------------------------------------------------- */ define('OOS_VALID_MOD', 'yes'); require 'includes/oos_main.php'; $action = isset($_GET['action']) ? $_GET['action'] : ''; if (!empty($action)) { switch ($action) { case 'insert': case 'save': $ticket_department_id = oos_db_prepare_input($_GET['oID']); $languages = oos_get_languages(); $ticket_department_name_array = $_POST['ticket_department_name']; for ($i = 0; $i < count($languages); $i++) { $lang_id = $languages[$i]['id']; $sql_data_array = array('ticket_department_name' => oos_db_prepare_input($ticket_department_name_array[$lang_id])); if ($action == 'insert') { if (oos_empty($ticket_department_id)) { $ticket_departmenttable = $oostable['ticket_department']; $next_id_result = $dbconn->Execute("SELECT max(ticket_department_id) as ticket_department_id FROM {$ticket_departmenttable}"); $next_id = $next_id_result->fields; $ticket_department_id = $next_id['ticket_department_id'] + 1; } $insert_sql_data = array('ticket_department_id' => $ticket_department_id, 'ticket_languages_id' => $lang_id); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); oos_db_perform($oostable['ticket_department'], $sql_data_array); } elseif ($action == 'save') { oos_db_perform($oostable['ticket_department'], $sql_data_array, 'update', "ticket_department_id = '" . oos_db_input($ticket_department_id) . "' and ticket_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($ticket_department_id) . "' WHERE configuration_key = 'TICKET_DEFAULT_DEPARTMENT_ID'");
} return $products_units_array; } $action = isset($_GET['action']) ? $_GET['action'] : ''; if (!empty($action)) { switch ($action) { case 'insert': case 'save': $products_units_id = oos_db_prepare_input($_GET['uID']); $languages = oos_get_languages(); for ($i = 0, $n = count($languages); $i < $n; $i++) { $products_unit_name_array = $_POST['products_unit_name']; $lang_id = $languages[$i]['id']; $sql_data_array = array('products_unit_name' => oos_db_prepare_input($products_unit_name_array[$lang_id])); if ($action == 'insert') { if (oos_empty($products_units_id)) { $products_unitstable = $oostable['products_units']; $next_id_result = $dbconn->Execute("SELECT max(products_units_id) as products_units_id FROM {$products_unitstable}"); $next_id = $next_id_result->fields; $products_units_id = $next_id['products_units_id'] + 1; } $insert_sql_data = array('products_units_id' => $products_units_id, 'languages_id' => $lang_id); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); oos_db_perform($oostable['products_units'], $sql_data_array); } elseif ($action == 'save') { oos_db_perform($oostable['products_units'], $sql_data_array, 'update', "products_units_id = '" . intval($products_units_id) . "' and languages_id = '" . intval($lang_id) . "'"); } } if (isset($_POST['default']) && $_POST['default'] == 'on') { $configurationtable = $oostable['configuration']; $dbconn->Execute("UPDATE {$configurationtable} SET configuration_value = '" . intval($products_units_id) . "' WHERE configuration_key = 'DEFAULT_PRODUCTS_UNITS_ID'");
---------------------------------------------------------------------- */ define('OOS_VALID_MOD', 'yes'); require 'includes/oos_main.php'; $action = isset($_GET['action']) ? $_GET['action'] : ''; if (!empty($action)) { switch ($action) { case 'insert': case 'save': $ticket_status_id = oos_db_prepare_input($_GET['oID']); $languages = oos_get_languages(); $ticket_status_name_array = $_POST['ticket_status_name']; for ($i = 0; $i < count($languages); $i++) { $lang_id = $languages[$i]['id']; $sql_data_array = array('ticket_status_name' => oos_db_prepare_input($ticket_status_name_array[$lang_id])); if ($action == 'insert') { if (oos_empty($ticket_status_id)) { $ticket_statustable = $oostable['ticket_status']; $next_id_result = $dbconn->Execute("SELECT max(ticket_status_id) as ticket_status_id FROM {$ticket_statustable}"); $next_id = $next_id_result->fields; $ticket_status_id = $next_id['ticket_status_id'] + 1; } $insert_sql_data = array('ticket_status_id' => $ticket_status_id, 'ticket_languages_id' => $lang_id); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); oos_db_perform($oostable['ticket_status'], $sql_data_array); } elseif ($action == 'save') { oos_db_perform($oostable['ticket_status'], $sql_data_array, 'update', "ticket_status_id = '" . oos_db_input($ticket_status_id) . "' and ticket_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($ticket_status_id) . "' WHERE configuration_key = 'TICKET_DEFAULT_STATUS_ID'");
$email .= sprintf(EMAIL_TEXT_CURCUST_INTRO, $mline); } $email .= EMAIL_TEXT_BODY_HEADER . $mline . EMAIL_TEXT_BODY_FOOTER; if (EMAIL_USE_HTML == '1') { $email .= '<a href="' . oos_catalog_link($aCatalogPage['default']) . '">' . STORE_OWNER . "\n" . OOS_HTTP_SERVER . OOS_SHOP . '</a>'; } else { $email .= STORE_OWNER . "\n" . OOS_HTTP_SERVER . OOS_SHOP; } $email .= "\n\n" . $_POST['message']; $custname = $inrec['fname'] . ' ' . $inrec['lname']; $outEmailAddr = '"' . $custname . '" <' . $inrec['email'] . '>'; if (!oos_empty(RCS_EMAIL_COPIES_TO)) { $outEmailAddr .= ', ' . RCS_EMAIL_COPIES_TO; } oos_mail($custname, $outEmailAddr, EMAIL_TEXT_SUBJECT, $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); $mline = ''; // See if a record for this customer already exists; if not create one and if so update it $recovercartsalestable = $oostable['recovercartsales']; $done_result = $dbconn->Execute("SELECT customers_id FROM $recovercartsalestable WHERE customers_id = '" . $cid . "'"); if ($done_result->RecordCount() == 0) { $recovercartsalestable = $oostable['recovercartsales']; $dbconn->Execute("INSERT INTO $recovercartsalestable (customers_id, recovercartsales_date_added, recovercartsales_date_modified ) VALUES ('" . $cid . "', '" . seadate('0') . "', '" . seadate('0') . "')"); } else { $recovercartsalestable = $oostable['recovercartsales'];
$action = isset($_GET['action']) ? $_GET['action'] : ''; if (!empty($action)) { switch ($action) { case 'insert': case 'save': $customers_status_id = oos_db_prepare_input($_GET['cID']); $languages = oos_get_languages(); for ($i = 0, $n = count($languages); $i < $n; $i++) { $customers_status_name_array = $_POST['customers_status_name']; $lang_id = $languages[$i]['id']; if (isset($_REQUEST['payment'])) { $customers_status_payment = implode(';', $_REQUEST['payment']); } $sql_data_array = array('customers_status_name' => $customers_status_name_array[$lang_id], 'customers_status_public' => $customers_status_public, 'customers_status_show_price' => $customers_status_show_price, 'customers_status_show_price_tax' => $customers_status_show_price_tax, 'customers_status_discount' => $customers_status_discount, 'customers_status_ot_discount_flag' => $customers_status_ot_discount_flag, 'customers_status_ot_discount' => $customers_status_ot_discount, 'customers_status_ot_minimum' => $customers_status_ot_minimum, 'customers_status_qty_discounts' => $customers_status_qty_discounts, 'customers_status_payment' => $customers_status_payment); if ($action == 'insert') { if (oos_empty($customers_status_id)) { $next_id_result = $dbconn->Execute("SELECT max(customers_status_id) as customers_status_id FROM " . $oostable['customers_status'] . ""); $next_id = $next_id_result->fields; $customers_status_id = $next_id['customers_status_id'] + 1; } $insert_sql_data = array('customers_status_id' => oos_db_prepare_input($customers_status_id), 'customers_status_languages_id' => $lang_id); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); oos_db_perform($oostable['customers_status'], $sql_data_array); } elseif ($action == 'save') { oos_db_perform($oostable['customers_status'], $sql_data_array, 'update', "customers_status_id = '" . oos_db_input($customers_status_id) . "' and customers_status_languages_id = '" . intval($lang_id) . "'"); } } // Changes by Guido Start $customers_status_image = oos_get_uploaded_file('customers_status_image'); $image_directory = oos_get_local_path(OOS_ABSOLUTE_PATH . OOS_IMAGES . 'icons/'); if (is_uploaded_file($customers_status_image['tmp_name'])) {
function send($newsletter_id) { // Get database information $dbconn =& oosDBGetConn(); $oostable =& oosDBGetTables(); $send_mail = new PHPMailer(); $send_mail->PluginDir = OOS_ABSOLUTE_PATH . 'includes/lib/phpmailer/'; $sLang = isset($_SESSION['iso_639_1']) ? $_SESSION['iso_639_1'] : 'en'; $send_mail->SetLanguage($sLang, OOS_ABSOLUTE_PATH . 'includes/lib/phpmailer/language/'); $send_mail->CharSet = CHARSET; $send_mail->IsMail(); $send_mail->From = STORE_OWNER_EMAIL_ADDRESS; $send_mail->FromName = STORE_OWNER; $send_mail->Mailer = EMAIL_TRANSPORT; // Add smtp values if needed if (EMAIL_TRANSPORT == 'smtp') { $send_mail->IsSMTP(); // set mailer to use SMTP $send_mail->SMTPAuth = OOS_SMTPAUTH; // turn on SMTP authentication $send_mail->Username = OOS_SMTPUSER; // SMTP username $send_mail->Password = OOS_SMTPPASS; // SMTP password $send_mail->Host = OOS_SMTPHOST; // specify main and backup server } else { // Set sendmail path if (EMAIL_TRANSPORT == 'sendmail') { if (!oos_empty(OOS_SENDMAIL)) { $send_mail->Sendmail = OOS_SENDMAIL; $send_mail->IsSendmail(); } } } $send_mail->Subject = $this->title; $sql = "SELECT customers_firstname, customers_lastname, customers_email_address\n FROM " . $oostable['customers'] . "\n WHERE customers_newsletter = '1'"; $mail_result = $dbconn->Execute($sql); while ($mail = $mail_result->fields) { $send_mail->Body = $this->content; $send_mail->AddAddress($mail['customers_email_address'], $mail['customers_firstname'] . ' ' . $mail['customers_lastname']); $send_mail->Send(); // Clear all addresses and attachments for next loop $send_mail->ClearAddresses(); $send_mail->ClearAttachments(); // Move that ADOdb pointer! $mail_result->MoveNext(); } $sql = "SELECT customers_firstname, customers_lastname, customers_email_address\n FROM " . $oostable['maillist'] . "\n WHERE customers_newsletter = '1'"; $mail_result2 = $dbconn->Execute($sql); while ($mail = $mail_result2->fields) { $send_mail->Body = $this->content; $send_mail->AddAddress($mail['customers_email_address'], $mail['customers_firstname'] . ' ' . $mail['customers_lastname']); $send_mail->Send(); // Clear all addresses and attachments for next loop $send_mail->ClearAddresses(); $send_mail->ClearAttachments(); // Move that ADOdb pointer! $mail_result2->MoveNext(); } $newsletter_id = oos_db_prepare_input($newsletter_id); $dbconn->Execute("UPDATE " . $oostable['newsletters'] . " SET date_sent = now(), status = '1' WHERE newsletters_id = '" . oos_db_input($newsletter_id) . "'"); }
$products_to_categoriestable = $oostable['products_to_categories']; $dbconn->Execute("DELETE FROM {$products_to_categoriestable} WHERE products_id = '" . $products_id . "'"); } } if (MULTIPLE_CATEGORIES_USE == '1') { if (isset($_POST['categories_ids']) && !empty($_POST['categories_ids']) && is_array($_POST['categories_ids'])) { $selected_catids = $_POST['categories_ids']; } else { $selected_catids = array('0'); } foreach ($selected_catids as $current_category_id) { $products_to_categoriestable = $oostable['products_to_categories']; $dbconn->Execute("INSERT INTO {$products_to_categoriestable} (products_id, categories_id) values ('" . $products_id . "', '" . $current_category_id . "')"); } } if (oos_empty($_GET['categories'])) { $categories = $current_category_id; } $languages = oos_get_languages(); for ($i = 0, $n = count($languages); $i < $n; $i++) { $lang_id = $languages[$i]['id']; $sql_data_array = array('products_name' => oos_db_prepare_input($_POST['products_name'][$lang_id]), 'products_description' => oos_db_prepare_input($_POST['products_description_' . $languages[$i]['id']]), 'products_description_meta' => oos_db_prepare_input($_POST['products_description_meta_' . $languages[$i]['id']]), 'products_keywords_meta' => oos_db_prepare_input($_POST['products_keywords_meta_' . $languages[$i]['id']]), 'products_url' => oos_db_prepare_input($_POST['products_url'][$lang_id])); if ($action == 'insert_product') { $insert_sql_data = array('products_id' => $products_id, 'products_languages_id' => $lang_id); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); oos_db_perform($oostable['products_description'], $sql_data_array); } elseif ($action == 'update_product') { oos_db_perform($oostable['products_description'], $sql_data_array, 'update', 'products_id = \'' . oos_db_input($products_id) . '\' and products_languages_id = \'' . $lang_id . '\''); } } oos_redirect_admin(oos_href_link_admin($aFilename['categories'], 'categories=' . $categories . '&pID=' . $products_id));
} // assign Smarty variables; $oSmarty->assign(array('info_product_price' => $info_product_price, 'info_special_price' => $info_special_price, 'info_product_special_price' => $info_product_special_price, 'info_max_product_discount' => $info_product_discount, 'info_product_discount_price' => $info_product_discount_price, 'info_base_product_price' => $info_base_product_price, 'info_base_product_special_price' => $info_base_product_special_price)); if (OOS_BASE_PRICE == '0') { $info_product_price_list = $oCurrencies->display_price($product_info['products_price_list'], oos_get_tax_rate($product_info['products_tax_class_id'])); $oSmarty->assign('info_product_price_list', $info_product_price_list); } if ($oEvent->installed_plugin('reviews')) { $reviewstable = $oostable['reviews']; $reviews_sql = "SELECT COUNT(*) AS total FROM {$reviewstable} WHERE products_id = '" . intval($nProductsId) . "'"; $reviews = $dbconn->Execute($reviews_sql); $reviews_total = $reviews->fields['total']; $oSmarty->assign('reviews_total', $reviews_total); } $discounts_price = '0'; if (oos_empty($info_special_price) && ($product_info['products_discount4_qty'] > 0 || $product_info['products_discount3_qty'] > 0 || $product_info['products_discount2_qty'] > 0 || $product_info['products_discount1_qty'] > 0)) { if ($_SESSION['member']->group['show_price'] == 1 && $_SESSION['member']->group['qty_discounts'] == 1) { $discounts_price = '1'; require 'includes/modules/discounts_price.php'; if ($product_info['products_discount4'] > 0) { $price_discount = $oCurrencies->display_price($product_info['products_discount4'], oos_get_tax_rate($product_info['products_tax_class_id'])); } elseif ($product_info['products_discount3'] > 0) { $price_discount = $oCurrencies->display_price($product_info['products_discount3'], oos_get_tax_rate($product_info['products_tax_class_id'])); } elseif ($product_info['products_discount2'] > 0) { $price_discount = $oCurrencies->display_price($product_info['products_discount2'], oos_get_tax_rate($product_info['products_tax_class_id'])); } elseif ($product_info['products_discount1'] > 0) { $price_discount = $oCurrencies->display_price($product_info['products_discount1'], oos_get_tax_rate($product_info['products_tax_class_id'])); } if (isset($price_discount)) { $oSmarty->assign('price_discount', $price_discount); }
$products_status_result->Close(); return $products_status_array; } $action = isset($_GET['action']) ? $_GET['action'] : ''; if (!empty($action)) { switch ($action) { case 'insert': case 'save': $products_status_id = oos_db_prepare_input($_GET['psID']); $languages = oos_get_languages(); for ($i = 0, $n = count($languages); $i < $n; $i++) { $products_status_name_array = $_POST['products_status_name']; $lang_id = $languages[$i]['id']; $sql_data_array = array('products_status_name' => oos_db_prepare_input($products_status_name_array[$lang_id])); if ($action == 'insert') { if (oos_empty($products_status_id)) { $products_statustable = $oostable['products_status']; $next_id_result = $dbconn->Execute("SELECT max(products_status_id) as products_status_id FROM {$products_statustable}"); $next_id = $next_id_result->fields; $products_status_id = $next_id['products_status_id'] + 1; } $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'");
/** * Smarty {css_button} function plugin * * Type: function * Name: css_button * @Version: $Revision: 1.2 $ - changed by $Author: r23 $ on $Date: 2008/01/09 22:03:20 $ */ function smarty_function_css_button($params, &$smarty) { global $oEvent, $spider_kill_sid; MyOOS_CoreApi::requireOnce('lib/smarty/libs/plugins/shared.escape_special_chars.php'); $modul = ''; $file = ''; $parameters = ''; $connection = 'NONSSL'; $add_session_id = '1'; $search_engine_safe = '1'; $title = ''; $color = 'btnR blue'; foreach($params as $_key => $_val) { switch($_key) { case 'modul': if(!is_array($_val)) { $$_key = smarty_function_escape_special_chars($_val); } else { $smarty->trigger_error("css_button: Unable to determine the page link!", E_USER_NOTICE); } break; case 'file': if(!is_array($_val)) { $$_key = smarty_function_escape_special_chars($_val); } else { $smarty->trigger_error("css_button: Unable to determine the page link!", E_USER_NOTICE); } break; case 'oos_get': case 'addentry_id': case 'connection': case 'add_session_id': case 'search_engine_safe': case 'title': $$_key = (string)$_val; break; case 'color': $$_key = (string)$_val; break; case 'anchor': $anchor = smarty_function_escape_special_chars($_val); break; default: if(!is_array($_val)) { $parameters .= $_key.'='.smarty_function_escape_special_chars($_val).'&'; } else { $smarty->trigger_error("css_button: parameters '$_key' cannot be an array", E_USER_NOTICE); } break; } } if (empty($modul)) { $smarty->trigger_error("css_button: Unable to determine the page link!", E_USER_NOTICE); } if (empty($file)) { $smarty->trigger_error("css_button: Unable to determine the page link!", E_USER_NOTICE); } if (isset($addentry_id)) { $addentry_id = $addentry_id + 2; $parameters .= 'entry_id='.$addentry_id.'&'; } if (isset($oos_get)) { $parameters .= $oos_get; } $file = trim($file); if ($connection == 'NONSSL') { $link = OOS_HTTP_SERVER . OOS_SHOP; } elseif ($connection == 'SSL') { if (ENABLE_SSL == '1') { $link = OOS_HTTPS_SERVER . OOS_SHOP; } else { $link = OOS_HTTP_SERVER . OOS_SHOP; } } else { $smarty->trigger_error("css_button: Unable to determine the page link!", E_USER_NOTICE); } if (isset($parameters)) { $link .= 'index.php?mp=' . $modul . '&file=' . $file . '&' . oos_output_string($parameters); } else { $link .= 'index.php?mp=' . $modul . '&file=' . $file; } $separator = '&'; while ( (substr($link, -5) == '&') || (substr($link, -1) == '?') ) { if (substr($link, -1) == '?') { $link = substr($link, 0, -1); } else { $link = substr($link, 0, -5); } } if (isset($anchor)) { $link .= '#' . $anchor; } // Add the session ID when moving from HTTP and HTTPS servers or when SID is defined if ( (ENABLE_SSL == '1' ) && ($connection == 'SSL') && ($add_session_id == '1') ) { $_sid = oos_session_name() . '=' . oos_session_id(); } elseif ( ($add_session_id == '1') && (!oos_empty(SID)) ) { $_sid = SID; } if ( $spider_kill_sid == '1') $_sid = NULL; /* if ( ($search_engine_safe == '1') && $oEvent->installed_plugin('sefu') ) { $link = str_replace(array('?', '&', '='), '/', $link); $separator = '?'; $pos = strpos ($link, 'action'); if ($pos === false) { $url_rewrite = new url_rewrite; $link = $url_rewrite->transform_uri($link); } } */ if (isset($_sid)) { $link .= $separator . oos_output_string($_sid); } $title = decode($title); return '<a href="' . $link . '" title="' . $title . '" class="' . $color . '">' . $title . '</a>'; }
Released under the GNU General Public License ---------------------------------------------------------------------- */ // DO NOT RUN THIS SCRIPT STANDALONE if (count(get_included_files()) < 2) { header("HTTP/1.1 301 Moved Permanently"); header("Location: /"); exit; } require 'includes/languages/' . $sLanguage . '/checkout_payment.php'; require 'includes/functions/function_address.php'; // if the customer is not logged on, redirect them to the login page if (!isset($_SESSION['customer_id']) || !is_numeric($_SESSION['customer_id'])) { $_SESSION['navigation']->set_snapshot(); MyOOS_CoreApi::redirect(oos_href_link($aPages['login'], '', 'SSL')); } if (oos_empty($_SESSION['member']->group['payment'])) { MyOOS_CoreApi::redirect(oos_href_link($aPages['main'])); } // if there is nothing in the customers cart, redirect them to the shopping cart page if ($_SESSION['cart']->count_contents() < 1) { MyOOS_CoreApi::redirect(oos_href_link($aPages['shopping_cart'])); } // if no shipping method has been selected, redirect the customer to the shipping method selection page if (!isset($_SESSION['shipping'])) { MyOOS_CoreApi::redirect(oos_href_link($aPages['checkout_shipping'], '', 'SSL')); } // avoid hack attempts during the checkout procedure by checking the internal cartID if (isset($_SESSION['cart']->cartID) && isset($_SESSION['cartID'])) { if ($_SESSION['cart']->cartID != $_SESSION['cartID']) { MyOOS_CoreApi::redirect(oos_href_link($aPages['checkout_shipping'], '', 'SSL')); }
if ($currency['currencies_id'] == $currencies_id) { $dbconn->Execute("UPDATE " . $oostable['configuration'] . " SET configuration_value = '' WHERE configuration_key = 'DEFAULT_CURRENCY'"); } $dbconn->Execute("DELETE FROM " . $oostable['currencies'] . " WHERE currencies_id = '" . oos_db_input($currencies_id) . "'"); oos_redirect_admin(oos_href_link_admin($aFilename['currencies'], 'page=' . $_GET['page'])); break; case 'update': $currency_result = $dbconn->Execute("SELECT currencies_id, code FROM " . $oostable['currencies']); while ($currency = $currency_result->fields) { $quote_function = 'quote_' . CURRENCY_SERVER_PRIMARY . '_currency'; $rate = $quote_function($currency['code']); if (empty($rate) && (!oos_empty(CURRENCY_SERVER_BACKUP)) ) { $quote_function = 'quote_' . CURRENCY_SERVER_BACKUP . '_currency'; $rate = $quote_function($currency['code']); } if (!empty($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']);