PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Virgilio lino   geozonedb   index.php   Download  
File: index.php
Role: Application script
Content type: text/plain
Description: example of usage
Class: geozonedb
Get world geographic data from GeoNames into MySQL
Author: By
Last change: update
Date: 13 years ago
Size: 2,600 bytes


Class file image Download
//if you plan to integrate the software in your site you need all the includes directory and the files:
  //if you plan to integrate this autosuggest done in javascript, you need to integrate also commSuggest.php and
  //js directory
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<link href="css/interface.css" rel="stylesheet" type="text/css" media="screen" />
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" ');
$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 class="col2">
<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>


} else {
'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>';

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