*/ $ext="php3"; $bin_dir="."; $inc_dir="./include"; $cfg_dir="./conf"; # -------------------------------------- # Initialize configuration file and site # -------------------------------------- if (empty($bn)) { # No forum selected -> default to 'site' configuration $site = empty($site) ? "agora" : $site; $cfg_file = "${cfg_dir}/site_${site}.${ext}"; $expnd = "all"; } else { $cfg_file = "${cfg_dir}/${bn}.${ext}"; } # read configuration for this forum # --------------------------------- if (file_exists ("${cfg_file}")) { include ("$cfg_file"); } else { die ("Cannot access configuration file: $cfg_file"); } if (!isset($action)) { $action = "list"; } # set script to be invoked in the main frame/page # ----------------------------------------------- $main_url = "$action.${ext}?site=$site&bn=$bn"; if (!empty($key)) { $main_url .= "&key=$key"; } if (!empty($expnd)) { $main_url .= "&expnd=$expnd"; } if (!empty($where)) { $main_url .= "&where=".urlencode(stripSlashes($where)); } if (!empty($sort)) { $main_url .= "&sort=".urlencode(stripSlashes($sort)); } # Frame stuff # ----------- if ($bn_frames) { ?>\n$bn_title\n"; printf ("\n", $bn_frameset); printf (" \n", $bn_frame1, "header.${ext}?site=$site&bn=$bn"); printf (" \n", $main_url); if ($bn_footer) { printf (" ", $bn_frame2, "footer.${ext}?site=$site&bn=$bn"); } ?><? $lynx=1; $frameset=1; $no_cookie=1; include "$bin_dir/$action.$ext"; echo "\n\n\n"; } else { include "$bin_dir/$action.$ext"; } ?>