<?php 

// Check to ensure this file is included in Freeway!
defined('_FEXEC') or die();
?>
<table border="0" width="100%" cellspacing="0" cellpadding="<?php echo CELLPADDING_SUB; ?>">
	<?php
	// 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 if ($action=='withdraw') echo HEADING_SUCCESS; else echo HEADING_TITLE; ?></td>
					<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_history.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><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	</tr>
	<?php
		}
	// BOF: Lango Added for template MOD
	if (MAIN_TABLE_BORDER == 'yes'){
	table_image_border_top(false, false, $header_text);
	}
	// EOF: Lango Added for template MOD
	?>
	<tr>
	<?php if ($action=='withdraw') { ?>
			<td>
				<table border="0" width="100%" cellspacing="1" cellpadding="2">
					<tr>
						<td class="main"><?php echo TEXT_WITHDRAW_RESULT; ?>
					</tr>
	<?php } else { ?>
			<td>
				<table border="0" width=100% cellspacing="1" cellpadding="2" class="infoBox">	  
					<tr class="infoBoxContents">
						<td>
							<table border="0" cellspacing="0" cellpadding="4" align=center>
								<tr>
									<td class="tableHeading"><?php echo TEXT_EVENT_NAME; ?></td><td class="main"><?php echo $reservation_result['name']; ?></td>
								</tr>
								<tr>
									<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
								</tr>
								<tr>
									<td class="tableHeading"><?php echo TEXT_RESERVATION_DATE; ?></td><td class="main"><?php echo $reservation_result['reserve_dates']; ?></td>
								</tr>
								<tr>
									<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
								</tr>
								<tr>
									<td class="tableHeading"><?php echo TEXT_INSTRUCTOR; ?></td><td class="main"><?php echo tep_get_instructor_name($reservation_result['instructor']); ?></td>
								</tr>
								<tr>
									<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
								</tr>
								<tr>
									<td class="tableHeading"><?php echo TEXT_AMOUNT; ?></td><td class="main"><?php echo $currencies->display_price($reservation_result['amount'],$reservation_result['tax']); ?></td>
								</tr>
								<tr>
									<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
								</tr>
								<tr>
									<td class="tableHeading"><?php echo TEXT_START_TIME; ?></td><td class="main"><?php echo $reservation_result['start_time']; ?></td>
								</tr>
								<tr>
									<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
								</tr>
								<tr>
									<td class="tableHeading"><?php echo TEXT_END_TIME; ?></td><td class="main"><?php echo $reservation_result['end_time']; ?></td>
								</tr>
							<td>
						</tr>
					</table>
		<?php } ?>
        </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="1" cellpadding="2" class="infoBox">
				<tr class="infoBoxContents">
					<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
						<tr>
							<?php 
								if ($action!='withdraw') { 
									echo tep_draw_form('withdraw_confirm',tep_href_link(FILENAME_WITHDRAW_RESERVATIONS,'action=withdraw','SSL'));
									echo '<input type=hidden name="events_id" value="' . tep_output_string($HTTP_POST_VARS["events_id"]) . '">';
									echo '<input type=hidden name="orders_id" value="' . tep_db_output_string($HTTP_POST_VARS["orders_id"]) . '">';
									for ($icnt=0;$icnt<sizeof($orders_products_id);$icnt++){
										echo '<input type=hidden name="orders_products_id[]" value="' . $orders_products_id[$icnt] . '">';
									}
									echo '<td align="left" class="main">' . '<a href="' . tep_href_link(FILENAME_ACCOUNT_RESERVATIONS, tep_get_all_get_params(array('order_id','events_id')), 'SSL') . '">' . tep_template_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a></td>';
									echo '<td align="right" class="main">' . tep_template_image_submit('button_withdraw_reservation.gif', SMALL_IMAGE_BUTTON_WITHDRAW) . '</td>';
									echo '</form>';
								
							 	} else { 
							?>
								<td align="center" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_WITHDRAW_RESERVATIONS, tep_get_all_get_params(). '&action=withdraw', 'SSL') . '">' . tep_template_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
							<?php } ?>
              			</tr>
            			</table>
					</td>
          		</tr>
        	</table>
		</td>
	</tr>
	<?php if (MAIN_TABLE_BORDER == 'yes'){
	table_image_border_bottom(false, false, $header_text);
	} ?>
</table>