Results 1 to 7 of 7

I erased contact_us.php!

This is a discussion on I erased contact_us.php! within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Please help me anyone! could someone send me the code for contact_us.php? I tried to edit mine, and now its ...

      
  1. #1
    New Member
    Join Date
    Jun 2004
    Posts
    12
    Rep Power
    0


    Default I erased contact_us.php!

    Please help me anyone! could someone send me the code for contact_us.php? I tried to edit mine, and now its disappeared! Only a blank page! I dont know what happened. I backed up only half my files- i thought I had them all- Please someone send me the code so I can paste it back into my file! THANK YOU!

  2. #2
    Active Member
    Join Date
    May 2004
    Location
    somewhere above colchester uk
    Posts
    147
    Rep Power
    0


    Default

    <?php
    /*
    $Id: contact_us.php,v 1.42 2003/06/12 12:17:07 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');

    require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CONTACT_US);
    $page_query = tep_db_query("select pages_id, pages_title, pages_html_text, status from " . TABLE_PAGES . " where pages_title = 'Contact Us'");
    $page_check = tep_db_fetch_array($page_query);

    $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));

    $content = CONTENT_CONTACT_US;

    require(DIR_WS_TEMPLATES . TEMPLATENAME_MAIN_PAGE);

    require(DIR_WS_INCLUDES . 'application_bottom.php');
    ?>
    Google says be nice!

  3. #3
    New Member
    Join Date
    Jun 2004
    Posts
    12
    Rep Power
    0


    Default

    This code does not work for me, I get these errors:
    --------------------------------------------------------------------------------
    Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/baby/public_html/osCommerce/contact_us.php:3) in /home/baby/public_html/osCommerce/includes/functions/sessions.php on line 67

    Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/baby/public_html/osCommerce/contact_us.php:3) in /home/baby/public_html/osCommerce/includes/functions/sessions.php on line 67
    1146 - Table 'baby_osc1.TABLE_PAGES' doesn't exist

    select pages_id, pages_title, pages_html_text, status from TABLE_PAGES where pages_title = 'Contact Us'

    [TEP STOP]
    ---------------------------------------------------------------------

    What does this mean? Anybody know?

  4. #4
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,688
    Rep Power
    22


    Default

    It more than likely means you have a space or blank line after the last '?>' or before the first '<?php'
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

  5. #5
    New Member
    Join Date
    Jun 2004
    Posts
    12
    Rep Power
    0


    Default

    Sorry about the cross posting-
    I cant believe all those errors were caused by a few spaces-
    BUT there is still one more left:
    -----------------------------------------------------------------
    1146 - Table 'baby_osc1.TABLE_PAGES' doesn't exist

    select pages_id, pages_title, pages_html_text, status from TABLE_PAGES where pages_title = 'Contact Us'

    [TEP STOP]
    ------------------------------------------------------------------------

    Its really the first line I dont understand. It must be being generated by the code right underneath it, but I cant put two and two together here- this is my first experience working with php-
    Any thoughts?

  6. #6
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,688
    Rep Power
    22


    Default

    Sounds like your site is not totally installed properly. Try RE-UPLOADING all files (except configure.php files).

    and/or

    re-do the install part and re-import your Database (make sure you clear it out first or use a new BLANK database).
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

  7. #7
    New Member
    Join Date
    Jun 2004
    Posts
    12
    Rep Power
    0


    Default

    I got is working, Thanks!

Similar Threads

  1. Spam flaw in stock contact_us.php
    By neil in forum osCmax v2 Customization/Mods
    Replies: 0
    Last Post: 09-14-2005, 06:57 PM
  2. Add checkboxes to contact_us.php
    By nelsonlo in forum osCmax v1.7 Discussion
    Replies: 0
    Last Post: 06-23-2004, 05:14 PM
  3. editing contact_us
    By frobscottle in forum osCommerce 2.2 Modification Help
    Replies: 3
    Last Post: 01-26-2004, 09:14 AM
  4. Adding new text fields to Contact_Us page
    By mac in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 05-03-2003, 07:20 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •