- ./
- ./admin
- ./admin/javascript
- ./admin/templates
- ./admin/templates/bookings
- ./admin/templates/customers
- ./admin/templates/flights
- ./admin/templates/information
- ./admin/templates/pages
- ./css
- ./javascript
- ./templates
- ./templates/booking
- ./templates/manage
- ./templates/pages
./static.cgi
#! /usr/local/bin/perl -w
use CGI::Carp qw(fatalsToBrowser);
use CGI qw(:standard);
use DBI;
print header;
require "common.pl";
$connection = mysql_connect();
$head = load_template("head");
$head = str_replace('%%BODY%%', '"', $head);
print $head;
$body = load_template("pages/static");
if(!param(name))
{
$title = 'Information';
}
else
{
$title = param(name);
}
if(!param(location))
{
$query = "SELECT * FROM page_content WHERE title = '$title';";
}
else
{
$query = "SELECT * FROM page_content WHERE location = '/".param(location)."' AND title = '$title';";
}
$result = mysql_query($query);
if($result->rows>0)
{
while ($row = $result->fetchrow_hashref)
{
$body = str_replace('%TITLE', $row->{title}, $body);
$body = str_replace('%CONTENT', $row->{content}, $body);
}
}
else
{
$body = str_replace('%TITLE', 'Page Not Found', $body);
$body = str_replace('%CONTENT', 'The page you requested cannot be displayed beacuse it does not exist',$body);
}
print $body;
print load_template("foot");