chapters

350
Chapter 1 INTRODUCTION Hotels nowadays adapt new technology to improve their business transactions. Their aim is not only to be recognized by the public but to enhance their market as well. Unfortunately, some hotels are left behind by the fast pace of change and improvement with the latest technology. The Camp Holiday Resort and Recreation Area, which is located next to the ferry terminal in Babak, Island Garden City of Samal is one of these hotels that are being left behind in terms of technology usage. A year ago, there were improvements being done - twelve air-conditioned cabins and a two-storey hotel building were erected. It accommodates conventions and seminars, thus the hotel and cabins are necessary. Camp Holiday is now one of the tourist spots in Island Garden City of Samal. The stunning place and the good service they provide to their customers, attracts tourists. Unfortunately, due to the low resource of technology, tourists encounter problems regarding reservations and availability of the resort. Advertising of a particular resort or any product is highly important to attract more customers; unfortunately the resort is weak in this area. Customers must visit their resort to be able to ask for availability of their facilities. Due to the hassle customers experience with simply trying to make reservations, most especially since Online Booking System for Camp Holiday Resort and Recreation Area 1

Upload: saintnias

Post on 27-Nov-2014

594 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Chapters

Chapter 1 INTRODUCTION

Hotels nowadays adapt new technology to improve their business transactions.

Their aim is not only to be recognized by the public but to enhance their market as well.

Unfortunately, some hotels are left behind by the fast pace of change and improvement

with the latest technology. The Camp Holiday Resort and Recreation Area, which is

located next to the ferry terminal in Babak, Island Garden City of Samal is one of these

hotels that are being left behind in terms of technology usage.

A year ago, there were improvements being done - twelve air-conditioned cabins

and a two-storey hotel building were erected. It accommodates conventions and seminars,

thus the hotel and cabins are necessary. Camp Holiday is now one of the tourist spots in

Island Garden City of Samal. The stunning place and the good service they provide to

their customers, attracts tourists. Unfortunately, due to the low resource of technology,

tourists encounter problems regarding reservations and availability of the resort.

Advertising of a particular resort or any product is highly important to attract more

customers; unfortunately the resort is weak in this area. Customers must visit their resort

to be able to ask for availability of their facilities. Due to the hassle customers

experience with simply trying to make reservations, most especially since the resort is

often fully booked they lose a lot of valued customers.

Presented with these developments, the proponents intend to propose to develop

an Online Booking System for Camp Holiday Resort and Recreation Area to interest the

management and give them the means to connect to Information Technology. By this,

their costumers can simply login to their computers and surf the internet to view

availability of rooms and other function halls in a more convenient way.

Online Booking System for Camp Holiday Resort and Recreation Area 1

Page 2: Chapters

1.1 Statement of the Problem

1.1.1 Major Statement:

How will the proponents develop an Online Booking System for Camp

Holiday Resort and Recreation Area that will make its booking easier and its

transaction manageable?

1.1.2 Minor Statements:

How will the proponents develop an online booking system capable in

accepting payments?

With the use of the internet, the proponents will create a site that

will accept booking and payments. In booking, the proponents will create

a module that can check room availability. The proponents will also make

use of PayPal for online payment services that will handle transactions

regarding booking. After the customer made a booking, it will update the

back-end system for the desk officer in-charge, and it will be notified that

someone booked online.

How will the proponents create a module that will allow their customers to

view information about the Resorts features and services?

The proponents need to create a website that is not only for

accepting payments online but also serves as a source of information about

the resort. Aside from this feature, browsing customers would be able to

check on the resort’s facilities, amenities as well as promo packages. This

website also shows the resort’s rules and regulations and other terms of

conditions with regards to the services they are offering.

Online Booking System for Camp Holiday Resort and Recreation Area 2

Page 3: Chapters

How will the proponents develop a module to validate the process on

booking an online customer and to the walk-in guests?

The proponents need to create and support the back-end

application that will enable the front desk personnel to manipulate the

system as to make adjustments on promotional offers, changes on room

rates, discounted amenities and other amendments. This is an added

function to its main purpose, which is to input bookings, checking-ins and

outs, and accepting payments for each customer.

How will the proponents develop an effective back-end application for the

front desk of the Camp Holiday Resort and Recreation Area?

The proponents need to create an application that is capable and

effective for the front desk to use. This booking system consists of usage

of all services rendered by the resort and the orders being mandated by the

customers. The proponents must take everything into account regarding

the tasks involving between the front desk and the customers – from

recording guest’s personal information and services involve in checking in

to printing auditing reports. This should have a back-end application to

suit each part of the booking system.

Online Booking System for Camp Holiday Resort and Recreation Area 3

Page 4: Chapters

1.2 Current State of the Technology

Hotels, resorts and other places of accommodation need to constantly upgrade

themselves in the field of technology, know-how and most modern trends in hospitality to

remain spirited in their business. In today's fast paced life, consumers seek convenience,

on the spot service and quality customer care. With booking software now accessible

online, they prefer this instant service over conventional travel agencies. Consequently,

hotels, resorts and accommodation suppliers are making their presence felt online to offer

their services to their prospective customers.

Online Booking System nowadays is here to help market the room inventory

online and reach out to the consumers directly. It is a cost effective method to help create,

sustain and expand the inventory online. Consumers are increasingly migrating from

traditional travel agencies to book-it-yourself websites using online booking system.

Therefore, it is little wonder that hotels, resorts and accommodation suppliers are looking

to the online market to sell their inventory to get online booking over the internet.

Marketing the inventory through online distributors can be expensive. Now they can

reach consumers direct using Global property reservation system. Online Booking

System is designed to simplify the task of online hotel reservation and hotel appointment

booking on internet. Online Booking System has all the features you are ever likely to

need including room availability checking, real-time updating, full search capability,

reporting and sales analysis, plus other features.

  Online Booking System’s powerful control panel enables you to add and amend

rates and sales criteria at any time - instantly - thus maximize internet sales effectiveness.

You can offer discounts to travel agents and corporate clients plus special discounts when

occupancy is low. Online booking system offers 'real-time' checking and updating of

room availability; cancelled bookings can easily be handled and the rooms made

available. Powerful reporting and sales analysis helps you to plan your internet marketing

and optimize your investment.

Online Booking System for Camp Holiday Resort and Recreation Area 4

Page 5: Chapters

Agoda offers the best prices for hotels in Philippines, with 355 Hotels ready for

instant reservation via their secure online booking engine. Agoda is an internet company

which provides online hotel reservations services for properties focused primarily in the

Asia Pacific Region, with offices in Singapore, Bangkok, Hong Kong, Kuala Lumpur,

Phuket, Bali, Sydney, Tokyo, Seoul, Beijing, Shanghai, and Manila. They have every

destination covered, including Manila, Cebu, Boracay, Tagaytay and Davao. They also

offer last-minute bookings, both online and through their 24/7 live help customer support

center. (http://www.agoda.com/asia/philippines.html)

Online Booking System in Philippines provides a real-time access to availability,

prices and reservation of all rooms in hotel database. Selecting the favorite hotel rooms

and dates, you can reserve them at the same moment and receive the confirmation in a

few seconds. In order to reserve a hotel rooms you need to provide the required

information. The reservation is absolutely free. You pay only upon the hotel departure,

except for the room types marked as 'Non-Refundable' or 'Special booking and

cancellation conditions', when a hotel may charge your credit card in advance.

Communicate directly with your guests and encourage repeat business through

confirmation, cancellation, pre-stay, post-stay and promotional emails. Each customized

email delivers reservation details and makes it easy to offer promotions and special offers

and provides an opportunity to solicit customer comments online. Secure incremental

revenue through the website before a guest even arrives through the dynamic packaging

feature. Guests can pre-schedule any hotel amenity or service, upgrade their room type,

add dining options, sign up for tee times, request spa services, etc. The possibilities are

endless! Outside vendors can also be utilized, and are automatically notified via email

when a package reservation service is confirmed. Efficiently collect guest history, mine

information, analyze trends and make future rate and inventory decisions by utilizing

hotel’s online reporting tools. It offers the most comprehensive reporting capabilities in

the industry. Execute marketing campaigns based on reservation data and track online

marketing initiatives with the “Advertising Tracker” by measuring clicks and resulting

reservations and revenue. All reports can be customized and have the flexibility to be

searched based on your needs. Reports can be downloaded into Excel for additional

analysis and reporting.

Online Booking System for Camp Holiday Resort and Recreation Area 5

Page 6: Chapters

Island Garden City of Samal is one of the best tourist spots in Davao, as well as in

the whole Philippines. Beaches in Samal features the best white sands and clear waters

plus satisfying resorts that include Canibad Beach, Bluejaz Resort, Paradise Island, Pearl

Farm, Maxima Resort and all other world-class beach-bums destinations.

The Camp Holiday Resort and Recreation Area is currently lacked of marketing

strategy, they only use call and e-mail for reservation. Most of their guest costumers

where able to have a reservation through walk-in since there is only a number of few

people who knows their contact details, because they don’t have yet a heavy

advertisement about their resort. The customer’s information upon reservation is recorded

in a “Guest Reservation Form”.

The proponents decided to develop this project because most of the costumers

prefer to book in advance online to avoid the hassles of phone calls or having to visit the

place. It is a big benefit for the costumers because of the smooth and quick transactions

that are convenient and saves time. Before, you had to personally visit the hotel to make

reservations, now it is possible to do it from the comfort of your home through the use of

the internet.

To be able to keep up with this competition, Camp Holiday Resort and Recreation

Area must put on a handful of online advertisements. Features such as Room availability

checking, Real-time updating, Full search capability, Sales Analysis and Reporting,

Rates, Amenities checking and Policies checking are easily accessed by the browsing

customers online. To further promote the resort, the proponents will include panoramic

view of the place and the rooms. As an additional feature, the proponents will also create

a virtual tour of the resort, where customers will be able to see the place 360 degrees.

Online Booking System for Camp Holiday Resort and Recreation Area 6

Page 7: Chapters

1.3 Objectives

1.3.1 General Objectives

To develop an Online Booking System that will improve business transactions

involving in Camp Holiday Resort and Recreation Area; thus, provides them

accurate and hasty system that will corresponds to the needs of the hotel.

1.3.2 Specific Objectives

To create a site that is capable in accepting booking through online.

o The proposed system must have the ability to accept bookings online.

Since customers are browsing over the resort’s website, they can also at

the same time place their bookings after checking on the amenities and

other services. Payments are also done online. All of the online

transactions are automatically recorded and stored to the database of the

main server of the resort.

To be able to create a module that the customer can view and access the

services that the resort render.

o The module will serve as an information system about Camp Holiday

Resort and Recreation Area, update on room availability, description of

services offered, resort’s policies, availability of the amenities and its

panoramic view and rates as well as promos and packages.

To create a module for front desk application that can handle check-in

transactions capable of validating booked guest and accept walk-in customers

for the resort.

o The proponents will create and support the back-end application that can

access directly to their database regarding the booking made by the

customer online. The application may allow the front desk officer to

validate whether the customer has booked upon checking in through the

itinerary receipt.

Online Booking System for Camp Holiday Resort and Recreation Area 7

Page 8: Chapters

To create an effective back-end application for the front desk of the Camp

Holiday Resort and Recreation Area.

o The proponents will create a back end application that has the capability to

print official receipts, print billing receipts, store checking-in guest

information, check room availability, and help validating guests who made

an online billing on their website.

1.4 Scope and Limitation

The current problems of Camp Holiday Resort and Recreation Area with their

current system will be eliminated by the proposed system which is the “Online Booking

System for Camp Holiday Resort and Recreation Area”. This system will focus on

handling online booking, accepting payments online, and storing data for check-in

transactions. The proposed system will also focus only on the business process online of

the Camp Holiday Resort and Recreation Area.

Navigating through the site can be done easily for it is designed and structured to

benefit users who may not be so familiar with online transactions. A visitor can view

images of rooms, its amenities, the resort and hotel, location map of the resort and the

panoramic view. If the visitor wants to book for a room, they have to fill up a registration

form online. After the payments has been done, the customer will receive a confirmation

or a unique code comprised of letters and numbers which they will present along with a

valid ID upon arriving at the resort’s reception. The application will require a log-in for

security purposes, the person only allowed for access is a receptionist and an admin

officer.

The whole system will not cater the process in accounting system and payroll

system of the Camp Holiday Resort and Recreation Area.

Data that are recorded early on by the back-end application regarding day to day

transactions will be summarized and automatically computed and then printed for the use

of the accounting department.

Online Booking System for Camp Holiday Resort and Recreation Area 8

Page 9: Chapters

Proponents will not include payroll system of the hotel, although the system

stores in its database the front desk officers and the manager (employees who are charged

with using the back-end application), it doesn’t compute any salary bonuses for them and

neither does any transactions regarding payroll for them.

The speed in viewing the panoramic view will depend on the speed of the internet

connection. It is approximately twenty seconds before it will load the full image if the

Internet connection is in 1Mbps.

Online Booking System for Camp Holiday Resort and Recreation Area 9

Page 10: Chapters

Chapter 2 THEORETICAL FRAMEWORK

2.1 Introduction

Theoretical Framework will explain and show how the proponents develop their

proposed project. It will show what are the concepts and theories they used in order to

come up with an effective output. This will explain how these concepts and theories

being applied in the system. These concepts help the proponents to understand the flow

of the system and its processes.

A theoretical framework is a collection of interrelated concepts, like a theory but

not necessarily so well worked-out. A theoretical framework guides the proponent’s

research, determining what things they will measure, and what statistical relationships

they will look for.

2.2 Methodology

The proponents will use the System Development Life Cycle ( SLDC ) in making

the methodology of the proposed study. SDLC is composed of sequence of events in

development of an information system or application. The SDLC has seven phases in

development: Project Planning, Requirement Determination, System Analysis, System

Design, Implementation, Testing, and Maintenance. SDLC follows series of steps which

is used for product progress. It is nothing but a ladder for project management in an

organized manner. Nowadays a number of different process models are followed. Some

of those are:

1. Waterfall Model

2. Spiral Model

3. RAD

4. Iterative Model

5. Sashimi Model

Online Booking System for Camp Holiday Resort and Recreation Area 10

Page 11: Chapters

Among the models mentioned above, the proponents will use the waterfall

model. It is stated that the waterfall model is a popular version of systems

development life cycle model for software engineering. Often considered the

classic approach to the system development life cycle, the waterfall model

describes a development method that is linear and sequential. Waterfall

development has distinct goals for each phase of development. In a traditional

waterfall model, the first phase must be successfully completed first before going

to next phase and when you are already in the second phase, there is no turning

back on the previous phase which is very ideal in system development. In line

with this, the proponents would like to modify this approach wherein they can

turn back to the previous one if they encounter some errors / problems in the

current phase they are working on to make sure that user requirement and

expectations will be met. (Refer to Chapter 3; 3.2.1, Figure 1.0)

2.2.1 Project Planning

The main purpose of this phase is to generate a high-level view of the

intended project. In this phase the proponents will think and discuss about the

project objective, scope and limitation, system requirements as well as

considering the feasibility study of the proposed system of Camp Holiday Resort

and Recreation Area.

The proponents will follow the requirements determination process in

order to gather accurate information to develop the propose system. RDP has four

components; obtain, understand, validate and evaluate.

To obtain is to collect the pieces of information from which the customer’s

or the target user’s requirements will be determined. The proponents will use

different techniques such as interviewing, prototyping and observation. The

proponents interviewed the manager of Camp Holiday Resort and Recreation

Area, Mr. Glen Germino regarding the reservation process. The proponents look

for an existing online reservation system as prototype in gathering information. In

observation, the proponents study and understand them by the help of the thesis

Online Booking System for Camp Holiday Resort and Recreation Area 11

Page 12: Chapters

adviser as their facilitator during the discussion of the gathered data. To validate

all the gathered information and the concepts as what the proponents have

understood, they use the prototyping technique wherein they demonstrate the

architectural design of a partial solution with their thesis adviser and thesis

defense panelist.

2.2.2 Analysis

During this phase, the proponents will discuss about the propose system

base on the gathered information. In this phase, the proponents will thoroughly

analyze the concepts of web application, structure and its framework that would

help the proponents design for the propose system and after the group discussion,

the proponents will validate their understanding with their thesis adviser.

2.2.3 Design

After collecting and analyzing the gathered information, the proponents

will now be ready to design the propose system. The proponents will follow the

four stages of system design; data, architectural, user interface and procedural

design. However, before proceeding to the actual design, the proponents will first

develop the architectural structure of the flow of the propose system to ensure that

the interface and database design will be functional and all the processes will be

done in the system. For data design, the proponents will concentrate on the

database design of the propose system with the use of entity relationship diagram,

database physical design. In architectural design, the proponents will consider the

coupling and cohesion concepts of object and classes involve in the system. User

interface design, the proponents will design for the graphical user interface of the

system that’s fit to the user’s requirement and expectations. The website that

would accept user input, online booking system, and the back-end application that

would allow the proponents monitor its client and do system maintenance. In

procedural design, the proponents will going to develop a data flow diagram.

Online Booking System for Camp Holiday Resort and Recreation Area 12

Page 13: Chapters

2.2.4 Implementation

The proponents will implement the final construction of the system and

final codes of the system will be written in this phase. Moreover, choosing a

programming language and web scripting language should the proponents must

also considered in this phase, a computer with internet connection is a

requirement, a DNS ( Domain Name System ) registration, and web server to the

system that available online. The proponents will divide the task evenly to ensure

that every module that the proponents stated on the specific objective must be

developed as well as the back-end application.

2.2.5 Testing

In this phase, series of testing will happen. Testing must be done before

the final deployment of delivery of the system to make sure the good quality of

the software / system. The proponents will do the unit testing, integration testing,

user acceptance and performance testing.

2.2.6 Maintenance

The task and responsibilities of the system developer don’t stop on the

deployment of the system. During this phase, the proponents will perform the four

types of system maintenance; corrective, adaptive, perfective and preventive. In

performing the corrective maintenance, the proponents will correct / repair the

faults or defects found results from design errors, logic and coding errors. These

errors are from the bugs that the client will encounter. Adaptive maintenance, the

proponents will consider the changes in the environment both hardware and

software and make the system adapt that changes. Perfective maintenance, the

proponents will accommodate the changes in user’s requirements. The proponents

will enhance the functionalities and user interface of the system to improve its

performance. Preventive maintenance, the proponents will always checks the

system.

Online Booking System for Camp Holiday Resort and Recreation Area 13

Page 14: Chapters

2.3 Data Modeling Theory

Data Modeling is a formal description of how may be structured and accessed.

Data modeling illustrates the relationship between the data and translates complex system

designs into easily understood representations of the data flows and processes. It

includes:

2.3.1 Use Case

In the part of the Online Booking System for Camp Holiday Resort and

Recreation Area, the guest user and receptionist have limited access only and can

only do the following: Inquire Accommodation Availability, Make Reservation

and Issue Invoice, while the Administrator can access everything in the system.

(Refer to Chapter 3; 3.2.2, Figure 1.1)

2.3.2 Architectural Design

Is the conceptual model that defines the structure, behavior, and

more views of a system. (Refer to Chapter 3; 3.2.3, Figure 1.2)

2.3.3 Context Free Diagram

In software engineering and systems engineering is a diagram that

represents the actors outside a system that could interact with that system. This

diagram is the highest level view of a system.

The guest can make all his/her transactions via the web using the

proponents system which is Online Booking System for Camp Holiday Resort

and Recreation Area, while the receptionist can check and update the data(guest

transaction) in the system that were done by the guest user via online. (Refer to

Chapter 3; 3.2.4, Figure 1.3)

Online Booking System for Camp Holiday Resort and Recreation Area 14

Page 15: Chapters

2.3.4 DFD- Data Flow Diagram

This is a graphical representation of the flow of data through information

system. The proponents use Data Flow Diagram in order to know and understand

the flow and target user’s process. (Refer to Chapter 3; 3.2.5, Figure 1.4-1.7)

o Data Process- transforms data values. It is represented by a circle.

o Data Store- stores data passively for later access. A Data Store

responds to request to store and access data.

o External Agents- are shown as a rectangle. Represents sources or

sinks.

o Data flow- represents movement of data item. This is shown as arrows.

2.3.5 ERD- Entity Relationship Diagram

An Entity Relationship Diagram (ERD) is a snapshot of data

structures. ERDs show entities in a database and relationships between tables

within that database. Illustrates the interrelationship between entities in a

database. (Refer to Chapter 3; 3.2.6, Figure 1.8)

o Entities - An entity is an object or concept about which you want to

store information.

o Weak Entity - Attributes are the properties or characteristics of an

entity.

o Relationship - Relationships illustrate how two entities share

information in the database structure.

o Cardinality - Cardinality specifies how many instances of an entity

relate to one Instance of another entity.

Online Booking System for Camp Holiday Resort and Recreation Area 15

Page 16: Chapters

2.4 Physical Data Modeling

Is used to design the internal schema of a database, depicting the data

tables, the data columns of those tables, and the relationship between the tables.

The proponents use the Physical Data Model, this will serve as storage of

all data, and the proponents also use Database normalization in order to reduce

data redundancy.

2.5 Business Ethics

Describe the policies within the business or organization. The proponents

should consider the policies and regulations imposed by the organization so that

they will meet the requirement of the user.

The front-desk officers, managers and system admin of the Camp Holiday

Resort and Recreation Area will be the main persons that will use the system, and

are the first ones that will test themselves the system we have created, the

business ethics that we have followed will help them in doing their jobs.

2.6 Security Concept

It is used by the proponents to protect the data of each user.

o User login – each user has to provide his/her own username/password

which will be provided by the Camp Holiday Admin.

2.7 Summary

In Theoretical Framework, the proponents use Context Free Diagram to

show the entire system as a single process, Data Flow Diagram in order to know

and understand the flow and target user’s process, Entity Relationship Diagram to

illustrate the interrelationship between entities in a database and Physical Data

Model to explain and show what are the concepts and theories in order to come up

to an effective output.

Online Booking System for Camp Holiday Resort and Recreation Area 16

Page 17: Chapters

Chapter 3 ONLINE BOOKING SYSTEM FOR CAMP HOLIDAY RESORT AND RECREATION AREA

3.1 Introduction

Online Booking System for Camp Holiday Resort and Recreation Area was

proposed to help Camp Holiday do their services more efficiently. The proponents have

made the system to accept check-in as well as check out, booking online and acceptance

of payments for it. And also for the Restaurant to be able to charge to rooms of the guest

by creating a module that add other charges to the guest. The entire system of the Camp

Holiday Resort and Recreation Area is comprised of subsystems that overall will do a

complete cycle of the business process of the hotel.

3.2 System Design Specification

As a group, we have assigned modules for each member, which then we

integrate after completion. We also keep track of the changes that we do to the

database. The proponents use Data Flow Diagram (DFD) to simplify the process

and flow of data. The proponents also use Entity Relationship Diagram (ERD) to

create a database design that would help the system to easily store and manipulate

data.

Online Booking System for Camp Holiday Resort and Recreation Area 17

Page 18: Chapters

3.2.1 SDLC Diagram with Waterfall Model

Figure 1.0 – Camp Holiday Resort and Recreation Area SDLC Diagram with

Waterfall Model

Online Booking System for Camp Holiday Resort and Recreation Area 18

Page 19: Chapters

3.2.2 USE CASE

Figure 1.1 Camp Holiday Resort and Recreation Area Use Case

Online Booking System for Camp Holiday Resort and Recreation Area 19

Page 20: Chapters

3.2.3 Architectural Design

Figure 1.2 Camp Holiday Resort and Recreation Area Architectural Design

Online Booking System for Camp Holiday Resort and Recreation Area 20

GUEST USER

Internet Internet

WEB SERVER

Check Accommodation AvailabilityRoom DetailsGuest InformationPayment Details

List of Available AccommodationItinerary (Confirmation Code)

List of Available AccommodationItinerary (Confirmation Code)

Select Check in/ Check out Date

Select Preferred Room/Number of rooms

Guest Information

Payment

Page 21: Chapters

3.2.4 Data Flow Diagram Level 0 Diagram (Context Free)

Figure 1.3 Camp Holiday Resort and Recreation Area Context Free Diagram

Online Booking System for Camp Holiday Resort and Recreation Area 21

Page 22: Chapters

3.2.5 Data Flow Diagram

3.2.5.1 DFD Level 0 Diagram

GUEST

1.Check

Accommodation Availability

Guest DetailsGuest Details Guest Master

Charge Items ConsumedCharges Master

AccommodationMaster

List of

Accommodation

Payment

Receipt

Request Accommodation Availability

Available Accommodation

2.Guest

Reservation Itinerary

3.Guest

ChargesItems Consumed

Bill Info

4.Guest

Payment

Payment Master

Payment Details

RECEPTIONIST Guest Details

Guest Billing Info

Guest Payment Info

AccommodationDetails

GuestAccommodation

Details

Figure 1.4 Camp Holiday Resort and Recreation Area DFD Level 0

Online Booking System for Camp Holiday Resort and Recreation Area 22

Page 23: Chapters

3.2.5.2 DFD Level 1 Diagram

Figure 1.5 Camp Holiday Resort and Recreation Area DFD Level 1,

Accommodation Availability

Online Booking System for Camp Holiday Resort and Recreation Area 23

Page 24: Chapters

3.2.5.3 DFD Level 1 Diagram

Figure 1.6 Camp Holiday Resort and Recreation Area DFD Level 1, Guest

Registration

3.2.5.4 DFD Level 1 Diagram

Online Booking System for Camp Holiday Resort and Recreation Area 24

Page 25: Chapters

Guest

3.1CheckBilling ItemPrice

ChargeItem Consumed

3.2Record AllItem Taken

3.3Compute

AllItems

Services Master

Receptionist

Price

Item Taken

Info

Calculated Charges Info

Guest Bill Info

Guest Bill Info

Figure 1.7 Camp Holiday Resort and Recreation Area DFD Level 1 Billing

3.2.6 Entity Relationship Diagram

Online Booking System for Camp Holiday Resort and Recreation Area 25

Page 26: Chapters

GUEST RESERVED ROOMS HAS ROOM TYPES

ACCOMMODATION

HAS

HAS TRANSACTION

CHARGESINCLUDES

RESTAURANT

BILLING

GENERATES

FACILITIES

PAYS

ISA

Figure 1.8 Camp Holiday Resort and Recreation Area Entity Relationship

Diagram(ERD)

3.2.7 Physical Database Schema

Online Booking System for Camp Holiday Resort and Recreation Area 26

Page 27: Chapters

tbl_payment

tbl_billing

tbl_accommodation

tbl_accommodationdetails

tbl_paymentdetails

Online Booking System for Camp Holiday Resort and Recreation Area 27

Page 28: Chapters

tbl_transaction

tbl_guest

tbl_reservation

Online Booking System for Camp Holiday Resort and Recreation Area 28

Page 29: Chapters

tbl_amenities

tbl_transactiondetails

tbl_services

tbl_room

tbl_useraccount

Online Booking System for Camp Holiday Resort and Recreation Area 29

Page 30: Chapters

tbl_basket tbl_servicescategory

tbl_roomtype

3.2.8 Database Design

Online Booking System for Camp Holiday Resort and Recreation Area 30

Page 31: Chapters

Figure 1.9 Camp Holiday Resort and Recreation Area Database Design

3.3 SYSTEM REQUIREMENT SPECIFICATION AND COSTING

Online Booking System for Camp Holiday Resort and Recreation Area 31

Page 32: Chapters

3.3.1 Hardware Specifications

DEVICE ESTIMATED COST

System Unit P15,000

Mouse P150

Keyboard P150

Monitor P4,000

Printer P3,000

3.3.2 Software Specifications

Web Browser (Preferably Google Chrome) Downloadable

Operating System(Windows Server) P9,000

Flash Player Downloadable

MySQL Server P2,000

Adobe Dreamweaver CS4 P4,000

3.3.3 Connectivity Requirements

Internet Connection with at least 1Mb/s P999

________________

Total = 38, 299.00

3.3.4 Development Cost

Human Workforce

Lines of codes

Functionality and capability

Printing P800.00

`` Total = P25,730.00

3.4 Human Workforce Breakdown

Online Booking System for Camp Holiday Resort and Recreation Area 32

P24,930.00

Page 33: Chapters

Human Workforce Breakdown (100 per Hour)

Form Name Number of Hours Total Cost per Form

printpreview 2hrs P200.00

printpreviewBilling 3hrs P300.00

addcharges 9hrs P900.00

addcharges_confirm 1hr P100.00

addcharges_menu 5hrs P500.00

addcharges_menu_insert 1hr P100.00

billing 30hrs P3,000.00

checkin 12hrs P1,200.00

checkin_info 1hr P100.00

checkout 12hrs P1,200.00

reservation 12hrs P1,200.00

reservation_cancel 2hrs P200.00

reservation_confirm 2hrs P200.00

reservation_viewdetails 5hrs P500.00

Edit(amaneties) 3hrs P300.00

New(amaneties) 5hrs P500.00

Edit(guest) 3hrs P300.00

New(guest) 5hrs P500.00

Edit(room_list) 3hrs P300.00

New(room_list) 5hrs P500.00

Edit(room_type) 3hrs P300.00

New(room_type) 5hrs P500.00

Edit(services) 3hrs P300.00

New(services) 5hrs P500.00

Online Booking System for Camp Holiday Resort and Recreation Area 33

Page 34: Chapters

amenities 7hrs P700.00

amenities_update 5hrs P500.00

amenities_validate 4hrs P400.00

guestlist 6hrs P600.00

guestlist_update 30mins P50.00

roomlist 4hrs P400.00

roomlist_update 30mins P50.00

roomlist_validate 30mins P50.00

roomtype 4hrs P400.00

roomtype_update 2hrs P200.00

roomtypes_validate 2hrs P200.00

sevices 5hrs P500.00

services_addcategory 2hrs P200.00

services_addcategory_validate

30mins P50.00

services_update 30mins P50.00

book 16hrs P1,600.00

reservation_insert 2hrs P200.00

reservationinfo 3hrs P300.00

Edit(user) 2hrs P200.00

New(user) 3 hrs P300.00

userlist 2hrs P200.00

userlist_update 30mins P50.00

userlist_validate 30mins P50.00

domain 5hrs P500.00

Online Booking System for Camp Holiday Resort and Recreation Area 34

Page 35: Chapters

home 3hrs P300.00

popup 2mins P40.00

index 2mins P40.00

action 1hr P100.00

bridalpackages 30mins P50.00

cabinroom 30mins P50.00

cafeteria 30mins P50.00

contact 30mins P50.00

debutpackages 30mins P50.00

facilities 30mins P50.00

footer 15mins Free

function 2hr P200.00

guestinfo 3hrs P300.00

guestprev 1hr P100.00

header 3hrs P300.00

panoramic 18hrs P1,800.00

TOTAL 263hrs and 30mins P24,930.00

Table 3.4 Human Workforce Breakdown

The proponents charged P100.00 per hour for every form. A total of 263 hours

and 30 minutes, and accumulated the total amount of P24,930.00.

3.5 Summary

Online Booking System for Camp Holiday Resort and Recreation Area 35

Page 36: Chapters

In System Design Specification, the proponents use Architectural Design to know

what the system is all about and for future reference during data maintenance, Context

Free Diagram to show the entire system as a single process, Data Flow Diagram in order

to know and understand the flow of the system, Entity Relationship Diagram to have a

documentation for the interrelationship between entities in a database, and Database

Design in order to know what to do in building the system.

Chapter 4 PERFORMANCE ANALYSIS

Online Booking System for Camp Holiday Resort and Recreation Area 36

Page 37: Chapters

4.1 Introduction

In this chapter, the proponents tried different methods in developing the system.

Such as on what part we must concentrate on the development for us to reach our target

objective. It will also discuss experimentations on the solutions assumed and the result of

each experiment.

The proponents aim to acquire main functionality of the system that could check

accommodation availability; getting the preferred arrival and departure date of the guest

to acquire the available rooms, book a guest; getting the information both online, call and

walk-in guest, generating bill; additional charges based on the items acquired by the

guest, including data maintenance; adding new room type, number of rooms, facilities,

services rendered by the Camp Holiday Resort and Recreational Area, and generating

payments; save transaction ID in order payment record.

4.2 Experimental

We agreed to meet every night after our training (OJT) in order to work as a team even on late nights so that if ever one member has a question about the system; it is quickly answered by one of our team mates. It was also useful when we had to share some useful methods.

Booking for Online Guest

Online Booking System for Camp Holiday Resort and Recreation Area 37

Page 38: Chapters

Action Expected Result Actual Resort Remarks Diagram

Entry with a blank arrival and departure date

Display error message “Please fill up Arrival/Departure date.”

Display error message “Please fill up Arrival/Departure date.”

The User must be select arrival and departure date to check available accommodation

Figure 2.1

Failure to fill up required fields

Display error message “This field is required.”

Display error message “This field is required

The User must fill all required fields

Figure 2.2

Table 1.0 Online Booking

In this table shows that the online guest must select the correct arrival and

departure date before the guest select his/her available rooms. After selecting the

available rooms, the guest must fill all the required fields in the registration form.

Log in form for Registered User

Action Expected Result Actual Resort Remarks Diagram

Entry with wrong USERNAME and PASSWORD.

Display error message “Invalid Username and Password”

Display error message “Invalid Username and Password”

The user must enter the valid username and password

Figure 2.3

Table 1.1 User Login

In this table, it shows that the user must input valid username and

password in order to proceed to the backend system.

Reservation for Walk-in Guest

Online Booking System for Camp Holiday Resort and Recreation Area 38

Page 39: Chapters

Action Expected Result Actual Resort Remarks DiagramFailure to select reservation type

Display error message “Select is not a correct reservation type.”

Display error message “Select is not a correct reservation type.”

The User must select desired reservation type

Figure 2.4

Incorrect arrival and departure date selected

Display error message “Please select correct arrival date.”

Display error message “Please select correct arrival date.”

The arrival date must be less than the departure date selected

Figure 2.5

Saving Guest info with empty fields

Display error message “User fields should not be empty.”

Display error message “User fields should not be empty”

The User must fill up all fields.

Figure 2.6

Saving Guest info with complete details

The Reservation is Successfully Created!

The Reservation is Successfully Created!

Figure 2.7

Table 1.2 Reservation for walk-in guest

In this table shows that if the receptionist will cater for the walk-in guest the

receptionist must select first the reservation type, Select the correct arrival and departure

date, before selecting the available rooms, after selecting the rooms, the receptionist must

input all the required fields information for the guest.

Master List

Online Booking System for Camp Holiday Resort and Recreation Area 39

Page 40: Chapters

Action Expected Result Actual Resort Remarks DiagramFailure to fill up required fields for adding guest

Display error message “fields should not be empty.

Display error message “fields should not be empty.

The admin must fill up all required fields for adding guest.

Figure 2.8

Failure to fill up required fields for adding room.

Display error message “fields should not be empty

Display error message “fields should not be empty

The admin must fill up all required fields for adding room.

Figure 2.9

Failure to fill up required fields for adding room type

Display error message “fields should not be empty

Display error message “fields should not be empty

The admin must fill up all required fields for adding room type.

Figure 3.0

Failure to fill up required fields for adding facilities.

Display error message “fields should not be empty

Display error message “fields should not be empty

The admin must fill up all required fields for adding facilities

Figure 3.1

Failure to fill up required fields for adding services.

Display error message “fields should not be empty

Display error message “fields should not be empty

The admin must fill up all required fields for adding services

Figure 3.2

Table 1.3 Master List

In this table shows that if the admin will add rooms, facilities and services for

their resort, the admin must fill all the required fields.

4.3 Results and Analysis

Online Booking System for Camp Holiday Resort and Recreation Area 40

Page 41: Chapters

The proponents carried on interviews and perform some research about the

current system of Camp Holiday Resort and Recreation Area that helps them

producing the most effective solutions for every application that caters the needs

of a user including the guest, receptionist and the admin. The proposed system

will help project manager and developer to manage the project effectively

following the current processes that our system has.

For the online booking, the guest must first select his/her preferred arrival

or departure date enable to acquire all the available accommodation based on the

range of date he/she selected. After checking the accommodation availability, the

guest can select his/her preferred room type, number of rooms he/she wants to

acquire. If the guest already picked the preferred room type, the guest must give

his/her information. Correct information is highly required for that will be the

basis of the receptionist upon the arrival of the guest in the Camp Holiday Resort

and Recreation Area together with his/her valid ID.

For the receptionist side, they can accommodate walk-in guest same with

the process in online booking, the guest must first select his/her preferred arrival

or departure date enable to acquire all the available accommodation based on the

range of date he/she selected. The receptionist can only check-in a reserved guest

if the arrival date is already active. It can also add up additional charges if the

guest acquire item from the amenities of the Camp Holiday Resort and Recreation

Area.

For the administrator side the admin has the control to add and modify the

facilities and services of the resort the admin can also cater the reservation for

walk in guest. And all the functionalities of the system, the administrator can only

maintain it.

The proponents conducted an evaluation to test the system. Mr. Glen

Germino, the manager of Camp Holiday Resort and Recreation Area took the said

evaluation to check the functionality, capability and the limitations of the system.

Online Booking System for Camp Holiday Resort and Recreation Area 41

Page 42: Chapters

Figure 4.3.1 Comment or Suggestion

From the comment and suggestion he stated as shown in figure 4.3.1, the

system is fully functional. The capability of the system meets the requirement of

the client.

The proponents also conducted a system evaluation to other respondents. They

also give a high rate to all the functionality of the system. (Refer to Appendix, Figure

4.3.4 to 4.3.5 Survey Questionnaires)

From the evaluation, the proponents tabulated, graph and interpret the

results. (Refer to Table 4.3.2 System Performance Rate, Figure 4.3.3 System

Average Rate)

Questions Average Performance Interpretation

Online Booking System for Camp Holiday Resort and Recreation Area 42

Page 43: Chapters

1. Please rate on how effective the website when it comes to user friendly?

4 Excellent

2. How effective is the functionality of the Panoramic Virtual Tour? 4.5 Excellent

3. How effective the Booking System in both online booking and walk-in booking?

3.5 Above Average

4. Please rate on how effective the system when it comes to Data Maintenance?

3.5 Above Average

5. How effective the system when it comes to Billing System? 3.5 Above Average

Table 4.3.2 System Performance Rate

This represents the average performance of the system and its corresponding interpretation from the evaluation conducted. The system got the highest rate based on its performance; the functionality meets the requirement of the client.

4.3.1 Constant Values

The results that where plotted on System Performance Rate (Refer to table 4.3.2 above), where based on the constant values bellow.

Online Booking System for Camp Holiday Resort and Recreation Area 43

Page 44: Chapters

1.0 – 1.8 = Extremely Poor

1.9 – 2.6 = Below Average

2.7 – 3.4 = Average

3.5 – 4.2 = Above Average

4.3 – 5 = Excellent

4.3.2 Mean Diagram

The graph bellow was obtained by using the Mean Diagram. In getting the Mean Diagram, the proponents provided each choice with specific values. Each choice that was answered by the interviewee was summed up and divides by the total number questions.

Figure 4.3.2 System Average Rate

The graph shows the average rate of the system in every question from the results of the evaluation. This graph shows that the system capability and functionality is working effectively.

4.3.3 Overall Review of the Proposed System

Online Booking System for Camp Holiday Resort and Recreation Area 44

Page 45: Chapters

Figure 4.3.3 Overall Review of the proposed System

The graph above shows the overall review of the Online Booking System

for Camp Holiday Resort and Recreation Area. Base on the graph system reach the

amount of 3.5 which is Above Average.

4.4 Summary

In this section,  the result of the series of interviews, researches and tests

were being examined and considered. The proposed system entitled Camp holiday

Resort and Recreation Area Online booking System help to provide to cater

customer for booking through online and also to make advertisement of their

resort. After the series of test, the proponent realized that our system is very

important not only to our client but also to the user of the system. The testing

helps us determine the ability of our system. And it could help us find the

insufficient of the system. Every module conducted a series of test. First, the

booking for guest through online and walk-in and test the other functionalities of

the system at the admin side.

Front end side consists of online transaction, like online booking, viewing

of facilities and rates of the resort and all the information and services of the

Online Booking System for Camp Holiday Resort and Recreation Area 45

Page 46: Chapters

resort is attached in the frontend side. During the testing, the proponents

encounter errors and problem of the system. The problems encounter during the

testing is the inaccurate in terms of booking the rooms during the current date; the

proponents make a solution to solve this problem.

The Admin side will display the overview functionalities of the resort such

as reservation for walk-in guest and the maintenance of the system. This side

encounters certain problems specially the reservation for walk in customer. If

there is an empty field during adding the information of the guest, message box

displays that the fields should not be empty.

CHAPTER 5 CONCLUSION

Online Booking System for Camp Holiday Resort and Recreation Area 46

Page 47: Chapters

After conducting interviews and researches the proponent developed system that

helps not only to the owner of the system but also the users of the system.

With the use of the system Online Booking System for Camp Holiday and

Recreation Area, it helps them to achieve their goals cater services to their clients

through online, help them market their room inventory online and reach out to their

consumers directly. It is a cost effective method to help them create, sustain and expand

their inventory online.

For the Online transaction, it helps to the client to cater their customer though

online not only to cater the customer but also to make advertisement of their resort.

For the admin side, it helps them to cater their customer for offline transaction. It

will give them the authority to access to all the features and preferences. They decide and

they implement.

And for the overall, the system will help them to improve their services, less

chance of effort to cater their guest. Their guests can make confirmed reservations from

anywhere in the world at anytime, day or night, from the rates and availability that they

position through administrator's interface.

BIBLIOGRAPHY

Online Booking System for Camp Holiday Resort and Recreation Area 47

Page 48: Chapters

E-Book:

George Szifo, http://ezinearticles.com/?10-Advantages-of-Online-Booking-

Software&id=4397594 - Jun 01, 2010

Arnault, Web design SPIP and 360 ° virtual tours, http://www.openstudio.fr/jQuery-

virtual-tour.html?lang=en

World Wide Web (www):

http://www.openstudio.fr/jquery-virtual-tour/

http://www.dotcomtechno.com/products/Online-Hotel-Reservation-Management-system/

http://www.thepinnacledavao.com/

http://www.marcopolohotels.com/hotels/philippines/davao/marco_polo_davao/index.html

http://www.apoview.com/

http://www.google.com.ph/

http://www.w3schools.com/php/

ACKNOWLEDGEMENT

Online Booking System for Camp Holiday Resort and Recreation Area 48

Page 49: Chapters

First and above all, we praise God, the almighty for providing us this opportunity

and granting us the capability to proceed successfully. This thesis appears in its current

form due to the assistance and guidance of several people. We would therefore like to

offer our sincere thanks to all of them and express our deepest gratitude to the several

people behind the success of this project.

We wish to express our warm and sincere thanks to Sir Glen Germino the

manager of Camp Holiday Resort and Recreation Area for helping and allowing us to

access the information of the resort in the development of this project.

We are deeply grateful to our beloved adviser and also at the same time our IT

Project coordinator Ms. Charyl F. Yanong, for guiding us and inspiring us to push

through with this project.

Our warm thanks are due to Ms. Shiela Aringa Ildefonso and Ms. Charissa

Pajaron, our grammarian for guiding us in the documentation of this project.

To our dear parents, we would like to thank them for all the support that they

gave, for the love and care, spiritual and financial support.

To all our classmates and friends, thank you guy for the times that we have

shared, through ups and downs.

APPENDICES

Online Booking System for Camp Holiday Resort and Recreation Area 49

Page 50: Chapters

USER’S MANUAL

Figure 2.0 - Home Page

This figure shows the Home Page of Camp Holiday Resort and Recreation Area.

Online Booking System for Camp Holiday Resort and Recreation Area 50

Page 51: Chapters

Figure 2.1 - Online Booking

The user must select arrival and departure date, it will prompt a message box stated “ Please fill up Arrival / Departure date. “ if the textboxes are empty.

Online Booking System for Camp Holiday Resort and Recreation Area 51

Page 52: Chapters

Figure 2.2 - Guest Information

This figure shows that the user must fill in the information that is required, if not, a message will display “This field is required “. Note that textboxes with asterisk ( * ) is required to fill in.

Online Booking System for Camp Holiday Resort and Recreation Area 52

Page 53: Chapters

Figure 2.3 - Login

If the user input incorrect password a message will display “Invalid Username and Password.” If the user input a correct password they can Login to the system. Every user has their respective account to access.

Figure 2.4 - Walk-in Reservation

This figure shows that a message “ - Select – is not a correct Reservation Type ” will prompt if the Reservation Type is not valid.

Online Booking System for Camp Holiday Resort and Recreation Area 53

Page 54: Chapters

Figure 2.5 - Walk-in Reservation

A message will prompt “Please Select Correct Arrival Date.” if the arrival date is ahead of day with the departure date.

Figure 2.6 - Personal Information

This figure shows an error message if the textboxes are empty.

Online Booking System for Camp Holiday Resort and Recreation Area 54

Page 55: Chapters

Figure 2.7 - Reservation

By clicking the button Finish and if the textboxes are fill in, a message will display “ Reservation Successfully Created...! ”.

Online Booking System for Camp Holiday Resort and Recreation Area 55

Page 56: Chapters

Figure 2.8 - Add Guests

This figure shows that a message box will prompt if the required fields are empty.

Figure 2.9 - Add Room

This figure shows that a message box will prompt if the required fields are empty.

Online Booking System for Camp Holiday Resort and Recreation Area 56

Page 57: Chapters

Figure 3.0 - Add Room Type

This figure shows that a message box will prompt if the required fields are empty.

Figure 3.1 - Add Facilities

This figure shows that a message box will prompt if the required fields are empty.

Online Booking System for Camp Holiday Resort and Recreation Area 57

Page 58: Chapters

Figure 3.2 - Add Services

This figure shows that a message box will prompt if the required fields are empty.

Online Booking System for Camp Holiday Resort and Recreation Area 58

Page 59: Chapters

SOURCE CODE

SOURCE CODE

/*----------------------- admin / connection / connection.php ---------------------------------- */<?php$dbhost = "localhost";$dbname = "db_campholiday";$dbuser = "root";$dbpass = "";

$server=mysql_connect ( $dbhost, $dbuser, $dbpass)or die("<h1>Server is currently unavailable</h1>");$conn=mysql_select_db($dbname) or die(mysql_error());?>/*----------------------- admin / functions / myfunction.php ----------------------------------- */<?phpfunction compareDates ($d1, $d2) { return strtotime($d1)-strtotime($d2); }?>/*----------------------- admin / js / calendar.js -------------------------------------------------- */// JavaScript Document// default settingsvar A_TCALDEF = {'months' : ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],'weekdays' : ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],'yearscroll': true, // show year scroller'weekstart': 0, // first day of week: 0-Su or 1-Mo'centyear' : 70, // 2 digit years less than 'centyear' are in 20xx, othewise in 19xx.'imgpath' : 'images/calendar/' // directory with calendar images}// date parsing functionfunction f_tcalParseDate (s_date) {

var re_date = /^\s*(\d{1,2})\/(\d{1,2})\/(\d{2,4})\s*$/;if (!re_date.exec(s_date))return alert ("Invalid date: '" + s_date + "'.\nAccepted format is mm/dd/yyyy.")var n_day = Number(RegExp.$2),n_month = Number(RegExp.$1),n_year = Number(RegExp.$3);

if (n_year < 100)n_year += (n_year < this.a_tpl.centyear ? 2000 : 1900);if (n_month < 1 || n_month > 12)return alert ("Invalid month value: '" + n_month + "'.\nAllowed range is 01-12.");var d_numdays = new Date(n_year, n_month, 0);if (n_day > d_numdays.getDate())

Online Booking System for Camp Holiday Resort and Recreation Area 59

Page 60: Chapters

return alert("Invalid day of month value: '" + n_day + "'.\nAllowed range for selected month is 01 - " + d_numdays.getDate() + ".");

return new Date (n_year, n_month - 1, n_day);}// date generating functionfunction f_tcalGenerDate (d_date) {return ((d_date.getMonth() < 9 ? '0' : '') + (d_date.getMonth() + 1) + "/"+ (d_date.getDate() < 10 ? '0' : '') + d_date.getDate() + "/"+ d_date.getFullYear());}

