-
Notifications
You must be signed in to change notification settings - Fork 0
/
clsScreen.h
44 lines (37 loc) · 1.19 KB
/
clsScreen.h
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
#pragma once
#include <iostream>
#include <iomanip>
#include "clsUser.h"
#include "Global.h"
#include "clsAddDate.h"
using namespace std;
class clsScreen
{
protected:
static void _DrawScreenHeader(string Title, string SubTitle = "")
{
cout << right << setw(82) << "___________________________________________\n";
cout << "\n\t\t\t\t\t " << Title << endl;
if (SubTitle != "")
{
cout << "\n\t\t\t\t\t " << SubTitle << endl;
}
cout << right << setw(82) << "___________________________________________\n\n";
cout << right << setw(45) << "User : " << clsAddDate::LoggedCurrentUser() << endl;
cout << right << setw(48) << clsAddDate::GetDate() << "\n\n ";
}
static bool CheckAccessRights(clsUser::enPermissions Permission)
{
if (!CurrentUser.CheckAccessPermission(Permission))
{
cout << "\t\t\t\t\t______________________________________";
cout << "\n\n\t\t\t\t\t Access Denied! Contact your Admin.";
cout << "\n\t\t\t\t\t______________________________________\n\n";
return false;
}
else
{
return true;
}
}
};