<?php


// Check to ensure this file is included in Freeway!
defined('_FEXEC') or die();
echo tep_draw_form('login', tep_href_link(FILENAME_LOGIN, 'action=process&' . tep_get_all_get_params(array("action")) , 'SSL')); ?>
<table border="0" width="100%" cellspacing="0" cellpadding="<?php echo CELLPADDING_SUB; ?>">
<?php
	if (isset($HTTP_GET_VARS["trial"])){
		$heading_title=HEADING_TITLE_TRIAL;
	} else {
		$heading_title=HEADING_TITLE;
	}
// BOF: Lango Added for template MOD
if (SHOW_HEADING_TITLE_ORIGINAL == 'yes') {
$header_text = '&nbsp;'
//EOF: Lango Added for template MOD
?>
      <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>
<?php
// BOF: Lango Added for template MOD
}else{
$header_text = $heading_title;
}
// EOF: Lango Added for template MOD

if(!isset($hide_row_top)) {
?>
  		<tr>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '10'); ?></td>
		</tr>    
<?php
}
// BOF: Lango Added for template MOD
if (MAIN_TABLE_BORDER == 'yes'){


$info_box_contents = array();
$info_box_contents[] = array('align' => 'left',
                               'text' => '&nbsp;&nbsp; ' .$header_text. ''); 

// new infoBoxHeading($info_box_contents, $left, $left);
table_image_border_top(false, false, $header_text);
}

// EOF: Lango Added for template MOD
?>
		<tr> <td class="infoBoxHeadingPage"></td> </tr>
		<tr>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '10'); ?></td>
		</tr> 
<?php
//print_r ($messageStack);
  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
 }
?>
<?php  if (isset($HTTP_GET_VARS["trial"])) { ?>
			<tr>
			<td class="main">
				<?php echo '<font color="#ff0000"><b>' . TEXT_NOTE .'</b></font><br>' . TEXT_NOTE_INFO; ?>
			</td>
			</tr>
			<tr>
				<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
			</tr>
			<?php  } ?>
			  <tr>
				<td nowrap="nowrap">
				<table border="0" width="98%" cellspacing="5" cellpadding="2">
		  	<?php if (!isset($HTTP_GET_VARS["R"])){ ?>
					<td width="50%" height="100%" valign="top" nowrap="nowrap">
					<table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0" class="contentBoxRound">
						<tr>
							<td class="contentBackCol1" width="5"></td>	 
							<td class="contentBackCol2">
							<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" width="50%" valign="top"><b><?php echo HEADING_NEW_CUSTOMER; ?></b></td>
								</tr>
								<tr>
									<td class="main" valign="top"><?php echo TEXT_NEW_CUSTOMER . '<br><br>';  
														echo TEXT_NEW_CUSTOMER_INTRODUCTION; ?>
									</td>
								</tr>
								<tr>
									<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
								</tr>
							   <tr>
			                       <td align="left"><?php echo '<a href="' . tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL') . '">' . tep_template_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
							</tr>	
							<tr>
								<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '1'); ?></td>
							</tr>
                		</table>
						</td>
						<td class="contentBackCol3" width="5"></td>	
              		</tr>
	            </table>
				</td>
		<?php } ?>
			<td height="100%"></td>
            <td height="100%" valign="top" nowrap="nowrap">
			<table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0"class="contentBoxRound">
				<tr>
					<td class="contentBackCol1" width="5"></td>	
	                <td class="contentBackCol2" nowrap="nowrap">
					<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" width="50%" valign="top" colspan="2"><b><?php  echo HEADING_RETURNING_CUSTOMER; ?></b></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" width="130"><b><?php echo (ACCOUNT_USERNAME=="true"?ENTRY_USERNAME:ENTRY_EMAIL_ADDRESS); ?></b></td>
							<td class="main"><?php echo '&nbsp;' .tep_draw_input_field('email_address'); ?></td>
						</tr>
						<tr>
							<td class="main" width="130"><b><?php echo ENTRY_PASSWORD; ?></b></td>
							<td class="main"><?php echo '&nbsp;' .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 width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
							<td align="right"><?php echo tep_template_image_submit('button_login.gif', IMAGE_BUTTON_LOGIN) .'&nbsp;&nbsp;'; ?></td>
						</tr>
						<tr>
							<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '1'); ?></td>
						</tr>
					</table>
					</td>
					<td class="contentBackCol3" width="5"></td>
              </tr>
            </table>
			</td> 
		</tr>
		</table>
		</td>
		</tr>
<?php
// BOF: Lango Added for template MOD
if (MAIN_TABLE_BORDER == 'yes'){
	table_image_border_bottom();
}
// EOF: Lango Added for template MOD
?>
</table></form>

