Exemplo n.º 1
0
                //	oldPageLocation = /vacations/caribbean/aruba/amsterdam-manor-beach-resort.html
                //	newPageLocation = vacation/aruba/meal-inclusive/amsterdam-manor-beach-resort.html
                //Remove the leading slash if needed
                if (substr($oldPageLocation, 0, 1) == "/") {
                    $oldPageLocation = substr($oldPageLocation, 1);
                }
                //Add the leading slash if needed
                if (substr($newPageLocation, 0, 1) != "/") {
                    $newPageLocation = "/" . $newPageLocation;
                }
                $output .= $startRewriteString . $oldPageLocation . " " . $newPageLocation . $endRewriteString . "\n";
                //Example output:
                //	RewriteRule ^vacations/caribbean/anguilla/ku.html /vacation/anguilla/meal-inclusive/ku.html [R=301,L]
            }
        }
        fclose($handle);
    }
} else {
    fwrite($statusFile, "No redirects mapping provided at:" . PROGRAM_INSTALL_PATH . REDIRECT_CSV_FILE_NAME . "<br>");
}
$output .= "\nRewriteCond %{REQUEST_URI} ^/template.php(.*)\nRewriteRule (.*) template.php [L]\n\nRewriteCond %{REQUEST_URI} ^/atcref/resorts/(.*)\nRewriteRule (.*) template.php?%{QUERY_STRING}&hotelRequest=%{REQUEST_URI} [R=301]\n\nRewriteCond %{REQUEST_URI} ^/destinations/(.*)\nRewriteRule (.*) template.php?%{QUERY_STRING}&destinationRequest=%{REQUEST_URI} [R=301]\n\nErrorDocument 404 http://" . SITE_DOMAIN . "\n";
// Create file handle for output
$htaccessHandle = fopen(DOC_ROOT_PATH . ".htaccess", 'w') or die("can't open file");
fwrite($htaccessHandle, $output);
// Close reference to file
fclose($htaccessHandle);
chmod(DOC_ROOT_PATH . ".htaccess", 0777);
if (FTP_ENABLED) {
    ftp_to_deployment_site(DOC_ROOT_PATH . ".htaccess");
}
fwrite($statusFile, "Finished generate-htaccess.php<br>");
Exemplo n.º 2
0
createMenu($fullcsv, $tempJSONMenuObject, $navAppend, $listPageObjectArray);
$tempFileForWrite = fopen(PROGRAM_INSTALL_PATH . MENU_AJAX_JSON_DIR_NAME . MENU_FILE_NAME_HONEYMOON, 'w') or die("can't open file");
$outputJSON = trimJSONMenuObject($json->encode($tempJSONMenuObject));
fwrite($tempFileForWrite, $outputJSON);
chmod(PROGRAM_INSTALL_PATH . MENU_AJAX_JSON_DIR_NAME . MENU_FILE_NAME_HONEYMOON, 0777);
if (!DEBUG_MODE && FTP_ENABLED) {
    ftp_to_deployment_site(PROGRAM_INSTALL_PATH . MENU_AJAX_JSON_DIR_NAME . MENU_FILE_NAME_HONEYMOON, REMOTE_INSTALL_FULL_PATH . MENU_AJAX_JSON_DIR_NAME);
}
if (isset($statusFile)) {
    fwrite($statusFile, "Finished " . MENU_FILE_NAME_HONEYMOON . "<br>");
}
//End honeymoon menu
//Start adults menu
$tempJSONMenuObject = new MenuJSONObject("Adults Only");
$navAppend = "a";
createMenu($fullcsv, $tempJSONMenuObject, $navAppend, $listPageObjectArray);
$tempFileForWrite = fopen(PROGRAM_INSTALL_PATH . MENU_AJAX_JSON_DIR_NAME . MENU_FILE_NAME_ADULTS, 'w') or die("can't open file");
$outputJSON = trimJSONMenuObject($json->encode($tempJSONMenuObject));
fwrite($tempFileForWrite, $outputJSON);
chmod(PROGRAM_INSTALL_PATH . MENU_AJAX_JSON_DIR_NAME . MENU_FILE_NAME_ADULTS, 0777);
if (!DEBUG_MODE && FTP_ENABLED) {
    ftp_to_deployment_site(PROGRAM_INSTALL_PATH . MENU_AJAX_JSON_DIR_NAME . MENU_FILE_NAME_ADULTS, REMOTE_INSTALL_FULL_PATH . MENU_AJAX_JSON_DIR_NAME);
}
if (isset($statusFile)) {
    fwrite($statusFile, "Finished " . MENU_FILE_NAME_ADULTS . "<br>");
}
//End adults menu
//echo $outputJSON;
if (isset($statusFile)) {
    fwrite($statusFile, "Finished generate-js-left-nav.php<br>");
}
Exemplo n.º 3
0
$termsAndConditionsPage = str_replace("#meta-keywords#", "terms and conditions " . PRETTY_SITE_NAME . ", all inclusive vacations, all inclusive, all inclusive resorts, excellence resorts, beaches resorts, couples resorts, couples resort, couples, vacation, discounts, honeymoon, jamaica, couples negril", $termsAndConditionsPage);
$termsAndConditionsPage = str_replace("#meta-description#", "All Inclusive Vacation deals to Secrets Resorts, Couples Resorts, Swept Away, Couples Ocho Rios, Grand Lido, Beaches, Palace Resorts, Excellence, Paradisus Resorts. All inclusive vacations packages sold at discount rates. All-inclusive Resorts in Jamaica, St Lucia, Antigua, Bahamas, Dominican Republic, and Mexico. Beaches Resorts in Jamaica, Turks and Caicos Islands.", $termsAndConditionsPage);
$termsAndConditionsPage = str_replace("#agency-code#", AGENCY_CODE, $termsAndConditionsPage);
$termsAndConditionsPage = str_replace("#pretty-site-name#", PRETTY_SITE_NAME, $termsAndConditionsPage);
$termsAndConditionsFile = fopen(DOC_ROOT_PATH . "terms-and-conditions.html", 'w') or die("can't open file");
fwrite($termsAndConditionsFile, $termsAndConditionsPage);
chmod(DOC_ROOT_PATH . "terms-and-conditions.html", 0777);
if (FTP_ENABLED) {
    ftp_to_deployment_site(DOC_ROOT_PATH . "terms-and-conditions.html");
}
//Generate homepage
$homepageContent = file_get_contents(PROGRAM_INSTALL_PATH . "homepage-content.html");
//Insert title into head section
$homepagePage = str_replace("#head-additional-styles-and-scripts#", "<title>" . PRETTY_SITE_NAME . " - All-Inclusive Vacations Deals and Discounts!  Couples resorts, Honeymoon packages, and your personal travel agent</title>", $templateHtml);
$homepagePage = str_replace("#content#", $homepageContent, $homepagePage);
$homepagePage = str_replace("#country-code-upper#", "", $homepagePage);
$homepagePage = str_replace("#country-code-upper##hotel-code-upper#", "", $homepagePage);
$homepagePage = str_replace("#remote-install-path#", REMOTE_INSTALL_PATH, $homepagePage);
$homepagePage = str_replace("#pretty-site-name#", PRETTY_SITE_NAME, $homepagePage);
$homepagePage = str_replace("#dest-region#", DEST_REGION_FILTER, $homepagePage);
$homepagePage = str_replace("#meta-keywords#", PRETTY_SITE_NAME . ", all inclusive vacations, all inclusive, all inclusive resorts, excellence resorts, beaches resorts, couples resorts, couples resort, couples, vacation, discounts, honeymoon, jamaica, couples negril", $homepagePage);
$homepagePage = str_replace("#meta-description#", "All Inclusive Vacation deals to Secrets Resorts, Couples Resorts, Swept Away, Couples Ocho Rios, Grand Lido, Beaches, Palace Resorts, Excellence, Paradisus Resorts. All inclusive vacations packages sold at discount rates. All-inclusive Resorts in Jamaica, St Lucia, Antigua, Bahamas, Dominican Republic, and Mexico. Beaches Resorts in Jamaica, Turks and Caicos Islands.", $homepagePage);
$homepagePage = str_replace("#agency-code#", AGENCY_CODE, $homepagePage);
$homepagePage = str_replace("#pretty-site-name#", PRETTY_SITE_NAME, $homepagePage);
$homepageFile = fopen(DOC_ROOT_PATH . "index2012.html", 'w') or die("can't open file");
fwrite($homepageFile, $homepagePage);
chmod(DOC_ROOT_PATH . "index2012.html", 0777);
if (FTP_ENABLED) {
    ftp_to_deployment_site(DOC_ROOT_PATH . "index2012.html");
}
fwrite($statusFile, "Finished generate-other-pages.php<br>");