What's happening is simple. We set our switch (used by the SwitchBox so that the SwitchBox knows what to do), and then we call the SwitchBox. Depending on what $switch was, our SwitchBox takes the appropriate actions. In this case, our SwitchBox included the files 'fns_database.php' and 'fns_index.php'. After those two lines of code, the global variables in the SwitchBox, everything in fns_database.php, and everything in fns_index.php, are all available right on index.php. If you did not want to include any files for the page, you could simply leave the line:
$switch = "...";
out of the page. Then only the global variables would be available in the application.