<?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');
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
	<title>{SUB:company_brandname} ::: advanced telecommunications</title>
	<meta name="description" content="">
	<meta name="keywords" content="">

	<?php
	$abs_root = '';
	@include(DOCROOT . '/abs_version_control.php');
	$abs_no_header = true;
	include(DOCROOT . $abs_root . '/common/header.php');
	ob_end_flush();
	?>

<div id="popup_window">

<h1>Dictionary of substitutions</h1> 

<p><b>This table displays all the brand substitutions</b> defined in /common/abs_options.php</p>

<table width="95%" padding="5" border="0">
<tr>
	<td><b>Term</b></td>
	<td><b>Value</b></td>
</tr>
<tr><td colspan="2" class="divider"><img src="{GLIB}/clear.gif" width="1" height="2" alt=""></td></tr>
<tr>
	<td>{SUB:company_brandname}</td>
	<td><?=$abs_opt['company_brandname'];?></td>
</tr>
<tr><td colspan="2" class="divider"><img src="{GLIB}/clear.gif" width="1" height="1" alt=""></td></tr>
<tr>
	<td>{SUB:company_fullname}</td>
	<td><?=$abs_opt['company_fullname'];?></td>
</tr>
<tr><td colspan="2" class="divider"><img src="{GLIB}/clear.gif" width="1" height="1" alt=""></td></tr>
<tr>
	<td>{SUB:company_displayname}</td>
	<td><?=$abs_opt['company_displayname'];?></td>
</tr>
<tr><td colspan="2" class="divider"><img src="{GLIB}/clear.gif" width="1" height="1" alt=""></td></tr>
<tr>
	<td>{SUB:company_logo}</td>
	<td><?=$abs_opt['company_logo'];?></td>
</tr>
<tr><td colspan="2" class="divider"><img src="{GLIB}/clear.gif" width="1" height="1" alt=""></td></tr>
<tr>
	<td>{SUB:company_website}</td>
	<td><?=$abs_opt['company_website'];?></td>
</tr>
<tr><td colspan="2" class="divider"><img src="{GLIB}/clear.gif" width="1" height="1" alt=""></td></tr>
<tr>
	<td>{SUB:contact_tel}</td>
	<td><?=$abs_opt['contact_tel'];?></td>
</tr>
<tr><td colspan="2" class="divider"><img src="{GLIB}/clear.gif" width="1" height="1" alt=""></td></tr>
<tr>
	<td>{SUB:contact_email}</td>
	<td><?=$abs_opt['contact_email'];?></td>
</tr>
<tr><td colspan="2" class="divider"><img src="{GLIB}/clear.gif" width="1" height="1" alt=""></td></tr>
<tr>
	<td valign="top">{SUB:contact_address}</td>
	<td><span style="white-space: pre;"><?=$abs_opt['contact_address'];?></span></td>
</tr>
<tr><td colspan="2" class="divider"><img src="{GLIB}/clear.gif" width="1" height="1" alt=""></td></tr>
<tr>
	<td>{SUB:contact_skype}</td>
	<td><?=$abs_opt['contact_skype'];?></td>
</tr>
<tr><td colspan="2" class="divider"><img src="{GLIB}/clear.gif" width="1" height="1" alt=""></td></tr>
<tr>
	<td>{SUB:contact_alltalk_no}</td>
	<td><?=$abs_opt['contact_alltalk_no'];?></td>
</tr>
<tr><td colspan="2" class="divider"><img src="{GLIB}/clear.gif" width="1" height="1" alt=""></td></tr>
<tr>
	<td>{SUB:contact_alltalk_no_int}</td>
	<td><?=$abs_opt['contact_alltalk_no_int'];?></td>
</tr>
<tr><td colspan="2" class="divider"><img src="{GLIB}/clear.gif" width="1" height="1" alt=""></td></tr>
<tr>
	<td>{SUB:contact_alltalk_ppm}</td>
	<td><?=$abs_opt['contact_alltalk_ppm'];?></td>
</tr>
<tr><td colspan="2" class="divider"><img src="{GLIB}/clear.gif" width="1" height="2" alt=""></td></tr>
</table>

<br>

<h1>Glossary</h1>

<p><b>This table displays all the terms defined in the glossary</b> at /common/glossary.php</p>

<?php
// Show the glossary terms

for ($i = 0; $i < count($abs_glos->search); $i++)
{
	$type = substr($abs_glos->search[$i], 0, 5);
	if ($type == '{DYN:' || $type == '{SUB:') continue;
	if ($i > 0) @ob_end_flush();
	echo '<p class="developer_highlight"><strong>' . $abs_glos->search[$i] . "</strong></p>\n";
	ob_start(array($abs_glos, 'substitute'));
	echo '
	<table>
	<tr>
		<td class="shaded" style="width: 100px;">Example </td>
		<td>' . $abs_glos->replace[$i] . '</td>
	</tr>
	<tr><td colspan="2"></td></tr>
	<tr>
		<td class="shaded" valign="top">Infotext </td>
		<td>' . (isset($abs_glos->infotext[$i]) ? $abs_glos->infotext[$i] : '') . '</td>
	</tr>
	<tr><td colspan="2"></td></tr>
	<tr>
		<td class="shaded" valign="top">HTML </td>
		<td><code>' . abs_linewrap(htmlspecialchars($abs_glos->replace[$i]), 80, '<br>', 1) . '</code></td>
	</tr>
	</table>
	<br>';
}

?>

<br><hr><br>

</div>

</body>
</html>
