#include<iostream>
#include<windows.h>
using namespace std;
class linklist
{
private:
int no;
public:
linklist()
{
no = 0;
}
void display_menu()
{
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
int k;
system("CLS");
k = 10;
SetConsoleTextAttribute(hConsole, k);
for (int i = 0; i < 150; i++) { cout << "\t"; }
cout << char(201); for (int i = 0; i < 25; i++) { cout << char(205); } cout << char(187) << endl;
for (int i = 0; i < 6; i++) { cout << "\t"; }
cout << char(186) << " " << char(186) << endl;
for (int i = 0; i < 6; i++) { cout << "\t"; }
k = 4;
SetConsoleTextAttribute(hConsole, k);
cout << char(186) << " Welcome to Menu " << char(186) << endl;
k = 10;
SetConsoleTextAttribute(hConsole, k);
for (int i = 0; i < 6; i++) { cout << "\t"; }
cout << char(186) << " " << char(186) << endl;
for (int i = 0; i < 6; i++) { cout << "\t"; }
cout << char(200); for (int i = 0; i < 25; i++) { cout << char(205); } cout << char(188) << endl;
for (int i = 0; i < 6; i++) { cout << "\t"; }
cout << char(218); for (int i = 0; i < 25; i++) { cout << char(196); } cout << char(191) << endl;
for (int i = 0; i < 6; i++) { cout << "\t"; }
k = 4;
SetConsoleTextAttribute(hConsole, k);
cout << char(179) << " 1.New customer " << char(179) << endl;
k = 10;
SetConsoleTextAttribute(hConsole, k);
for (int i = 0; i < 6; i++) { cout << "\t"; }
cout << char(192); for (int i = 0; i < 25; i++) { cout << char(196); } cout << char(217) << endl;
for (int i = 0; i < 6; i++) { cout << "\t"; }
cout << char(218); for (int i = 0; i < 25; i++) { cout << char(196); } cout << char(191) << endl;
for (int i = 0; i < 6; i++) { cout << "\t"; }
k = 4;
SetConsoleTextAttribute(hConsole, k);
cout << char(179) << " 2.Existing Customer " << char(179) << endl;
k = 10;
SetConsoleTextAttribute(hConsole, k);
for (int i = 0; i < 6; i++) { cout << "\t"; }
cout << char(192); for (int i = 0; i < 25; i++) { cout << char(196); } cout << char(217) << endl;
for (int i = 0; i < 6; i++) { cout << "\t"; }
cout << char(218); for (int i = 0; i < 25; i++) { cout << char(196); } cout << char(191) << endl;
for (int i = 0; i < 6; i++) { cout << "\t"; }
k = 4;
SetConsoleTextAttribute(hConsole, k);
cout << char(179) << " 3.Update Customer " << char(179) << endl;
k = 10;
SetConsoleTextAttribute(hConsole, k);
for (int i = 0; i < 6; i++) { cout << "\t"; }
cout << char(192); for (int i = 0; i < 25; i++) { cout << char(196); } cout << char(217) << endl;
for (int i = 0; i < 6; i++) { cout << "\t"; }
cout << char(218); for (int i = 0; i < 25; i++) { cout << char(196); } cout << char(191) << endl;
for (int i = 0; i < 6; i++) { cout << "\t"; }
k = 4;
SetConsoleTextAttribute(hConsole, k);
cout << char(179) << " 4.Delete Customer " << char(179) << endl;
k = 10;
SetConsoleTextAttribute(hConsole, k);
for (int i = 0; i < 6; i++) { cout << "\t"; }
cout << char(192); for (int i = 0; i < 25; i++) { cout << char(196); } cout << char(217) << endl;for (int i = 0; i < 6; i++) { cout << "\t"; }
cout << char(218); for (int i = 0; i < 25; i++) { cout << char(196); } cout << char(191) << endl;
for (int i = 0; i < 6; i++) { cout << "\t"; }
k = 4;
SetConsoleTextAttribute(hConsole, k);
cout << char(179) << " 5.Exist " << char(179) << endl;
k = 10;
SetConsoleTextAttribute(hConsole, k);
for (int i = 0; i < 6; i++) { cout << "\t"; }
cout << char(192); for (int i = 0; i < 25; i++) { cout << char(196); } cout << char(217) << endl;
/*switch(no)
{
case 1:
new_customer();
case 2:
existing_customer();
case 3:
update_customer();
case 4:
delete_customer();
case 5:
exist(0);
default
{
cout<<"\n\t\trecord not found";
}*/
}
};
int main()
{
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
int k ;
string ch;
int n;
linklist obj;
/*system("color 1f");*/
k = 10;
SetConsoleTextAttribute(hConsole, k);
for (int i = 0; i < 150; i++) {cout << "\t";}
cout << char(201); for (int i = 0; i < 25; i++) { cout << char(205); } cout << char(187) << endl;
for (int i = 0; i < 6; i++) { cout << "\t"; }
cout << char(186) << " " << char(186) << endl;
for (int i = 0; i < 6; i++) {cout << "\t";}
k = 4;
SetConsoleTextAttribute(hConsole, k);
cout << char(186) << " Bank Managment System " << char(186) << endl;
k = 10;
SetConsoleTextAttribute(hConsole, k);
for (int i = 0; i < 6; i++) { cout << "\t"; }
cout << char(186) << " " << char(186) << endl;
for (int i = 0; i < 6; i++) { cout << "\t"; }
cout << char(200); for (int i = 0; i < 25; i++) { cout << char(205); } cout << char(188) << endl;
for (int i = 0;i < 3;++i)
{
k = 10;
SetConsoleTextAttribute(hConsole, k);
for (int i = 0; i < 6; i++) { cout << "\t"; }
cout << char(218); for (int i = 0; i < 25; i++) { cout << char(196); } cout << char(191) << endl;
for (int i = 0; i < 6; i++) { cout << "\t"; }
k = 4;
SetConsoleTextAttribute(hConsole, k);
cout << char(179) << " Enter the ID " << char(179) << endl;
k = 10;
SetConsoleTextAttribute(hConsole, k);
for (int i = 0; i < 6; i++) { cout << "\t"; }
cout << char(192); for (int i = 0; i < 25; i++) { cout << char(196); } cout << char(217)<<" " ;
k = 4;
SetConsoleTextAttribute(hConsole, k);
cout << endl;
for (int i = 0; i < 6; i++) { cout << "\t"; }
cin >> ch;
k = 10;
SetConsoleTextAttribute(hConsole, k);
for (int i = 0; i < 6; i++) { cout << "\t"; }
cout << char(218); for (int i = 0; i < 25; i++) { cout << char(196); } cout << char(191) << endl;
for (int i = 0; i < 6; i++) { cout << "\t"; }
k = 4;
SetConsoleTextAttribute(hConsole, k);
cout << char(179) << " Enter the password " << char(179) << endl;
k = 10;
SetConsoleTextAttribute(hConsole, k);
for (int i = 0; i < 6; i++) { cout << "\t"; }
cout << char(192); for (int i = 0; i < 25; i++) { cout << char(196); } cout << char(217) << " ";
k = 4;
SetConsoleTextAttribute(hConsole, k);
cout << endl;
for (int i = 0; i < 6; i++) { cout << "\t"; }
cin >> n;
if (ch == "admin" && n == 0000)
{
obj.display_menu();
break;
}
else if (i == 0)
{
k = 3;
SetConsoleTextAttribute(hConsole, k);
cout << "\n\t\t\t\t\t\tYou have 2nd last chance!";
for (int i = 0; i < 7; i++) { cout << "\t"; }
}
else if (i == 1)
{
k = 3;
SetConsoleTextAttribute(hConsole, k);
cout << "\n\t\t\t\t\t\tYou have last chance! ";
for (int i = 0; i < 7; i++) { cout << "\t"; }
}
else
{
system("CLS");
k = 4;
SetConsoleTextAttribute(hConsole, k);
for (int i = 0; i < 7; i++) { cout << "\t"; }
cout << "Please Try Again ('-')";
}
}
}