useCache && $page = $s->getCache() )
{
echo $page;
}
else
{
$db = new MySQL();
$db2 = new MySQL();
$db3 = new MySQL();
$s->imgBox();
$s->navLinks(array(array('Home', '/'), array('Find a Cruise', '/cruise-search')));
$s->setTitle( $s->cruiseLine );
if( isset( $_GET['area'] ) )
{
if( $s->matchMonthURL( $_GET['area'] ) )
{
$monthText = ucwords( str_replace('-cruises', '', strtolower( $_GET['area'] ) ) );
$year = idate('Y');
$month = date('m', strtotime('01 ' . str_replace('-cruises', '', $_GET['area'] ) . date('Y') ) );
if( $month < date('m') )
{
$year++;
}
$s->setHeader( $monthText . ' Cruises', $monthText . ' cruises, ' . $monthText . ' cruise, ' . $monthText . ' specials, ' . $monthText . ' cruise prices, ' . $monthText . ' cruise specials, cruise, cruises', $monthText . ' Cruises: Providing ' . $monthText . ' Cruises and ' . $monthText . ' Cruise Specials to groups and individuals.');
$s->setTitle( $monthText . ' ' . $year . ' Cruises');
$s->hideImgBox();
$s->addContent( '
' . $monthText . ' Last Minute Cruise Specials Select the Month You Would Like to Cruise To See the Specials Available ' . $s->printMonthGrid( $month ) . $s->buildCruiseList( $s->getCruisesByMonth( $monthText ), '', '' ) );
}
elseif( $feature = $s->getFeatureByUrl( $_SERVER['REQUEST_URI'] ) )
{
$s->setFeature = true;
$s->featureContent = $feature->content;
$s->setHeader( $feature->title, $feature->keywords, $feature->description );
}
else
{
switch( $_GET['area'] )
{
case 'cruises-by-month':
$s->hideImgBox();
$s->setTitle('Cruise Specials by Month');
$s->setHeader('Cruise Specials by Month', 'Cruise Specials by Month', 'Cruise Specials by Month');
$s->addContent('Select the Month You Would Like to Cruise To See the Specials Available ' . $s->printMonthGrid() );
break;
case 'cruise-ships':
if( isset( $_GET['ship'] ) )
{
if( $d = $s->getShipByUrl( $_GET['ship'] ) )
{
$s->setTitle( $d->name );
$x = 0;
$images = $s->getShipImages( $d->id );
foreach( $images as $i )
{
$imgs[ $x ]['image'] = '/images/thumbs/ships/900/350/' . $i->image;
$imgs[ $x ]['a'] = '/images/ships/' . $i->image;
$imgs[ $x ]['gallery'] = 'ship';
$imgs[ $x ]['alt'] = $i->alt;
$imgs[ $x ]['size'] = 350;
$x++;
}
$s->imgBox( $imgs );
$s->cruiseSearch('', null, $d->id );
$db2->query("SELECT * FROM `cruise_lines` WHERE `id` = '" . $d->cruise_line_id . "' LIMIT 1");
$c = $db2->result();
$s->setHeader( $c->name . ' Ship | ' . $d->name . ' | ' . $d->name . ' Deals', $c->name . ' ship, ' . $d->name . ', ' . $d->name . ' Deals', 'Official site for you to find your best ' . $d->name . ' deals and specials, ' . $d->name . ' cruise destinations , and all you need to know about ' . $d->name . ' including deck plan, Suite and Stateroom and much more' );
$s->addContent('' . $d->name . ' Cruise ' . $d->description . '' . $d->name . ' Deck Plans ' . $s->buildDeckList( $s->getDecksByShip( $d->id ) ) . ' ');
}
else
{
$s->missingPage();
}
}
else
{
$s->setTitle( $s->cruiseLine . ' Ships' );
$s->addContent('');
$imgs = array();
foreach( $s->getShips() as $d )
{
$image = $s->getShipImages( $d->id, true );
$imgs[ $d->id ]['image'] = '/images/thumbs/ships/900/350/' . $image->image;
$imgs[ $d->id ]['a'] = '/images/ships/' . $image->image;
$imgs[ $d->id ]['gallery'] = 'ship';
$imgs[ $d->id ]['alt'] = $image->alt;
$imgs[ $d->id ]['size'] = 350;
$s->addContent('
' . $d->name . ' ' . substr( $d->short_description, 0, 250 ) . '... Read More
');
}
$s->addContent('
');
$s->imgBox( $imgs );
$s->cruiseSearch();
}
break;
case 'cruise-destinations':
if( isset( $_GET['d'] ) )
{
if( $d = $s->getDestinationByUrl( $_GET['d'] ) )
{
$s->setHeader( $s->cruiseLine . ' to ' . $d->joined_name . ' Cruise | Cruises to ' . $d->joined_name, $d->name . ' Cruise, ' . $d->long_name . ', Cruises to ' . $d->joined_name, 'Licensed ' . $s->cruiseLine . ' to ' . $d->name . ' Cruise Reservation Site, offering ' . $d->name . ' Cruise Deals on ' . $s->cruiseLine . ' to ' . $d->name . ' Cruise Destination.' );
$s->setTitle( str_replace(' Cruises', '', $s->cruiseLine()->name . ' ' . $d->name) );
$images = $s->getDestinationImages( $d->id );
foreach( $images as $i )
{
$imgs[ $i->id ]['image'] = '/images/thumbs/destinations/900/350/' . $i->image;
$imgs[ $i->id ]['a'] = '/images/destinations/' . $i->image;
$imgs[ $i->id ]['gallery'] = 'destinations';
$imgs[ $i->id ]['alt'] = $i->alt;
$imgs[ $i->id ]['size'] = 350;
}
$s->imgBox( $imgs );
$s->cruiseSearch('', $d->id );
$s->addContent('' . $s->cruiseLine . ' to ' . $d->joined_name . ' ' . $s->getLineSpecificDestinationDescription( $d->id ) . '' . $d->name . ' Available Cruises ' .
$s->buildCruiseList( $s->getCruisesByDestination( $d->id ), $d->name . ' Available Cruises' ) . '' . $d->name . ' Shore Excursions, Hotels, & Transfers Please contact us for assistance with Transfers, Hotels, and Shore Excursions for your ' . $s->cruiseLine . ' Cruise. We have many different choices and would love to assist you with all the options available.
');
}
else
{
$s->missingPage();
}
}
else
{
$s->hideImgBox();
$s->setTitle( $s->cruiseLine . ' Destinations' );
$s->addContent('');
$imgs = array();
foreach( $s->getDestinationsByLine( $s->line_id ) as $d )
{
$image = $s->getDestinationImages( $d->id, true );
$imgs[ $d->id ]['image'] = '/images/thumbs/destinations/900/350/' . $image->image;
$imgs[ $d->id ]['a'] = '/images/destinations/' . $image->image;
$imgs[ $d->id ]['gallery'] = 'destinations';
$imgs[ $d->id ]['alt'] = $image->alt;
$imgs[ $d->id ]['size'] = 350;
$s->addContent('
' . $d->long_name . ' ' . substr( $d->short_description, 0, 200 ) . '... Read More
');
}
$s->addContent('
');
$s->imgBox( $imgs );
$s->cruiseSearch();
}
break;
case 'cruise-deals':
if( isset( $_GET['specialid'] ) )
{
if( $special = $s->getSpecial( $_GET['specialid'] ) )
{
$s->hideImgBox();
$c = $s->getCruiseLine( $special->cruise_line_id );
$s->setLine( $c );
if( $special->members == 1 && !$s->isLoggedIn() )
{
$s->specialLogin = true;
$s->addContent('You must be logged in to view this cruise deal. ');
$s->setHeader( $special->title, '', str_replace('', '', str_replace('', '', htmlentities( $special->plain_description ) ) ) );
}
else
{
$s->setHeader( $special->title, '', str_replace('
', '', str_replace('', '', htmlentities( $special->plain_description ) ) ) );
if( strtotime( $special->end_date . ' +20 Hours' ) <= time() )
{
$s->addContent('
This Promotion Has Expired ');
}
$s->addContent('' . $special->title . ' ' . $special->description . '
' . $s->buildCruiseList( $s->getCruisesBySpecial( $special->id ), $c->text_destinations_line_name ) . ' ' . ( $special->terms != '' ? 'Terms and Conditions ' . $special->terms . '
' : '' ) );
}
}
else
{
$s->missingPage();
}
}
else
{
$s->hideImgBox();
$s->setTitle( $s->cruiseLine . ' Cruise Deals' );
$s->addContent('');
$s->cruiseSearch();
}
break;
case 'cruise-search':
$s->setHeader( $s->cruiseLine . ' Cruise Search', '', $s->cruiseLine . ' Cruise Search');
$s->setTitle('Cruise Search');
$s->setCanonical('/cruise-search');
$s->hideImgBox();
$dests = '';
$ships = '';
$departure_ports = '';
$ports = '';
$months = '';
$lengths = '';
$length = array(1=>'1-6', 7=>'7-9', 10=>'10-14', 15=>'15+');
foreach( $s->getDestinationsByLine() as $d )
{
$dests .= ' id ? ' checked="checked"' : '' ) . '>' . $d->name . ' ';
}
foreach( $s->getShips() as $d )
{
$ships .= 'id ? ' selected="selected"' : '' ) . '>' . $d->name . ' ';
}
foreach( $s->getLinePortsOfCall() as $d )
{
$ports .= '' . $s->getFullPort( $d )->full . ' ';
}
foreach( $s->getDeparturePorts() as $d )
{
$departure_ports .= '' . $s->getFullPort( $d->embark_port )->full . ' ';
}
for( $i = 0; $i <= 999; $i++ )
{
$months .= '' . date('F Y', strtotime('+' . $i . ' Months') ) . ' ';
if( date('F Y', strtotime('+' . $i . ' Months') ) == date('F Y', strtotime( $s->maxMonth() ) ) )
{
$i = 999;
}
}
foreach( $length as $d=>$v )
{
$lengths .= '' . $v . ' Nights ';
}
$s->addContent('Refine Your Cruise Search Search ' . ( isset( $_POST['dest'] ) || isset( $_POST['ship'] ) || isset( $_POST['start_month'] ) ? '' : '' ) . '
');
break;
case 'cruise-reservation':
$s->setHeader( $s->cruiseLine . ' Cruise Reservation', '', $s->cruiseLine . ' Cruise Reservation');
$s->setTitle('Cruise Reservation');
$s->setCanonical('/cruise-reservation');
$months = '';
$dests = '';
$ships = '';
for( $i = 0; $i <= 999; $i++ )
{
$months .= '' . date('F Y', strtotime('+' . $i . ' Months') ) . ' ';
if( date('F Y', strtotime('+' . $i . ' Months') ) == date('F Y', strtotime( $s->maxMonth() ) ) )
{
$i = 999;
}
}
foreach( $s->getDestinationsByLine() as $d )
{
$dests .= '' . $d->name . ' ';
}
foreach( $s->getShips() as $d )
{
$ships .= '' . $d->name . ' ';
}
$s->addContent('');
break;
case 'itinerary':
if( isset( $_GET['id'] ) )
{
if( $c = $s->getCruisebyUID( $_GET['id'] ) )
{
if( $_SERVER['REQUEST_URI'] != '/itinerary/' . $c->uid . '/' . $c->url_name )
{
header ('HTTP/1.1 301 Moved Permanently');
header ('Location: /itinerary/' . $c->uid . '/' . $c->url_name);
}
if( strtotime( $c->embark_date ) < time() )
{
$s->expiredCruise();
}
$s->setCanonical('/itinerary/' . $c->uid . '/' . $c->url_name);
$cruiseLine = $s->getCruiseLine( $c->cruise_line_id );
$s->setLine( $cruiseLine );
$cruiseShip = $s->getShip( $c->ship_id );
$embarkDate = strtotime( $c->embark_date );
$disembarkDate = strtotime( $c->disembark_date );
$s->setHeader($c->length . '-Night ' . $cruiseShip->name . ' ' . ( $c->embark_port == $c->disembark_port ? 'Roundtrip ' . $s->getPort( $c->embark_port ) : $s->getPort( $c->embark_port ) . ' to ' . $s->getPort( $c->disembark_port ) ) . ' Sailing ' . ( date('Y', $embarkDate ) == date('Y', $disembarkDate ) ? ( date('M', $embarkDate ) == date('M', $disembarkDate ) ? date('F jS', $embarkDate ) . ' - ' . date('jS', $disembarkDate ) . ', ' . date( 'Y', $embarkDate ) : date('F jS', $embarkDate ) . ' - ' . date('F jS', $disembarkDate ) . ', ' . date( 'Y', $embarkDate ) ) : date('F jS, Y', $embarkDate ) . ' - ' . date('F jS, Y', $disembarkDate ) ), '', '');
$dests = '';
$destsItem = '';
foreach( $s->getDestinationsByCruise( $c->id ) as $d )
{
$dests .= '' . $d->name . ' - ';
$destsItem .= $d->name . ' - ';
}
$specials = '';
$specialTab = '';
$unadvertised = '';
if( $specialList = $s->getSpecialsByCruise( $c->id ) )
{
foreach( $specialList as $special )
{
$specials .= ' ' . str_replace( '{text}', '$' . number_format( $special->special_amount ), $special->text ) . ' - ';
$specialTab .= '
' . $special->short_title . ' ' . substr( $special->plain_description, 0, 250 ) . '... Special Details
';
if( $special->type == 'unadvertised' )
{
$unadvertised = 'Unadvertised Deals Available for This Cruise Click Here for Unadvertised Deals ';
}
}
}
$image = $s->getShipImages( $c->ship_id, true );
$images = array();
foreach( $s->getShipImages( $c->ship_id ) as $i )
{
$images[ $i->id ]['image'] = '/images/thumbs/ships/900/350/' . $i->image;
$images[ $i->id ]['a'] = '/images/ships/' . $i->image;
$images[ $i->id ]['gallery'] = 'ships';
$images[ $i->id ]['alt'] = $i->alt;
$images[ $i->id ]['size'] = 350;
}
$s->imgBox( $images );
$s->hideImgBox();
$lowPrice = $s->getLowestFare( $c->id );
$s->addContent('
' . $c->length . '-Night ' . $cruiseShip->name . ' ' . ( $c->embark_port == $c->disembark_port ? 'Roundtrip ' . $s->getPort( $c->embark_port ) : $s->getPort( $c->embark_port ) . ' to ' . $s->getPort( $c->disembark_port ) ) . ' Cruise Line: ' . $cruiseLine->name . ' ' . ( $c->cruise_line_voyage != '' ? 'Voyage #: ' . $c->cruise_line_voyage . ' ' : '' ) . 'Cruise Ship: ' . $cruiseShip->name . ' Destination: ' . substr( $dests, 0, -3 ) . ' Sailing: ' . ( date('Y', $embarkDate ) == date('Y', $disembarkDate ) ? ( date('M', $embarkDate ) == date('M', $disembarkDate ) ? date('F jS', $embarkDate ) . ' - ' . date('jS', $disembarkDate ) . ', ' . date( 'Y', $embarkDate ) : date('F jS', $embarkDate ) . ' - ' . date('F jS', $disembarkDate ) . ', ' . date( 'Y', $embarkDate ) ) : date('F jS, Y', $embarkDate ) . ' - ' . date('F jS, Y', $disembarkDate ) ) . ' Prices From: ' . ( $lowPrice->promo_price == 0 ? 'Call for Availability ' : '$' . number_format( $lowPrice->promo_price ) . ' ' . ( $lowPrice->promo_price == $lowPrice->brochure_price || $c->cruise_line_id == 3 ? '' : ' You Save ' . number_format( ceil( ( ( $lowPrice->brochure_price - $lowPrice->promo_price ) / $lowPrice->brochure_price ) * 100 ) ) . '% ' ) ) . ' Special Bonus Offers: ' . $specials . ' ' . $unadvertised . 'Book This Cruise Now Speak to a ' . $cruiseLine->text_agent . ' now 1-888-313-8883Toll-free 1-727-906-0444International Day/Date Port Arrive Depart ');
$x = 1;
$year = '';
$prevDate = '';
foreach( $s->getItinerary( $c->id ) as $i )
{
$day = $x;
if( $prevDate == $i->date )
{
$x--;
$day = $x . '-' . $i->part;
}
$s->addContent('' . date('M d', strtotime( $i->date ) ) . ( date('Y', strtotime( $i->date ) ) != $year ? date(', Y', strtotime( $i->date ) ) : '') . ' ' . $day . ' ' . $s->getFullPort( $i->port )->full . ' ' . $i->arrive . ' ' . $i->depart . ' ');
$year = date('Y', strtotime( $i->date ) );
$x++;
$prevDate = $i->date;
}
$otherDates = '';
if( $getOtherDates = $s->getOtherDates( $c->id ) )
{
$otherDates = 'Select Another Date for this Itinerary ';
foreach( $getOtherDates as $o )
{
$otherDates .= '' . date('M d, Y', strtotime( $o->embark_date ) ) . ' - ' . $s->getShip( $o->ship_id )->name . ' ';
}
$otherDates .= ' ';
}
$s->addContent('' . $otherDates . '
Pricing Cabin Type Brochure Our Price Savings ');
$cabinType = '';
foreach( $s->getCabins( $cruiseShip->id ) as $cabin )
{
$fare = $s->getLowestFare( $c->id, $cabin->cat );
if( $cabinType != $cabin->cabin_type )
{
$s->addContent('' . $cabin->cabin_type . ' ');
$cabinType = $cabin->cabin_type;
}
$s->addContent('(' . $cabin->cat . ') ' . $cabin->cat_name . ' ' . ( $fare->promo_price == 0 ? 'Call for Availibility ' : ( $fare->brochure_price == $fare->promo_price || $c->cruise_line_id == 3 ? '$' . number_format( $fare->promo_price ) . ' ' : '$' . number_format( $fare->brochure_price ) . ' $' . number_format( $fare->promo_price ) . ' ' . number_format( ceil( ( ( $fare->brochure_price - $fare->promo_price ) / $fare->brochure_price ) * 100 ) ) . '% ' ) ) . 'Book Now ');
}
$s->addContent('
Special Prices & Promotions Cabin Type Brochure Our Price Savings ');
$cabinType = '';
foreach( $s->getCabins( $cruiseShip->id ) as $cabin )
{
$fare = $s->getLowestFare( $c->id, $cabin->cat );
if( $cabinType != $cabin->cabin_type )
{
$s->addContent('' . $cabin->cabin_type . ' ');
$cabinType = $cabin->cabin_type;
}
$s->addContent('(' . $cabin->cat . ') ' . $cabin->cat_name . ' ' . ( $fare->promo_price == 0 ? 'Call for Availibility ' : ( $fare->brochure_price == $fare->promo_price || $c->cruise_line_id == 3 ? '$' . number_format( $fare->promo_price ) . ' ' : '$' . number_format( $fare->brochure_price ) . ' $' . number_format( $fare->promo_price ) . ' ' . number_format( ceil( ( ( $fare->brochure_price - $fare->promo_price ) / $fare->brochure_price ) * 100 ) ) . '% ' ) ) . 'Book Now ');
}
$s->addContent('
' . $cruiseShip->name . ' Overview ' . $cruiseShip->description . '
' . $cruiseShip->name . ' Deck Plans ');
$s->addContent( $s->buildDeckList( $s->getDecksByShip( $cruiseShip->id ) ) );
$s->addContent('' . $cruiseShip->name . ' Suites ' );
}
else
{
header ('HTTP/1.1 301 Moved Permanently');
header ('Location: /cruise-search');
}
}
else
{
header ('HTTP/1.1 301 Moved Permanently');
header ('Location: /cruise-search');
}
break;
default:
$s->missingPage();
break;
}
}
}
else
{
$cruiseLine = $s->cruiseLine();
$s->addContent( str_replace('a href', 'a class="hide-content-link" href', $cruiseLine->text_description ) );
$s->cruiseSearch();
}
$db->query("SELECT * FROM `meta_tags` WHERE `url` = '" . $_SERVER['REQUEST_URI'] . "' AND `domain` = '" . $_SERVER['HTTP_HOST'] . "' LIMIT 1");
if( $db->getCount() > 0 )
{
$meta = $db->result();
$s->setHeader( $meta->title, $meta->keywords, $meta->description );
}
echo $s->display();
$db->close();
$db2->close();
$db3->close();
}
?>