Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Another Html Problem, Basics, Can't Seem To Find The Solution


Jaide

Recommended Posts

Another one of my "AH Help with HTML" problems, see:

https://www.ezdecal.com/login.php

 

The header is not stretching.. any ideas? Here is my code:

<?php
/*
$Id: login.php,v 1.2 2002/11/29 00:08:06 wilt Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2002 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_POST_VARS['action']) && ($HTTP_POST_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)) {
$HTTP_GET_VARS['login'] = 'fail';
//$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'])) {
$HTTP_GET_VARS['login'] = 'inactive';
//$error = true;
 } else {
   if (SESSION_RECREATE == 'True') { // added from original login.php
	 tep_session_recreate();		   // added from original login.php
   }								   // added from original login.php

   $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);
//  }
elseif ($HTTP_POST_VARS['action'] == 'new') {

 $email_address = 'email_address=' . tep_db_prepare_input($HTTP_POST_VARS['email_address']);
 tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT, $email_address, 'SSL'));
}

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

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_LOGIN, '', 'SSL'));
?>

<?php
// BOF: WebMakers.com Changed: Header Tag Controller v1.0
// Replaced by header_tags.php
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?> 
<?php
}
// EOF: WebMakers.com Changed: Header Tag Controller v1.0
?>

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

var submitted = false;

function check_form() {
var error = 0;
var error_message = "Errors have occured!\n\n";

if(submitted){ 
 alert( "Error"); 
 return false; 
}

var email_address = document.login.email_address.value;  
var password = document.login.password.value;



if (document.login.action[1].checked == true) {
  if (password == '') {
error_message = error_message + "Are you trying to create a new profile?\n	 - Please select the 'No, I want to create a new profile' option.\n\nDo you have an existing account?\n	 - Please enter your password to login.\n";
   error = 1;
} 
}





if (error == 1) { 
 alert(error_message); 
 return false; 
} else { 
 submitted = true; 
 return true; 
} 



}
//--></script>


<!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=480,width=420,toolbar=no,statusbar=no,scrollbars=yes").focus();
}
//--></script>
</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 //-->

<!--  Start code -->
<tr><td valign="top">
  <table border="0" cellspacing="0" cellpadding="0">
   <tr><td width="215" valign="top"><?php require(DIR_WS_INCLUDES . 'column_left.php'); ?></td>		
	   <td width="551" valign="top">
<? 
new infoBoxHeading1($info_box_contents, true, false);
?>
			<table cellpadding="0" cellspacing="0" border="0" width="100%">
				<tr><td class="sea_3">
<!-- left_navigation_eof //-->
  </table></td>
<!-- body_text //-->
 <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>
	 <td class="smallText" colspan="2"><?php echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process', 'SSL')); ?></td>
</tr>
<tr>
	 <td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?>


<?php

if (isset($HTTP_GET_VARS['login']) && ($HTTP_GET_VARS['login'] == 'inactive')) {
$info_message = TEXT_STATUS_ERROR;
}

if (isset($HTTP_GET_VARS['login']) && ($HTTP_GET_VARS['login'] == 'fail')) {
$info_message = TEXT_LOGIN_ERROR;
} elseif ($cart->count_contents()) {
$info_message = TEXT_VISITORS_CART;

}

if (isset($info_message)) {

?>
	   <?php echo $info_message; ?></td>
</tr>
<?php
}
?>
<tr>
	 <td> 
	   <table border="0" width="100%" cellspacing="0" cellpadding="2">
	 <tr>
	   <td width="75%" valign="top" align="center">

<table border="0" width="100%" cellspacing="0" cellpadding="1">
		 <tr>
		   <td valign="top">

<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="bigHeading" colspan="2" align="left"><b><?php echo TEXT_EMAIL_QUESTION; ?></b></td>
</tr>

			  <tr>
 <td colspan="2">
 <table cellpadding="3" cellspacing="0" border="0">
 <tr>
  <td class="main" align="right"><b><?php echo ENTRY_EMAIL_ADDRESS_LOGIN; ?></b></td>
				 <td class="main" align="left"><?php echo tep_draw_input_field('email_address'); ?></td>
 </tr>
 </table>
 </td>
			  </tr>

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



<tr>
 <td class="bigHeading" colspan="2" align="left"><b><?php echo TEXT_PASSWORD_QUESTION; ?></b></td>
</tr>

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

<tr>
 <td class="main" align="right"><?php echo tep_draw_radio_field('action', 'new') ?></td>
 <td class="main" align="left"><b><?php echo TEXT_NO_PASSWORD; ?></b></td>
</tr>

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

<tr>
 <td class="main" align="right"><?php echo tep_draw_radio_field('action', 'process', true) ?></td>
 <td class="main" align="left"><b><?php echo TEXT_HAS_PASSWORD; ?></b></td>
</tr>

			  <tr>
 <td class="main" colspan="1"><br></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%', '25'); ?></td>
			 </tr>

<tr>
 <td colspan="1"><br></td>
   <td align="left" valign="top"><?php echo tep_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN); ?></td>
  </tr>

			  <tr>
 <td colspan="1"><br></td>
				<td class="smallText" align="left"><br><?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>


			</table>
  </td>
		 </tr>
	   </table>
 </td>
 </form>



 <td width="25%" valign="top" class="main">
 <?php echo TEXT_SAFE_SHOPPING; ?>
 <p>
 <?php echo TEXT_SAFE_SHOPPING2; ?>
 <p>
 <?php echo TEXT_SAFE_SHOPPING3; ?>
 <p>
 <?php echo TEXT_SECURE; ?>
 </td>

 </tr>
  </table>   
</table>   
 </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'); ?>

Link to comment
Share on other sites

Ya' wanna' see if I can go two for two?

:unsure:

 

:D

 

I think I see the problem, but don't know quite how to fix it yet.

 

I'm pretty sure it's something here:

 

<?

new infoBoxHeading1($info_box_contents, true, false);

?>

But I can't see where $info_box_contents is being initialized.

 

If you want me to help, let's do this.

 

Go to the link you posted:

 

https://www.ezdecal.com/login.php

 

<right-click> and choose "View source".

 

Copy all the text into a text file and save it on your site as some HTML name (like test.html).

 

In the HTML text, search for this string:

 

<td width="551" valign="top">

 

It's only in there once.

 

Just below that line is this line:

 

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

 

Change it to this:

 

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

 

Save the edited HTML file back to your site.

 

Then go to it with your browser:

 

https://www.ezdecal.com/test.html

 

Does that fix the problem?

 

:unsure:

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