define(array( "header" => "header.tpl", "body" => "ultimate_questions.tpl" )); Go(); } function rest() { Global $main; $main->define(array( "header" => "header.tpl", "body" => "rest.tpl" )); Go(); } if(!isSet($op)){ $op = "default"; $main->define(array( "header" => "header.tpl", "body" => "resources.tpl" )); Go(); } if($op=="ultimate_questions") { Ultimate(); } if($op=="rest") { rest(); } // assign names for template files // "body" now references the template "/templates/main.tpl" // "header" now references the template "/templates/header.tpl" //$main->define(array( //"header" => "header.tpl", // "body" => "resources.tpl" //)); Function Go() { Global $main; // Date Function $today = date("F j, Y"); $main->assign("DATE", $today); // Webmaster Email $main->assign("WEBMASTER", 'Webmaster'); //Copyright Information $main->assign("COPYRIGHT", 'Copyright 2001 Grace Presbyterian Church'); // Implement the Bottom Menu System include("./templates/menu.php"); $main->assign("BMENU", $menu); // parse template "index" and store in handler "result" $main->parse('ft_header', "header"); $main->parse('ft_body', "body"); // print contents of handler "result" $main->FastPrint('ft_header'); $main->FastPrint('ft_body'); } ?>