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



// Declare an interest in 0871

dmx_update_nc_memory(NULL, array('range' => '0871'));



// Define tariff here if page contains a NumberChooser

$abs_xparams['tariffs'] = 'Public.EC-UK-NGN-G7-Bas';



$abs_root = '';

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

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

?>



<style type="text/css">

<!--

@import url(<?=$abs_root;?>/themes/<?=$abs_opt['theme'];?>/css/num_hp.css);

//-->

</style>



<!-- 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'); ?>



<div style="float: left; width: 200px; margin-right: 40px;">

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



	<?php

	// Single column numberchooser

	$xparams['cols'] = 1;

	$xparams['showheader'] = 0;

	$xparams['showborder'] = 0;

	$xparams['showpreamble'] = 0;

	$xparams['showsearch'] = 0;

	$xparams['showclass'] = 0;

	$xparams['showpages'] = 0;

	$xparams['result_numberpick'] = $abs_root . '/numbers/' . $abs_subject['range'] . '/checkout.php';

	$xparams = array_merge($xparams, $abs_xparams);

	dmx_render('dmshop.numberchooser', $abs_numberchooser_name, $xparams);

	?>



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



</div>



<div style="border: 1px solid white;"><?php abs_inc_fragment('numhome_10_reasons'); ?></div>



<br style="clear: both;" /><br /><br />



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



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

		<!-- END MAIN COLUMN -->

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

		</div>



		<div class="sidebar">

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

		<!-- SIDEBAR -->

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



<!-- PAGE FLOW BOX -->

<div id="flowbox">

	<a href="<?=$abs_root;?>/numbers/0871/choose.php" class="flowbox_main_trolley infotext">Choose an 0871 number now<span class="tipcontents">Choose from a longer list of numbers</span></a>

	<a href="<?=$abs_root;?>/numbers/0871/best.php" class="flowbox_sub_forward infotext">Why buy one of <i>our</i> 0871s?<span class="tipcontents">Reasons we believe we are<br />your best choice of supplier</span></a>

	<a href="<?=$abs_root;?>/numbers/0871/gold.php" class="flowbox_sub_trolley infotext">Choose a gold 0871 number<span class="tipcontents">Choose from a selection of<br />high value memorable numbers</span></a>

	<?php if (isset($dmx_init_response['QntItems']) && $dmx_init_response['QntItems']) : ?><a href="<?=$abs_root;?>/numbers/0871/checkout.php" class="flowbox_sub_trolley infotext">Checkout<span class="tipcontents">Proceed to checkout</span></a><?php endif; ?>

</div>

<!-- END PAGE FLOW BOX -->



<div class="ie6_7_is_buggy"><!-- Empty Div to get rid of IE6/7 CSS 'quirk' --></div>



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

}

?>



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



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

		<!-- END SIDEBAR -->

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

		</div>



	</div>

</div>

<!-- END MAIN CONTENT AREA -->



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

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

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

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



<?php include($abs_typinv); ?>



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

