-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclsScreen.h
42 lines (36 loc) · 1.04 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
#pragma once
#include <iostream>
#include "Global.h"
#include "./important classes/clsUser.h"
#include "./libraries/clsDate.h"
using namespace std;
class clsScreen
{
protected:
static void _DrawScreenHeader(string Title, string SubTitle = "", bool showDateAndUserName = true)
{
cout << "___________________________________________";
cout << "\n\n " << Title;
if (SubTitle != "")
cout << "\n " << SubTitle;
cout << "\n___________________________________________\n\n";
if (showDateAndUserName)
{
cout << "User: " << CurrentUser.GetUserName() << endl;
cout << "Date: " << clsDate::DateToString(clsDate()) << endl
<< endl;
}
}
static bool CheckAccessRights(clsUser::enPermissions Permission)
{
if (!CurrentUser.CheckAccessPermission(Permission))
{
cout << "______________________________________";
cout << "\n\n Access Denied! Contact your Admin.";
cout << "\n______________________________________\n\n";
return false;
}
else
return true;
}
};