Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.


ecook78

Recommended Posts

Germ: Here is the contents of my catalog/login.php file

 

<?php

/*

$Id: login.php,v 1.80 2003/06/05 23:28:24 hpdl Exp $

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

// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled (or the session has not started)

if ($session_started == false) {

tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));

}

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGIN);

$error = false;

if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'process')) {

$email_address = tep_db_prepare_input($HTTP_POST_VARS['email_address']);

$password = tep_db_prepare_input($HTTP_POST_VARS['password']);

// Check if email exists

$check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");

if (!tep_db_num_rows($check_customer_query)) {

$error = true;

} else {

$check_customer = tep_db_fetch_array($check_customer_query);

// Check that password is good

if (!tep_validate_password($password, $check_customer['customers_password'])) {

$error = true;

} else {

if (SESSION_RECREATE == 'True') {

tep_session_recreate();

}

$check_country_query = tep_db_query("select entry_country_id, entry_zone_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$check_customer['customers_id'] . "' and address_book_id = '" . (int)$check_customer['customers_default_address_id'] . "'");

$check_country = tep_db_fetch_array($check_country_query);

$customer_id = $check_customer['customers_id'];

$customer_default_address_id = $check_customer['customers_default_address_id'];

$customer_first_name = $check_customer['customers_firstname'];

$customer_country_id = $check_country['entry_country_id'];

$customer_zone_id = $check_country['entry_zone_id'];

tep_session_register('customer_id');

tep_session_register('customer_default_address_id');

tep_session_register('customer_first_name');

tep_session_register('customer_country_id');

tep_session_register('customer_zone_id');

tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1 where customers_info_id = '" . (int)$customer_id . "'");

// restore cart contents

$cart->restore_contents();

if (sizeof($navigation->snapshot) > 0) {

$origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);

$navigation->clear_snapshot();

tep_redirect($origin_href);

} else {

tep_redirect(tep_href_link(FILENAME_DEFAULT));

}

}

}

}

if ($error == true) {

$messageStack->add('login', TEXT_LOGIN_ERROR);

}

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_LOGIN, '', '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; ?>">

<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">

<script language="javascript"><!--

function session_win() {

window.open("<?php echo tep_href_link(FILENAME_INFO_SHOPPING_CART); ?>","info_shopping_cart","height=460,width=430,toolbar=no,statusbar=no,scrollbars=yes").focus();

}

//--></script>

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<table width="856" border="0" align="center" cellpadding="0" cellspacing="0" style="background-image:url(images/background-blue.gif); background-repeat:repeat-y">

<tr>

<td><!-- header //--><?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

<!-- body //-->

<table width="800" border="0" align="center" cellpadding="12" cellspacing="0" bgcolor="#f4f4f4">

<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('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?><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_login.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('login') > 0) {

?>

<tr>

<td><?php echo $messageStack->output('login'); ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

}

if ($cart->count_contents() > 0) {

?>

<tr>

<td class="smallText"><?php echo TEXT_VISITORS_CART; ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<?php

}

?>

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr>

<td class="main" width="50%" valign="top"><b><?php echo HEADING_NEW_CUSTOMER; ?></b></td>

<td class="main" width="50%" valign="top"><b><?php echo HEADING_RETURNING_CUSTOMER; ?></b></td>

</tr>

<tr>

<td width="50%" height="100%" valign="top"><table border="0" width="100%" height="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="2">

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td class="main" valign="top"><?php echo TEXT_NEW_CUSTOMER . '<br><br>' . TEXT_NEW_CUSTOMER_INTRODUCTION; ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<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_CREATE_ACCOUNT, '', 'SSL') . '">' . 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>

</table></td>

<td width="50%" height="100%" valign="top"><table border="0" width="100%" height="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="2">

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td class="main" colspan="2"><?php echo TEXT_RETURNING_CUSTOMER; ?></td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td class="main"><b><?php echo ENTRY_EMAIL_ADDRESS; ?></b></td>

<td class="main"><?php echo tep_draw_input_field('email_address'); ?></td>

</tr>

<tr>

<td class="main"><b><?php echo ENTRY_PASSWORD; ?></b></td>

<td class="main"><?php echo tep_draw_password_field('password'); ?></td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td class="smallText" colspan="2"><?php echo '<a href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . TEXT_PASSWORD_FORGOTTEN . '</a>'; ?></td>

</tr>

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td colspan="2"><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_login.gif', IMAGE_BUTTON_LOGIN); ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

<?php

// PWA BOF

if (defined('PURCHASE_WITHOUT_ACCOUNT') && (PURCHASE_WITHOUT_ACCOUNT == 'ja' || PURCHASE_WITHOUT_ACCOUNT == 'yes')) {

?>

<tr>

<td colspan="2" width="100%"><table border="0" width="100%" height="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" height="100%" cellspacing="0" cellpadding="2">

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td class="main"><?php echo TEXT_GUEST_INTRODUCTION; ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<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_CREATE_ACCOUNT, 'guest=guest', 'SSL') . '">' . tep_image_button('button_checkout.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>

</table></td>

</tr>

<?php

}

// PWA EOF

?>

</table></td>

</tr>

</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 //--></td>

</tr>

</table>

<br>

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Link to comment
Share on other sites

Can you tell me what file this is in?

 

And you're getting "unsecure content" because of this in the code:

 

<td height="24" style="background-image:url('http://ecook78.sc47.info/catalog/images/nav-background.gif');">

 

 

It needs to be:

 

<td height="24" style="background-image:url('images/nav-background.gif');">

Link to comment
Share on other sites

I've been pondering why it isn't already working.

 

In the file /catalog/includes/functions/html_output.php can you post the code for the function tep_href_link()

 

I don't want the code from the whole file, just that one function please.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

I've been pondering why it isn't already working.

 

In the file /catalog/includes/functions/html_output.php can you post the code for the function tep_href_link()

 

I don't want the code from the whole file, just that one function please.

The HTML href link wrapper function

function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {

global $request_type, $session_started, $SID;

if (!tep_not_null($page)) {

die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>');

}

if ($connection == 'NONSSL') {

$link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;

} elseif ($connection == 'SSL') {

if (ENABLE_SSL == true) {

$link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;

} else {

$link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;

}

} else {

die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>');

}

if (tep_not_null($parameters)) {

$link .= $page . '?' . tep_output_string($parameters);

$separator = '&';

} else {

$link .= $page;

$separator = '?';

}

while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined

if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {

if (tep_not_null($SID)) {

$_sid = $SID;

} elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {

if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) {

$_sid = tep_session_name() . '=' . tep_session_id();

}

}

}

if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) {

while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);

$link = str_replace('?', '/', $link);

$link = str_replace('&', '/', $link);

$link = str_replace('=', '/', $link);

$separator = '?';

}

if (isset($_sid)) {

$link .= $separator . tep_output_string($_sid);

}

return $link;

}

////

Link to comment
Share on other sites

This code::

 

	 if (ENABLE_SSL == true) {
   $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;

 

Needs to be:

 

	 if (ENABLE_SSL == true) {
   $link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Germ: You are a genius! That fixed it. I promise to name my first born child Germ in your honor. I need to fix the unsecure images and content for the ssl part of the site. You mentioned

<td height="24" style="background-image:url('http://ecook78.sc47.info/catalog/images/nav-background.gif');">

needs to be:

 

<td height="24" style="background-image:url('images/nav-background.gif');">

Is the http://ecook78.sc47.info coming in dynamically where I can change a define or is it an absolute reference that I need to go line by line and remove?

Link to comment
Share on other sites

Here is my header checkout file . In looking at the images links I think it is written the way you have suggested. <td height="24" style="background-image:url('images/nav-background.gif');"><

 

<?php

/*

$Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

Copyright © 2003 osCommerce

Released under the GNU General Public License

*/

