buildConfig(); // CREATES SESSION['CONFIG'] Array /** GENERAL **/ if (!isset($_GET['menuid']) or $_GET['menuid'] == 0){ $_GET['menuid'] = "1"; // default page is "home" page } /* DATABASE */ include("lib/classes/database.class.php"); $dbObject = new database(); $dbObject->dbconnect(); // CONNECT /* SESSION */ include("lib/classes/session.class.php"); $sessionObject = new session(); /* MENU */ include("lib/classes/menu.class.php"); $menuObject = new menu(); /* PAGE */ switch ($_GET['menuid']) { case 1: // Home include("lib/classes/home.class.php"); $pageObject = new home(); // EDITOR PAGE UPDATE if ($sessionObject->is_loggedin($dbObject)){ if (isset($_POST['save'])){ $pageObject->update($dbObject); } } else { // LOG -> UNLOGGEDIN USER TRIED TO WRITE POST } // create page $pageObject->create($dbObject); break; case 2: // Band include("lib/classes/band.class.php"); $pageObject = new band(); // EDITOR PAGE UPDATE if ($sessionObject->is_loggedin($dbObject)){ if (isset($_POST['save'])){ $pageObject->update($dbObject); } } else { // LOG -> UNLOGGEDIN USER TRIED TO WRITE POST } $pageObject->create($dbObject); break; case 3: // Storyboard include("lib/classes/storyboard.class.php"); $pageObject = new storyboard(); //SAVE STORYBOARD ITEM if ($sessionObject->is_loggedin($dbObject)) { // save new storyboard item! if (isset($_POST['save_item'])){ $pageObject->save_item($dbObject); } if (isset($_POST['update_item'])) { $pageObject->update_item($dbObject); } // delete item if ($_GET['action'] == "delete_item") { $pageObject->delete_item($_GET['id'], $dbObject); } } // HANDLE NEW COMMENTS if (isset($_POST['save_comment'])) { $pageObject->save_comment($dbObject); } // include javascripts ?> create($dbObject); break; case 4: // Events include("lib/classes/events.class.php"); $pageObject = new events(); $pageObject->create($dbObject); break; case 5: // media include("lib/classes/media.class.php"); $pageObject = new media(); $pageObject->create($dbObject); break; case 6: // interaction include("lib/classes/interaction.class.php"); $pageObject = new interaction(); $pageObject->create($dbObject); break; default: // home include("lib/classes/home.class.php"); $pageObject = new home(); // EDITOR PAGE UPDATE if ($sessionObject->is_loggedin($dbObject)){ if (isset($_POST['save'])){ $pageObject->update($dbObject); } } else { // LOG -> UNLOGGEDIN USER TRIED TO WRITE POST } // create page $pageObject->create($dbObject); break; } ?> Intracts.ch

Intracts.ch

buildMenu($dbObject); ?>

buildContent($dbObject); echo $pageObject->content; ?>
is_loggedin($dbObject)) { $sessioncontrol = "Logout  • Passwort ändern"; } else { $sessioncontrol = "Login"; } ?>
is_loggedin($dbObject) and $pageObject->is_editable) { // Edit-Section der aktuellen Seite einbinden echo "
Seite bearbeiten...

"; include("lib/classes/editor.class.php"); $editor = new editor(); $editor->print_editor_form($pageObject); } ?>