// implementationfunction tcal (a_cfg, a_tpl) {

// apply default template if not specifiedif (!a_tpl)a_tpl = A_TCALDEF;

// register in global collectionsif (!window.A_TCALS)window.A_TCALS = [];if (!window.A_TCALSIDX)window.A_TCALSIDX = [];

this.s_id = a_cfg.id ? a_cfg.id : A_TCALS.length;window.A_TCALS[this.s_id] = this;window.A_TCALSIDX[window.A_TCALSIDX.length] = this;

// assign methodsthis.f_show = f_tcalShow;this.f_hide = f_tcalHide;this.f_toggle = f_tcalToggle;this.f_update = f_tcalUpdate;this.f_relDate = f_tcalRelDate;this.f_parseDate = f_tcalParseDate;this.f_generDate = f_tcalGenerDate;

// create calendar iconthis.s_iconId = 'tcalico_' + this.s_id;this.e_icon = f_getElement(this.s_iconId);if (!this.e_icon) {document.write('<img src="' + a_tpl.imgpath + 'cal.gif" id="' + this.s_iconId + '" onclick="A_TCALS[\'' + this.s_id + '\'].f_toggle()" class="tcalIcon" alt="Open Calendar" />');this.e_icon = f_getElement(this.s_iconId);}// save received parameters

Online Booking System for Camp Holiday Resort and Recreation Area 60

Page 61: Chapters

this.a_cfg = a_cfg;this.a_tpl = a_tpl;}

function f_tcalShow (d_date) {

// find input fieldif (!this.a_cfg.controlname)throw("TC: control name is not specified");if (this.a_cfg.formname) {var e_form = document.forms[this.a_cfg.formname];if (!e_form)throw("TC: form '" + this.a_cfg.formname + "' can not be found");this.e_input = e_form.elements[this.a_cfg.controlname];}elsethis.e_input = f_getElement(this.a_cfg.controlname);

if (!this.e_input || !this.e_input.tagName || this.e_input.tagName != 'INPUT')throw("TC: element '" + this.a_cfg.controlname + "' does not exist in "+ (this.a_cfg.formname ? "form '" + this.a_cfg.controlname + "'" : 'this document'));

// dynamically create HTML elements if neededthis.e_div = f_getElement('tcal');if (!this.e_div) {this.e_div = document.createElement("DIV");this.e_div.id = 'tcal';document.body.appendChild(this.e_div);}this.e_shade = f_getElement('tcalShade');if (!this.e_shade) {this.e_shade = document.createElement("DIV");this.e_shade.id = 'tcalShade';document.body.appendChild(this.e_shade);}this.e_iframe = f_getElement('tcalIF')if (b_ieFix && !this.e_iframe) {this.e_iframe = document.createElement("IFRAME");this.e_iframe.style.filter = 'alpha(opacity=0)';this.e_iframe.id = 'tcalIF';this.e_iframe.src = this.a_tpl.imgpath + 'pixel.gif';document.body.appendChild(this.e_iframe);}

// hide all calendarsf_tcalHideAll();

// generate HTML and show calendarthis.e_icon = f_getElement(this.s_iconId);

Online Booking System for Camp Holiday Resort and Recreation Area 61

Page 62: Chapters

if (!this.f_update())return;

this.e_div.style.visibility = 'visible';this.e_shade.style.visibility = 'visible';if (this.e_iframe)this.e_iframe.style.visibility = 'visible';

// change icon and statusthis.e_icon.src = this.a_tpl.imgpath + 'no_cal.gif';this.e_icon.title = 'Close Calendar';this.b_visible = true;}

function f_tcalHide (n_date) {if (n_date)this.e_input.value = this.f_generDate(new Date(n_date));

// no action if not visibleif (!this.b_visible)return;

// hide elementsif (this.e_iframe)this.e_iframe.style.visibility = 'hidden';if (this.e_shade)this.e_shade.style.visibility = 'hidden';this.e_div.style.visibility = 'hidden';

// change icon and statusthis.e_icon = f_getElement(this.s_iconId);this.e_icon.src = this.a_tpl.imgpath + 'cal.gif';this.e_icon.title = 'Open Calendar';this.b_visible = false;}

function f_tcalToggle () {return this.b_visible ? this.f_hide() : this.f_show();}

function f_tcalUpdate (d_date) {

var d_today = this.a_cfg.today ? this.f_parseDate(this.a_cfg.today) : f_tcalResetTime(new Date());var d_selected = this.e_input.value == ''? (this.a_cfg.selected ? this.f_parseDate(this.a_cfg.selected) : d_today): this.f_parseDate(this.e_input.value);

// figure out date to displayif (!d_date)

Online Booking System for Camp Holiday Resort and Recreation Area 62

Page 63: Chapters

// selected by defaultd_date = d_selected;else if (typeof(d_date) == 'number')// get from numberd_date = f_tcalResetTime(new Date(d_date));else if (typeof(d_date) == 'string')// parse from stringthis.f_parseDate(d_date);

if (!d_date) return false;

// first date to displayvar d_firstday = new Date(d_date);d_firstday.setDate(1);d_firstday.setDate(1 - (7 + d_firstday.getDay() - this.a_tpl.weekstart) % 7);

var a_class, s_html = '<table class="ctrl"><tbody><tr>'+ (this.a_tpl.yearscroll ? '<td' + this.f_relDate(d_date, -1, 'y') + ' title="Previous Year"><img src="' + this.a_tpl.imgpath + 'prev_year.gif" /></td>' : '')+ '<td' + this.f_relDate(d_date, -1) + ' title="Previous Month"><img src="' + this.a_tpl.imgpath + 'prev_mon.gif" /></td><th>'+ this.a_tpl.months[d_date.getMonth()] + ' ' + d_date.getFullYear()+ '</th><td' + this.f_relDate(d_date, 1) + ' title="Next Month"><img src="' + this.a_tpl.imgpath + 'next_mon.gif" /></td>'+ (this.a_tpl.yearscroll ? '<td' + this.f_relDate(d_date, 1, 'y') + ' title="Next Year"><img src="' + this.a_tpl.imgpath + 'next_year.gif" /></td></td>' : '')+ '</tr></tbody></table><table><tbody><tr class="wd">';

// print weekdays titlesfor (var i = 0; i < 7; i++)s_html += '<th>' + this.a_tpl.weekdays[(this.a_tpl.weekstart + i) % 7] + '</th>';s_html += '</tr>' ;

// print calendar tablevar n_date, n_month, d_current = new Date(d_firstday);while (d_current.getMonth() == d_date.getMonth() ||d_current.getMonth() == d_firstday.getMonth()) {

// print row heders_html +='<tr>';for (var n_wday = 0; n_wday < 7; n_wday++) {

a_class = [];n_date = d_current.getDate();n_month = d_current.getMonth();

// other monthif (d_current.getMonth() != d_date.getMonth())a_class[a_class.length] = 'othermonth';

Online Booking System for Camp Holiday Resort and Recreation Area 63

Page 64: Chapters

// weekendif (d_current.getDay() == 0 || d_current.getDay() == 6)a_class[a_class.length] = 'weekend';// todayif (d_current.valueOf() == d_today.valueOf())a_class[a_class.length] = 'today';// selectedif (d_current.valueOf() == d_selected.valueOf())a_class[a_class.length] = 'selected';

s_html += '<td onclick="A_TCALS[\'' + this.s_id + '\'].f_hide(' + d_current.valueOf() + ')"' + (a_class.length ? ' class="' + a_class.join(' ') + '">' : '>') + n_date + '</td>'

d_current.setDate(++n_date);while (d_current.getDate() != n_date && d_current.getMonth() == n_month) {d_current.setHours(d_current.getHours + 1);d_current = f_tcalResetTime(d_current);}}// print row footers_html +='</tr>';}s_html +='</tbody></table>';

// update HTML, positions and sizesthis.e_div.innerHTML = s_html;

var n_width = this.e_div.offsetWidth;var n_height = this.e_div.offsetHeight;var n_top = f_getPosition (this.e_icon, 'Top') + this.e_icon.offsetHeight;var n_left = f_getPosition (this.e_icon, 'Left') - n_width + this.e_icon.offsetWidth;if (n_left < 0) n_left = 0;

this.e_div.style.left = n_left + 'px';this.e_div.style.top = n_top + 'px';

this.e_shade.style.width = (n_width + 8) + 'px';this.e_shade.style.left = (n_left - 1) + 'px';this.e_shade.style.top = (n_top - 1) + 'px';this.e_shade.innerHTML = b_ieFix? '<table><tbody><tr><td rowspan="2" colspan="2" width="6"><img src="' + this.a_tpl.imgpath + 'pixel.gif"></td><td width="7" height="7" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + this.a_tpl.imgpath + 'shade_tr.png\', sizingMethod=\'scale\');"><img src="' + this.a_tpl.imgpath + 'pixel.gif"></td></tr><tr><td height="' + (n_height - 7) + '" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + this.a_tpl.imgpath + 'shade_mr.png\', sizingMethod=\'scale\');"><img src="' + this.a_tpl.imgpath + 'pixel.gif"></td></tr><tr><td width="7" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + this.a_tpl.imgpath + 'shade_bl.png\', sizingMethod=\'scale\');"><img src="' + this.a_tpl.imgpath + 'pixel.gif"></td><td

Online Booking System for Camp Holiday Resort and Recreation Area 64

Page 65: Chapters

style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + this.a_tpl.imgpath + 'shade_bm.png\', sizingMethod=\'scale\');" height="7" align="left"><img src="' + this.a_tpl.imgpath + 'pixel.gif"></td><td style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'' + this.a_tpl.imgpath + 'shade_br.png\', sizingMethod=\'scale\');"><img src="' + this.a_tpl.imgpath + 'pixel.gif"></td></tr><tbody></table>': '<table><tbody><tr><td rowspan="2" width="6"><img src="' + this.a_tpl.imgpath + 'pixel.gif"></td><td rowspan="2"><img src="' + this.a_tpl.imgpath + 'pixel.gif"></td><td width="7" height="7"><img src="' + this.a_tpl.imgpath + 'shade_tr.png"></td></tr><tr><td background="' + this.a_tpl.imgpath + 'shade_mr.png" height="' + (n_height - 7) + '"><img src="' + this.a_tpl.imgpath + 'pixel.gif"></td></tr><tr><td><img src="' + this.a_tpl.imgpath + 'shade_bl.png"></td><td background="' + this.a_tpl.imgpath + 'shade_bm.png" height="7" align="left"><img src="' + this.a_tpl.imgpath + 'pixel.gif"></td><td><img src="' + this.a_tpl.imgpath + 'shade_br.png"></td></tr><tbody></table>';

if (this.e_iframe) {this.e_iframe.style.left = n_left + 'px';this.e_iframe.style.top = n_top + 'px';this.e_iframe.style.width = (n_width + 6) + 'px';this.e_iframe.style.height = (n_height + 6) +'px';}return true;}

function f_getPosition (e_elemRef, s_coord) {var n_pos = 0, n_offset,e_elem = e_elemRef;

while (e_elem) {n_offset = e_elem["offset" + s_coord];n_pos += n_offset;e_elem = e_elem.offsetParent;}// margin correction in some browsersif (b_ieMac)n_pos += parseInt(document.body[s_coord.toLowerCase() + 'Margin']);else if (b_safari)n_pos -= n_offset;

e_elem = e_elemRef;while (e_elem != document.body) {n_offset = e_elem["scroll" + s_coord];if (n_offset && e_elem.style.overflow == 'scroll')n_pos -= n_offset;e_elem = e_elem.parentNode;}return n_pos;}

function f_tcalRelDate (d_date, d_diff, s_units) {var s_units = (s_units == 'y' ? 'FullYear' : 'Month');

Online Booking System for Camp Holiday Resort and Recreation Area 65

Page 66: Chapters

var d_result = new Date(d_date);d_result['set' + s_units](d_date['get' + s_units]() + d_diff);if (d_result.getDate() != d_date.getDate())d_result.setDate(0);return ' onclick="A_TCALS[\'' + this.s_id + '\'].f_update(' + d_result.valueOf() + ')"';}

function f_tcalHideAll () {for (var i = 0; i < window.A_TCALSIDX.length; i++)window.A_TCALSIDX[i].f_hide();}

function f_tcalResetTime (d_date) {d_date.setHours(0);d_date.setMinutes(0);d_date.setSeconds(0);d_date.setMilliseconds(0);return d_date;}

f_getElement = document.all ?function (s_id) { return document.all[s_id] } :function (s_id) { return document.getElementById(s_id) };

if (document.addEventListener)window.addEventListener('scroll', f_tcalHideAll, false);if (window.attachEvent)window.attachEvent('onscroll', f_tcalHideAll);

// global variablesvar s_userAgent = navigator.userAgent.toLowerCase(),re_webkit = /WebKit\/(\d+)/i;var b_mac = s_userAgent.indexOf('mac') != -1,b_ie5 = s_userAgent.indexOf('msie 5') != -1,b_ie6 = s_userAgent.indexOf('msie 6') != -1 && s_userAgent.indexOf('opera') == -1;var b_ieFix = b_ie5 || b_ie6,b_ieMac = b_mac && b_ie5,b_safari = b_mac && re_webkit.exec(s_userAgent) && Number(RegExp.$1) < 500;

/*----------------------- admin / js / filterTable.js ------------------------------------------------ */function filter (term, adminlist, cellNr){var suche = term.value.toLowerCase();var table = document.getElementById(adminlist);var ele;for (var r = 1; r < table.rows.length; r++){ele = table.rows[r].cells[cellNr].innerHTML.replace(/<[^>]+>/g,"");if (ele.toLowerCase().indexOf(suche)>=0 )table.rows[r].style.display = '';else table.rows[r].style.display = 'none';

Online Booking System for Camp Holiday Resort and Recreation Area 66

Page 67: Chapters

}}

/*----------------------- admin / js / menu.js ------------------------------------------------------ */sfHover = function() {var sfEls = document.getElementById("menu").getElementsByTagName("LI");for (var i=0; i<sfEls.length; i++) {sfEls[i].onmouseover=function() {this.className+=" sfhover";}sfEls[i].onmouseout=function() {this.className=this.className.replace(new RegExp(" sfhover\\b"), "");}}}if (window.attachEvent) window.attachEvent("onload", sfHover);

/*----------------------- admin / Print / printpreview.php --------------------------------------- */<html><head></head><body style="font-family: Verdana; font-size:12px;"><div style="width: 800px; margin-left:auto; margin-right:auto;"><div align="center"><a href="#">Print this page</a></div><div align="center" style="font-size:24px; font-weight:bolder; padding-top:10px;">Camp Holiday Resort and Recreation Area</div><div align="center" >Island Garden City of Samal</div><div style="padding-top:30px;"><?phpinclude("connection/connection.php");$id = $_SESSION['id'];

$sqlString = " SELECT G.*, R.*FROM tbl_guest GINNER JOIN tbl_reservation RON G.guest_id = R.guest_idWHERE R.guest_id = $id";$result = mysql_query($sqlString) or die(mysql_error());$row = mysql_fetch_object($result);?><table style="font-family: Verdana; font-size:12px;"><tr><td>Name</td><td>:</td><td><?php echo $row->firstName." ".$row->middleInitial.". ".$row->lastName;?></td></tr><tr>

Online Booking System for Camp Holiday Resort and Recreation Area 67

Page 68: Chapters

<td>Company</td><td>:</td><td><?php echo $row->Company;?></td></tr><tr><td>Address</td><td>:</td><td><?php echo $row->Address;?></td></tr></table></div><hr width="800px" align="left">

<hr width="800px" align="left"><div style="font-size:12px;" ><table style="font-family: Verdana; font-size:12px;" align="center"> <thead> <tr> <th style="padding-right:30px;">Description</th><th style="padding-left:30px; padding-right:30px;">Qty</th><th style="padding-left:30px; padding-right:30px;">Unit Price</th><th style="padding-left:30px; padding-right:30px;">Amount</th></tr> </thead><tbody> <tbody> <?php $sql2 = " SELECT basket.*, service.Description, service.Price FROM tbl_basket AS basket INNER JOIN tbl_services AS service ON basket.service_id = service.service_id";$rs=mysql_query($sql2);

while($row=mysql_fetch_array($rs)){ ?><tr><td align="center"><?php echo $row['Description']; ?></td> <td align="center"><?php echo $row['Qty']; ?></td><td align="center"><?php echo $row['Price']; ?></td><?php $qty = $row['Qty'];$price = $row['Price'];$sum = $qty * $price; ?><input type="hidden" name="price" value="<?php echo $sum; ?>" /><td align="center"><?php echo $sum; ?></td>

</tr>

Online Booking System for Camp Holiday Resort and Recreation Area 68

Page 69: Chapters

<?php $sum1 = $sum + $sum1; } ?> <tr><td colspan="2"></td><th>Total</th> <th><?php echo $sum1; ?></th></tr> </tbody> </table> </div><hr width="800px" align="left"><br /><br /><br /><br /><br /><br /><hr width="300px" align="left">Signature of Guest<br /><br /><br /><br />I agree that my liability in this bill is not waived and agree to be held personally liable<br />in the event that the indicated person, company or association fails to pay the full amount<br />of these charges.<br /><br /><br /><br /><hr width="800px" align="left"><div align="center">Thank you for staying with us. We hope to welcome you back soon.</div></div></body></html>

/*----------------------- admin / Print / printpreviewBilling.php ------------------------------- */<html><head></head><body style="font-family: Verdana; font-size:12px;"><div style="width: 800px; margin-left:auto; margin-right:auto;"><div align="center"><a href="#">Print this page</a></div><div align="center" style="font-size:24px; font-weight:bolder; padding-top:10px;">Billing</div><div align="center" style="font-size:24px; font-weight:bolder; padding-top:10px;">Camp Holiday Resort and Recreation Area</div><div align="center" >Island Garden City of Samal</div><div style="padding-top:30px;"><?phpinclude("connection/connection.php");$id = $_SESSION['id'];

$sqlString = " SELECT G.*, R.*

Online Booking System for Camp Holiday Resort and Recreation Area 69

Page 70: Chapters

FROM tbl_guest GINNER JOIN tbl_reservation RON G.guest_id = R.guest_idWHERE R.guest_id = $id";$result = mysql_query($sqlString) or die(mysql_error());$row = mysql_fetch_object($result);?><table style="font-family: Verdana; font-size:12px;"><tr><td>Name</td><td>:</td><td><?php echo $row->firstName." ".$row->middleInitial.". ".$row->lastName;?></td></tr><tr><td>Company</td><td>:</td><td><?php echo $row->Company;?></td></tr><tr><td>Address</td><td>:</td><td><?php echo $row->Address;?></td></tr></table></div><hr width="800px" align="left">

<hr width="800px" align="left"><div style="font-size:12px;" ><table style="font-family: Verdana; font-size:12px;" align="center"> <thead> <tr> <th style="padding-right:30px;">Description</th><th style="padding-left:30px; padding-right:30px;">Qty</th><th style="padding-left:30px; padding-right:30px;">Unit Price</th><th style="padding-left:30px; padding-right:30px;">Amount</th></tr> </thead><tbody> <tbody> <?php $sql2 = " SELECT basket.*, service.Description, service.Price FROM tbl_basket AS basket INNER JOIN tbl_services AS service ON basket.service_id = service.service_id";$rs=mysql_query($sql2);

Online Booking System for Camp Holiday Resort and Recreation Area 70

Page 71: Chapters

while($row=mysql_fetch_array($rs)){ ?><tr><td align="center"><?php echo $row['Description']; ?></td> <td align="center"><?php echo $row['Qty']; ?></td><td align="center"><?php echo $row['Price']; ?></td><?php $qty = $row['Qty'];$price = $row['Price'];$sum = $qty * $price; ?><input type="hidden" name="price" value="<?php echo $sum; ?>" /><td align="center"><?php echo $sum; ?></td>

</tr> <?php $sum1 = $sum + $sum1; } ?> <tr><td colspan="2"></td><th>Total</th> <th><?php echo $sum1; ?></th></tr> </tbody> </table> </div><hr width="800px" align="left"><br /><br /><br /><br /><br /><br /><hr width="300px" align="left">Signature of Guest<br /><br /><br /><br />I agree that my liability in this bill is not waived and agree to be held personally liable<br />in the event that the indicated person, company or association fails to pay the full amount<br />of these charges.<br /><br /><br /><br /><hr width="800px" align="left"><div align="center">Thank you for staying with us. We hope to welcome you back soon.</div></div></body></html>

/*----------------------- admin / Sub / Home / addcharges.php ------------------------------- */<?php session_start(); include("connection/connection.php");?>

Online Booking System for Camp Holiday Resort and Recreation Area 71

Page 72: Chapters

<script>function getdelete ( selectedtype ){document.adminForm.deleteuser.value = selectedtype;document.adminForm.submit();}checked=false;function checkedAll(frm1) {var aa = document.getElementById('frm1');if (checked == false){checked = true} else {checked = false}for (var i =0; i < aa.length; i++){aa[i].checked = checked;}}function PopupCenter(pageURL, title,w,h) {var left = (screen.width/2)-(w/2);var top = (screen.height/2)-(h/2);var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);} </script><?php$do_delete = $_POST['deleteuser'];$id = $_POST['chk'];

if($do_delete){$N = count($id);

for($i=0;$i < $N; $i++){$sql = "DELETE FROM tbl_basket WHERE service_id = '".$id[$i]."'";mysql_query($sql) or die(mysql_error());}}?> <div id="element-box2"><div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <?php$_SESSION['id'] = $_GET['id'];

$sqlString = " SELECT G.*, R.*

Online Booking System for Camp Holiday Resort and Recreation Area 72

Page 73: Chapters

FROM tbl_guest GINNER JOIN tbl_reservation RON G.guest_id = R.guest_idWHERE R.guest_id = '".$_SESSION['id']."'";$result = mysql_query($sqlString) or die(mysql_error());$row = mysql_fetch_object($result);?><form action="<?php echo $PHP_SELF ?>" name="checkavailability" method="post"><table border="0"><tr><td >Company Name</td><td>:</td><td style="color:#060; font-weight:bolder;"><?php if($row->Company == ""){echo " XXXXX ";} else {echo $row->Company;}?></td></tr><tr><td>Name</td><td>:</td><td style="color:#060; font-weight:bolder;"><?php echo $row->lastName.", ".$row->firstName." ".$row->middleInitial.".";?></td><td width="40px"><td><td >Room Type</td><td>:</td><td style="color:#060; font-weight:bolder;"><?php echo $row->roomName;?></td></tr><tr><td >Address</td><td>:</td><td style="color:#060; font-weight:bolder;"><?php echo $row->Address;?></td><td width="40px"><td><td >Room No.</td><td>:</td><td style="color:#060; font-weight:bolder;"><?php echo $row->roomNumber;?></td></tr></table></form> </div> <div class="b"> <div class="b"> <div class="b"></div>

Online Booking System for Camp Holiday Resort and Recreation Area 73

Page 74: Chapters

</div> </div> </div> <br /><div id="toolbar-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <form action="" method="post" name="adminForm" id="frm1"><input type="hidden" name="deleteuser" /><div class="toolbar" id="toolbar"> <table class="toolbar"><tr> <td class="button" id="toolbar-delete"> <a href="javascript:getdelete('delete')" onclick="return confirm('Are you sure you want to DELETE?');"> <span class="icon-32-delete" title="Delete"></span> Delete</a> </td><td class="button" id="toolbar-new"> <a href="javascript:void(0);"onClick="PopupCenter('Sub/Home/addcharges_menu.php','Add Charges',300,200);"><span class="icon-32-new" title="New"></span> New</a> </td><td></td> </tr></table> </div> <div class="header icon-48-add-services">Additional Charges</div> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div> <div class="clr"></div><div id="element-box2"> <div class="t"> <div class="t"> <div class="t"></div> </div>

Online Booking System for Camp Holiday Resort and Recreation Area 74

Page 75: Chapters

</div> <div class="m"><div style="margin-right:50px;"><table class="adminlist" width="100px;"> <thead> <tr> <th>#</th> <th><input type='checkbox' name='checkall' onclick='checkedAll(frm1);'></th> <th nowrap="nowrap">Description</th><th nowrap="nowrap">Qty</th><th class="title">Unit Price</th><th nowrap="nowrap">Amount</th></tr> </thead><tbody> <?php $sql2 = " SELECT basket.*, service.Description, service.Price FROM tbl_basket AS basket INNER JOIN tbl_services AS service ON basket.service_id = service.service_id";$rs=mysql_query($sql2);

$count = 1;

while($row=mysql_fetch_array($rs)){ ?><tr><td align="center"><?php echo $count; ?></td><td align="center"><input type="checkbox" value="<?php echo $row['service_id']; ?>" name="chk[]" id="chk" /></td> <td align="center"><?php echo $row['Description']; ?></td> <td align="center"><?php echo $row['Qty']; ?></td><td align="center"><?php echo $row['Price']; ?></td><?php $qty = $row['Qty'];$price = $row['Price'];$sum = $qty * $price; ?><input type="hidden" name="price" value="<?php echo $sum; ?>" /><td align="center"><?php echo $sum; ?></td></tr> <?php $sum1 = $sum + $sum1; $count = $count + 1;} ?>

Online Booking System for Camp Holiday Resort and Recreation Area 75

Page 76: Chapters

<tr><td colspan="4"></td><th align="center" style="color:#00F; font-weight:bolder;">Total</th> <th align="center" style="color:#F00; font-weight:bolder;"><?php echo $sum1; ?></th></tr> </tbody> </table> <tr><td><a href="domain.php?rel=AddChargesConfirm"><input type="button" value="Confirm" style="font-size:16px; padding-left:15px; padding-right:15px; font-weight: bolder; cursor:pointer;"/></a> </td><td><a href="domain.php?rel=Checkin"> <input type="button" value="Cancel"style="font-size:16px; padding-left:15px; padding-right:15px; font-weight: bolder; cursor:pointer;"/></a> </td></tr> </form> </div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div></div>

/*----------------------- admin / Sub / Home / addcharges_confirm.php -------------------- */<html><head><script> function gotoUrl(){location.href='domain.php?rel=Checkin';}window.setTimeout('gotoUrl()',1500);</script></head><body><?phpinclude("connection/connection.php");

print "<div class='success'>Added Charges Successfully...!</div>";

Online Booking System for Camp Holiday Resort and Recreation Area 76

Page 77: Chapters

$id = $_SESSION['id'];

$sql = " SELECT accommodation_idFROM tbl_accommodation WHERE guest_id = $id";$result = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_object($result);

$accommodation_id = $row->accommodation_id;

$sql2 = " INSERT INTO tbl_transaction VALUES( '','$accommodation_id','',0,NOW() ) ";$result2 = mysql_query($sql2) or die(mysql_error());$transaction_id = mysql_insert_id();

$sql3 = " SELECT *FROM tbl_basket";$result3 = mysql_query($sql3) or die(mysql_error());while($row3 = mysql_fetch_array($result3)){$service_id = $row3['service_id'];$qty = $row3['Qty']; $addcharges[$service_id] = $qty;

}

foreach($addcharges as $service_id => $qty){$sql4 = " SELECT PriceFROM tbl_services WHERE service_id = '$service_id'";$result4 = mysql_query($sql4) or die(mysql_error());$row4 = mysql_fetch_object($result4);$amount = $qty * $row4->Price;$sql5 = " INSERT INTO tbl_transactiondetails VALUES( '','$transaction_id','$service_id','$qty',$amount ) ";mysql_query($sql5) or die(mysql_error());}

$total = 0;$sql6 = " SELECT Amount

Online Booking System for Camp Holiday Resort and Recreation Area 77

Page 78: Chapters

FROM tbl_transactiondetailsWHERE transaction_id = '$transaction_id'";$result6 = mysql_query($sql6) or die(mysql_error());while($row6 = mysql_fetch_array($result6)){$amount = $row6['Amount'];$total = $total + $amount;}

$total;$sql7 = " UPDATE tbl_transaction SET accommodation_id = '$accommodation_id',Total = '$total',dateTransaction = NOW()WHERE transaction_id = '$transaction_id'";mysql_query($sql7) or die(mysql_error());?></body></html>

/*----------------------- admin / Sub / Home / addcharges_menu.php ----------------------- */<form name="menu" action="addcharges_menu_insert.php" method="post"><table><tr><td>Description:</td><td> <select name="selectmenu"><?php include("../../connection/connection.php");$sql = " SELECT * FROM tbl_services ORDER BY Category ASC";$rs = mysql_query($sql);while($row=mysql_fetch_array($rs)) {?><option value="<?php echo $row['service_id']; ?>"><?php echo $row['Description']; ?></option><?php } ?></select></td></tr><tr><td>Qty:</td><td> <input type="text" size="5" name="qty"></td></tr><tr><td></td><td><input type="submit" name="submit" value="Add"></td></tr>

Online Booking System for Camp Holiday Resort and Recreation Area 78

Page 79: Chapters

</table></form>

/*----------------------- admin / Sub / Home / addcharges_menu_insert.php --------------- */<?php include("../../connection/connection.php");

$id = $_POST['selectmenu'];$qty = $_POST['qty'];

$sql = " Insert tbl_basket(service_id,qty) values('$id','$qty') ";if (mysql_query($sql)) {echo " <script>window.close();if (window.opener && !window.opener.closed) {window.opener.location.reload();}</script> ";}?>

/*----------------------- admin / Sub / Home / billing.php ------------------------------------- */<?php date_default_timezone_set('Asia/Taipei');?><html><body style="font-family: Verdana; font-size:12px;"><div style="width: 800px; margin-left:auto; margin-right:auto;"><div align="center"><a href="javascript:window.print()">Print this page</a></div><div align="center" style="font-size:24px; font-weight:bolder; padding-top:10px;">Billing</div><div align="center" style="font-size:24px; font-weight:bolder; padding-top:10px;">Camp Holiday Resort and Recreation Area</div><div align="center" >Island Garden City of Samal</div><div style="padding-top:30px;"><?phpinclude("connection/connection.php");$id = $_GET['id'];

$sqlString = " SELECT G.*, R.*FROM tbl_guest GINNER JOIN tbl_reservation RON G.guest_id = R.guest_idWHERE R.guest_id = $id";$result = mysql_query($sqlString) or die(mysql_error());$row = mysql_fetch_object($result);

Online Booking System for Camp Holiday Resort and Recreation Area 79

Page 80: Chapters

