<?php
	$topdir = '.';
	require $topdir."/dacode.php3";
	$session = LoadClass('Session');

	$genfile = "./".ereg_replace('\?$', '', $config->newsfile);
	if(!empty($PATH_INFO)
		|| !empty($QUERY_STRING)
		|| $session->checked
		|| !file_exists($config->htmldir.'index'.$config->ext)) {
		if (ereg('\.'.$config->php.'$', $genfile)) {
			include($genfile);
		} else {
			include($genfile.'.'.$config->php);
		}
	} else {
		readfile($config->htmldir.'index'.$config->ext);
	}
?>
