dhotter Posted July 1, 2005 Posted July 1, 2005 Hi all! I've a big problem with the Contribution Customer add Product! If a user inserted a new product, it would be nice if the contribution would not forward to the index.php, but to a new, self-created page! My problem is to find the instruction in the code, which is responsible for the forwaring. Could anyone find the right instruction? Sorry, but i must quote the hole code: <?php/*Add allgemein*/ require('includes/application_top.php'); require(DIR_WS_FUNCTIONS.'/product_manage.php'); require(DIR_WS_CLASSES.'/product_manage.php'); require(DIR_WS_CLASSES . 'upload.php'); if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } $customer_query = tep_db_query("select customers_firstname,customers_lastname,customers_email_address,customers_ap from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'"); $customer = tep_db_fetch_array($customer_query); if (!$customer['customers_ap']) { echo "<script>alert('Bitte warten Sie, bis wir Ihre Daten ?berpr?ft haben. Die ?berpr?fung nimmt maximal einen Werktag in Anspruch!'); window.history.go(-1);</script>\n"; exit(); } require(DIR_WS_LANGUAGES . $language . '/account_add.php'); $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); $osCsid = (isset($HTTP_GET_VARS['osCsid']) ? $HTTP_GET_VARS['osCsid'] : ''); switch ($action) { case 'new_product_preview': // copy image only if modified //echo DIR_WS_IMAGES; //print_r ($customer); //die($products_image); $products_image = new upload('products_image'); $products_image->set_destination(DIR_WS_IMAGES); if ($products_image->parse() && $products_image->save()) { $products_image_name = $products_image->filename; } else { $products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : ''); } if ($products_image_swf){ /* echo $products_image_swf; $products_image_swf = new upload('products_image_swf'); $products_image_swf->set_destination(DIR_WS_IMAGES); if ($products_image_swf->parse() && $products_image_swf->save()) { $products_image_name2 = $products_image_swf->filename; } else { $products_image_name2 = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : ''); }*/ } //die($products_image_name); break; case 'insert_product': case 'update_product': if (isset($HTTP_POST_VARS['edit_x']) || isset($HTTP_POST_VARS['edit_y'])) { $action = 'new_product'; } else { if (isset($HTTP_GET_VARS['pID'])) $products_id = tep_db_prepare_input($HTTP_GET_VARS['pID']); $products_date_available = tep_db_prepare_input($HTTP_POST_VARS['products_date_available']); $products_date_available = (date('Y-m-d') < $products_date_available) ? $products_date_available : 'null'; $sql_data_array = array('products_quantity' => tep_db_prepare_input($HTTP_POST_VARS['products_quantity']), 'products_model' => tep_db_prepare_input($HTTP_POST_VARS['products_model']), 'products_price' => tep_db_prepare_input($HTTP_POST_VARS['products_price']), 'products_date_available' => $products_date_available, 'products_weight' => tep_db_prepare_input($HTTP_POST_VARS['products_weight']), 'products_status' => '0',//tep_db_prepare_input($HTTP_POST_VARS['products_status']), 'products_tax_class_id' => tep_db_prepare_input($HTTP_POST_VARS['products_tax_class_id']), 'customer_id' => $customer_id, 'manufacturers_id' => tep_db_prepare_input($HTTP_POST_VARS['manufacturers_id'])); if (isset($HTTP_POST_VARS['products_image']) && tep_not_null($HTTP_POST_VARS['products_image']) && ($HTTP_POST_VARS['products_image'] != 'none')) { $sql_data_array['products_image'] = tep_db_prepare_input($HTTP_POST_VARS['products_image']); } if ($action == 'insert_product') { $insert_sql_data = array('products_date_added' => 'now()'); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform(TABLE_PRODUCTS, $sql_data_array); $products_id = tep_db_insert_id(); tep_db_query("insert into " . TABLE_PRODUCTS_TO_CATEGORIES . " (products_id, categories_id) values ('" . (int)$products_id . "', '" . (int)$category_id . "')"); } elseif ($action == 'update_product') { $update_sql_data = array('products_last_modified' => 'now()'); $sql_data_array = array_merge($sql_data_array, $update_sql_data); tep_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "'"); } $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $language_id = $languages[$i]['id']; $sql_data_array = array('products_name' => tep_db_prepare_input($HTTP_POST_VARS['products_name'][$language_id]), 'products_description' => tep_db_prepare_input($HTTP_POST_VARS['products_description'][$language_id]), 'products_url' => tep_db_prepare_input($HTTP_POST_VARS['products_url'][$language_id])); if ($action == 'insert_product') { $insert_sql_data = array('products_id' => $products_id, 'language_id' => $language_id); $sql_data_array = array_merge($sql_data_array, $insert_sql_data); tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array); } elseif ($action == 'update_product') { tep_db_perform(TABLE_PRODUCTS_DESCRIPTION, $sql_data_array, 'update', "products_id = '" . (int)$products_id . "' and language_id = '" . (int)$language_id . "'"); } } if (USE_CACHE == 'true') { tep_reset_cache_block('categories'); tep_reset_cache_block('also_purchased'); } define(EMAIL_TEXT_SUBJECT,'New Product was added'); $category_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$category_id . "' and language_id = '" . (int)$language_id ."'"); $category = tep_db_fetch_array($category_query); $email = "Hello administrator\n\n"; $email .= "New product was added to : ".$category['categories_name']."\n\n"; $email .= "Product was added by : ". $customer['customers_firstname'].' '.$customer['customers_lastname'] ."\n\n"; $email .= "For approve new product go to administrator panel \n\n"; tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_TEXT_SUBJECT, $email,$customer['customers_firstname'].' '.$customer['customers_lastname'],$customer['customers_email_address']); tep_redirect(tep_href_link(FILENAME_DEFAULT, 'osCsid=' . $osCsid . '&pID=' . $products_id)); } break; } $breadcrumb->add('My Account', tep_href_link(FILENAME_ACCOUNT, '', 'SSL')); $breadcrumb->add('Add new product', tep_href_link('account_add.php', '', 'SSL'));?><!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"><html <?php echo HTML_PARAMS; ?>><head><meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"><?php # cDynamic Meta Tags/*<title><?php echo TITLE; ?>*/require(DIR_WS_INCLUDES . 'meta_tags.php');#?><base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"><link rel="stylesheet" type="text/css" href="stylesheet.css"><script language="javascript" src="admin/includes/general.js"></script><link id="luna-tab-style-sheet" type="text/css" rel="stylesheet" href="includes/javascript/tabs/tabpane.css" /><script type="text/javascript" src="includes/javascript/tabs/tabpane.js"></script></head><body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF"><div id="spiffycalendar" class="text"></div><!-- header //--><?php require(DIR_WS_INCLUDES . 'header.php'); ?><!-- header_eof //--> <!-- body //--><table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"><!-- left_navigation //--><?php require(DIR_WS_INCLUDES . 'column_left.php'); ?><!-- left_navigation_eof //--> </table></td><!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td> <?php if ($action != 'new_product_preview') { $parameters = array('products_name' => '', 'products_description' => '', 'products_url' => '', 'products_id' => '', 'products_quantity' => '', 'products_model' => '', 'products_image' => '', 'products_price' => '', 'products_weight' => '', 'products_date_added' => '', 'products_last_modified' => '', 'products_date_available' => '', 'products_status' => '', 'products_tax_class_id' => '', 'category_id' => '', 'manufacturers_id' => ''); $pInfo = new objectInfo($parameters); if (isset($HTTP_GET_VARS['pID']) && empty($HTTP_POST_VARS)) { $product_query = tep_db_query("select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product = tep_db_fetch_array($product_query); $pInfo->objectInfo($product); } elseif (tep_not_null($HTTP_POST_VARS)) { $pInfo->objectInfo($HTTP_POST_VARS); $products_name = $HTTP_POST_VARS['products_name']; $products_description = $HTTP_POST_VARS['products_description']; $products_url = $HTTP_POST_VARS['products_url']; } $manufacturers_array = array(array('id' => '', 'text' => TEXT_NONE)); $manufacturers_query = tep_db_query("select manufacturers_id, manufacturers_name from " . TABLE_MANUFACTURERS . " order by manufacturers_name"); while ($manufacturers = tep_db_fetch_array($manufacturers_query)) { $manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'], 'text' => $manufacturers['manufacturers_name']); } $languages = tep_get_languages(); //print_r( $languages); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { //echo $languages[$i]['directory']; if ($languages[$i]['directory']==$language) $language_id=$languages[$i]['id']; } $categories_array = array(array('id' => '', 'text' => TEXT_NONE)); $categories_query = tep_db_query("select a.categories_id,parent_id, b.categories_name from " . TABLE_CATEGORIES . " as a," . TABLE_CATEGORIES_DESCRIPTION . " as b where a.categories_id = b.categories_id and b.language_id = " . (int)$language_id . " order by categories_name"); while ($categories = tep_db_fetch_array($categories_query)) { //echo $categories['parent_id']; $parent_id = $categories['parent_id']; if ($parent_id==0) { $categories_array[] = array('id' => $categories['categories_id'], 'text' => $categories['categories_name']); } else { $txt=NULL; while ($parent_id!=0) { //echo $parent_id; $category_query = tep_db_query("select a.categories_id,parent_id, b.categories_name from " . TABLE_CATEGORIES . " as a," . TABLE_CATEGORIES_DESCRIPTION . " as b where a.categories_id = b.categories_id and a.categories_id = " . $parent_id . " and b.language_id = " . (int)$language_id . " order by categories_name"); $category = tep_db_fetch_array($category_query); $txt .=$category['categories_name']."->"; $parent_id = $category['parent_id']; //die($txt.$parent_id.$category['categories_id']); } $categories_array[] = array('id' => $categories['categories_id'], 'text' => $txt.$categories['categories_name']); } } $tax_class_array = array(array('id' => '0', 'text' => TEXT_NONE)); $tax_class_query = tep_db_query("select tax_class_id, tax_class_title from " . TABLE_TAX_CLASS . " order by tax_class_title"); while ($tax_class = tep_db_fetch_array($tax_class_query)) { $tax_class_array[] = array('id' => $tax_class['tax_class_id'], 'text' => $tax_class['tax_class_title']); } if (!isset($pInfo->products_status)) $pInfo->products_status = '1'; switch ($pInfo->products_status) { case '0': $in_status = false; $out_status = true; break; case '1': default: $in_status = true; $out_status = false; }?><link rel="stylesheet" type="text/css" href="includes/javascript/spiffyCal/spiffyCal_v2_1.css"><script language="JavaScript" src="includes/javascript/spiffyCal/spiffyCal_v2_1.js"></script> <script language="javascript"><!-- var dateAvailable = new ctlSpiffyCalendarBox("dateAvailable", "new_product", "products_date_available","btnDate1","<?php echo $pInfo->products_date_available; ?>",scBTNMODE_CUSTOMBLUE);//--></script> <script language="javascript"><!--var tax_rates = new Array();<?php for ($i=0, $n=sizeof($tax_class_array); $i<$n; $i++) { if ($tax_class_array[$i]['id'] > 0) { echo 'tax_rates["' . $tax_class_array[$i]['id'] . '"] = ' . tep_get_tax_rate_value($tax_class_array[$i]['id']) . ';' . "\n"; } }?> function doRound(x, places) { return Math.round(x * Math.pow(10, places)) / Math.pow(10, places);} function getTaxRate() { var selected_value = document.forms["new_product"].products_tax_class_id.selectedIndex; var parameterVal = document.forms["new_product"].products_tax_class_id[selected_value].value; if ( (parameterVal > 0) && (tax_rates[parameterVal] > 0) ) { return tax_rates[parameterVal]; } else { return 0; }} function updateGross() { var taxRate = getTaxRate(); var grossValue = document.forms["new_product"].products_price.value; if (taxRate > 0) { grossValue = grossValue * ((taxRate / 100) + 1); } document.forms["new_product"].products_price_gross.value = doRound(grossValue, 4);} function updateNet() { var taxRate = getTaxRate(); var netValue = document.forms["new_product"].products_price_gross.value; if (taxRate > 0) { netValue = netValue / ((taxRate / 100) + 1); } document.forms["new_product"].products_price.value = doRound(netValue, 4);}//--></script><?php echo tep_draw_form('new_product', 'account_add.php?osCsid=' . $osCsid . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '') . '&action=new_product_preview', 'post', 'enctype="multipart/form-data"'); ?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo TEXT_NEW_PRODUCT; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> <!-- oben --> </table></td> </tr><table width="100%" border="0"> <tr> <td valign="middle" align="left"> <div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div> <div class="tab-page" id="configPane"><script type="text/javascript"> var tabPane1 = new WebFXTabPane( document.getElementById( "configPane" ), 0 )</script> <?php /* ------------------------------ Beginn der Reiter ------------------------------------------------------------- */ ?> <!-- DATEN-Reiter --> <div class="tab-page" id="site-page"><h2 class="tab"><? echo Daten; ?></h2><script type="text/javascript"> tabPane1.addTabPage( document.getElementById( "site-page" ) );</script> <table class="adminform"><td><table width="100%"> <!-- <tr> <td class="main"><?php // echo TEXT_PRODUCTS_STATUS; ?></td> </tr> <tr> <td class="main"><?php // echo tep_draw_radio_field('products_status', '1', $in_status) . ' ' . TEXT_PRODUCT_AVAILABLE . ' ' . tep_draw_radio_field('products_status', '0', $out_status) . ' ' . TEXT_PRODUCT_NOT_AVAILABLE; ?></td> </tr> <tr> <td colspan="2"><?php // echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> --> <td class="main"><?php echo TEXT_PRODUCTS_DATE_AVAILABLE; ?><br><small>(YYYY-MM-DD)</small></td> </tr> <tr> <td class="main"><?php echo ' '; ?><script language="javascript">dateAvailable.writeControl(); dateAvailable.dateFormat="yyyy-MM-dd";</script></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <!-- Kategorie-Auswahl --> <td class="main"><?php echo TEXT_PRODUCTS_CATEGORY; ?></td> </tr> <tr> <td class="main"><?php echo tep_draw_pull_down_menu('category_id', $categories_array, $pInfo->categories_id); ?></td> </tr> <tr> <td class="main"><?php // echo TEXT_PRODUCTS_MANUFACTURER; ?></td> <td class="main"><?php // echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_pull_down_menu('manufacturers_id', $manufacturers_array, $pInfo->manufacturers_id); ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr><?php for ($i=0, $n=sizeof($languages); $i<$n; $i++) {?> <tr> <td class="main"><?php if ($i == 0) echo TEXT_PRODUCTS_NAME; ?></td> </tr> <tr> <td class="main"><?php echo tep_image(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('products_name[' . $languages[$i]['id'] . ']', (isset($products_name[$languages[$i]['id']]) ? $products_name[$languages[$i]['id']] : tep_get_products_name($pInfo->products_id, $languages[$i]['id']))); ?></td> </tr><?php }?> </table></td><td><table> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr bgcolor="#ebebff"> <td class="main"><?php echo TEXT_PRODUCTS_TAX_CLASS; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_pull_down_menu('products_tax_class_id', $tax_class_array, $pInfo->products_tax_class_id, 'onchange="updateGross()"'); ?></td> </tr> <tr bgcolor="#ebebff"> <td class="main"><?php echo TEXT_PRODUCTS_PRICE_NET; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_price', $pInfo->products_price, 'onKeyUp="updateGross()"'); ?></td> </tr> <tr bgcolor="#ebebff"> <td class="main"><?php echo TEXT_PRODUCTS_PRICE_GROSS; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_price_gross', $pInfo->products_price, 'OnKeyUp="updateNet()"'); ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr><script language="javascript"><!--updateGross();//--></script> <tr> <td class="main"><?php echo TEXT_PRODUCTS_QUANTITY; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_quantity', $pInfo->products_quantity); ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="main"><?php // echo TEXT_PRODUCTS_MODEL; ?></td> <td class="main"><?php // echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_model', $pInfo->products_model); ?></td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="main"><?php echo TEXT_PRODUCTS_IMAGE; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_file_field('products_image','') . '<br>' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . $pInfo->products_image . tep_draw_hidden_field('products_previous_image', $pInfo->products_image); ?></td> </tr> <tr> <td class="main"><?php // echo TEXT_PRODUCTS_WEIGHT; ?></td> <td class="main"><?php // echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_weight', $pInfo->products_weight); ?></td> </tr> <tr> <td class="main"><?php // echo TEXT_INFO_INSERT; ?></td> <td class="main"><?php // echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_weight', $pInfo->products_weight); ?></td> </tr> </table> </td> </table> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="100%" height="50%" valign="top" bordercolor="#000000"><p align="center"><strong><font color="#FF0000" size="2" face="Arial, Helvetica, sans-serif">ACHTUNG</font></strong><font size="2" face="Arial, Helvetica, sans-serif"><br> Wenn Sie den Button "Vorschau" anklicken, akzeptieren Sie unsere <br> <a href="http://www.worldcup2006-vacation.com/popup_conditions.php" target="_blank"><font color="#0000FF"><u>AGB's</u></font></a> und <a href="http://www.worldcup2006-vacation.com/popup_price.php" target="_blank"><font color="#0000FF"><u>Preise</u></font></a> für das Einsetzen von Unterkünften</font></p> <p> </p></td> </tr></table> </div> <!-- BESCHREIBUNGS-Reiter --> <div class="tab-page" id="Locale-page"><h2 class="tab"><? echo Beschreibung; ?></h2><script type="text/javascript"> tabPane1.addTabPage( document.getElementById( "Locale-page" ) );</script> <table class="adminform"> <?php for ($i=0, $n=sizeof($languages); $i<$n; $i++) {?> <tr> <td class="main" valign="top"><?php if ($i == 0)// echo TEXT_PRODUCTS_DESCRIPTION; ?></td> <td width="100%"><table border="0" cellspacing="0" cellpadding="0"> <tr> <td class="main" valign="top"><?php echo tep_image(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?></td> <td class="main" width="100%"> <?php echo 'Genaue Beschreibung der von Ihnen angebotenen Unterkunft z.B. Anzahl der Zimmer, Lage, Verpflegung etc. (Eingabe bitte in der Sprache der Landesflagge!)' . tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '20', '10', (isset($products_description[$languages[$i]['id']]) ? $products_description[$languages[$i]['id']] : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td> </tr> </table></td> </tr><?php }?> </table> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="100%" height="50%" valign="top" bordercolor="#000000"><p align="center"><strong><font color="#FF0000" size="2" face="Arial, Helvetica, sans-serif">ACHTUNG</font></strong><font size="2" face="Arial, Helvetica, sans-serif"><br> Wenn Sie den Button "Vorschau" anklicken, akzeptieren Sie unsere <br> <a href="http://www.worldcup2006-vacation.com/popup_conditions.php" target="_blank"><font color="#0000FF"><u>AGB's</u></font></a> und <a href="http://www.worldcup2006-vacation.com/popup_price.php" target="_blank"><font color="#0000FF"><u>Preise</u></font></a> für das Einsetzen von Unterkünften</font></p> <p> </p></td> </tr></table> </div> <!-- WEB-LINK Reiter entfernt - nicht ben?tigt! --> <!-- HILFE Reiter --> <div align="center" class="tab-page" id="about-page"><h2 class="tab">Hilfe</h2><script type="text/javascript"> tabPane1.addTabPage( document.getElementById( "about-page" ) );</script> <style type="text/css"><!--.Stil1 { font-size: x-small; font-family: Arial, Helvetica, sans-serif;}.Stil2 {color: #0000FF}.Stil3 { font-family: Arial, Helvetica, sans-serif; font-size: small;}.Stil5 {font-family: Arial, Helvetica, sans-serif}--></style></head> <body><table width="100%" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="100%" height="100%" valign="top"><OL> <LI class="Stil3">Bitte lesen Sie die <a href="http://www.worldcup2006-vacation.com/popup_price.php?language=de" target="_blank" class="Stil2"><u>Preisliste</u></a><br> <br> <LI class="Stil3"><span class="Stil5">Prüfen Sie, ob Ihre Vermietung den Richtlinien des Portals <strong>www.wm-unterkunft2006.de</strong> entspricht und angeboten werden darf.</span> <br> <br> <LI class="Stil3"><span class="Stil5"><strong>Notwendige Eingaben im Menüpunkt "Daten": </strong><br>Überlegen Sie sich, in welchen Kategorien und für welchen Zeitraum Sie Ihre Vermietung anbieten wollen. Schauen Sie, wie ähnliche Angebote von anderen Anbietern bezeichnet und beschrieben werden und welche Preise diese erzielen. <br><br> </span> <LI class="Stil3"><span class="Stil5"><strong>Notwendige Eingaben im <strong>Menüpunkt</strong> "Beschreibung": </strong><br>Suchen Sie für die Beurteilung der Vermietung relevante Daten und Fakten zu Ihrem Angebot heraus, z.B. detaillierte Beschreibungen, eventuelle Verpflegung etc. und fügen Sie diese Daten im Menüpunkt "Beschreibung" ein. <br><br> </span> <LI class="Stil3"><span class="Stil5">Fotografieren Sie Ihr Objekt. Natürlich können Sie Ihr Objekt auch ohne Foto im Portal <strong><br>www. wm-unterkunft2006.de</strong> anbieten - aber ein Foto erhöht Ihre Vermietungschancen beträchtlich.</span> <br><br> <LI class="Stil3"><span class="Stil5">Wenn Sie alle erforderlichen Daten eingegeben haben, können Sie sich Ihr Angebot mit Hilfe des Buttons "Vorschau" überprüfen und gegebenenfalls korrigieren.</span> <br> <br> <LI class="Stil3"><span class="Stil5">In Ihrem persönlichen <a href="http://worldcup2006-vacation.com/account.php" class="Stil2"><u>Kontobereich</u></a> können Sie Ihr eingestelltes Unterkunftsangebot jederzeit ändern oder entfernen.</span> <br> <br> <LI class="Stil3"><span class="Stil3">Für weitere Fragen und Anregungen wenden Sie sich bitte an unseren <a href="http://worldcup2006-vacation.com/contact_us.php" class="Stil2"><u>Support</u></a></span><br> <BR> </OL></td> </tr></table></body> </tr></table></td> </div></div><?php}if ($action == 'new_product_preview') { if (tep_not_null($HTTP_POST_VARS)) { $pInfo = new objectInfo($HTTP_POST_VARS); $products_name = $HTTP_POST_VARS['products_name']; $products_description = $HTTP_POST_VARS['products_description']; $products_url = $HTTP_POST_VARS['products_url']; } else { $product_query = tep_db_query("select p.products_id, pd.language_id, pd.products_name, pd.products_description, pd.products_url, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_weight, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = pd.products_id and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "'"); $product = tep_db_fetch_array($product_query); $pInfo = new objectInfo($product); $products_image_name = $pInfo->products_image; } $form_action = (isset($HTTP_GET_VARS['pID'])) ? 'update_product' : 'insert_product'; echo tep_draw_form($form_action, 'account_add.php?osCsid=' . $osCsid . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '') . '&action=' . $form_action, 'post', 'enctype="multipart/form-data"'); $languages = tep_get_languages(); for ($i=0, $n=sizeof($languages); $i<$n; $i++) { if (isset($HTTP_GET_VARS['read']) && ($HTTP_GET_VARS['read'] == 'only')) { $pInfo->products_name = tep_get_products_name($pInfo->products_id, $languages[$i]['id']); $pInfo->products_description = tep_get_products_description($pInfo->products_id, $languages[$i]['id']); $pInfo->products_url = tep_get_products_url($pInfo->products_id, $languages[$i]['id']); } else { $pInfo->products_name = tep_db_prepare_input($products_name[$languages[$i]['id']]); $pInfo->products_description = tep_db_prepare_input($products_description[$languages[$i]['id']]); $pInfo->products_url = tep_db_prepare_input($products_url[$languages[$i]['id']]); }?> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo tep_image(DIR_WS_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . $pInfo->products_name; ?></td> <td class="pageHeading" align="right"><?php echo $currencies->format($pInfo->products_price); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="main"><?php echo tep_image(DIR_WS_IMAGES . $products_image_name, $pInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'align="right" hspace="5" vspace="5"') . $pInfo->products_description; ?></td> </tr> <?php if ($pInfo->products_url) {?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td class="main"><?php echo sprintf(TEXT_PRODUCT_MORE_INFORMATION, $pInfo->products_url); ?></td> </tr><?php }?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr><?php if ($pInfo->products_date_available > date('Y-m-d')) {?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_PRODUCT_DATE_AVAILABLE, tep_date_long($pInfo->products_date_available)); ?></td> </tr><?php } else {?> <tr> <td align="center" class="smallText"><?php echo sprintf(TEXT_PRODUCT_DATE_ADDED, tep_date_long($pInfo->products_date_added)); ?></td> </tr><?php }?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr><?php } if (isset($HTTP_GET_VARS['read']) && ($HTTP_GET_VARS['read'] == 'only')) { if (isset($HTTP_GET_VARS['origin'])) { $pos_params = strpos($HTTP_GET_VARS['origin'], '?', 0); if ($pos_params != false) { $back_url = substr($HTTP_GET_VARS['origin'], 0, $pos_params); $back_url_params = substr($HTTP_GET_VARS['origin'], $pos_params + 1); } else { $back_url = $HTTP_GET_VARS['origin']; $back_url_params = ''; } } else { $back_url = FILENAME_MANAGE; $back_url_params = 'osCsid=' . $osCsid . '&pID=' . $pInfo->products_id; }?> <tr> <td align="right"><?php echo '<a href="' . tep_href_link($back_url, $back_url_params, 'NONSSL') .
Guest Posted July 1, 2005 Posted July 1, 2005 The line tep_redirect(tep_href_link(FILENAME_DEFAULT, 'osCsid=' . $osCsid . '&pID=' . $products_id)); just before the bit where it starts the <html> output stuff Thats probably the one doing it
dhotter Posted July 1, 2005 Author Posted July 1, 2005 THANK YOU VERY MUCH! Your tip was great!!!! :-" May I ask you another question to this Code? Is it possible to Check the Text-Fields under Comment <!-- DATEN-Reiter --> when the user clicks on IMAGE_PREVIEW (button_preview) ? It would be really great, if you could help me once more! :thumbsup:
Recommended Posts
Archived
This topic is now archived and is closed to further replies.