<?php
//if you plan to integrate the software in your site you need all the includes directory and the files:
//geozonesearch.php
//if you plan to integrate this autosuggest done in javascript, you need to integrate also commSuggest.php and
//js directory
require('includes/engine.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<link href="css/interface.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<?php
if($db->_errorMsg) {
?>
<div>To try the community selector, you must configure correctly the database, please, open <a href="README.txt">README.txt</a> to learn how to configure your db and load data, then you'll be able to navigate through data.</div>
<?php } else { ?>
<div class="col1">
<label for="field_value">Country selector</label></td>
<div class="field_container"><?php $countrySelector=getCommunitySelector(0,true,false,' class="w225px" ');
if($countrySelector) {
echo $countrySelector;
?>
<input type="text" autocomplete="off" disabled="true" name="community_0" id="community_0" label="" />
<input type="hidden" name="communityID_0" id="communityID_0" label="" />
<div id="commSuggest_0"></div>
</div>
<div class="col2">
<ul>
<li>Example of two level search for zone of the world. 2 levels? First you chose the country, then the community name.</li>
<li><strong>1. 2 level search.</strong> The input box is disabled, you click on a combo option to activate it</li>
<li><strong>2. Type something.</strong> It doesn't really search something, it just open the content of commSuggest.json</li>
<li>However commSuggest.json receives the two parameters, the content of the input box, and the index of the select</li>
<li>When you click it stores the id of the option in a <a href="javascript:showMe('communityID_0')">hidden input box</a></li>
</ul>
</div>
<?php
} else {
echo 'It appear that there is an error on loading data from <strong>country</strong> table, if you have not yet loaded data, you need to <a href="extraction.php">start extraction process by clicking here</a>';
}
?>
</div></td>
<script src="js/json2.js" type="text/javascript"></script>
<script src="js/interface.js" type="text/javascript"></script>
<script type="text/javascript">
window.onload=function() {
var ax1=new axSuggest('commSuggest.php');
}
</script>
<?php } ?>
</body>
</html>
|