Advertisement
Guest User

OBCLS v0.3.1 w/ OIS v0.5.2

a guest
Jul 1st, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 19.97 KB | None | 0 0
  1. #define WIN32_LEAN_AND_MEAN
  2. #include "stdlib.h"
  3. #include <iostream>
  4. #include <string>
  5. #include <sstream>
  6. #include <fstream>
  7. #include <windows.h>
  8. using namespace std;
  9.  
  10. int main() {
  11.  
  12.     ifstream pswdchk ("OSIUser.setting");
  13.     string Password[5];
  14.     string Passload[5];
  15.     string NormPass;
  16.     string tocmd;
  17.     int Chickenvar=0;
  18.     int CMD=1;
  19.     string Choice;
  20.     string Title;
  21.     string style = "-";
  22.     string Bdr = "";
  23.     string Columnten = "";
  24.     string Columnten1 = "";
  25.     string Columnten2 = "";
  26.     string WaitColumn = "";
  27.     std::string opt1;
  28.     std::string opt2;
  29.     std::string opt3;
  30.     std::string opt4;
  31.     std::string opt5;
  32.     std::string opt6;
  33.     int Help=1;
  34.  
  35. loop:
  36.     system("color 3b");
  37.     if(CMD==0) {
  38.         cout <<"Invalid Command.\n\n>";
  39.     }
  40.     if (Chickenvar==1) {
  41.         cout << "\n\nKFC will rule the world! Now, who wants a tub of chicken?\n\nKFC Customer Detected>";
  42.     }
  43.     if (CMD==1) {
  44.         if (Chickenvar==0) {
  45.             if (Help==0) {
  46.                 cout <<"OBCLS Version 0.3.1\nType exit to quit.\n\n>";
  47.             }
  48.             if (Help==1) {
  49.                 cout <<"OBCLS Version 0.3.1\nNew? Type 'help' and press Enter.\n\n>";
  50.             }
  51.         }
  52.     }
  53.  
  54.     CMD=0;
  55.  
  56.     cin >>Choice;
  57.     if(Choice=="exit") {
  58.         goto loopend;
  59.     }
  60.     if(Choice=="style") {
  61.         using namespace std; //It seems I need it here too?
  62.         CMD=1;
  63.         system("color 2e");
  64.         system("CLS");
  65.         opt1 = "\n1:                     Style 1";
  66.         opt2 = "\n2:                     Style 2";
  67.         opt3 = "\n3:                     Style 3";
  68.         opt4 = "\n4:                     Style 4";
  69.         opt5 = "\n5:                     Style 5";
  70.         opt6 = "\n6:                    No Style";
  71.         std::cout << "Hello!" << "\nThis is a test of the OIS Styling System..." << "\nChoose a style:" << opt1 << opt2 << opt3 << opt4 << opt5 << opt6 <<"\n";
  72.         std::string Choice = "";
  73. ChoiceRetry:
  74.  
  75.         cout << "\n>";
  76.         cin >> Choice;
  77.         if (Choice == "6") {
  78.             cout << "Viewing styleless window:\n\n";
  79.             goto ChoiceYes;
  80.         }
  81.  
  82.         cout << "\n\n";
  83.         if (Choice == "1") {
  84.             Columnten = "----------";
  85.             Columnten1 = " ----------";
  86.             Columnten2 = "---------";
  87.             Bdr = "| ";
  88.             WaitColumn = " ---------PRESS--ENTER--------";
  89.             style = "1";
  90.             goto ChoiceYes;
  91.         }
  92.         if (Choice == "2") {
  93.             Columnten = "          ";
  94.             Columnten1 = "o         ";
  95.             Columnten2 = "          o";
  96.             Bdr = " ";
  97.             WaitColumn = "o         PRESS  ENTER        o";
  98.             style = "2";
  99.             goto ChoiceYes;
  100.         }
  101.         if (Choice == "3") {
  102.             Columnten = "//////////";
  103.             Columnten1 = "//////////";
  104.             Columnten2 = "//////////";
  105.             Bdr = "/";
  106.             WaitColumn = "/////////PRESS  ENTER/////////";
  107.             style = "3";
  108.             goto ChoiceYes;
  109.         }
  110.         if (Choice == "4") {
  111.             Columnten = "==========";
  112.             Columnten1 = "==========";
  113.             Columnten2 = "==========";
  114.             Bdr = "=";
  115.             WaitColumn = "=========PRESS==ENTER=========";
  116.             style = "4";
  117.             goto ChoiceYes;
  118.         }
  119.         if (Choice == "5") {
  120.             Columnten = "##########";
  121.             Columnten1 = " #########";
  122.             Columnten2 = "######### ";
  123.             Bdr = "#";
  124.             WaitColumn = " ####### PRESS  ENTER ####### ";
  125.             style = "5";
  126.             goto ChoiceYes;
  127.         }
  128.         cout << "Invalid input.";
  129.         goto ChoiceRetry;
  130. ChoiceYes:
  131.         Title = " EXAMPLE: ";
  132.         //string ColumnTitle = Columnten1, Title, Columnten2;(USE COUT)
  133.         //string Column = Columnten1, Columnten, Columnten2; (USE COUT)
  134.         cout << Columnten1<< Title<< Columnten2 << "\n" ;
  135.         string TYPE = "This is an example window   ";
  136.         cout << Bdr<< TYPE<< Bdr<< "\n";
  137.         TYPE = "         for style ";
  138.         cout << Bdr<< TYPE<< style ;
  139.         TYPE = ".       ";
  140.         cout << TYPE<<Bdr<< "\n";
  141.         cout << WaitColumn;
  142.  
  143.  
  144.  
  145.  
  146.  
  147.         std::cin.clear();
  148.         std::cin.ignore(32767, '\n');
  149.         std::cin.get();
  150.         system("CLS");
  151.     }
  152.     if (Choice=="INEEDHALP") {
  153.         if(Chickenvar==1) {
  154.             if (Help==1) {
  155.                 cout <<"\n\nHalp disabled";
  156.                 Help=0;
  157.                 CMD=1;
  158.                 goto Halpend;
  159.             }
  160.             if (Help==0) {
  161.                 cout <<"\n\nHalp enabled";
  162.                 Help=1;
  163.                 CMD=1;
  164.             }
  165. Halpend:
  166.             std::cin.clear();
  167.             std::cin.ignore(32767, '\n');
  168.             std::cin.get();
  169.             system("CLS");
  170.         }
  171.     }
  172.     if (Choice=="Chicken") {
  173.         if(Chickenvar==0) {
  174.             Chickenvar=1;
  175.             cout<<"Chicken Mode Enabled";
  176.             goto Chicken_toggle_end;
  177.         }
  178.         if(Chickenvar==1) {
  179.             Chickenvar=0;
  180.             goto Chicken_toggle_end;
  181.             cout<<"Chicken Mode Disabled";
  182.         }
  183. Chicken_toggle_end:
  184.         CMD=1;
  185.         goto loop;
  186.     }
  187.     if (Choice=="cmd") {
  188.         system("CLS");
  189.         system("color 6e");
  190.         cout <<"This will not work on systems with a disabled command prompt\n\n";
  191.         system("cmd");
  192.         CMD=1;
  193.         system("CLS");
  194.     }
  195.     if (Choice=="help") {
  196.         CMD=1;
  197.         cout<<"To run commands using CMD, type 'cmd'.\nTo test the styling system, type 'style'.\nTo exit the program, type 'exit'.\nTo run the GUI, type 'OIS'.\n\n";
  198.  
  199.     }
  200.     if (Choice=="OIS") {
  201. Styleloop:
  202.         system("CLS");
  203.         system("color 2a");
  204.         cout<<"\n\nChoose the system style.\nEnter 1-5, 6 for no style:";
  205.         cin>>Choice;
  206.         if (Choice == "1") {
  207.             Columnten = "----------";
  208.             Columnten1 = " ----------";
  209.             Columnten2 = "---------";
  210.             Bdr = "| ";
  211.             WaitColumn = " ----------------------------------------------- ";
  212.             style = "1";
  213.             goto Styleend;
  214.         }
  215.         if (Choice == "2") {
  216.             Columnten = "          ";
  217.             Columnten1 = "o         ";
  218.             Columnten2 = "          o";
  219.             Bdr = " ";
  220.             WaitColumn = "o                                               o";
  221.             style = "2";
  222.             goto Styleend;
  223.         }
  224.         if (Choice == "3") {
  225.             Columnten = "//////////";
  226.             Columnten1 = "//////////";
  227.             Columnten2 = "//////////";
  228.             Bdr = "/";
  229.             WaitColumn = "//////////////////     ++++     ////////////////";
  230.             style = "3";
  231.             goto Styleend;
  232.         }
  233.         if (Choice == "4") {
  234.             Columnten = "==========";
  235.             Columnten1 = "==========";
  236.             Columnten2 = "==========";
  237.             Bdr = "=";
  238.             WaitColumn = "================================================";
  239.             style = "4";
  240.             goto Styleend;
  241.         }
  242.         if (Choice == "5") {
  243.             Columnten = "-  -  -  -";
  244.             Columnten1 = " - - - - -";
  245.             Columnten2 = "- - - - - ";
  246.             Bdr = "|";
  247.             WaitColumn = " -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - ";
  248.             style = "5";
  249.             goto Styleend;
  250.         }
  251.         if (Choice == "6") {
  252.             style = "-";
  253.             Bdr = " ";
  254.             Columnten = " ";
  255.             Columnten1 = " ";
  256.             Columnten2 = " ";
  257.             WaitColumn = " ";
  258.             goto Styleend;
  259.         }
  260.         goto Styleloop;
  261. Styleend:
  262. OSImainloop:
  263.         system("CLS");
  264.         opt1 = "                                              ";
  265.         opt2 = "              OIS v0.5 Update 2               ";
  266.         opt3 = "                                              ";
  267.         opt4 = "          1:                    Exit          ";
  268.         opt5 = "          2:                  Log in          ";
  269.         opt6 = "                                              ";
  270.         Title="  Welcome to OIS GUI v1.0   ";
  271.         cout << Columnten1<< Title<< Columnten2 << "\n" ;
  272.         cout<< Bdr<< opt1<< Bdr<<"\n";
  273.         cout<< Bdr<< opt2<< Bdr<<"\n";
  274.         cout<< Bdr<< opt3<< Bdr<<"\n";
  275.         cout<< Bdr<< opt4<< Bdr<<"\n";
  276.         cout<< Bdr<< opt5<< Bdr<<"\n";
  277.         cout<< Bdr<< opt6<< Bdr<<"\n";
  278.         cout<<WaitColumn<<"\nEnter A Number:";
  279.  
  280.  
  281.         cin>>Choice;
  282.         if(Choice=="1") {
  283.             goto exitmain;
  284.         }
  285.         if (Choice=="2") {
  286.             goto OSImainloopbreak;
  287.         }
  288.         goto OSImainloop;
  289. OSImainloopbreak:
  290. OSIlogloop:
  291.         system("CLS");
  292.         opt1 = " Type exit to go back                         ";
  293.         opt2 = "                                              ";
  294.         opt3 = "                                              ";
  295.         opt4 = "             - ENTER PASSWORD -               ";
  296.         opt5 = "       Type 'new' to create a new user.       ";
  297.         opt6 = "                                              ";
  298.         Title="  User Login Access System  ";
  299.         cout << Columnten1<< Title<< Columnten2 << "\n" ;
  300.         cout<< Bdr<< opt1<< Bdr<<"\n";
  301.         cout<< Bdr<< opt2<< Bdr<<"\n";
  302.         cout<< Bdr<< opt3<< Bdr<<"\n";
  303.         cout<< Bdr<< opt4<< Bdr<<"\n";
  304.         cout<< Bdr<< opt5<< Bdr<<"\n";
  305.         cout<< Bdr<< opt6<< Bdr<<"\n";
  306.         cout<<WaitColumn<<"\nEnter Password:";
  307.         cin >>Choice;
  308.         if (Choice=="exit") {
  309.             goto OSImainloop;
  310.         }
  311.         if (Choice=="new") {
  312. newuser:
  313.             system("CLS;");
  314.             opt1 = " Type exit to abort operation                 ";
  315.             opt2 = "                                              ";
  316.             opt3 = "          Please enter a password             ";
  317.             opt4 = "             for your new user.               ";
  318.             opt5 = "                   .....                      ";
  319.             opt6 = "                                              ";
  320.             Title="  User Login Access System  ";
  321.             cout << Columnten1<< Title<< Columnten2 << "\n" ;
  322.             cout<< Bdr<< opt1<< Bdr<<"\n";
  323.             cout<< Bdr<< opt2<< Bdr<<"\n";
  324.             cout<< Bdr<< opt3<< Bdr<<"\n";
  325.             cout<< Bdr<< opt4<< Bdr<<"\n";
  326.             cout<< Bdr<< opt5<< Bdr<<"\n";
  327.             cout<< Bdr<< opt6<< Bdr<<"\n";
  328.             cout<<WaitColumn<<"\nEnter Your New Password:";
  329.             cin >>NormPass;
  330.             if (NormPass=="new") {
  331.                 system("CLS;");
  332.                 opt1 = "                                              ";
  333.                 opt2 = "       Sorry. This password is reserved       ";
  334.                 opt3 = "            for the new user command.         ";
  335.                 opt4 = "                                              ";
  336.                 opt5 = "                -Press Enter-                 ";
  337.                 opt6 = "                                              ";
  338.                 Title="           -Error-          ";
  339.                 cout << Columnten1<< Title<< Columnten2 << "\n" ;
  340.                 cout<< Bdr<< opt1<< Bdr<<"\n";
  341.                 cout<< Bdr<< opt2<< Bdr<<"\n";
  342.                 cout<< Bdr<< opt3<< Bdr<<"\n";
  343.                 cout<< Bdr<< opt4<< Bdr<<"\n";
  344.                 cout<< Bdr<< opt5<< Bdr<<"\n";
  345.                 cout<< Bdr<< opt6<< Bdr<<"\n";
  346.                 cout<<WaitColumn<<"\n";
  347.                 std::cin.clear();
  348.                 std::cin.ignore(32767, '\n');
  349.                 std::cin.get();
  350.                 goto newuser;
  351.             }
  352.             if (NormPass=="exit") {
  353.                 goto OSImainloopbreak;
  354.             }
  355. PassGenRetry:
  356.             ofstream passgen;
  357.             passgen.open ("OSIUser.setting");
  358.             if (passgen.is_open()) {
  359.                 passgen <<NormPass;
  360.             } else {
  361. filebadloop:
  362.                 system("CLS;");
  363.                 opt1 = "                                              ";
  364.                 opt2 = "          The file 'User.passwf' did          ";
  365.                 opt3 = "             not open successfully.           ";
  366.                 opt4 = "         A new user cannot be created.        ";
  367.                 opt5 = "            1=Retry        2=Abort            ";
  368.                 opt6 = "                                              ";
  369.                 Title="  User Login Access System  ";
  370.                 cout << Columnten1<< Title<< Columnten2 << "\n" ;
  371.                 cout<< Bdr<< opt1<< Bdr<<"\n";
  372.                 cout<< Bdr<< opt2<< Bdr<<"\n";
  373.                 cout<< Bdr<< opt3<< Bdr<<"\n";
  374.                 cout<< Bdr<< opt4<< Bdr<<"\n";
  375.                 cout<< Bdr<< opt5<< Bdr<<"\n";
  376.                 cout<< Bdr<< opt6<< Bdr<<"\n";
  377.                 cout<<WaitColumn<<"\nEnter A Number:";
  378.                 cin>>Choice;
  379.                 if (Choice=="1") {
  380.                     cout<<"Press Enter to attempt to open 'Users.passwf' again...";
  381.                     std::cin.clear();
  382.                     std::cin.ignore(32767, '\n');
  383.                     std::cin.get();
  384.                     goto PassGenRetry;
  385.                 }
  386.                 if (Choice=="2") {
  387.                     goto OSImainloopbreak;
  388.                 }
  389.                 goto filebadloop;
  390.             }
  391.             system("CLS;");
  392.             opt1 = "                                              ";
  393.             opt2 = "   Password has been successsfully installed. ";
  394.             opt3 = "          Press Enter to continue.            ";
  395.             opt4 = "                                              ";
  396.             opt5 = "                    .....                     ";
  397.             opt6 = "                                              ";
  398.             Title="  User Login Access System  ";
  399.             cout << Columnten1<< Title<< Columnten2 << "\n" ;
  400.             cout<< Bdr<< opt1<< Bdr<<"\n";
  401.             cout<< Bdr<< opt2<< Bdr<<"\n";
  402.             cout<< Bdr<< opt3<< Bdr<<"\n";
  403.             cout<< Bdr<< opt4<< Bdr<<"\n";
  404.             cout<< Bdr<< opt5<< Bdr<<"\n";
  405.             cout<< Bdr<< opt6<< Bdr<<"\n";
  406.             cout<<WaitColumn<<"\n";
  407.             std::cin.clear();
  408.             std::cin.ignore(32767, '\n');
  409.             std::cin.get();
  410.             goto OSIlogloop;
  411.         }
  412. Pswdchkloop:
  413.         if (pswdchk.is_open()) {
  414.             for(int i = 0; i < 5; ++i) {
  415.  
  416.                 pswdchk>>Password[i];
  417.             }
  418.         } else {
  419. chkbadloop:
  420.             system("CLS;");
  421.             opt1 = "                                              ";
  422.             opt2 = "          The file 'Users.passwf' did         ";
  423.             opt3 = "             not open successfully.           ";
  424.             opt4 = "           Passwords failed to load.          ";
  425.             opt5 = "            1=Retry        2=Abort            ";
  426.             opt6 = "                                              ";
  427.             Title="  User Login Access System  ";
  428.             cout << Columnten1<< Title<< Columnten2 << "\n" ;
  429.             cout<< Bdr<< opt1<< Bdr<<"\n";
  430.             cout<< Bdr<< opt2<< Bdr<<"\n";
  431.             cout<< Bdr<< opt3<< Bdr<<"\n";
  432.             cout<< Bdr<< opt4<< Bdr<<"\n";
  433.             cout<< Bdr<< opt5<< Bdr<<"\n";
  434.             cout<< Bdr<< opt6<< Bdr<<"\n";
  435.             cout<<WaitColumn<<"\nEnter A Number:";
  436.             cin>>Choice;
  437.             if (Choice=="1") {
  438.                 cout<<"Press Enter to attempt to open 'Users.passwf' again...";
  439.                 std::cin.clear();
  440.                 std::cin.ignore(32767, '\n');
  441.                 std::cin.get();
  442.                 goto Pswdchkloop;
  443.             }
  444.             if (Choice=="2") {
  445.                 goto OSImainloop;
  446.             }
  447.             goto chkbadloop;
  448.         }
  449.         if (Choice==Password[0]) {
  450.  
  451.             goto OSIlogloopbreak;
  452.         }
  453.         goto OSIlogloop;
  454. OSIlogloopbreak:
  455.         if (Chickenvar==1) {
  456.             cout<<"ADMIN ENABLED\n\nPress Enter";
  457.             std::cin.clear();
  458.             std::cin.ignore(32767, '\n');
  459.             std::cin.get();
  460.         } else {
  461.             cout<<"User initiated.\n\nPress Enter";
  462.             std::cin.clear();
  463.             std::cin.ignore(32767, '\n');
  464.             std::cin.get();
  465.         }
  466. loopmainmenu:
  467.         system("CLS");
  468.         if (Chickenvar==1) {
  469.             opt1 = " Welcome Admin                         v0.5 U2";
  470.         } else {
  471.             opt1 = " Welcome User                          v0.5 U2";
  472.         }
  473.         opt2 = "                 Options:                     ";
  474.         opt3 = "-Programs                                     ";
  475.         opt4 = "-Options                                      ";
  476.         opt5 = "-About                                        ";
  477.         opt6 = "-Exit                                         ";
  478.         Title="         - Welcome -        ";
  479.         cout << Columnten1<< Title<< Columnten2 << "\n" ;
  480.         cout<< Bdr<< opt1<< Bdr<<"\n";
  481.         cout<< Bdr<< opt2<< Bdr<<"\n";
  482.         cout<< Bdr<< opt3<< Bdr<<"\n";
  483.         cout<< Bdr<< opt4<< Bdr<<"\n";
  484.         cout<< Bdr<< opt5<< Bdr<<"\n";
  485.         cout<< Bdr<< opt6<< Bdr<<"\n";
  486.         cout<<WaitColumn<<"\nChoose an option:";
  487.         cin>>Choice;
  488.         for(unsigned int n = 0; n < Choice.length(); ++n) {
  489.             Choice[n] = tolower(Choice[n]);
  490.         }
  491.         if (Choice=="exit") {
  492.             goto OSImainloop;
  493.         }
  494.         if (Choice=="options") {
  495. optloop:
  496.             system("color 19");
  497.             system("CLS");
  498.             if (Chickenvar==1) {
  499.                 opt1 = "-Extra Options Unlocked-               v0.5 U2";
  500.             } else {
  501.                 opt1 = "                                       v0.5 U2";
  502.             }
  503.             opt2 = "          -Configure Your Computer-           ";
  504.             opt3 = "                                              ";
  505.             opt4 = "1: Choose a different style                   ";
  506.             opt5 = "2: Back                                       ";
  507.             opt6 = "                                              ";
  508.             Title="         - Options -        ";
  509.             cout << Columnten1<< Title<< Columnten2 << "\n" ;
  510.             cout<< Bdr<< opt1<< Bdr<<"\n";
  511.             cout<< Bdr<< opt2<< Bdr<<"\n";
  512.             cout<< Bdr<< opt3<< Bdr<<"\n";
  513.             cout<< Bdr<< opt4<< Bdr<<"\n";
  514.             cout<< Bdr<< opt5<< Bdr<<"\n";
  515.             cout<< Bdr<< opt6<< Bdr<<"\n";
  516.             cout<<WaitColumn<<"\nChoose 1 or 2:";
  517.             cin>>Choice;
  518.             for(unsigned int n = 0; n < Choice.length(); ++n) {
  519.                 Choice[n] = tolower(Choice[n]);
  520.             }
  521.             if (Choice=="2") {
  522.                 goto optend;
  523.             }
  524.             if (Choice=="1") {
  525. optStyleloop:
  526.                 system("CLS");
  527.                 system("color 16");
  528.                 cout<<"\n\nChoose the system style.\nEnter 1-5, 6 for no style:";
  529.                 cin>>Choice;
  530.                 if (Choice == "1") {
  531.                     Columnten = "----------";
  532.                     Columnten1 = " ----------";
  533.                     Columnten2 = "---------";
  534.                     Bdr = "| ";
  535.                     WaitColumn = " ----------------------------------------------- ";
  536.                     style = "1";
  537.                     goto Styleend;
  538.                 }
  539.                 if (Choice == "2") {
  540.                     Columnten = "          ";
  541.                     Columnten1 = "o         ";
  542.                     Columnten2 = "          o";
  543.                     Bdr = " ";
  544.                     WaitColumn = "o                                               o";
  545.                     style = "2";
  546.                     goto optStyleend;
  547.                 }
  548.                 if (Choice == "3") {
  549.                     Columnten = "//////////";
  550.                     Columnten1 = "//////////";
  551.                     Columnten2 = "//////////";
  552.                     Bdr = "/";
  553.                     WaitColumn = "//////////////////     ++++     ////////////////";
  554.                     style = "3";
  555.                     goto optStyleend;
  556.                 }
  557.                 if (Choice == "4") {
  558.                     Columnten = "==========";
  559.                     Columnten1 = "==========";
  560.                     Columnten2 = "==========";
  561.                     Bdr = "=";
  562.                     WaitColumn = "================================================";
  563.                     style = "4";
  564.                     goto optStyleend;
  565.                 }
  566.                 if (Choice == "5") {
  567.                     Columnten = "-  -  -  -";
  568.                     Columnten1 = " - - - - -";
  569.                     Columnten2 = "- - - - - ";
  570.                     Bdr = "|";
  571.                     WaitColumn = " -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  - ";
  572.                     style = "5";
  573.                     goto optStyleend;
  574.                 }
  575.                 if (Choice == "6") {
  576.                     style = "-";
  577.                     Bdr = " ";
  578.                     Columnten = " ";
  579.                     Columnten1 = " ";
  580.                     Columnten2 = " ";
  581.                     WaitColumn = " ";
  582.                     goto optStyleend;
  583.                 }
  584.                 goto optStyleloop;
  585. optStyleend:
  586.                 system("CLS");
  587.                 system("color 3b");
  588.                 Choice="INVALID";
  589.             }
  590.             goto optloop;
  591. optend:
  592.             system("CLS");
  593.             system("color 2a");
  594.         }
  595.         if (Choice=="about") {
  596.             system("CLS");
  597.             system("color 7f");
  598.             opt1 = "           OIS GUI and Command Shell          ";
  599.             opt2 = "                   System                     ";
  600.             opt3 = "                                              ";
  601.             opt4 = "              By Olivier Poirier              ";
  602.             opt5 = "                                              ";
  603.             opt6 = "Olivier Interactive Shell v0.5 Update 2       ";
  604.             Title="         - About -          ";
  605.             cout << Columnten1<< Title<< Columnten2 << "\n" ;
  606.             cout<< Bdr<< opt1<< Bdr<<"\n";
  607.             cout<< Bdr<< opt2<< Bdr<<"\n";
  608.             cout<< Bdr<< opt3<< Bdr<<"\n";
  609.             cout<< Bdr<< opt4<< Bdr<<"\n";
  610.             cout<< Bdr<< opt5<< Bdr<<"\n";
  611.             cout<< Bdr<< opt6<< Bdr<<"\n";
  612.             cout<<WaitColumn<<"\n";
  613.             std::cin.clear();
  614.             std::cin.ignore(32767, '\n');
  615.             std::cin.get();
  616.             system("color 2a");
  617.         }
  618.         if (Choice=="programs") {
  619. prgmloop:
  620.             system("color 5d");
  621.             system("CLS");
  622.             opt1 = "Standard User Detected                 v0.5 U2";
  623.             if (Chickenvar==1) {
  624.                 opt1 = "  Elevated Access  --  Hidden Items Revealed  ";
  625.             }
  626.             opt2 = "-Word                - Work-in-Progress -     ";
  627.             opt3 = "-TxtAdv           - It's a text adventure! -  ";
  628.             opt4 = "-Open                  Now Working! :D        ";
  629.             opt5 = "-Exit                                         ";
  630.             opt6 = "                                              ";
  631.             if (Chickenvar==1) {
  632.                 opt6 = "-Special Documents       = PASSCODE REQUIRED =";
  633.             }
  634.             Title="       - Programs -         ";
  635.             cout << Columnten1<< Title<< Columnten2 << "\n" ;
  636.             cout<< Bdr<< opt1<< Bdr<<"\n";
  637.             cout<< Bdr<< opt2<< Bdr<<"\n";
  638.             cout<< Bdr<< opt3<< Bdr<<"\n";
  639.             cout<< Bdr<< opt4<< Bdr<<"\n";
  640.             cout<< Bdr<< opt5<< Bdr<<"\n";
  641.             cout<< Bdr<< opt6<< Bdr<<"\n";
  642.             cout<<WaitColumn<<"\nChoose Program:";
  643.             cin >>Choice;
  644.             for(unsigned int n = 0; n < Choice.length(); ++n) {
  645.                 Choice[n] = tolower(Choice[n]);
  646.             }
  647.             if (Choice=="exit") {
  648.                 system("color 2a");
  649.                 goto loopmainmenu;
  650.             }
  651.             if (Choice=="open") {
  652.                 system("CLS");
  653.                 opt1 = "                                       v0.5 U2";
  654.                 opt2 = "   Enter name of program, and it will be      ";
  655.                 opt3 = "              opened with CMD.                ";
  656.                 opt4 = "    If the program is held in a specific      ";
  657.                 opt5 = "       directory, include that as well.       ";
  658.                 opt6 = "                                              ";
  659.                 Title="      - Run  Program -      ";
  660.                 cout << Columnten1<< Title<< Columnten2 << "\n" ;
  661.                 cout<< Bdr<< opt1<< Bdr<<"\n";
  662.                 cout<< Bdr<< opt2<< Bdr<<"\n";
  663.                 cout<< Bdr<< opt3<< Bdr<<"\n";
  664.                 cout<< Bdr<< opt4<< Bdr<<"\n";
  665.                 cout<< Bdr<< opt5<< Bdr<<"\n";
  666.                 cout<< Bdr<< opt6<< Bdr<<"\n";
  667.                 cout<<WaitColumn<<"\nEnter Name:";
  668.                 cin >>Choice;
  669.                 system(Choice.c_str());
  670.                 cout<<"Command Terminated";
  671.                 std::cin.clear();
  672.                 std::cin.ignore(32767, '\n');
  673.                 std::cin.get();
  674.             }
  675.             if (Choice=="txtadv") {
  676.                 system("TxtAdvLaunch.bat");
  677.             }
  678.             goto prgmloop;
  679.         }
  680.         goto loopmainmenu;
  681. exitmain:
  682.         CMD=1;
  683.         system("CLS");
  684.  
  685.     }
  686.     if (Choice=="clear") {
  687.         CMD=1;
  688.         system("CLS");
  689.     }
  690.  
  691.  
  692.     goto loop;
  693. loopend:
  694.     return 0;
  695. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement