Thinkie Posted January 3, 2014 Posted January 3, 2014 Sorry for being such a newbie, but please take a look at my contact_us form: http://aftermarket.ee/contact_us.php We cant figure out the place to change... HELP! :) <?php /* $Id: contact_us.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US); $error = false; if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'send')) { $name = tep_db_prepare_input($HTTP_POST_VARS['name']); $email_address = tep_db_prepare_input($HTTP_POST_VARS['email']); $enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']); if (tep_validate_email($email_address)) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $enquiry, $name, $email_address); tep_redirect(tep_href_link(FILENAME_CONTACT_US, 'action=success')); } else { $error = true; $messageStack->add('contact', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } } $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_CONTACT_US)); ?> <!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> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table class border="0" width="1024" align="center" cellspacing="0" cellpadding="0"> <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"><?php echo tep_draw_form('contact_us', tep_href_link(FILENAME_CONTACT_US, 'action=send')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0"> <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_image(DIR_WS_IMAGES . 'table_background_contact_us.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if ($messageStack->size('contact') > 0) { ?> <tr> <td><?php echo $messageStack->output('contact'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) { ?> <tr> <td class="main" align="center"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE, '0', '0', 'align="left"') . TEXT_SUCCESS; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } else { ?> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo ENTRY_NAME; ?></td> </tr> <tr> <td class="main"><?php echo tep_draw_input_field('name'); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_EMAIL; ?></td> </tr> <tr> <td class="main"><?php echo tep_draw_input_field('email'); ?></td> </tr> <tr> <td class="main"><?php echo ENTRY_ENQUIRY; ?></td> </tr> <tr> <td><?php echo tep_draw_textarea_field('enquiry', 'soft', 50, 15); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="1024" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } ?> </table></form></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </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'); ?>
♥joli1811 Posted January 3, 2014 Posted January 3, 2014 Your width is set to 1024px which will not fit as your sppace is aprox = 780px line:50 % and line 136 Try changing to width="100%" <table border="0" width="100%" align="center" cellspacing="0" cellpadding="0"> and <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> Regards Joli To improve is to change; to be perfect is to change often.
tinker74 Posted January 3, 2014 Posted January 3, 2014 Siim, This should work for you....i updated it for you.... Thanks... Steven contact_us.php
Thinkie Posted January 3, 2014 Author Posted January 3, 2014 Thanks for the quick reply! Joli, changing those lines back to 100% messes up also the product category table on the left, moving it completely to the left (I left it so that you can check it out :) Steven, that gave me an error: Warning: require(includes/template_top.php) [function.require]: failed to open stream: No such file or directory in /data01/virt22332/domeenid/www.aftermarket.ee/htdocs/contact_us.php on line 54 Fatal error: require() [function.require]: Failed opening required 'includes/template_top.php' (include_path='.:/opt/zone/lib/php') in /data01/virt22332/domeenid/www.aftermarket.ee/htdocs/contact_us.php on line 54 Any ideas?
tinker74 Posted January 3, 2014 Posted January 3, 2014 try this one....took the template_top reference out as you are using an older version... contact_us.php
Thinkie Posted January 3, 2014 Author Posted January 3, 2014 Too old, I guess :) osCommerce Online Merchant v2.2 RC2a
Thinkie Posted January 3, 2014 Author Posted January 3, 2014 Hmm, that is something I tried, I think. Now it pushes everything to the left :( Refresh to see!
Thinkie Posted January 3, 2014 Author Posted January 3, 2014 I really appreciate your help! Still not working, though.
tinker74 Posted January 3, 2014 Posted January 3, 2014 Siim, Change line 15 of contact_up.php from: require(DIR_WS_LANGUAGES . $osC_Session->value('language') . '/' . FILENAME_CONTACT_US); to this: require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US);
♥joli1811 Posted January 3, 2014 Posted January 3, 2014 Really hard to say has there have been a lot mods done to the site I see you are missing the complete footer code just below <!-- body_eof //--> <!-- footer //--> <center> <table width="1024" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="43"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr valign="middle"> <td width="1" height="43"> </td> <td width="767" align="center" style="background-image:url(images/bg100.jpg) "><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr align="center" valign="middle"> <td width="210"><a href="#"><img alt="" src="images/visa.jpg" width="197" height="22" border="0"></a></td> <td><span class="HASC"><a href="http://aftermarket.ee/index.php" class="HASC">Esileht</a> | <a href="http://aftermarket.ee/shopping_cart.php" class="HASC">Ostukorv</a> | <a href="http://aftermarket.ee/account.php" class="HASC">Minu konto</a> | <a href="http://aftermarket.ee/checkout_process.php" class="HASC">Kassasse</a> | <a href="http://aftermarket.ee/contact_us.php" class="HASC">Tagasiside</a></span></td> </tr> </table></td> <td width="1"> </td> <td width="220" align="right"><span class="CR">Copyright © 2014 <a href="http://aftermarket.ee/index.php">Aftermarket Eesti</a><br>Teostus <a href="http://aaron.pri.ee" target="_blank">Aaron Design</a></span></td> <td> </td> </tr> </table></td> </tr> </table> </center> <!-- footer_eof //--> <br> </body> </html> Maybe you deleted by mistake if that does not work I can only suggest taking a page like shipping or conditions.php as a template and rebuilding your contact page using the standard page html of your shop. Maybe you are lucky and inserting the footer code back in will close the tables/ divs Regards Joli PS: just take the footer code from one of your other files as the message board here may mess up the codes the footer generally stays the same . To improve is to change; to be perfect is to change often.
Thinkie Posted January 3, 2014 Author Posted January 3, 2014 Steven, I actually tried that also. Now the box disappeared completely :) John, I will try that too, thnx.
tinker74 Posted January 3, 2014 Posted January 3, 2014 Siim, Take this file: http://aftermarket.ee/privacy.php and rename it: http://aftermarket.ee/contact_us.php see if it looks right.....then you can just add the actual contact form back in....
Thinkie Posted January 3, 2014 Author Posted January 3, 2014 Yeah, it looks right. Now I have to figure out the rest :) Thanks a lot for your help, guys!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.