<?php

// Call in the XComponents engine and options file

define('MOD_PHP', substr(PHP_SAPI, 0, 3) != 'cgi'); // Are we running as mod_php?

define('DOCROOT', 

	MOD_PHP && isset($_SERVER['DOCUMENT_ROOT']) ? 

		$_SERVER['DOCUMENT_ROOT'] : 

		(

			MOD_PHP && isset($_SERVER['SCRIPT_FILENAME']) ? 

				substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])) : 

				(

					substr(str_repeat('../', count(explode('/', preg_replace('_/+_', '/', $_SERVER['PHP_SELF'])))-2), 0, -1) != '' ?

						substr(str_repeat('../', count(explode('/', preg_replace('_/+_', '/', $_SERVER['PHP_SELF'])))-2), 0, -1) :

						'.'

				)

		)

	);

include(DOCROOT . '/dmx/dmx_options.php');

include(DOCROOT . '/dmx/core/php/dmx_shop_handler.php');

include(DOCROOT . '/dmx/core/php/dmx_shop_components.php');



// Abs code starts here

$abs_root = '';

@include(DOCROOT . '/abs_version_control.php');

include(DOCROOT . $abs_root . '/common/header.php');

?>



<!-- MAIN CONTENT AREA -->

<div id="main_area" onmouseover="sub_menu_hide();">

	<div id="main_area_content">

		

		<div class="main_column">

		<!-- ----------------- -->

		<!-- BEGIN MAIN COLUMN -->

		<!-- ----------------- -->

			

<h1 class="developer_highlight">checkout.php demo</h1>



<pre>

// USES (Page Environment variables)

// None

//

// EXPECTS

// No additional variables

</pre>



<?php if (!(isset($_REQUEST['abs_display']) && $_REQUEST['abs_display'])) : ?>

<form method="get">

<input name="abs_display" type="hidden" value="1"> 

<table>

<tr>

	<td style="text-align: right;"></td>

	<td><input type="submit" value="Show Adapting Body"></td>

</tr>

</table>

</form>

<?php endif; ?>





		<!-- --------------- -->

		<!-- END MAIN COLUMN -->

		<!-- --------------- -->

		</div>

		

		<div class="sidebar">

		<!-- ------- -->

		<!-- SIDEBAR -->

		<!-- ------- -->



<div class="sidebar_box_heading">

	<h2>Controls</h2>

</div>

<div class="sidebar_box_content">

	<div>



		<br>



		<p>

		<a href="<?=$_SERVER['PHP_SELF'];?>">Restart test</a>

		</p>

		

		<p>

		<a href="index.php">Adapting body index page</a>

		</p>

				

	</div>

</div>



		<!-- ----------- -->

		<!-- END SIDEBAR -->

		<!-- ----------- -->

		</div>

		

		<br style="clear: both;">



<?php

if (isset($_REQUEST['abs_display']) && $_REQUEST['abs_display']) {

	// Prepare variables for adapting body based on test harness input

}

?>



<?php if (isset($_REQUEST['abs_display']) && $_REQUEST['abs_display']) : ?>

<h2 class="developer_highlight">Test values</h2>



This adapting body takes no test values.



<h2 class="developer_highlight">Output</h2>

	

<?php include($abs_adapt_body . 'checkout.php'); ?>



<?php endif; ?>



	</div>

</div>

<!-- END MAIN CONTENT AREA -->



<?php include(DOCROOT . $abs_root . '/common/footer.php'); ?>

