This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
dmspine64backup/DBAppV2.cpp

144 lines
2.8 KiB
C++
Raw Normal View History

2015-09-29 22:49:18 -05:00
#include <iostream>
2015-09-29 22:49:18 -05:00
using namespace std;
/*
2015-09-29 22:49:18 -05:00
void yourAccount()
{
cout<<"*********************************"<<endl;
cout<<"Your Account"<<endl;
cout<<"*********************************\n"<<endl;
cout<<"\n\nname: JOHN CENA"<<endl;
2015-09-29 22:49:18 -05:00
cout<<"other stuff related to this user\n\n"<<endl;
cout<<"0. Return to main menu"<<endl;
cout<<"\n\nEnter choice:";
2015-09-29 22:49:18 -05:00
}
void goToBoard()
{
cout<<"*********************************"<<endl;
2015-09-29 22:49:18 -05:00
cout<<"Board x"<<endl;
cout<<"*********************************\n"<<endl;
2015-09-29 22:49:18 -05:00
cout<<"0. Return to main menu"<<endl;
cout<<"3. back to board menu"<<endl;
2015-09-29 22:49:18 -05:00
cout<<"\n\nEnter choice:";
2015-09-29 22:49:18 -05:00
}
void boardList()
{
cout<<"\n\nShowing all boards:"<<endl;
2015-09-29 22:49:18 -05:00
cout<<"0. Return to main menu"<<endl;
cout<<"3. Return to board menu"<<endl;
2015-09-29 22:49:18 -05:00
cout<<"\n\nEnter choice:";
2015-09-29 22:49:18 -05:00
}
void boardMenu()
2015-09-29 22:49:18 -05:00
{
cout<<"*********************************"<<endl;
cout<<"Board Menu"<<endl;
cout<<"*********************************\n"<<endl;
cout<<"\n\n4. List of boards"<<endl;
cout<<"5. Go to board (enter shortcut[first few characters])"<<endl;
2015-09-29 22:49:18 -05:00
cout<<"0. Return to main menu"<<endl;
cout<<"\n\nEnter choice:";
2015-09-29 22:49:18 -05:00
}
void showMessages()
{
cout<<"Messages will be displayed soon"<<endl;
//do some stuff to display messages
cout<<"\n0. Return to main menu"<<endl;
2015-09-29 22:49:18 -05:00
cout<<"\n\nEnter choice:";
2015-09-29 22:49:18 -05:00
}
void showGroups()
{
cout<<"Groups will be displayed soon"<<endl;
cout<<"\n0. Return to main menu"<<endl;
cout<<"\n\nEnter choice:";
}
void newAccount()
{
cout<<"*********************************"<<endl;
cout<<"Request new account"<<endl;
cout<<"*********************************\n"<<endl;
cout<<"\n\nNew account generated"<<endl;
cout<<"\n8. Return to login menu"<<endl;
2015-09-29 22:49:18 -05:00
cout<<"\n\nEnter choice:";
2015-09-29 22:49:18 -05:00
}
void mainMenu()
{
cout<<"\n\n***************"<<endl;
cout<<"** Main Menu **"<<endl;
cout<<"***************\n"<<endl;
cout<<"\n6. Your account"<<endl;
cout<<"3. Boards"<<endl;
cout<<"2. Messages"<<endl;
cout<<"1. Groups\n"<<endl;
cout<<"8. Logout\n"<<endl;
cout<<"Enter choice: ";
}
void loginMenu()
{
cout<<"\n\n** Enter BBS **"<<endl;
cout<<"0. Login"<<endl;
cout<<"7. Request new account\n\n";
cout<<"-1. Exit\n\n"<<endl;
cout<<"Enter choice: ";
2015-09-29 22:49:18 -05:00
}
void eventHandler(int choice)
{
switch(choice)
{
case 0: mainMenu(); break;
case 1: showGroups(); break;
case 2: showMessages(); break;
case 3: boardMenu(); break;
case 4: boardList(); break;
case 5: goToBoard(); break;
case 6: yourAccount(); break;
case 7: newAccount(); break;
case 8: loginMenu(); break;
}
};
2015-09-29 22:49:18 -05:00
int main()
{
cout<<"***************************************"<<endl;
cout<<"Welcome to our BBS "<<endl;
cout<<"***************************************"<<endl;
eventHandler(8);
2015-09-29 22:49:18 -05:00
int choice;
while (choice != -1)
{
cin>>choice;
eventHandler(choice);
}
2015-09-29 22:49:18 -05:00
}
*/