?><table style="font-family: Verdana; font-size:12px;"><tr><td>Name</td><td>:</td><td><?php echo $row->firstName." ".$row->middleInitial.". ".$row->lastName;?></td><td width="200px"><td><td>Statement No.</td><td>:</td><td style="color:#F00; font-weight: bolder;"><?php $sqlString2 = " SELECT B.billing_idFROM tbl_billing BINNER JOIN tbl_accommodation AON A.accommodation_id = B.accommodation_idINNER JOIN tbl_guest GON G.guest_id = A.guest_idWHERE G.guest_id = $id";$result2 = mysql_query($sqlString2) or die(mysql_error());$row2 = mysql_fetch_object($result2);echo $row2->billing_id; ?></td></tr><tr><td>Company</td><td>:</td><td><?php if( $row->Company == ""){echo " XXXXX ";} else {echo $row->Company;}?></td></tr><tr><td>Address</td><td>:</td><td><?php echo $row->Address;?></td></tr></table></div><hr width="800px" align="left"><div><table style="font-family: Verdana; font-size:12px;"><tr>

Online Booking System for Camp Holiday Resort and Recreation Area 80

Page 81: Chapters

<td>Room No.</td><td>:</td><td><?php echo $row->roomNumber; ?></td></tr><tr><td>Room Type</td><td>:</td><td><?php echo $row->roomName;?></td></tr><tr><td>Arrival</td><td>:</td><td><?php $arrivalDate = strtotime($row->Arrival);echo date('m/d/Y', $arrivalDate);?></td></tr><tr><td>Departure</td><td>:</td><td><?php$departueDate = strtotime($row->Departure);echo date('m/d/Y', $departueDate);?></td></tr></table></div><hr width="800px" align="left"><div style="font-size:12px;" ><table style="font-family: Verdana; font-size:12px;" align="center" > <thead> <tr> <th style="padding-right:30px;">Date</th><th style="padding-left:30px; padding-right:30px;">Transaction No.</th><th style="padding-left:30px; padding-right:30px;">Description</th><th style="padding-left:30px; padding-right:30px;">Payment</th><th style="padding-left:30px; padding-right:30px;">Amount</th><th style="padding-left:30px; padding-right:30px;">Balance</th></tr> </thead><tbody> <tbody> <?php $balance = 0;$sql2 = " SELECT G.*, R.*, A.*, B.*, T.*, TD.*, S.*

Online Booking System for Camp Holiday Resort and Recreation Area 81

Page 82: Chapters

FROM tbl_guest GINNER JOIN tbl_reservation RON G.guest_id = R.guest_idINNER JOIN tbl_accommodation AON G.guest_id = A.guest_idINNER JOIN tbl_billing BON A.accommodation_id = B.accommodation_idINNER JOIN tbl_transaction TON B.accommodation_id = T.accommodation_idLEFT JOIN tbl_transactiondetails TDON T.transaction_id = TD.transaction_idLEFT JOIN tbl_services SON TD.service_id = S.service_idWHERE G.guest_id = $id";$rs=mysql_query($sql2);

while($row=mysql_fetch_array($rs)){ ?><tr><td align="center"><?php $date = strtotime($row['dateTransaction']);echo date('m/d/Y', $date); ?></td> <td align="center"><?php echo $row['transaction_id']; ?></td><td align="center"><?php if($row['Desc'] == ""){echo $row['Description']; } elseif($row['Desc'] == "Payment Received") {echo $row['Desc'];} else {$departuredate = strtotime($row['Departure']);echo $row['Desc']." ".date("m/d/Y",$departuredate);}?></td><td align="center"><?php if($row['Desc'] == "Payment Received"){echo $row['Total'];}?></td><td align="center"><?php if($row['Desc'] == ""){

Online Booking System for Camp Holiday Resort and Recreation Area 82

Page 83: Chapters

echo $row['Amount'];} elseif($row['Desc'] == "Payment Received") {echo " ";} else {echo $row['Total'];}?></td><td align="center"><?php if($row['Desc'] == ""){echo $balance = $balance + $row['Amount'];} elseif($row['Desc'] == "Payment Received") {echo $balance = $balance - $row['Total'];} else {echo $balance = $balance + $row['Total'];}?></td> </tr> <?php } ?> <tr><td colspan="4"></td><th style="color:#00F; font-weight: bolder;">Current Balance</th> <th style="color:#F00; font-weight: bolder;"><?php echo $balance; ?></th></tr> </tbody> </table> </div><hr width="800px" align="left"><br /><br /><br /><br /><br /><br /><hr width="300px" align="left">Signature of Guest<br /><br /><br /><br />I agree that my liability in this bill is not waived and agree to be held personally liable<br />in the event that the indicated person, company or association fails to pay the full amount<br />of these charges.<br /><br /><br /><br /><hr width="800px" align="left"><div align="center">Thank you for staying with us. We hope to welcome you back soon.</div></div></body></html>

/*----------------------- admin / Sub / Home / checkin.php ------------------------------------ */

Online Booking System for Camp Holiday Resort and Recreation Area 83

Page 84: Chapters

<?php session_start(); include("connection/connection.php");date_default_timezone_set('Asia/Taipei');

$sql2 = "DELETE FROM tbl_basket ";mysql_query($sql2) or die("No users database!");?><script type="text/javascript">function PopupCenter(pageURL, title,w,h) {var left = (screen.width/2)-(w/2);var top = (screen.height/2)-(h/2);var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);} function doSearch(phrase){var words = phrase.value.toLowerCase().split(" ");var table = document.getElementById("filterable");var ele;var on = 0;for (var r = 0; r < table.rows.length; r++){ele = table.rows[r].innerHTML.replace(/<[^>]+>/g,"");var displayStyle = 'none';for (var i = 0; i < words.length; i++) {if (ele.toLowerCase().indexOf(words[i])>=0){displayStyle = '';on++;}else {displayStyle = 'none';break;}}table.rows[r].style.display = displayStyle;}var n = document.getElementById("noresults");if ( on == 0 && n ) {n.style.display = "";document.getElementById("qt").innerHTML = phrase.value;}else{n.style.display = "none";}}</script>

<div id="toolbar-box"> <div class="t"> <div class="t"> <div class="t"></div>

Online Booking System for Camp Holiday Resort and Recreation Area 84

Page 85: Chapters

</div> </div> <div class="m"> <form action="domain.php?rel=Guests" method="post" name="adminForm" id="frm1"><input type="hidden" name="deleteuser" /><div class="header icon-48-list-of-guest">List of Guests ( Check-in )</div> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div> <div class="clr"></div><div id="submenu-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <ul id="submenu"> <li><a href="domain.php?rel=Home&page=1" >Reservation</a></li><li><a href="domain.php?rel=Checkin&page=1" class="active">Guests</a></li> <li><a href="domain.php?rel=Checkout&page=1">Check-out</a></li> </ul> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div> <div id="element-box"><div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"><div style="font-weight: bolder; padding: 5px;">Search <input type="text" size="38" name="filter" id="filter" style="border: 1px solid red;" onkeyup="doSearch(filter);" /></div><table class="adminlist"><thead><tr>

Online Booking System for Camp Holiday Resort and Recreation Area 85

Page 86: Chapters

<th width="5%">#</th><th width="20%" nowrap="nowrap">Name</th> <th width="10%" nowrap="nowrap">Reservation Type</th><th width="8%" class="title">Arrival</th><th width="8%" nowrap="nowrap">Departure</th><th width="28%" nowrap="nowrap">Room Name</th><th width="6%" nowrap="nowrap">Room No.</th><th width="15%" nowrap="nowrap" colspan="3">Action</th> </tr> </thead><tbody id="filterable"> <?php$sql = " SELECT G.guest_id, G.lastName, G.firstName, G.middleInitial, R.*FROM tbl_guest GINNER JOIN tbl_reservation RON G.guest_id = R.guest_idWHERE R.Status = 'Check-in'";$result = mysql_query($sql) or die("No users database!");

$count = 1;

while($row = mysql_fetch_array($result)){ ?><tr><td align="center"><?php echo $count; ?></td> <td align="center"><?php echo $row['lastName'].", ".$row['firstName']." ". $row['middleInitial']."."; ?></td><td align="center"><?php echo $row['reservationType']; ?></td><td align="center"><?php $arrival = strtotime($row['Arrival']);echo date("m/d/Y", $arrival);?></td> <td align="center"><?php $departure = strtotime($row['Departure']);echo date("m/d/Y", $departure);?></td> <td align="center"><?php echo $row['roomName']; ?></td><td align="center"><?php echo $row['roomNumber']; ?></td><td align="center"><a href="domain.php?rel=AddCharges&id=<?php echo $row['guest_id']; ?>"><span title="Add Charges"><img src="images/admin-icons/40-32-addcharges-icon.png" align="middle" /></span>

Online Booking System for Camp Holiday Resort and Recreation Area 86

Page 87: Chapters

</a></td><td align="center"><a href="javascript:void(0);"onClick="PopupCenter('popup.php?rel=Billing&id=<?php echo $row['guest_id']; ?>','Add Charges',900,600);"><span title="Billing"><img src="images/admin-icons/32-view-icon.png" align="middle" /></span></a></td><td align="center"> <a href="javascript:void(0);"onClick="PopupCenter('popup.php?rel=Payments2&id=<?php echo $row['guest_id']; ?>','Add Charges',900,400);"><span title="Check-out"><img src="images/admin-icons/32-checkout-icon.png" align="middle" /></span></a></td></tr> <?php $count = $count + 1;}?><tr style="display:none; color:#F00; font-weight: bolder;" id="noresults"><td colspan="9">No Records Found that start with "<span id="qt"></span>".</td></tr> </tbody> </table> <div class="clr"></div></div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div></div>

/*----------------------- admin / Sub / Home / checkin_info.php ----------------------------- */<html><head><script> function gotoUrl(){location.href='domain.php?rel=Checkin';}window.setTimeout('gotoUrl()',1500);</script></head>

Online Booking System for Camp Holiday Resort and Recreation Area 87

Page 88: Chapters

<body><?phpinclude("connection/connection.php");$id = $_GET['id'];

$sqlString = " UPDATE tbl_reservationSET isReserved = 'No',Status = 'Check-in'WHERE reservation_id = $id";mysql_query($sqlString) or die(mysql_error());?></body></html>

/*----------------------- admin / Sub / Home / checkout.php ---------------------------------- */<?php session_start(); include("connection/connection.php");date_default_timezone_set('Asia/Taipei');

$sql2 = "DELETE FROM tbl_basket ";mysql_query($sql2) or die("No users database!");?><script type="text/javascript">function PopupCenter(pageURL, title,w,h) {var left = (screen.width/2)-(w/2);var top = (screen.height/2)-(h/2);var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);} function doSearch(phrase){var words = phrase.value.toLowerCase().split(" ");var table = document.getElementById("filterable");var ele;var on = 0;for (var r = 0; r < table.rows.length; r++){ele = table.rows[r].innerHTML.replace(/<[^>]+>/g,"");var displayStyle = 'none';for (var i = 0; i < words.length; i++) {if (ele.toLowerCase().indexOf(words[i])>=0){displayStyle = '';on++;}else {displayStyle = 'none';break;}}

Online Booking System for Camp Holiday Resort and Recreation Area 88

Page 89: Chapters

table.rows[r].style.display = displayStyle;}var n = document.getElementById("noresults");if ( on == 0 && n ) {n.style.display = "";document.getElementById("qt").innerHTML = phrase.value;}else{n.style.display = "none";}}</script>

<div id="toolbar-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <form action="domain.php?rel=Guests" method="post" name="adminForm" id="frm1"><input type="hidden" name="deleteuser" /><div class="header icon-48-list-of-guest">List of Guests ( Check-out )</div> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div> <div class="clr"></div><div id="submenu-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <ul id="submenu"> <li><a href="domain.php?rel=Home&page=1" >Reservation</a></li><li><a href="domain.php?rel=Checkin&page=1" >Guests</a></li> <li><a href="domain.php?rel=Checkout&page=1" class="active">Check-out</a></li> </ul> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div>

Online Booking System for Camp Holiday Resort and Recreation Area 89

Page 90: Chapters

</div> </div>

<div id="element-box"><div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"><div style="font-weight: bolder; padding: 5px;">Search <input type="text" size="38" name="filter" id="filter" style="border: 1px solid red;" onkeyup="doSearch(filter);" /></div><table class="adminlist"><thead><tr><th width="5%">#</th><th width="10%" nowrap="nowrap">Status</th> <th width="20%" nowrap="nowrap">Name</th> <th width="10%" nowrap="nowrap">Reservation Type</th><th width="8%" class="title">Arrival</th><th width="8%" nowrap="nowrap">Departure</th><th width="28%" nowrap="nowrap">Room Name</th><th width="6%" nowrap="nowrap">Room No.</th><th width="5%" nowrap="nowrap" colspan="3">Action</th> </tr> </thead><tbody id="filterable"> <?php$sql = " SELECT G.guest_id, G.lastName, G.firstName, G.middleInitial, R.*FROM tbl_guest GINNER JOIN tbl_reservation RON G.guest_id = R.guest_idWHERE R.Status = 'Check-out'";$result = mysql_query($sql) or die("No users database!");

$count = 1;

while($row = mysql_fetch_array($result)){ ?><tr><td align="center"><?php echo $count; ?></td> <td align="center"><?php echo $row['Status']; ?></td> <td align="center"><?php echo $row['lastName'].", ".$row['firstName']." ". $row['middleInitial']."."; ?>

Online Booking System for Camp Holiday Resort and Recreation Area 90

Page 91: Chapters

</td><td align="center"><?php echo $row['reservationType']; ?></td><td align="center"><?php $arrival = strtotime($row['Arrival']);echo date("m/d/Y", $arrival);?></td> <td align="center"><?php $departure = strtotime($row['Departure']);echo date("m/d/Y", $departure);?></td> <td align="center"><?php echo $row['roomName']; ?></td><td align="center"><?php echo $row['roomNumber']; ?></td><td align="center" colspan="3"><a href="javascript:void(0);"onClick="PopupCenter('popup.php?rel=Payments&id=<?php echo $row['guest_id']; ?>','Add Charges',900,400);"><span title="Official Receipt"><img src="images/admin-icons/32-view-icon.png" align="middle" /></span></a></td></tr> <?php $count = $count + 1;}?><tr style="display:none; color:#F00; font-weight: bolder;" id="noresults"><td colspan="9">No Records Found that start with "<span id="qt"></span>".</td></tr> </tbody> </table> <div class="clr"></div></div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div></div>

/*----------------------- admin / Sub / Home / reservation.php -------------------------------- */<?php session_start(); include("connection/connection.php");date_default_timezone_set('Asia/Taipei');

Online Booking System for Camp Holiday Resort and Recreation Area 91

Page 92: Chapters

?><script type="text/javascript">function PopupCenter(pageURL, title,w,h) {var left = (screen.width/2)-(w/2);var top = (screen.height/2)-(h/2);var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);} function doSearch(phrase){var words = phrase.value.toLowerCase().split(" ");var table = document.getElementById("filterable");var ele;var on = 0;for (var r = 0; r < table.rows.length; r++){ele = table.rows[r].innerHTML.replace(/<[^>]+>/g,"");var displayStyle = 'none';for (var i = 0; i < words.length; i++) {if (ele.toLowerCase().indexOf(words[i])>=0){displayStyle = '';on++;}else {displayStyle = 'none';break;}}table.rows[r].style.display = displayStyle;}var n = document.getElementById("noresults");if ( on == 0 && n ) {n.style.display = "";document.getElementById("qt").innerHTML = phrase.value;}else{n.style.display = "none";}}</script><div id="toolbar-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <form action="domain.php?rel=Guests" method="post" name="adminForm" id="frm1"><input type="hidden" name="deleteuser" /><div class="header icon-48-list-of-guest">List of Reservation</div> <div class="clr"></div> </div>

Online Booking System for Camp Holiday Resort and Recreation Area 92

Page 93: Chapters

<div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div> <div class="clr"></div><div id="submenu-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <ul id="submenu"> <li><a href="domain.php?rel=Home&page=1" class="active">Reservation</a></li><li><a href="domain.php?rel=Checkin&page=1">Guests</a></li><li><a href="domain.php?rel=Checkout&page=1">Check-out</a></li> </ul> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div> <div id="element-box"><div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"><div style="font-weight: bolder; padding: 5px;">Search <input type="text" size="38" name="filter" id="filter" style="border: 1px solid red;" onkeyup="doSearch(filter);" /></div><table class="adminlist"><thead><tr><th width="5%">#</th><th width="5%" nowrap="nowrap">Status</th> <th width="25%" nowrap="nowrap">Name</th> <th width="10%" nowrap="nowrap">Reservation Type</th><th width="8%" class="title">Arrival</th><th width="8%" nowrap="nowrap">Departure</th><th width="28%" nowrap="nowrap">Room Name</th><th width="6%" nowrap="nowrap">Room No.</th>

Online Booking System for Camp Holiday Resort and Recreation Area 93

Page 94: Chapters

<th width="15%" nowrap="nowrap" colspan="3">Action</th></tr> </thead><tbody id="filterable"> <?php $now = mktime(0,0,0,date("m"),date("d"),date("Y"));$datenow = date("Y-m-d", $now);

$sql = " SELECT G.guest_id, G.lastName, G.firstName, G.middleInitial, R.*FROM tbl_guest GINNER JOIN tbl_reservation RON G.guest_id = R.guest_idWHERE R.isReserved='YES' AND R.Arrival >= '$datenow'ORDER BY R.Arrival ASC";$result = mysql_query($sql) or die("No users database!");

$count = 1;

while($row = mysql_fetch_array($result)){ $now = mktime(0,0,0,date("m"),date("d"),date("Y"));$datenow = date("Y-m-d", $now);

?><tr><td align="center"><?php echo $count; ?></td> <td align="center"><?php echo $row['Status']; ?></td> <td align="center"><?php echo $row['lastName'].", ".$row['firstName']." ". $row['middleInitial']."."; ?></td><td align="center"><?php echo $row['reservationType']; ?></td><td align="center"><?php $arrival = strtotime($row['Arrival']);echo date("m/d/Y",$arrival);?></td> <td align="center"><?php $departure = strtotime($row['Departure']);echo date("m/d/Y",$departure);?></td> <td align="center"><?php echo $row['roomName']; ?></td><td align="center"><?php echo $row['roomNumber']; ?></td><td align="center"><?php if($row['Arrival'] == $datenow){?><a href="domain.php?rel=ArrivalConfirm&id=<?php echo $row['reservation_id']; ?>"onclick="return confirm('Continue to Check-in?');">

Online Booking System for Camp Holiday Resort and Recreation Area 94

Page 95: Chapters

<span title="Confirm"><img src="images/admin-icons/32-confirm-icon.png" align="middle" /></span></a><?php } ?> </td><td align="center"><a href="javascript:void(0);"onClick="PopupCenter('popup.php?rel=ViewDetails&id=<?php echo $row['reservation_id']; ?>',

'Add Charges',500,470);"><span title="View Details"><img src="images/admin-icons/32-view-icon.png" align="middle" /></span></a></td><td align="center"><a href="domain.php?rel=ArrivalCancel&id=<?php echo $row['reservation_id']; ?>"onclick="return confirm('Are you sure you want to Cancel Reservation?');"><span title="Cancel"><img src="images/admin-icons/32-cancel-icon.png" align="middle" /></span></a></td></tr> <?php $count = $count + 1;}?><tr style="display:none; color:#F00; font-weight: bolder;" id="noresults"><td colspan="9">No Records Found that start with "<span id="qt"></span>".</td></tr> </tbody> </table> <div class="clr"></div></div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div></div>

/*----------------------- admin / Sub / Home / reservation_cancel.php ---------------------- */<html><head><script> function gotoUrl(){location.href='domain.php?rel=Home';}

Online Booking System for Camp Holiday Resort and Recreation Area 95

Page 96: Chapters

window.setTimeout('gotoUrl()',1000);</script></head><body><?phpinclude("connection/connection.php");$id = $_GET['id'];

$sqlString = " UPDATE tbl_reservationSET isReserved = 'No',Status = 'Cancel'WHERE reservation_id = $id";mysql_query($sqlString) or die(mysql_error());?></body></html>

/*----------------------- admin / Sub / Home / reservation_confirm.php --------------------- */<html><head><script> function gotoUrl(){location.href='domain.php?rel=Checkin';}window.setTimeout('gotoUrl()',1500);</script></head><body><?phpinclude("connection/connection.php");$id = $_GET['id'];

$sqlString = " UPDATE tbl_reservationSET isReserved = 'No',Status = 'Check-in'WHERE reservation_id = $id";mysql_query($sqlString) or die(mysql_error());?></body></html>

/*----------------------- admin / Sub / Home / reservation_viewdetails.php ---------------- */<?php session_start();include("connection/connection.php");date_default_timezone_set('Asia/Taipei');?><html>

Online Booking System for Camp Holiday Resort and Recreation Area 96

Page 97: Chapters

<head><title>View Details</title>

<link rel="stylesheet" type="text/css" href="css/template.css" /> <link rel="stylesheet" type="text/css" href="css/rounded.css" /> <link rel="stylesheet" type="text/css" href="css/styles.css"/><link rel="stylesheet" type="text/css" href="css/messagebox.css"/><link href="css/calendar.css" rel="stylesheet" type="text/css"/><script src="js/filterTable.js" language="JavaScript"></script><script src="js/calendar.js" language="JavaScript"></script><script type="text/javascript" src="js/menu.js"></script><script type="text/javascript" src="js/reservationtype.js"></script></head><body><div id="toolbar-box5"> <div class="t"><div class="t"><div class="t"></div></div></div> <div class="m"> <div class="toolbar" id="toolbar"></div> <div class="header icon-48-list-of-guest">Personal Info</div> </div> <div class="b"><div class="b"><div class="b"></div></div></div></div> <br /><div id="element-box5"><div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"><?php$id = $_GET['id'];$sqlString = " SELECT *FROM tbl_guestWHERE guest_id = $id";$result = mysql_query($sqlString) or die("No users database!");while($row = mysql_fetch_array($result)){ ?><form><table style="font-size: 12px; margin-left: 50px;"><tr><td >Company Name</td><td>:</td><td style="color:#060; font-weight:bolder;"><?php if($row['Company'] == ""){echo " XXXXX ";} else {

Online Booking System for Camp Holiday Resort and Recreation Area 97

Page 98: Chapters

echo $row['Company'];}?></td></tr><tr><td >Name</td><td>:</td><td style="color:#060; font-weight:bolder;"><?php echo $row['lastName'].", ".$row['firstName']." ". $row['middleInitial']."."; ?></td></tr><tr><td >Address</td><td>:</td><td style="color:#060; font-weight:bolder;"><?php echo $row['Address'];?></td></tr><tr><td >Contact No.</td><td>:</td><td style="color:#060; font-weight:bolder;"><?php echo $row['contactNo'];?></td></tr><tr><td >Email</td><td>:</td><td style="color:#060; font-weight:bolder;"><?php echo $row['Email'];?></td></tr></table></form> <?php } ?> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div><br /><div id="toolbar-box5"> <div class="t"><div class="t"><div class="t"></div></div></div> <div class="m"> <div class="toolbar" id="toolbar"></div> <div class="header icon-48-reservation">Reservation Info</div> </div> <div class="b"><div class="b"><div class="b"></div></div></div></div> <br /><div id="element-box5"><div class="t">

Online Booking System for Camp Holiday Resort and Recreation Area 98

Page 99: Chapters

<div class="t"> <div class="t"></div> </div> </div> <div class="m"><?php$id = $_GET['id'];$sqlString = " SELECT *FROM tbl_reservationWHERE guest_id = $id";$result = mysql_query($sqlString) or die("No users database!");while($row = mysql_fetch_array($result)){ ?><form><table style="font-size: 12px; margin-left: 50px;"><tr><td >Status</td><td>:</td><td style="color:#F00; font-weight:bolder;"><?php echo $row['Status'];?></td></tr><tr><td >Reservation Type</td><td>:</td><td style="color:#060; font-weight:bolder;"><?php echo $row['reservationType'];?></td></tr><tr><td >Arrival</td><td>:</td><td style="color:#060; font-weight:bolder;"><?php $arrival = strtotime($row['Arrival']);echo date("m/d/Y",$arrival);?></td></tr><tr><td >Departure</td><td>:</td><td style="color:#060; font-weight:bolder;"><?php $departure = strtotime($row['Departure']);echo date("m/d/Y",$departure);?></td></tr><tr><td >Room Type</td><td>:</td>

Online Booking System for Camp Holiday Resort and Recreation Area 99

Page 100: Chapters

<td style="color:#060; font-weight:bolder;"><?php echo $row['roomName'];?></td></tr><tr><td >Room No.</td><td>:</td><td style="color:#060; font-weight:bolder;"><?php echo $row['roomNumber'];?></td></tr><tr><td >No. of Adults</td><td>:</td><td style="color:#060; font-weight:bolder;"><?php echo $row['numAdults'];?></td></tr><tr><td >No. of Children</td><td>:</td><td style="color:#060; font-weight:bolder;"><?php echo $row['numChildren'];?></td></tr></table></form> <?php } ?> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div></body></html>

/*----------------------- admin / Sub / Master / Sub_Amenities / Edit.php ------------------ */<script language="JavaScript" type="text/javascript">function getUpdateAmenities(selectedtype){document.amenities.updateamenities.value = selectedtype ;document.amenities.submit() ;}

function requiredFields(){var amname, amdesc;

amname = String(document.amenities.amname.value);amdesc = String(document.amenities.amdesc.value);

if( amname == "" ){alert('" FACILITIY NAME " Field should not be empty!');document.amenities.amname.focus();return false;}if( amdesc == "" ){

Online Booking System for Camp Holiday Resort and Recreation Area 100

Page 101: Chapters

alert('" DESCRIPTION " Field should not be empty!');document.amenities.amdesc.focus();return false;}

getUpdateAmenities(selectedtype);return true;}</script><?php include("connection/connection.php");

$id = $_GET['id'];

$sql = "SELECT * FROM tbl_amenitiesWHERE amenities_id = '$id'";$result = mysql_query($sql) or die("No user database!");

$row = mysql_fetch_object($result);?><div id="toolbar-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <div class="toolbar" id="toolbar"> <form action="domain.php?rel=UpdateAmenities&subpage=upload" method="post" name="amenities" enctype="multipart/form-data"><input type="hidden" name="updateamenities" /> <input type="hidden" name="id" value="<?php echo $row->amenities_id; ?>" /> <table class="toolbar"><tr><td class="button" id="toolbar-copy"><a href="javascript:getUpdateAmenities('amenities')" onclick="return requiredFields()" style="color:#000000;"><span class="icon-32-save" title="Copy"></span> Save</a></td>

<td class="button" id="toolbar-edit"> <a href="domain.php?rel=Amenities&page=1" style="color:#000000;"> <span class="icon-32-cancel" title="Edit"></span> Cancel</a> </td>

Online Booking System for Camp Holiday Resort and Recreation Area 101

Page 102: Chapters

<td></td></tr></table> </div><div class="header1 icon-48-96-edit-amenities">Edit Facilities</div> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

<div id="element-box1"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <table width="400" border="0"><tbody><tr><td>Name</td><td><input type="text" name="amname" value="<?php echo $row->amenitiesName;?>" size="50" /></td></tr><tr><td>Description</td><td><textarea rows="10" cols="37" name="amdesc"><?php echo $row->amenitiesDesc;?></textarea></td></tr><tr><td>Image</td><td><input type="file" name="image" value="<?php echo $row->image;?>" size="50" /></td></tr><tr><td>isActive</td>

Online Booking System for Camp Holiday Resort and Recreation Area 102

Page 103: Chapters

<td><select name="isactive"><option value="Yes" <?php if($row->isActive == 'Yes') echo "selected='selected'"; ?>>Yes</option><option value="No" <?php if($row->isActive == 'No') echo "selected='selected'"; ?>>No</option></select></td></tr></tbody></table></form> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

/*----------------------- admin / Sub / Master / Sub_Amenities / New.php ----------------- */<script language="JavaScript" type="text/javascript">function getSaveAmenities(selectedtype){document.amenities.saveamenities.value = selectedtype ;document.amenities.submit() ;}

function requiredFields(){var amname, amdesc;

amname = String(document.amenities.amname.value);amdesc = String(document.amenities.amdesc.value);

if( amname == "" ){alert('" FACILITIY NAME " Field should not be empty!');document.amenities.amname.focus();return false;}if( amdesc == "" ){alert('" DESCRIPTION " Field should not be empty!');document.amenities.amdesc.focus();return false;}

getSaveAmenities(selectedtype);return true;}</script><div id="toolbar-box"> <div class="t"> <div class="t">

Online Booking System for Camp Holiday Resort and Recreation Area 103

Page 104: Chapters

<div class="t"></div> </div> </div> <div class="m"> <div class="toolbar" id="toolbar"> <form action="domain.php?rel=ValidateAmenities&subpage=upload" method="post" name="amenities" enctype="multipart/form-data"><input type="hidden" name="saveamenities" /> <table class="toolbar"><tr><td class="button" id="toolbar-copy"><a href="javascript:getSaveAmenities('amenities')" onclick="return requiredFields()" style="color:#000000;"><span class="icon-32-save" title="Save"></span> Save</a></td>

<td class="button" id="toolbar-edit"> <a href="domain.php?rel=Amenities&page=1" style="color:#000000;"> <span class="icon-32-cancel" title="Cancel"></span> Cancel</a> </td>

<td></td></tr></table> </div><div class="header1 icon-48-96-add-amenities">Add Facilities</div> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

<div id="element-box1"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <table width="400" border="0">

Online Booking System for Camp Holiday Resort and Recreation Area 104

Page 105: Chapters

<tbody> <tr><td align="right">Name</td><td><input type="text" name="amname" size="50" /></td></tr><tr><td align="right">Description</td><td><textarea name="amdesc" cols="37" rows="5"></textarea></td></tr> <tr><td align="right">Image</td><td><input type="file" name="image"/></td></tr><tr><td align="right">isActive</td><td><select name="isactive"><option value="Yes">Yes</option><option value="No">No</option></select></td></tr></tbody></table></form></div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

/*----------------------- admin / Sub / Master / Sub_Guests / Edit.php ---------------------- */<script language="JavaScript" type="text/javascript">function getUpdateGuests(selectedtype){document.guests.updateguests.value = selectedtype ;document.guests.submit();}function requiredFields(){var lname, fname, mi, contactno, email;var filter = /^.+@.+\..{2,3}$/;

lname = String(document.guests.lname.value);fname = String(document.guests.fname.value);mi = String(document.guests.mi.value);contactno = String(document.guests.contactno.value);email = String(document.guests.email.value);

Online Booking System for Camp Holiday Resort and Recreation Area 105

Page 106: Chapters

if( lname == "" ){alert('" LAST NAME " Field should not be empty!');document.guests.lname.focus();return false;}if( fname == "" ){alert('" FIRST NAME " Field should not be empty!');document.guests.fname.focus();return false;}if( mi == "" ){alert('" MIDDLE INITIAL " Field should not be empty!');document.guests.mi.focus();return false;}if( contactno == "" ){alert('" CONTACT NO. " Field should not be empty!');document.guests.contactno.focus();return false;}if( email == "" ){alert('"EMAIL ADDRESS " Field should not be empty!');document.guests.email.focus();return false;}if( filter.test(email)){return true;}else{alert('Please input a valid " EMAIL ADDRESS "!');document.guests.email.focus();return false;}

getUpdateGuests(selectedtype)return true;}</script><?php include("connection/connection.php");

$id = $_GET['id'];

$sql = "SELECT * FROM tbl_guestWHERE guest_id = '$id'";$result = mysql_query($sql) or die("No user database!");

$row = mysql_fetch_object($result);?>

Online Booking System for Camp Holiday Resort and Recreation Area 106

Page 107: Chapters

<div id="toolbar-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <div class="toolbar" id="toolbar"> <form action="domain.php?rel=UpdateGuest" method="post" name="guests" enctype="multipart/form-data"><input type="hidden" name="updateguests" /> <input type="hidden" name="id" value="<?php echo $row->guest_id; ?>" /> <table class="toolbar"><tr><td class="button" id="toolbar-copy"><a href="javascript:getUpdateGuests('guests')" onclick="return requiredFields()" style="color:#000000;"><span class="icon-32-save" title="Copy"></span> Save</a></td>

<td class="button" id="toolbar-edit"> <a href="domain.php?rel=Guests&page=1" style="color:#000000;"> <span class="icon-32-cancel" title="Edit"></span> Cancel</a> </td>

<td></td></tr></table> </div><div class="header icon-48-edit-guests">Edit Guests</div> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

<div id="element-box1"> <div class="t"> <div class="t"> <div class="t"></div>

Online Booking System for Camp Holiday Resort and Recreation Area 107

Page 108: Chapters

</div> </div> <div class="m"> <table width="400" border="0"><tbody><tr><td align="right">Last Name</td><td><input type="text" name="lname" value="<?php echo $row->lastName;?>" size="50" /></td></tr><tr><td align="right">First Name</td><td><input type="text" name="fname" value="<?php echo $row->firstName;?>" size="50" /></td></tr><tr><td align="right">M.I.</td><td><input type="text" name="mi" maxlength="2"value="<?php echo $row->middleInitial;?>" size="10" /></td></tr><tr><td align="right">Contact No.</td><td><input type="text" name="contactno" value="<?php echo $row->contactNo;?>" size="50" /></td></tr><tr><td align="right">Email</td><td><input type="text" name="email" value="<?php echo $row->Email;?>" size="50" /></td></tr><tr><td align="right">isActive</td><td><select name="isactive"><option value="Yes" <?php if($row->isActive == "Yes")

echo "selected='selected'"; ?>>Yes</option><option value="No" <?php if($row->isActive == "No") echo "selected='selected'"; ?>>No</option></select></td></tr></tbody></table></form>

Online Booking System for Camp Holiday Resort and Recreation Area 108

Page 109: Chapters

</div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

/*----------------------- admin / Sub / Master / Sub_ Guests / New.php --------------------- */<script language="JavaScript" type="text/javascript">function getSaveGuests(selectedtype){document.guests.saveguests.value = selectedtype ;document.guests.submit() ;}function requiredFields(){var lname, fname, mi, contactno, email;var filter = /^.+@.+\..{2,3}$/;

lname = String(document.guests.lname.value);fname = String(document.guests.fname.value);mi = String(document.guests.mi.value);contactno = String(document.guests.contactno.value);email = String(document.guests.email.value);

if( lname == "" ){alert('" LAST NAME " Field should not be empty!');document.guests.lname.focus();return false;}if( fname == "" ){alert('" FIRST NAME " Field should not be empty!');document.guests.fname.focus();return false;}if( mi == "" ){alert('" MIDDLE INITIAL " Field should not be empty!');document.guests.mi.focus();return false;}if( contactno == "" ){alert('" CONTACT NO. " Field should not be empty!');document.guests.contactno.focus();return false;}if( email == "" ){alert('"EMAIL ADDRESS " Field should not be empty!');document.guests.email.focus();return false;

Online Booking System for Camp Holiday Resort and Recreation Area 109

Page 110: Chapters

}if( filter.test(email)){return true;}else{alert('Please input a valid " EMAIL ADDRESS"!');document.guests.email.focus();return false;}

getSaveGuests(selectedtype);return true;}</script><div id="toolbar-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <div class="toolbar" id="toolbar"> <form action="domain.php?rel=ValidateGuest&subpage=upload" method="post" name="guests" enctype="multipart/form-data"><input type="hidden" name="saveguests" /> <table class="toolbar"><tr><td class="button" id="toolbar-copy"><a href="javascript:getSaveGuests('guests')" onclick="return requiredFields()" style="color:#000000;"> <span class="icon-32-save" title="Save"></span> Save</a></td>

<td class="button" id="toolbar-edit"> <a href="domain.php?rel=Guests&page=1" style="color:#000000;"> <span class="icon-32-cancel" title="Cancel"></span> Cancel</a> </td>

<td></td></tr></table> </div><div class="header icon-48-add-guests">Add Guests</div> <div class="clr"></div> </div>

Online Booking System for Camp Holiday Resort and Recreation Area 110

Page 111: Chapters

<div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

<div id="element-box1"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <table width="400" border="0"><tbody> <tr><td align="right">Last Name</td><td><input type="text" name="lname" size="50" /></td></tr><tr><td align="right">First Name</td><td><input type="text" name="fname" size="50" /></td></tr><tr><td align="right">M.I.</td><td><input type="text" name="mi" size="10" maxlength="1" /></td></tr><tr><td align="right">Contact No.</td><td><input type="text" name="contactno" size="50" /></td></tr><tr><td align="right">Email</td><td><input type="text" name="email" size="50" /></td></tr> <tr><td align="right">isActive</td><td><select name="isactive"><option value="Yes">Yes</option><option value="No">No</option></select></td></tr></tbody></table></form>

Online Booking System for Camp Holiday Resort and Recreation Area 111

Page 112: Chapters

</div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

/*----------------------- admin / Sub / Master / Sub_RoomList / Edit.php ------------------ */<script language="JavaScript" type="text/javascript">function getUpdateRoomList(selectedtype){document.roomlists.updateroomlist.value = selectedtype ;document.roomlists.submit();}

function requiredFields(){var roomnum, roomrate;

roomnum = String(document.roomlists.roomnum.value);roomrate = String(document.roomlists.roomrate.value);

if( roomnum == "" ){alert('" ROOM NUMBER " Field should not be empty!');document.roomlists.roomnum.focus();return false;}if( roomrate == "" ){alert('" ROOM RATE " Field should not be empty!');document.roomlists.roomrate.focus();return false;}

getUpdateRoomList(selectedtype);return true;}</script><?php include("connection/connection.php");

$id = $_GET['id'];

$sql = "SELECT * FROM tbl_roomWHERE room_id = '$id'";$result = mysql_query($sql) or die("No user database!");

$row = mysql_fetch_object($result);?><div id="toolbar-box">

Online Booking System for Camp Holiday Resort and Recreation Area 112

Page 113: Chapters

<div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <div class="toolbar" id="toolbar"> <form action="domain.php?rel=UpdateRoomList" method="post" name="roomlists" enctype="multipart/form-data"><input type="hidden" name="updateroomlist" /> <input type="hidden" name="id" value="<?php echo $row->room_id; ?>" /> <table class="toolbar"><tr><td class="button" id="toolbar-copy"><a href="javascript:getUpdateRoomList('roomlists')" onclick="return requiredFields()" style="color:#000000;"><span class="icon-32-save" title="Copy"></span> Save</a></td>

<td class="button" id="toolbar-edit"> <a href="domain.php?rel=RoomList&page=1" style="color:#000000;"> <span class="icon-32-cancel" title="Edit"></span> Cancel</a> </td>

<td></td></tr></table> </div><div class="header icon-48-edit-room">Edit Room</div> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

<div id="element-box1"> <div class="t"> <div class="t"> <div class="t"></div> </div>

Online Booking System for Camp Holiday Resort and Recreation Area 113

Page 114: Chapters

