-
Notifications
You must be signed in to change notification settings - Fork 1
/
welcome.cpp
88 lines (76 loc) · 2.03 KB
/
welcome.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
File Name : welcome.cpp
Description :
Author : Garly Nugraha & Nazwa Fitriyani Zahra
Date : 08/12/2001
*/
/* ========== Header File ========== */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
#include <time.h>
#include "welcome.h"
#include "room.h"
#include "user.h"
#include "auth.h"
#include "about.h"
#include "faq.h"
#include "reservation.h"
#include "report.h"
/* ======= End of Header File ====== */
int Welcome()
{
time_t t;
int Menu, Answer;
struct tm now;
t = time(NULL);
now = *localtime(&t);
printf("Date : %s, %s %d, %d", DAY[now.tm_wday], MONTH[now.tm_mon], now.tm_mday, now.tm_year + 1900);
printf("\n\n");
printf("|==================================================|\n");
printf("| WELCOME TO ALOEVERA EDHOTEL |\n");
printf("|==================================================|\n");
printf("|1. Login |\n");
printf("|2. About |\n");
printf("|3. FAQ |\n");
printf("|4. Exit |\n");
printf("|==================================================|\n");
printf("| Copyright 2021 - Develop by Nedersoft |\n");
printf("|==================================================|\n");
printf("\n\n");
printf("Select Menu : ");
scanf("%d", &Menu);
system("cls");
switch (Menu){
case 1:
/* Call Modul Login */
Login();
break;
case 2:
/* Call Modul About */
About();
break;
case 3:
/* Call Modul FAQ */
FAQ();
break;
case 4:
printf("Are you sure? (Y/N)");
Answer = getche();
system("cls");
if (Answer == 'Y' || Answer == 'y'){
system("cls");
exit(1);
}
break;
default:
printf("ERROR : Sorry I don't know the answer to this one!!!\n");
printf("Press Any Key to continue . . .");
getche();
system("cls");
/* Call Modul Welcome */
Welcome();
break;
}
}