Location: PHPKode > projects > Monyet > includes/startup.php
<?php

error_reporting (E_ALL);
if (version_compare(phpversion(), '5.1.0', '<') == true) { die ('You need PHP5.1 at least'); }

// Constants:
define ('DIRSEP', DIRECTORY_SEPARATOR);
define ('SITENAME', 'm[]nyet!');
define ('PAGELIMIT', 10);
define ('AUTHENTICATED', 1);
define ('NOTAUTHENTICATED', 0);
define ('GUEST', 3);
define ('REFRESH', 3);
define ('SUPERADMIN', 0);
define ('REPO','/www/htdocs/ajaxmonyet/repo');

// Get site path
$site_path = realpath(dirname(__FILE__) . DIRSEP . '..' . DIRSEP) . DIRSEP;
define ('site_path', $site_path);

// For loading classes
function __autoload($class_name) {
	$filename = strtolower($class_name) . '.php';
	$file = site_path . 'classes' . DIRSEP . $filename;

	if (file_exists($file) == false) { 
		$file = site_path . 'controllers' . DIRSEP . $filename;
		if (file_exists($file) == false) { 
			$file = site_path . 'views' . DIRSEP . $filename;
			if (file_exists($file) == false) { 
				$file = site_path . 'includes' . DIRSEP . $filename;
				if (file_exists($file) == false) { 
					$file = site_path . 'interfaces' . DIRSEP . $filename;
					if (file_exists($file) == false) {
						$file = site_path . 'plotter' . DIRSEP . $filename;
						if (file_exists($file) == false) { 
							return false;
						}
					}
				}
			}
		}
	}
	include ($file);
}
Return current item: Monyet