<?php

// register.php
// common fragment for pages displaying the 'dmShop.Register' XComponent
//
// USES (Page Environment variables)
// $abs_subject['range'], which contains the 'number range' that the page is about
//
// EXPECTS
// $abs_xparams['result_register'], URL to go to when the component
// generates a login result

?>
		
		<div class="main_column">
		<!-- ----------------- -->
		<!-- BEGIN MAIN COLUMN -->
		<!-- ----------------- -->
			
<?php abs_inc_fragment('register'); ?>

<!-- Reggie is a Register Component -->
<?php
unset($xparams);
$xparams['showheader'] = 0;
$xparams['showborder'] = 0;
$xparams['showpreamble'] = 1;
$xparams['result_register'] = $abs_convpath . '/checkout.php';
dmx_render('dmshop.register', 'reggie', $xparams);
?>

		<!-- --------------- -->
		<!-- 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_convpath . '/login.php';
	$xparams['result_trolleyclicked'] = $abs_convpath . '/checkout.php';
	$xparams['result_typinv'] = $abs_root . '/numbers/typical_invoice.php';
	$xparams['result_configure'] = $abs_convpath . '/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_register'); ?>
<!-- END SIDEBAR BOX -->

		<!-- ----------- -->
		<!-- END SIDEBAR -->
		<!-- ----------- -->
		</div>
		