// check if the 'install' directory exists, and warn of its existence

if (WARN_INSTALL_EXISTENCE == 'true') {

if (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/install')) {

$messageStack->add('header', WARNING_INSTALL_DIRECTORY_EXISTS, 'warning');

}

}

// check if the configure.php file is writeable

if (WARN_CONFIG_WRITEABLE == 'true') {

if ( (file_exists(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) && (is_writeable(dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/includes/configure.php')) ) {

$messageStack->add('header', WARNING_CONFIG_FILE_WRITEABLE, 'warning');

}

}

// check if the session folder is writeable

if (WARN_SESSION_DIRECTORY_NOT_WRITEABLE == 'true') {

if (STORE_SESSIONS == '') {

if (!is_dir(tep_session_save_path())) {

$messageStack->add('header', WARNING_SESSION_DIRECTORY_NON_EXISTENT, 'warning');

} elseif (!is_writeable(tep_session_save_path())) {

$messageStack->add('header', WARNING_SESSION_DIRECTORY_NOT_WRITEABLE, 'warning');

}

}

}

// check session.auto_start is disabled

if ( (function_exists('ini_get')) && (WARN_SESSION_AUTO_START == 'true') ) {

if (ini_get('session.auto_start') == '1') {

$messageStack->add('header', WARNING_SESSION_AUTO_START, 'warning');

}

}

if ( (WARN_DOWNLOAD_DIRECTORY_NOT_READABLE == 'true') && (DOWNLOAD_ENABLED == 'true') ) {

if (!is_dir(DIR_FS_DOWNLOAD)) {

$messageStack->add('header', WARNING_DOWNLOAD_DIRECTORY_NON_EXISTENT, 'warning');

}

}

if ($messageStack->size('header') > 0) {

echo $messageStack->output('header');

}

?>

<table width="856" border="0" align="center" cellpadding="0" cellspacing="0">

<tr valign="top">

<td height="96"><img src="images/lds-logo-left.jpg" width="28" height="86"> <?php //echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) . '</a> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . tep_image(DIR_WS_IMAGES . 'header_cart.gif', HEADER_TITLE_CART_CONTENTS) . '</a> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image(DIR_WS_IMAGES . 'header_checkout.gif', HEADER_TITLE_CHECKOUT) . '</a>'; ?></td>

<td width="800"><div style="float:left; width:225px"><img src="images/lds-logo-right.jpg" width="221" height="86"></div>

<div style="float:right; text-align:right; margin-top:40px; width:500px; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; padding:0; margin-right:10px; color:#FFFFFF" ><a href="<?php echo tep_href_link(FILENAME_LOGIN); ?>" class="headerNavigation">Login</a> | <a href="<?php echo tep_href_link(FILENAME_CREATE_ACCOUNT); ?>" style="color:#FFFFFF; text-decoration:none">Create Account</a> | <?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> | <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> | <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> | <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a></div></td>

<td valign="middle"><img src="images/shim.gif" width="28" height="1"></td>

</tr>

<tr height="10">

<td ></td>

<td bgcolor="#ABA16E"></td>

<td></td>

</tr>

<tr height="86">

<td> </td>

<td><img src="images/church-header.jpg" width="800" height="150"></td>

<td> </td>

</tr>

<tr>

<td height="24"></td>

<td height="24" style="background-image:url('images/nav-background.gif');"><div style="color:#FFFFFF; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:9px; margin-left:10px; padding:0"><a href="<?php echo tep_href_link(FILENAME_DEFAULT); ?>" class="headerNav2">HOME</a> | <a href="<?php echo tep_href_link(FILENAME_ABOUT_US); ?>" class="headerNav2">ABOUT US</a> | <a href="<?php echo tep_href_link(FILENAME_PRODUCTS_NEW); ?>" class="headerNav2">SHOP</a> | <a href="<?php echo tep_href_link(FILENAME_SPECIALS); ?>" class="headerNav2">SPECIALS</a> | <a href="<?php echo tep_href_link(FILENAME_CONTACT_US); ?>" class="headerNav2">CONTACT US</a> | <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING); ?>" class="headerNav2" style="color:#ABA16E">CHECKOUT</a></div></td>

<td height="24"> </td>

</tr>

</table>

<!--<table border="0" width="100%" cellspacing="0" cellpadding="1">

<tr class="headerNavigation">

<td class="headerNavigation"> <?php //echo $breadcrumb->trail(' » '); ?></td>

<td align="right" class="headerNavigation"><?php if (tep_session_is_registered('customer_id')) { ?><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a> | <?php } ?><a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> | <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a> | <a href="<?php echo tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_CHECKOUT; ?></a> </td>

</tr>

</table>-->

<?php

if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr class="headerError">

<td class="headerError"><?php echo htmlspecialchars(urldecode($HTTP_GET_VARS['error_message'])); ?></td>

</tr>

</table>

<?php

}

if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {

?>

<!--<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr class="headerInfo">

<td class="headerInfo"><?php echo htmlspecialchars($HTTP_GET_VARS['info_message']); ?></td>

</tr>

</table>-->

<?php

}

?>

Link to comment
Share on other sites

You've changed something you shouldn't have and the SSL isn't wokring correctly.

 

In /catalog/includes/application_top.php replace this code:

 

  $request_type = ($_SERVER['HTTPS'] == 1) ? 'SSL' : 'NONSSL';


With this code:

 

  $request_type = ($_SERVER['HTTPS'] == 'on') ? 'SSL' : 'NONSSL';

[

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

I do have another issue. My contact_us.php page email form doesn't actually send an email to anyone. Once I click submit on the page it just redirects to a white screen. I have seen the code that should say something like "your email was sent succesfully".

Link to comment
Share on other sites

If you post the contents of your /catalog/contact_us.php and /catalog/includes/languages/english/contact_us.php we should be able to get it to display the "Your enquiry has been successfully sent to the Store Owner." message.

 

PCI compliance is a process you have to go thru that costs thousands of dollars. If you were compliant you would know.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Here is the catalog/configure.php file:

<?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 © 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']);

$name = tep_db_prepare_input($HTTP_POST_VARS['first_name'])." ".tep_db_prepare_input($HTTP_POST_VARS['last_name']);

$email_address = tep_db_prepare_input($HTTP_POST_VARS['email']);

//$enquiry = tep_db_prepare_input($HTTP_POST_VARS['enquiry']);

$message = tep_db_prepare_input($HTTP_POST_VARS['first_name'])." ".tep_db_prepare_input($HTTP_POST_VARS['last_name'])."\n\n";

$message .= tep_db_prepare_input($HTTP_POST_VARS['address'])."\n";

$message .= tep_db_prepare_input($HTTP_POST_VARS['city'])."\n";

$message .= tep_db_prepare_input($HTTP_POST_VARS['state_cd'])."\n";

$message .= tep_db_prepare_input($HTTP_POST_VARS['zip_cd'])."\n\n";

$message .= tep_db_prepare_input($HTTP_POST_VARS['email_address'])."\n";

$message .= tep_db_prepare_input($HTTP_POST_VARS['phone_no'])."\n";

$message .= tep_db_prepare_input($HTTP_POST_VARS['enquiry'])."\n";

if (tep_validate_email($email_address)) {

tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, $message, $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">

<table width="856" border="0" align="center" cellpadding="0" cellspacing="0" style="background-image:url(images/background-blue.gif); background-repeat:repeat-y">

<tr>

<td><!-- header //--><?php require(DIR_WS_INCLUDES . 'header_contact.php'); ?>

<!-- header_eof //-->

<!-- body //-->

<table width="800" border="0" align="center" cellpadding="9" cellspacing="3" bgcolor="#F4F4F4">

<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"> </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="0" 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="0" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

<td><table border="0" width="100%" cellspacing="0" cellpadding="5">

<tr>

<td colspan="2" class="main"><?php echo STORE_OWNER; ?><br /><?php echo nl2br(STORE_NAME_ADDRESS);; ?><br /><a href=" </tr>

<tr>

<td class="main"><div align="right"><?php echo ENTRY_FIRST_NAME; ?></div></td>

 

<td class="main"><?php echo tep_draw_input_field('first_name','','style="width:200px"'); ?>*</td>

</tr>

<tr>

<td class="main"><div align="right"><?php echo ENTRY_LAST_NAME; ?></div></td>

 

<td class="main"><?php echo tep_draw_input_field('last_name','','style="width:200px"'); ?>*</td>

</tr>

<tr valign="top">

<td class="main"><div align="right"><?php echo ENTRY_ADDRESS; ?></div></td>

 

<td class="main"><?php //echo tep_draw_textarea_field('address', 'soft', 10, 2); ?>

<textarea name="address" id="address" style="width:200px" rows="5"></textarea></td>

</tr>

<tr>

<td class="main"><div align="right"><?php echo ENTRY_CITY; ?></div></td>

 

<td class="main"><?php echo tep_draw_input_field('city','','style="width:200px"'); ?></td>

</tr>

<tr>

<td class="main"><div align="right"><?php echo ENTRY_STATE_CD; ?></div></td>

 

<td class="main"><?php echo tep_draw_input_field('state_cd','','style="width:200px"'); ?></td>

</tr>

<tr>

<td class="main"><div align="right"><?php echo ENTRY_ZIP_CD; ?></div></td>

 

<td class="main"><?php echo tep_draw_input_field('zip_cd','','style="width:200px"'); ?>*</td>

</tr>

<tr>

<td class="main"><div align="right"><?php echo ENTRY_EMAIL; ?></div></td>

 

<td class="main"><?php echo tep_draw_input_field('email','','style="width:200px"'); ?>*</td>

</tr>

<tr>

<td class="main"><div align="right"><?php echo ENTRY_PHONE_NO; ?></div></td>

 

<td class="main"><?php echo tep_draw_input_field('phone_no','','style="width:200px"'); ?>*</td>

</tr>

<tr valign="top">

<td class="main"><div align="right"><?php echo ENTRY_ENQUIRY; ?></div></td>

 

<td><textarea name="enquiry" id="enquiry" style="width:200px" rows="5"></textarea><?php //echo tep_draw_textarea_field('enquiry', 'soft', 10, 5); ?></td>

</tr>

<tr valign="top">

<td class="main"> </td>

<td><?php echo tep_image_submit('submit.gif', IMAGE_BUTTON_CONTINUE); ?></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="100%" cellspacing="0" 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"> </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 //--></td>

</tr>

</table>

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Here is the includes/languages/english/contact_us.php

 

<?php

/*

$Id: contact_us.php,v 1.7 2002/11/19 01:48:08 dgw_ Exp $

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

Copyright © 2002 osCommerce

Released under the GNU General Public License

*/

define('HEADING_TITLE', 'LDS Church Gifts - Contact Us');

define('NAVBAR_TITLE', 'Contact Us');

define('TEXT_SUCCESS', 'Your enquiry has been successfully sent to the LDS Church Gifts Staff.');

define('EMAIL_SUBJECT', 'Comments from ' . STORE_NAME);

define('ENTRY_NAME', 'Full Name');

define('ENTRY_FIRST_NAME', 'First Name');

define('ENTRY_LAST_NAME', 'Last Name');

define('ENTRY_ADDRESS', 'Address');

define('ENTRY_CITY', 'City');

define('ENTRY_STATE_CD', 'State');

define('ENTRY_ZIP_CD', 'Zip Code');

define('ENTRY_PHONE_NO', 'Phone');

define('ENTRY_EMAIL', 'E-Mail');

define('ENTRY_ENQUIRY', 'Comments');

?>

Link to comment
Share on other sites

Change this code :

 

<?php //echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE, '0', '0', 'align="left"') . TEXT_SUCCESS; ?>

 

To this:

 

<?php
//  echo tep_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE, '0', '0', 'align="left"');
 echo TEXT_SUCCESS;
?>

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

  • 3 weeks later...

Germ: I made the change you suggested and it says your email enquiry has been successfully sent to the LDSChurch Gifts Staff, however the email doesn't actually make it into my email. Where is the actually email address referenced? I think I may have the wrong email.

Thanks,

-Eric

Link to comment
Share on other sites

Under "Configuration" (I think) in the Admin it uses the store owners address listed there.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

I have the correct address in the configuration in the Admin. ANy other ideas on why I wouldn't be receiving emails from the contact form. I have tested the email and am able to receive emails. Also, Where do I copy and paste the code provided by Authorize.net to show their verified seal?

 

<!-- © 2005, 2012. Authorize.Net is a registered trademark of CyberSource Corporation --> <div class="AuthorizeNetSeal"> <script type="text/javascript" language="javascript">var ANS_customer_id="*******************************************";</script> <script type="text/javascript" language="javascript" src="//verify.authorize.net/anetseal/seal.js" ></script> <a href="http://www.authorize.net/" id="AuthorizeNetText" target="_blank">Online Payments</a> </div>

Link to comment
Share on other sites

  • 2 weeks later...

Be sure the admin email address is like this:

 

admin@your_domain.com

 

This format might not work:

 

<admin>admin@your_domain.com

 

Beyond that I really haven't debugged email problems.

 

Adding content "sequentially" to the left (or right) column is pretty straight forward.

 

At the end of /catalog/includes/column_left.php (or column_right.php) after the closing php tag, add your code like this:

 

<tr><td align="center">

******** DELETE THIS LINE AND PUT THE HTML FOR CONTENT HERE  ********

</td></tr>

<tr><td align="center">

******** DELETE THIS LINE AND PUT THE HTML FOR CONTENT HERE  ********

</td></tr>

<tr><td align="center">

******** DELETE THIS LINE AND PUT THE HTML FOR CONTENT  ********

</td></tr>

And so on....

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...