"January","Feb"=>"February","Mar"=>"March","Apr"=>"April","May"=>"May","Jun"=>"June","Jul"=>"July","Aug"=>"August","Sep"=>"September","Oct"=>"October","Nov"=>"November","Dec"=>"December");
$_arr_month_int = array("Jan"=>"01","Feb"=>"02","Mar"=>"03","Apr"=>"04","May"=>"05","Jun"=>"06","Jul"=>"07","Aug"=>"08","Sep"=>"09","Oct"=>"10","Nov"=>"11","Dec"=>"12");
if( array_key_exists($mon,$_arr_month_name) && array_key_exists($mon,$_arr_month_int) ) {
$month = $_arr_month_name[$mon];
$monnum = $_arr_month_int[$mon];
} else { // default values
$month = "Month";
$monnum = "01";
}
unset($_arr_month_name,$_arr_month_int); // clean-up
// Create variables for file access to clean up code a bit
$pe_url = "$year/$mon/$day/$section/$article";
$article_file = "/www/$year/$mon/$day/$section/$article";
$index_file = "/www/$year/$mon/$day/$section/index.html";
$indexer = "/www/$year/$mon/$day";
$filedir = "/www/engine";
$include_path = "/www/cms/site_includes";
//Interface variables
$specialidxurl = "http://the.honoluluadvertiser.com/specials/$package/";
$specialfolder = "/www/specials/$package";
$header = "/www/specials/$package/header.php";
$footer = "/www/specials/$package/footer.php";
$homepage = "http://www.honoluluadvertiser.com";
$copyright = ""; //set to blank, only used for cobrand
$displayidx = "off"; //Set to off so not to display indexes
if(!file_exists($header)) {
header("Location: http://www.honoluluadvertiser.com/");
}
//Select which template to build
//Email Version
if($email == "on" && file_exists($article_file)) {
$show = "no";
require($header);
require("$filedir/email.php");
require($footer);
}
//Print Version
elseif($print == "on" && file_exists($article_file))
{
print("
Print version - © COPYRIGHT $copyyear The Honolulu Advertiser"."$copyright, a division of Gannett Co. Inc.");
print("");
print("");
require("/usr/home/chris/advinc/print.php");
print("
Back");
print("© COPYRIGHT $copyyear The Honolulu Advertiser"."$copyright, a division of Gannett Co. Inc.
");
print("All materials contained on this site are protected by United States copyright law and may not be reproduced, distributed, transmitted, displayed, published or broadcast without the prior written permission of The Honolulu Advertiser"."$copyright. You may not alter or remove any trademark, copyright or other notice from copies of the content.");
print("");
}
//Display Article
elseif($article && file_exists($article_file))
{
require($header);
if ($displayidx == "off")
{
$article_file = file($article_file);
$article_file = implode($article_file, "");
$article_file = ereg_replace("the.honoluluadvertiser.com/article", "the.honoluluadvertiser.com/special/$package", "$article_file");
print($article_file);
}
else
{
include($article_file);
}
require($footer);
}
//Display index for the day
elseif($day && !$section && file_exists($indexer))
{
if ($displayidx == "off")
{
header("Location: $specialidxurl");
}
else
{
$show = "no";
require($header);
require("$filedir/indexer.php");
require($footer);
}
}
//Display index for the section front
elseif($section && !$article && file_exists($index_file))
{
if ($displayidx == "off")
{
header("Location: $specialidxurl");
}
else
{
$show = "no";
require($header);
require($index_file);
require($footer);
}
}
elseif(!file_exists($specialfolder) || !$package)
{
header("Location: http://www.honoluluadvertiser.com/");
}
//None of the above, too bad 404 a'ohe page
else
{
$err = "404";
require($header);
echo("Sorry, the article you are looking for is not here or is no longer available.
Click here to return to our homepage.");
require($footer);
}
//EOF
?>