Jump to content

Fantom

Members
  • Content count

    23
  • Joined

  • Last visited

  1. Fantom

    Please help me solve a php question

    Thank you very much for your help. I really appriciate it. I understand that you are working with a temp file that is written in a temp dir. This is not neccesary. All i need is that the output that is created in the $file_content variable is send directly to me in an text file. What i's trying to achive now is to implement the following code: <?php // ******************************************************************************** // Fantom. // Kieskeurig output file. // just drop this file onto the admin folder and execute from your browser. That's All! // Contact: info@joru.net // ******************************************************************************** require('includes/application_top.php'); // configuration of the parameters $separator = '~'; $endofrow = "\n"; $products_tax_class_id = 4; // End configuration // Set tax variable $products_tax = tep_get_tax_rate($products_tax_class_id); // Now lets perform the query $qry = "select distinct c.categories_name, pd.products_name, pd.products_description, p.products_price, p.products_model, p.products_image, m.manufacturers_name" . " from " . TABLE_PRODUCTS . " p, " . TABLE_CATEGORIES_DESCRIPTION . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m" . " where p.products_id = pd.products_id and p.manufacturers_id = m.manufacturers_id and p.products_id = pc.products_id and pc.categories_id = c.categories_id AND c.language_id = '" . (int)$languages_id . "' and pd.language_id = '" . (int)$languages_id . "'" . " order by trim(c.categories_name), m.manufacturers_name, trim(pd.products_name) asc"; $records = tep_db_query($qry); $num_records = tep_db_num_rows($records); // let?s do the loop $i = 0; $table = mysql_fetch_array($records); while ($table) { $category1 = $table['categories_name']; $manufacturer1 = $table['manufacturers_name']; do { $category = $table['categories_name']; $manufacturer = $table['manufacturers_name']; $product = $table['products_name']; $model = $table['products_model']; $price = $table['products_price']; $price_with_tax = $currencies->display_price($price, $products_tax); if ($category != $category1 || $manufacturer != $manufacturer1) { break; } //Puts all the content into $file_content $file_content .= $manufacturer1; $file_content .= $separator; $file_content .= $category1; $file_content .= $separator; $file_content .= $product; $file_content .= $separator; $file_content .= $model; $file_content .= $separator; $file_content .= $price_with_tax; $file_content .= $endofrow; $i++; } while ($table = mysql_fetch_array($records)); } //download the file if ( $download == 'stream' ){ //Send the headers header("Content-type: application/vnd.ms-excel"); header("Content-disposition: attachment; filename=kieskeurig.txt"); header("Pragma: no-cache"); header("Expires: 0"); echo $file_content; die(); } ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title>Kieskeurig feed file generator</title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> </head> <a href="kieskeurig.php?download=stream"><b>Download Kieskeurig feed file</b></a><br> </html> Above code wil produce a page with a simple link on it. When you click it the file will be downloaded. I'm still having one problem. At the end of every row a <CRLF> should be added. The $endofrow = "\n"; does not work. it only produces a CRLF whem i'm opening the file with wordpad. The CRLF should also work when i'm openening the file with notepad. Who has a suggestion to solve this issue? thanks for the help.
  2. I have the need for a script that will produce a all productslist for an dutch compare site www.kieskeurig.nl I've tried serveral contributions. For example easy populate but i couldn't really modify the contri to my needs. I've tried to wite a contri by myself (I'm really not a programmer) I've used an other contri as input for a script that works for me. If you run the code (just create a file in de root of your oscommerce install en run it) it will produce a html page with all the products on it. I use the following code <?php // ******************************************************************************** **************************************** // Fantom. // Kieskeurig output file. // just drop this file onto the admin folder and execute from your browser. That's All! // Contact: info@joru.net // ******************************************************************************** **************************************** // configuration of the parameters $separator = '~'; $endofrow = "<br>"; $products_tax_class_id = 4; // Intialization of the file require('includes/application_top.php'); $products_tax = tep_get_tax_rate($products_tax_class_id); // Now lets perform the query $qry = "select distinct c.categories_name, pd.products_name, pd.products_description, p.products_price, p.products_model, p.products_image, m.manufacturers_name" . " from " . TABLE_PRODUCTS . " p, " . TABLE_CATEGORIES_DESCRIPTION . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " pc, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m" . " where p.products_id = pd.products_id and p.manufacturers_id = m.manufacturers_id and p.products_id = pc.products_id and pc.categories_id = c.categories_id AND c.language_id = '" . (int)$languages_id . "' and pd.language_id = '" . (int)$languages_id . "'" . " order by trim(c.categories_name), m.manufacturers_name, trim(pd.products_name) asc"; $records = tep_db_query($qry); $num_records = tep_db_num_rows($records); // let?s do the loop $i = 0; $table = mysql_fetch_array($records); while ($table) { $category1 = $table['categories_name']; $manufacturer1 = $table['manufacturers_name']; do { $category = $table['categories_name']; $manufacturer = $table['manufacturers_name']; $product = $table['products_name']; $model = $table['products_model']; $price = $table['products_price']; $price_with_tax = $currencies->display_price($price, $products_tax); if ($category != $category1 || $manufacturer != $manufacturer1) { break; } echo $manufacturer1; echo $separator; echo $category1; echo $separator; echo $product; echo $separator; echo $model; echo $separator; echo $price_with_tax; echo $endofrow; $i++; } while ($table = mysql_fetch_array($records)); } ?> This works fine to produce the list but i really need a popup that i can save the file locally to send it to a third party. According to the tutorials that i've read i need the code below to create a popup that aloows me to save the file locally. header("Content-type: application/vnd.ms-excel"); header("Content-disposition: attachment; filename=kieskeurig.txt"); header("Pragma: no-cache"); header("Expires: 0"); echo $variable met de text; die(); When i put the code in the file i get erros like below You can watch the script at work at www.navco.nl/kieskeurig.php You can watch the script with the errors at www.navco.nl/kieskeurig2.php the question is if a php guru can help me solve my issues. thanks in advance
  3. Fantom

    OSC XML Feed - Help & Discussion

    Hi, I'm having a view problems with this mod. 1st. problem Products are displayed 2,3 or 4 times. I've read that some user where having the same problems and that they were working on a solution but i couldn't find the solution in this thread. 2nd problem. When i'm running the XML2.php file i'm getting an error like this: Free translation of the lower part. I'm running a heavily modded OSC MS2.2 with both English and Dutch language. Dutch is the primary language. Could you please help me solve this problem.
  4. It looks like nobody could help me with this. So it tried serveral options. Solutions is as follows
  5. Hi, Got a little problem with send_order_html_email. When the site is sending the confirmation e-mail to the customer the price displayed after the productsname is the price excl. the tax. I need to display the price incl. tax in the confirmation email. The problem seems to be in the Checkout_process.php file under the heading // ################ Added Send Order HTML Mail ################## if i'm not mistaken in this line: $products_price .= '<tr><td height="40" valign="top">' . ($currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'])) . '</td></tr>'; I already tried to change the line to: $products_price .= '<tr><td height="40" valign="top">' . ($currencies->format($order->products[$i]['final_price'], $order->products[$i]['tax'] * $order->products[$i]['qty'])) . '</td></tr>'; But it looks like that is not working. Does anyone have an idea how to solve this? Thanks
  6. Fantom

    [Contribution] FCKosc 2.2 Support

    Thanks that you're willing to help me :thumbsup: Problem is that i don't see any otner folder in the screen so i don't know were the fck editor is poiting at. How do i change the default image location of the fck editor?
  7. Fantom

    [Contribution] FCKosc 2.2 Support

    Is there no one who can help me with the problem i mentioned below. :'(
  8. Fantom

    [Contribution] FCKosc 2.2 Support

    Hi, Almost everything is working fine with FCK2.2. It's a great contrib :thumbsup: I only have a small issue with inserting an image. When i click on the insert image button i get a pop-up with three tabs. On the first tab you can click on "Browse on server" When i click it i get a screen were i should be able to upload an image. When i'm trying to upload an image it's not working. When i try to create i get an error that i don't have the permission to create a directory. Also i don't see any directory's in the right column. My shop is running from the root so i don't have removed the catalog directory. I run FCKeditor V2.00 RC3 for OsCommerce 2.2 Is there a setting i need to change. How do i solve this? Thanks in advance. Regards, Fantom
  9. Fantom

    Contribution Issue

    I'm still having troubels with the page_manager and the slashes it adds in front of the " and ' . I have installed the FCKeditor which is working suburb for product descriptions and the define mainpage. Now i am trying to get the FCKeditor to work with de page_manager, but is can't get it to work. I must say that my knowledge of PHP is poor. :blush: Can somebody please help me adjust the code of the page_manager.php so that i can edit the text with FCKeditor? :thumbsup: Very much thanks in advance. :rolleyes: The code for editing the page is below. <input type="button" value="<? echo RICH_EDIT; ?>" onClick="edit(pages_html_text_<? echo $languages[$i]['id']; ?>)"> The above code can be found in the page_manager.php code below that i use. <?php /* $Id: page_manager.php,v 1.73 2003/06/29 22:50:51 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); $languages = tep_get_languages(); // Sets the status of a page function tep_set_page_status($pages_id, $status) { if ($status == '1') { return tep_db_query("update " . TABLE_PAGES . " set status = '1' where pages_id = '" . $pages_id . "'"); } elseif ($status == '0') { return tep_db_query("update " . TABLE_PAGES . " set status = '0' where pages_id = '" . $pages_id . "'"); } else { return -1; } } if (tep_not_null($action)) { switch ($action) { case 'setflag': if ( ($HTTP_GET_VARS['flag'] == '0') || ($HTTP_GET_VARS['flag'] == '1') ) { tep_set_page_status($HTTP_GET_VARS['bID'], $HTTP_GET_VARS['flag']); $messageStack->add_session(SUCCESS_PAGE_STATUS_UPDATED, 'success'); } else { $messageStack->add_session(ERROR_UNKNOWN_STATUS_FLAG, 'error'); } tep_redirect(tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $HTTP_GET_VARS['bID'])); break; case 'insert': case 'update': if (isset($HTTP_POST_VARS['pages_id'])) $pages_id = tep_db_prepare_input($HTTP_POST_VARS['pages_id']); $pages_title = tep_db_prepare_input($HTTP_POST_VARS['pages_title']); $pages_html_text = tep_db_prepare_input($HTTP_POST_VARS['pages_html_text']); $sort_order = tep_db_prepare_input($HTTP_POST_VARS['sort_order']); $intorext = tep_db_prepare_input($HTTP_POST_VARS['intorext']); if($intorext == 1) { $externallink = tep_db_prepare_input($HTTP_POST_VARS['externallink']); } else { $externallink=""; } $page_error = false; for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $title_field_name='pages_title_'.$languages[$i]['id']; if (empty($$title_field_name)) { $messageStack->add(ERROR_PAGE_TITLE_REQUIRED, 'error'); $page_error = true; } } if (empty($pages_html_text)) { } if ($page_error == false) { if ($action == 'insert') { if($page_type == "1" || $page_type == "2") { $selectquery=tep_db_query("select count(*) as count from ". TABLE_PAGES ." where page_type=\"$page_type\""); $exists = tep_db_fetch_array($selectquery); if($exists['count'] >= 1) { $updateall=tep_db_query("update ". TABLE_PAGES ." set page_type=\"3\" where page_type=\"$page_type\""); } } } if ($action == 'update') { if($page_type == "1" || $page_type == "2") { $selectquery=tep_db_query("select count(*) as count from ". TABLE_PAGES ." where page_type=\"$page_type\" and pages_id != \"(int)$pages_id\""); $exists = tep_db_fetch_array($selectquery); if($exists['count'] >= 1) { $updateall=tep_db_query("update ". TABLE_PAGES ." set page_type=\"3\" where page_type=\"$page_type\""); } } } for ($i=0, $n=sizeof($languages); $i<$n; $i++) { $pages_titlem='pages_title_'.$languages[$i]['id']; $pages_html_textm='pages_html_text_'.$languages[$i]['id']; $intorextm='intorext_'.$languages[$i]['id']; $externallinkm='externallink_'.$languages[$i]['id']; $link_targetm='link_target_'.$languages[$i]['id']; $language_idm='language_id_'.$languages[$i]['id']; $sql_data_array_pages = array('sort_order' => $sort_order, 'status' => '1', 'page_type' => $page_type); $sql_data_array_pages_description = array('pages_title' => $$pages_titlem, 'pages_html_text' => $$pages_html_textm, 'intorext' => $$intorextm, 'externallink' => $$externallinkm, 'link_target' => $$link_targetm); if ($action == 'insert') { $bID=""; if ($i == 0) { tep_db_perform(TABLE_PAGES, $sql_data_array_pages); $pages_id = tep_db_insert_id(); } $pageid_merge= array('pages_id' => $pages_id, 'language_id' => $languages[$i]['id']); $sql_data_array_pages_desc = array_merge($sql_data_array_pages_description, $pageid_merge); tep_db_perform(TABLE_PAGES_DESCRIPTION, $sql_data_array_pages_desc); $messageStack->add_session(SUCCESS_PAGE_INSERTED, 'success'); } elseif ($action == 'update') { if ($i == 0) { tep_db_perform(TABLE_PAGES, $sql_data_array_pages, 'update', "pages_id = '" . (int)$pages_id . "'"); } $selectexists=tep_db_query("select count( * ) as `countrecords` from `".TABLE_PAGES_DESCRIPTION."` where pages_id='" . (int)$pages_id . "' and language_id='".$languages[$i]['id']."'"); $recordexists = tep_db_fetch_array($selectexists); if($recordexists['countrecords'] >= 1 ) { tep_db_perform(TABLE_PAGES_DESCRIPTION, $sql_data_array_pages_description, 'update', "pages_id = '" . (int)$pages_id . "' and language_id='".$languages[$i]['id']."'"); } else { $pageid_merge= array('pages_id' => $pages_id, 'language_id' => $languages[$i]['id']); $sql_data_array_pages_desc = array_merge($sql_data_array_pages_description, $pageid_merge); tep_db_perform(TABLE_PAGES_DESCRIPTION, $sql_data_array_pages_desc); } $messageStack->add_session(SUCCESS_PAGE_UPDATED, 'success'); } } //for tep_redirect(tep_href_link(FILENAME_PAGE_MANAGER, (isset($HTTP_GET_VARS['page']) ? 'page=' . $HTTP_GET_VARS['page'] . '&' : '') . 'bID=' . $pages_id)); } else { $action = 'new'; } break; case 'deleteconfirm': $pages_id = tep_db_prepare_input($HTTP_GET_VARS['bID']); tep_db_query("delete from " . TABLE_PAGES . " where pages_id = '" . (int)$pages_id . "'"); tep_db_query("delete from " . TABLE_PAGES_DESCRIPTION . " where pages_id = '" . (int)$pages_id . "'"); $messageStack->add_session(SUCCESS_PAGE_REMOVED, 'success'); tep_redirect(tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $HTTP_GET_VARS['page'])); break; } } ?> <!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; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script language="javascript" src="includes/general.js"></script> <script language="javascript"><!-- function popupImageWindow(url) { window.open(url,'popupImageWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le ft=150') } //--></script> <script language=javascript src="editor/inhtml.js"></SCRIPT> <script language="javascript"> function disableIt(a){ document.getElementById(a).disabled=true; } function enableIt(a){ document.getElementById(a).disabled=false; } </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="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"> <!-- 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="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <?php if ($action == 'new') { $form_action = 'insert'; $parameters = array('pages_title' => '', 'pages_html_text' => '', 'sort_order' =>'', 'status' =>''); $bInfo = new objectInfo($parameters); if (isset($HTTP_GET_VARS['bID'])) { $form_action = 'update'; $bID = tep_db_prepare_input($HTTP_GET_VARS['bID']); $page_query = tep_db_query("select s.status, s.sort_order, s.page_type, p.pages_title, p.pages_html_text, p.intorext, p.externallink, p.link_target, p.language_id from " . TABLE_PAGES . " s left join " . TABLE_PAGES_DESCRIPTION . " p on s.pages_id=p.pages_id where s.pages_id = '" . (int)$bID . "'"); # $page = tep_db_fetch_array($page_query); # $bInfo->objectInfo($page); #while($bInfo->objectInfo($page)) { # #$pagetitle[$bInfo->language_id]= $bInfo->pages_title; # #echo $bInfo->pages_title; # #} while($page = tep_db_fetch_array($page_query)) { $languageid=$page['language_id']; $page_type=$page['page_type']; $pagetitle[$languageid]= $page['pages_title']; $sortorder=$page['sort_order']; $pages_html_text[$languageid]=$page['pages_html_text']; $intorext[$languageid]=$page['intorext']; $externallink[$languageid]=$page['externallink']; $link_target[$languageid]=$page['link_target']; } } elseif (tep_not_null($HTTP_POST_VARS)) { $bInfo->objectInfo($HTTP_POST_VARS); } $bIDif=""; if(!empty($bID) && $bID != "") { $bIDif='&bID='.$bID; } ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr><?php echo tep_draw_form('new_page', FILENAME_PAGE_MANAGER, (isset($HTTP_GET_VARS['page']) ? 'page=' . $HTTP_GET_VARS['page'] . '&' : '') . 'action=' . $form_action.$bIDif, 'post', 'enctype="multipart/form-data"'); if ($form_action == 'update') echo tep_draw_hidden_field('pages_id', $bID); ?> <td><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo TEXT_PAGES_TYPE; ?></td> <td class="main"><?echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' '?><select name="page_type" size=1> <option value="3" <? if($page_type == 3) { echo "selected"; } ?>>Other</option> <option value="1" <? if($page_type == 1) { echo "selected"; } ?>>Index</option> <option value="2" <? if($page_type == 2) { echo "selected"; } ?>>Contact Us</option> </select></td> </tr> <? for ($i=0, $n=sizeof($languages); $i<$n; $i++) { ?> <tr> <td class="main"><?php if ($i == 0) echo TEXT_PAGES_TITLE; ?></td> <td class="main"> <?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']). ' '.tep_draw_input_field('pages_title_'.$languages[$i]['id'], $pagetitle[$languages[$i]['id']], '', true); } ?> </td> </tr> <tr> <td class="main"><?php echo TEXT_PAGES_SORT_ORDER; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('sort_order', $sortorder, '', false); ?></td> </tr> </tr> <tr> <td class="main"> </td> <td class="main"> </td> </tr> <? for ($i=0, $n=sizeof($languages); $i<$n; $i++) { ?> <?php if(empty($intorext[$languages[$i]['id']]) or $intorext[$languages[$i]['id']] == "0") { $internalchecked="checked"; $externalchecked=""; $disabledlinkbox="disabled"; } else { $internalchecked=""; $externalchecked="checked"; $disabledlinkbox=""; } ?> <tr> <td class="main"><?php echo TEXT_PAGES_INTEXT; ?></td> <td class="main"> <? echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) ?><input type="radio" value="0" name="intorext_<?php echo $languages[$i]['id']; ?>" <?php echo $internalchecked; ?> onClick='disableIt("<? echo 'externallink_'.$languages[$i]['id']; ?>");'><? echo TEXT_TARGET_INTERNAL; ?> <? echo tep_draw_separator('pixel_trans.gif', '24', '15'); ?><input type="radio" value="1" name="intorext_<?php echo $languages[$i]['id']; ?>" <?php echo $externalchecked;?> onClick='enableIt("<? echo 'externallink_'.$languages[$i]['id']; ?>");'><? echo TEXT_TARGET_EXTERNAL; ?> </td> </tr> <tr> <td class="main"><?php echo TEXT_PAGES_EXTERNAL_LINK; ?></td> <td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']).' '.tep_draw_input_field('externallink_'.$languages[$i]['id'], $externallink[$languages[$i]['id']], 'id='.'"externallink_'.$languages[$i]['id'].'"'. $disabledlinkbox, false); ?></td> </tr> <?php if(empty($link_target[$languages[$i]['id']]) or $link_target[$languages[$i]['id']] == "0") { $samewindowchecked="checked"; $newwindowchecked=""; } else { $samewindowchecked=""; $newwindowchecked="checked"; } ?> <tr> <td class="main"><?php echo TEXT_TARGET; ?></td> <td class="main"> <?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']);?><input type="radio" value="0" name="link_target_<?php echo $languages[$i]['id']; ?>" <?php echo $samewindowchecked; ?>><? echo TEXT_TARGET_SAMEWINDOW; ?> <input type="radio" value="1" name="link_target_<?php echo $languages[$i]['id']; ?>" <?php echo $newwindowchecked; ?>><? echo TEXT_TARGET_NEWWINDOW; ?> </td> </tr> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <? } ?> <? for ($i=0, $n=sizeof($languages); $i<$n; $i++) { ?> <tr> <td valign="top" class="main"><?php if ($i == 0) echo TEXT_PAGES_HTML_TEXT; ?> <br> <input type="button" value="<? echo RICH_EDIT; ?>" onClick="edit(pages_html_text_<? echo $languages[$i]['id']; ?>)"> </td> <td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']). ' '.tep_draw_textarea_field('pages_html_text_'.$languages[$i]['id'], 'soft', '80', '20', $pages_html_text[$languages[$i]['id']]); ?> </td> </tr> <? } ?> <tr> <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main" align="center"><?php echo TEXT_PAGES_PAGE_NOTE . '<br>'; ?></td> <td class="main" align="right" valign="top" nowrap><?php echo (($form_action == 'insert') ? tep_image_submit('button_insert.gif', IMAGE_INSERT) : tep_image_submit('button_update.gif', IMAGE_UPDATE)). ' <a href="' . tep_href_link(FILENAME_PAGE_MANAGER, (isset($HTTP_GET_VARS['page']) ? 'page=' . $HTTP_GET_VARS['page'] . '&' : '') . (!empty($bID) and $bID != "" ? 'bID=' . $bID : '')) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?></td> </tr> </table> <input type="hidden" name="bID" value="<? echo $bID; ?>"> </td> </form></tr> <?php } else { ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow" width="100%"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PAGES; ?></td> <td class="dataTableHeadingContent"></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_SORT_ORDER; ?></td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_STATUS; ?></td> <td class="dataTableHeadingContent"></td> <td class="dataTableHeadingContent"></td> </tr> <?php $pages_query_raw = "select p.pages_id, p.status, p.sort_order, s.pages_title from " . TABLE_PAGES . " p LEFT JOIN " .TABLE_PAGES_DESCRIPTION . " s on p.pages_id = s.pages_id where s.language_id='" . (int)$languages_id . "' order by p.sort_order, s.pages_title"; $pages_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $pages_query_raw, $pages_query_numrows); $pages_query = tep_db_query($pages_query_raw); while ($pages = tep_db_fetch_array($pages_query)) { if ((!isset($HTTP_GET_VARS['bID']) || (isset($HTTP_GET_VARS['bID']) && ($HTTP_GET_VARS['bID'] == $pages['pages_id']))) && !isset($bInfo) && (substr($action, 0, 3) != 'new')) { $bInfo_array = array_merge($pages, $info); $bInfo = new objectInfo($bInfo_array); } if (isset($bInfo) && is_object($bInfo) && ($pages['pages_id'] == $bInfo->pages_id)) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $pages['pages_id']) . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $pages['pages_id']) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo '<a href="javascript:popupImageWindow(\'' . FILENAME_POPUP_IMAGE . '?page=' . $pages['pages_id'] . '\')">' . tep_image(DIR_WS_IMAGES . 'icon_popup.gif', 'View Page') . '</a> ' . $pages['pages_title']; ?></td> <td class="dataTableContent" align="right"></td> <td class="dataTableContent"><?php echo $pages['sort_order']; ?></td> <td class="dataTableContent" align="center"> <?php if ($pages['status'] == '1') { echo tep_image(DIR_WS_IMAGES . 'icon_status_green.gif', 'Active', 10, 10) . ' <a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $pages['pages_id'] . '&action=setflag&flag=0') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', 'Set Inactive', 10, 10) . '</a>'; } else { echo '<a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $pages['pages_id'] . '&action=setflag&flag=1') . '">' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', 'Set Active', 10, 10) . '</a> ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', 'Inactive', 10, 10); } ?></td> <td class="dataTableContent" align="right"></td> <td class="dataTableContent" align="right"></td> </tr> <?php } ?> <tr> <td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" valign="top"><?php echo $pages_split->display_count($pages_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_PAGES); ?></td> <td class="smallText" align="right"><?php echo $pages_split->display_links($pages_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page']); ?></td> </tr> <tr> <td align="right" colspan="2"><?php echo '<a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'action=new') . '">' . tep_image_button('button_new_file.gif', IMAGE_NEW_PAGE) . '</a>'; ?></td> </tr> </table></td> </tr> </table></td> <?php $heading = array(); $contents = array(); switch ($action) { case 'delete': $heading[] = array('text' => '<b>' . $bInfo->pages_title . '</b>'); $contents = array('form' => tep_draw_form('pages', FILENAME_PAGE_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $bInfo->pages_id . '&action=deleteconfirm')); $contents[] = array('text' => TEXT_INFO_DELETE_INTRO); $contents[] = array('text' => '<br><b>' . $bInfo->pages_title . '</b>'); if ($bInfo->pages_image) $contents[] = array('text' => '<br>' . tep_draw_checkbox_field('delete_image', 'on', true) . ' ' . TEXT_INFO_DELETE_IMAGE); $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $HTTP_GET_VARS['bID']) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (is_object($bInfo)) { $heading[] = array('text' => '<b>' . $bInfo->pages_title . '</b>'); $contents[] = array('align' => 'center', 'text' => '<br><br><a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $bInfo->pages_id . '&action=new') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link(FILENAME_PAGE_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $bInfo->pages_id . '&action=delete') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a><br><br><br>'); if ($bInfo->date_scheduled) $contents[] = array('text' => '<br>' . sprintf(TEXT_PAGES_SCHEDULED_AT_DATE, tep_date_short($bInfo->date_scheduled))); if ($bInfo->expires_date) { $contents[] = array('text' => '<br>' . sprintf(TEXT_PAGES_EXPIRES_AT_DATE, tep_date_short($bInfo->expires_date))); } elseif ($bInfo->expires_impressions) { $contents[] = array('text' => '<br>' . sprintf(TEXT_PAGES_EXPIRES_AT_IMPRESSIONS, $bInfo->expires_impressions)); } if ($bInfo->date_status_change) $contents[] = array('text' => '<br>' . sprintf(TEXT_PAGES_STATUS_CHANGE, tep_date_short($bInfo->date_status_change))); } break; } if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> </table></td> </tr> <?php } ?> </table></td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  10. Fantom

    Contribution Issue

    Hi, After updating the latest page_manager.php (23-05-2005) i still keep the error that add's the extra \ before the ". <a href="www.............. will result in <a href=\"www..................... Can you please help me solve this? Thanks
  11. Rockfell, You're the man :thumbsup: :thumbsup: :thumbsup: Thanks for bringing this to our attention. This thing was really killing me. :blink: You saved me from a lot of explaining to my friend. :rolleyes:
  12. Why isn't anybody replying to this with the knowledge to solve this. :angry: I can't imagine that only the contrib writer has knowledge about this. :-" Please........................anyone??????????????????????????
  13. In addition. When you edit the product you still see in you addressbar: http://www.navco.nl/catalog/admin/categori...Path=23&pID=33&action=new_product This means to my opion that you enter the new product section. Which means you have to upload an image. If you click on preview when you edit the product you still see the image but as soon as you clivk "update" the image path is added again to the image.
  14. I found the troubled code (i think) In admin/catagories.php case 'new_product_preview': // copy image only if modified $products_image = new upload('products_image'); // images categories $prod_path = $HTTP_GET_VARS['cPath']; $lchar = strrpos($prod_path, '_'); if ($lchar + 1 == 1) { $lachar = 0; } else { $lachar = $lchar + 1; } $prod_path_id = substr($prod_path, $lachar); $prod_folder = tep_output_generated_category_path_fs($prod_path_id); $products_image->set_destination(DIR_FS_CATALOG_IMAGES . $prod_folder); // eof images categories if ($products_image->parse() && $products_image->save()) {
  15. Is there still nobody who has a clue to solve this problem? It seems that i'm not hte only one who got stuck on this one. :blink: Please can somebody help us? I hope that the contrib maker is reading this to give some support on his contrib :thumbsup:
×