Location: PHPKode > projects > Obsessive Website Statistics > ows/async.php
<?php
/*
	$Id: async.php 65 2007-07-21 17:49:55Z randomperson83 $

	Obsessive Web Statistics
    Copyright (C) 2007 Dustin Spicuzza <hide@address.com>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

	global $cfg;

	header("Cache-Control: no-cache, private");
	
	// source required files, show header
	require('include/base.inc.php');
	require('include/filter.inc.php');

	/*
		the point of this is to avoid non-javascript browsers submitting the form
		and expecting their results to work. Like some search engines. Maybe in the future.
	*/
	if (get_post_var('ajax') != 'xaja')
		die("Error: You need to enable javascript for OWS to work properly!");
	
	// variables
	$domain = get_get_var('domain');
	$table = str_replace('.','_',$domain);
	
	if (!validate_website_table($domain))
		return;

	run_filters($table,$domain);
	
	// show number of queries performed
	
	echo ($cfg['db_queries'] > 0 ? ($cfg['db_queries'] > 1 ? "<p style=\"clear:both\">$cfg[db_queries] db queries performed</p>" : "<p>1 db query performed</p>") : '');
	
?>
Return current item: Obsessive Website Statistics