-
Notifications
You must be signed in to change notification settings - Fork 0
/
administrator.cpp
80 lines (70 loc) · 1.94 KB
/
administrator.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
/*
File Name : administrator.cpp
Description :
Author : Garly Nugraha & Nazwa Fitriyani Zahra
Date : 01/01/2022
*/
/* ========== Header File ========== */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
#include <time.h>
#include "auth.h"
#include "user.h"
#include "administrator.h"
#include "welcome.h"
#include "room.h"
#include "reservation.h"
#include "report.h"
/* ======= End of Header File ====== */
int AdministratorMenu()
{
time_t t;
int menu, more;
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. User |\n");
printf("|2. Room |\n");
printf("|3. Report |\n");
printf("|4. Logout |\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 Menu User */
MenuUser();
break;
case 2:
/* Call Modul Menu Room */
MenuRoom();
break;
case 3:
/* Call Modul Menu Report */
ReportMenu();
break;
case 4:
/* Call Modul Logout */
Logout();
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 Menu Administrator */
AdministratorMenu();
break;
}
}