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

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

			

<?php abs_inc_panel('main1'); ?>



<br>



<script language="javascript" type="text/javascript">

<!--

function abs_reminder() {

	alert('Sending PIN reminder');

	document.ch_login.ActionOverride.value = 'Reminder';

	tst_submit_form(document.ch_login);

}

// -->

</script>



<form name="ch_login" method="post" action="http://my.dmclub.net/dmclub_R24S1/LoginAction.cfm" target="_blank">

<input type="hidden" name="ActionOverride" value="">

<div style="width: 100%; margin: 5px 0px; clear: both;">

	<div style="width: 15%; text-align: right; float: left; margin: 3px 0px; padding: 4px 10px 0px 0px;">Login ID</div>

	<div style="margin: 3px 0px; float: left;"><input type="text" name="LoginID" size="30"></div>

	<div style="margin: 3px 0px; padding: 4px 0px 4px 10px;">&nbsp;e.g. s.smee@email.com</div>

</div>

<div style="width: 100%; margin: 5px 0px; clear: both;">

	<div style="width: 15%; text-align: right; float: left; margin: 3px 0px; padding: 4px 10px 0px 0px;">PIN</div>

	<div style="margin: 3px 0px; float: left;"><input type="password" name="Password" size="4"></div>

	<div style="margin: 3px 0px; padding: 4px 0px 4px 10px">&nbsp;<span style="white-space: pre;">e.g. 2345     <a href="" onclick='abs_reminder(); return false;'>Send me a reminder</a></span></div>

</div>

<div style="width: 100%; margin: 5px 0px; clear: both;">

	<div style="width: 15%; text-align: right; float: left; margin: 3px 0px; padding: 4px 10px 0px 0px;"></div>

	<div style="margin: 3px 0px;"><input type="submit" name="Action" value="Login"></div>

</div>

</form>



<br clear="all">



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

		<!-- END MAIN COLUMN -->

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

		</div>

		

		<div class="sidebar">

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

		<!-- SIDEBAR -->

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

			

<?php

// Put trolley on page if it is not empty

if (isset($dmx_init_response['QntItems']) && $dmx_init_response['QntItems'] || isset($dmx_init_response['QntOSOrders']) && $dmx_init_response['QntOSOrders'])  {

	echo '<!-- fred is a compact trolley, with header, border and options turned off -->';

	$xparams['variant'] = 'compact';

	$xparams['showheader'] = 0;

	$xparams['showborder'] = 0;

	$xparams['showoptions'] = 0;

	$xparams['showicons'] = 0;

	$xparams['showactions'] = 0;

	$xparams['result_login'] = $abs_root . '/numbers/0800/login.php';

	$xparams['result_trolleyclicked'] = $abs_root . '/numbers/0800/checkout.php';

	$xparams['result_typinv'] = $abs_root . '/numbers/typical_invoice.php';

	$xparams['result_configure'] = $abs_root . '/numbers/0800/svc_plan.php';

	$xparams['headerurl'] = 'http://' . $_SERVER['SERVER_NAME'] . $abs_root . '/common/header_export\.php';

	$xparams['div_typinv'] 	= 'typinv_ajax_target'; // ID of DIV to load typical invoice in, if using ajax

	$xparams['hook_typinv'] = 'abs_show_typinv'; // The name of the function to execute before loading the typical invoice

	dmx_render('dmshop.trolley', 'Fredy', $xparams);

	echo '<p><br></p>';

}

?>



<!-- SIDEBAR BOX -->

<?php abs_inc_fragment('sb_real_time_controls'); ?>

<!-- END SIDEBAR BOX -->

				

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

		<!-- END SIDEBAR -->

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

		</div>

		

	</div>

</div>

<!-- END MAIN CONTENT AREA -->



<?php include($abs_typinv); ?>



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