</div> <div class="m"> <table width="400" border="0"><tbody><tr><td>Room Name</td><td><select name="roomtype_id"><?phpecho $sql="SELECT * FROM tbl_roomtype ORDER BY roomname ASC";$rs=mysql_query($sql);while($rowe=mysql_fetch_object($rs)){if(($rowe->roomType_id) == ($row->roomType_id)){echo "<option value='$rowe->roomType_id' selected='selected'>".$rowe->roomName."</option>";}else{echo "<option value='$rowe->roomType_id'>".$rowe->roomName."</option>";}}?></select></td></tr><tr><td>Room Number</td><td><input type="text" name="roomnum" value="<?php echo $row->roomNumber;?>" size="50" /></td></tr><tr><td>Rate</td><td><input type="text" name="roomrate" value="<?php echo $row->Rate;?>" size="50" /></td></tr> <tr><td>isAvailable</td><td><select name="isavailable"><option value="Yes" <?php if($row->isAvailable == 'Yes') echo "selected='selected'"; ?>>Yes</option><option value="No" <?php if($row->isAvailable == 'No') echo "selected='selected'"; ?>>No</option></select></td></tr><tr><td>isActive</td><td><select name="isactive">

Online Booking System for Camp Holiday Resort and Recreation Area 114

Page 115: Chapters

<option value="Yes" <?php if($row->isActive == 'Yes') echo "selected='selected'"; ?>>Yes</option><option value="No" <?php if($row->isActive == 'No') echo "selected='selected'"; ?>>No</option></select></td></tr></tbody></table></form> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

/*----------------------- admin / Sub / Master / Sub_ RoomList / New.php ----------------- */<script language="JavaScript" type="text/javascript">

function getSaveRoomType(selectedtype){document.roomlists.saveroomlists.value = selectedtype ;document.roomlists.submit() ;}

function requiredFields(){var roomnum, roomrate;

roomnum = String(document.roomlists.roomnum.value);roomrate = String(document.roomlists.roomrate.value);

if( roomnum == "" ){alert('" ROOM NUMBER " Field should not be empty!');document.roomlists.roomnum.focus();return false;}if( roomrate == "" ){alert('" ROOM RATE " Field should not be empty!');document.roomlists.roomrate.focus();return false;}

getSaveRoomType(selectedtype);return true;}</script><div id="toolbar-box"> <div class="t"> <div class="t">

Online Booking System for Camp Holiday Resort and Recreation Area 115

Page 116: Chapters

<div class="t"></div> </div> </div> <div class="m"> <div class="toolbar" id="toolbar"> <form action="domain.php?rel=ValidateRoomList&subpage=upload" method="post" name="roomlists" enctype="multipart/form-data"><input type="hidden" name="saveroomlists" /> <table class="toolbar"><tr><td class="button" id="toolbar-copy"><a href="javascript:getSaveRoomType('roomlists')" onclick="return requiredFields()" style="color:#000000;"><span class="icon-32-save" title="Save"></span> Save</a></td>

<td class="button" id="toolbar-edit"> <a href="domain.php?rel=RoomList&page=1" style="color:#000000;"> <span class="icon-32-cancel" title="Cancel"></span> Cancel</a> </td>

<td></td></tr></table> </div><div class="header icon-48-add-room">Add Room</div> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

<div id="element-box1"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <table width="400" border="0">

Online Booking System for Camp Holiday Resort and Recreation Area 116

Page 117: Chapters

<tbody> <tr><td>Room Name</td><td><select name="roomtype_id"><?php$sql="SELECT * FROM tbl_roomtype ORDER BY roomName ASC";$rs=mysql_query($sql);while($row=mysql_fetch_object($rs)){echo"<option value='$row->roomType_id'>".$row->roomName."</option>";}?></select></td></tr><tr><td>Room Number</td><td><input type="text" name="roomnum" size="50" /></td></tr><tr><td>Rate</td><td><input type="text" name="roomrate" size="50" /></td></tr> <tr><td>isAvailable</td><td><select name="isavailable"><option value="Yes">Yes</option><option value="No">No</option></select></td></tr><tr><td>isActive</td><td><select name="isactive"><option value="Yes">Yes</option><option value="No">No</option></select></td></tr></tbody></table></form></div> <div class="b"> <div class="b"> <div class="b"></div>

Online Booking System for Camp Holiday Resort and Recreation Area 117

Page 118: Chapters

</div> </div> </div>

/*----------------------- admin / Sub / Master / Sub_RoomType / Edit.php ----------------- */<script language="JavaScript" type="text/javascript">function getUpdateRoomType( selectedtype ){document.roomtypes.updateroomtype.value = selectedtype ;document.roomtypes.submit();}

function requiredFields(){var roomname, roomtypedesc;

roomname = String(document.roomtypes.roomname.value);roomtypedesc = String(document.roomtypes.roomtypedesc.value);

if( roomname == "" ){alert('" ROOM NAME " Field should not be empty!');document.roomtypes.roomname.focus();return false;}if( roomtypedesc == "" ){alert('" DESCRIPTION " Field should not be empty!');document.roomtypes.roomtypedesc.focus();return false;}

getUpdateRoomList(selectedtype);return true;}</script><?php include("connection/connection.php");

$id = $_GET['id'];

$sql = "SELECT * FROM tbl_roomtypeWHERE roomType_id = '$id'";$result = mysql_query($sql) or die("No user database!");

$row = mysql_fetch_object($result);?><div id="toolbar-box"> <div class="t"> <div class="t"> <div class="t"></div> </div>

Online Booking System for Camp Holiday Resort and Recreation Area 118

Page 119: Chapters

</div> <div class="m"> <div class="toolbar" id="toolbar"> <form action="domain.php?rel=UpdateRoomType&subpage=upload" method="post" name="roomtypes" enctype="multipart/form-data"><input type="hidden" name="updateroomtype" /> <input type="hidden" name="id" value="<?php echo $row->roomType_id; ?>" /> <table class="toolbar"><tr><td class="button" id="toolbar-copy"><a href="javascript:getUpdateRoomType('roomtypes')" onclick="return requiredFields()" style="color:#000000;"><span class="icon-32-save" title="Copy"></span> Save</a></td>

<td class="button" id="toolbar-edit"> <a href="domain.php?rel=RoomType&page=1" style="color:#000000;"> <span class="icon-32-cancel" title="Edit"></span> Cancel</a> </td>

<td></td></tr></table> </div><div class="header1 icon-48-96-edit-room-types">Edit Room Type</div> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

<div id="element-box1"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <table width="400" border="0"><tbody>

Online Booking System for Camp Holiday Resort and Recreation Area 119

Page 120: Chapters

<tr><td>Room Name</td><td><input type="text" name="roomname" value="<?php echo $row->roomName;?>" size="50" /></td></tr><tr><td>Description</td><td><textarea rows="10" cols="37" name="roomtypedesc"><?php echo $row->roomTypeDesc;?></textarea></td></tr><tr><td>Image</td><td><input type="file" name="image"value="<?php echo $row->image;?>" size="50" /></td></tr></tbody></table></form> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

/*----------------------- admin / Sub / Master / Sub_ RoomType / New.php ---------------- */<script language="JavaScript" type="text/javascript">

function getSaveRoomType(selectedtype){document.roomtypes.saveroomtypes.value = selectedtype ;document.roomtypes.submit() ;}

function requiredFields(){var roomname, roomtypedesc;

roomname = String(document.roomtypes.roomname.value);roomtypedesc = String(document.roomtypes.roomtypedesc.value);

if( roomname == "" ){alert('" ROOM NAME " Field should not be empty!');

Online Booking System for Camp Holiday Resort and Recreation Area 120

Page 121: Chapters

document.roomtypes.roomname.focus();return false;}if( roomtypedesc == "" ){alert('" DESCRIPTION " Field should not be empty!');document.roomtypes.roomtypedesc.focus();return false;}

getSaveRoomType(selectedtype);return true;}</script><div id="toolbar-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <div class="toolbar" id="toolbar"> <form action="domain.php?rel=ValidateRoomType&subpage=upload" method="post" name="roomtypes" enctype="multipart/form-data"><input type="hidden" name="saveroomtypes" /> <table class="toolbar"><tr><td class="button" id="toolbar-copy"><a href="javascript:getSaveRoomType('roomtypes')" onclick="return requiredFields()" style="color:#000000;"><span class="icon-32-save" title="Save"></span> Save</a></td>

<td class="button" id="toolbar-edit"> <a href="domain.php?rel=RoomType&page=1" style="color:#000000;"> <span class="icon-32-cancel" title="Cancel"></span> Cancel</a> </td>

<td></td></tr></table> </div><div class="header1 icon-48-96-add-room-types">Add Room Type</div> <div class="clr"></div> </div>

Online Booking System for Camp Holiday Resort and Recreation Area 121

Page 122: Chapters

<div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

<div id="element-box1"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <table width="400" border="0"><tbody> <tr><td align="right">Room Name</td><td><input type="text" name="roomname" size="50" /></td></tr><tr><td align="right">Description</td><td><textarea name="roomtypedesc" cols="37" rows="5"></textarea></td></tr> <tr><td align="right">Image</td><td><input type="file" name="image"/></td></tr></tbody></table></form></div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

/*----------------------- admin / Sub / Master / Sub_Services / Edit.php -------------------- */<script language="JavaScript" type="text/javascript">function getUpdateServices(selectedtype){document.services.updateservices.value = selectedtype ;document.services.submit();}function requiredFields(){var category, desc, price;

Online Booking System for Camp Holiday Resort and Recreation Area 122

Page 123: Chapters

category = String(document.services.category.value);desc = String(document.services.description.value);price = String(document.services.price.value);

if( category == "" ){alert('" CATEGORY " Field should not be empty!');document.services.category.focus();return false;}if( desc == "" ){alert('" DESCRIPTION " Field should not be empty!');document.services.description.focus();return false;}if( price == "" ){alert('" PRICE " Field should not be empty!');document.services.price.focus();return false;}getUpdateServices(selectedtype);return true;}</script><?php include("connection/connection.php");

$id = $_GET['id'];

$sql = "SELECT * FROM tbl_servicesWHERE service_id = '$id'";$result = mysql_query($sql) or die("No user database!");

$row = mysql_fetch_object($result);?><div id="toolbar-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <div class="toolbar" id="toolbar"> <form action="domain.php?rel=UpdateServices" method="post" name="services" enctype="multipart/form-data"><input type="hidden" name="updateservices" /> <input type="hidden" name="id" value="<?php echo $row->service_id; ?>" /> <table class="toolbar"><tr>

Online Booking System for Camp Holiday Resort and Recreation Area 123

Page 124: Chapters

<td class="button" id="toolbar-copy"><a href="javascript:getUpdateServices('guests')" onclick="return requiredFields()" style="color:#000000;"><span class="icon-32-save" title="Copy"></span> Save</a></td>

<td class="button" id="toolbar-edit"> <a href="domain.php?rel=Services&page=1" style="color:#000000;"> <span class="icon-32-cancel" title="Edit"></span> Cancel</a> </td>

<td></td></tr></table> </div><div class="header icon-48-edit-services">Edit Services</div> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

<div id="element-box1"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <table width="400" border="0"><tbody><tr><td align="right">Category</td><td><select name="category"><?phpecho $sql="SELECT * FROM tbl_servicescategory ORDER BY Category ASC";$rs=mysql_query($sql);while($rowe=mysql_fetch_object($rs)){if(($rowe->Category) == ($row->Category)){

Online Booking System for Camp Holiday Resort and Recreation Area 124

Page 125: Chapters

echo "<option value='$rowe->Category' selected='selected'>".$rowe->Category."</option>";}else{echo "<option value='$rowe->Category'>".$rowe->Category."</option>";}}?></select></td></tr><tr><td align="right">Description</td><td><input type="text" name="description" value="<?php echo $row->Description;?>" size="50" /></td></tr><tr><td align="right">Price</td><td><input type="text" name="price"value="<?php echo $row->Price;?>" size="10" /></td></tr><tr><td align="right">isActive</td><td><select name="isactive"><option value="Yes" <?php if($row->isActive == "Yes") echo "selected='selected'"; ?>>Yes</option><option value="No" <?php if($row->isActive == "No") echo "selected='selected'"; ?>>No</option></select></td></tr></tbody></table></form> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

/*----------------------- admin / Sub / Master / Sub_ Services / New.php ------------------- */<script language="JavaScript" type="text/javascript">function PopupCenter(pageURL, title,w,h) {var left = (screen.width/2)-(w/2);var top = (screen.height/2)-(h/2);

Online Booking System for Camp Holiday Resort and Recreation Area 125

Page 126: Chapters

var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);} function getSaveServices(selectedtype){document.services.saveservices.value = selectedtype ;document.services.submit() ;}function requiredFields(){var category, desc, price;

category = String(document.services.category.value);desc = String(document.services.description.value);price = String(document.services.price.value);

if( category == "" ){alert('" CATEGORY " Field should not be empty!');document.services.category.focus();return false;}if( desc == "" ){alert('" DESCRIPTION " Field should not be empty!');document.services.description.focus();return false;}if( price == "" ){alert('" PRICE " Field should not be empty!');document.services.price.focus();return false;}getSaveGuests(selectedtype);return true;}</script><div id="toolbar-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <div class="toolbar" id="toolbar"> <form action="domain.php?rel=ValidateServices&subpage=upload" method="post" name="services" enctype="multipart/form-data"><input type="hidden" name="saveservices" /> <table class="toolbar"><tr><td class="button" id="toolbar-copy"><a href="javascript:getSaveServices('services')"

Online Booking System for Camp Holiday Resort and Recreation Area 126

Page 127: Chapters

onclick="return requiredFields()" style="color:#000000;"> <span class="icon-32-save" title="Save"></span> Save</a></td>

<td class="button" id="toolbar-edit"> <a href="domain.php?rel=Services&page=1" style="color:#000000;"> <span class="icon-32-cancel" title="Cancel"></span> Cancel</a> </td>

<td></td></tr></table> </div><div class="header icon-48-add-services">Add Services</div> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

<div id="element-box1"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <table width="400" border="0"><tbody> <tr><td align="right">Category</td><td><select name="category"><?php$sql="SELECT * FROM tbl_servicescategory ORDER BY Category ASC";$rs=mysql_query($sql);while($row=mysql_fetch_object($rs)){echo"<option value='$row->Category'>".$row->Category."</option>";}

Online Booking System for Camp Holiday Resort and Recreation Area 127

Page 128: Chapters

?></select></td><td><a href="javascript:void(0);"onClick="PopupCenter('popup.php?rel=AddCategory','Add Charges',300,185);"><input type="button" value="Add Category" style="font-size:16px; padding-left:15px; padding-right:15px; font-weight: bolder; cursor:pointer;"/></a></td></tr><tr><td align="right">Description</td><td colspan="2"><input type="text" name="description" size="50" /></td></tr><tr><td align="right">Price</td><td colspan="2"><input type="text" name="price" size="10"></td></tr><tr><td align="right">isActive</td><td colspan="2"><select name="isactive"><option value="Yes">Yes</option><option value="No">No</option></select></td></tr></tbody></table></form></div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

/*----------------------- admin / Sub / Master / amenities.php --------------------------------- */<?php session_start(); include("connection/connection.php");?><script type="text/javascript">function getDeleteAmenities(selectedtype){document.adminForm.deleteamenities.value = selectedtype;

Online Booking System for Camp Holiday Resort and Recreation Area 128

Page 129: Chapters

document.adminForm.submit();}

function getEditAmenities(){for(i = 0; i < adminForm.chk.length; i++){if(adminForm.chk[i].checked){cc = adminForm.chk[i].value;window.location = "domain.php?rel=EditAmenities&id="+cc+"";}}}

checked=false;function checkedAll(frm1) {var aa= document.getElementById('frm1');if (checked == false){checked = true} else {checked = false}for (var i =0; i < aa.elements.length; i++){aa.elements[i].checked = checked;}}function doSearch(phrase){var words = phrase.value.toLowerCase().split(" ");var table = document.getElementById("filterable");var ele;var on = 0;for (var r = 0; r < table.rows.length; r++){ele = table.rows[r].innerHTML.replace(/<[^>]+>/g,"");var displayStyle = 'none';for (var i = 0; i < words.length; i++) {if (ele.toLowerCase().indexOf(words[i])>=0){displayStyle = '';on++;}else {displayStyle = 'none';break;}}table.rows[r].style.display = displayStyle;}var n = document.getElementById("noresults");if ( on == 0 && n ) {n.style.display = "";document.getElementById("qt").innerHTML = phrase.value;}else{n.style.display = "none";

Online Booking System for Camp Holiday Resort and Recreation Area 129

Page 130: Chapters

}}</script><?php$do_delete = $_POST['deleteamenities'];echo $id = $_POST['chk'];

if($do_delete){$N = count($id);

for($i=0;$i < $N; $i++){$sql = "DELETE FROM tbl_amenities WHERE amenities_id = '".$id[$i]."'";mysql_query($sql) or die(mysql_error());}}?> <div id="toolbar-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <form action="domain.php?rel=Amenities&subpage=upload" method="post" name="adminForm" id="frm1"> <input type="hidden" name="deleteamenities" /><div class="toolbar" id="toolbar"> <table class="toolbar"><tr> <td class="button" id="toolbar-delete"> <a href="javascript:getDeleteAmenities('delete')" onclick="return confirm('Are you sure you want to DELETE?');"> <span class="icon-32-delete" title="Delete"></span> Delete</a> </td> <td class="button" id="toolbar-edit"> <a href="javascript:getEditAmenities()"> <span class="icon-32-edit" title="Edit"></span> Edit</a> </td><td class="button" id="toolbar-new"> <a href="domain.php?rel=NewAmenities"> <span class="icon-32-new" title="New"></span> New</a> </td><td></td>

Online Booking System for Camp Holiday Resort and Recreation Area 130

Page 131: Chapters

</tr></table> </div> <div class="header1 icon-48-96-amenities">Types of Facilities</div> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div> <div class="clr"></div><div id="submenu-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <ul id="submenu"> <li><a href="domain.php?rel=Guests&page=1">Guests</a></li><li><a href="domain.php?rel=RoomList&page=1">Rooms</a></li><li><a href="domain.php?rel=RoomType&page=1">Room Types</a></li><li><a href="domain.php?rel=Amenities&page=1" class="active">Facilities</a></li> <li><a href="domain.php?rel=Services&page=1">Services</a></li> </ul> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

<div id="element-box4"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div>

<div class="m"><div style="font-weight: bolder; padding: 5px;">Search <input type="text" size="38" name="filter" id="filter" style="border: 1px solid red;" onkeyup="doSearch(filter);" />

Online Booking System for Camp Holiday Resort and Recreation Area 131

Page 132: Chapters

</div><table class="adminlist"> <thead> <tr> <th width="5%">#</th> <th width="5%"><input type='checkbox' name='checkall' onclick='checkedAll(frm1);'></th> <th width="10%" nowrap="nowrap">Image</th><th width="35%" nowrap="nowrap">Name</th><th width="45%" class="title">Description</th><th width="10%" nowrap="nowrap">isActive</th></tr> </thead><tbody id="filterable"> <?php$sql = " SELECT * FROM tbl_amenitiesORDER BY isActive='YES' DESC ";$result = mysql_query($sql) or die("No users database!");

$count = 1;

while($row = mysql_fetch_array($result)){

?><tr><td align="center"><?php echo $count; ?></td> <td align="center"><input type="checkbox" value="<?php echo $row['amenities_id']; ?>" name="chk[]" id="chk" onselect="return getEditAmenities()" /></td> <td align="center"><?php if($row['image'] != "Sub/Master/images/thumbs/"){ ?><img src="<?php echo $row['file_thumb']; ?>" width="100" height="75"/><?php } ?></td> <td align="center"><?php echo $row['amenitiesName']; ?></td> <td align="center"><?php echo $row['amenitiesDesc']; ?></td><td align="center"><?php echo $row['isActive']; ?></td></tr> <?php $count = $count + 1;}?> <tr style="display:none; color:#F00; font-weight: bolder;" id="noresults"><td colspan="9">No Records Found that start with "<span id="qt"></span>".</td></tr> </tbody> </table> </form>

Online Booking System for Camp Holiday Resort and Recreation Area 132

Page 133: Chapters

<div class="clr"></div></div>

<div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div></div>

/*----------------------- admin / Sub / Master / amenities_update.php ------------------------ */<html><head><script> function gotoUrl(){location.href='domain.php?rel=Amenities';}window.setTimeout('gotoUrl()',2000);</script></head><body><?php// UPDATE ROOM TYPEinclude("connection/connection.php");

$idir = "Sub/Master/imagesAmenities/"; $tdir = "Sub/Master/imagesAmenities/thumbs/"; $twidth = "115"; $theight = "85";

$do_update_amenities = $_POST['updateamenities'];

if($do_update_amenities){if (isset($_GET['subpage']) && $_GET['subpage'] == 'upload') { // Uploading/Resizing Script $id = $_POST['id'];$image = $_POST["image"];$amname = $_POST['amname'];$amdesc = $_POST['amdesc'];$isactive = $_POST['isactive'];

$url = $_FILES['image']['name']; // Set $url To Equal The Filename For Later Use $file_ext = strrchr($_FILES['image']['name'], '.'); // Get The File Extention In The Format Of , // For Instance, .jpg, .gif or .php if ($_FILES['image']['type'] == "image/jpg" || $_FILES['image']['type'] == "image/jpeg" || $_FILES['image']['type'] == "image/pjpeg") {

$copy = copy($_FILES['image']['tmp_name'], "$idir" . $_FILES['image']['name']);

Online Booking System for Camp Holiday Resort and Recreation Area 133

Page 134: Chapters

// Move Image From Temporary // Location To Permanent Locationif ($copy) { // If The Script Was Able To Copy The Image To It's Permanent Location $simg = imagecreatefromjpeg("$idir" . $url); // Make A New Temporary Image To Create // The Thumbanil From $currwidth = imagesx($simg); // Current Image Width $currheight = imagesy($simg); // Current Image Height if ($currheight > $currwidth) { // If Height Is Greater Than Width $zoom = $twidth / $currheight; // Length Ratio For Width $newheight = $theight; // Height Is Equal To Max Height $newwidth = $currwidth * $zoom; // Creates The New Width } else { // Otherwise, Assume Width Is Greater Than Height // (Will Produce Same Result If Width Is Equal To Height) $zoom = $twidth / $currwidth; // Length Ratio For Height $newwidth = $twidth; // Width Is Equal To Max Width $newheight = $currheight * $zoom; // Creates The New Height } $dimg = imagecreate($newwidth, $newheight); // Make New Image For Thumbnail imagetruecolortopalette($simg, false, 256); // Create New Color Pallete $palsize = ImageColorsTotal($simg); for ($i = 0; $i < $palsize; $i++) { // Counting Colors In The Image $colors = ImageColorsForIndex($simg, $i); // Number Of Colors Used ImageColorAllocate($dimg, $colors['red'], $colors['green'], $colors['blue']); // Tell The Server What // Colors This Image Will Use } imagecopyresized($dimg, $simg, 0, 0, 0, 0, $newwidth, $newheight, $currwidth, $currheight); // Copy Resized Image To The // New Image (So We Can Save It) imagejpeg($dimg, "$tdir" . $url); // Saving The Image imagedestroy($simg); // Destroying The Temporary Image imagedestroy($dimg); // Destroying The Other Temporary Image

echo "<div style='padding-top: 100px; padding-bottom: 100px'>";print "<div class='success'>Facilities Successfully Updated...!</div>";echo "</div>";

$img = "$idir" . $_FILES['image']['name'];$thumb = "$tdir" . $url;

$sqlString = " UPDATE tbl_amenitiesSET image = '$img', amenitiesName = '$amname',amenitiesDesc = '$amdesc',file_thumb = '$thumb',file_width = '$twidth',file_height = '$theight',isActive = '$isactive'WHERE amenities_id = '$id' ";

Online Booking System for Camp Holiday Resort and Recreation Area 134

Page 135: Chapters

mysql_query($sqlString) or die(mysql_error());

} else { echo "<div style='padding-top: 100px; padding-bottom: 100px'>";print "<div class='error'>Wrong filetype (has to be a .jpg or .jpeg) Yours is $file_ext.</div>";print " <script> function gotoUrl(){location.href='domain.php?rel=EditAmenities;}window.setTimeout('gotoUrl()',1900);</script> ";echo "</div>";} } else if($_FILES['image']['type'] == "") {echo "<div style='padding-top: 100px; padding-bottom: 100px'>";print "<div class='warning'>No Image to Display. Choose a file Correctly.</div>";print " <script> function gotoUrl(){location.href='domain.php?rel=EditAmenities';}window.setTimeout('gotoUrl()',2000);</script> ";echo "</div>";} else { echo "<div style='padding-top: 100px; padding-bottom: 100px'>";print "<div class='error'>Wrong filetype (has to be a .jpg or .jpeg) Yours is $file_ext.</div>";print " <script> function gotoUrl(){location.href='domain.php?rel=EditAmenities';}window.setTimeout('gotoUrl()',1900);</script> ";echo "</div>";} }}?></body></html>

/*----------------------- admin / Sub / Master / amenities_validate.php ---------------------- */<html><head><script> function gotoUrl(){location.href='domain.php?rel=Amenities';

Online Booking System for Camp Holiday Resort and Recreation Area 135

Page 136: Chapters

}window.setTimeout('gotoUrl()',2000);</script></head><body><?php// INSERT ROOM TYPEinclude("connection/connection.php");

$idir = "Sub/Master/imagesAmenities/"; $tdir = "Sub/Master/imagesAmenities/thumbs/"; $twidth = "115"; $theight = "85";

$do_save_amenities = $_POST['saveamenities'];

