Location: PHPKode > projects > Obsessive Website Statistics > ows/index.php
<?php
/*
	$Id: index.php 56 2007-07-18 15:28:30Z 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/>.
	
	// TODO: Add additional functions, like an about page

*/

	// source required files, show header
	require('include/base.inc.php');
	require('include/filter.inc.php');

	// begin output buffering
	ob_start("ob_callback");
	
	// variables
	$domain = get_get_var('domain');
	$table = str_replace('.','_',$domain);

	if ($table == ""){
	
		set_title('Obsessive Web Stats Main Page');
	
		echo "Select a website to analyze:<p>";
		foreach (get_website_names() as $site)
			echo "<a href=\"index.php?domain=" . htmlentities($site) . "\">" . htmlentities($site) . '</a><br/>';
			
	}else if (validate_website_table($domain)){
		
		set_title('Obsessive Web Stats - ' . htmlentities($domain));
		run_filters($table,$domain);
	}
	
	ob_end_flush();
	
?>
Return current item: Obsessive Website Statistics