CHips L MINI SHELL

CHips L pro

Current Path : /opt/cpanel/ea-php54/root/usr/share/doc/pear/HTML_AJAX/examples/support/
Upload File :
Current File : //opt/cpanel/ea-php54/root/usr/share/doc/pear/HTML_AJAX/examples/support/livesearch.class.php

<?php
/**
 * Simple test class for doing fake livesearch
 *
 * @category   HTML
 * @package    AJAX
 * @author     Joshua Eichorn <josh@bluga.net>
 * @copyright  2005 Joshua Eichorn
 * @license    http://www.opensource.org/licenses/lgpl-license.php  LGPL
 * @version    Release: 0.5.8
 * @link       http://pear.php.net/package/HTML_AJAX
 */
class livesearch {
	/**
	 * Items to search against
	 */
	var $livesearch = array(
		'Orange',
		'Apple',
		'Pear',
		'Banana',
		'Blueberry',
		'Fig',
		'Apricot',
		'Cherry',
		'Peach',
		'Plum',
		'Nectarine',
		'Boysenberry',
		'Cranberry',
		'Blackberry',
		'Clementine',
		'Grapefruit',
		'Lemon',
		'Lime',
		'Tangerine'
		);
	
	/**
	 * Perform a search
	 *
	 * @return array
	 */
	function search($input="") {
		$ret = array();
		if(empty($input)) {
			return $ret;
		}
		if (isset($_SESSION['sleep'])) {
			$ret['Latency Added'] = $_SESSION['sleep'];
		}
		foreach($this->livesearch as $key => $value) {
			if (stristr($value,$input)) {
				$ret[$key] = $value;
			}
		}
		return $ret;
	}
}
?>

Copyright 2K16 - 2K18 Indonesian Hacker Rulez