# BASE FILE PATH
define ("BASE", "/grids/c2/webcontent/gce_rg/");
# ARRAY of CATEGORIES
$cats = array (
"general",
"resources",
"services",
"research",
"technologies"
);
# ARRAY of CATEGORY NAMES
$catNames = array (
"general" => "General Info",
"resources" => "Resources",
"services"=> "Services",
"research" => "Research",
"technologies" => "Technologies"
);
# ARRAY of SECTIONS in CATEGORIES
$groups = array (
"general" => array ("overview","news","affiliations","staff","visitor","contact"),
"resources" => array ("systems","software","allocations","guides"),
"services" => array ("consulting","training","storage","cluster"),
"research" => array ("collaborations","projects","users","gallery"),
"technologies" => array ("hpc","vis","grid")
);
# ARRAY of SECTION NAMES
$sections = array (
"overview" => "TACC Overview",
"news" => "News & Events",
"affiliations" => "Affiliations",
"staff" => "Staff & Jobs",
"visitor" => "Visitor Info",
"contact" => "Contact Info",
"systems" => "Systems",
"software" => "Software",
"allocations" => "Allocations",
"guides" => "User Guides",
"consulting" => "Consulting",
"training" => "Training",
"storage" => "Storage/Backups",
"cluster" => "Cluster Support",
"collaborations" => "Collaborations",
"projects" => "TACC Projects",
"users" => "User Research",
"gallery" => "Gallery",
"hpc" => "HPC",
"vis" => "SciViz",
"grid" => "Grid"
);
# ARRAY of FILE NAMES
$urls = array (
"overview" => "/general/overview/",
"news" => "/general/news/",
"affiliations" => "/general/affiliations/",
"staff" => "/general/staff/",
"visitor" => "/general/visitor/",
"contact" => "/general/contact/",
"systems" => "/resources/systems/",
"software" => "/resources/software/",
"allocations" => "/resources/allocations/",
"guides" => "/resources/user_guides/",
"consulting" => "/services/consulting/",
"training" => "/services/training/",
"storage" => "/services/storage/",
"cluster" => "/services/clusters/",
"collaborations" => "/research/collaborations/",
"projects" => "/research/projects/",
"users" => "/research/users/",
"gallery" => "/research/gallery/",
"hpc" => "/hpc/",
"vis" => "/vis/",
"grid" => "/grid/"
);
# FUNCTION to INCLUDE PROPER STYLESHEET
function writeStyle (){
echo "
\n";
}
# FUNCTION TO WRITE HTML HEAD
function writeHead ($title){
echo ("\n
\n
$title\n");
include (BASE . "roll_over.php");
}
# FUNCTION TO WRITE TOP AND NAVIGATION
function writeNav ($thisSection){
global $cats;
global $groups;
global $sections;
global $urls;
include (BASE . "top_head.php");
# include (BASE . "top_nav.php");
include (BASE . "start_left.php");
foreach ($cats as $cat){
include (BASE . "categories.php");
foreach ($groups[$cat] as $group){
if ($group == $thisSection){
$pointer = "on";
} else {
$pointer = "off";
}
include (BASE . "section.php");
}
}
include (BASE . "search.php");
}
#FUNCTION to WRITE the FOOTER
function writeFoot (){
$currentDate = getdate();
include (BASE . "foot.php");
}
# FUNCTION TO WRITE TOP AND NAVIGATION for HOME PAGE
function writeHomeNav ($thisSection){
global $cats;
global $groups;
global $sections;
global $urls;
include (BASE . "home_head.php");
# include (BASE . "home_top_nav.php");
include (BASE . "home_start_left.php");
foreach ($cats as $cat){
include (BASE . "categories.php");
foreach ($groups[$cat] as $group){
if ($group == $thisSection){
$pointer = "on";
} else {
$pointer = "off";
}
include (BASE . "section.php");
}
}
include (BASE . "home_search.php");
}
#FUNCTION to WRITE the FOOTER for the HOME PAGE
function writeHomeFoot (){
$currentDate = getdate();
include (BASE . "right_column.php");
include (BASE . "home_foot.php");
}
# FUNCTION to WRITE FORM HEADERS W/OUT the NAVIGATION
function writeFormHead (){
include (BASE . "form_head.php");
}
#FUNCTION to WRITE the FOOTER for FORMS
function writeFormFoot (){
$currentDate = getdate();
include (BASE . "form_foot.php");
}
#FUNCTION to WRITE HEADER for DOCUMENTATION
function writeDocHead($image){
include (BASE . "doc_head.php");
}
#FUNCTION to WRITE the FOOTER for DOCUMENTATION
function writeDocFoot (){
$currentDate = getdate();
include (BASE . "doc_foot.php");
}
#FUNCTION to WRITE HTML HEAD and NAVIGATION
function writeTop ($thisSection,$title){
writeHead ($title);
writeStyle ();
writeNav($thisSection);
}
#FUNCTION to WRITE HTML HEAD and NAVIGATION for HOME PAGE
function writeHomeTop ($thisSection,$title){
writeHead ($title);
writeStyle ();
writeHomeNav($thisSection);
}
#FUNCTION to WRITE HTML HEAD for FORMS
function writeForm ($title){
writeHead ($title);
writeStyle();
writeFormHead();
}
#FUNCTION to WRITE HTML HEAD for DOCUMENTATION
function writeDoc ($title,$image){
writeHead ($title);
writeStyle();
writeDocHead($image);
}
?>