//Download the Program From :- HERE
// Program Created By Mahak :)
//*********************************************
// HEADER FILES
//**********************************************
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<dos.h>
#include<string.h>
#include<ctype.h>
#include<iomanip.h>
#include<process.h>
#include<graphics.h>
void menu();
//*********************************************
// Introduction Loop
//**********************************************
void intro()
{
clrscr();
int driver,mode;
driver=DETECT;
initgraph(&driver,&mode,"c:\\turboc3\\bgi");
setbkcolor(4);
setcolor(7);
settextstyle(3,0,5);
cout<<"\n\n\n\n\n\n";
for(int i=0;i<80;i++)
{
cout<<"-";
delay(20);
}
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
for(i=0;i<80;i++)
{
cout<<"-";
delay(20);
}
outtextxy(220,150,"Welcome");
outtextxy(250,205,"to our");
outtextxy(225,260,"Program");
cout<<"\n\n\n\n\n\n\t\t\t Press a key to continue....";
getch();
closegraph();
}
//*********************************************
// Loading Loop
//**********************************************
void load2()
{
clrscr();
int driver,mode;
driver=DETECT;
initgraph(&driver,&mode,"c:\\turboc3\\bgi");
for(int i=0,j=600,a=0,b=600;i<300;i++,j--,a++,b--)
{
outtextxy(i,400,"|");
outtextxy(j,400,"|");
outtextxy(a,360,"|");
outtextxy(b,360,"|");
delay(3);
}
for(int q=361,p=361;q<400;q++,p++)
{
outtextxy(0,q,"l");
outtextxy(599,p,"l");
delay(3);
}
for(int m=0,n=600;m<230;m++,n--)
{
outtextxy(m,380,"|");
outtextxy(n,380,"|");
delay(3);
}
setcolor(RED);
outtextxy(240,380," L");
delay(250);
outtextxy(255,380," O");
delay(250);
outtextxy(270,380," A");
delay(250);
outtextxy(285,380," D");
delay(250);
outtextxy(300,380," I");
delay(250);
outtextxy(315,380," N");
delay(250);
outtextxy(330,380," G");
delay(250);
outtextxy(345,380," .");
delay(250);
outtextxy(360,380," .");
delay(250);
closegraph();
clrscr();
}
//*********************************************
// Loop to Select Airlines
//**********************************************
void airlines()
{
clrscr();
cout<<"\n\n\t\t\tSelect your preferred Airlines\n\n";
cout<<"\n\t\t *---------------------------------------*";
cout<<"\n\t\t | AIRLINES |";
cout<<"\n\t\t |---------------------------------------|";
cout<<"\n\t\t | | |";
cout<<"\n\t\t | Emirates | Etihad |";
cout<<"\n\t\t | Jet Airways | Gulf Air |";
cout<<"\n\t\t | Qatar Airways | Air India |";
cout<<"\n\t\t | Air Arabia | British Airways |";
cout<<"\n\t\t | Go Indigo | Indian Airlines |";
cout<<"\n\t\t | Kingfisher | Air Canada |";
cout<<"\n\t\t | | |";
cout<<"\n\t\t *---------------------------------------*";
}
//*********************************************
// Saving Loop
//**********************************************
void saving()
{
char save[]={'S','A','V','I','N','G','.','.','.','.','.','.'};
cout<<"\n\n\n\n\n";
cout<<"\t\t\t";
for(int i=0;i<12;i++)
{ cout<<save[i]<<" ";
delay(300);
}
}
//*********************************************
// Display all Tickets Loop
//**********************************************
void displayfor1()
{
clrscr();
cout<<"\n\t\t\t Displaying 1st Booked Ticket\n ";
cout<<"\n\t*------------------------------------------------*";
cout<<"\n\t| Name : Mahak |";
cout<<"\n\t| Nationality : Indian |";
cout<<"\n\t| Country of Residence : UAE |";
cout<<"\n\t| Email Address : mahak@outlook.com |";
cout<<"\n\t| Mobile Number : 055-8356885 |";
cout<<"\n\t| Reservation Number : *** |";
cout<<"\n\t| Airlines : Etihad |";
cout<<"\n\t| Departure City : Sharjah |";
cout<<"\n\t| Arrival City : Jaipur |";
cout<<"\n\t| Date of Departure : 26/11/201 |";
cout<<"\n\t| Departure Time : 17:30 |";
cout<<"\n\t| Arrival Time : 20:00 |";
cout<<"\n\t| Flight Class : First Class |";
cout<<"\n\t| Price : 1600 Dhs |";
cout<<"\n\t| Number of Stops : 0 Stops |";
cout<<"\n\t| Gate Number : 16 |";
cout<<"\n\t| Flight Code : G16098 |";
cout<<"\n\t| Seat Selected : A7 |";
cout<<"\n\t| Baggage Allocated : 30 KG |";
cout<<"\n\t| Ticket Status : Confirmed |";
cout<<"\n\t*------------------------------------------------*";
getch();
}
void displayfor2()
{
clrscr();
cout<<"\n\t\t\t Displaying 2nd Booked Ticket \n ";
cout<<"\n\t*------------------------------------------------*";
cout<<"\n\t| Name : Salik |";
cout<<"\n\t| Nationality : Indian |";
cout<<"\n\t| Country of Residence : UAE |";
cout<<"\n\t| Email Address : salik@gmail.com |";
cout<<"\n\t| Mobile Number : 055-7422563 |";
cout<<"\n\t| Reservation Number : *** |";
cout<<"\n\t| Airlines : Emirates |";
cout<<"\n\t| Departure City : Sharjah |";
cout<<"\n\t| Arrival City : Cochi |";
cout<<"\n\t| Date of Departure : 23/11/2012 |";
cout<<"\n\t| Departure Time : 14:45 |";
cout<<"\n\t| Arrival Time : 17:30 |";
cout<<"\n\t| Flight Class : Bussiness Class |";
cout<<"\n\t| Price : 1450 Dhs |";
cout<<"\n\t| Number of Stops : 0 Stops |";
cout<<"\n\t| Gate Number : 21 |";
cout<<"\n\t| Flight Code : G19021 |";
cout<<"\n\t| Seat Selected : E3 |";
cout<<"\n\t| Baggage Allocated : 20 KG |";
cout<<"\n\t| Ticket Status : Confirmed |";
cout<<"\n\t*------------------------------------------------*";
getch();
}
void displayfor3()
{
clrscr();
cout<<"\n\t\t\t Displaying 3rd Booked Ticket \n ";
cout<<"\n\t*------------------------------------------------*";
cout<<"\n\t| Name : Aaron |";
cout<<"\n\t| Nationality : Indian |";
cout<<"\n\t| Country of Residence : UAE |";
cout<<"\n\t| Email Address : aaron@gmail.com |";
cout<<"\n\t| Mobile Number : 055-5425612 |";
cout<<"\n\t| Reservation Number : *** |";
cout<<"\n\t| Airlines : British Airways |";
cout<<"\n\t| Departure City : Dubai |";
cout<<"\n\t| Arrival City : Paris |";
cout<<"\n\t| Date of Departure : 30/11/2012 |";
cout<<"\n\t| Departure Time : 19:45 |";
cout<<"\n\t| Arrival Time : 23:30 |";
cout<<"\n\t| Flight Class : First Class |";
cout<<"\n\t| Price : 2450 Dhs |";
cout<<"\n\t| Number of Stops : 1 Stops |";
cout<<"\n\t| Gate Number : 20 |";
cout<<"\n\t| Flight Code : G17831 |";
cout<<"\n\t| Seat Selected : G6 |";
cout<<"\n\t| Baggage Allocated : 30 KG |";
cout<<"\n\t| Ticket Status : Pending |";
cout<<"\n\t*------------------------------------------------*";
getch();
}
void displayfor4()
{
clrscr();
cout<<"\n\t\t\t Displaying 4th Booked Ticket \n ";
cout<<"\n\t*------------------------------------------------*";
cout<<"\n\t| Name : Sharose |";
cout<<"\n\t| Nationality : Indian |";
cout<<"\n\t| Country of Residence : UAE |";
cout<<"\n\t| Email Address : shahrose@gmail.com |";
cout<<"\n\t| Mobile Number : 055-6596775 |";
cout<<"\n\t| Reservation Number : *** |";
cout<<"\n\t| Airlines : Jet Airways |";
cout<<"\n\t| Departure City : Dubai |";
cout<<"\n\t| Arrival City : Mexico |";
cout<<"\n\t| Date of Departure : 27/11/2012 |";
cout<<"\n\t| Departure Time : 12:45 |";
cout<<"\n\t| Arrival Time : 17:30 |";
cout<<"\n\t| Flight Class : First Class |";
cout<<"\n\t| Price : 2300 Dhs |";
cout<<"\n\t| Number of Stops : 1 Stops |";
cout<<"\n\t| Gate Number : 15 |";
cout<<"\n\t| Flight Code : G19327 |";
cout<<"\n\t| Seat Selected : D2 |";
cout<<"\n\t| Baggage Allocated : 40 KG |";
cout<<"\n\t| Ticket Status : Confirmed |";
cout<<"\n\t*------------------------------------------------*";
getch();
}
void displayfor5()
{
clrscr();
cout<<"\n\t\t\t Displaying 5th Booked Ticket \n ";
cout<<"\n\t*------------------------------------------------*";
cout<<"\n\t| Name : Praise |";
cout<<"\n\t| Nationality : Indian |";
cout<<"\n\t| Country of Residence : UAE |";
cout<<"\n\t| Email Address : wintercool_96@..com |";
cout<<"\n\t| Mobile Number : 055-4523761 |";
cout<<"\n\t| Reservation Number : *** |";
cout<<"\n\t| Airlines : Go Indigo |";
cout<<"\n\t| Departure City : Sharjah |";
cout<<"\n\t| Arrival City : Cochi |";
cout<<"\n\t| Date of Departure : 21/11/2012 |";
cout<<"\n\t| Departure Time : 15:45 |";
cout<<"\n\t| Arrival Time : 18:30 |";
cout<<"\n\t| Flight Class : Economy Class |";
cout<<"\n\t| Price : 850 Dhs |";
cout<<"\n\t| Number of Stops : 0 Stops |";
cout<<"\n\t| Gate Number : 17 |";
cout<<"\n\t| Flight Code : G16021 |";
cout<<"\n\t| Seat Selected : F3 |";
cout<<"\n\t| Ticket Status : Confirmed |";
cout<<"\n\t| Baggage Allocated : 30 KG |";
cout<<"\n\t*------------------------------------------------*";
getch();
}
void displayfor6()
{
clrscr();
cout<<"\n\t\t\t Displaying 6th Booked Ticket \n ";
cout<<"\n\t*------------------------------------------------*";
cout<<"\n\t| Name : Gokul |";
cout<<"\n\t| Nationality : Indian |";
cout<<"\n\t| Country of Residence : UAE |";
cout<<"\n\t| Email Address : Gokul@kiddo.com |";
cout<<"\n\t| Mobile Number : 055-5547891 |";
cout<<"\n\t| Reservation Number : *** |";
cout<<"\n\t| Airlines : Air India |";
cout<<"\n\t| Departure City : Sharjah |";
cout<<"\n\t| Arrival City : Uganda |";
cout<<"\n\t| Date of Departure : 27/11/2012 |";
cout<<"\n\t| Departure Time : 15:45 |";
cout<<"\n\t| Arrival Time : 19:30 |";
cout<<"\n\t| Flight Class : Economy Class |";
cout<<"\n\t| Price : 850 Dhs |";
cout<<"\n\t| Number of Stops : 2 Stops |";
cout<<"\n\t| Gate Number : 12 |";
cout<<"\n\t| Flight Code : G19221 |";
cout<<"\n\t| Seat Selected : B3 |";
cout<<"\n\t| Ticket Status : Pending |";
cout<<"\n\t| Baggage Allocated : 30 KG |";
cout<<"\n\t*------------------------------------------------*";
getch();
}
void displayfor7()
{
clrscr();
cout<<"\n\t\t\t Displaying 7th Booked Ticket \n ";
cout<<"\n\t*------------------------------------------------*";
cout<<"\n\t| Name : Vikas |";
cout<<"\n\t| Nationality : Indian |";
cout<<"\n\t| Country of Residence : UAE |";
cout<<"\n\t| Email Address : viku@coolmail.com |";
cout<<"\n\t| Mobile Number : 055-9997771 |";
cout<<"\n\t| Reservation Number : *** |";
cout<<"\n\t| Airlines : Etihad |";
cout<<"\n\t| Departure City : Dubai |";
cout<<"\n\t| Arrival City : Abu Dhabi |";
cout<<"\n\t| Date of Departure : 29/11/2012 |";
cout<<"\n\t| Departure Time : 15:45 |";
cout<<"\n\t| Arrival Time : 16:30 |";
cout<<"\n\t| Flight Class : First Class |";
cout<<"\n\t| Price : 350 Dhs |";
cout<<"\n\t| Number of Stops : 0 Stops |";
cout<<"\n\t| Gate Number : 11 |";
cout<<"\n\t| Flight Code : G12561 |";
cout<<"\n\t| Seat Selected : A4 |";
cout<<"\n\t| Ticket Status : Confirmed |";
cout<<"\n\t| Baggage Allocated : 20 KG |";
cout<<"\n\t*------------------------------------------------*";
getch();
}
void displayfor8()
{
clrscr();
cout<<"\n\t\t\t Displaying 8th Booked Ticket \n ";
cout<<"\n\t*------------------------------------------------*";
cout<<"\n\t| Name : Sharan |";
cout<<"\n\t| Nationality : Indian |";
cout<<"\n\t| Country of Residence : UAE |";
cout<<"\n\t| Email Address : sharan@96.com |";
cout<<"\n\t| Mobile Number : 055-4986786 |";
cout<<"\n\t| Reservation Number : *** |";
cout<<"\n\t| Airlines : Emirates |";
cout<<"\n\t| Departure City : Sharjah |";
cout<<"\n\t| Arrival City : Hyderabad |";
cout<<"\n\t| Date of Departure : 23/11/2012 |";
cout<<"\n\t| Departure Time : 15:45 |";
cout<<"\n\t| Arrival Time : 18:30 |";
cout<<"\n\t| Flight Class : Bussiness Class |";
cout<<"\n\t| Price : 1850 Dhs |";
cout<<"\n\t| Number of Stops : 0 Stops |";
cout<<"\n\t| Gate Number : 19 |";
cout<<"\n\t| Flight Code : G16729 |";
cout<<"\n\t| Seat Selected : D2 |";
cout<<"\n\t| Ticket Status : Confirmed |";
cout<<"\n\t| Baggage Allocated : 30 KG |";
cout<<"\n\t*------------------------------------------------*";
getch();
}
//*********************************************
// Display Booked Tickets Loop
//**********************************************
void display_all_booked()
{
int n;
clrscr();
cout<<"\n\t *----------------------------------------------------*";
cout<<"\n\t | CODE| NAME | DESTINATION | FLIGHT |";
cout<<"\n\t |----------------------------------------------------|";
cout<<"\n\t | 1 | Mahak | Jaipur | Etihad |";
cout<<"\n\t | 2 | Salik | Bangalore | Emirates |";
cout<<"\n\t | 3 | Aaron | Paris | British Airways |";
cout<<"\n\t | 4 | Sharose | Mexico | Jet Airways |";
cout<<"\n\t | 5 | Praise | Cochi | Go Indigo |";
cout<<"\n\t | 6 | Gokul | Uganda | Air India |";
cout<<"\n\t | 7 | Vikas | Abu Dhabi | Ethihad |";
cout<<"\n\t | 8 | Sharan | Hyderabad | Emirates |";
cout<<"\n\t *----------------------------------------------------*";
cout<<"\n\n\n\tFor To Display the Complete Details of a Particular Customer ,";
cout<<"\n\n\n\t\t\tEnter the Customer Code : ";
cin>>n;
if(n==1)
displayfor1();
if(n==2)
displayfor2();
if(n==3)
displayfor3();
if(n==4)
displayfor4();
if(n==5)
displayfor5();
if(n==6)
displayfor6();
if(n==7)
displayfor7();
if(n==8)
displayfor8();
}
//*********************************************
// Modify Tickets Loop
//**********************************************
void modify_ticket()
{
clrscr();
int a;
char name[20];
int ticket_code;a=104;
cout<<"\n\n\n\t\t\tModify your Ticket";
cout<<"\n\n\n\t\tEnter your Name : ";
gets(name);
cout<<"\n\n\t\tEnter your Unique Ticket ID Code : ";
cin>>ticket_code;
cout<<"\n\n\n\t";
load2();
if(ticket_code==a)
{
clrscr();
int modify_ticket;
cout<<"\n\n\t\t What would you like to modify in your ticket?\n\n";
cout<<"\n\t\t\t*-----------------------------*";
cout<<"\n\t\t\t| Modify |";
cout<<"\n\t\t\t*-----------------------------*";
cout<<"\n\t\t\t| 1.Name |";
cout<<"\n\t\t\t| 2.Email |";
cout<<"\n\t\t\t| 3.Nationality |";
cout<<"\n\t\t\t| 4.Mobile Number |";
cout<<"\n\t\t\t| 5.Departure City |";
cout<<"\n\t\t\t| 6.Arrival City |";
cout<<"\n\t\t\t| 7.Date of Travel |";
cout<<"\n\t\t\t| 8.Flight Class |";
cout<<"\n\t\t\t| 9.Flight Code |";
cout<<"\n\t\t\t| 10.Seat Number |";
cout<<"\n\t\t\t| 11.Baggage Allowed |";
cout<<"\n\t\t\t*-----------------------------*";
cout<<"\n\n\t\tSelect a Option [Only Number] : ";
cin>>modify_ticket;
clrscr();
cout<<"\n\n\t\t";
switch(modify_ticket)
{
case 1 : char name[20];
cout<<"Enter the Modified Name : ";
gets(name);
saving();
cout<<"\n\n\t\tData Modified ! Thank you.";
break;
case 2 : char email[25];
cout<<"Enter the New Email : ";
gets(email);
saving();
cout<<"\n\n\t\tData Modified ! Thank you.";
break;
case 3 : char nationality[20];
cout<<"Enter the New Nationality : ";
gets(nationality);
saving();
cout<<"\n\n\t\tData Modified ! Thank you.";
break;
case 4 : char mobno[15];
cout<<"Enter the New Mobile Number : ";
gets(mobno);
saving();
cout<<"\n\n\t\tData Modified ! Thank you.";
break;
case 5 : char depcity[15];
cout<<"Enter the New Departure City : ";
gets(depcity);
saving();
cout<<"\n\n\t\tData Modified ! Thank you.";
break;
case 6 : char arvcity[15];
cout<<"Enter the New Arrival City : ";
gets(arvcity);
saving();
cout<<"\n\n\t\tData Modified ! Thank you.";
break;
case 7 : int month;
int year;
int day;
cout<<"Enter the Month [ Digits ]: ";
cin>>month;
cout<<"Enter the Day [ Digits ] : ";
cin>>day;
cout<<"Enter the Year : ";
cin>>year;
saving();
cout<<"\n\n\t\tData Modified ! Thank you.";
break;
case 8 : char fclass[15];
cout<<"Enter the New Selected Flight Class : ";
gets(fclass);
saving();
cout<<"\n\n\t\tData Modified ! Thank you.";
break;
case 9 : char fcode[15];
cout<<"Enter the New Flight Code : ";
gets(fcode);
saving();
cout<<"\n\n\t\tData Modified ! Thank you.";
break;
case 10 :char seat[5];
cout<<"Enter the New Seat Location : ";
gets(seat);
saving();
cout<<"\n\n\t\tData Modified ! Thank you.";
break;
case 11 :int baggage;
cout<<"Enter the New Baggage allowed : ";
cin>>baggage;
saving();
cout<<"\n\n\t\tData Modified ! Thank you.";
break;
default :cout<<"Please Select a Valid Option ! ";
saving();
cout<<"\n\n\n\n\t\t\tData Modified ! Thank you.";
break;
}
getch();
}
else
{
cout<<"\n\n\n\t\t\tWRONG TICKET CODE ";
getch();
}
}
//*********************************************
// Seat Selection Loop
//**********************************************
void seat_select()
{
clrscr();
cout<<"\n\n";
cout<<"\tPersonalized Seat Selection\n";
cout<<"\t\t\t\t\tSeats with ** are already taken.";
cout<<"\n\t\t\t\t ___ ";
cout<<"\n\t\t\t\t | E |";
cout<<"\n\t\t\t\t | X |";
cout<<"\n\t*-------------------------| I |-------------------------*";
cout<<"\n\t| A1 | ** | C1 | D1 | E1 | T | ** | G1 | H1 | I1 | J1 |";
cout<<"\n\t| ** | B2 | ** | ** | ** | | F2 | G2 | ** | ** | J2 |";
cout<<"\n\t| ** | ** | ** | D3 | E3 | | F3 | ** | ** | I3 | J3 |";
cout<<"\n\t| A4 | B4 | C4 | D4 | ** | | F4 | G4 | H4 | I4 | ** |";
cout<<"\n\t| |";
cout<<"\n\t| A B C D E F G H I J |";
cout<<"\n\t| |";
cout<<"\n\t| ** | ** | C5 | ** | ** | | ** | G5 | H5 | I5 | ** |";
cout<<"\n\t| A6 | B6 | C6 | ** | E6 | | F6 | ** | ** | ** | J6 |";
cout<<"\n\t| A7 | ** | ** | D7 | ** | | ** | ** | H7 | I7 | J7 |";
cout<<"\n\t| ** | B8 | C8 | D8 | E8 | E | F8 | G8 | ** | I8 | ** |";
cout<<"\n\t*-------------------------| X |-------------------------*";
cout<<"\n\t\t\t\t | I |";
cout<<"\n\t\t\t\t | T |";
cout<<"\n\t\t\t\t --- ";
}
//*********************************************
// Dash Loop for Better Output
//**********************************************
void dash_loop()
{
for(int i=0;i<62;i++)
{
cout<<"-";
delay(40);
}
}
//*********************************************
// Loading Loop
//**********************************************
void load()
{
clrscr();
int driver,mode;
driver=DETECT;
initgraph(&driver,&mode,"c:\\turboc3\\bgi");
for(int i=0,j=600,a=0,b=600;i<300;i++,j--,a++,b--)
{
outtextxy(i,400,"|");
outtextxy(j,400,"|");
outtextxy(a,360,"|");
outtextxy(b,360,"|");
delay(3);
}
for(int q=361,p=361;q<400;q++,p++)
{
outtextxy(0,q,"l");
outtextxy(599,p,"l");
delay(3);
}
for(int m=0,n=600;m<230;m++,n--)
{
outtextxy(m,380,"|");
outtextxy(n,380,"|");
delay(3);
}
setcolor(RED);
outtextxy(240,380," L");
delay(250);
outtextxy(255,380," O");
delay(250);
outtextxy(270,380," A");
delay(250);
outtextxy(285,380," D");
delay(250);
outtextxy(300,380," I");
delay(250);
outtextxy(315,380," N");
delay(250);
outtextxy(330,380," G");
delay(250);
outtextxy(345,380," .");
delay(250);
outtextxy(360,380," .");
delay(250);
closegraph();
clrscr();
}
//*********************************************
// Flight Time Selection Loop
//**********************************************
void select_time()
{
clrscr();
cout<<"\n\n\t\t Select your preferred Flight Timings\n";
cout<<"\n\t*----------------------------------------------------------*";
cout<<"\n\t| Flight | Departure | Arrival | Stops | Boarding Gate |";
cout<<"\n\t|------------------------------------------|---------------|";
cout<<"\n\t| G96043 | 01:00 | 04:00 | 0 | Gate 02 |";
cout<<"\n\t| G96056 | 03:00 | 16:00 | 2 | Gate 05 |";
cout<<"\n\t| G86057 | 02:00 | 06:00 | 1 | Gate 16 |";
cout<<"\n\t| G16143 | 06:00 | 09:00 | 0 | Gate 09 |";
cout<<"\n\t| G26243 | 15:00 | 18:00 | 0 | Gate 18 |";
cout<<"\n\t| G96443 | 18:00 | 23:00 | 1 | Gate 03 |";
cout<<"\n\t| G76043 | 24:00 | 04:00 | 1 | Gate 22 |";
cout<<"\n\t| G96044 | 12:00 | 15:00 | 0 | Gate 13 |";
cout<<"\n\t| G16353 | 18:00 | 22:00 | 1 | Gate 17 |";
cout<<"\n\t| G46043 | 22:00 | 01:00 | 0 | Gate 23 |";
cout<<"\n\t| G36437 | 04:00 | 07:00 | 0 | Gate 13 |";
cout<<"\n\t*----------------------------------------------------------*";
}
//*********************************************
// Contact Us Loop
//**********************************************
void contact_us()
{
clrscr();
int n;
cout<<"\n\n\t\t\t\tContact Us\n";
cout<<"\n\t\t*----------------------------------*";
cout<<"\n\t\t| Press 1 to contact by Email |";
cout<<"\n\t\t| Press 2 to contact by Mobile |";
cout<<"\n\t\t| Press 3 to contact by Facebook |";
cout<<"\n\t\t*----------------------------------*";
cout<<"\n\n\t\tYour Input = ";
cin>>n;
if(n==1)
cout<<"\n\n\t\t Reach us at Mahak@outlook.com / Mahak@gametosoft.com";
if(n==2)
cout<<"\n\n\t\t Reach us by calling on 055-8356885";
if(n==3)
cout<<"\n\n\t\t Option Disabled .Please Try again Later :P";
getch();
}
//*********************************************
// About Us Loop
//**********************************************
void about_us()
{
clrscr();
cout<<"\n\n";
cout<<"\n\t\t*------------------------------------------*";
cout<<"\n\t\t| About US |";
cout<<"\n\t\t|------------------------------------------|";
cout<<"\n\t\t| |";
cout<<"\n\t\t| Program Created by |";
cout<<"\n\t\t| |";
cout<<"\n\t\t| Mahak - Mahak@outlook.com |";
cout<<"\n\t\t| |";
cout<<"\n\t\t| |";
cout<<"\n\t\t| |";
cout<<"\n\t\t|------------------------------------------|";
cout<<"\n\t\t| |";
cout<<"\n\t\t| MSA Travels |";
cout<<"\n\t\t| |";
cout<<"\n\t\t|------------------------------------------|";
cout<<"\n\t\t| |";
cout<<"\n\t\t| THANK YOU |";
cout<<"\n\t\t| |";
cout<<"\n\t\t*------------------------------------------*";
getch();
}
//*********************************************
// Ticket ID Loop
//**********************************************
void ticket_id()
{
clrscr();
cout<<"\n\n\n\tThis is your Ticket ID - 104";
cout<<"\n\n\tIncase you want to cancel your ticket , This ID will be required ! ";
getch();
}
//*********************************************
// Cancel Ticket Loop
//**********************************************
void cancel_ticket()
{
clrscr();
char reason[100];
int ticket_id;
int a=104;
cout<<"\n\n\n\tIt's sad to see you cancel your booking with us";
cout<<"\n\n\tCould you just give us some info on why you are canceling the ticket ?";
cout<<"\n\tInput : ";
gets(reason);
cout<<"\n\n\tThanks for your valuable Input";
cout<<"\n\n\tPlease Enter your Unique Ticket ID to Cancel your Ticket ";
cout<<"\n\tInput = ";
cin>>ticket_id;
load();
if(ticket_id==a)
cout<<"\n\n\n\n\t\t*********TICKET CANCELLED**********";
else
cout<<"\n\n\n\t\tWrong Ticket ID";
getch();
}
//*********************************************
// Ticket Status Check Loop
//**********************************************
void status_check()
{
clrscr();
int ticket_id;
cout<<"\n\n\n\t\tEnter your Ticket ID to check your ticket's Status : ";
cin>>ticket_id;
cout<<"\n\n\n\t\t";
load();
if (ticket_id%2==0)
{
cout<<"\n\n\t\tThis Ticket has been Confirmed ! Thank you. ";
}
else
{
cout<<"\n\n\tYour Ticket is in the Pending queue. Please check again later.";
}
getch();
}
//*********************************************
// Payment Loop
//**********************************************
void payment()
{
clrscr();
int payment;
cout<<"\n\n\t\t\tSo Lets look into the Payment now.";
cout<<"\n\n\t Our Payment Server's are completely secure and protected.";
cout<<"\n\n\n\n\t\t\t Our Payment Options\n";
cout<<"\n\t\t\t*---------------------------*";
cout<<"\n\t\t\t| Code | Payment Option |";
cout<<"\n\t\t\t|---------------------------|";
cout<<"\n\t\t\t| 1 | Credit Card |";
cout<<"\n\t\t\t|---------------------------|";
cout<<"\n\t\t\t| 2 | Debit Card |";
cout<<"\n\t\t\t|---------------------------|";
cout<<"\n\t\t\t| 3 | Paypal |";
cout<<"\n\t\t\t*---------------------------*";
cout<<"\n\n\n\t\tEnter of the code from above : ";
cin>>payment;
switch(payment)
{
case 1 : clrscr();
char name[25];
char ccno[20];
char month[15];
char email[25];
int year;
int code;
cout<<"\n\n\tOkay , Lets take in your CC Info to process it.";
cout<<"\n\n\n\tEnter your Name : ";
gets(name);
cout<<"\n\n\tEnter the Credit Card Number [ 16 Digits ] : ";
gets(ccno);
cout<<"\n\n\tEnter the Month of the Credit Card's Expiry : ";
gets(month);
cout<<"\n\n\tEnter the Year of the Credit Card's Expiry : ";
cin>>year;
cout<<"\n\n\tEnter the 3 digit security code of the CC : ";
cin>>code;
cout<<"\n\n";
load();
clrscr();
cout<<"\n\n\n\n\n\n\n\n\t\t\tAuthentication Successful";
cout<<"\n\n\n\t\t\t Payment Successful";
cout<<"\n\n\n\n\tWe'll send you a copy of your details and ticket on your email";
cout<<"\n\n\tPlease Enter your Email Id : ";
gets(email);
cout<<"\n\n\tThank you";
break;
case 2 : char name1[25];
char ccno1[20];
char month1[15];
char email1[25];
int year1;
int code1;
clrscr();
cout<<"\n\n\tOkay , Lets take in your DB Info to process it.";
cout<<"\n\n\n\tEnter your Name : ";
gets(name1);
cout<<"\n\n\tEnter the Debit Card Number [ 16 Digits ] : ";
gets(ccno1);
cout<<"\n\n\tEnter the Month of the Debit Card's Expiry : ";
gets(month1);
cout<<"\n\n\tEnter the Year of the Debit Card's Expiry : ";
cin>>year1;
cout<<"\n\n\tEnter the 3 digit security code of the DB : ";
cin>>code1;
cout<<"\n\n";
load();
clrscr();
cout<<"\n\n\n\n\n\n\n\n\t\t\tAuthentication Successful";
cout<<"\n\n\n\t\t\t Payment Successful";
cout<<"\n\n\n\n\tWe'll send you a copy of your details and ticket on your email";
cout<<"\n\n\tPlease Enter your Email Id : ";
gets(email1);
cout<<"\n\n\tThank you";
break;
case 3 : clrscr();
char name2[25];
char email2[25];
char code2[20];
cout<<"\n\n\n\n\tThank you for choosing to play with Paypal";
cout<<"\n\n\tEnter your Name : ";
gets(name2);
cout<<"\n\n\tEnter the email id associated with Paypal : ";
gets(email2);
cout<<"\n\n\tSecurity Code : ";
gets(code2);
cout<<"\n\n";
load();
clrscr();
cout<<"\n\n\n\n\n\n\n\n\t\t\tAuthentication Successful";
cout<<"\n\n\n\t\t\t Payment Successful";
cout<<"\n\n\n\n\tWe'll send you a copy of your details \n\tand ticket on your email "<<email2;
cout<<"\n\n\tThank you";
break;
default :cout<<"\n\n\tEnter a valid payment method [ 1 / 2 / 3 ] ";
break;
}
getch();
}
//*********************************************
// Login System Loop
//**********************************************
void pass_check()
{
clrscr();
int n;
cout<<"\n\n\t\t\n\n\n";
cout<<"\n\t\t*--------------------------------------------*";
cout<<"\n\t\t| Login as ADMINISTRATOR - Press 1 |";
cout<<"\n\t\t| |";
cout<<"\n\t\t| Login as GUEST - Press 2 |";
cout<<"\n\t\t| |";
cout<<"\n\t\t| New User Account - Press 3 |";
cout<<"\n\t\t*--------------------------------------------*";
cout<<"\n\n\t\t Input = ";
cin>>n;
if(n==1)
{
clrscr();
char code[10]="mahak104";
char check[4];
int fl=0;
cout<<"\n\n\n\n\n\tEnter your Password : ";
for(int i=0;i<strlen(code);i++)
{
check[i]=getch();
cout<<"*";
if(code[i]!=check[i])
fl=1;
}
cout<<"\n\n\n\t";
char lod[]={'L','O','G','G','I','N','G',' ',' ','I','N','.','.','.','.'};
cout<<"\n";
cout<<"\t\t\t";
for(i=0;i<12;i++)
{ cout<<lod[i]<<" ";
delay(220);
}
if(fl==1)
{
cout<<"\n\n\t\tLogin FAILED ! ";
getch();
}
else
{
cout<<"\n\n\n\n\t\tLogin Successful , Welcome back MAHAK !";
getch();
}
}
if(n==2)
{
clrscr();
cout<<"\n\n\n\n\n\t\t\tLogging in as Guest\n\n\n\t";
char lod[]={'L','O','G','G','I','N','G',' ',' ','I','N','.','.','.','.'};
cout<<"\n";
cout<<"\t\t\t";
for(int i=0;i<14;i++)
{ cout<<lod[i]<<" ";
delay(250);
}
clrscr();
cout<<"\n\n\n\n\n\n\n\n\n\n\t\t\tWelcome Guest ";
delay(1500);
}
if(n==3)
{
clrscr();
char userid[20];
char pass[20];
cout<<"\n\n";
cout<<"\n\n\t\tEnter your User ID : ";
gets(userid);
cout<<"\n\n\t\tEnter your Password : ";
cin>>pass;
cout<<"\n\n\n\t\tAccount Created ! ";
getch();
clrscr();
cout<<"\n\n\n\t\t\tPress a key to Auto Login";
getch();
clrscr();
cout<<"\n\n\n\n\n\t\t\t\n\n\n\t";
char lod[]={'L','O','G','G','I','N','G',' ',' ','I','N','.','.','.','.'};
cout<<"\n";
cout<<"\t\t\t";
for(int i=0;i<14;i++)
{
cout<<lod[i]<<" ";
delay(250);
}
clrscr();
cout<<"\n\n\n\n\n\n\n\n\n\n\t\t\tWelcome "<<userid;
delay(1500);
}
if(n!=1 && n!=2 && n!=3)
{
clrscr();
cout<<"\n\n\n\n\n\n\t\t\tInvalid Input ";
cout<<"\n\n\n\t\t\tAuto Logging in as Guest";
cout<<"\n\n\n\n\t\t\tPlease wait for 5 seconds";
delay(3000);
}
}
//*********************************************
// Booking Ticket Loop
//This is the Main loop of the program where most of the input takes place.
//**********************************************
void book_ticket()
{
clrscr();
pass_check();
clrscr();
char temp[50],flyingto[50],flyingfrom[50];
int depday,depmonth,depyear;
cout<<"\n\n\n\n\n\n\n\n\n\n\tOkay We'r Gonna Check if your Preferred Ticket is Available :)\n\t";
dash_loop();
clrscr();
cout<<"\n\n\t\t\t Select your Departure City";
cout<<"\n\n";
cout<<" **********************************************************************\n";
cout<<" | *----------------------------------------------------------------* |\n";
cout<<" | | 1.Barcelona | 10.CapeTown | 19.NewYork | 28.Paris | 37.Mumbai | |\n";
cout<<" | | 2.LosAngeles| 11.Monteral | 20.Karachi | 29.Delhi | 38.Indore | |\n";
cout<<" | | 3.Bangalore | 12.Shanghai | 21.Jakarta | 30.Dhaka | 39.Beijing | |\n";
cout<<" | | 4.Hong Kong | 13.Kolkata | 22.Lucknow | 31.Cairo | 40.London | |\n";
cout<<" | | 5.Hyderabad | 14.Amritsar | 23.Aligarh | 32.Hanoi | 41.Bangkok | |\n";
cout<<" | | 6.Ahmedabad | 15.Singapore| 24.Lahore | 33.Patna | 42.Chennai | |\n";
cout<<" | | 7.Trivandram| 16.Istanbul | 25.Riyadh | 34.Pune | 43.Bhopal | |\n";
cout<<" | | 8.Visha..am | 17.Santiago | 26.Durban | 35.Surat | 44.Jaipur | |\n";
cout<<" | | 9.Abu Dhabi | 18.Fujairah | 27.Al-Ain | 36.Dubai | 45.Sharjah | |\n";
cout<<" | *----------------------------------------------------------------* |\n";
cout<<" **********************************************************************\n";
cout<<"\n Flying From [ Enter City NAME ] : ";
gets(temp);
strcpy(flyingfrom,strlwr(temp));
load();
clrscr();
cout<<"\n\t\t\t Select your Arrival City";
cout<<"\n\n";
cout<<" **********************************************************************\n";
cout<<" | *----------------------------------------------------------------* |\n";
cout<<" | | 1.Barcelona | 10.CapeTown | 19.NewYork | 28.Paris | 37.Mumbai | |\n";
cout<<" | | 2.LosAngeles| 11.Monteral | 20.Karachi | 29.Delhi | 38.Indore | |\n";
cout<<" | | 3.Bangalore | 12.Shanghai | 21.Jakarta | 30.Dhaka | 39.Beijing | |\n";
cout<<" | | 4.Hong Kong | 13.Kolkata | 22.Lucknow | 31.Cairo | 40.London | |\n";
cout<<" | | 5.Hyderabad | 14.Amritsar | 23.Aligarh | 32.Hanoi | 41.Bangkok | |\n";
cout<<" | | 6.Ahmedabad | 15.Singapore| 24.Lahore | 33.Patna | 42.Chennai | |\n";
cout<<" | | 7.Trivandram| 16.Istanbul | 25.Riyadh | 34.Pune | 43.Bhopal | |\n";
cout<<" | | 8.Visha..am | 17.Santiago | 26.Durban | 35.Surat | 44.Jaipur | |\n";
cout<<" | | 9.Abu Dhabi | 18.Fujairah | 27.Al-Ain | 36.Dubai | 45.Sharjah | |\n";
cout<<" | *----------------------------------------------------------------* |\n";
cout<<" **********************************************************************\n";
cout<<"\n\n Flying To :[ Enter City NAME ] : ";
gets(temp);
strcpy(flyingto,strlwr(temp));
load();
clrscr();
int a=1;
int b=2;
int c=3;
int d=4;
int e=5;
int f=6;
int g=7;
int h=8;
int i=9;
int j=10;
int k=11;
int l=12;
cout<<"\n\tEnter the Month of Departure [ In Digits ] : ";
cin>>depmonth;
clrscr();
if(depmonth<=12)
{
if(depmonth==a || depmonth==c || depmonth==e || depmonth==g || depmonth==h || depmonth==j || depmonth==l)
{
clrscr();
cout<<"\t*--------------------------------------------------------------*";
cout<<"\n\t| SUN | MON | TUES | WED | THU | FRI | SAT |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 1 | 2 | 3 | 4 | 5 | 6 | 7 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 8 | 9 | 10 | 11 | 12 | 13 | 14 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 15 | 16 | 17 | 18 | 19 | 20 | 21 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 22 | 23 | 24 | 25 | 26 | 27 | 28 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 29 | 30 | 31 | | | | |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
}
if(depmonth==d || depmonth==f || depmonth==i || depmonth==k )
{
clrscr();
cout<<"\t*--------------------------------------------------------------*";
cout<<"\n\t| SUN | MON | TUES | WED | THU | FRI | SAT |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 1 | 2 | 3 | 4 | 5 | 6 | 7 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 8 | 9 | 10 | 11 | 12 | 13 | 14 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 15 | 16 | 17 | 18 | 19 | 20 | 21 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 22 | 23 | 24 | 25 | 26 | 27 | 28 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 29 | 30 | 30 | | | | |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
}
if(depmonth==b)
{
clrscr();
cout<<"\t*--------------------------------------------------------------*";
cout<<"\n\t| SUN | MON | TUES | WED | THU | FRI | SAT |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 1 | 2 | 3 | 4 | 5 | 6 | 7 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 8 | 9 | 10 | 11 | 12 | 13 | 14 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 15 | 16 | 17 | 18 | 19 | 20 | 21 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 22 | 23 | 24 | 25 | 26 | 27 | 28 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
}
cout<<"\n\t\t\t\tSelect a Departure Date : ";
cin>>depday;
if(depday<=31)
{
clrscr();
cout<<"\n\tEnter the Year : ";
cin>>depyear;
clrscr();
cout<<"\n\n\n\tBooking tickets for "<<depday<<"/"<<depmonth<<"/"<<depyear;
cout<<"\n\n\tPress a Key to Continue.....";
getch();
clrscr();
cout<<"\n\n\tChecking Availability for your selected input\n\n";
load();
cout<<"\n\n\n\tYour Selected Date and Locations are Available in our Database. ";
getch();
clrscr();
cout<<"\n\n\tThese are details for your preferred Ticket :- ";
cout<<"\n\n\n\n\t\tFlying From : "<<flyingfrom;
cout<<"\n\n\t\tFlying To : "<<flyingto;
cout<<"\n\n\t\tDate of Departure :"<<depday<<"/"<<depmonth<<"/"<<depyear;
delay(1500);
cout<<"\n\n\n\n\t\tPress a Key to Continue....";
getch();
clrscr();
char airline[20];
char temp5[20];
airlines();
cout<<"\n\n\n\t\tInput Airlines Name : ";
gets(temp5);
strcpy(airline,strlwr(temp5));
char ab1[20]="emirates";
char ab2[20]="etihad";
char ab3[20]="jet airways";
char ab4[20]="qatar airways";
char ab5[20]="air arabia";
char ab6[20]="go indigo";
char ab7[20]="gulf air";
char ab8[20]="air india";
char ab9[20]="british airways";
char ab10[20]="indian airlines";
char ab11[20]="kingfisher";
char ab12[20]="air canada";
int flag=0;
if(strcmp(airline,ab1)==0)
{
flag=1;
}
if(strcmp(airline,ab2)==0)
{
flag=1;
}
if(strcmp(airline,ab3)==0)
{
flag=1;
}
if(strcmp(airline,ab4)==0)
{
flag=1;
}
if(strcmp(airline,ab5)==0)
{
flag=1;
}
if(strcmp(airline,ab6)==0)
{
flag=1;
}
if(strcmp(airline,ab7)==0)
{
flag=1;
}
if(strcmp(airline,ab8)==0)
{
flag=1;
}
if(strcmp(airline,ab9)==0)
{
flag=1;
}
if(strcmp(airline,ab10)==0)
{
flag=1;
}
if(strcmp(airline,ab11)==0)
{
flag=1;
}
if(strcmp(airline,ab12)==0)
{
flag=1;
}
if(flag==0)
{
clrscr();
cout<<"\n\n\n\t\t\tInvalid Input";
cout<<"\n\n\t\t\tPlease Start over again";
cout<<"\n\n\t\t\tPress a key to continue...";
getch();
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
menu();
}
clrscr();
float price;
char fclass[15];
char a4[10]="economy";
char b4[15]="business";
char c4[10]="first";
char temp3[15];
cout<<"\n\n\t";
cout<<"\n\t\t\t*-------------------------*";
cout<<"\n\t\t\t| Flight Class |";
cout<<"\n\t\t\t*-------------------------|";
cout<<"\n\t\t\t| Economy - 899 Dhs |";
cout<<"\n\t\t\t| Business - 1400 Dhs |";
cout<<"\n\t\t\t| First - 2300 Dhs |";
cout<<"\n\t\t\t*-------------------------*";
cout<<"\n\n\t\tWhich Class would you like to select : ";
gets(temp3);
strcpy(fclass,strlwr(temp3));
if(strcmp(fclass,a4)==0)
{
price=900;
}
if(strcmp(fclass,b4)==0)
{
price=1400;
}
if(strcmp(fclass,c4)==0)
{
price=2300;
}
clrscr();
int promocheck;
int promocode;
float pricediff;
float tempprice;
cout<<"\n\n\tDo you have a Promo Code for Discounts ? [ Yes = 1 | No = 2]";
cout<<"\n\n\t\tYour Input : ";
cin>>promocheck;
clrscr();
if(promocheck==1)
{
cout<<"\n\n\n\n\tEnter your 4 Digit Numeric Promo Code : ";
cin>>promocode;
load();
if(promocode%2==0)
{
tempprice=price;
price=0.9*price;
pricediff=tempprice-price;
load();
clrscr();
cout<<"\n\n\t\tVALID Promo Code !!\n\n ";
cout<<"\n\n\tActual Price : "<<tempprice<<" AED ";
cout<<"\n\n\tDiscount Given : "<<pricediff<<" AED ( 10 % ) ";
cout<<"\n\n\tDiscounted Price : "<<price<<" AED ";
}
else
cout<<"\n\n\t\tInvalid Promo Code !!";
getch();
}
clrscr();
select_time();
char flightcode[15];
cout<<"\n\n\tEnter your Selected Flight : ";
gets(flightcode);
for(int z=0;flightcode[z];z++)
{
if(isalpha(flightcode[z]))
flightcode[z]=toupper(flightcode[z]);
}
clrscr();
char a[10]="G96043";
char b[10]="G96056";
char c[10]="G86057";
char d[10]="G16143";
char e[10]="G26243";
char f[10]="G96443";
char g[10]="G76043";
char h[10]="G96044";
char i[10]="G16353";
char j[10]="G46043";
char k[10]="G36437";
int a1=0;
int b1=0;
int stops=0;
int gate=0;
if(strcmp(flightcode,a)==0)
{
a1=1;
b1=4;
stops=0;
gate=2;
}
if(strcmp(flightcode,b)==0)
{
a1=3;
b1=16;
stops=2;
gate=5;
}
if(strcmp(flightcode,c)==0)
{
a1=2;
b1=6;
stops=1;
gate=16;
}
if(strcmp(flightcode,d)==0)
{
a1=6;
b1=9;
stops=0;
gate=9;
}
if(strcmp(flightcode,e)==0)
{
a1=15;
b1=18;
stops=0;
gate=18;
}
if(strcmp(flightcode,f)==0)
{
a1=18;
b1=23;
stops=1;
gate=3;
}
if(strcmp(flightcode,g)==0)
{
a1=24;
b1=4;
stops=1;
gate=22;
}
if(strcmp(flightcode,h)==0)
{
a1=12;
b1=15;
stops=0;
gate=13;
}
if(strcmp(flightcode,i)==0)
{
a1=18;
b1=22;
stops=1;
gate=17;
}
if(strcmp(flightcode,j)==0)
{
a1=22;
b1=1;
stops=0;
gate=23;
}
if(strcmp(flightcode,k)==0)
{
a1=04;
b1=07;
stops=0;
gate=13;
}
cout<<"\n\n\tDeparture Time : "<<a1<<":00 Hrs.";
cout<<"\n\n\tArrival Time : "<<b1<<":00 Hrs.";
cout<<"\n\n\tYour Selected Flight has "<<stops<<" Stops";
cout<<"\n\n\tProceed to Gate "<<gate<<" after checking in.";
getch();
char name[25];
char nationality[15];
char cor[20];
char mobno[15];
char email[25];
char seat[10];
int baggage;
clrscr();
cout<<"\n\n\tNow its time for filling in your info so we can book your ticket";
cout<<"\n\n\n\n\tEnter your Name : ";
gets(name);
cout<<"\n\tEnter your Nationality : ";
cin>>nationality;
cout<<"\n\tEnter your Country of Residence : ";
cin>>cor;
cout<<"\n\tEnter your Mobile Number : ";
cin>>mobno;
cout<<"\n\tEnter your Email Address : ";
cin>>email;
cout<<"\n\n\t";
dash_loop();
clrscr();
cout<<"\n\n\n\t\t\tNow Lets go to Personalization. ";
cout<<"\n\n\nPlease Note : Max. Weight allowed per Baggage is 32 Kg and Max. Dimensions";
cout<<"\n\ of 160 cm.";
cout<<"\n\n\n\tBaggage Preference ";
cout<<"\n\n\t[ 20 Kg = 25 Dhs | 30 Kg = 50 Dhs | 40 Kg = 100 Dhs ]";
cout<<"\n\n\tWhich option would you like to opt for :- ";
cout<<"\n\n\t[Do not type Kg , just enter 20, 30 or 40]";
cout<<"\n\n\n\tYour Input Please = ";
cin>>baggage;
clrscr();
seat_select();
cout<<"\n\t\tEnter your selected Seat Code [example: B2] : ";
gets(temp);
strcpy(seat,strupr(temp));
clrscr();
cout<<"\n\n\tDisplayed Below are your final details.\n\tPlease check them before making the payment through our secure servers.";
cout<<"\n\n\n\n\n\t\t\t\tPersonal Details ";
cout<<"\n\n\tName : ";
puts(name);
cout<<"\tNationality : "<<nationality;
cout<<"\n\tCounrty of Residence : "<<cor;
cout<<"\n\tEmail Address : "<<email;
cout<<"\n\tMobile Number : "<<mobno;
getch();
clrscr();
cout<<"\n\n\n\t\t\t Flight Details ";
cout<<"\n\n\tDeparture City : "<<flyingfrom;
cout<<"\n\tArrival City : "<<flyingto;
cout<<"\n\tDate of Departure : "<<depday<<"/"<<depmonth<<"/"<<depyear;
cout<<"\n\tDeparture Time : "<<a1<<":00 Hrs.";
cout<<"\n\tArrival Time : "<<b1<<":00 Hrs.";
cout<<"\n\tAirlines : "<<airline;
cout<<"\n\tFlight Class : "<<fclass<<" Class";
cout<<"\n\tPrice : "<<price<<" Dhs";
cout<<"\n\tNumber of Stops : "<<stops<<" Stops";
cout<<"\n\tGate Number : "<<gate;
cout<<"\n\tFlight Code : "<<flightcode;
cout<<"\n\tSeat Selected : "<<seat;
cout<<"\n\tBaggage Allocated : "<<baggage<<" Kg";
cout<<"\n\n\n\tWe got it all correct ? Press a key to Continue ......... ";
getch(); clrscr();
cout<<"\n\n\n\n";
cout<<"\n\t\t\t*---------------------------------*";
cout<<"\n\t\t\t| Billing System |";
cout<<"\n\t\t\t|---------------------------------|";
cout<<"\n\t\t\t| No. of Passengers | x 1 |";
cout<<"\n\t\t\t| Cost of Ticket | "<<tempprice<<" AED |";
cout<<"\n\t\t\t| Promo Code Used | "<<promocode<<" |";
cout<<"\n\t\t\t| Amount of Discount | "<<pricediff<<" AED |";
cout<<"\n\t\t\t| Tax Applied | 0 AED |";
cout<<"\n\t\t\t|---------------------------------|";
cout<<"\n\t\t\t| | |";
cout<<"\n\t\t\t| Total Amount Pending | "<<price<<" AED |";
cout<<"\n\t\t\t| | |";
cout<<"\n\t\t\t*---------------------------------*";
cout<<"\n\n\n\n\t\t\tPress a Key to continue......";
getch();
ticket_id();
payment();
clrscr();
}
else
{
clrscr();
cout<<"\n\n\tInvalid Date ! Please Start over again !";
getch();
}
}
else
{
cout<<"\n\n\tInvalid Month ! Please Start Over Again";
getch();
}
}
void menu()
{
closegraph();
int input;
clrscr();
int driver,mode;
driver=DETECT;
initgraph(&driver,&mode,"c:\\turboc3\\bgi");
setcolor(RED);
for(int i=100,j=500,a=100,b=500;i<300;i++,j--,a++,b--)
{
outtextxy(i,350,"|");
outtextxy(j,350,"|");
outtextxy(a,70,"|");
outtextxy(b,70,"|");
delay(2);
}
for(int q=75,p=75;q<350;q++,p++)
{
outtextxy(100,q,"l");
outtextxy(500,p,"l");
delay(2);
}
settextstyle(8,0,3);
setcolor(WHITE);
outtextxy(210,80," < Menu > ");
settextstyle(10,0,1);
setcolor(RED);
for(int s=220;s<350;s++)
{
outtextxy(s,110,"-");
delay(2);
}
settextstyle(3,0,1);
setcolor(WHITE);
outtextxy(215,140,"1. Book a Ticket ");
delay(100);
outtextxy(215,165,"2. Modify a Ticket");
delay(100);
outtextxy(215,190,"3. Cancel your Ticket");
delay(100);
outtextxy(215,215,"4. Check Ticket Status");
delay(100);
outtextxy(215,240,"5. Display all Booked Tickets");
delay(100);
outtextxy(215,265,"6. About Us");
delay(100);
outtextxy(215,290,"7. Contact Us");
delay(100);
outtextxy(215,315,"8. Exit the Program");
delay(100);
settextstyle(6,0,3);
outtextxy(140,380,"What would you like to do ?");
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t";
cin>>input;
closegraph();
switch(input)
{
case 1 : clrscr();
book_ticket();
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
menu();
break;
case 2 : clrscr();
modify_ticket();
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
menu();
break;
case 3 : clrscr();
cancel_ticket();
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
menu();
break;
case 6 : clrscr();
about_us();
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
menu();
break;
case 4 : clrscr();
status_check();
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
menu();
break;
case 8 : clrscr();
cout<<"\n\n\n\n\n\n\n\n\t\t\tThank you for using our program";
delay(2500);
exit(0);
clrscr();
case 5 : clrscr();
display_all_booked();
clrscr();
int dba;
cout<<"\n\n\n\t\tWould you like to check more Tickets?";
cout<<"\n\n\t\t\t[ Yes = 1 | No = 2 ]";
cout<<"\n\n\t\t\tInput = ";
cin>>dba;
switch(dba)
{
case 1 : clrscr();
display_all_booked();
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
menu();
break;
case 2 : cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
menu();
break;
}
break;
case 7 : clrscr();
contact_us();
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
menu();
break;
}
}
//**********************************************
// Welcome Loop
//**********************************************
void welcome()
{
clrscr();
int driver=DETECT, mode;
initgraph(&driver,&mode,"c:\\turboc3\\bgi");
setcolor(10);
setbkcolor(4);
settextstyle(3,0,8);
outtextxy(220,100," MSA ");
outtextxy(80,180,"Travel Agency");
setcolor(1);
settextstyle(8,0,4);
outtextxy(110,320,"- Pay Less , Fly More -");
char lod[]={'L','O','A','D','I','N','G','.','.','.','.','.'};
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
cout<<"\t\t\t";
for(int i=0;i<12;i++)
{ cout<<lod[i]<<" ";
delay(400);
}
clrscr();
}
void features()
{
clrscr();
cout<<"\n\n\t01 : Feature to Book a Ticket.";
cout<<"\n\n\t02 : Feature to Modify a Ticket.";
cout<<"\n\n\t03 : Feature to Cancel a Ticket.";
cout<<"\n\n\t04 : Feature to Check the Status of the booked ticket.";
cout<<"\n\n\t05 : Feature to Display all the Booked Tickets.";
cout<<"\n\n\t06 : Created Tabular Columns where ever possible for better output.";
cout<<"\n\n\t07 : The Program is coded in such a way so that using Upper Case ";
cout<<"\n\t while input wont be a problem.";
cout<<"\n\n\t08 : The Program is a Infinite Loop so it will Display the Main Menu";
cout<<"\n\t again after Executing a particular Feature and Wont Quit after a ";
cout<<"\n\t Single Execution.";
cout<<"\n\n\n\t\t\t Press a key to scroll down...";
getch();
clrscr();
cout<<"\n\n\t09 : Lots of Functions used to keep the coding simple to understand.";
cout<<"\n\n\t10 : Program Indented Properly for better understanding.";
cout<<"\n\n\t11 : Comments added for better understanding.";
cout<<"\n\n\t12 : Tabular structure created resemling to a Seat Selection structure.";
cout<<"\n\n\t13 : About Us Page Created.";
cout<<"\n\n\t14 : Contact Us Page Created.";
cout<<"\n\n\t15 : Payment System Created with options of Credit Card , DB and Paypal.";
cout<<"\n\t16 : Unique Login System Created with options of New User , Guest";
cout<<"\n\t or Administrator.";
cout<<"\n\n\t17 : Unique Calender created for Date Selection for every month.";
cout<<"\n\n\n\t\t\t Press a key to scroll down...";
getch();
clrscr();
cout<<"\n\n\t18 : Entering a Invalid Month or Day will not be accepted by the";
cout<<"\n\t program and will return the user to the main menu.";
cout<<"\n\n\t19 : Extra Feature added in Billing - Promo Code.";
cout<<"\n\n\t20 : After selection of the Flight , The program also displays";
cout<<"\n\t the Gate No. and the No. of stops for the flight.";
cout<<"\n\n\t21 : Feature of Baggage Preferrance added.";
cout<<"\n\n\t22 : Personal Info taken in from the user for booking his ticket.";
cout<<"\n\n\t23 : Displays the data input by the user at frequent intervals.";
cout<<"\n\n\t24 : Welcome Page with Graphics.";
cout<<"\n\n\t25 : Has a main menu from which the user can Run the Program, View ";
cout<<"\n\t the source code , header files & functions used in it.";
getch();
clrscr();
cout<<"\n\n\t26 : A Billing System has been created which displays the final";
cout<<"\n\t amount to be paid by the user.";
cout<<"\n\n\n\t\tThank you , Press a key to return to the Main menu...";
getch();
}
void headers()
{
clrscr();
cout<<"\n";
cout<<"\n\n\t\t#include<iostream.h>";
cout<<"\n\n\t\t#include<conio.h>";
cout<<"\n\n\t\t#include<stdio.h>";
cout<<"\n\n\t\t#include<dos.h>";
cout<<"\n\n\t\t#include<string.h>";
cout<<"\n\n\t\t#include<ctype.h>";
cout<<"\n\n\t\t#include<iomanip.h>";
cout<<"\n\n\t\t#include<process.h>";
cout<<"\n\n\t\t#include<graphics.h>";
cout<<"\n\n\n\t\tPress a key to return to the main menu...";
getch();
}
void functions()
{
clrscr();
cout<<"\n\t01 : Intro - Displays the 1st output of the program";
cout<<"\n\t02 : Load2 - Displays the Loading Characters";
cout<<"\n\t03 : Airlines - Displays the loop to select Airlines";
cout<<"\n\t04 : Saving - Displays the Saving Characters";
cout<<"\n\t05 : Displayforx - Displays the Information for x Ticket";
cout<<"\n\t06 : DisAllBooked - Displays All Booked Tickets Menu";
cout<<"\n\t07 : Modify_ticket - Modify Ticket Function";
cout<<"\n\t08 : Seat_select - Seat Selection Function";
cout<<"\n\t09 : Dash_loop - Displays Dash Loop for better Output";
cout<<"\n\t10 : Load - Displays the Loading Characters slowly";
cout<<"\n\t11 : Select_time - Displays the Time Selection Function";
cout<<"\n\t12 : Contact_us - Displays the Contact us function";
cout<<"\n\t13 : About_us - Displays the About us function";
cout<<"\n\t14 : Ticket_id - Assign's The Ticket ID";
cout<<"\n\t15 : Cancel_ticket - Cancels a Ticket";
cout<<"\n\t16 : Status_check - Checks the Status of the Ticket";
cout<<"\n\t17 : Payment - Billing Section of the Program";
cout<<"\n\t18 : Pass_check - Login System of the Program";
cout<<"\n\t19 : Book_ticket - Booking the Ticket Here";
cout<<"\n\t20 : Menu - Displays the Menu of the Program";
cout<<"\n\t21 : Welcome - Displays the Welcome Loop ";
cout<<"\n\t22 : Feature - Displays the Features of the Program";
cout<<"\n\t23 : Main - The Main loop of the Program "; cout<<"\n\n\t\tPress a key to return to the Main menu...";
getch();
}
//**********************************************
// MAIN STRUCTURE
//**********************************************
void main()
{
//intro();
int xyz;
clrscr();
int driver,mode;
driver=DETECT;
initgraph(&driver,&mode,"c:\\turboc3\\bgi");
setcolor(RED);
for(int i=0,j=600,a=0,b=600;i<300;i++,j--,a++,b--)
{
outtextxy(i,350,"|");
outtextxy(j,350,"|");
outtextxy(a,70,"|");
outtextxy(b,70,"|");
delay(2);
}
for(int q=75,p=75;q<350;q++,p++)
{
outtextxy(0,q,"l");
outtextxy(599,p,"l");
delay(2);
}
settextstyle(8,0,3);
setcolor(WHITE);
outtextxy(210,80," < Menu > ");
settextstyle(10,0,3);
setcolor(RED);
for(int s=220;s<350;s++)
{
outtextxy(s,110,"-");
delay(2);
}
settextstyle(3,0,2);
setcolor(WHITE);
outtextxy(130,150,"1. Run the Airline Database");
delay(100);
outtextxy(130,180,"2. View the Features of the Program");
delay(100);
outtextxy(130,210,"3. View the Limitations of the Program");
delay(100);
outtextxy(130,240,"4. View the Source Code");
delay(100);
outtextxy(130,270,"5. View the Header Files and Functions");
delay(100);
outtextxy(130,300,"6. Exit");
delay(100);
settextstyle(6,0,3);
outtextxy(130,380,"What would you like to do ?");
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t";
cin>>xyz;
closegraph();
clrscr();
switch(xyz)
{
case 1 : welcome();
menu();
break;
case 2 : features();
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
main();
break;
case 3 : clrscr();
cout<<"\n\n\n\t01 : Only 1 Ticket can be booked at a time.";
cout<<"\n\n\t02 : Only Single Way Tickets can be booked";
cout<<"\n\n\t03 : More to be added ! ";
cout<<"\n\n\n\t\tPress a key to return to the main menu...";
getch();
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
main();
break;
case 4 : cout<<"\n\n\n\n\n\n\n\n\t\tGet the source code on www.AirlinesSourceCode.tk";
getch();
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
main();
break;
case 5 : cout<<"\n\n\n\n\t\t\t1. Header Files Used";
cout<<"\n\n\t\t\t2. Functios Used";
cout<<"\n\n\n\t\t\tInput : ";
int x1y;
cin>>x1y;
switch(x1y)
{
case 1 : headers();
break;
case 2 : functions();
break;
default :clrscr();
cout<<"\n\n\n\n\t\tInvalid Input - Press a key to return to Main Menu ";
getch();
break;
}
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
main();
break;
case 6 : clrscr();
cout<<"\n\n\n\n\n\n\n\n\t\t\tThank you for using our program";
delay(500);
exit(0);
break;
default: cout<<"\n\n\n\t\t\tInvalid Input !";
cout<<"\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
main();
break;
}
}
// Program Created By Mahak :)
//*********************************************
// HEADER FILES
//**********************************************
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<dos.h>
#include<string.h>
#include<ctype.h>
#include<iomanip.h>
#include<process.h>
#include<graphics.h>
void menu();
//*********************************************
// Introduction Loop
//**********************************************
void intro()
{
clrscr();
int driver,mode;
driver=DETECT;
initgraph(&driver,&mode,"c:\\turboc3\\bgi");
setbkcolor(4);
setcolor(7);
settextstyle(3,0,5);
cout<<"\n\n\n\n\n\n";
for(int i=0;i<80;i++)
{
cout<<"-";
delay(20);
}
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
for(i=0;i<80;i++)
{
cout<<"-";
delay(20);
}
outtextxy(220,150,"Welcome");
outtextxy(250,205,"to our");
outtextxy(225,260,"Program");
cout<<"\n\n\n\n\n\n\t\t\t Press a key to continue....";
getch();
closegraph();
}
//*********************************************
// Loading Loop
//**********************************************
void load2()
{
clrscr();
int driver,mode;
driver=DETECT;
initgraph(&driver,&mode,"c:\\turboc3\\bgi");
for(int i=0,j=600,a=0,b=600;i<300;i++,j--,a++,b--)
{
outtextxy(i,400,"|");
outtextxy(j,400,"|");
outtextxy(a,360,"|");
outtextxy(b,360,"|");
delay(3);
}
for(int q=361,p=361;q<400;q++,p++)
{
outtextxy(0,q,"l");
outtextxy(599,p,"l");
delay(3);
}
for(int m=0,n=600;m<230;m++,n--)
{
outtextxy(m,380,"|");
outtextxy(n,380,"|");
delay(3);
}
setcolor(RED);
outtextxy(240,380," L");
delay(250);
outtextxy(255,380," O");
delay(250);
outtextxy(270,380," A");
delay(250);
outtextxy(285,380," D");
delay(250);
outtextxy(300,380," I");
delay(250);
outtextxy(315,380," N");
delay(250);
outtextxy(330,380," G");
delay(250);
outtextxy(345,380," .");
delay(250);
outtextxy(360,380," .");
delay(250);
closegraph();
clrscr();
}
//*********************************************
// Loop to Select Airlines
//**********************************************
void airlines()
{
clrscr();
cout<<"\n\n\t\t\tSelect your preferred Airlines\n\n";
cout<<"\n\t\t *---------------------------------------*";
cout<<"\n\t\t | AIRLINES |";
cout<<"\n\t\t |---------------------------------------|";
cout<<"\n\t\t | | |";
cout<<"\n\t\t | Emirates | Etihad |";
cout<<"\n\t\t | Jet Airways | Gulf Air |";
cout<<"\n\t\t | Qatar Airways | Air India |";
cout<<"\n\t\t | Air Arabia | British Airways |";
cout<<"\n\t\t | Go Indigo | Indian Airlines |";
cout<<"\n\t\t | Kingfisher | Air Canada |";
cout<<"\n\t\t | | |";
cout<<"\n\t\t *---------------------------------------*";
}
//*********************************************
// Saving Loop
//**********************************************
void saving()
{
char save[]={'S','A','V','I','N','G','.','.','.','.','.','.'};
cout<<"\n\n\n\n\n";
cout<<"\t\t\t";
for(int i=0;i<12;i++)
{ cout<<save[i]<<" ";
delay(300);
}
}
//*********************************************
// Display all Tickets Loop
//**********************************************
void displayfor1()
{
clrscr();
cout<<"\n\t\t\t Displaying 1st Booked Ticket\n ";
cout<<"\n\t*------------------------------------------------*";
cout<<"\n\t| Name : Mahak |";
cout<<"\n\t| Nationality : Indian |";
cout<<"\n\t| Country of Residence : UAE |";
cout<<"\n\t| Email Address : mahak@outlook.com |";
cout<<"\n\t| Mobile Number : 055-8356885 |";
cout<<"\n\t| Reservation Number : *** |";
cout<<"\n\t| Airlines : Etihad |";
cout<<"\n\t| Departure City : Sharjah |";
cout<<"\n\t| Arrival City : Jaipur |";
cout<<"\n\t| Date of Departure : 26/11/201 |";
cout<<"\n\t| Departure Time : 17:30 |";
cout<<"\n\t| Arrival Time : 20:00 |";
cout<<"\n\t| Flight Class : First Class |";
cout<<"\n\t| Price : 1600 Dhs |";
cout<<"\n\t| Number of Stops : 0 Stops |";
cout<<"\n\t| Gate Number : 16 |";
cout<<"\n\t| Flight Code : G16098 |";
cout<<"\n\t| Seat Selected : A7 |";
cout<<"\n\t| Baggage Allocated : 30 KG |";
cout<<"\n\t| Ticket Status : Confirmed |";
cout<<"\n\t*------------------------------------------------*";
getch();
}
void displayfor2()
{
clrscr();
cout<<"\n\t\t\t Displaying 2nd Booked Ticket \n ";
cout<<"\n\t*------------------------------------------------*";
cout<<"\n\t| Name : Salik |";
cout<<"\n\t| Nationality : Indian |";
cout<<"\n\t| Country of Residence : UAE |";
cout<<"\n\t| Email Address : salik@gmail.com |";
cout<<"\n\t| Mobile Number : 055-7422563 |";
cout<<"\n\t| Reservation Number : *** |";
cout<<"\n\t| Airlines : Emirates |";
cout<<"\n\t| Departure City : Sharjah |";
cout<<"\n\t| Arrival City : Cochi |";
cout<<"\n\t| Date of Departure : 23/11/2012 |";
cout<<"\n\t| Departure Time : 14:45 |";
cout<<"\n\t| Arrival Time : 17:30 |";
cout<<"\n\t| Flight Class : Bussiness Class |";
cout<<"\n\t| Price : 1450 Dhs |";
cout<<"\n\t| Number of Stops : 0 Stops |";
cout<<"\n\t| Gate Number : 21 |";
cout<<"\n\t| Flight Code : G19021 |";
cout<<"\n\t| Seat Selected : E3 |";
cout<<"\n\t| Baggage Allocated : 20 KG |";
cout<<"\n\t| Ticket Status : Confirmed |";
cout<<"\n\t*------------------------------------------------*";
getch();
}
void displayfor3()
{
clrscr();
cout<<"\n\t\t\t Displaying 3rd Booked Ticket \n ";
cout<<"\n\t*------------------------------------------------*";
cout<<"\n\t| Name : Aaron |";
cout<<"\n\t| Nationality : Indian |";
cout<<"\n\t| Country of Residence : UAE |";
cout<<"\n\t| Email Address : aaron@gmail.com |";
cout<<"\n\t| Mobile Number : 055-5425612 |";
cout<<"\n\t| Reservation Number : *** |";
cout<<"\n\t| Airlines : British Airways |";
cout<<"\n\t| Departure City : Dubai |";
cout<<"\n\t| Arrival City : Paris |";
cout<<"\n\t| Date of Departure : 30/11/2012 |";
cout<<"\n\t| Departure Time : 19:45 |";
cout<<"\n\t| Arrival Time : 23:30 |";
cout<<"\n\t| Flight Class : First Class |";
cout<<"\n\t| Price : 2450 Dhs |";
cout<<"\n\t| Number of Stops : 1 Stops |";
cout<<"\n\t| Gate Number : 20 |";
cout<<"\n\t| Flight Code : G17831 |";
cout<<"\n\t| Seat Selected : G6 |";
cout<<"\n\t| Baggage Allocated : 30 KG |";
cout<<"\n\t| Ticket Status : Pending |";
cout<<"\n\t*------------------------------------------------*";
getch();
}
void displayfor4()
{
clrscr();
cout<<"\n\t\t\t Displaying 4th Booked Ticket \n ";
cout<<"\n\t*------------------------------------------------*";
cout<<"\n\t| Name : Sharose |";
cout<<"\n\t| Nationality : Indian |";
cout<<"\n\t| Country of Residence : UAE |";
cout<<"\n\t| Email Address : shahrose@gmail.com |";
cout<<"\n\t| Mobile Number : 055-6596775 |";
cout<<"\n\t| Reservation Number : *** |";
cout<<"\n\t| Airlines : Jet Airways |";
cout<<"\n\t| Departure City : Dubai |";
cout<<"\n\t| Arrival City : Mexico |";
cout<<"\n\t| Date of Departure : 27/11/2012 |";
cout<<"\n\t| Departure Time : 12:45 |";
cout<<"\n\t| Arrival Time : 17:30 |";
cout<<"\n\t| Flight Class : First Class |";
cout<<"\n\t| Price : 2300 Dhs |";
cout<<"\n\t| Number of Stops : 1 Stops |";
cout<<"\n\t| Gate Number : 15 |";
cout<<"\n\t| Flight Code : G19327 |";
cout<<"\n\t| Seat Selected : D2 |";
cout<<"\n\t| Baggage Allocated : 40 KG |";
cout<<"\n\t| Ticket Status : Confirmed |";
cout<<"\n\t*------------------------------------------------*";
getch();
}
void displayfor5()
{
clrscr();
cout<<"\n\t\t\t Displaying 5th Booked Ticket \n ";
cout<<"\n\t*------------------------------------------------*";
cout<<"\n\t| Name : Praise |";
cout<<"\n\t| Nationality : Indian |";
cout<<"\n\t| Country of Residence : UAE |";
cout<<"\n\t| Email Address : wintercool_96@..com |";
cout<<"\n\t| Mobile Number : 055-4523761 |";
cout<<"\n\t| Reservation Number : *** |";
cout<<"\n\t| Airlines : Go Indigo |";
cout<<"\n\t| Departure City : Sharjah |";
cout<<"\n\t| Arrival City : Cochi |";
cout<<"\n\t| Date of Departure : 21/11/2012 |";
cout<<"\n\t| Departure Time : 15:45 |";
cout<<"\n\t| Arrival Time : 18:30 |";
cout<<"\n\t| Flight Class : Economy Class |";
cout<<"\n\t| Price : 850 Dhs |";
cout<<"\n\t| Number of Stops : 0 Stops |";
cout<<"\n\t| Gate Number : 17 |";
cout<<"\n\t| Flight Code : G16021 |";
cout<<"\n\t| Seat Selected : F3 |";
cout<<"\n\t| Ticket Status : Confirmed |";
cout<<"\n\t| Baggage Allocated : 30 KG |";
cout<<"\n\t*------------------------------------------------*";
getch();
}
void displayfor6()
{
clrscr();
cout<<"\n\t\t\t Displaying 6th Booked Ticket \n ";
cout<<"\n\t*------------------------------------------------*";
cout<<"\n\t| Name : Gokul |";
cout<<"\n\t| Nationality : Indian |";
cout<<"\n\t| Country of Residence : UAE |";
cout<<"\n\t| Email Address : Gokul@kiddo.com |";
cout<<"\n\t| Mobile Number : 055-5547891 |";
cout<<"\n\t| Reservation Number : *** |";
cout<<"\n\t| Airlines : Air India |";
cout<<"\n\t| Departure City : Sharjah |";
cout<<"\n\t| Arrival City : Uganda |";
cout<<"\n\t| Date of Departure : 27/11/2012 |";
cout<<"\n\t| Departure Time : 15:45 |";
cout<<"\n\t| Arrival Time : 19:30 |";
cout<<"\n\t| Flight Class : Economy Class |";
cout<<"\n\t| Price : 850 Dhs |";
cout<<"\n\t| Number of Stops : 2 Stops |";
cout<<"\n\t| Gate Number : 12 |";
cout<<"\n\t| Flight Code : G19221 |";
cout<<"\n\t| Seat Selected : B3 |";
cout<<"\n\t| Ticket Status : Pending |";
cout<<"\n\t| Baggage Allocated : 30 KG |";
cout<<"\n\t*------------------------------------------------*";
getch();
}
void displayfor7()
{
clrscr();
cout<<"\n\t\t\t Displaying 7th Booked Ticket \n ";
cout<<"\n\t*------------------------------------------------*";
cout<<"\n\t| Name : Vikas |";
cout<<"\n\t| Nationality : Indian |";
cout<<"\n\t| Country of Residence : UAE |";
cout<<"\n\t| Email Address : viku@coolmail.com |";
cout<<"\n\t| Mobile Number : 055-9997771 |";
cout<<"\n\t| Reservation Number : *** |";
cout<<"\n\t| Airlines : Etihad |";
cout<<"\n\t| Departure City : Dubai |";
cout<<"\n\t| Arrival City : Abu Dhabi |";
cout<<"\n\t| Date of Departure : 29/11/2012 |";
cout<<"\n\t| Departure Time : 15:45 |";
cout<<"\n\t| Arrival Time : 16:30 |";
cout<<"\n\t| Flight Class : First Class |";
cout<<"\n\t| Price : 350 Dhs |";
cout<<"\n\t| Number of Stops : 0 Stops |";
cout<<"\n\t| Gate Number : 11 |";
cout<<"\n\t| Flight Code : G12561 |";
cout<<"\n\t| Seat Selected : A4 |";
cout<<"\n\t| Ticket Status : Confirmed |";
cout<<"\n\t| Baggage Allocated : 20 KG |";
cout<<"\n\t*------------------------------------------------*";
getch();
}
void displayfor8()
{
clrscr();
cout<<"\n\t\t\t Displaying 8th Booked Ticket \n ";
cout<<"\n\t*------------------------------------------------*";
cout<<"\n\t| Name : Sharan |";
cout<<"\n\t| Nationality : Indian |";
cout<<"\n\t| Country of Residence : UAE |";
cout<<"\n\t| Email Address : sharan@96.com |";
cout<<"\n\t| Mobile Number : 055-4986786 |";
cout<<"\n\t| Reservation Number : *** |";
cout<<"\n\t| Airlines : Emirates |";
cout<<"\n\t| Departure City : Sharjah |";
cout<<"\n\t| Arrival City : Hyderabad |";
cout<<"\n\t| Date of Departure : 23/11/2012 |";
cout<<"\n\t| Departure Time : 15:45 |";
cout<<"\n\t| Arrival Time : 18:30 |";
cout<<"\n\t| Flight Class : Bussiness Class |";
cout<<"\n\t| Price : 1850 Dhs |";
cout<<"\n\t| Number of Stops : 0 Stops |";
cout<<"\n\t| Gate Number : 19 |";
cout<<"\n\t| Flight Code : G16729 |";
cout<<"\n\t| Seat Selected : D2 |";
cout<<"\n\t| Ticket Status : Confirmed |";
cout<<"\n\t| Baggage Allocated : 30 KG |";
cout<<"\n\t*------------------------------------------------*";
getch();
}
//*********************************************
// Display Booked Tickets Loop
//**********************************************
void display_all_booked()
{
int n;
clrscr();
cout<<"\n\t *----------------------------------------------------*";
cout<<"\n\t | CODE| NAME | DESTINATION | FLIGHT |";
cout<<"\n\t |----------------------------------------------------|";
cout<<"\n\t | 1 | Mahak | Jaipur | Etihad |";
cout<<"\n\t | 2 | Salik | Bangalore | Emirates |";
cout<<"\n\t | 3 | Aaron | Paris | British Airways |";
cout<<"\n\t | 4 | Sharose | Mexico | Jet Airways |";
cout<<"\n\t | 5 | Praise | Cochi | Go Indigo |";
cout<<"\n\t | 6 | Gokul | Uganda | Air India |";
cout<<"\n\t | 7 | Vikas | Abu Dhabi | Ethihad |";
cout<<"\n\t | 8 | Sharan | Hyderabad | Emirates |";
cout<<"\n\t *----------------------------------------------------*";
cout<<"\n\n\n\tFor To Display the Complete Details of a Particular Customer ,";
cout<<"\n\n\n\t\t\tEnter the Customer Code : ";
cin>>n;
if(n==1)
displayfor1();
if(n==2)
displayfor2();
if(n==3)
displayfor3();
if(n==4)
displayfor4();
if(n==5)
displayfor5();
if(n==6)
displayfor6();
if(n==7)
displayfor7();
if(n==8)
displayfor8();
}
//*********************************************
// Modify Tickets Loop
//**********************************************
void modify_ticket()
{
clrscr();
int a;
char name[20];
int ticket_code;a=104;
cout<<"\n\n\n\t\t\tModify your Ticket";
cout<<"\n\n\n\t\tEnter your Name : ";
gets(name);
cout<<"\n\n\t\tEnter your Unique Ticket ID Code : ";
cin>>ticket_code;
cout<<"\n\n\n\t";
load2();
if(ticket_code==a)
{
clrscr();
int modify_ticket;
cout<<"\n\n\t\t What would you like to modify in your ticket?\n\n";
cout<<"\n\t\t\t*-----------------------------*";
cout<<"\n\t\t\t| Modify |";
cout<<"\n\t\t\t*-----------------------------*";
cout<<"\n\t\t\t| 1.Name |";
cout<<"\n\t\t\t| 2.Email |";
cout<<"\n\t\t\t| 3.Nationality |";
cout<<"\n\t\t\t| 4.Mobile Number |";
cout<<"\n\t\t\t| 5.Departure City |";
cout<<"\n\t\t\t| 6.Arrival City |";
cout<<"\n\t\t\t| 7.Date of Travel |";
cout<<"\n\t\t\t| 8.Flight Class |";
cout<<"\n\t\t\t| 9.Flight Code |";
cout<<"\n\t\t\t| 10.Seat Number |";
cout<<"\n\t\t\t| 11.Baggage Allowed |";
cout<<"\n\t\t\t*-----------------------------*";
cout<<"\n\n\t\tSelect a Option [Only Number] : ";
cin>>modify_ticket;
clrscr();
cout<<"\n\n\t\t";
switch(modify_ticket)
{
case 1 : char name[20];
cout<<"Enter the Modified Name : ";
gets(name);
saving();
cout<<"\n\n\t\tData Modified ! Thank you.";
break;
case 2 : char email[25];
cout<<"Enter the New Email : ";
gets(email);
saving();
cout<<"\n\n\t\tData Modified ! Thank you.";
break;
case 3 : char nationality[20];
cout<<"Enter the New Nationality : ";
gets(nationality);
saving();
cout<<"\n\n\t\tData Modified ! Thank you.";
break;
case 4 : char mobno[15];
cout<<"Enter the New Mobile Number : ";
gets(mobno);
saving();
cout<<"\n\n\t\tData Modified ! Thank you.";
break;
case 5 : char depcity[15];
cout<<"Enter the New Departure City : ";
gets(depcity);
saving();
cout<<"\n\n\t\tData Modified ! Thank you.";
break;
case 6 : char arvcity[15];
cout<<"Enter the New Arrival City : ";
gets(arvcity);
saving();
cout<<"\n\n\t\tData Modified ! Thank you.";
break;
case 7 : int month;
int year;
int day;
cout<<"Enter the Month [ Digits ]: ";
cin>>month;
cout<<"Enter the Day [ Digits ] : ";
cin>>day;
cout<<"Enter the Year : ";
cin>>year;
saving();
cout<<"\n\n\t\tData Modified ! Thank you.";
break;
case 8 : char fclass[15];
cout<<"Enter the New Selected Flight Class : ";
gets(fclass);
saving();
cout<<"\n\n\t\tData Modified ! Thank you.";
break;
case 9 : char fcode[15];
cout<<"Enter the New Flight Code : ";
gets(fcode);
saving();
cout<<"\n\n\t\tData Modified ! Thank you.";
break;
case 10 :char seat[5];
cout<<"Enter the New Seat Location : ";
gets(seat);
saving();
cout<<"\n\n\t\tData Modified ! Thank you.";
break;
case 11 :int baggage;
cout<<"Enter the New Baggage allowed : ";
cin>>baggage;
saving();
cout<<"\n\n\t\tData Modified ! Thank you.";
break;
default :cout<<"Please Select a Valid Option ! ";
saving();
cout<<"\n\n\n\n\t\t\tData Modified ! Thank you.";
break;
}
getch();
}
else
{
cout<<"\n\n\n\t\t\tWRONG TICKET CODE ";
getch();
}
}
//*********************************************
// Seat Selection Loop
//**********************************************
void seat_select()
{
clrscr();
cout<<"\n\n";
cout<<"\tPersonalized Seat Selection\n";
cout<<"\t\t\t\t\tSeats with ** are already taken.";
cout<<"\n\t\t\t\t ___ ";
cout<<"\n\t\t\t\t | E |";
cout<<"\n\t\t\t\t | X |";
cout<<"\n\t*-------------------------| I |-------------------------*";
cout<<"\n\t| A1 | ** | C1 | D1 | E1 | T | ** | G1 | H1 | I1 | J1 |";
cout<<"\n\t| ** | B2 | ** | ** | ** | | F2 | G2 | ** | ** | J2 |";
cout<<"\n\t| ** | ** | ** | D3 | E3 | | F3 | ** | ** | I3 | J3 |";
cout<<"\n\t| A4 | B4 | C4 | D4 | ** | | F4 | G4 | H4 | I4 | ** |";
cout<<"\n\t| |";
cout<<"\n\t| A B C D E F G H I J |";
cout<<"\n\t| |";
cout<<"\n\t| ** | ** | C5 | ** | ** | | ** | G5 | H5 | I5 | ** |";
cout<<"\n\t| A6 | B6 | C6 | ** | E6 | | F6 | ** | ** | ** | J6 |";
cout<<"\n\t| A7 | ** | ** | D7 | ** | | ** | ** | H7 | I7 | J7 |";
cout<<"\n\t| ** | B8 | C8 | D8 | E8 | E | F8 | G8 | ** | I8 | ** |";
cout<<"\n\t*-------------------------| X |-------------------------*";
cout<<"\n\t\t\t\t | I |";
cout<<"\n\t\t\t\t | T |";
cout<<"\n\t\t\t\t --- ";
}
//*********************************************
// Dash Loop for Better Output
//**********************************************
void dash_loop()
{
for(int i=0;i<62;i++)
{
cout<<"-";
delay(40);
}
}
//*********************************************
// Loading Loop
//**********************************************
void load()
{
clrscr();
int driver,mode;
driver=DETECT;
initgraph(&driver,&mode,"c:\\turboc3\\bgi");
for(int i=0,j=600,a=0,b=600;i<300;i++,j--,a++,b--)
{
outtextxy(i,400,"|");
outtextxy(j,400,"|");
outtextxy(a,360,"|");
outtextxy(b,360,"|");
delay(3);
}
for(int q=361,p=361;q<400;q++,p++)
{
outtextxy(0,q,"l");
outtextxy(599,p,"l");
delay(3);
}
for(int m=0,n=600;m<230;m++,n--)
{
outtextxy(m,380,"|");
outtextxy(n,380,"|");
delay(3);
}
setcolor(RED);
outtextxy(240,380," L");
delay(250);
outtextxy(255,380," O");
delay(250);
outtextxy(270,380," A");
delay(250);
outtextxy(285,380," D");
delay(250);
outtextxy(300,380," I");
delay(250);
outtextxy(315,380," N");
delay(250);
outtextxy(330,380," G");
delay(250);
outtextxy(345,380," .");
delay(250);
outtextxy(360,380," .");
delay(250);
closegraph();
clrscr();
}
//*********************************************
// Flight Time Selection Loop
//**********************************************
void select_time()
{
clrscr();
cout<<"\n\n\t\t Select your preferred Flight Timings\n";
cout<<"\n\t*----------------------------------------------------------*";
cout<<"\n\t| Flight | Departure | Arrival | Stops | Boarding Gate |";
cout<<"\n\t|------------------------------------------|---------------|";
cout<<"\n\t| G96043 | 01:00 | 04:00 | 0 | Gate 02 |";
cout<<"\n\t| G96056 | 03:00 | 16:00 | 2 | Gate 05 |";
cout<<"\n\t| G86057 | 02:00 | 06:00 | 1 | Gate 16 |";
cout<<"\n\t| G16143 | 06:00 | 09:00 | 0 | Gate 09 |";
cout<<"\n\t| G26243 | 15:00 | 18:00 | 0 | Gate 18 |";
cout<<"\n\t| G96443 | 18:00 | 23:00 | 1 | Gate 03 |";
cout<<"\n\t| G76043 | 24:00 | 04:00 | 1 | Gate 22 |";
cout<<"\n\t| G96044 | 12:00 | 15:00 | 0 | Gate 13 |";
cout<<"\n\t| G16353 | 18:00 | 22:00 | 1 | Gate 17 |";
cout<<"\n\t| G46043 | 22:00 | 01:00 | 0 | Gate 23 |";
cout<<"\n\t| G36437 | 04:00 | 07:00 | 0 | Gate 13 |";
cout<<"\n\t*----------------------------------------------------------*";
}
//*********************************************
// Contact Us Loop
//**********************************************
void contact_us()
{
clrscr();
int n;
cout<<"\n\n\t\t\t\tContact Us\n";
cout<<"\n\t\t*----------------------------------*";
cout<<"\n\t\t| Press 1 to contact by Email |";
cout<<"\n\t\t| Press 2 to contact by Mobile |";
cout<<"\n\t\t| Press 3 to contact by Facebook |";
cout<<"\n\t\t*----------------------------------*";
cout<<"\n\n\t\tYour Input = ";
cin>>n;
if(n==1)
cout<<"\n\n\t\t Reach us at Mahak@outlook.com / Mahak@gametosoft.com";
if(n==2)
cout<<"\n\n\t\t Reach us by calling on 055-8356885";
if(n==3)
cout<<"\n\n\t\t Option Disabled .Please Try again Later :P";
getch();
}
//*********************************************
// About Us Loop
//**********************************************
void about_us()
{
clrscr();
cout<<"\n\n";
cout<<"\n\t\t*------------------------------------------*";
cout<<"\n\t\t| About US |";
cout<<"\n\t\t|------------------------------------------|";
cout<<"\n\t\t| |";
cout<<"\n\t\t| Program Created by |";
cout<<"\n\t\t| |";
cout<<"\n\t\t| Mahak - Mahak@outlook.com |";
cout<<"\n\t\t| |";
cout<<"\n\t\t| |";
cout<<"\n\t\t| |";
cout<<"\n\t\t|------------------------------------------|";
cout<<"\n\t\t| |";
cout<<"\n\t\t| MSA Travels |";
cout<<"\n\t\t| |";
cout<<"\n\t\t|------------------------------------------|";
cout<<"\n\t\t| |";
cout<<"\n\t\t| THANK YOU |";
cout<<"\n\t\t| |";
cout<<"\n\t\t*------------------------------------------*";
getch();
}
//*********************************************
// Ticket ID Loop
//**********************************************
void ticket_id()
{
clrscr();
cout<<"\n\n\n\tThis is your Ticket ID - 104";
cout<<"\n\n\tIncase you want to cancel your ticket , This ID will be required ! ";
getch();
}
//*********************************************
// Cancel Ticket Loop
//**********************************************
void cancel_ticket()
{
clrscr();
char reason[100];
int ticket_id;
int a=104;
cout<<"\n\n\n\tIt's sad to see you cancel your booking with us";
cout<<"\n\n\tCould you just give us some info on why you are canceling the ticket ?";
cout<<"\n\tInput : ";
gets(reason);
cout<<"\n\n\tThanks for your valuable Input";
cout<<"\n\n\tPlease Enter your Unique Ticket ID to Cancel your Ticket ";
cout<<"\n\tInput = ";
cin>>ticket_id;
load();
if(ticket_id==a)
cout<<"\n\n\n\n\t\t*********TICKET CANCELLED**********";
else
cout<<"\n\n\n\t\tWrong Ticket ID";
getch();
}
//*********************************************
// Ticket Status Check Loop
//**********************************************
void status_check()
{
clrscr();
int ticket_id;
cout<<"\n\n\n\t\tEnter your Ticket ID to check your ticket's Status : ";
cin>>ticket_id;
cout<<"\n\n\n\t\t";
load();
if (ticket_id%2==0)
{
cout<<"\n\n\t\tThis Ticket has been Confirmed ! Thank you. ";
}
else
{
cout<<"\n\n\tYour Ticket is in the Pending queue. Please check again later.";
}
getch();
}
//*********************************************
// Payment Loop
//**********************************************
void payment()
{
clrscr();
int payment;
cout<<"\n\n\t\t\tSo Lets look into the Payment now.";
cout<<"\n\n\t Our Payment Server's are completely secure and protected.";
cout<<"\n\n\n\n\t\t\t Our Payment Options\n";
cout<<"\n\t\t\t*---------------------------*";
cout<<"\n\t\t\t| Code | Payment Option |";
cout<<"\n\t\t\t|---------------------------|";
cout<<"\n\t\t\t| 1 | Credit Card |";
cout<<"\n\t\t\t|---------------------------|";
cout<<"\n\t\t\t| 2 | Debit Card |";
cout<<"\n\t\t\t|---------------------------|";
cout<<"\n\t\t\t| 3 | Paypal |";
cout<<"\n\t\t\t*---------------------------*";
cout<<"\n\n\n\t\tEnter of the code from above : ";
cin>>payment;
switch(payment)
{
case 1 : clrscr();
char name[25];
char ccno[20];
char month[15];
char email[25];
int year;
int code;
cout<<"\n\n\tOkay , Lets take in your CC Info to process it.";
cout<<"\n\n\n\tEnter your Name : ";
gets(name);
cout<<"\n\n\tEnter the Credit Card Number [ 16 Digits ] : ";
gets(ccno);
cout<<"\n\n\tEnter the Month of the Credit Card's Expiry : ";
gets(month);
cout<<"\n\n\tEnter the Year of the Credit Card's Expiry : ";
cin>>year;
cout<<"\n\n\tEnter the 3 digit security code of the CC : ";
cin>>code;
cout<<"\n\n";
load();
clrscr();
cout<<"\n\n\n\n\n\n\n\n\t\t\tAuthentication Successful";
cout<<"\n\n\n\t\t\t Payment Successful";
cout<<"\n\n\n\n\tWe'll send you a copy of your details and ticket on your email";
cout<<"\n\n\tPlease Enter your Email Id : ";
gets(email);
cout<<"\n\n\tThank you";
break;
case 2 : char name1[25];
char ccno1[20];
char month1[15];
char email1[25];
int year1;
int code1;
clrscr();
cout<<"\n\n\tOkay , Lets take in your DB Info to process it.";
cout<<"\n\n\n\tEnter your Name : ";
gets(name1);
cout<<"\n\n\tEnter the Debit Card Number [ 16 Digits ] : ";
gets(ccno1);
cout<<"\n\n\tEnter the Month of the Debit Card's Expiry : ";
gets(month1);
cout<<"\n\n\tEnter the Year of the Debit Card's Expiry : ";
cin>>year1;
cout<<"\n\n\tEnter the 3 digit security code of the DB : ";
cin>>code1;
cout<<"\n\n";
load();
clrscr();
cout<<"\n\n\n\n\n\n\n\n\t\t\tAuthentication Successful";
cout<<"\n\n\n\t\t\t Payment Successful";
cout<<"\n\n\n\n\tWe'll send you a copy of your details and ticket on your email";
cout<<"\n\n\tPlease Enter your Email Id : ";
gets(email1);
cout<<"\n\n\tThank you";
break;
case 3 : clrscr();
char name2[25];
char email2[25];
char code2[20];
cout<<"\n\n\n\n\tThank you for choosing to play with Paypal";
cout<<"\n\n\tEnter your Name : ";
gets(name2);
cout<<"\n\n\tEnter the email id associated with Paypal : ";
gets(email2);
cout<<"\n\n\tSecurity Code : ";
gets(code2);
cout<<"\n\n";
load();
clrscr();
cout<<"\n\n\n\n\n\n\n\n\t\t\tAuthentication Successful";
cout<<"\n\n\n\t\t\t Payment Successful";
cout<<"\n\n\n\n\tWe'll send you a copy of your details \n\tand ticket on your email "<<email2;
cout<<"\n\n\tThank you";
break;
default :cout<<"\n\n\tEnter a valid payment method [ 1 / 2 / 3 ] ";
break;
}
getch();
}
//*********************************************
// Login System Loop
//**********************************************
void pass_check()
{
clrscr();
int n;
cout<<"\n\n\t\t\n\n\n";
cout<<"\n\t\t*--------------------------------------------*";
cout<<"\n\t\t| Login as ADMINISTRATOR - Press 1 |";
cout<<"\n\t\t| |";
cout<<"\n\t\t| Login as GUEST - Press 2 |";
cout<<"\n\t\t| |";
cout<<"\n\t\t| New User Account - Press 3 |";
cout<<"\n\t\t*--------------------------------------------*";
cout<<"\n\n\t\t Input = ";
cin>>n;
if(n==1)
{
clrscr();
char code[10]="mahak104";
char check[4];
int fl=0;
cout<<"\n\n\n\n\n\tEnter your Password : ";
for(int i=0;i<strlen(code);i++)
{
check[i]=getch();
cout<<"*";
if(code[i]!=check[i])
fl=1;
}
cout<<"\n\n\n\t";
char lod[]={'L','O','G','G','I','N','G',' ',' ','I','N','.','.','.','.'};
cout<<"\n";
cout<<"\t\t\t";
for(i=0;i<12;i++)
{ cout<<lod[i]<<" ";
delay(220);
}
if(fl==1)
{
cout<<"\n\n\t\tLogin FAILED ! ";
getch();
}
else
{
cout<<"\n\n\n\n\t\tLogin Successful , Welcome back MAHAK !";
getch();
}
}
if(n==2)
{
clrscr();
cout<<"\n\n\n\n\n\t\t\tLogging in as Guest\n\n\n\t";
char lod[]={'L','O','G','G','I','N','G',' ',' ','I','N','.','.','.','.'};
cout<<"\n";
cout<<"\t\t\t";
for(int i=0;i<14;i++)
{ cout<<lod[i]<<" ";
delay(250);
}
clrscr();
cout<<"\n\n\n\n\n\n\n\n\n\n\t\t\tWelcome Guest ";
delay(1500);
}
if(n==3)
{
clrscr();
char userid[20];
char pass[20];
cout<<"\n\n";
cout<<"\n\n\t\tEnter your User ID : ";
gets(userid);
cout<<"\n\n\t\tEnter your Password : ";
cin>>pass;
cout<<"\n\n\n\t\tAccount Created ! ";
getch();
clrscr();
cout<<"\n\n\n\t\t\tPress a key to Auto Login";
getch();
clrscr();
cout<<"\n\n\n\n\n\t\t\t\n\n\n\t";
char lod[]={'L','O','G','G','I','N','G',' ',' ','I','N','.','.','.','.'};
cout<<"\n";
cout<<"\t\t\t";
for(int i=0;i<14;i++)
{
cout<<lod[i]<<" ";
delay(250);
}
clrscr();
cout<<"\n\n\n\n\n\n\n\n\n\n\t\t\tWelcome "<<userid;
delay(1500);
}
if(n!=1 && n!=2 && n!=3)
{
clrscr();
cout<<"\n\n\n\n\n\n\t\t\tInvalid Input ";
cout<<"\n\n\n\t\t\tAuto Logging in as Guest";
cout<<"\n\n\n\n\t\t\tPlease wait for 5 seconds";
delay(3000);
}
}
//*********************************************
// Booking Ticket Loop
//This is the Main loop of the program where most of the input takes place.
//**********************************************
void book_ticket()
{
clrscr();
pass_check();
clrscr();
char temp[50],flyingto[50],flyingfrom[50];
int depday,depmonth,depyear;
cout<<"\n\n\n\n\n\n\n\n\n\n\tOkay We'r Gonna Check if your Preferred Ticket is Available :)\n\t";
dash_loop();
clrscr();
cout<<"\n\n\t\t\t Select your Departure City";
cout<<"\n\n";
cout<<" **********************************************************************\n";
cout<<" | *----------------------------------------------------------------* |\n";
cout<<" | | 1.Barcelona | 10.CapeTown | 19.NewYork | 28.Paris | 37.Mumbai | |\n";
cout<<" | | 2.LosAngeles| 11.Monteral | 20.Karachi | 29.Delhi | 38.Indore | |\n";
cout<<" | | 3.Bangalore | 12.Shanghai | 21.Jakarta | 30.Dhaka | 39.Beijing | |\n";
cout<<" | | 4.Hong Kong | 13.Kolkata | 22.Lucknow | 31.Cairo | 40.London | |\n";
cout<<" | | 5.Hyderabad | 14.Amritsar | 23.Aligarh | 32.Hanoi | 41.Bangkok | |\n";
cout<<" | | 6.Ahmedabad | 15.Singapore| 24.Lahore | 33.Patna | 42.Chennai | |\n";
cout<<" | | 7.Trivandram| 16.Istanbul | 25.Riyadh | 34.Pune | 43.Bhopal | |\n";
cout<<" | | 8.Visha..am | 17.Santiago | 26.Durban | 35.Surat | 44.Jaipur | |\n";
cout<<" | | 9.Abu Dhabi | 18.Fujairah | 27.Al-Ain | 36.Dubai | 45.Sharjah | |\n";
cout<<" | *----------------------------------------------------------------* |\n";
cout<<" **********************************************************************\n";
cout<<"\n Flying From [ Enter City NAME ] : ";
gets(temp);
strcpy(flyingfrom,strlwr(temp));
load();
clrscr();
cout<<"\n\t\t\t Select your Arrival City";
cout<<"\n\n";
cout<<" **********************************************************************\n";
cout<<" | *----------------------------------------------------------------* |\n";
cout<<" | | 1.Barcelona | 10.CapeTown | 19.NewYork | 28.Paris | 37.Mumbai | |\n";
cout<<" | | 2.LosAngeles| 11.Monteral | 20.Karachi | 29.Delhi | 38.Indore | |\n";
cout<<" | | 3.Bangalore | 12.Shanghai | 21.Jakarta | 30.Dhaka | 39.Beijing | |\n";
cout<<" | | 4.Hong Kong | 13.Kolkata | 22.Lucknow | 31.Cairo | 40.London | |\n";
cout<<" | | 5.Hyderabad | 14.Amritsar | 23.Aligarh | 32.Hanoi | 41.Bangkok | |\n";
cout<<" | | 6.Ahmedabad | 15.Singapore| 24.Lahore | 33.Patna | 42.Chennai | |\n";
cout<<" | | 7.Trivandram| 16.Istanbul | 25.Riyadh | 34.Pune | 43.Bhopal | |\n";
cout<<" | | 8.Visha..am | 17.Santiago | 26.Durban | 35.Surat | 44.Jaipur | |\n";
cout<<" | | 9.Abu Dhabi | 18.Fujairah | 27.Al-Ain | 36.Dubai | 45.Sharjah | |\n";
cout<<" | *----------------------------------------------------------------* |\n";
cout<<" **********************************************************************\n";
cout<<"\n\n Flying To :[ Enter City NAME ] : ";
gets(temp);
strcpy(flyingto,strlwr(temp));
load();
clrscr();
int a=1;
int b=2;
int c=3;
int d=4;
int e=5;
int f=6;
int g=7;
int h=8;
int i=9;
int j=10;
int k=11;
int l=12;
cout<<"\n\tEnter the Month of Departure [ In Digits ] : ";
cin>>depmonth;
clrscr();
if(depmonth<=12)
{
if(depmonth==a || depmonth==c || depmonth==e || depmonth==g || depmonth==h || depmonth==j || depmonth==l)
{
clrscr();
cout<<"\t*--------------------------------------------------------------*";
cout<<"\n\t| SUN | MON | TUES | WED | THU | FRI | SAT |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 1 | 2 | 3 | 4 | 5 | 6 | 7 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 8 | 9 | 10 | 11 | 12 | 13 | 14 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 15 | 16 | 17 | 18 | 19 | 20 | 21 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 22 | 23 | 24 | 25 | 26 | 27 | 28 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 29 | 30 | 31 | | | | |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
}
if(depmonth==d || depmonth==f || depmonth==i || depmonth==k )
{
clrscr();
cout<<"\t*--------------------------------------------------------------*";
cout<<"\n\t| SUN | MON | TUES | WED | THU | FRI | SAT |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 1 | 2 | 3 | 4 | 5 | 6 | 7 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 8 | 9 | 10 | 11 | 12 | 13 | 14 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 15 | 16 | 17 | 18 | 19 | 20 | 21 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 22 | 23 | 24 | 25 | 26 | 27 | 28 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 29 | 30 | 30 | | | | |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
}
if(depmonth==b)
{
clrscr();
cout<<"\t*--------------------------------------------------------------*";
cout<<"\n\t| SUN | MON | TUES | WED | THU | FRI | SAT |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 1 | 2 | 3 | 4 | 5 | 6 | 7 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 8 | 9 | 10 | 11 | 12 | 13 | 14 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 15 | 16 | 17 | 18 | 19 | 20 | 21 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t| 22 | 23 | 24 | 25 | 26 | 27 | 28 |";
cout<<"\n\t| | | | | | | |";
cout<<"\n\t*--------------------------------------------------------------*";
}
cout<<"\n\t\t\t\tSelect a Departure Date : ";
cin>>depday;
if(depday<=31)
{
clrscr();
cout<<"\n\tEnter the Year : ";
cin>>depyear;
clrscr();
cout<<"\n\n\n\tBooking tickets for "<<depday<<"/"<<depmonth<<"/"<<depyear;
cout<<"\n\n\tPress a Key to Continue.....";
getch();
clrscr();
cout<<"\n\n\tChecking Availability for your selected input\n\n";
load();
cout<<"\n\n\n\tYour Selected Date and Locations are Available in our Database. ";
getch();
clrscr();
cout<<"\n\n\tThese are details for your preferred Ticket :- ";
cout<<"\n\n\n\n\t\tFlying From : "<<flyingfrom;
cout<<"\n\n\t\tFlying To : "<<flyingto;
cout<<"\n\n\t\tDate of Departure :"<<depday<<"/"<<depmonth<<"/"<<depyear;
delay(1500);
cout<<"\n\n\n\n\t\tPress a Key to Continue....";
getch();
clrscr();
char airline[20];
char temp5[20];
airlines();
cout<<"\n\n\n\t\tInput Airlines Name : ";
gets(temp5);
strcpy(airline,strlwr(temp5));
char ab1[20]="emirates";
char ab2[20]="etihad";
char ab3[20]="jet airways";
char ab4[20]="qatar airways";
char ab5[20]="air arabia";
char ab6[20]="go indigo";
char ab7[20]="gulf air";
char ab8[20]="air india";
char ab9[20]="british airways";
char ab10[20]="indian airlines";
char ab11[20]="kingfisher";
char ab12[20]="air canada";
int flag=0;
if(strcmp(airline,ab1)==0)
{
flag=1;
}
if(strcmp(airline,ab2)==0)
{
flag=1;
}
if(strcmp(airline,ab3)==0)
{
flag=1;
}
if(strcmp(airline,ab4)==0)
{
flag=1;
}
if(strcmp(airline,ab5)==0)
{
flag=1;
}
if(strcmp(airline,ab6)==0)
{
flag=1;
}
if(strcmp(airline,ab7)==0)
{
flag=1;
}
if(strcmp(airline,ab8)==0)
{
flag=1;
}
if(strcmp(airline,ab9)==0)
{
flag=1;
}
if(strcmp(airline,ab10)==0)
{
flag=1;
}
if(strcmp(airline,ab11)==0)
{
flag=1;
}
if(strcmp(airline,ab12)==0)
{
flag=1;
}
if(flag==0)
{
clrscr();
cout<<"\n\n\n\t\t\tInvalid Input";
cout<<"\n\n\t\t\tPlease Start over again";
cout<<"\n\n\t\t\tPress a key to continue...";
getch();
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
menu();
}
clrscr();
float price;
char fclass[15];
char a4[10]="economy";
char b4[15]="business";
char c4[10]="first";
char temp3[15];
cout<<"\n\n\t";
cout<<"\n\t\t\t*-------------------------*";
cout<<"\n\t\t\t| Flight Class |";
cout<<"\n\t\t\t*-------------------------|";
cout<<"\n\t\t\t| Economy - 899 Dhs |";
cout<<"\n\t\t\t| Business - 1400 Dhs |";
cout<<"\n\t\t\t| First - 2300 Dhs |";
cout<<"\n\t\t\t*-------------------------*";
cout<<"\n\n\t\tWhich Class would you like to select : ";
gets(temp3);
strcpy(fclass,strlwr(temp3));
if(strcmp(fclass,a4)==0)
{
price=900;
}
if(strcmp(fclass,b4)==0)
{
price=1400;
}
if(strcmp(fclass,c4)==0)
{
price=2300;
}
clrscr();
int promocheck;
int promocode;
float pricediff;
float tempprice;
cout<<"\n\n\tDo you have a Promo Code for Discounts ? [ Yes = 1 | No = 2]";
cout<<"\n\n\t\tYour Input : ";
cin>>promocheck;
clrscr();
if(promocheck==1)
{
cout<<"\n\n\n\n\tEnter your 4 Digit Numeric Promo Code : ";
cin>>promocode;
load();
if(promocode%2==0)
{
tempprice=price;
price=0.9*price;
pricediff=tempprice-price;
load();
clrscr();
cout<<"\n\n\t\tVALID Promo Code !!\n\n ";
cout<<"\n\n\tActual Price : "<<tempprice<<" AED ";
cout<<"\n\n\tDiscount Given : "<<pricediff<<" AED ( 10 % ) ";
cout<<"\n\n\tDiscounted Price : "<<price<<" AED ";
}
else
cout<<"\n\n\t\tInvalid Promo Code !!";
getch();
}
clrscr();
select_time();
char flightcode[15];
cout<<"\n\n\tEnter your Selected Flight : ";
gets(flightcode);
for(int z=0;flightcode[z];z++)
{
if(isalpha(flightcode[z]))
flightcode[z]=toupper(flightcode[z]);
}
clrscr();
char a[10]="G96043";
char b[10]="G96056";
char c[10]="G86057";
char d[10]="G16143";
char e[10]="G26243";
char f[10]="G96443";
char g[10]="G76043";
char h[10]="G96044";
char i[10]="G16353";
char j[10]="G46043";
char k[10]="G36437";
int a1=0;
int b1=0;
int stops=0;
int gate=0;
if(strcmp(flightcode,a)==0)
{
a1=1;
b1=4;
stops=0;
gate=2;
}
if(strcmp(flightcode,b)==0)
{
a1=3;
b1=16;
stops=2;
gate=5;
}
if(strcmp(flightcode,c)==0)
{
a1=2;
b1=6;
stops=1;
gate=16;
}
if(strcmp(flightcode,d)==0)
{
a1=6;
b1=9;
stops=0;
gate=9;
}
if(strcmp(flightcode,e)==0)
{
a1=15;
b1=18;
stops=0;
gate=18;
}
if(strcmp(flightcode,f)==0)
{
a1=18;
b1=23;
stops=1;
gate=3;
}
if(strcmp(flightcode,g)==0)
{
a1=24;
b1=4;
stops=1;
gate=22;
}
if(strcmp(flightcode,h)==0)
{
a1=12;
b1=15;
stops=0;
gate=13;
}
if(strcmp(flightcode,i)==0)
{
a1=18;
b1=22;
stops=1;
gate=17;
}
if(strcmp(flightcode,j)==0)
{
a1=22;
b1=1;
stops=0;
gate=23;
}
if(strcmp(flightcode,k)==0)
{
a1=04;
b1=07;
stops=0;
gate=13;
}
cout<<"\n\n\tDeparture Time : "<<a1<<":00 Hrs.";
cout<<"\n\n\tArrival Time : "<<b1<<":00 Hrs.";
cout<<"\n\n\tYour Selected Flight has "<<stops<<" Stops";
cout<<"\n\n\tProceed to Gate "<<gate<<" after checking in.";
getch();
char name[25];
char nationality[15];
char cor[20];
char mobno[15];
char email[25];
char seat[10];
int baggage;
clrscr();
cout<<"\n\n\tNow its time for filling in your info so we can book your ticket";
cout<<"\n\n\n\n\tEnter your Name : ";
gets(name);
cout<<"\n\tEnter your Nationality : ";
cin>>nationality;
cout<<"\n\tEnter your Country of Residence : ";
cin>>cor;
cout<<"\n\tEnter your Mobile Number : ";
cin>>mobno;
cout<<"\n\tEnter your Email Address : ";
cin>>email;
cout<<"\n\n\t";
dash_loop();
clrscr();
cout<<"\n\n\n\t\t\tNow Lets go to Personalization. ";
cout<<"\n\n\nPlease Note : Max. Weight allowed per Baggage is 32 Kg and Max. Dimensions";
cout<<"\n\ of 160 cm.";
cout<<"\n\n\n\tBaggage Preference ";
cout<<"\n\n\t[ 20 Kg = 25 Dhs | 30 Kg = 50 Dhs | 40 Kg = 100 Dhs ]";
cout<<"\n\n\tWhich option would you like to opt for :- ";
cout<<"\n\n\t[Do not type Kg , just enter 20, 30 or 40]";
cout<<"\n\n\n\tYour Input Please = ";
cin>>baggage;
clrscr();
seat_select();
cout<<"\n\t\tEnter your selected Seat Code [example: B2] : ";
gets(temp);
strcpy(seat,strupr(temp));
clrscr();
cout<<"\n\n\tDisplayed Below are your final details.\n\tPlease check them before making the payment through our secure servers.";
cout<<"\n\n\n\n\n\t\t\t\tPersonal Details ";
cout<<"\n\n\tName : ";
puts(name);
cout<<"\tNationality : "<<nationality;
cout<<"\n\tCounrty of Residence : "<<cor;
cout<<"\n\tEmail Address : "<<email;
cout<<"\n\tMobile Number : "<<mobno;
getch();
clrscr();
cout<<"\n\n\n\t\t\t Flight Details ";
cout<<"\n\n\tDeparture City : "<<flyingfrom;
cout<<"\n\tArrival City : "<<flyingto;
cout<<"\n\tDate of Departure : "<<depday<<"/"<<depmonth<<"/"<<depyear;
cout<<"\n\tDeparture Time : "<<a1<<":00 Hrs.";
cout<<"\n\tArrival Time : "<<b1<<":00 Hrs.";
cout<<"\n\tAirlines : "<<airline;
cout<<"\n\tFlight Class : "<<fclass<<" Class";
cout<<"\n\tPrice : "<<price<<" Dhs";
cout<<"\n\tNumber of Stops : "<<stops<<" Stops";
cout<<"\n\tGate Number : "<<gate;
cout<<"\n\tFlight Code : "<<flightcode;
cout<<"\n\tSeat Selected : "<<seat;
cout<<"\n\tBaggage Allocated : "<<baggage<<" Kg";
cout<<"\n\n\n\tWe got it all correct ? Press a key to Continue ......... ";
getch(); clrscr();
cout<<"\n\n\n\n";
cout<<"\n\t\t\t*---------------------------------*";
cout<<"\n\t\t\t| Billing System |";
cout<<"\n\t\t\t|---------------------------------|";
cout<<"\n\t\t\t| No. of Passengers | x 1 |";
cout<<"\n\t\t\t| Cost of Ticket | "<<tempprice<<" AED |";
cout<<"\n\t\t\t| Promo Code Used | "<<promocode<<" |";
cout<<"\n\t\t\t| Amount of Discount | "<<pricediff<<" AED |";
cout<<"\n\t\t\t| Tax Applied | 0 AED |";
cout<<"\n\t\t\t|---------------------------------|";
cout<<"\n\t\t\t| | |";
cout<<"\n\t\t\t| Total Amount Pending | "<<price<<" AED |";
cout<<"\n\t\t\t| | |";
cout<<"\n\t\t\t*---------------------------------*";
cout<<"\n\n\n\n\t\t\tPress a Key to continue......";
getch();
ticket_id();
payment();
clrscr();
}
else
{
clrscr();
cout<<"\n\n\tInvalid Date ! Please Start over again !";
getch();
}
}
else
{
cout<<"\n\n\tInvalid Month ! Please Start Over Again";
getch();
}
}
void menu()
{
closegraph();
int input;
clrscr();
int driver,mode;
driver=DETECT;
initgraph(&driver,&mode,"c:\\turboc3\\bgi");
setcolor(RED);
for(int i=100,j=500,a=100,b=500;i<300;i++,j--,a++,b--)
{
outtextxy(i,350,"|");
outtextxy(j,350,"|");
outtextxy(a,70,"|");
outtextxy(b,70,"|");
delay(2);
}
for(int q=75,p=75;q<350;q++,p++)
{
outtextxy(100,q,"l");
outtextxy(500,p,"l");
delay(2);
}
settextstyle(8,0,3);
setcolor(WHITE);
outtextxy(210,80," < Menu > ");
settextstyle(10,0,1);
setcolor(RED);
for(int s=220;s<350;s++)
{
outtextxy(s,110,"-");
delay(2);
}
settextstyle(3,0,1);
setcolor(WHITE);
outtextxy(215,140,"1. Book a Ticket ");
delay(100);
outtextxy(215,165,"2. Modify a Ticket");
delay(100);
outtextxy(215,190,"3. Cancel your Ticket");
delay(100);
outtextxy(215,215,"4. Check Ticket Status");
delay(100);
outtextxy(215,240,"5. Display all Booked Tickets");
delay(100);
outtextxy(215,265,"6. About Us");
delay(100);
outtextxy(215,290,"7. Contact Us");
delay(100);
outtextxy(215,315,"8. Exit the Program");
delay(100);
settextstyle(6,0,3);
outtextxy(140,380,"What would you like to do ?");
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t";
cin>>input;
closegraph();
switch(input)
{
case 1 : clrscr();
book_ticket();
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
menu();
break;
case 2 : clrscr();
modify_ticket();
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
menu();
break;
case 3 : clrscr();
cancel_ticket();
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
menu();
break;
case 6 : clrscr();
about_us();
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
menu();
break;
case 4 : clrscr();
status_check();
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
menu();
break;
case 8 : clrscr();
cout<<"\n\n\n\n\n\n\n\n\t\t\tThank you for using our program";
delay(2500);
exit(0);
clrscr();
case 5 : clrscr();
display_all_booked();
clrscr();
int dba;
cout<<"\n\n\n\t\tWould you like to check more Tickets?";
cout<<"\n\n\t\t\t[ Yes = 1 | No = 2 ]";
cout<<"\n\n\t\t\tInput = ";
cin>>dba;
switch(dba)
{
case 1 : clrscr();
display_all_booked();
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
menu();
break;
case 2 : cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
menu();
break;
}
break;
case 7 : clrscr();
contact_us();
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
menu();
break;
}
}
//**********************************************
// Welcome Loop
//**********************************************
void welcome()
{
clrscr();
int driver=DETECT, mode;
initgraph(&driver,&mode,"c:\\turboc3\\bgi");
setcolor(10);
setbkcolor(4);
settextstyle(3,0,8);
outtextxy(220,100," MSA ");
outtextxy(80,180,"Travel Agency");
setcolor(1);
settextstyle(8,0,4);
outtextxy(110,320,"- Pay Less , Fly More -");
char lod[]={'L','O','A','D','I','N','G','.','.','.','.','.'};
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
cout<<"\t\t\t";
for(int i=0;i<12;i++)
{ cout<<lod[i]<<" ";
delay(400);
}
clrscr();
}
void features()
{
clrscr();
cout<<"\n\n\t01 : Feature to Book a Ticket.";
cout<<"\n\n\t02 : Feature to Modify a Ticket.";
cout<<"\n\n\t03 : Feature to Cancel a Ticket.";
cout<<"\n\n\t04 : Feature to Check the Status of the booked ticket.";
cout<<"\n\n\t05 : Feature to Display all the Booked Tickets.";
cout<<"\n\n\t06 : Created Tabular Columns where ever possible for better output.";
cout<<"\n\n\t07 : The Program is coded in such a way so that using Upper Case ";
cout<<"\n\t while input wont be a problem.";
cout<<"\n\n\t08 : The Program is a Infinite Loop so it will Display the Main Menu";
cout<<"\n\t again after Executing a particular Feature and Wont Quit after a ";
cout<<"\n\t Single Execution.";
cout<<"\n\n\n\t\t\t Press a key to scroll down...";
getch();
clrscr();
cout<<"\n\n\t09 : Lots of Functions used to keep the coding simple to understand.";
cout<<"\n\n\t10 : Program Indented Properly for better understanding.";
cout<<"\n\n\t11 : Comments added for better understanding.";
cout<<"\n\n\t12 : Tabular structure created resemling to a Seat Selection structure.";
cout<<"\n\n\t13 : About Us Page Created.";
cout<<"\n\n\t14 : Contact Us Page Created.";
cout<<"\n\n\t15 : Payment System Created with options of Credit Card , DB and Paypal.";
cout<<"\n\t16 : Unique Login System Created with options of New User , Guest";
cout<<"\n\t or Administrator.";
cout<<"\n\n\t17 : Unique Calender created for Date Selection for every month.";
cout<<"\n\n\n\t\t\t Press a key to scroll down...";
getch();
clrscr();
cout<<"\n\n\t18 : Entering a Invalid Month or Day will not be accepted by the";
cout<<"\n\t program and will return the user to the main menu.";
cout<<"\n\n\t19 : Extra Feature added in Billing - Promo Code.";
cout<<"\n\n\t20 : After selection of the Flight , The program also displays";
cout<<"\n\t the Gate No. and the No. of stops for the flight.";
cout<<"\n\n\t21 : Feature of Baggage Preferrance added.";
cout<<"\n\n\t22 : Personal Info taken in from the user for booking his ticket.";
cout<<"\n\n\t23 : Displays the data input by the user at frequent intervals.";
cout<<"\n\n\t24 : Welcome Page with Graphics.";
cout<<"\n\n\t25 : Has a main menu from which the user can Run the Program, View ";
cout<<"\n\t the source code , header files & functions used in it.";
getch();
clrscr();
cout<<"\n\n\t26 : A Billing System has been created which displays the final";
cout<<"\n\t amount to be paid by the user.";
cout<<"\n\n\n\t\tThank you , Press a key to return to the Main menu...";
getch();
}
void headers()
{
clrscr();
cout<<"\n";
cout<<"\n\n\t\t#include<iostream.h>";
cout<<"\n\n\t\t#include<conio.h>";
cout<<"\n\n\t\t#include<stdio.h>";
cout<<"\n\n\t\t#include<dos.h>";
cout<<"\n\n\t\t#include<string.h>";
cout<<"\n\n\t\t#include<ctype.h>";
cout<<"\n\n\t\t#include<iomanip.h>";
cout<<"\n\n\t\t#include<process.h>";
cout<<"\n\n\t\t#include<graphics.h>";
cout<<"\n\n\n\t\tPress a key to return to the main menu...";
getch();
}
void functions()
{
clrscr();
cout<<"\n\t01 : Intro - Displays the 1st output of the program";
cout<<"\n\t02 : Load2 - Displays the Loading Characters";
cout<<"\n\t03 : Airlines - Displays the loop to select Airlines";
cout<<"\n\t04 : Saving - Displays the Saving Characters";
cout<<"\n\t05 : Displayforx - Displays the Information for x Ticket";
cout<<"\n\t06 : DisAllBooked - Displays All Booked Tickets Menu";
cout<<"\n\t07 : Modify_ticket - Modify Ticket Function";
cout<<"\n\t08 : Seat_select - Seat Selection Function";
cout<<"\n\t09 : Dash_loop - Displays Dash Loop for better Output";
cout<<"\n\t10 : Load - Displays the Loading Characters slowly";
cout<<"\n\t11 : Select_time - Displays the Time Selection Function";
cout<<"\n\t12 : Contact_us - Displays the Contact us function";
cout<<"\n\t13 : About_us - Displays the About us function";
cout<<"\n\t14 : Ticket_id - Assign's The Ticket ID";
cout<<"\n\t15 : Cancel_ticket - Cancels a Ticket";
cout<<"\n\t16 : Status_check - Checks the Status of the Ticket";
cout<<"\n\t17 : Payment - Billing Section of the Program";
cout<<"\n\t18 : Pass_check - Login System of the Program";
cout<<"\n\t19 : Book_ticket - Booking the Ticket Here";
cout<<"\n\t20 : Menu - Displays the Menu of the Program";
cout<<"\n\t21 : Welcome - Displays the Welcome Loop ";
cout<<"\n\t22 : Feature - Displays the Features of the Program";
cout<<"\n\t23 : Main - The Main loop of the Program "; cout<<"\n\n\t\tPress a key to return to the Main menu...";
getch();
}
//**********************************************
// MAIN STRUCTURE
//**********************************************
void main()
{
//intro();
int xyz;
clrscr();
int driver,mode;
driver=DETECT;
initgraph(&driver,&mode,"c:\\turboc3\\bgi");
setcolor(RED);
for(int i=0,j=600,a=0,b=600;i<300;i++,j--,a++,b--)
{
outtextxy(i,350,"|");
outtextxy(j,350,"|");
outtextxy(a,70,"|");
outtextxy(b,70,"|");
delay(2);
}
for(int q=75,p=75;q<350;q++,p++)
{
outtextxy(0,q,"l");
outtextxy(599,p,"l");
delay(2);
}
settextstyle(8,0,3);
setcolor(WHITE);
outtextxy(210,80," < Menu > ");
settextstyle(10,0,3);
setcolor(RED);
for(int s=220;s<350;s++)
{
outtextxy(s,110,"-");
delay(2);
}
settextstyle(3,0,2);
setcolor(WHITE);
outtextxy(130,150,"1. Run the Airline Database");
delay(100);
outtextxy(130,180,"2. View the Features of the Program");
delay(100);
outtextxy(130,210,"3. View the Limitations of the Program");
delay(100);
outtextxy(130,240,"4. View the Source Code");
delay(100);
outtextxy(130,270,"5. View the Header Files and Functions");
delay(100);
outtextxy(130,300,"6. Exit");
delay(100);
settextstyle(6,0,3);
outtextxy(130,380,"What would you like to do ?");
cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t";
cin>>xyz;
closegraph();
clrscr();
switch(xyz)
{
case 1 : welcome();
menu();
break;
case 2 : features();
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
main();
break;
case 3 : clrscr();
cout<<"\n\n\n\t01 : Only 1 Ticket can be booked at a time.";
cout<<"\n\n\t02 : Only Single Way Tickets can be booked";
cout<<"\n\n\t03 : More to be added ! ";
cout<<"\n\n\n\t\tPress a key to return to the main menu...";
getch();
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
main();
break;
case 4 : cout<<"\n\n\n\n\n\n\n\n\t\tGet the source code on www.AirlinesSourceCode.tk";
getch();
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
main();
break;
case 5 : cout<<"\n\n\n\n\t\t\t1. Header Files Used";
cout<<"\n\n\t\t\t2. Functios Used";
cout<<"\n\n\n\t\t\tInput : ";
int x1y;
cin>>x1y;
switch(x1y)
{
case 1 : headers();
break;
case 2 : functions();
break;
default :clrscr();
cout<<"\n\n\n\n\t\tInvalid Input - Press a key to return to Main Menu ";
getch();
break;
}
clrscr();
cout<<"\n\n\n\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
main();
break;
case 6 : clrscr();
cout<<"\n\n\n\n\n\n\n\n\t\t\tThank you for using our program";
delay(500);
exit(0);
break;
default: cout<<"\n\n\n\t\t\tInvalid Input !";
cout<<"\n\n\t\t\tReturning to the Main Menu";
cout<<"\n\n\n\t\t\t";
load();
main();
break;
}
}






0 comments:
Post a Comment