if($do_save_amenities){if (isset($_GET['subpage']) && $_GET['subpage'] == 'upload') { // Uploading/Resizing Script $image = $_POST["image"];$amname = $_POST['amname'];$amdesc = $_POST['amdesc'];$isactive = $_POST['isactive'];

$url = $_FILES['image']['name']; // Set $url To Equal The Filename For Later Use $file_ext = strrchr($_FILES['image']['name'], '.'); // Get The File Extention In The Format Of , // For Instance, .jpg, .gif or .php if ($_FILES['image']['type'] == "image/jpg" || $_FILES['image']['type'] == "image/jpeg" || $_FILES['image']['type'] == "image/pjpeg") {

$copy = copy($_FILES['image']['tmp_name'], "$idir" . $_FILES['image']['name']); // Move Image From Temporary // Location To Permanent Locationif ($copy) { // If The Script Was Able To Copy The Image To It's Permanent Location $simg = imagecreatefromjpeg("$idir" . $url); // Make A New Temporary Image To Create // The Thumbanil From $currwidth = imagesx($simg); // Current Image Width $currheight = imagesy($simg); // Current Image Height if ($currheight > $currwidth) { // If Height Is Greater Than Width $zoom = $twidth / $currheight; // Length Ratio For Width $newheight = $theight; // Height Is Equal To Max Height $newwidth = $currwidth * $zoom; // Creates The New Width } else { // Otherwise, Assume Width Is Greater Than Height // (Will Produce Same Result If Width Is Equal To Height) $zoom = $twidth / $currwidth; // Length Ratio For Height $newwidth = $twidth; // Width Is Equal To Max Width $newheight = $currheight * $zoom; // Creates The New Height } $dimg = imagecreate($newwidth, $newheight); // Make New Image For Thumbnail

Online Booking System for Camp Holiday Resort and Recreation Area 136

Page 137: Chapters

imagetruecolortopalette($simg, false, 256); // Create New Color Pallete $palsize = ImageColorsTotal($simg); for ($i = 0; $i < $palsize; $i++) { // Counting Colors In The Image $colors = ImageColorsForIndex($simg, $i); // Number Of Colors Used ImageColorAllocate($dimg, $colors['red'], $colors['green'], $colors['blue']); // Tell The Server What // Colors This Image Will Use } imagecopyresized($dimg, $simg, 0, 0, 0, 0, $newwidth, $newheight, $currwidth, $currheight); // Copy Resized Image To The // New Image (So We Can Save It) imagejpeg($dimg, "$tdir" . $url); // Saving The Image imagedestroy($simg); // Destroying The Temporary Image imagedestroy($dimg); // Destroying The Other Temporary Image

print "<div class='success'>Facilities Successfully Created...!</div>";

$img = "$idir" . $_FILES['image']['name'];$thumb = "$tdir" . $url;

$sqlString = "INSERT INTO tbl_amenities ( image,amenitiesName,amenitiesDesc,file_thumb,file_width,file_height,isActive)VALUES ( '$img','$amname','$amdesc','$thumb','$twidth','$theight','$isactive')";

mysql_query($sqlString) or die(mysql_error());

} else { print "<div class='error'>Wrong filetype (has to be a .jpg or .jpeg) Yours is $file_ext.</div>";print " <script> function gotoUrl(){location.href='domain.php?rel=EditAmenities';}window.setTimeout('gotoUrl()',1900);</script> ";} } else if($_FILES['image']['type'] == "") {print "<div class='warning'>No Image to Display. Choose a file Correctly.</div>";print " <script>

Online Booking System for Camp Holiday Resort and Recreation Area 137

Page 138: Chapters

function gotoUrl(){location.href='domain.php?rel=EditAmenities';}window.setTimeout('gotoUrl()',2000);</script> ";} else { print "<div class='error'>Wrong filetype (has to be a .jpg or .jpeg) Yours is $file_ext.</div>";print " <script> function gotoUrl(){location.href='domain.php?rel=EditAmenities';}window.setTimeout('gotoUrl()',1900);</script> ";} }}?></body></html>

/*----------------------- admin / Sub / Master / guestlist.php ----------------------------------- */<?php session_start(); include("connection/connection.php");?><script type="text/javascript">function getdelete ( selectedtype ){document.adminForm.deleteuser.value = selectedtype;document.adminForm.submit();}

function getEditGuest(){for(i = 0; i < adminForm.chk.length; i++){if(adminForm.chk[i].checked){cc = adminForm.chk[i].value;window.location = "domain.php?rel=EditGuest&id="+cc+"";}}}checked=false;function checkedAll(frm1) {var aa = document.getElementById('frm1');if (checked == false){checked = true} else {checked = false}for (var i =0; i < aa.length; i++){aa[i].checked = checked;

Online Booking System for Camp Holiday Resort and Recreation Area 138

Page 139: Chapters

}}function doSearch(phrase){var words = phrase.value.toLowerCase().split(" ");var table = document.getElementById("filterable");var ele;var on = 0;for (var r = 0; r < table.rows.length; r++){ele = table.rows[r].innerHTML.replace(/<[^>]+>/g,"");var displayStyle = 'none';for (var i = 0; i < words.length; i++) {if (ele.toLowerCase().indexOf(words[i])>=0){displayStyle = '';on++;}else {displayStyle = 'none';break;}}table.rows[r].style.display = displayStyle;}var n = document.getElementById("noresults");if ( on == 0 && n ) {n.style.display = "";document.getElementById("qt").innerHTML = phrase.value;}else{n.style.display = "none";}}</script><?php$do_delete = $_POST['deleteuser'];$id = $_POST['chk'];

if($do_delete){$N = count($id);

for($i=0;$i < $N; $i++){$sql = "DELETE FROM tbl_guest WHERE guest_id = '" . $id[$i] . "'";mysql_query($sql) or die(mysql_error());}}?> <div id="toolbar-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div>

Online Booking System for Camp Holiday Resort and Recreation Area 139

Page 140: Chapters

<div class="m"> <form action="domain.php?rel=Guests" method="post" name="adminForm" id="frm1"><input type="hidden" name="deleteuser" /><div class="toolbar" id="toolbar"> <table class="toolbar"><tr> <td class="button" id="toolbar-delete"> <a href="javascript:getdelete('delete')" onclick="return confirm('Are you sure you want to DELETE?');"> <span class="icon-32-delete" title="Delete"></span> Delete</a> </td> <td class="button" id="toolbar-edit"> <a href="javascript: getEditGuest()"> <span class="icon-32-edit" title="Edit"></span> Edit</a> </td> <td class="button" id="toolbar-new"> <a href="domain.php?rel=NewGuest"> <span class="icon-32-new" title="New"></span> New</a> </td><td></td> </tr></table> </div> <div class="header icon-48-list-of-guest">List of Guests</div> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div> <div class="clr"></div><div id="submenu-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <ul id="submenu"> <li><a href="domain.php?rel=Guests&page=1" class="active">Guests</a></li><li><a href="domain.php?rel=RoomList&page=1">Rooms</a></li>

Online Booking System for Camp Holiday Resort and Recreation Area 140

Page 141: Chapters

<li><a href="domain.php?rel=RoomType&page=1">Room Types</a></li> <li><a href="domain.php?rel=Amenities&page=1">Facilities</a></li><li><a href="domain.php?rel=Services&page=1">Services</a></li> </ul> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

<div id="element-box4"><div class="t"> <div class="t"> <div class="t"></div> </div> </div>

<div class="m"><div style="font-weight: bolder; padding: 5px;">Search <input type="text" size="38" name="filter" id="filter" style="border: 1px solid red;" onkeyup="doSearch(filter);" /></div><table class="adminlist"><thead><tr> <th width="5%">#</th> <th width="5%"><input type='checkbox' name='checkall' onclick='checkedAll(frm1);'></th> <th width="20%" nowrap="nowrap">Last Name</th> <th width="20%" class="title">First Name</th><th width="5%" nowrap="nowrap">MI</th><th width="20%" nowrap="nowrap">Contact No.</th><th width="20%" nowrap="nowrap">Email</th><th width="5%" nowrap="nowrap">isActive</th> </tr> </thead><tbody id="filterable"> <?php$sql = "SELECT * FROM tbl_guestORDER BY isActive='YES' ";$result = mysql_query($sql) or die("No users database!");

$count = 1;

Online Booking System for Camp Holiday Resort and Recreation Area 141

Page 142: Chapters

while($row = mysql_fetch_array($result)){ ?><tr><td align="center"><?php echo $count; ?></td> <td align="center"><input type="checkbox" value="<?php echo $row['guest_id']; ?>" name="chk[]" id="chk" onselect="return getEditGuest()" /></td> <td align="center"><?php echo $row['lastName']; ?></td><td align="center"><?php echo $row['firstName']; ?></td><td align="center"><?php echo $row['middleInitial']; ?></td> <td align="center"><?php echo $row['contactNo']; ?></td><td align="center"><?php echo $row['Email']; ?></td><td align="center"><?php echo $row['isActive']; ?></td> </tr> <?php $count = $count + 1;}?><tr style="display:none; color:#F00; font-weight: bolder;" id="noresults"><td colspan="9">No Records Found that start with "<span id="qt"></span>".</td></tr> </tbody> </table> </form> <div class="clr"></div> </div>

<div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div></div>

/*----------------------- admin / Sub / Master / guestlist_update.php ------------------------- */<html><head><script> function gotoUrl(){location.href='domain.php?rel=Guests';}window.setTimeout('gotoUrl()',1500);</script></head><body><?phpinclude("connection/connection.php");

Online Booking System for Camp Holiday Resort and Recreation Area 142

Page 143: Chapters

$do_update_guests = $_POST['updateguests'];

if($do_update_guests){$id = $_POST['id'];$firstname = $_POST['fname'];$lastname = $_POST['lname'];$mi = strtoupper($_POST['mi']);$contactno = $_POST['contactno'];$email = $_POST['email'];$isactive = $_POST['isactive'];

print "<div class='success'>Guest Successfully Updated...!</div>";

$sql = "UPDATE tbl_guestSET firstname = '$firstname',lastname = '$lastname',middleinitial = '$mi',contactno = '$contactno',email = '$email',isactive = '$isactive'WHERE guest_id = '$id'";

mysql_query($sql) or die("No user database!");}?></body></html>

/*----------------------- admin / Sub / Master / guestlist_validate.php ------------------------ */<html><head><script> function gotoUrl(){location.href='domain.php?rel=Guests';}window.setTimeout('gotoUrl()',1500);</script></head><body><?phpinclude("connection/connection.php");

$do_save_guest = $_POST['saveguests'];

if($do_save_guest){

$firstname = $_POST['fname'];$lastname = $_POST['lname'];$mi = strtoupper($_POST['mi']);

Online Booking System for Camp Holiday Resort and Recreation Area 143

Page 144: Chapters

$contactno = $_POST['contactno'];$email = $_POST['email'];$isactive = $_POST['isactive'];

print "<div class='success'>Guest Successfully Created...!</div>";

$sql = "INSERT INTO tbl_guest( firstname,lastname,middleinitial,contactno,email,isactive ) VALUES ( '$firstname','$lastname','$mi','$contactno','$email','$isactive')";mysql_query($sql) or die(mysql_error());}?></body></html>

/*----------------------- admin / Sub / Master / roomlist.php ----------------------------------- */<?php session_start(); ?><script type="text/javascript">function getDeleteRoomList( selectedtype ){document.adminForm.deleteroomlist.value = selectedtype;document.adminForm.submit();}

function getEditRoomList(){for(i = 0; i < adminForm.chk.length; i++){if(adminForm.chk[i].checked){cc = adminForm.chk[i].value;window.location = "domain.php?rel=EditRoomList&id="+cc+"";}}}

checked=false;function checkedAll(frm1) {var aa= document.getElementById('frm1');if (checked == false){checked = true} else {checked = false}

Online Booking System for Camp Holiday Resort and Recreation Area 144

Page 145: Chapters

for (var i =0; i < aa.elements.length; i++){aa.elements[i].checked = checked;}}function doSearch(phrase){var words = phrase.value.toLowerCase().split(" ");var table = document.getElementById("filterable");var ele;var on = 0;for (var r = 0; r < table.rows.length; r++){ele = table.rows[r].innerHTML.replace(/<[^>]+>/g,"");var displayStyle = 'none';for (var i = 0; i < words.length; i++) {if (ele.toLowerCase().indexOf(words[i])>=0){displayStyle = '';on++;}else {displayStyle = 'none';break;}}table.rows[r].style.display = displayStyle;}var n = document.getElementById("noresults");if ( on == 0 && n ) {n.style.display = "";document.getElementById("qt").innerHTML = phrase.value;}else{n.style.display = "none";}}</script><?php$do_delete = $_POST['deleteroomlist'];$id = $_POST['chk'];

if($do_delete){$N = count($id);

for($i=0;$i < $N; $i++){$sql = "DELETE FROM tbl_room WHERE room_id = '" . $id[$i] . "'";mysql_query($sql) or die(mysql_error());}}?> <div id="toolbar-box"> <div class="t"> <div class="t"> <div class="t"></div>

Online Booking System for Camp Holiday Resort and Recreation Area 145

Page 146: Chapters

</div> </div> <div class="m"> <form action="domain.php?rel=RoomList" method="post" name="adminForm" id="frm1"> <input type="hidden" name="deleteroomlist" /><div class="toolbar" id="toolbar"> <table class="toolbar"><tr> <td class="button" id="toolbar-delete"> <a href="javascript:getDeleteRoomList('delete')" onclick="return confirm('Are you sure you want to DELETE?');"> <span class="icon-32-delete" title="Delete"></span> Delete</a> </td> <td class="button" id="toolbar-edit"> <a href="javascript:getEditRoomList()"> <span class="icon-32-edit" title="Edit"></span> Edit</a> </td> <td class="button" id="toolbar-new"> <a href="domain.php?rel=NewRoomList"> <span class="icon-32-new" title="New"></span> New</a> </td> <td></td></tr></table> </div> <div class="header icon-48-list-of-rooms">List of Rooms</div> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div> <div class="clr"></div><div id="submenu-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <ul id="submenu">

Online Booking System for Camp Holiday Resort and Recreation Area 146

Page 147: Chapters

<li><a href="domain.php?rel=Guests&page=1">Guests</a></li><li><a href="domain.php?rel=RoomList&page=1" class="active">Rooms</a></li><li><a href="domain.php?rel=RoomType&page=1">Room Types</a></li><li><a href="domain.php?rel=Amenities&page=1">Facilities</a></li><li><a href="domain.php?rel=Services&page=1">Services</a></li> </ul> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

<div id="element-box4"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div>

<div class="m"><div style="font-weight: bolder; padding: 5px;">Search <input type="text" size="38" name="filter" id="filter" style="border: 1px solid red;" onkeyup="doSearch(filter);" /></div><table class="adminlist"> <thead> <tr> <th width="5%">#</th> <th width="5%"><input type='checkbox' name='checkall' onclick='checkedAll(frm1);'></th> <th width="15%" class="title">Room No.</th><th width="40%" nowrap="nowrap">Room Name</th><th width="10%" class="title">Rate</th><th width="10%" class="title">isAvailable</th><th width="5%" class="title">isActive</th></tr> </thead><tbody id="filterable"> <?php $sql = " SELECT RT.roomName, R.* FROM tbl_roomtype RTINNER JOIN tbl_room R ON RT.roomType_id = R.roomType_idORDER BY R.Rate, R.room_id ";$result = mysql_query($sql) or die("No users database!");

Online Booking System for Camp Holiday Resort and Recreation Area 147

Page 148: Chapters

$count = 1;

while($row = mysql_fetch_array($result)){

?><tr><td align="center"><?php echo $count; ?></td> <td align="center"><input type="checkbox" value="<?php echo $row['room_id']; ?>" name="chk[]" id="chk" onselect="return getEditRoomList()" /></td> <td align="center"><?php echo $row['roomNumber']; ?></td><td align="center"><?php echo $row['roomName']; ?></td><td align="center"><?php echo $row['Rate']; ?></td><td align="center"><?php echo $row['isAvailable']; ?></td><td align="center"><?php echo $row['isActive']; ?></td></tr> <?php $count = $count + 1;}?> <tr style="display:none; color:#F00; font-weight: bolder;" id="noresults"><td colspan="9">No Records Found that start with "<span id="qt"></span>".</td></tr> </tbody> </table> </form> <div class="clr"></div></div>

<div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div></div>

/*----------------------- admin / Sub / Master / roomlist _update.php ------------------------ */<html><head><script> function gotoUrl(){location.href='domain.php?rel=RoomList';}window.setTimeout('gotoUrl()',1500);</script>

Online Booking System for Camp Holiday Resort and Recreation Area 148

Page 149: Chapters

</head><body><?phpinclude("connection/connection.php");

$do_update_roomlists = $_POST['updateroomlist'];

if($do_update_roomlists){$id = $_POST['id'];$roomtype_id = $_POST['roomtype_id'];$roomnumber = $_POST['roomnum'];$isAvailable = $_POST['isavailable'];$isActive = $_POST['isactive'];

print "<div class='success'>Room Successfully Updated...!</div>";

$sql = "UPDATE tbl_roomSET roomnumber = '$roomnumber',roomType_id = '$roomtype_id',isAvailable = '$isAvailable',isActive = '$isActive'WHERE room_id = '$id'";

mysql_query($sql) or die("No user database!");}?></body></html>

/*----------------------- admin / Sub / Master / roomlist _validate.php ----------------------- */<html><head><script> function gotoUrl(){location.href='domain.php?rel=RoomList';}window.setTimeout('gotoUrl()',1500);</script></head><body><?phpinclude("connection/connection.php");

$do_save_roomlists = $_POST['saveroomlists'];

if($do_save_roomlists){$roomtype_id = $_POST['roomtype_id'];$roomnum = $_POST['roomnum'];$roomrate = $_POST['roomrate'];

Online Booking System for Camp Holiday Resort and Recreation Area 149

Page 150: Chapters

$isAvailable = $_POST['isavailable'];$isActive = $_POST['isactive'];

print "<div class='success'>Room Successfully Created...!</div>";

$sql = "INSERT INTO tbl_room( roomType_id,roomNumber,Rate,isAvailable,isActive ) VALUES ( '$roomtype_id','$roomnum','$roomrate','$isAvailable','$isActive' )";

mysql_query($sql) or die(mysql_error());}?></body></html>

/*----------------------- admin / Sub / Master / roomtypes.php -------------------------------- */<?php session_start(); include("connection/connection.php");?><script type="text/javascript">function getDeleteRoomType ( selectedtype ){document.adminForm.deleteroomtype.value = selectedtype;document.adminForm.submit();}

function getEditRoomType(){for(i = 0; i < adminForm.chk.length; i++){if(adminForm.chk[i].checked){cc = adminForm.chk[i].value;window.location = "domain.php?rel=EditRoomType&id="+cc+"";}}}

checked=false;function checkedAll(frm1) {var aa= document.getElementById('frm1');if (checked == false){checked = true} else {checked = false}

Online Booking System for Camp Holiday Resort and Recreation Area 150

Page 151: Chapters

for (var i =0; i < aa.elements.length; i++){aa.elements[i].checked = checked;}}function doSearch(phrase){var words = phrase.value.toLowerCase().split(" ");var table = document.getElementById("filterable");var ele;var on = 0;for (var r = 0; r < table.rows.length; r++){ele = table.rows[r].innerHTML.replace(/<[^>]+>/g,"");var displayStyle = 'none';for (var i = 0; i < words.length; i++) {if (ele.toLowerCase().indexOf(words[i])>=0){displayStyle = '';on++;}else {displayStyle = 'none';break;}}table.rows[r].style.display = displayStyle;}var n = document.getElementById("noresults");if ( on == 0 && n ) {n.style.display = "";document.getElementById("qt").innerHTML = phrase.value;}else{n.style.display = "none";}}</script><?php$do_delete = $_POST['deleteroomtype'];$id = $_POST['chk'];

if($do_delete){$N = count($id);

for($i=0;$i < $N; $i++){$sql = "DELETE FROM tbl_roomtype WHERE roomType_id = '" . $id[$i] . "'";mysql_query($sql) or die(mysql_error());}}?> <div id="toolbar-box"> <div class="t"> <div class="t"> <div class="t"></div>

Online Booking System for Camp Holiday Resort and Recreation Area 151

Page 152: Chapters

</div> </div> <div class="m"> <form action="domain.php?rel=RoomType&subpage=upload" method="post" name="adminForm" id="frm1"> <input type="hidden" name="deleteroomtype" /><div class="toolbar" id="toolbar"> <table class="toolbar"><tr> <td class="button" id="toolbar-delete"> <a href="javascript:getDeleteRoomType('delete')" onclick="return confirm('Are you sure you want to DELETE?');"> <span class="icon-32-delete" title="Delete"></span> Delete</a> </td> <td class="button" id="toolbar-edit"> <a href="javascript:getEditRoomType()"> <span class="icon-32-edit" title="Edit"></span> Edit</a> </td><td class="button" id="toolbar-new"> <a href="domain.php?rel=NewRoomType"> <span class="icon-32-new" title="New"></span> New</a> </td><td></td></tr></table> </div> <div class="header1 icon-48-96-room-types">Types of Rooms</div> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div> <div class="clr"></div><div id="submenu-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m">

Online Booking System for Camp Holiday Resort and Recreation Area 152

Page 153: Chapters

<ul id="submenu"> <li><a href="domain.php?rel=Guests&page=1">Guests</a></li><li><a href="domain.php?rel=RoomList&page=1">Rooms</a></li><li><a href="domain.php?rel=RoomType&page=1" class="active">Room Types</a></li><li><a href="domain.php?rel=Amenities&page=1">Facilities</a></li><li><a href="domain.php?rel=Services&page=1">Services</a></li> </ul> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

<div id="element-box4"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div>

<div class="m"><div style="font-weight: bolder; padding: 5px;">Search <input type="text" size="38" name="filter" id="filter" style="border: 1px solid red;" onkeyup="doSearch(filter);" /></div><table class="adminlist"> <thead> <tr> <th width="5%">#</th> <th width="5%"><input type='checkbox' name='checkall' onclick='checkedAll(frm1);'></th> <th width="10%" nowrap="nowrap">Room Image</th><th width="35%" nowrap="nowrap">Room Name</th><th width="45%" class="title">Description</th></tr> </thead><tbody id="filterable"> <?php$sql = "SELECT * FROM tbl_roomtype ";$result = mysql_query($sql) or die("No users database!");

$count = 1;

while($row = mysql_fetch_array($result))

Online Booking System for Camp Holiday Resort and Recreation Area 153

Page 154: Chapters

{

?><tr><td align="center"><?php echo $count; ?></td> <td align="center"><input type="checkbox" value="<?php echo $row['roomType_id']; ?>" name="chk[]" id="chk" onselect="return getEditRoomType()" /></td> <td align="center"><?php if($row['image'] != "Sub/Master/images/thumbs/"){ ?><img src="<?php echo $row['file_thumb']; ?>" width="100" height="75"/><?php } ?></td> <td align="center"><?php echo $row['roomName']; ?></td> <td align="center"><?php echo $row['roomTypeDesc']; ?></td></tr> <?php $count = $count + 1;}?> <tr style="display:none; color:#F00; font-weight: bolder;" id="noresults"><td colspan="9">No Records Found that start with "<span id="qt"></span>".</td></tr> </tbody> </table> </form> <div class="clr"></div></div>

<div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div></div>

/*----------------------- admin / Sub / Master / roomtypes _update.php ---------------------- */<html><head><script> function gotoUrl(){location.href='domain.php?rel=RoomType';}window.setTimeout('gotoUrl()',2000);</script></head><body>

Online Booking System for Camp Holiday Resort and Recreation Area 154

Page 155: Chapters

<?php// UPDATE ROOM TYPEinclude("connection/connection.php");

$idir = "Sub/Master/imagesRoomType/"; $tdir = "Sub/Master/imagesRoomType/thumbs/"; $twidth = "115"; $theight = "85";

$do_update_roomtypes = $_POST['updateroomtype'];

if($do_update_roomtypes){if (isset($_GET['subpage']) && $_GET['subpage'] == 'upload') { // Uploading/Resizing Script $id = $_POST['id'];$image = $_POST['image'];$roomname = $_POST['roomname'];$roomtypedesc = $_POST['roomtypedesc'];

$url = $_FILES['image']['name']; // Set $url To Equal The Filename For Later Use $file_ext = strrchr($_FILES['image']['name'], '.'); // Get The File Extention In The Format Of , // For Instance, .jpg, .gif or .php if ($_FILES['image']['type'] == "image/jpg" || $_FILES['image']['type'] == "image/jpeg" || $_FILES['image']['type'] == "image/pjpeg") {

$copy = copy($_FILES['image']['tmp_name'], "$idir" . $_FILES['image']['name']); // Move Image From Temporary // Location To Permanent Locationif ($copy) { // If The Script Was Able To Copy The Image To It's Permanent Location $simg = imagecreatefromjpeg("$idir" . $url); // Make A New Temporary Image To Create // The Thumbanil From $currwidth = imagesx($simg); // Current Image Width $currheight = imagesy($simg); // Current Image Height if ($currheight > $currwidth) { // If Height Is Greater Than Width $zoom = $twidth / $currheight; // Length Ratio For Width $newheight = $theight; // Height Is Equal To Max Height $newwidth = $currwidth * $zoom; // Creates The New Width } else { // Otherwise, Assume Width Is Greater Than Height // (Will Produce Same Result If Width Is Equal To Height) $zoom = $twidth / $currwidth; // Length Ratio For Height $newwidth = $twidth; // Width Is Equal To Max Width $newheight = $currheight * $zoom; // Creates The New Height } $dimg = imagecreate($newwidth, $newheight); // Make New Image For Thumbnail imagetruecolortopalette($simg, false, 256); // Create New Color Pallete $palsize = ImageColorsTotal($simg); for ($i = 0; $i < $palsize; $i++) { // Counting Colors In The Image $colors = ImageColorsForIndex($simg, $i); // Number Of Colors Used ImageColorAllocate($dimg, $colors['red'], $colors['green'], $colors['blue']);

Online Booking System for Camp Holiday Resort and Recreation Area 155

Page 156: Chapters

// Tell The Server What // Colors This Image Will Use } imagecopyresized($dimg, $simg, 0, 0, 0, 0, $newwidth, $newheight, $currwidth, $currheight); // Copy Resized Image To The // New Image (So We Can Save It) imagejpeg($dimg, "$tdir" . $url); // Saving The Image imagedestroy($simg); // Destroying The Temporary Image imagedestroy($dimg); // Destroying The Other Temporary Image

print "<div class='success'>Room Type Successfully Updated...!</div>";

$img = "$idir" . $_FILES['image']['name'];$thumb = "$tdir" . $url;

$sqlString = " UPDATE tbl_roomtypeSET image = '$img', roomName = '$roomname',roomTypeDesc = '$roomtypedesc',file_thumb = '$thumb',file_width = '$twidth',file_height = '$theight'WHERE roomType_id = '$id' ";

mysql_query($sqlString) or die(mysql_error());

} else { print "<div class='error'>Wrong filetype (has to be a .jpg or .jpeg) Yours is $file_ext.</div>";print " <script> function gotoUrl(){location.href='domain.php?rel=EditRoomType';}window.setTimeout('gotoUrl()',1900);</script> ";} } else if($_FILES['image']['type'] == "") {print "<div class='warning'>No Image to Display. Choose a file Correctly.</div>";print " <script> function gotoUrl(){location.href='domain.php?rel=EditRoomType';}window.setTimeout('gotoUrl()',2000);</script> ";} else { print "<div class='error'>Wrong filetype (has to be a .jpg or .jpeg) Yours is $file_ext.</div>";print " <script> function gotoUrl(){location.href='domain.php?rel=EditRoomType';}

Online Booking System for Camp Holiday Resort and Recreation Area 156

Page 157: Chapters

window.setTimeout('gotoUrl()',1900);</script> ";} }}?></body></html>

/*----------------------- admin / Sub / Master / roomtypes _validate.php -------------------- */<html><head><script> function gotoUrl(){location.href='domain.php?rel=RoomType';}window.setTimeout('gotoUrl()',2000);</script></head><body><?php// INSERT ROOM TYPEinclude("connection/connection.php");

$idir = "Sub/Master/imagesRoomType/"; $tdir = "Sub/Master/imagesRoomType/thumbs/"; $twidth = "115"; $theight = "85";

$do_save_roomtypes = $_POST['saveroomtypes'];

if($do_save_roomtypes){if (isset($_GET['subpage']) && $_GET['subpage'] == 'upload') { // Uploading/Resizing Script $image = $_POST["image"];$roomname = $_POST['roomname'];$roomtypedesc = $_POST['roomtypedesc'];

$url = $_FILES['image']['name']; // Set $url To Equal The Filename For Later Use $file_ext = strrchr($_FILES['image']['name'], '.'); // Get The File Extention In The Format Of , // For Instance, .jpg, .gif or .php if ($_FILES['image']['type'] == "image/jpg" || $_FILES['image']['type'] == "image/jpeg" || $_FILES['image']['type'] == "image/pjpeg") {

$copy = copy($_FILES['image']['tmp_name'], "$idir" . $_FILES['image']['name']); // Move Image From Temporary // Location To Permanent Locationif ($copy) { // If The Script Was Able To Copy The Image To It's Permanent Location $simg = imagecreatefromjpeg("$idir" . $url); // Make A New Temporary Image To Create

Online Booking System for Camp Holiday Resort and Recreation Area 157

Page 158: Chapters

// The Thumbanil From $currwidth = imagesx($simg); // Current Image Width $currheight = imagesy($simg); // Current Image Height if ($currheight > $currwidth) { // If Height Is Greater Than Width $zoom = $twidth / $currheight; // Length Ratio For Width $newheight = $theight; // Height Is Equal To Max Height $newwidth = $currwidth * $zoom; // Creates The New Width } else { // Otherwise, Assume Width Is Greater Than Height // (Will Produce Same Result If Width Is Equal To Height) $zoom = $twidth / $currwidth; // Length Ratio For Height $newwidth = $twidth; // Width Is Equal To Max Width $newheight = $currheight * $zoom; // Creates The New Height } $dimg = imagecreate($newwidth, $newheight); // Make New Image For Thumbnail imagetruecolortopalette($simg, false, 256); // Create New Color Pallete $palsize = ImageColorsTotal($simg); for ($i = 0; $i < $palsize; $i++) { // Counting Colors In The Image $colors = ImageColorsForIndex($simg, $i); // Number Of Colors Used ImageColorAllocate($dimg, $colors['red'], $colors['green'], $colors['blue']); // Tell The Server What // Colors This Image Will Use } imagecopyresized($dimg, $simg, 0, 0, 0, 0, $newwidth, $newheight, $currwidth, $currheight); // Copy Resized Image To The // New Image (So We Can Save It) imagejpeg($dimg, "$tdir" . $url); // Saving The Image imagedestroy($simg); // Destroying The Temporary Image imagedestroy($dimg); // Destroying The Other Temporary Image

print "<div class='success'>Room Type Successfully Created...!</div>";

$img = "$idir" . $_FILES['image']['name'];$thumb = "$tdir" . $url;

$sqlString = "INSERT INTO tbl_roomtype ( image,roomName,roomTypeDesc,file_thumb,file_width,file_height)VALUES ( '$img','$roomname','$roomtypedesc','$thumb','$twidth','$theight' )";

mysql_query($sqlString) or die(mysql_error());

Online Booking System for Camp Holiday Resort and Recreation Area 158

Page 159: Chapters

} else { print "<div class='error'>Wrong filetype (has to be a .jpg or .jpeg) Yours is $file_ext.</div>";print " <script> function gotoUrl(){location.href='domain.php?rel=EditRoomType';}window.setTimeout('gotoUrl()',1900);</script> ";} } else if($_FILES['image']['type'] == "") {print "<div class='warning'>No Image to Display. Choose a file Correctly.</div>";print " <script> function gotoUrl(){location.href='domain.php?rel=EditRoomType';}window.setTimeout('gotoUrl()',2000);</script> ";} else { print "<div class='error'>Wrong filetype (has to be a .jpg or .jpeg) Yours is $file_ext.</div>";print " <script> function gotoUrl(){location.href='domain.php?rel=EditRoomType';}window.setTimeout('gotoUrl()',1900);</script> ";} }}?></body></html>

/*----------------------- admin / Sub / Master / services.php ----------------------------------- */<?php session_start(); include("connection/connection.php");?><script type="text/javascript">function getDeleteServices(selectedtype){document.adminForm.deleteservices.value = selectedtype;document.adminForm.submit();}

function getEditServices(){for(i = 0; i < adminForm.chk.length; i++){if(adminForm.chk[i].checked){cc = adminForm.chk[i].value;window.location = "domain.php?rel=EditServices&id="+cc+"";}

Online Booking System for Camp Holiday Resort and Recreation Area 159

Page 160: Chapters

}}checked=false;function checkedAll(frm1) {var aa = document.getElementById('frm1');if (checked == false){checked = true} else {checked = false}for (var i =0; i < aa.length; i++){aa[i].checked = checked;}}function doSearch(phrase){var words = phrase.value.toLowerCase().split(" ");var table = document.getElementById("filterable");var ele;var on = 0;for (var r = 0; r < table.rows.length; r++){ele = table.rows[r].innerHTML.replace(/<[^>]+>/g,"");var displayStyle = 'none';for (var i = 0; i < words.length; i++) {if (ele.toLowerCase().indexOf(words[i])>=0){displayStyle = '';on++;}else {displayStyle = 'none';break;}}table.rows[r].style.display = displayStyle;}var n = document.getElementById("noresults");if ( on == 0 && n ) {n.style.display = "";document.getElementById("qt").innerHTML = phrase.value;}else{n.style.display = "none";}}</script><?php$do_delete = $_POST['deleteservices'];$id = $_POST['chk'];

if($do_delete){$N = count($id);

Online Booking System for Camp Holiday Resort and Recreation Area 160

Page 161: Chapters

for($i=0;$i < $N; $i++){$sql = "DELETE FROM tbl_services WHERE service_id = '" . $id[$i] . "'";mysql_query($sql) or die(mysql_error());}}?> <div id="toolbar-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <form action="domain.php?rel=Services" method="post" name="adminForm" id="frm1"><input type="hidden" name="deleteservices" /><div class="toolbar" id="toolbar"> <table class="toolbar"><tr> <td class="button" id="toolbar-delete"> <a href="javascript:getDeleteServices('delete')" onclick="return confirm('Are you sure you want to DELETE?');"> <span class="icon-32-delete" title="Delete"></span> Delete</a> </td> <td class="button" id="toolbar-edit"> <a href="javascript: getEditServices()"> <span class="icon-32-edit" title="Edit"></span> Edit</a> </td> <td class="button" id="toolbar-new"> <a href="domain.php?rel=NewServices"> <span class="icon-32-new" title="New"></span> New</a> </td><td></td> </tr></table> </div> <div class="header icon-48-list-of-services">List of Services</div> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div>

Online Booking System for Camp Holiday Resort and Recreation Area 161

Page 162: Chapters

</div> <div class="clr"></div><div id="submenu-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <ul id="submenu"> <li><a href="domain.php?rel=Guests&page=1">Guests</a></li><li><a href="domain.php?rel=RoomList&page=1">Rooms</a></li><li><a href="domain.php?rel=RoomType&page=1">Room Types</a></li> <li><a href="domain.php?rel=Amenities&page=1">Facilities</a></li> <li><a href="domain.php?rel=Services&page=1" class="active">Services</a></li> </ul> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

<div id="element-box4"><div class="t"> <div class="t"> <div class="t"></div> </div> </div>

<div class="m"><div style="font-weight: bolder; padding: 5px;">Search <input type="text" size="38" name="filter" id="filter" style="border: 1px solid red;" onkeyup="doSearch(filter);" /></div><table class="adminlist"><thead><tr> <th width="5%">#</th> <th width="5%"><input type='checkbox' name='checkall' onclick='checkedAll(frm1);'></th> <th width="20%" nowrap="nowrap">Category</th> <th width="20%" class="title">Description</th><th width="5%" nowrap="nowrap">Price</th><th width="5%" nowrap="nowrap">isActive</th> </tr>

Online Booking System for Camp Holiday Resort and Recreation Area 162

Page 163: Chapters

</thead><tbody id="filterable"> <?php$sql = " SELECT * FROM tbl_servicesORDER BY isActive='YES' ";$result = mysql_query($sql) or die("No users database!");

$count = 1;

while($row = mysql_fetch_array($result)){ ?><tr><td align="center"><?php echo $count; ?></td> <td align="center"><input type="checkbox" value="<?php echo $row['service_id']; ?>" name="chk[]" id="chk" onselect="return getEditGuest()" /></td> <td align="center"><?php echo $row['Category']; ?></td><td align="center"><?php echo $row['Description']; ?></td><td align="center"><?php echo $row['Price']; ?></td><td align="center"><?php echo $row['isActive']; ?></td> </tr> <?php $count = $count + 1;}?><tr style="display:none; color:#F00; font-weight: bolder;" id="noresults"><td colspan="9">No Records Found that start with "<span id="qt"></span>".</td></tr> </tbody> </table> </form> <div class="clr"></div></div>

<div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div></div>

/*----------------------- admin / Sub / Master / services _addcategory.php ------------------ */<?php session_start();include("connection/connection.php");date_default_timezone_set('Asia/Taipei');?>

Online Booking System for Camp Holiday Resort and Recreation Area 163

Page 164: Chapters

<html><head><title>View Details</title>

<link rel="stylesheet" type="text/css" href="css/template.css" /> <link rel="stylesheet" type="text/css" href="css/rounded.css" /> <link rel="stylesheet" type="text/css" href="css/styles.css"/><link rel="stylesheet" type="text/css" href="css/messagebox.css"/><link href="css/calendar.css" rel="stylesheet" type="text/css"/><script src="js/filterTable.js" language="JavaScript"></script><script src="js/calendar.js" language="JavaScript"></script><script type="text/javascript" src="js/menu.js"></script><script type="text/javascript" src="js/reservationtype.js"></script></head><body><div id="toolbar-box5"> <div class="t"><div class="t"><div class="t"></div></div></div> <div class="m"> <div class="toolbar" id="toolbar"></div> <div class="header icon-48-add-services">Add Category</div> </div> <div class="b"><div class="b"><div class="b"></div></div></div></div> <br /><div id="element-box5"><div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"><form action="popup.php?rel=ValidateCategory" method="post"><table style="font-size: 12px; margin-left: 50px;"><tr><td>Category</td><td><input type="text" name="category"></td></tr><tr><td colspan="2" align="right"><input type="submit" value="Add" style="font-size:16px; padding-left:15px; padding-right:15px; font-weight: bolder; cursor:pointer;"/></td> </tr></table></form> </div>

Online Booking System for Camp Holiday Resort and Recreation Area 164

Page 165: Chapters

<div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div></body></html>

/*----------------------- admin / Sub / Master / services _ addcategory_validate.php ------ */<html><head><title>Add Category</title>

<link rel="stylesheet" type="text/css" href="css/template.css" /> <link rel="stylesheet" type="text/css" href="css/rounded.css" /> <link rel="stylesheet" type="text/css" href="css/styles.css"/><link rel="stylesheet" type="text/css" href="css/messagebox.css"/><link href="css/calendar.css" rel="stylesheet" type="text/css"/><script src="js/filterTable.js" language="JavaScript"></script><script src="js/calendar.js" language="JavaScript"></script><script type="text/javascript" src="js/menu.js"></script><script type="text/javascript" src="js/reservationtype.js"></script></head><body><div id="toolbar-box5"> <div class="t"><div class="t"><div class="t"></div></div></div> <div class="m"> <div class="toolbar" id="toolbar"></div> <div style="font-size:14px; font-weight:bolder; color:#060; margin-top:auto; margin-left:auto; padding-left: 10px;">Category Successfully Created...!</div> </div> <div class="b"><div class="b"><div class="b"></div></div></div></div> <?phpinclude("connection/connection.php");

$category = strtoupper($_POST['category']);

$sql = "INSERT INTO tbl_servicescategoryVALUES ( '', '$category')";mysql_query($sql) or die(mysql_error());?></body></html>

/*----------------------- admin / Sub / Master / services _update.php ------------------------- */

Online Booking System for Camp Holiday Resort and Recreation Area 165

Page 166: Chapters

<html><head><script> function gotoUrl(){location.href='domain.php?rel=Services';}window.setTimeout('gotoUrl()',1500);</script></head><body><?phpinclude("connection/connection.php");

$do_update_services = $_POST['updateservices'];

if($do_update_services){$id = $_POST['id'];$category = $_POST['category'];$description = $_POST['description'];$price = $_POST['price'];$isactive = $_POST['isactive'];

print "<div class='success'>Services Successfully Updated...!</div>";

$sql = "UPDATE tbl_servicesSET Category = '$category',Description = '$description',Price = '$price',isactive = '$isactive'WHERE service_id = '$id'";

mysql_query($sql) or die("No user database!");}?></body></html>

/*----------------------- admin / Sub / Master / services _validate.php ----------------------- */<html><head><script> function gotoUrl(){location.href='domain.php?rel=Services';}window.setTimeout('gotoUrl()',1500);</script></head><body><?php

Online Booking System for Camp Holiday Resort and Recreation Area 166

Page 167: Chapters

include("connection/connection.php");

$do_save_services = $_POST['saveservices'];

if($do_save_services){

$category = $_POST['category'];$description = $_POST['description'];$price = $_POST['price'];$isactive = $_POST['isactive'];

print "<div class='success'>Services Successfully Created...!</div>";

$sql = "INSERT INTO tbl_services( Category,Description,Price,isactive ) VALUES ( '$category','$description','$price','$isactive')";mysql_query($sql) or die(mysql_error());}?></body></html>

