index.php -
index
<?php
/*
"I wake up in the morning with ideas that please me, and some of
those ideas actually please me also later in the day when I've
entered them into my computer."
-- Donald Knuth
*/
// All include files are here; there are no mystery classes, no global
// objects, no nested classes...
define('THIS_EOL',chr(10));
$GLOBALS['VERSION'] = "1.2.7"; // gets put into configuration data
include "error.php"; // this one first
include "dat/defines.php"; // MySQL and Admin password defines
foreach (glob('inc/*.php') as $inc) // include all library functions
include($inc); // automatically
// now all the "modules"; each module sets up private data and may cache
// some debugging texts * some are order dependent unfortunately *
include "config.php"; // sitewide configuration data
include "rules.php"; // handles URL argument parsing
include "testing.php"; // while in BETA we do this instead of one of these:
//include "mysql.php"; // database functions
//include "mysqli.php"; // database functions mysqli extension
include "html.php"; // themewide configuration data
include "usercode.php"; // an interesting "plugin" like thingy
include "display.php"; // routines that tie stuff together
setmodule();
dbstart(); // connects to database
// All set up. (Whew, that was rough.) Now transfer control to the
// "Rules" module. Not trying to hide anything here... The code
// is in RULES.PHP right here in this directory. It's really small and
// straight forward (we think).
// the GET var 'op' is the "operation" to do (default is "read")
$op = getvar('op');
do_rules($op);
// Do not change anything below this line!