enableCache( "db", "mysql://leicashooters:DrVHFxLCNds2HWzX@localhost/leicashooters" ); /** * CHECK BASIC INPUT * * */ $this_module = isset($_REQUEST["trg"]) ? $_REQUEST["trg"] : "new"; $this_tag = isset($_REQUEST["tag"]) ? $_REQUEST["tag"] : ""; $this_id = isset($_REQUEST["id"]) ? $_REQUEST["id"] : 0; $this_ofs = isset($_REQUEST["ofs"]) ? intval($_REQUEST["ofs"]) : 0; /** * BASE URL * * */ $urlset["base"] = $siteurl . "/"; /** * CHECK TRG * * */ if (!(in_array($this_module, $modules))) { /* default module */ $this_module = "new"; } else { /* if we are accessing a private module, check the user */ if (in_array($this_module, $modules_private)) { /** * AUTHENTICATION * * */ $f->auth(); $token = $f->auth_checkToken(); $nsid = $token["user"]["nsid"]; /** * CHECK MEMBERSHIP AND GET PROFILE * * */ /* check membership */ $_m = checkMembership($nsid); /* exit if the user is not a member of the group */ if ($_m == null) { exit; } else { $_profile = getProfiles(null, $nsid); if ($_profile != null) { $profile = $_profile[0]; } else { $profile = null; } } } } /** * LOAD DATA EVENTS * * */ foreach($inputmodules as $inputmodule) { require("input/input_" . $inputmodule . ".inc"); } /** * LOAD MODULE * * */ require("modules/view_" . $this_module . ".inc"); /** * DONE * * */ ?>