/*----------------------- admin / Sub / Reservations / book.php -------------------------------- */<?php session_start();include("connection/connection.php");date_default_timezone_set('Asia/Taipei');?><html><head><script language="javascript" type="text/javascript">function CheckAllFields() {var txtArrival, txtDeparture, txtReserve

txtReserve = String(document.checkavailability.reservetype.value);txtArrival = document.checkavailability.arrival.value;txtDeparture = document.checkavailability.departure.value;

if( txtReserve == "-- Select --"){alert('-- Select -- is not a correct Reservation Type!');return false;}if( txtArrival == "" ){alert('Arrival field must be filled in!');

Online Booking System for Camp Holiday Resort and Recreation Area 167

Page 168: Chapters

return false;}if( txtDeparture == "" ){alert('Departure field must be filled in!');return false;}if(txtArrival >= txtDeparture){alert('Please Select Correct Arrival Date.');return false;}return true;}</script></head><div id="toolbar-box"> <div class="t"><div class="t"><div class="t"></div></div></div> <div class="m"> <div class="toolbar" id="toolbar"></div> <div class="header icon-48-user">Reservation Details</div> </div> <div class="b"><div class="b"><div class="b"></div></div></div></div> <div id="element-box1"><div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <form action="<?php echo $PHP_SELF ?>" name="checkavailability" method="post"><table border="0"><tr><td>Reservation Type</td><td><select name="reservetype" style="width:90px;"><option value="-- Select --">-- Select --</option><option value="Walk-in" <?php if($_POST['reservetype'] == 'Walk-in') echo "selected='selected'"; ?>>Walk-in</option><option value="Call"<?php if($_POST['reservetype'] == 'Call') echo "selected='selected'"; ?>>Call</option></select></td></tr><tr><td>Arrival</td><td colspan="2"><input name="arrival" id="arrival"value="<?php echo $_POST['arrival'];?>" type="text" size="11px" readonly/><script language="JavaScript">new tcal ({

Online Booking System for Camp Holiday Resort and Recreation Area 168

Page 169: Chapters

// form name'formname': 'checkavailability',// input name'controlname': 'arrival'});</script></td></tr><tr> <td>Departure</td><td colspan="2"><input name="departure" id="departure"value="<?php echo $_POST['departure'];?>" type="text" size="11px" readonly/><script language="JavaScript">new tcal ({// form name'formname': 'checkavailability',// input name'controlname': 'departure'});</script></td></tr><tr><td>No. of Adults</td><td><select name="adults" style="width:90px;"><option value="1" <?php if($_POST['adults'] == '1') echo "selected='selected'"; ?> >1</option><option value="2" <?php if($_POST['adults'] == '2') echo "selected='selected'"; ?>>2</option><option value="3" <?php if($_POST['adults'] == '3') echo "selected='selected'"; ?>>3</option><option value="4" <?php if($_POST['adults'] == '4') echo "selected='selected'"; ?>>4</option></select></td></tr><tr><td>No. of Children</td><td><select name="children" style="width:90px;"><option value="0" <?php if($_POST['children'] == '0') echo "selected='selected'"; ?>>0</option><option value="1" <?php if($_POST['children'] == '1') echo "selected='selected'"; ?>>1</option><option value="2" <?php if($_POST['children'] == '2') echo "selected='selected'"; ?>>2</option><option value="3" <?php if($_POST['children'] == '3') echo "selected='selected'"; ?>>3</option><option value="4" <?php if($_POST['children'] == '4') echo "selected='selected'"; ?>>4</option></select></td></tr><tr><td>Room</td><td>

Online Booking System for Camp Holiday Resort and Recreation Area 169

Page 170: Chapters

<select name="roomtype"><?php$sqlString = " SELECT * FROM tbl_roomtype";$rs = mysql_query($sqlString);while($row=mysql_fetch_object($rs)){echo "<option value='$row->roomType_id'>".$row->roomName."</option>";}?></select></td><td><input type="submit" id="submit" name="submit"style="font-size:16px; padding-left:15px; padding-right:15px; font-weight: bolder; cursor:pointer;"value="Check Availability" onClick="return CheckAllFields()"/></td> </tr> <?php if(isset($_POST['submit'])){echo " <tr><td>Legend</td><td colspan='2'><div class='unavailable2'>Unavailable</div><div class='available2'>Available</div></td></tr> ";}?></table></form> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div> <br /><?phpif(isset($_POST['submit'])){$arrivaltime = strtotime($_POST['arrival']);$departuretime = strtotime($_POST['departure']);$_SESSION['arrival'] = date('Y-m-d',$arrivaltime);$_SESSION['departure'] = date('Y-m-d',$departuretime);$_SESSION['roomtype'] = $_POST['roomtype'];$_SESSION['numadults'] = $_POST['adults'];$_SESSION['numchildren'] = $_POST['children'];$_SESSION['reservetype'] = $_POST['reservetype'];

Online Booking System for Camp Holiday Resort and Recreation Area 170

Page 171: Chapters

echo "<div id='toolbar-box'> <div class='t'><div class='t'><div class='t'></div></div></div> <div class='m'> <div class='toolbar' id='toolbar'></div> <div class='header icon-48-user'>";$sql = " SELECT roomNameFROM tbl_roomtypeWHERE roomType_id = '".$_SESSION['roomtype']."'";$resultsql = mysql_query($sql); while ($row = mysql_fetch_object($resultsql)){echo $_SESSION['roomname'] = $row->roomName;}

echo "</div> </div> <div class='b'><div class='b'><div class='b'></div></div></div></div>";

echo "<div id='element-box2'><div class='t'> <div class='t'> <div class='t'></div> </div> </div> <div class='m'>";

echo "<form action='domain.php?rel=ReserveInfo' name='type' method='post'>";

$floor=0;$rooms_per_floor=7;$sqlCount = " SELECT COUNT(room_id)FROM tbl_roomWHERE roomType_id = '".$_SESSION['roomtype']."' ";$resultCount = mysql_query($sqlCount);$data = mysql_fetch_row($resultCount);$total_rooms = $data[0];

for ($i=1;$i<=$total_rooms;$i++) {if (!($i%$rooms_per_floor)) {//go to the next floor$floor++;//$restart_counter=0;echo '<div class="clear"></div>';}//$restart_counter++;// give rooms a number//$roomnum=$floor.'0'.$restart_counter;if($_SESSION['roomtype'] == 1) $roomnum=100+$i;if($_SESSION['roomtype'] == 2) $roomnum=200+$i;

Online Booking System for Camp Holiday Resort and Recreation Area 171

Page 172: Chapters

if($_SESSION['roomtype'] == 3) $roomnum=300+$i;//room is always available unless proven otherwise$available=true;

// select the room and make sure it is not "deleted" or "cancelled"$sqlString = " SELECT roomNumber, Arrival, DepartureFROM tbl_reservationWHERE roomNumber = $roomnumAND isReserved = 'Yes' ";$result = mysql_query($sqlString);if (mysql_num_rows($result)) {while ($object = mysql_fetch_object($result)){$check_in = $object->Arrival;$check_out = $object->Departure;if ($check_in < $_SESSION['departure'] and $check_out > $_SESSION['arrival']) {// there is a reservation for that room// the check-in date is before the desired checkout date// and the checkout date is after the desired check-in date// so this indicates that the room is not available// for the desired period$available=false;}}}if ($available) {echo '<div class="available"><input type="checkbox" name="'.$i.'" value="'.$roomnum.'">Room '.$roomnum.'</div>';} else {echo '<div class="unavailable"><input type="checkbox" disabled="disabled">Room '.$roomnum.'</div>';}}

echo "<br /><br /><br /><br /><br /><input type='submit' style='font-size:16px; padding-left:15px; padding-right:15px; font-weight: bolder; cursor:pointer;' id='reserveroom'

name='reserveroom' value='Reserve' />";echo "<input type='button' value='Cancel' style='font-size:16px; padding-left:15px; padding-right:15px; font-weight: bolder; cursor:pointer;'onclick=\"javascript:location.href='domain.php?rel=Availability'\" />";echo "</form>";

echo "</div> <div class='b'> <div class='b'> <div class='b'></div>

Online Booking System for Camp Holiday Resort and Recreation Area 172

Page 173: Chapters

</div> </div> </div>";}?></html>

/*----------------------- admin / Sub / Reservations / reservation_insert.php ---------------- */<html><head><script> function gotoUrl(){location.href='domain.php?rel=Home';}window.setTimeout('gotoUrl()',1500);</script></head><body><?phpsession_start();include("connection/connection.php");$arrival = $_SESSION['arrival'];$departure = $_SESSION['departure'];$roomname = $_SESSION['roomname'];$reservetype = $_SESSION['reservetype'];$numadults = $_SESSION['numadults'];$numchildren = $_SESSION['numchildren'];$company = $_POST['companyname'];$lastname = $_POST['lastname'];$firstname = $_POST['firstname'];$middleinitial = strtoupper($_POST['mi']);$address = $_POST['address'];$contactno = $_POST['contactno'];$email = $_POST['email'];$paymentmode = $_POST['paymentmode'];$receiptno = $_POST['receiptno'];$amount = $_POST['amount'];$ccamount = $_POST['ccamount'];$totalcharge = $_SESSION['totalcharge'];

print "<div class='success'>Reservation Successfully Created...!</div>";

$sqlGuest = "INSERT INTO tbl_guest( Company,lastName,firstName,middleInitial,Address,contactNo,Email,

Online Booking System for Camp Holiday Resort and Recreation Area 173

Page 174: Chapters

isActive) VALUES ( '$company', '$lastname', '$firstname', '$middleinitial', '$address', '$contactno', '$email', 'Yes') ";

mysql_query($sqlGuest) or die(mysql_error());

$sqlMaxGuestId = " SELECT MAX(guest_id)FROM tbl_guest ";$result = mysql_query($sqlMaxGuestId) or die(mysql_error());$data = mysql_fetch_array($result);$guest_id = $data[0];

foreach ($_SESSION['rooms'] as $key => $value){mysql_query("INSERT INTO tbl_reservation VALUES( '','$guest_id','$value','$roomname','$arrival','$departure','$numadults','$numchildren',NOW(),'$reservetype','Yes','Pending') ") or die(mysql_error());}

$sqlReserveId = " SELECT MAX(reservation_id)FROM tbl_reservation ";$result2 = mysql_query($sqlReserveId) or die(mysql_error());$data2 = mysql_fetch_array($result2);$reservation_id = $data2[0];

$sqlAccommodation = " INSERT INTO tbl_accommodationVALUES ( '','$guest_id','".$_SESSION['name']."',NOW(),'Yes','$reservation_id') ";mysql_query($sqlAccommodation) or die(mysql_error());

$sqlAccommoId = " SELECT MAX(accommodation_id)FROM tbl_accommodation ";

Online Booking System for Camp Holiday Resort and Recreation Area 174

Page 175: Chapters

$result3 = mysql_query($sqlAccommoId) or die(mysql_error());$data3 = mysql_fetch_array($result3);$accommodation_id = $data3[0];

$sqlTransac = " INSERT INTO tbl_transactionVALUES ('','$accommodation_id','Rent Due on','$totalcharge',NOW()) ";mysql_query($sqlTransac) or die(mysql_error());

$sqlTransacPay = " INSERT INTO tbl_transactionVALUES ('','$accommodation_id','Payment Received','$amount',NOW()) ";mysql_query($sqlTransacPay) or die(mysql_error());

if($paymentmode == "CreditCard"){$sqlPayment = " INSERT INTO tbl_paymentVALUES ( '','$accommodation_id','$paymentmode','$receiptno','$ccamount','".$_SESSION['name']."',NOW()) ";mysql_query($sqlPayment) or die(mysql_error()); }else{$sqlPayment = " INSERT INTO tbl_paymentVALUES ( '','$accommodation_id','$paymentmode','0','$amount','".$_SESSION['name']."',NOW()) ";mysql_query($sqlPayment) or die(mysql_error());}

$sql4 = " INSERT INTO tbl_billingVALUES ( '','$accommodation_id','".$_SESSION['name']."',NOW() ) ";mysql_query($sql4) or die(mysql_error());?>

Online Booking System for Camp Holiday Resort and Recreation Area 175

Page 176: Chapters

</body></html>

/*----------------------- admin / Sub / Reservations / reservationinfo.php ------------------- */<?phpsession_start();include("functions/myfunction.php");date_default_timezone_set('Asia/Taipei');?><html><head><link rel="stylesheet" type="text/css" href="styles.css"/><script type="text/javascript">function showPaymentMode(str){

var cash = document.getElementById("cash");var creditcard = document.getElementById("creditcard");var check = document.getElementById("check");

if (str=="Cash"){ cash.style.display = 'block'; }else{cash.style.display = 'none';}

if (str=="CreditCard"){ creditcard.style.display = 'block'; }else{creditcard.style.display = 'none';}

}function getSavePersonalInfo(selectedtype){document.personalinfo.info.value = selectedtype ;document.personalinfo.submit() ;}function requiredFields(){var lname, fname, mi, contactno, email;var filter = /^.+@.+\..{2,3}$/;

lname = String(document.personalinfo.lastname.value);fname = String(document.personalinfo.firstname.value);mi = String(document.personalinfo.mi.value);contactno = String(document.personalinfo.contactno.value);email = String(document.personalinfo.email.value);

if( lname == "" ){alert('" LAST NAME " Field should not be empty!');

Online Booking System for Camp Holiday Resort and Recreation Area 176

Page 177: Chapters

document.personalinfo.lastname.focus();return false;}if( fname == "" ){alert('" FIRST NAME " Field should not be empty!');document.personalinfo.firstname.focus();return false;}if( mi == "" ){alert('" MIDDLE INITIAL " Field should not be empty!');document.personalinfo.mi.focus();return false;}if( contactno == "" ){alert('" CONTACT NO. " Field should not be empty!');document.personalinfo.contactno.focus();return false;}if( email == "" ){alert('"EMAIL ADDRESS " Field should not be empty!');document.personalinfo.email.focus();return false;}if( filter.test(email)){return true;}else{alert('Please input a valid " EMAIL ADDRESS"!');document.personalinfo.email.focus();return false;}

getSavePersonalInfo(selectedtype);return true;}</script></head><body><div id="toolbar-box"> <div class="t"><div class="t"><div class="t"></div></div></div> <div class="m"> <div class="toolbar" id="toolbar"></div> <div class="header icon-48-96-reservationrates" style="padding-left:80px;">Reservation/Rates Information</div> </div> <div class="b"><div class="b"><div class="b"></div></div></div></div> <div id="element-box2"><div class="t"> <div class="t"> <div class="t"></div>

Online Booking System for Camp Holiday Resort and Recreation Area 177

Page 178: Chapters

</div> </div> <div class="m"><form action="domain.php?rel=Reserved" method="post" name="personalinfo" enctype="multipart/form-data"><input type="hidden" name="info" /> <table><tr><td>Reservation Type</td><td>:</td><td style="color:#060; font-weight:bolder;"><?php echo $_SESSION['reservetype'];?></td><td width="20px"><td><td>No. of Nights</td><td>:</td><td style="color:#060; font-weight:bolder;"><?php$arrival = $_SESSION['arrival'];$departure = $_SESSION['departure'];$dateDiff = strtotime($departure) - strtotime($arrival);echo $totalnights = floor($dateDiff/(60*60*24));?></td></tr><tr><td>Arrival</td><td>:</td><td style="color:#060; font-weight:bolder;"><?php echo $arrival;?></td><td width="20px"><td><td>No. of Guests</td><td>:</td><td style="color:#060; font-weight:bolder;"><?php echo $_SESSION['numadults'] + $_SESSION['numchildren'];?></td> </tr><tr><td>Departure</td><td>:</td><td style="color:#060; font-weight:bolder;"><?php echo $departure;?></td><td width="20px"><td><td>Room Rate</td><td>:</td><?php $roomid = $_SESSION['roomtype'];$sqlString = " SELECT *FROM tbl_roomWHERE roomType_id = $roomid";$rs = mysql_query($sqlString);$row = mysql_fetch_object($rs)?>

Online Booking System for Camp Holiday Resort and Recreation Area 178

Page 179: Chapters

<td style="color:#060; font-weight:bolder;">P <?php echo $row->Rate;?> per night</td></tr><tr><td>Room Type</td><td>:</td><td style="color:#060; font-weight:bolder;"><?php echo $_SESSION['roomname'];?></td><td width="20px"><td><td>Total Charges</td><td>:</td><td style="color:#F00; font-weight:bolder;">P <?php echo $totalcharge = ($totalnights * $row->Rate); $_SESSION['totalcharge'] = $totalcharge;?></td></tr><tr><td valign="top" width="120px">Room Number/s</td><td valign="top">:</td><td style="color:#060; font-weight:bolder;"><?php$sqlCount = " SELECT COUNT(room_id)FROM tbl_roomWHERE roomType_id = '".$_SESSION['roomtype']."' ";$resultCount = mysql_query($sqlCount);$data = mysql_fetch_row($resultCount);$total_rooms = $data[0];

$_SESSION['rooms'] = array();for ($i=1;$i<=$total_rooms;$i++){if ($_POST[$i]) {echo 'Room #'.$_POST[$i].'<br/>';// we are pushing the selected rooms in an arrayarray_push($_SESSION['rooms'],$_POST[$i]);}}?> </td><td width="20px"><td><td>Initial Payment</td><td>:</td><td style="color:#F00; font-weight:bolder;">P <?php echo $row->Rate; ?></td></tr></table> </div> <div class="b"> <div class="b"> <div class="b"></div>

Online Booking System for Camp Holiday Resort and Recreation Area 179

Page 180: Chapters

</div> </div> </div><br /> <div style="float:left;"><div id="toolbar-box1"> <div class="t"><div class="t"><div class="t"></div></div></div> <div class="m"> <div class="toolbar" id="toolbar"></div> <div class="header icon-48-list-of-guest">Personal Information</div> </div> <div class="b"><div class="b"><div class="b"></div></div></div></div> <br /><div id="element-box"><div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"><table><tr><td>Company Name</td><td><input type="text" name="companyname" size="82px"></td></tr><tr><td>Last Name</td><td><input type="text" name="lastname" size="50px"></td></tr><tr> <td>First Name</td><td><input type="text" name="firstname" size="50px"></td></tr><tr> <td>Middle Initial</td><td><input type="text" name="mi" size="5px" maxlength="1"></td></tr><tr><td>Address</td><td><input type="text" name="address" size="82px"></td></tr><tr><td>Contact No.</td><td><input type="text" name="contactno" size="50px"></td></tr><tr><td>Email</td><td><input type="text" name="email" size="50px"></td></tr>

Online Booking System for Camp Holiday Resort and Recreation Area 180

Page 181: Chapters

</table> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div></div><div style="margin-left:600px;"><div id="toolbar-box1"> <div class="t"><div class="t"><div class="t"></div></div></div> <div class="m"> <div class="toolbar" id="toolbar"></div> <div class="header icon-48-payment">Payment Details</div> </div> <div class="b"><div class="b"><div class="b"></div></div></div></div> <br /><div id="element-box"><div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"><table><tr><td width="120px">Payment Mode</td><td><select name="paymentmode" onChange="showPaymentMode(this.value)"><option value="Cash">Cash</option><option value="CreditCard">CreditCard</option></select></td></tr></table><div id="cash"><table><tr><td width="120px">Amount</td><td><input type="text" name="amount"></td></tr></table></div><div id="creditcard" style="display:none;"><table><tr><td width="120px">Receipt No.</td><td><input type="text" name="receiptno"></td>

Online Booking System for Camp Holiday Resort and Recreation Area 181

Page 182: Chapters

</tr><tr><td width="120px">Amount</td><td><input type="text" name="ccamount"></td></tr></table></div><tr><td></td><td width="120px"><input type="submit" name="submit" value="Finish" onclick="return requiredFields()"style="font-size:16px; padding-left:25px; padding-right:25px; font-weight: bolder; cursor:pointer;"></td></tr></form> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div></div> </body></html>

/*----------------------- admin / Sub / Users / Sub_Users / Edit.php ------------------------- */<script language="JavaScript" type="text/javascript">function getupdateusers(selectedtype){document.users.updateusers.value = selectedtype ;document.users.submit();}

function requiredFields(){var uname, pword, lname, fname, mi, position;

uname = String(document.users.uname.value);pword = String(document.users.pword.value);lname = String(document.users.lname.value);fname = String(document.users.fname.value);mi = String(document.users.mi.value);position = String(document.users.position.value);

if( uname == "" ){alert('" USERNAME " Field should not be empty...!');document.users.uname.focus();return false;

Online Booking System for Camp Holiday Resort and Recreation Area 182

Page 183: Chapters

}if( pword == "" ){alert('" PASSWORD " Field should not be empty!');document.users.pword.focus();return false;}if( lname == "" ){alert('" LAST NAME " Field should not be empty!');document.users.lname.focus();return false;}if( fname == "" ){alert('" FIRST NAME " Field should not be empty!');document.users.fname.focus();return false;}if( mi == "" ){alert('" MIDDLE INITIAL " Field should not be empty!');document.users.mi.focus();return false;}if( position == "" ){alert('" POSITION " Field should not be empty!');document.users.position.focus();return false;}

getupdateusers(selectedtype);return true;}</script><?php include("connection/connection.php");

$id = $_GET['id'];

$sql = "SELECT * FROM tbl_useraccountWHERE userAccount_id = '$id'";$result = mysql_query($sql) or die("No user database!");

$row = mysql_fetch_object($result);?><div id="toolbar-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m">

Online Booking System for Camp Holiday Resort and Recreation Area 183

Page 184: Chapters

<div class="toolbar" id="toolbar"> <form action="domain.php?rel=UpdateUser" method="post" name="users" enctype="multipart/form-data"><input type="hidden" name="updateusers" /> <input type="hidden" name="id" value="<?php echo $row->userAccount_id; ?>" /> <table class="toolbar"><tr><td class="button" id="toolbar-copy"><a href="javascript:getupdateusers('users')" onclick="return requiredFields()" style="color:#000000;"><span class="icon-32-save" title="Copy"></span> Save</a></td>

<td class="button" id="toolbar-edit"> <a href="domain.php?rel=Users&page=1" style="color:#000000;"> <span class="icon-32-cancel" title="Edit"></span> Cancel</a> </td>

<td></td></tr></table> </div><div class="header icon-48-edit-user">Edit User</div> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

<div id="element-box1"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <table width="400" border="0"><tbody><tr><td align="right" >Username</td>

Online Booking System for Camp Holiday Resort and Recreation Area 184

Page 185: Chapters

<td><input type="text" name="uname" value="<?php echo $row->Username;?>" size="50" /></td></tr><tr><td align="right">Password</td><td><input type="password" name="pword" value="<?php echo $row->Password;?>" size="50" /></td></tr><tr><td align="right">Last Name</td><td><input type="text" name="lname" value="<?php echo $row->lastName;?>" size="50" /></td></tr><tr><td align="right">First Name</td><td><input type="text" name="fname" value="<?php echo $row->firstName;?>" size="50" /></td></tr><tr><td align="right">M.I.</td><td><input type="text" name="mi" maxlength="2"value="<?php echo $row->middleInitial;?>" size="10" /></td></tr><tr><td align="right">Position</td><td><input type="text" name="position" value="<?php echo $row->Position;?>" size="10" /></td></tr><tr><td align="right">Access Level</td><td><select name="accesslevel"><option value="1" <?php if($row->accessLevel == 1) echo "selected='selected'"; ?>>1</option><option value="2" <?php if($row->accessLevel == 2) echo "selected='selected'"; ?>>2</option><option value="3" <?php if($row->accessLevel == 3) echo "selected='selected'"; ?>>3</option></select></td>

Online Booking System for Camp Holiday Resort and Recreation Area 185

Page 186: Chapters

</tr></tbody></table></form> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

/*----------------------- admin / Sub / Users / Sub_Users / New.php ------------------------ */<?php session_start(); ?><script language="JavaScript" type="text/javascript">function getsaveusers(selectedtype){document.users.saveusers.value = selectedtype;document.users.submit();}

function requiredFields(){var uname, pword, lname, fname, mi, position;

uname = String(document.users.uname.value);pword = String(document.users.pword.value);lname = String(document.users.lname.value);fname = String(document.users.fname.value);mi = String(document.users.mi.value);position = String(document.users.position.value);

if( uname == "" ){alert('" USERNAME " Field should not be empty!');document.users.uname.focus();return false;}if( pword == "" ){alert('" PASSWORD " Field should not be empty!');document.users.pword.focus();return false;}if( lname == "" ){alert('" LAST NAME " Field should not be empty!');document.users.lname.focus();return false;}if( fname == "" ){alert('" FIRST NAME " Field should not be empty!');document.users.fname.focus();return false;

Online Booking System for Camp Holiday Resort and Recreation Area 186

Page 187: Chapters

}if( mi == "" ){alert('" MIDDLE INITIAL " Field should not be empty!');document.users.mi.focus();return false;}if( position == "" ){alert('" POSITION " Field should not be empty!');document.users.position.focus();return false;}

getsaveusers(selectedtype);return true;}</script><div id="toolbar-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <div class="toolbar" id="toolbar"> <form action="domain.php?rel=ValidateUser&subpage=upload" method="post" name="users" enctype="multipart/form-data"><input type="hidden" name="saveusers" /> <table class="toolbar"><tr><td class="button" id="toolbar-copy"><a href="javascript:getsaveusers('users')" onclick="return requiredFields()" style="color:#000000;"> <span class="icon-32-save" title="Save"> </span> Save</a></td>

<td class="button" id="toolbar-edit"> <a href="domain.php?rel=Users&page=1" style="color:#000000;"> <span class="icon-32-cancel" title="Cancel"> </span> Cancel</a> </td>

<td></td></tr></table>

Online Booking System for Camp Holiday Resort and Recreation Area 187

Page 188: Chapters

</div><div class="header icon-48-add-user">Add User</div> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div><div id="element-box1"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <table width="400" border="0"><tbody> <tr><td align="right">Username</td><td><input type="text" name="uname" size="50" o/></td></tr><tr><td align="right">Password</td><td><input type="password" name="pword" size="50" /></td></tr> <tr><td align="right">Last Name</td><td><input type="text" name="lname" size="50" /></td></tr><tr><td align="right">First Name</td><td><input type="text" name="fname" size="50" /></td></tr><tr><td align="right">M.I.</td><td><input type="text" name="mi" size="5" maxlength="1" /></td></tr><tr><td align="right">Position</td><td><input type="text" name="position" size="50" /></td></tr><tr><td align="right">Access Level</td><td><select name="accesslevel"><option value="1">1</option><option value="2">2</option>

Online Booking System for Camp Holiday Resort and Recreation Area 188

Page 189: Chapters

<option value="3">3</option></select></td></tr></tbody></table></form></div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

/*----------------------- admin / Sub / Users / userlist.php -------------------------------------- */<?php session_start(); include("connection/connection.php");?><script type="text/javascript">function getdelete ( selectedtype ){document.adminForm.deleteuser.value = selectedtype;document.adminForm.submit();}function getEditUser(){for(i = 0; i < adminForm.chk.length; i++){if(adminForm.chk[i].checked){cc = adminForm.chk[i].value;window.location = "domain.php?rel=EditUser&id="+cc+"";}}}checked=false;function checkedAll(frm1) {var aa = document.getElementById('frm1');if (checked == false){checked = true} else {checked = false}for (var i =0; i < aa.length; i++){aa[i].checked = checked;}}function doSearch(phrase){var words = phrase.value.toLowerCase().split(" ");var table = document.getElementById("filterable");var ele;

Online Booking System for Camp Holiday Resort and Recreation Area 189

Page 190: Chapters

var on = 0;for (var r = 0; r < table.rows.length; r++){ele = table.rows[r].innerHTML.replace(/<[^>]+>/g,"");var displayStyle = 'none';for (var i = 0; i < words.length; i++) {if (ele.toLowerCase().indexOf(words[i])>=0){displayStyle = '';on++;}else {displayStyle = 'none';break;}}table.rows[r].style.display = displayStyle;}var n = document.getElementById("noresults");if ( on == 0 && n ) {n.style.display = "";document.getElementById("qt").innerHTML = phrase.value;}else{n.style.display = "none";}}</script><?php$do_delete = $_POST['deleteuser'];$id = $_POST['chk'];

if($do_delete){$N = count($id);

for($i=0;$i < $N; $i++){$sql = "DELETE FROM tbl_useraccount WHERE userAccount_id = '" . $id[$i] . "'";mysql_query($sql) or die(mysql_error());}}?> <div id="toolbar-box"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <form action="domain.php?rel=Users" method="post" name="adminForm" id="frm1"><input type="hidden" name="deleteuser"/> <div class="toolbar" id="toolbar"> <table class="toolbar"><tr>

Online Booking System for Camp Holiday Resort and Recreation Area 190

Page 191: Chapters

<td class="button" id="toolbar-delete"> <a href="javascript:getdelete('delete')" onclick="return confirm('Are you sure you want to DELETE?');"> <span class="icon-32-delete" title="Delete"></span> Delete</a> </td>

<td class="button" id="toolbar-edit"> <a href="javascript: getEditUser()"> <span class="icon-32-edit" title="Edit"></span> Edit</a> </td>

<td class="button" id="toolbar-new"> <a href="domain.php?rel=NewUser&id=0&level=1"> <span class="icon-32-new" title="New"> </span> New</a> </td><td></td> </tr></table> </div> <div class="header icon-48-registered-user">Registered Users</div> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div> <div class="clr"></div>

<div id="element-box4"><div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"><div style="font-weight: bolder; padding: 5px;">Search <input type="text" size="38" name="filter" id="filter" style="border: 1px solid red;" onkeyup="doSearch(filter);" />

Online Booking System for Camp Holiday Resort and Recreation Area 191

Page 192: Chapters

</div><table class="adminlist" ><thead><tr><th width="5%">#</th><th width="5%"><input type='checkbox' name='checkall' onclick='checkedAll(frm1);' /></th><th width="15%" nowrap="nowrap">Username</th><th width="15%" nowrap="nowrap">Password</th><th width="20%" nowrap="nowrap">Last Name</th><th width="20%" class="title">First Name</th><th width="5%" nowrap="nowrap">MI</th><th width="10%" nowrap="nowrap">Position</th><th width="5%" nowrap="nowrap">Access Level</th></tr></thead><tbody id="filterable"><?php$sql = " SELECT * FROM tbl_useraccountORDER BY accessLevel ";$result = mysql_query($sql) or die("No users database!");

$count = 1;

while($row = mysql_fetch_array($result)){ ?><tr><td align="center"><?php echo $count; ?></td><td align="center"><input type="checkbox" value="<?php echo $row['userAccount_id']; ?>" name="chk[]" id="chk" onselect="return getEditUser()" /></td><td align="center"><?php echo $row['Username']; ?></td><td align="center"><?php echo $row['Password']; ?></td><td align="center"><?php echo $row['lastName']; ?></td><td align="center"><?php echo $row['firstName']; ?></td><td align="center"><?php echo $row['middleInitial']; ?></td><td align="center"><?php echo $row['Position']; ?></td><td align="center"><?php echo $row['accessLevel']; ?></td></tr><?php$count = $count + 1;}?><tr style="display:none; color:#F00; font-weight: bolder;" id="noresults"><td colspan="9">No Records Found that start with "<span id="qt"></span>".</td></tr></tbody></table>

Online Booking System for Camp Holiday Resort and Recreation Area 192

Page 193: Chapters

</form> <div class="clr"></div> </div>

<div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div></div>

/*----------------------- admin / Sub / Users / userlist_update.php ---------------------------- */<html><head><script> function gotoUrl(){location.href='domain.php?rel=Users';}window.setTimeout('gotoUrl()',1500);</script></head><body><?phpinclude("connection/connection.php");

$do_update_user = $_POST['updateusers'];

if($do_update_user){$id = $_POST['id'];$username = $_POST['uname'];$password = $_POST['pword'];$firstname = $_POST['fname'];$lastname = $_POST['lname'];$mi = strtoupper($_POST['mi']);$position = $_POST['position'];$accesslevel = $_POST['accesslevel'];

print "<div class='success'>User Successfully Updated...!</div>";

$sql = "UPDATE tbl_useraccountSET username = '$username',password = '$password',firstname = '$firstname',lastname = '$lastname',middleinitial = '$mi',position = '$position',accesslevel = '$accesslevel'WHERE userAccount_id = '$id'";

Online Booking System for Camp Holiday Resort and Recreation Area 193

Page 194: Chapters

mysql_query($sql) or die("No user database!");}?></body></html>

/*----------------------- admin / Sub / Users / userlist_validate.php --------------------------- */<html><head><script> function gotoUrl(){location.href='domain.php?rel=Users';}window.setTimeout('gotoUrl()',1500);</script></head><body><?phpinclude("connection/connection.php");

$do_save_user = $_POST['saveusers'];

if($do_save_user){$uname = $_POST['uname'];$pword = $_POST['pword'];$firstname = $_POST['fname'];$lastname = $_POST['lname'];$mi = strtoupper($_POST['mi']);$position = $_POST['position'];$accesslevel = $_POST['accesslevel'];

print "<div class='success'>User Successfully Created...!</div>";

$sql = "INSERT INTO tbl_useraccount( username,password,firstname,lastname,middleinitial,position,accesslevel ) VALUES ( '$uname','$pword','$firstname','$lastname','$mi','$position','$accesslevel')";

mysql_query($sql) or die(mysql_error());

Online Booking System for Camp Holiday Resort and Recreation Area 194

Page 195: Chapters

}?></body></html>

/*----------------------- admin / domain.php ------------------------------------------------------ */<?php session_start();

include("connection/connection.php");

if($_SESSION['login'] == 0){header("location: index.php?ref=Home");}?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" dir="ltr" id="minwidth" > <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Camp Holiday Resort and Recreation Area</title>

<link rel="stylesheet" type="text/css" href="css/template.css" /> <link rel="stylesheet" type="text/css" href="css/rounded.css" /> <link rel="stylesheet" type="text/css" href="css/styles.css"/><link rel="stylesheet" type="text/css" href="css/messagebox.css"/><link href="css/calendar.css" rel="stylesheet" type="text/css"/><script src="js/filterTable.js" language="JavaScript"></script><script src="js/calendar.js" language="JavaScript"></script><script type="text/javascript" src="js/menu.js"></script><script type="text/javascript" src="js/reservationtype.js"></script><?php $rel = $_GET['rel'];

$ACCEPT_FILE = array();// HOME$ACCEPT_FILE['Home'] = 'Home/reservation.php';$ACCEPT_FILE['ArrivalConfirm'] = 'Home/reservation_confirm.php';$ACCEPT_FILE['ArrivalCancel'] = 'Home/reservation_cancel.php';$ACCEPT_FILE['Checkin'] = 'Home/checkin.php';$ACCEPT_FILE['Checkout'] = 'Home/checkout.php';$ACCEPT_FILE['AddCharges'] = 'Home/addcharges.php';$ACCEPT_FILE['AddChargesConfirm'] = 'Home/addcharges_confirm.php';$ACCEPT_FILE['PrintPreviewCharges'] = 'Home/printpreview.php';

// BOOKINGS$ACCEPT_FILE['Availability'] = 'Reservations/book.php';

Online Booking System for Camp Holiday Resort and Recreation Area 195

Page 196: Chapters

$ACCEPT_FILE['ReserveInfo'] = 'Reservations/reservationinfo.php'; $ACCEPT_FILE['Reserved'] = 'Reservations/reservation_insert.php';

// REPORTS$ACCEPT_FILE['DailyReports'] = 'Reports/dailyReports.php';$ACCEPT_FILE['WeeklyReports'] = 'Reports/weeklyReports.php';$ACCEPT_FILE['MonthlyReports'] = 'Reports/monthlyReports.php';$ACCEPT_FILE['SearchReport'] = 'Reports/searchReports.php';

// MASTER$ACCEPT_FILE['Guests'] = 'Master/guestlist.php';$ACCEPT_FILE['NewGuest'] = 'Master/Sub_Guests/New.php';$ACCEPT_FILE['EditGuest'] = 'Master/Sub_Guests/Edit.php';$ACCEPT_FILE['UpdateGuest'] = 'Master/guestlist_update.php';$ACCEPT_FILE['ValidateGuest'] = 'Master/guestlist_validate.php';

$ACCEPT_FILE['RoomList'] = 'Master/roomlist.php';$ACCEPT_FILE['NewRoomList'] = 'Master/Sub_RoomList/New.php';$ACCEPT_FILE['EditRoomList'] = 'Master/Sub_RoomList/Edit.php';$ACCEPT_FILE['ValidateRoomList'] = 'Master/roomlist_validate.php';$ACCEPT_FILE['UpdateRoomList'] = 'Master/roomlist_update.php';

$ACCEPT_FILE['RoomType'] = 'Master/roomtypes.php';$ACCEPT_FILE['NewRoomType'] = 'Master/Sub_RoomType/New.php';$ACCEPT_FILE['EditRoomType'] = 'Master/Sub_RoomType/Edit.php';$ACCEPT_FILE['ValidateRoomType'] = 'Master/roomtypes_validate.php';$ACCEPT_FILE['UpdateRoomType'] = 'Master/roomtypes_update.php';

$ACCEPT_FILE['Amenities'] = 'Master/amenities.php';$ACCEPT_FILE['NewAmenities'] = 'Master/Sub_Amenities/New.php';$ACCEPT_FILE['EditAmenities'] = 'Master/Sub_Amenities/Edit.php';$ACCEPT_FILE['ValidateAmenities'] = 'Master/amenities_validate.php';$ACCEPT_FILE['UpdateAmenities'] = 'Master/amenities_update.php';

$ACCEPT_FILE['Services'] = 'Master/services.php';$ACCEPT_FILE['NewServices'] = 'Master/Sub_Services/New.php';$ACCEPT_FILE['EditServices'] = 'Master/Sub_Services/Edit.php';$ACCEPT_FILE['ValidateServices'] = 'Master/services_validate.php';$ACCEPT_FILE['UpdateServices'] = 'Master/services_update.php';

// RESTAURANT$ACCEPT_FILE['Restaurant'] = 'Restaurant/reservation.php';$ACCEPT_FILE['Search'] = 'Restaurant/search.php';

// USERS$ACCEPT_FILE['Users'] = 'Users/userlist.php';$ACCEPT_FILE['NewUser'] = 'Users/Sub_Users/New.php';$ACCEPT_FILE['EditUser'] = 'Users/Sub_Users/Edit.php';$ACCEPT_FILE['UpdateUser'] = 'Users/userlist_update.php';

Online Booking System for Camp Holiday Resort and Recreation Area 196

Page 197: Chapters

$ACCEPT_FILE['ValidateUser'] = 'Users/userlist_validate.php';

$contentname = $ACCEPT_FILE[$rel];if($_SESSION['login'] == 1 || $_SESSION['login'] == 2){if (!isSet($contentname)) $contentname = "Home/reservation.php";}if($_SESSION['login'] == 3 ){if (!isSet($contentname)) $contentname = "Restaurant/reservation.php";}?></head> <body id="minwidth-body"> <div id="border-top" class="h_green"> <div> <div> <span class="title">Camp Holiday Resort and Recreation Area</span> </div> </div> </div> <div id="header-box"> <div id="module-status"><span class="logout"><b>You are logged in as <font color="#FF0000"><?php echo $_SESSION['name']; ?></font></b></span> </div> <div id="module-menu"> <ul id="menu" > <?php if($_SESSION['login'] == 1 || $_SESSION['login'] == 2){ ?><li class="node"><a href="domain.php?rel=Home&page=1" style="cursor:pointer;"><img src="images/admin-icons/Home-icon-32.png" align="middle" /> Home</a></li><?php}if($_SESSION['login'] == 1 || $_SESSION['login'] == 2){?><li class="node"><a href="domain.php?rel=Availability&page=1" style="cursor:pointer;"><img src="images/admin-icons/Clipboard-icon-32.png" align="middle" /> Reservations</a></li><?php}if($_SESSION['login'] == 1){?><li class="node"><a href="domain.php?rel=Guests&page=1" style="cursor:pointer;"><img src="images/admin-icons/Administrator-icon-32.png" align="middle" /> Master</a></li><?php

Online Booking System for Camp Holiday Resort and Recreation Area 197

Page 198: Chapters

}if($_SESSION['login'] == 1){?><li class="node"><a href="domain.php?rel=Users&page=1" style="cursor:pointer;"><img src="images/admin-icons/User-Group-icon-32.png" align="middle" /> Admin</a></li><?php}if($_SESSION['login'] == 3){?><li class="node"><a href="domain.php?rel=Restaurant&page=1" style="cursor:pointer;"><img src="images/admin-icons/Clipboard-icon-32.png" align="middle" /> Restaurant</a></li><li class="node"><?php}if($_SESSION['login'] == 1){?><li class="node"><a href="domain.php?rel=DailyReports&page=1" style="cursor:pointer;"><img src="images/admin-icons/Files-icon-32.png" align="middle" /> Reports</a></li><?php } ?><li class="node" onclick="return confirm('Are you sure you want to EXIT?');"><a href="index.php?ref=Logout" style="cursor:pointer;"><img src="images/admin-icons/32-exit-icon.png" align="middle" /> Logout</a></li> </ul> </div> <div class="clr"></div> </div> <div id="content-box"> <div class="border"> <div class="padding"> <?php include("Sub/$contentname"); ?> <div class="clr"></div> </div> </div> </div> <div id="border-bottom"><div><div></div></div></div><br /><br /><br /><br /><br /></body> </html>

/*----------------------- admin / home.php -------------------------------------------------------- */<?php session_start();if($_SESSION['login']){

Online Booking System for Camp Holiday Resort and Recreation Area 198

Page 199: Chapters

header("location: domain.php");}?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" dir="ltr" > <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Camp Holiday Resort and Recreation Area</title>

<link href="css/login.css" rel="stylesheet" type="text/css" /> <link href="css/rounded.css" rel="stylesheet" type="text/css" />

<script language="javascript" type="text/javascript"> function setFocus() {document.login.username.select();document.login.username.focus();}</script> </head>

<body onload="javascript:setFocus()"> <div id="border-top" class="h_green"> <div> <div> <span class="title">Camp Holiday Resort and Recreation Area</span> </div> </div> </div><div id="content-box"> <div class="padding"> <div id="element-box" class="login"> <div class="t"> <div class="t"> <div class="t"></div> </div> </div> <div class="m"> <h1>Administrative Zone</h1><div id="section-box"> <div class="t"> <div class="t"> <div class="t">

</div> </div> </div> <div class="m">

Online Booking System for Camp Holiday Resort and Recreation Area 199

Page 200: Chapters

<form action="" method="post" name="login" id="form-login" style="clear: both;"> <p id="form-login-username"> <label for="modlgn_username">Username</label> <input name="username" id="modlgn_username" type="text" class="inputbox" size="15" /> </p>

<p id="form-login-password"> <label for="modlgn_passwd">Password</label> <input name="password" id="modlgn_passwd" type="password" class="inputbox" size="15" /> </p> <div class="button_holder"> <div class="button1"> <div class="next"> <a onclick="login.submit();">Login</a> </div> </div> </div> <p id="form-login-lang" style="clear: both;">&nbsp;</p> <p align="center"><?php if ($_POST["username"]!="" && $_POST["password"]!=""){

include("connection/connection.php");

$Uname = $_POST["username"];$Pword = $_POST["password"];

$sql="SELECT * FROM tbl_useraccount WHERE username='$Uname' AND password='$Pword'";$rs = mysql_query($sql) or die("Error! Login...");

if($row = mysql_fetch_object($rs)){$_SESSION['name'] = $row->firstName;if($row->accessLevel == "1"){$_SESSION['login'] = 1;}if($row->accessLevel == "2"){$_SESSION['login'] = 2;}if($row->accessLevel == "3"){$_SESSION['login'] = 3;}echo "<script language='javascript'>location.href='domain.php?rel=Home'</script>";}else{echo "<b><font color='red' size='2'>Invalid Username and Password.</font></b>";}}?></p><div class="clr"></div> <input name="submit" type="submit" style="border: 0; padding: 0; margin: 0; width: 0px; height: 0px;" value="Login" /> </form> <div class="clr"></div> </div> <div class="b">

Online Booking System for Camp Holiday Resort and Recreation Area 200

Page 201: Chapters

<div class="b"> <div class="b"></div> </div> </div> </div>

<p>Use a valid username and password to gain access to the Administrator Back-end.</p> <p> <a href="../index.php">Return to site Home Page</a> </p> <div id="lock"></div> <div class="clr"></div> </div> <div class="b"> <div class="b"> <div class="b"></div> </div> </div> </div>

<noscript> Warning! JavaScript must be enabled for proper operation of the Administrator back-end.</noscript> <div class="clr"></div> </div> </div> <div id="border-bottom"><div><div></div></div> </div> </body> </html>

/*----------------------- admin / popup.php ------------------------------------------------------- */<?phpsession_start();

include("connection/connection.php");

$ref = $_GET['rel'];

$ACCEPT_FILE = array();

$ACCEPT_FILE['ViewDetails'] = 'Home/reservation_viewdetails.php';$ACCEPT_FILE['Billing'] = 'Home/billing.php';$ACCEPT_FILE['Payments'] = 'Home/payments.php';$ACCEPT_FILE['Payments2'] = 'Home/payments2.php';$ACCEPT_FILE['AddCategory'] = 'Master/services_addcategory.php';$ACCEPT_FILE['ValidateCategory'] = 'Master/services_addcategory_validate.php';$ACCEPT_FILE['PrintReport'] = 'Reports/printReports.php';

Online Booking System for Camp Holiday Resort and Recreation Area 201

Page 202: Chapters

$pagename = $ACCEPT_FILE[$ref];if (!isSet($pagename)) $pagename = "Blank.php";include("Sub/$pagename"); ?>

/*----------------------- admin / index.php -------------------------------------------------------- */<?phpsession_start();

include("connection/connection.php");

$ref = $_GET['ref'];

$ACCEPT_FILE = array();$ACCEPT_FILE['Home'] = 'home.php';$ACCEPT_FILE['Admin'] = 'Sub/domain.php';

$ACCEPT_FILE['Logout'] = 'Redirect/Logout.php';$ACCEPT_FILE['PrintPreviewCharges'] = 'Print/printpreview.php';$ACCEPT_FILE['PrintPreviewBilling'] = 'Print/printpreviewBilling.php';

$pagename = $ACCEPT_FILE[$ref];if (!isSet($pagename)) $pagename = "home.php";include("$pagename"); ?>

/*-------------------------------- connection / connection.php ---------------------------------- */<?php$dbhost = "localhost";$dbname = "db_campholiday";$dbuser = "root";$dbpass = "";

$server=mysql_connect ( $dbhost, $dbuser, $dbpass)or die("<h1>Server is currently unavailable</h1>");$conn=mysql_select_db($dbname) or die(mysql_error());?>/*-------------------------------- action.php -------------------------------------------------------- */<?phpinclude("function.php");

//submit reserveationif($_GET["rel"] == 'submitguest') //when proceed is clicked{//print_r($_SESSION);//insert guestinserttodb("tbl_guest","(firstName,lastName,middleInitial,Address,Email,contactNo,isActive) VALUES ('".$_SESSION['fname']."','".$_SESSION['lname']."','".$_SESSION["mi"]."','".$_SESSION['add']."','".$_SESSION['eadd']."','".$_SESSION["connum"] ."','Yes')");//get last guest id$SMaxGuestId = " SELECT MAX(guest_id)FROM tbl_guest ";

Online Booking System for Camp Holiday Resort and Recreation Area 202

Page 203: Chapters

$result = mysql_query($SMaxGuestId);$datagues = mysql_fetch_array($result);$guest_id = $datagues[0];//insert db in loop$i = 0;

foreach ($_SESSION['check'] as $value) //get the ids in array{$roomnumarray = array();

$startdate2=explode("/",$_SESSION['sdate']);$startdate2 = $startdate2[2]."-".$startdate2[0]."-".$startdate2[1];$enddate2=explode("/",$_SESSION['edate']);$enddate2 = $enddate2[2]."-".$enddate2[0]."-".$enddate2[1];

$sql = "SELECT * FROM tbl_reservation LEFT JOIN (tbl_room,tbl_roomtype) ON (tbl_room.roomNumber = tbl_reservation.roomNumberAND tbl_room.roomType_id= tbl_roomtype.roomType_id)WHERE tbl_reservation.Arrival >= '".$startdate2."' AND tbl_reservation.Departure <= '".$enddate2."'AND tbl_room.roomType_id = '".$value."' ORDER BY tbl_room.roomNumber ASC"; //query un available rooms (filtered with date and roomtype id)$result = mysql_query($sql);$numrow = mysql_num_rows($result);

if($numrow != 0) //if not all the rooms are available{while($row = mysql_fetch_array($result)) //concunt the statement in the next query{$text .= "AND tbl_room.roomNumber != '".$row['roomNumber']."' ";}

$sql2 = "SELECT tbl_roomtype . * , tbl_room . * FROM tbl_roomtype, tbl_roomWHERE tbl_roomtype.roomType_id = tbl_room.roomType_id ".$text." AND tbl_roomtype.roomType_id = '".$value."'"; //query all the available rooms$result2 = mysql_query($sql2);while($row2 = mysql_fetch_array($result2)){$roomnum = $row2['roomNumber'];$roomnumarray[] = $roomnum;

}

$availablerooms = $_SESSION['numroom'];$roomnumarray = array_slice($roomnumarray, 0, $availablerooms[$i]);

foreach($roomnumarray as $valId2)

Online Booking System for Camp Holiday Resort and Recreation Area 203

Page 204: Chapters

{echo $sql = "SELECT * from tbl_roomtype LEFT JOIN tbl_room ON (tbl_room.roomType_id= tbl_roomtype.roomType_id) WHERE tbl_room.roomNumber = $valId2"; //query all the available rooms$result = mysql_query($sql);$row = mysql_fetch_array($result);

inserttodb("tbl_reservation","(guest_id,roomNumber,roomName,Arrival,Departure,numAdults,numChildren,dateReservation,reservationType,isReserved,Status) VALUES('$guest_id','".$valId2."','".$row['roomName']."','$startdate2','$enddate2','".$_SESSION['numguest']."','".$_SESSION['numkids']."',DATE(NOW()),'On-line','Yes', 'Pending') ");}$i++;}else //if all rooms available insert to db here{

$sql2 = "SELECT tbl_roomtype . * , tbl_room . * FROM tbl_roomtype, tbl_roomWHERE tbl_roomtype.roomType_id = tbl_room.roomType_id AND tbl_roomtype.roomType_id = '".$value."'"; //query all the available rooms$result2 = mysql_query($sql2);

while($row2 = mysql_fetch_array($result2)){$roomnum = $row2['roomNumber'];$roomnumarray[] = $roomnum;

}

$availablerooms = $_SESSION['numroom'];$roomnumarray = array_slice($roomnumarray, 0, $availablerooms[$i]);

foreach($roomnumarray as $valId2) {$sql = "SELECT * from tbl_roomtype LEFT JOIN tbl_room ON (tbl_room.roomType_id= tbl_roomtype.roomType_id) WHERE tbl_room.roomNumber = $valId2"; //query all the available rooms$result = mysql_query($sql);$row = mysql_fetch_array($result);

Online Booking System for Camp Holiday Resort and Recreation Area 204

Page 205: Chapters

inserttodb("tbl_reservation","(guest_id,roomNumber,roomName,Arrival,Departure,numAdults,numChildren,dateReservation,reservationType,isReserved,Status) VALUES('$guest_id','".$valId2."','".$row['roomName']."','$startdate2','$enddate2','".$_SESSION['numguest']."','".$_SESSION['numkids']."',DATE(NOW()),'On-line','Yes', 'Pending') ");}$i++;}}echo "<meta content='0;index.php' http-equiv='refresh' />";/*inserttodb("tbl_guest","(firstName,lastName,middleInitial,Address,Email,contactNo,isActive) VALUES ('".$_SESSION['fname']."','".$_SESSION['lname']."','".$_SESSION["mi"]."','".$_SESSION['add']."','".$_SESSION['eadd']."','".$_SESSION["connum"] ."','Yes')");*/ //print_r($_SESSION);}if($_GET['rel'] == 'cancel'){echo $sql = "SELECT * FROM tbl_reservation LEFT JOIN (tbl_guest) ON (tbl_reservation.guest_id = tbl_guest.guest_id)where tbl_reservation.reservation_id = '".$_GET['id']."'";$result = mysql_query($sql);while($row = mysql_fetch_array($result)){$message = "I want to cancel my reservation with reservation id '".$row['reservation_id'].". thank you.'";$subject = $row['lastName']." ".$row['firstName']." ".$row['middleInitial']." Request Cancelation.";mail("postmaster@localhost", "Subject: $subject",$message, "From: .'".$row['Email']."'." );echo "<script>alert('We will call you for virification for this process. thank you!')</script>";echo "<meta content='0;user.php?login=1&default=1' http-equiv='refresh' />";}}?>

/*-------------------------------- bridalpackages.php --------------------------------------------- */<?php include("header.php"); ?>

<div class="content-layout"><div class="content-layout-row"><?php include("sidebar.php"); ?><div id="bodycontent"> <h2 class="postheader" style="margin:50px;"> Bridal Packages </h2><center><img src="img/packages-wedding.jpg" width="400" height="300" /></center>

Online Booking System for Camp Holiday Resort and Recreation Area 205

Page 206: Chapters

<div style="padding:50px;"><ul><li>Php 42,000.00 net - Buffet Lunch or Dinner. Packages for 100 persons.</li><br /><li>FACILITIES TO BE PROVIDED:<br /><br /> <div align="center"><table><tr><td>-</td><td>Backdrop</td></tr><tr><td>-</td><td>Overnight Room Accommodation</td></tr><tr><td>-</td><td>Wedding GuestBook</td></tr><tr><td>-</td><td>Floral Arrangement for the Guest Tables</td></tr><tr><td>-</td><td>Place Cards for the Presidential Table</td></tr><tr><td>-</td><td>Decorated wedding bell with candies and coins</td></tr><tr><td>-</td><td>Imported Balloons</td></tr><tr><td>-</td><td>Sparkling wine for the ceremonial toast</td></tr><tr><td>-</td><td>Floral centerpiece for buffet table</td></tr></table></div></li>

Online Booking System for Camp Holiday Resort and Recreation Area 206

Page 207: Chapters

</ul></div></div></div></div>

<?php include("footer.php"); ?>

/*-------------------------------- cabinroom.php --------------------------------------------------- */<?php include("header.php"); ?>

<div class="content-layout"><div class="content-layout-row"><?php include("sidebar.php"); ?><!--CONTENTBODY--><div id="bodycontent"> <h2 class="postheader" style="margin:50px;"> Cabin Rooms </h2><center><img src="img/Facilities/25 - cabinroom.jpg" width="400" height="300" /></center><div style="padding:50px;"><ul><li>Available in Double Bed.</li><li>Free welcome drink for two (2) at the Restaurant.</li><li>Free use of Swimming Pool.</li><li>Free accommodation for children 8 yrs. old & below if sharing with parents.</li><li>Maximum of four (4) occupants, extra bed at Php 300 each.</li><li>Free 24/7 Internet access at the Lobby.</li><li>Check out time is at 12:00 noon.</li><li>Rates include government tax & service charge.</li><li>Php 1800.00 per night.</li></ul></div></div><!--/CONTENTBODY--></div></div>

<?php include("footer.php"); ?>

/*-------------------------------- cafeteria.php ----------------------------------------------------- */<?phpinclude("header.php");?>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><link rel="shortcut icon" href="favicon.ico" /><link rel="stylesheet" type="text/css" href="css/jquery.panorama.css" media="screen" /><script type="text/javascript" src="js/jquery-1.4.2.js"></script><script type="text/javascript" src="js/jquery.panorama.js"></script><script type="text/javascript">$(document).ready(function(){

Online Booking System for Camp Holiday Resort and Recreation Area 207

Page 208: Chapters

$("img.advancedpanorama").panorama({auto_start: 0,start_position: 1527});});</script><script type="text/javascript" src="js/cvi_text_lib.js"></script><script type="text/javascript" src="js/jquery.advanced-panorama.js"></script><script type="text/javascript" src="js/jquery.flipv.js"></script><script type="text/javascript">$(document).ready(function(){$('.thickbox').fancybox();});</script>

<style type="text/css">body {/*background: #595959;*/text-align: center;}h1 {color: white;margin-bottom: 2em;font-family: Verdana;font-weight: normal;font-size: 25px;}#page {text-align: center;color: white;}#page a {color: white;}#page .panorama-viewport {border: 20px solid #414141;margin-left: auto;margin-right: auto;}#page p {margin-bottom: 1em;}</style><div id="page"><img src="img/cafeteria.png" class="advancedpanorama" width="4500" height="375" usemap="testmap" alt="Cafeteria" /><map id="testmap" name="testmap"> <area shape="rect" coords="2146,152,2215,243" href="panoramic.php" class="thickbox" alt="This way to Beach Shore" />

Online Booking System for Camp Holiday Resort and Recreation Area 208

Page 209: Chapters

<area shape="rect" coords="641,192,712,293" href="out.php" class="thickbox" alt="Move here" /><area shape="rect" coords="3680,140,3747,250" href="pool.php" class="thickbox" alt="This way to Swimming Pool" /></map></div><?phpinclude("footer.php");?>

/*-------------------------------- contact.php ------------------------------------------------------- */<?php include("header.php"); ?><script type="text/javascript" src="lightbox/js/jquery.js"></script><script type="text/javascript" src="lightbox/js/jquery.lightbox-0.5.js"></script><link rel="stylesheet" type="text/css" href="lightbox/css/jquery.lightbox-0.5.css" media="screen" />

<form action="" method="post"><div class="content-layout"><div class="content-layout-row"><?php include("sidebar.php"); ?><!--CONTENTBODY--><div id="bodycontent"><div class="layout-cell content"><div class="post"><div class="post-body"><div class="post-inner article"><h2 class="postheader">Contact Us</h2><blockquote><p><B>Any comments, ideas and/or suggestions - all are welcomed.</B><br /> Please take the time to fill out our short form below. Let

us know your ideas to bring even more encouragement and hope to our Resort.</p></blockquote><table class="table1"><tr valign="top"><td class="menu_title1" width="48%"><div align="left"><span class="testimonialsBOLD">Name</span>:<br><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><input name="name" id="name" class="textfiled" size="30" maxlength="30"></font> </div></td></tr> <tr valign="top"><td class="menu_title1"><div align="left"><span class="testimonialsBOLD">Email Address</span>:<br>

Online Booking System for Camp Holiday Resort and Recreation Area 209

Page 210: Chapters

<font face="Verdana, Arial, Helvetica, sans-serif" size="2"><input name="email" id="email" class="textfiled" size="30"></font></div></td></tr><tr valign="top"><td colspan="2" class="menu_title1"><div align="left"><span class="testimonialsBOLD">Message: </span><br><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><textarea name="msg" id="msg" cols="50" rows="10" class="textfiled"></textarea></font> </div></td></tr><tr valign="top"><td colspan="2" class="menu_title1"><div align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><input name="Submit" class="buttons" value="Send" type="submit"></font></div></td></tr></table>

<?phpfunction spamcheck($field){// filter_var() sanitizes the e-mail// address using FILTER_SANITIZE_EMAIL$field=filter_var($field, FILTER_SANITIZE_EMAIL);// filter_var() validates the e-mail// address using FILTER_VALIDATE_EMAILif(filter_var($field, FILTER_VALIDATE_EMAIL)){ return TRUE;} else {return FALSE;}}

if (isset($_REQUEST['email'])){// if "email" is filled out, proceed// check if the email address is invalid$mailcheck = spamcheck($_REQUEST['email']);if ($mailcheck==FALSE){echo "Invalid input";} else {// send email$email = $_REQUEST['email'] ;

Online Booking System for Camp Holiday Resort and Recreation Area 210

Page 211: Chapters

$subject = $_REQUEST['name'] ;$message = $_REQUEST['msg'] ;mail("[email protected]", "Subject: $name", $message, "From: $email" );}}// $to = "[email protected]";// $subject = $_POST['name'];// $txt = $_POST['msg'];// $headers = $_POST['email'];// mail($to,$subject,$txt,$headers);?></div></div></div></div></div></div></div></form><?php include("footer.php"); ?>

/*-------------------------------- debutpackages.php ---------------------------------------------- */<?php include("header.php"); ?><div class="content-layout"><div class="content-layout-row"><?php include("sidebar.php"); ?><div id="bodycontent"> <h2 class="postheader" style="margin:50px;"> Debut Packages </h2><center><img src="img/packages-debut.jpg" width="400" height="300" /></center><div style="padding:50px;"><ul><li>Php 30,000.00 net - Buffet Lunch or Dinner. Package for 100 persons.</li><br /><li>FACILITIES TO BE PROVIDED:<br /><br /> <div align="center"><table><tr><td>-</td><td>Backdrop</td></tr><tr><td>-</td><td>GuestvBook</td></tr><tr><td>-</td>

Online Booking System for Camp Holiday Resort and Recreation Area 211

Page 212: Chapters

<td>Overnight Room Accommodation</td></tr><tr><td>-</td><td>18 candles</td></tr><tr><td>-</td><td>18 Roses</td></tr><tr><td>-</td><td>Mother Candle</td></tr><tr><td>-</td><td>Balloons</td></tr><tr><td>-</td><td>Four Pillars Floral Arrangement</td></tr><tr><td>-</td><td>Floral Arrangement for the Guest Tables</td></tr><tr><td>-</td><td>Covered Cake Table</td></tr></table></div></li></ul></div></div></div></div><?php include("footer.php"); ?>

/*-------------------------------- facilities.php ----------------------------------------------------- */<?php include("header.php"); ?>

<script type="text/javascript" src="lightbox/js/jquery.js"></script><script type="text/javascript" src="lightbox/js/jquery.lightbox-0.5.js"></script><link rel="stylesheet" type="text/css" href="lightbox/css/jquery.lightbox-0.5.css" media="screen" /><form action="" method="post"><div class="content-layout"><div class="content-layout-row">

Online Booking System for Camp Holiday Resort and Recreation Area 212

Page 213: Chapters

<?php include("sidebar.php"); ?><div id="bodycontent"><div class="layout-cell content"><div class="post"><div class="post-body"><div class="post-inner article"><h2 class="postheader"> Facilities </h2><div class="postcontent">

<blockquote><p>Whether you’re staying at the resort for business or for pleasure, Camp Holiday Resort and Recreational Area has the facilities, amenities, and services designed to fit all your needs. Its warm, efficient, and friendly staff are also available to cater to your requests.</p></blockquote><br /><?phpinclude("connection/connection.php");

$sqlString = " SELECT *FROM tbl_amenities";$result = mysql_query($sqlString);while($row = mysql_fetch_array($result)){?><table class="table"> <tr><td colspan="2"><h4 class="postheader"><?php echo $row['amenitiesName'];?></h4><hr style=" margin-left: 10px; width: 630px;"/></td></tr> <tr><td><a href="admin/<?php echo $row['image'];?>" rel="lightbox" title="<?php echo $row['amenitiesName'];?>"><img src="admin/<?php echo $row['file_thumb']; ?>" align="left" /></a></td><td><p style="padding-left: 20px;"><?php echo $row['amenitiesDesc'];?></p></td></tr> </table>

Online Booking System for Camp Holiday Resort and Recreation Area 213

Page 214: Chapters

<?php } ?></div></div></div></div></div> </div></div></div>

</form><script type="text/javascript">$(function() {$('a[@rel*=lightbox]').lightBox(); // Select all links that contains lightbox in the attribute rel});</script>

<?phpinclude("footer.php");?>

/*-------------------------------- footer.php -------------------------------------------------------- */<!--FOOTER--><div class="cleared"></div><div class="footer"><div class="footer-t"></div><div class="footer-body"><div class="footer-text" align="center"><p><a href="index.php">Home</a> | <a href="facilities.php">Facilities</a> | <a href="bridalpackages.php">Packages</a> | <a href="location.php">Location</a> | <a href="contact.php">Contact Us</a></p></div><div class="cleared"></div></div></div><!--/FOOTER--></div></div></div>

<script src="jquery.validate.js" type="text/javascript"></script>

<script type="text/javascript">

$.validator.setDefaults({

Online Booking System for Camp Holiday Resort and Recreation Area 214

Page 215: Chapters

submitHandler: function() {

var fname = document.getElementById('firstname').value;var lname = document.getElementById('lastname').value;var mi = document.getElementById('middleinitial').value;var add = document.getElementById('address').value;var eadd = document.getElementById('eadd').value;var nat = document.getElementById('nationality').value;var passno = document.getElementById('passportno').value;var com = document.getElementById('company').value;var pi = document.getElementById('placeissued').value;var connum = document.getElementById('connum').value;

ajaxpagedynamic('guestprev.php?fname='+fname+'&lname='+lname+'&mi='+mi+'&add='+add+'&eadd='+eadd+'&nat='+nat+'&passno='+passno+'&com='+com+'&pi='+pi+'&connum='+connum, 'bodycontent');

}});

$().ready(function() {// validate the comment form when it is submitted$("#orderform").validate();

// validate signup form on keyup and submit$("#orderform").validate({rules: {firstname: "required",lastname: "required",username: {required: true,minlength: 2},password: {required: true,minlength: 5},confirm_password: {required: true,minlength: 5,equalTo: "#password"},email: {required: true,email: true},topic: {required: "#newsletter:checked",minlength: 2

Online Booking System for Camp Holiday Resort and Recreation Area 215

Page 216: Chapters

},agree: "required"},messages: {firstname: "Please enter your firstname",lastname: "Please enter your lastname",username: {required: "Please enter a username",minlength: "Your username must consist of at least 2 characters"},password: {required: "Please provide a password",minlength: "Your password must be at least 5 characters long"},confirm_password: {required: "Please provide a password",minlength: "Your password must be at least 5 characters long",equalTo: "Please enter the same password as above"},email: "Please enter a valid email address",agree: "Please accept our policy"}});

// propose username by combining first- and lastname$("#username").focus(function() {var firstname = $("#firstname").val();var lastname = $("#lastname").val();if(firstname && lastname && !this.value) {this.value = firstname + "." + lastname;}});

//code to hide topic selection, disable for demovar newsletter = $("#newsletter");// newsletter topics are optional, hide at firstvar inital = newsletter.is(":checked");var topics = $("#newsletter_topics")[inital ? "removeClass" : "addClass"]("gray");var topicInputs = topics.find("input").attr("disabled", !inital);// show when newsletter is checkednewsletter.click(function() {topics[this.checked ? "removeClass" : "addClass"]("gray");topicInputs.attr("disabled", !this.checked);});});</script>

</body>

Online Booking System for Camp Holiday Resort and Recreation Area 216

Page 217: Chapters

</html>

/*-------------------------------- function.php ----------------------------------------------------- */<?php

session_start();

include("admin/connection/connection.php");date_default_timezone_set('Asia/Taipei');//all function will be added here usage postval("buttonname","textboxname1,textboxname1")function dateDiff($dformat, $endDate, $beginDate){$date_parts1=explode($dformat, $beginDate);$date_parts2=explode($dformat, $endDate);$start_date=gregoriantojd($date_parts1[0], $date_parts1[1], $date_parts1[2]);$end_date=gregoriantojd($date_parts2[0], $date_parts2[1], $date_parts2[2]);return $end_date - $start_date;}

function inserttodb($tablename, $parameter){$sql = "INSERT INTO ".$tablename." ".$parameter." ";mysql_query($sql);}function redirectto($time,$url){echo "<meta http-equiv='refresh' content='".$time.";url=".$url."'>"; }

function loginguest($btnname){

if(isset($_POST[$btnname])){

$Uname = $_POST["username"];$Pword = $_POST["password"];

$sql="SELECT * FROM tbl_guest WHERE username='$Uname' AND password='$Pword'";$rs = mysql_query($sql) or die("Error! Login...");

if($row = mysql_fetch_object($rs)){$_SESSION['name'] = $row->firstName;$_SESSION['guestid'] = $row->guest_id;$_SESSION['login'] = 1;echo "<script language='javascript'>location.href='user.php?login=1&default=1'</script>";}else{

Online Booking System for Camp Holiday Resort and Recreation Area 217

Page 218: Chapters

echo "<b><font color='red' size='2'>Invalid Username and Password.</font></b>";}}}?>

/*-------------------------------- guestinfo.php ---------------------------------------------------- */<?phpinclude("function.php");?><table width="100%" border="0" cellspacing="1" cellpadding="0" style="font-size:9px; margin-bottom:-7.8px"><tr><td><div align="center" class="style1">Check<br />Availability</div></td><td><div align="center" style="font-weight:bold">====&gt;</div></td><td><div align="center">Available<br />Accommodation</div></td><td><div align="center" style="font-weight:bold">====&gt;</div></td><td><div align="center" style="color:#990000; font-weight:bold">Reservation<br />Requirements</div></td><td><div align="center" style="font-weight:bold">====&gt;</div></td><td><div align="center" class="style1">Reservation<br />Confirmation</div></td><td><div align="center" style="font-weight:bold">====&gt;</div></td><td><div align="center">Reservation<br />Confirmed</div></td></tr></table><?php echo "<br><div align='center' id='header'>Reservation Details</div><br>" ; ?><table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-left:15px">

<tr><td width="34%" valign="top">Preffered Room Type(s):</td><td width="40%"><?php$check = explode(",",$_GET["numval"]);$numroom = explode(",",$_GET["numroom"]);$_SESSION['check'] = $check; $_SESSION['numroom'] = $numroom;

$_SESSION['selroomid'];

foreach ($check as $value) {

$sql = "SELECT * FROM tbl_roomtype,tbl_room WHERE tbl_roomtype.roomType_id = tbl_room.roomType_id AND tbl_roomtype.roomType_id = $value group by tbl_room.roomType_id";$result = mysql_query($sql);

Online Booking System for Camp Holiday Resort and Recreation Area 218

Page 219: Chapters

while($row = mysql_fetch_array($result)){echo "<div style=''>".$row['roomName']."</div><div style='font-size:11px;'><img height='50px' width='50px' src='admin/".$row['image']."' /></div><div id='rate'>Rate: ".$row['Rate']."</div>";}}foreach ($check as $value) {

$sql = "SELECT * FROM tbl_roomtype,tbl_room WHERE tbl_roomtype.roomType_id = tbl_room.roomType_id AND tbl_roomtype.roomType_id = $value group by tbl_room.roomType_id";$result = mysql_query($sql);

while($row = mysql_fetch_array($result)){$rate = $row['Rate'];

}foreach ($numroom as $value2) {$rate1 = $rate * $value2; }$rate2 = $rate2 + $rate1;}?>

</td><td width="26%" valign="middle"><?phpforeach ($numroom as $value2) {echo "<div id='divnoroom'><br>No. of rooms: ".$value2."</div>";}?></td></tr><tr><td width="34%">Arrival Date:</td><td colspan="2"><?php echo $_SESSION['sdate']; ?></td></tr><tr><td><p>Departure Date:</p></td><td colspan="2"><?php echo $_SESSION['edate']; ?></td></tr><tr><td>Number of Night(s):</td><td colspan="2"><?php echo $_SESSION['dateDiff']; ?></td></tr><tr><td>Number of Adult(s):</td><td colspan="2"><?php echo $_SESSION['numguest']; ?></td>

Online Booking System for Camp Holiday Resort and Recreation Area 219

Page 220: Chapters

</tr><tr><td>Number of Children:</td><td colspan="2"><?php echo $_SESSION['numkids']; ?></td></tr><tr><td>Total Payment:</td><?php $total = $rate2 * $_SESSION['dateDiff']; ?><td colspan="2">P<?php echo $_SESSION['total'] = $total; ?></td></tr></table><div align="center" id="header">Guest Information</div>

<?php echo $_GET["rid"];?><?php echo $_GET["sdate"];?>

<div class="content-layout-row"><div class="layout-cell"><div class="overview-table-inner">

<blockquote><p>(<b style="color:#FF0000">*</b>) = Required Field!</p></blockquote></div></div><!-- end cell --></div><table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-left:15px"><tr><td width="206"></td></tr><tr><td width="206"><label for="firstname">First name:</label></td><td width="391" style="color:#FF0000"><input type="text" name="firstname" id="firstname" class="required" > *</td><td width="304">&nbsp;</td></tr><tr><td><label for="lastname">Last name:</label></td><td style="color:#FF0000"><input type="text" name="lastname" id="lastname" class="required"> *</td><td>&nbsp;</td></tr><tr><td><label for="middleinitial">M.I</label></td><td style="color:#FF0000"><input type="text" name="middleinitial" id="middleinitial" class="required" maxlength="1"> *</td><td>&nbsp;</td>

Online Booking System for Camp Holiday Resort and Recreation Area 220

Page 221: Chapters

</tr><tr><td><label for="address">Address:</label></td><td style="color:#FF0000"><input type="text" name="address" id="address" class="required"> *</td><td>&nbsp;</td></tr><tr><td><label for="eadd">Email Address:</label></td><td style="color:#FF0000"><input type="text" name="eadd" id="eadd" class="required email"> *</td><td>&nbsp;</td></tr><tr><td><label for="nationality">Nationality:</label></td><td><input type="text" name="nationality" id="nationality"></td><td>&nbsp;</td></tr><tr><td><label for="passportno">Passport No:</label></td><td><input type="text" name="passportno" id="passportno"></td><td>&nbsp;</td></tr><tr><td><label for="company">Company:</label></td><td><input type="text" name="company" id="company"></td><td>&nbsp;</td></tr><tr><td><label for="placeissued">Place Issued:</label></td><td><input type="text" name="placeissued" id="placeissued"></td><td>&nbsp;</td></tr><tr><td><label for="telno">Contact. No.:</label></td><td style="color:#FF0000"><input type="text" name="connum" id="connum" class="required"> *</td><td>&nbsp;</td></tr>

<tr><td colspan="3">&nbsp;</td></tr><tr><td>&nbsp;</td><td align="center"></td><td align="center"></td></tr>

Online Booking System for Camp Holiday Resort and Recreation Area 221

Page 222: Chapters

</table><div style="margin-left:300px;"><input type="submit" name="submitguess" id="submitguess" value="Submit" onClick="javascript:get_guess_val();"><input type="button" name="cancel" id="cancel" value="Cancel" onClick="tb_remove()"></div>

/*-------------------------------- guestprev.php ---------------------------------------------------- */<?phpinclude("function.php");?><table width="100%" border="0" cellspacing="1" cellpadding="0" style="font-size:9px; margin-bottom:-7.8px"><tr><td><div align="center" class="style1">Check<br />Availability</div></td><td><div align="center" style="font-weight:bold">====&gt;</div></td><td><div align="center">Available<br />Accommodation</div></td><td><div align="center" style="font-weight:bold">====&gt;</div></td><td><div align="center" class="style1">Reservation<br />Requirements</div></td><td><div align="center" style="font-weight:bold">====&gt;</div></td><td><div align="center" style="color:#990000; font-weight:bold">Reservation<br />Confirmation</div></td><td><div align="center" style="font-weight:bold">====&gt;</div></td><td><div align="center">Reservation<br />Confirmed</div></td></tr></table><?php echo "<br><div align='center' id='header'>Reservation Details</div><br>" ; ?>

<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-left:15px">

<tr><td width="34%" valign="top">Preffered Room Type(s):</td><td width="40%"><?php$check = explode(",",$_GET["numval"]);$numroom = explode(",",$_GET["numroom"]);

$check = $_SESSION['check'];$numroom = $_SESSION['numroom'];

foreach ($check as $value) {$sql = "SELECT * FROM tbl_roomtype,tbl_room WHERE tbl_roomtype.roomType_id = tbl_room.roomType_id AND tbl_roomtype.roomType_id = $value group by tbl_room.roomType_id";$result = mysql_query($sql);

Online Booking System for Camp Holiday Resort and Recreation Area 222

Page 223: Chapters

while($row = mysql_fetch_array($result)){echo "<div style=''>".$row['roomName']."</div><div style='font-size:11px;'><img height='50px' width='50px' src='admin/".$row['image']."' /></div><div id='rate'>Rate".$row['Rate']."</div>";}}

?></td><td width="26%" valign="middle"><?phpforeach ($numroom as $value2) {echo "<div id='divnoroom'><br>No. of rooms: ".$value2."</div>";}?></td></tr><tr><td width="34%">Arrival Date:</td><td colspan="2"><?php echo $_SESSION['sdate']; ?></td></tr><tr><td><p>Departure Date:</p></td><td colspan="2"><?php echo $_SESSION['edate']; ?></td></tr><tr><td>Number of Night(s):</td><td colspan="2"><?php echo $_SESSION['dateDiff']; ?></td></tr><tr><td>Number of Adult(s):</td><td colspan="2"><?php echo $_SESSION['numguest']; ?></td></tr><tr><td>Number of Children:</td><td colspan="2"><?php echo $_SESSION['numkids']; ?></td></tr><tr><td>Total Payment:</td><td colspan="2">P<?php echo $_SESSION['total'];?></td></tr><tr><td>&nbsp;</td></tr></table><table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-left:15px"><tr><td width="34%">Firstname:</td><td><?php echo $_GET['fname']; ?></td></tr><tr>

Online Booking System for Camp Holiday Resort and Recreation Area 223

Page 224: Chapters

<td width="34%">Lastname:</td><td><?php echo $_GET['lname']; ?></td></tr><tr><td width="34%">MI:</td><td><?php echo $_GET['mi']; ?></td></tr><tr><td width="34%">Address:</td><td><?php echo $_GET['add']; ?></td></tr><tr><td width="34%">Email Address:</td><td><?php echo $_GET['eadd']; ?></td></tr><tr><td width="34%">Cell No:</td><td><?php echo $_GET['connum']; ?></td></tr></table>

<<?php echo $_SESSION['total'];?>

<?php

//print_r($arrayrow);//print_r($_SESSION);$_SESSION["fname"] = $_GET['fname'];$_SESSION["lname"] = $_GET['lname'];$_SESSION["mi"] = $_GET['mi'];$_SESSION["add"] = $_GET['add'];$_SESSION["eadd"] = $_GET['eadd'];$_SESSION["ceadd"] = $_GET['fname'];/* $_SESSION["nat"] = $_GET['nat'];$_SESSION["passno"] = $_GET['passno'];$_SESSION["com"] = $_GET['com'];$_SESSION["pi"] = $_GET['pi'];$_SESSION["telno"] = $_GET['telno'];*/$_SESSION["connum"] = $_GET['connum'];// print_r($_SESSION);?>

<br /><br /><br /><table border="1" width=100%><tr><td><div align=center><b>Terms and Conditions</b></div>

<ul><li> All prices are quoted above are inclusive of goverment tax.</li>

Online Booking System for Camp Holiday Resort and Recreation Area 224

Page 225: Chapters

<li>Deposit-A 50% deposit will be required upon signing of contract fifteen(15)days prior to the event.</li>Reservation will not be confirmed unless the contract is signed by both parties and required deposit is made.<li>Adjustments if any; either by the client, will have to be made at least seven(7) days before the scheduled reservation .</li>

<li>Cancellation - Any cancellation of reservation should be made atlest fifteen(15) days before theschedule reservation. if cancellation is made after the specified time, 50% of the deposit will be portified to cover for the incidental expenses incurred.</li>

<li>No Show - if the reservation is cancelled without any notice given, the resort will have the right to charge the client the total cost of the reservation made.</li>

<li>Full Payment - Full payment of account should be made immediately upon completion of services after the function; in cash.</li>

<li>There is a certain limit on the liabilities of the supplier, in case of any problem.</li>

<li>Any additional expenses incurred during the function will be on a pax account basis</li>

</ul></td>

</tr></table><br /></form><form action="https://www.sandbox.paypal.com/us/cgi-bin/webscr" method="post"><input type="hidden" name="cmd" value="_cart"><input type="hidden" name="upload" value="1"><input type="hidden" name="business" value="[email protected]"><input type="hidden" name="item_name_1" value="Total Room Transaction"> <input type="hidden" name="amount_1" value="<?php echo $_SESSION['total'];?>"><input type='hidden' name='handling' value='0'><input type='hidden' name='return' value='http://localhost/chrnew/validator.php?status=Sucess!'><input type='hidden' name='cancel_return' value='http://localhost/chrnew/validator.php?status=cancel'>

<input type='hidden' name='currency_code' value='PHP'><input type="hidden" name="cpp_ headerback_ color" value="#000000" /><div align=center><input type="image" src="https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"></div><div align=center><img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"></div></form>

/*-------------------------------- header.php ------------------------------------------------------- */

Online Booking System for Camp Holiday Resort and Recreation Area 225

Page 226: Chapters

<?php include("function.php");?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en"><head><?php

?>

<link rel="stylesheet" href="css/thickbox.css" type="text/css" media="screen" />

<link rel="stylesheet" type="text/css" media="screen" href="datepicker/datePicker.css"><link rel="stylesheet" type="text/css" media="screen" href="datepicker/demo.css"><link rel="stylesheet" href="css/style.css" type="text/css" media="screen" /><link rel="stylesheet" href="css/style.ie6.css" type="text/css" media="screen" /><link rel="stylesheet" href="css/style.ie7.css" type="text/css" media="screen" />

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Camp Holiday Resort and Recreation Area</title>

<!--/MENUBAR--> <script type="text/javascript" src="js/thickbox.js"></script>

<script type="text/javascript" src="js/script.js"></script><!-- datepicker --><script type="text/javascript" src="datepicker/firebug.js"></script><script type="text/javascript" src="datepicker/jquery.min.js"></script><script type="text/javascript" src="datepicker/date.js"></script><script type="text/javascript" src="datepicker/jquery.datePicker.js"></script><script language="javascript">AC_FL_RunContent = 0;</script><script src="js/AC_RunActiveContent.js" language="javascript"></script>

<script type="text/javascript" charset="utf-8">$(function(){$('.date-pick').datePicker()$('#start-date').bind('dpClosed',function(e, selectedDates){var d = selectedDates[0];if (d) {d = new Date(d);$('#end-date').dpSetStartDate(d.addDays(1).asString());}});

Online Booking System for Camp Holiday Resort and Recreation Area 226

Page 227: Chapters

$('#end-date').bind('dpClosed',function(e, selectedDates){var d = selectedDates[0];if (d) {d = new Date(d);$('#start-date').dpSetEndDate(d.addDays(-1).asString());}});});</script><script type="text/javascript">//Load Ajax page static

var loadedobjects=""var rootdomain="http://"+window.location.hostname

function ajaxpage(url,containerid){//get value from an textbox idvar startdatejs = document.getElementById('start-date').value;var enddatejs = document.getElementById('end-date').value;var numguestjs = document.getElementById('no_guest').value;var numkidsjs = document.getElementById('no_kids').value;if(startdatejs == "" || enddatejs == "" || numguestjs == "" || numkidsjs == ""){alert("Please fill up Arrival/Departure date.");}else{

var page_request = falseif (window.XMLHttpRequest) // if Mozilla, Safari etcpage_request = new XMLHttpRequest()else if (window.ActiveXObject){ // if IEtry {page_request = new ActiveXObject("Msxml2.XMLHTTP")} catch (e){try{page_request = new ActiveXObject("Microsoft.XMLHTTP")}catch (e){}}}else

Online Booking System for Camp Holiday Resort and Recreation Area 227

Page 228: Chapters

return falsepage_request.onreadystatechange=function(){loadpage(page_request, containerid)}//page loaderpage_request.open('GET', url+'?sdate='+startdatejs+'&edate='+enddatejs+'&numguest='+numguestjs+'&numkids='+numkidsjs, true)page_request.send(null)}

function loadpage(page_request, containerid){if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))document.getElementById(containerid).innerHTML=page_request.responseText}

function loadobjs(){if (!document.getElementById)returnfor (i=0; i<arguments.length; i++){var file=arguments[i]var fileref=""if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceedingif (file.indexOf(".js")!=-1){ //If object is a js filefileref=document.createElement('script')fileref.setAttribute("type","text/javascript");fileref.setAttribute("src", file);}else if (file.indexOf(".css")!=-1){ //If object is a css filefileref=document.createElement("link")fileref.setAttribute("rel", "stylesheet");fileref.setAttribute("type", "text/css");fileref.setAttribute("href", file);}}if (fileref!=""){document.getElementsByTagName("head").item(0).appendChild(fileref)loadedobjects+=file+" " //Remember this object as being already added to page}}}

}</script><script type="text/javascript">

var loadedobjects=""var rootdomain="http://"+window.location.hostname

Online Booking System for Camp Holiday Resort and Recreation Area 228

Page 229: Chapters

function ajaxpagedynamic(url,containerid){var page_request = falseif (window.XMLHttpRequest) // if Mozilla, Safari etcpage_request = new XMLHttpRequest()else if (window.ActiveXObject){ // if IEtry {page_request = new ActiveXObject("Msxml2.XMLHTTP")} catch (e){try{page_request = new ActiveXObject("Microsoft.XMLHTTP")}catch (e){}}}elsereturn falsepage_request.onreadystatechange=function(){loadpage(page_request, containerid)}//page loaderpage_request.open('GET', url, true)page_request.send(null)}function loadpage(page_request, containerid){if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))document.getElementById(containerid).innerHTML=page_request.responseText}function loadobjs(){if (!document.getElementById)returnfor (i=0; i<arguments.length; i++){var file=arguments[i]var fileref=""if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceedingif (file.indexOf(".js")!=-1){ //If object is a js filefileref=document.createElement('script')fileref.setAttribute("type","text/javascript");fileref.setAttribute("src", file);}else if (file.indexOf(".css")!=-1){ //If object is a css filefileref=document.createElement("link")fileref.setAttribute("rel", "stylesheet");fileref.setAttribute("type", "text/css");fileref.setAttribute("href", file);}

Online Booking System for Camp Holiday Resort and Recreation Area 229

Page 230: Chapters

}if (fileref!=""){document.getElementsByTagName("head").item(0).appendChild(fileref)loadedobjects+=file+" " //Remember this object as being already added to page}}}</script><script type="text/javascript">var user = document.getElementById('user').value;if(user != 0){alert(user);ajaxpagedynamic('guestprev.php?numval='+valid+'&numroom='+valtext, 'bodycontent');}else{ajaxpagedynamic('guestinfo.php?numval='+valid+'&numroom='+valtext, 'bodycontent');}}function incre(name,name2){var val = parseInt(document.getElementById(name).value);var roomlimit = parseInt(document.getElementById(name2).value);if(roomlimit == val){alert('Limit Exceed');}else{var val2 = (val + 1);document.getElementById(name).value = val2;}}function dec(name){var val = parseInt(document.getElementById(name).value);if(val == 0){ alert("Limit to Zero");}else {var val2 = (val - 1);document.getElementById(name).value = val2;}}function submitguest(){ajaxpagedynamic('action.php?rel=submitguest', 'bodycontent');alert('Thank you for your Reservation. Looking forward for seeing you!');

Online Booking System for Camp Holiday Resort and Recreation Area 230

Page 231: Chapters

window.location = "index.php";}function userreview(){ajaxpagedynamic('user/review.php?rel=reserve', 'bodycontent');}</script>

</head><body><div id="page-background-simple-gradient"><div id="page-background-gradient"></div></div><div id="main"><div class="sheet"><div class="sheet-body"><div class="header"><div class="header-jpeg"></div></div><!--MENUBAR--><div class="nav"><div class="l"></div><div class="r"></div><div class="nav-center"><ul class="menu"><?php if($_SESSION['guestid'] != ''){ ?><li><a href="user.php?login=1&default=1" class="active">Home</a></li><?php }else{ ?><li><a href="index.php" class="active">Home</a></li><?php } ?><li><a href="#">Rooms</a><ul><li><a href="hotelroom.php">Hotel Room</a></li><li><a href="cabinroom.php">Airconditioned Cabin Room &nbsp;&nbsp;&nbsp;</a></li></ul></li><li><a href="facilities.php">Facilities</a></li><li><a href="#">Packages</a><ul><li><a href="bridalpackages.php">Bridal Package </a></li><li><a href="debutpackages.php">Debut Package </a></li><li><a href="seminarpackages.php">Live-in Seminar Package &nbsp;&nbsp;&nbsp;</a></li></ul></li><li><a href="#">Gallery</a><ul>

Online Booking System for Camp Holiday Resort and Recreation Area 231

Page 232: Chapters

<li><a href="panoramic.php">Panoramic View &nbsp;&nbsp;&nbsp;</a></li><li><a href="photogallery.php">Photo Gallery </a></li></ul></li><li><a href="location.php">Location</a></li><li><a href="contact.php">Contact Us</a></li></ul></div></div>

/*-------------------------------- hotelroom.php --------------------------------------------------- */<?php include("header.php"); ?><div class="content-layout"><div class="content-layout-row"><?php include("sidebar.php"); ?><div id="bodycontent"> <h2 class="postheader" style="margin:50px;"> Hotel Rooms </h2><center><img src="img/Facilities/24 - hotelroom.jpg" width="400" height="300" /></center><div style="padding:50px;"><ul><li>Available in Single or Double Bed.</li><li>Free use of Swimming Pool.</li><li>Free accommodation for children 8 yrs. old & below if sharing with parents.</li><li>Maximum of four (4) occupants, extra bed at Php 300 each.</li><li>Free 24/7 Internet access at the Lobby.</li><li>Check out time is at 12:00 noon.</li><li>Rates include government tax & service charge.</li><li>Php 1500.00 per night.</li></ul></div></div></div></div><?php include("footer.php"); ?>

/*-------------------------------- index.php --------------------------------------------------------- */<?phpinclude("header.php");?><form class="cmxform" name="orderform" id="orderform" method="post"><div class="content-layout"><div class="content-layout-row"><?phpinclude("sidebar.php");?><div id="bodycontent"><div class="cleared"></div><div class="content-layout overview-table"><div class="content-layout-row"><div class="layout-cell">

Online Booking System for Camp Holiday Resort and Recreation Area 232

Page 233: Chapters

<div class="overview-table-inner"><br /><h2 class="postheader">Welcome to Camp Holiday Resort</h2><br /><br /><br /><br /><object width="400" height="300"><param name="movie" value="swf/main.swf"><embed src="swf/header.swf" width="400" height="300"></embed></object><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Camp Holiday Resort & Recreation Area is one of the newer resort complexes on Samal Island. Located directly off the Samal Ferry Wharf, it is situated in as convenient an area as you will find on the island.<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The accommodations at Camp Holiday consist of a hotel, private cottages, and open cottages. The hotel rooms and private cottages are fully air-conditioned, with cable television and have clean, modern bathrooms with cold & hot showers. The prices range from:<br /><br /><table style="margin-left:50px;"><tr><td>Day Tour</td><td style=" padding-left:10px; padding-right: 10px;">-</td><td>Php 80.00/person</td></tr><tr><td>Overnight</td><td style=" padding-left:10px; padding-right: 10px;">-</td><td>Php 150.00/person</td></tr><tr><td>Hotel Room</td><td style=" padding-left:10px; padding-right: 10px;">-</td><td>Php 1,500.00/night</td></tr><tr><td>Cabin Room</td><td style=" padding-left:10px; padding-right: 10px;">-</td><td>Php 1,800.00/night</td></tr></table><br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The rest of the complex includes the lobby, which provides free WiFi, an open dining room/common area, swimming pool and beach front with nipa huts. There is also a convenience store and gas

Online Booking System for Camp Holiday Resort and Recreation Area 233

Page 234: Chapters

station (PHOENIX) right around the corner from the complex that can provide most of the basic necessities you might need during your stay.</p><br /><br /></div></div><!-- end cell --><div class="layout-cell"><div class="overview-table-inner">

<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like-box href="http://www.facebook.com/pages/Camp-Holiday-Resort-and-Recreation-Area/152465284809298" width="260" show_faces="true" stream="true" header="false"></fb:like-box></div></div><!-- end cell -->

</div><!-- end row --></div><!-- end table --></div></div></div>

</form><?phpinclude("footer.php");?>

/*-------------------------------- location.php ------------------------------------------------------ */<?phpinclude("header.php");?><form action="" method="post" name="orderform"><div class="content-layout"><div class="content-layout-row"><?phpinclude("sidebar.php");?><div id="bodycontent"><div class="layout-cell content"><div class="post"><div class="post-body"><div class="post-inner article"><div class="postcontent"><h2 class="postheader">Resort Location</h2><br /><iframe width="600" height="450" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?

Online Booking System for Camp Holiday Resort and Recreation Area 234

Page 235: Chapters

ie=UTF8&amp;hl=en&amp;t=h&amp;source=embed&amp;msa=0&amp;msid=202630926012432903365.0004897f97b1b2f3b3b72&amp;ll=7.121318,125.674329&amp;spn=0.002129,0.002677&amp;output=embed"></iframe><br /><small>View <a href="http://maps.google.com/maps/ms?ie=UTF8&amp;hl=en&amp;t=h&amp;source=embed&amp;msa=0&amp;msid=202630926012432903365.0004897f97b1b2f3b3b72&amp;ll=7.121318,125.674329&amp;spn=0.002129,0.002677" style="color:#0000FF;text-align:left">Camp Holiday Resort and Recreation Area</a> in a larger map</small><br /><p><h4>Camp Holiday Resort and Recreation Area Location</h4>Camp Holiday Beach Resort is, like it's name implies, a camping resort. <br />It's located next the ferry terminal in Babak, Island Garden City of Samal.</p></div><div class="cleared"></div></div>

<div class="cleared"></div></div></div></div></div></div></div></form><?phpinclude("footer.php");?>

/*-------------------------------- logout.php -------------------------------------------------------- */<?php include("function.php");unset( $_SESSION['guestid'] );//UNREGISTER SESSIONsession_unregister("guestid");echo "<meta content='0;index.php' http-equiv='refresh' />";?>

/*-------------------------------- out.php ------------------------------------------------------------ */<?phpinclude("header.php");?><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><link rel="shortcut icon" href="favicon.ico" /><link rel="stylesheet" type="text/css" href="css/jquery.panorama.css" media="screen" /><script type="text/javascript" src="js/jquery-1.4.2.js"></script><script type="text/javascript" src="js/jquery.panorama.js"></script><script type="text/javascript">$(document).ready(function(){$("img.advancedpanorama").panorama({auto_start: 0,

Online Booking System for Camp Holiday Resort and Recreation Area 235

Page 236: Chapters

start_position: 1527});});</script><script type="text/javascript" src="js/cvi_text_lib.js"></script><script type="text/javascript" src="js/jquery.advanced-panorama.js"></script><script type="text/javascript" src="js/jquery.flipv.js"></script><script type="text/javascript">$(document).ready(function(){$('.thickbox').fancybox();});</script>

<style type="text/css">body {/*background: #595959;*/text-align: center;}h1 {color: white;margin-bottom: 2em;font-family: Verdana;font-weight: normal;font-size: 25px;}#page {text-align: center;color: white;}#page a {color: white;}#page .panorama-viewport {border: 20px solid #414141;margin-left: auto;margin-right: auto;}#page p {margin-bottom: 1em;}</style></head><body><div id="page"><img src="img/out.png" class="advancedpanorama" width="4500" height="375" usemap="testmap" alt="Inside Camp Holiday Resort" /><map id="testmap" name="testmap"> <area shape="rect" coords="1313,156,1378,243" href="cafeteria.php" class="thickbox" alt="Move here" />

Online Booking System for Camp Holiday Resort and Recreation Area 236

Page 237: Chapters

<area shape="rect" coords="712,138,778,231" href="panoramic.php" class="thickbox" alt="This way to Beach Shore" /> <area shape="rect" coords="1862,146,1925,249" href="pool.php" class="thickbox" alt="This way to Swimming Pool" /> </map></div><?phpinclude("footer.php");?>

/*-------------------------------- paronamic.php --------------------------------------------------- */<?phpinclude("header.php");?>

<div id="page">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><link rel="shortcut icon" href="favicon.ico" /><link rel="stylesheet" type="text/css" href="css/jquery.panorama.css" media="screen" /><script type="text/javascript" src="js/jquery-1.4.2.js"></script><script type="text/javascript" src="js/jquery.panorama.js"></script><script type="text/javascript">$(document).ready(function(){$("img.advancedpanorama").panorama({auto_start: 0,start_position: 1527});});</script><script type="text/javascript" src="js/cvi_text_lib.js"></script><script type="text/javascript" src="js/jquery.advanced-panorama.js"></script><script type="text/javascript" src="js/jquery.flipv.js"></script><script type="text/javascript">$(document).ready(function(){$('.thickbox').fancybox();});</script>

<style type="text/css">body {/*background: #595959;*/text-align: center;}h1 {color: white;margin-bottom: 2em;

Online Booking System for Camp Holiday Resort and Recreation Area 237

Page 238: Chapters

font-family: Verdana;font-weight: normal;font-size: 25px;}#page {text-align: center;color: white;}#page a {color: white;}#page .panorama-viewport {border: 20px solid #414141;margin-left: auto;margin-right: auto;}#page p {margin-bottom: 1em;}</style><form action="" method="post"><div class="content"><img src="img/beachArea.png" class="advancedpanorama" width="4500" height="375" usemap="testmap" alt="Beach Shore Area" /><map id="testmap" name="testmap"> <area shape="rect" coords="2209,56,2404,157" href="cafeteria.php" class="thickbox" alt="This way to Cafeteria" /> <area shape="rect" coords="1246,147,1289,206" href="sugbahanan.php" class="thickbox" alt="This way to Sugbahanan" /></map> </div></form></div><?phpinclude("footer.php");?>

/*-------------------------------- pay.php ----------------------------------------------------------- */<?php session_start(); $invoice = $_GET['id'];$date = date("Y-m-d");$sql="Update tbl_invoice SET isPaid = 'Y' where invoice_no = $invoice";mysql_query($sql);

echo mysql_error();$submit_url_test="https://www.sandbox.paypal.com/cgi-bin/webscr";$submit_url_live="https://www.paypal.com/cgi-bin/webscr";

Online Booking System for Camp Holiday Resort and Recreation Area 238

Page 239: Chapters

echo '<form method="post" id="checkout" name="checkout" action="'.$submit_url_test.'">';foreach($_GET as $key=>$val){echo'<input type="hidden" name="'.$key.'" value="'.$val.'">';}echo'</form>';

echo'<script type="text/javascript">function gotoUrl(){document.checkout.submit();}window.setTimeout(\'gotoUrl()\',3);</script> connecting to paypal...<br>creating secure connection...';?>

/*-------------------------------- photogallery.php ------------------------------------------------ */<?php include("header.php"); ?><script type="text/javascript" src="lightbox/js/jquery.js"></script><script type="text/javascript" src="lightbox/js/jquery.lightbox-0.5.js"></script><link rel="stylesheet" type="text/css" href="lightbox/css/jquery.lightbox-0.5.css" media="screen" /><div class="content-layout"><div class="content-layout-row"><?php include("sidebar.php"); ?><div id="bodycontent"> <h2 class="postheader" style="margin:50px;"> Photo Gallery </h2> <div style="padding:50px;"><table border="0"><tr><td><a href="img/Gallery/5.jpg" rel="lightbox" title="Entrance"><img src="img/Gallery/5.jpg" width="150" height="113" /></a></td><td><a href="img/Gallery/2.jpg" rel="lightbox" title="Beach 1"><img src="img/Gallery/2.jpg" width="150" height="113" /></a></td><td><a href="img/Gallery/3.jpg" rel="lightbox" title="Cottage Area"><img src="img/Gallery/3.jpg" width="150" height="113" /></a> </td><td><a href="img/Gallery/4.jpg" rel="lightbox" title="Cabin Room">

Online Booking System for Camp Holiday Resort and Recreation Area 239

Page 240: Chapters

<img src="img/Gallery/4.jpg" width="150" height="113" /></a></td></tr><tr><td><a href="img/Gallery/1.jpg" rel="lightbox" title="Beach 2"><img src="img/Gallery/1.jpg" width="150" height="113" /></a></td><td><a href="img/Gallery/6.jpg" rel="lightbox" title="Swimming Pool"><img src="img/Gallery/6.jpg" width="150" height="113" /></a></td><td><a href="img/Gallery/7.jpg" rel="lightbox" title="Beach 3"><img src="img/Gallery/7.jpg" width="150" height="113" /></a></td><td><a href="img/Gallery/8.jpg" rel="lightbox" title="Tree"><img src="img/Gallery/8.jpg" width="150" height="113" /></a></td></tr><tr><td></td><td><a href="img/Gallery/9.jpg" rel="lightbox" title="Restaurant 1"><img src="img/Gallery/9.jpg" width="150" height="113" /></a></td><td><a href="img/Gallery/10.jpg" rel="lightbox" title="Restaurant 2"><img src="img/Gallery/10.jpg" width="150" height="113" /></a></td><td></td></tr></table></div></div></div></div><script type="text/javascript">$(function() {$('a[@rel*=lightbox]').lightBox(); // Select all links that contains lightbox in the attribute rel});

Online Booking System for Camp Holiday Resort and Recreation Area 240

Page 241: Chapters

</script><?php include("footer.php"); ?>

/*-------------------------------- selectaccommodation.php ------------------------------------- */<?phpinclude("function.php");

?><table width="100%" border="0" cellspacing="1" cellpadding="0" style="font-size:9px; margin-bottom:-7.8px"><tr><td><div align="center" class="style1">Check<br />Availability</div></td><td><div align="center" style="font-weight:bold">====&gt;</div></td><td><div align="center" style="color:#990000; font-weight:bold" >Available<br />Accommodation</div></td><td><div align="center" style="font-weight:bold">====&gt;</div></td><td><div align="center">Reservation<br />Requirements</div></td><td><div align="center" style="font-weight:bold">====&gt;</div></td><td><div align="center" class="style1">Reservation<br />Confirmation</div></td><td><div align="center" style="font-weight:bold">====&gt;</div></td><td><div align="center">Reservation<br />Confirmed</div></td></tr></table><?php

$startdate=$_GET["sdate"];$enddate=$_GET["edate"];$numguest=$_GET["numguest"];$numkids=$_GET["numkids"];$numroom=$_GET["numroom"];$dateDiff = dateDiff("/", $enddate, $startdate);echo "<br><div align='center' id='header'>Reservation Details</div><br>";?><table width="75%" border="0" cellspacing="0" cellpadding="0" style="margin-left:15px"><tr><td width="35%">Arrival Date:</td><td width="65%"><?php echo $startdate; ?></td></tr><tr><td><p>Departure Date:</p></td><td><?php echo $enddate; ?></td>

Online Booking System for Camp Holiday Resort and Recreation Area 241

Page 242: Chapters

</tr><tr><td>Number of Night(s):</td><td><?php echo $dateDiff; ?></td></tr><tr><td>Number of Adults(s):</td><td><?php echo $numguest; ?></td></tr><tr><td>Number of Children:</td><td><?php echo $numkids; ?></td></tr><tr><td>&nbsp;</td></tr></table><input name="user" id="user" type="hidden" value="<?php echo $_SESSION['guestid'];?>" />

<?php$startdate2=explode("/",$startdate);$startdate2 = $startdate2[2]."-".$startdate2[0]."-".$startdate2[1];

$enddate2=explode("/",$enddate);$enddate2 = $enddate2[2]."-".$enddate2[0]."-".$enddate2[1];

$sql = "SELECT tbl_roomtype.*,tbl_room.*,tbl_reservation.* FROM tbl_roomtype,tbl_room,tbl_reservation WHERE tbl_roomtype.roomType_id = tbl_room.roomType_id AND tbl_room.roomNumber=tbl_reservation.roomNumber AND tbl_reservation.Arrival >= '".$startdate2."' AND tbl_reservation.Departure <= '".$enddate2."' ORDER BY tbl_room.roomNumber ASC";

$result = mysql_query($sql);

if (!$result) {echo 'Could not run query: ' . mysql_error();exit;}while($row = mysql_fetch_array($result)){$text .= "AND tbl_room.room_id != '".$row['room_id']."' ";}$sql2 = "SELECT tbl_roomtype . * , tbl_room . *,count(tbl_room.room_id)FROM tbl_roomtype, tbl_roomWHERE tbl_roomtype.roomType_id = tbl_room.roomType_id ".$text." GROUP BY tbl_room.roomType_id";

Online Booking System for Camp Holiday Resort and Recreation Area 242

Page 243: Chapters

// } $result2 = mysql_query($sql2);$numrow = mysql_num_rows($result2);$ii=0;if($numrow != 0){?><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="96%"><div align="center" id="header">Room Type</div></td></tr><input name="numrow" id="numrow" type="hidden" value="<?php echo $numrow;?>" /><?phpwhile($row2 = mysql_fetch_array($result2)){

?><tr align="center" valign="bottom"><td><fieldset id="fieldsetpage"><legend><?php echo $row2['roomName'];?></legend><div id="accomcontent"><img src="<?php echo 'admin/'.$row2['image'];?>" height="225px" width="300px" align="left" /><h5>Available Rooms: <?php echo $row2["count(tbl_room.room_id)"];?></h5><h5>Rate: <?php echo $row2['Rate'];?></h5><h5>Max Occupant:<?php echo $numguest+$numkids;?></h5>

<div><input name="textboxid<?php echo $ii?>" id="textboxid<?php echo $ii?>" type="hidden" value="<?php echo $row2['roomType_id'];?>" /><input name="textboxroomnum<?php echo $ii?>" id="textboxroomnum<?php echo $ii?>" type="hidden" value="<?php echo $row2["count(tbl_room.room_id)"];?>" /><input name="textbox<?php echo $ii?>" id="textbox<?php echo $ii?>" type="text" value="0" /><input name="textbox<?php echo $ii?>" id="textbox<?php echo $ii?>" type="button" onClick="javascript:dec(this.name);" style="width:35px;" value="<<<">|<input type="button" name="textbox<?php echo $ii?>" onClick="javascript:incre(this.name,'textboxroomnum<?php echo $ii;?>');" style="width:35px;" value=">>>"></div></div></fieldset></td></tr><?php$ii++;}//session all needed information$_SESSION['sdate'] = $startdate;$_SESSION['edate'] = $enddate;$_SESSION['numguest'] = $numguest;$_SESSION['numkids'] = $numkids;$_SESSION['dateDiff'] = $dateDiff;

Online Booking System for Camp Holiday Resort and Recreation Area 243

Page 244: Chapters

//$_SESSION['Rate'] = $row2;

?><tr><td><p><span class="button-wrapper"><span class="l"> </span><span class="r"> </span>

<input type="button" name="test" class="button" value="Book Now!" onclick="javascript:get_check_value();">

</span></p></td></tr></table><?php}else{?><div align="center" style="margin-top:100px;">NO ROOMS AVAILABLE IN THIS RANGE OF DATE.</div><?php}?>

/*-------------------------------- seminarpackages.php ------------------------------------------- */<?php include("header.php"); ?>

<div class="content-layout"><div class="content-layout-row"><?php include("sidebar.php"); ?><div id="bodycontent"> <h2 class="postheader" style="margin:50px;"> Live-In Seminar Packages </h2><center><img src="img/packages-seminar.jpg" width="400" height="300" /></center><div style="padding:50px;"><ul><li>Php 1,505.00 net/pax - Inclusive of 3 meals and 2 snacks w/ room accommodation<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;( TRIPLE SHARING ). ( FOR HOTEL ROOMS APPLIED )</li><br /><li>TOTAL NUMBER OF ROOMS AVAILABLE:<br /><br /><div align="center">

Online Booking System for Camp Holiday Resort and Recreation Area 244

Page 245: Chapters

<table><tr><td>Hotel Rooms</td><td>&nbsp;</td><td>22</td></tr><tr><td>Air-conditioned Cottages</td><td>&nbsp;</td><td>12</td></tr><tr><td></td><td></td><td>---</td></tr><tr><td align="right">Total</td><td></td><td>34</td></tr></table></div></li><br /><li>FACILITIES TO BE PROVIDED:<br /><br /> <div align="center"><table><tr><td>-</td><td>Basic Sound System</td></tr><tr><td>-</td><td>Microphones</td></tr><tr><td>-</td><td>White Board w/ Marker</td></tr><tr><td>-</td><td>Welcome Streamer or Backdrop - Tarpaulin(1)</td></tr></table></div></li></ul>

Online Booking System for Camp Holiday Resort and Recreation Area 245

Page 246: Chapters

</div></div></div></div>

<?php include("footer.php"); ?>

/*-------------------------------- sidebar.php ------------------------------------------------------- */<div class="layout-cell sidebar1"><div class="vmenublock"><div class="vmenublock-body"><div id='clockDiv'></div> <div align="center" id="header">Reservation</div><div class="vmenublockcontent"><div class="vmenublockcontent-body"><!-- block-content --><div id="datepicker"><ol><div> <label for="start-date">Arrival date:</label><input name="start-date" id="start-date" class="date-pick dp-applied" onClick="javascript:dpDisplay(this);" readonly></div><div><label for="end-date">Departure date:</label><input name="end-date" id="end-date" class="date-pick dp-applied" onClick="javascript:dpDisplay(this);" readonly></div> <label>Number of Adult(s): </label><select name="no_guest" id="no_guest" style="width:50px;"><?php $i=1;while($i<=4){?><option><?php echo $i;?></option><?php$i++;}?></select> <label>Number of Children: </label><select name="no_kids" id="no_kids" style="width:50px;"><?php$i=0;while($i<=4){?><option><?php echo $i;?></option><?php$i++;}?>

Online Booking System for Camp Holiday Resort and Recreation Area 246

Page 247: Chapters

</select> <?php $startdate = $_POST["start-date"]; ?><br /><br /><br /><input type="button" name="checkval" id="checkval" class="button" value="CHECK AVAILABILITY" onclick="javascript:ajaxpage('selectaccommodation.php','bodycontent');" /></ol></div></div></div><br /><?php//submit loginformif($_GET['login']==1){?><div align="center" id="header">Guest Info</div><span style="float:right;"><a href="logout.php">logout</a></span>WELCOME<?php echo $_SESSION['name']; ?><br /><br /> <a href="#bodycontent">Review</a><?php } else { ?><br /><div class="vmenublockcontent"><div class="vmenublockcontent-body"><div id="logindiv"> <?php loginguest('btnlogin'); ?> <p id="form-login-lang" style="clear: both;">&nbsp;</p> </div></div></div><?php } ?> <div align="center" id="header">Davao Sales Office</div><div class="vmenublockcontent"><div class="vmenublockcontent-body"><!-- block-content --><div style="margin-top: 20px; margin-bottom: 20px;"> <b>SAMCO Bldg.,F. Bangoy St.,<br /> Davao City</b><br />Tel no. (082) 304-6483<br />Cellphone no. 0918-9354278<br />Email: <a href="https://mail.google.com/mail/?shva=1#compose">[email protected]</a><br /></div> <!-- /block-content --></div></div>

<br />

Online Booking System for Camp Holiday Resort and Recreation Area 247

Page 248: Chapters

<div align="center" id="header">Resort</div><div class="vmenublockcontent"><div class="vmenublockcontent-body"><!-- block-content --><div style="margin-top: 20px;"><b>Kinawitnon Babak District,</b><br />Island Ganden City of Samal<br />Tel no. 303-3294<br /></div> <!-- /block-content --></div></div></div></div></div>

<!--/SIDEBAR--><!--clock--><script type="text/javascript">

function clock() {var offsetTime = +8var now = new Date();var stime = now.getTime()+ (now.getTimezoneOffset() * 60000)+ offsetTime * 3600000var PhilTime = new Date(now);//var sdays = PhilTime.getDay();var mnths = PhilTime.getMonth();//var scs = PhilTime.getSeconds();var hr24 = PhilTime.getHours();var hrs = PhilTime.getHours();var mins = PhilTime.getMinutes();var ampm = "";

var months = new Array();months[0] = "January";months[1] = "Feruary";months[2] = "March";months[3] = "April";months[4] = "May";months[5] = "June";months[6] = "July";months[7] = "August";months[8] = "September";months[9] = "October";months[10] = "November";months[11] = "December";

Online Booking System for Camp Holiday Resort and Recreation Area 248

Page 249: Chapters

/*if(scs<10){scs = "0"+scs;}*/if(hr24<=12){ampm = "AM"}else{ampm = "PM"}if(hr24>=12){hrs = hrs-12;}if(hr24==0){hrs = 12;}if(hrs<10){hrs = "0"+hrs;}if(mins<10){mins = "0"+mins;}

var outStr = PhilTime.getDate()+' '+months[mnths]+' '+PhilTime.getFullYear()+' '+hrs+':'+mins+ampm;document.getElementById('clockDiv').innerHTML='PH Time, ' +outStr;setTimeout('clock()',1000);

}clock();</script>

/*-------------------------------- validator.php ----------------------------------------------------- */<?phpinclude("header.php");?><form class="cmxform" name="orderform" id="orderform" method="post"><div class="content-layout"><div class="content-layout-row"><?phpinclude("sidebar.php");?><div id="bodycontent"><img src="images/flashhere.png" /><div class="cleared"></div><div class="content-layout overview-table"><div class="content-layout-row"><div class="layout-cell"><div class="overview-table-inner">

Online Booking System for Camp Holiday Resort and Recreation Area 249

Page 250: Chapters

<h4>Welcome to Camp Holiday Resort</h4>

<blockquote><p>&#8220;About Camp Holiday Resort and Recreation Area here!&#8221;<br />-Gian Kristoffer Enrique</p></blockquote></div></div><div class="layout-cell"><div class="overview-table-inner"></div></div></div></div></div></div></div></form><?phpif($_GET['merchant_return_link'] != ''){echo "<script>alert('Thank You for staying with us! We hope to welcome you back soon.');</script>";echo "<meta content='0;action.php?rel=submitguest' http-equiv='refresh' />";}else{echo "<meta content='0;index.php' http-equiv='refresh' />";}include("footer.php");?>

SURVEY QUESTIONNAIRE

Online Booking System for Camp Holiday Resort and Recreation Area 250

Page 251: Chapters

Figure 4.3.4 Survey Questionnaire

Online Booking System for Camp Holiday Resort and Recreation Area 251

Page 252: Chapters

Figure 4.3.5 Survey Questionnaire

Online Booking System for Camp Holiday Resort and Recreation Area 252

Page 253: Chapters

Attached Proof/Basis for computation

Greetings!

We thank you for giving us this opportunity of submitting a proposal on our meal & room rates for your reference.

We look forward to extending our services to you.

Hereunder are the best rates we can offer:

I. ROOM RATES:

Type of Room Promo Rate Published Rate

________________________________________________________________________

Hotel Guestrooms P 1,500.00/night P2,000/night

(Twin Sharing)

Air-conditioned Cottages P 1,800.00/night P2,500/night

(6units Twin Sharing /6units Matrimonial)

Online Booking System for Camp Holiday Resort and Recreation Area 253

Page 254: Chapters

Day Tour (ADULT) P 80.00/pax net

Overnight (ADULT) P 150.00/pax net

(Less 10% for a group of 100)

____________________________________________________________________

Each Hotel room and Air-conditioned cottages is good for 2, maximum of 3 persons per room.

Extra person with beddings: P 300.00/pax

Total Number of rooms available:

Hotel Rooms = 22

Air-conditioned Cottages = 12

Total: 34

Online Booking System for Camp Holiday Resort and Recreation Area 254

Page 255: Chapters

II. MEAL RATES:

Breakfast (Plated) = P 165.00 – 250.00 net/pax

Breakfast (Buffet) = P 230.00 & P 190.00 net/pax

Lunch and Dinner Buffet  = P 260.00, P 270.00 & P 280.00 net/pax

AM & PM Snacks = P 90.00 & P 120.00 net/pax

(Please see attached menu for your reference.)

III. VENUE FOR FUNCTION

Function Hall Capacity (Whole)

600 = Theater type seating

450 = Classroom Seating

Function Hall Capacity (Half)

300 = Theater type seating

225 = Classroom Seating

Function Hall Rental

Whole = Php 50,000 for first 8 hours

Online Booking System for Camp Holiday Resort and Recreation Area 255

Page 256: Chapters

Php   5,000 for every succeeding hour

Half = Php 25,000 for first 8 hours

Php   5,000 for every succeeding hour

Function Hall w/ Catering

Whole = 200 pax minimum

Half =   50 pax minimum

IV. AMENITIES TO BE PROVIDED:

Basic Sound System Podium & Microphone Whiteboard w/ marker

Online Booking System for Camp Holiday Resort and Recreation Area 256

Page 257: Chapters

Corkages & other charges :

Lechon Baboy Corkage = P 300.00/lechon

Lechon Baka Corkage    = P 800.00/lechon          

Additional Dish    = P 250.00/dish (maximum of 3 dishes only)

Additional Softdrinks     = P 25.00/bottle  (1.5L)

Camping Tents    = P200.00/tent

V. Terms & Conditions:

A. All prices quoted above are inclusive of government tax.B. Deposit – A 50% deposit will be required upon signing of contract fifteen (15) days 

prior to the event.  Reservation will not be confirmed unless the contract is signed by both parties and the required deposit is made.

C. Adjustments if any; either by the client, will have to be made at least seven (7) days before the scheduled reservation.

D. Cancellation – Any cancellation of reservation should be made at least fifteen (15) days before the scheduled reservation.   If cancellation is made after the specified time,   50%  of   the  deposit  will   be   fortified   to   cover   for   the   incidental   expenses incurred.

E. No Show – If the reservation is cancelled without any notice given, the resort will have the right to charge the client the total cost of reservation made.

F. Full   Payment   –   Full   payment   of   account   should   be   made   immediately   upon completion of services after the function; in cash.

G. Any additional expenses incurred during the function will be on a pax account basis.

Should you find our proposal to your satisfaction, you may call us @ Tel. # 303-3294 or 304-6483.

We are looking forward to rendering you our services.

Thank you.

Online Booking System for Camp Holiday Resort and Recreation Area 257

Page 258: Chapters

LUNCH OR DINNER BUFFET

Php 280.00 net/pax

Menu A.

Salad : Chicken Macaroni Salad

Main Course : Grilled Pork Chop 

  Spicy Soy Chicken

  Sweet & Sour Fish Fillet

                Plain Rice

Dessert : Butterscotch

……………… w/ Softdrinks in bottle

Menu B.

Salad : Bacon, Lettuce, Tomato & Cheese

Main Course : Fish Fillet w/ Tartar Sauce

  Sweet & Sour Pork

  Seafood Chopsuey Guisado

  Plain Rice

Dessert : Fresh Fruits

……………… w/ Softdrinks in bottle

Online Booking System for Camp Holiday Resort and Recreation Area 258

Page 259: Chapters

Menu C.

Salad : Macaroni Salad

Main Course : Pork Hawaiian

   Kalderetang Baka

   Chicken Curry

   Plain Rice

Dessert :  Brownies

……………… w/ Softdrinks in bottle

Menu D.

Salad : Fresh Guso 

Main Course : Pork Binagoongan

  Chopsuey Guisado

  Sugbanok ( broiler )

  Plain Rice

Dessert : Mocha Chiffon Cake

……………… w/ Softdrinks in bottle

Online Booking System for Camp Holiday Resort and Recreation Area 259

Page 260: Chapters

LUNCH OR DINNER BUFFET

Php 270.00 net/pax

Menu A:

Soup : Sinigang na Bangus

Salad : Cucumber Salad w/ Salted Egg

Main Course : Inihaw na Panga

  Inihaw na Pork Tiyan

  Chicken B-B-Q

  Plain Rice

Dessert : Fresh Fruits in Platter w/ Cream

………………. w/ Softdrinks in bottle

Menu B.

Soup : Clam Soup

Salad : Fresh Lato Salad

Main Course : Inihaw na Pusit

  Inihaw na Tanguige

  Pork B-B-Q

  Plain Rice

Dessert : Maja Mais

……………… w/ Softdrinks in bottle

Online Booking System for Camp Holiday Resort and Recreation Area 260

Page 261: Chapters

Menu C.

Soup : Sinigang na Hipon

Appetizer : Kinilaw

Main Course  : Kare-kare w/ bago-ong

  Inihaw na Tuna Belly

  Fried Lumpia

  Plain Rice

Dessert : Tropical Fruit Salad

……………… w/ Softdrinks in bottle

Online Booking System for Camp Holiday Resort and Recreation Area 261

Page 262: Chapters

LUNCH OR DINNER BUFFETPhp 260.00 net/pax

Menu ASalad : Macaroni SaladMain Course : Chicken Pastel

  Breaded Fish w/ Tartar Sauce  Bam-I  Plain Rice

Dessert : Maja Mais……………………… w/ Softdrinks in bottle

Menu BSalad : Coleslaw SaladMain Course : Chicken Mexicaine

  Sweet & Sour Fish Fillet  Pancit Canton  Plain Rice

Dessert : Fresh Fruit in Platter……………………… w/ Softdrinks in bottle

Menu CSalad : Mimosa SaladMain Course : Chicken Ala Queen

  Fish Fillet w/ Tartar Sauce  Sotanghon Guisado  Plain Rice

Dessert : Jellied Rice……………………… w/ Softdrinks in bottle

Menu DSalad : Macaroni SaladMain Dish : Pan Fried Chicken Piccata

  Sweet & Sour Fish Fillet  Bam-I  Plain Rice

Dessert : Fruit Custard……………………… w/ Softdrinks in bottle

Online Booking System for Camp Holiday Resort and Recreation Area 262

Page 263: Chapters

BREAKFAST (BUFFET)

Php 230.00 net/pax

Menu A

Fresh Juices : Mango Juice

  Orange Juice

Fresh Fruits : Watermelon

  Pineapple

  Papaya

Breads                : Soft Rolls w/ Butter & preserves

Main Course : Breaded Sweet & Sour fish

  Chicken Fricasse

  Egg Omelet

  Garlic Rice

  …………….…………………….  Hot Coffee or Tea

Menu B

Fresh Juices : Mango Juice

  Orange Juice

Fresh Fruits : Watermelon

  Pineapple

  Papaya

Online Booking System for Camp Holiday Resort and Recreation Area 263

Page 264: Chapters

Breads : Soft Rolls with Butter & preserves

Main Course : Breaded Fish Finger

  Chicken Adobo

  Spanish omelet

  Garlic Rice

…………..……………………….  Hot Coffee or Tea

Menu C

Fresh Juices : Mango Juice

  Orange Juice

Fresh Fruits : Watermelon

  Pineapple

  Papaya

Breads                : Soft Rolls with Butter & preserves

Main course : Chicken Teriyaki

  Fried Fish Fillet w/ Tartar Sauce

  Shrimp Omelet

  Garlic Rice

              …………………………………….. Hot Coffee or Tea

Online Booking System for Camp Holiday Resort and Recreation Area 264

Page 265: Chapters

BREAKFAST (BUFFET)

Php 190.00 net/pax

Menu A

Fresh Juices: Mango Juice

Orange Juice

Fresh Fruits: Watermelon

Papaya

Breads: Toasted Bread w/ butter & preserves

Main Course: Chicken Fricasse

Egg Omelet

Garlic Rice

               …………………………………… Served with coffee

Menu B

Fresh Juices: Mango Juice

Orange Juice

Fresh Fruits: Watermelon

Online Booking System for Camp Holiday Resort and Recreation Area 265

Page 266: Chapters

Pineapple

Breads: Toasted Bread w/ butter & preserves

Main Course: Breaded Fish Finger

Spanish omelet

Garlic Rice

               ………………………………….. Served with coffee

Menu C

Fresh Juices: Mango Juice

Orange Juice

Fresh Fruits: Watermelon

Pineapple

Breads: Toasted Bread w/ butter & preserves

Main course: Chicken Teriyaki

Shrimp Omelet

Garlic Rice

               …………………………………… Served with coffee

Online Booking System for Camp Holiday Resort and Recreation Area 266

Page 267: Chapters

BREAKFAST (PLATED)

AMERICAN BREAKFAST @ P 195.00

Chilled fruit juice or Fresh Fruits in season

Fresh eggs cooked to your style with a choice of Ham, Bacon or Sausage

with Breakfast Rolls or Toasted Bread served with Hot Coffee or Tea

CAMP SPECIALBREAKFAST @ P 250.00

Chilled Fruit Juice or Fresh Fruit in season

Two (2) Fresh Eggs cooked to your style with Breakfast Steak & Bacon

with French Fries sidings & Breakfast Rolls or Toasted Bread served with Hot Coffee or Tea

CONTINENTAL BREAKFAST @ P 150.00

Chilled Fruit Juice of Fresh Fruit in season

Assorted Bread Rolls or Toasted Bread with Jam, Marmalade and Butter

served with Hot Coffee or Tea

HEARTY FILIPINO BREAKFAST @ P 240.00

Chilled Fruit Juice or Fresh Fruit in season

Two (2) Fresh Eggs cooked to your style with Choices of Tocino, Longganisa, Beef Tapa or Daing na Bangus with Garlic Rice and Atchara or Toasted Bread 

served with Hot Coffee or Tea

Online Booking System for Camp Holiday Resort and Recreation Area 267

Page 268: Chapters

OTHERS

Hot Oatmeal……………………………… P 35.00

Pancake w/ Syrup………………………… P 88.00

Egg Omelet……………………………... P 40.00

Egg Omelet w/ Ham & cheese…………. P 60.00

Egg Omelet w/ Bacon & Mushroom…….. P 65.00

Cornflakes w/ Sliced Banana…………….. P 67.00

Pork Tocino………………………………. P 67.00

Longganisa……………………………….. P 67.00

Beef Tapa………………………………… P125.00

Bacon…………………………………….. P120.00

Corned Beef……………………………… P 67.00

Sausage…………………………………… P 60.00

Daing na Bangus………………………….. P100.00

Online Booking System for Camp Holiday Resort and Recreation Area 268

Page 269: Chapters

Plated Snacks

Menu AA.M. Snacks (P90/pax) Special Mamon

Coffee or Tea

P.M. Snacks (P90/pax) Beef or Chicken RollSoftdrinks

Menu BA.M. Snacks (P90/pax) Banana Muffin

Iced Tea

P.M. Snacks (P90/pax) Pork or Chicken SiopaoSoftdrinks

Menu CA.M. Snacks (P90/pax) Special Mamon

Iced Tea

P.M. Snacks (P90/pax) Binignit (Guinataan)Softdrinks

Menu AA.M. Snacks (P120/pax) Tuna Sandwich

Mango Juice

P.M. Snacks (P120/pax) Lasagna Al FornoSoftdrinks

Menu BA.M. Snacks (P120/pax) Cheese Pimiento Sandwich

Pineapple Juice

P.M. Snacks (P120/pax) Baked MacaroniSoftdrinks

Menu CA.M. Snacks (P120/pax) Spaghetti Bolognese

Softdrinks

P.M. Snacks (P120/pax) Mini PizzaSoftdrinks / Coffee or Tea

Online Booking System for Camp Holiday Resort and Recreation Area 269

Page 270: Chapters

Gian Kristoffer D. Enrique

Address: El Rio Vista Village, Bacaca Road, Davao City

Contact No.: +639218239469

Email Add: [email protected]

PERSONAL INFORMATION

Birthday : June 4,1987

Age : 23 years old

Civil Status : Single

Father’s Name : Roland B. Enrique Sr.

Occupation : Qualimed Pharma Regional Manager (Visayas,Mindanao)

Mother’s Name : Maria Evelyn D. Enrique

Occupation : House Wife

EDUCATIONAL BACKGROUND

Primary : Assumption College of Davao

J.P. Cabaguio Avenue, Davao City

1996 -2000

Secondary : Assumption College of Davao

J.P. Cabaguio Avenue, Davao City

2000 -2004

Tertiary : System Technology Institute (STI College Davao)

# 506 Lim Bldg., J.P. Laurel Ave., Acacia Corner, Davao City

Bachelor of Science in Information Technology (BSIT)

Online Booking System for Camp Holiday Resort and Recreation Area 270

Page 271: Chapters

2011 – Present

Leslie Junn B. Gulayan

Address: Nova Tierra Lanang Davao City

Contact No.: +639993507961

Email Add: [email protected]

PERSONAL INFORMATION

Birthday : June 20,1990

Age : 20 years old

Civil Status : Single

Father’s Name : Agripino Gulayan Jr.

Occupation : Barangay Councilor

Mother’s Name : Glory Jane Gulayan

Occupation : House Wife

EDUCATIONAL BACKGROUND

Primary : San Juan Elementary School

R.Castillo St. Agdao Davao City

2003 -2004

Secondary : Holy Cross of Agdao

Agdao Davao City

2006 -2007

Tertiary : System Technology Institute (STI College Davao)

# 506 Lim Bldg., J.P. Laurel Ave., Acacia Corner, Davao City

Bachelor of Science in Information Technology (BSIT)

Online Booking System for Camp Holiday Resort and Recreation Area 271

Page 272: Chapters

2011 – Present

Johanz Cyrille C. Tan

Address: 87-107 Arellano Extension, Davao City

Contact No.: +639185195960

Email Add: [email protected]

PERSONAL INFORMATION

Birthday : March 6, 1983

Age : 28 years old

Civil Status : Single

Father’s Name : Ludevico M. Tan

Occupation : Deceased

Mother’s Name : Agripina C. Tan

Occupation : Teacher

EDUCATIONAL BACKGROUND

Primary : Davao City Special School

SPED Bangkal, Davao City

1995 - 1996

Secondary : Davao City National High School

F. Torres Street, Davao City

1999 - 2000

Tertiary : System Technology Institute (STI College Davao)

# 506 Lim Bldg., J.P. Laurel Ave., Acacia Corner, Davao City

Bachelor of Science in Information Technology (BSIT)

2011 – Present

Online Booking System for Camp Holiday Resort and Recreation Area 272