Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- #include <windows.h>
- #include <stdlib.h>
- #include <string.h>
- #include<fstream>
- using namespace std;
- int main()
- {
- int pta=280;
- int total;
- int ab=1;
- string user="ictcoor";
- string pass="123";
- string user1,line,pass1,data,data1,lrn,nogname1;
- int i,c,d,age;
- int gl,choice;
- char fn[20],sn[20],nm[50],nf[50],ng[50],nmb[12],ocm[30],rel[20],ocf[30],bertday[20];
- char bg[100],ct[50],sp[20],ccl[10], ps[4],zp[5];
- char a=177,b=219;
- log:
- cout<<"\n"<<setw(51);
- cout<<"ADMINISTRATOR LOGIN";
- cout<<"\n"<<setw(37);
- cout<<"USER:";
- getline(cin,user1);
- cout<<"\n"<<setw(37);
- cout<<"PASSWORD:";
- getline(cin,pass1);
- if(pass1==pass&&user1==user){
- cout<<"\nACCESS GRANTED\n";
- system("pause>0");
- system("cls");
- cout<<"\n ******** ** ** ** \n";
- cout<<" /**///// /** /** /** \n";
- cout<<" /** ******* ****** ****** /** /** ********** ***** ******* ******\n";
- cout<<" /******* //**///**//**//* **////** /** /**//**//**//** **///**//**///**///**/ \n";
- cout<<" /**//// /** /** /** / /** /** /** /** /** /** /**/******* /** /** /** \n";
- cout<<" /** /** /** /** /** /** /** /** /** /** /**/**//// /** /** /** \n";
- cout<<" /******** *** /**/*** //****** *** *** *** /** /**//****** *** /** //** \n";
- cout<<" //////// /// // /// ////// /// /// /// // // ////// /// // //\n";
- cout<<" ** \n";
- cout<<" ** ** /** \n";
- cout<<" ****** //** ** ****** ****** ***** ********** \n";
- cout<<" **//// //*** **//// ///**/ **///**//**//**//**\n";
- cout<<" //***** /** //***** /** /******* /** /** /**\n";
- cout<<" /////** ** /////** /** /**//// /** /** /**\n";
- cout<<" ****** ** ****** //** //****** *** /** /**\n";
- cout<<" ////// // ////// // ////// /// // // \n";
- system("color 8b");
- cout<<"\n"<<setw(37)<<"LOADING...";
- cout<<"\n"<<setw(28);
- for(i=0;i<25;i++)
- {
- cout<<a;
- c=rand()%200;
- Sleep(c);
- cout<<"\r"<<setw(28);
- }
- for(i=0;i<25;i++)
- {
- cout<<b;
- d=rand()%150;
- Sleep(d);
- }
- cout<<"\n"<<setw(52);
- cout<<"Press Any Key To Continue";
- system("pause>0");
- system("cls");
- menu:
- cout<<"\n"<<setw(65)<<"========================================================";
- cout<<"\n"<<setw(65)<<"========================================================";
- cout<<"\n"<<setw(65)<<"=== MENU ===";
- cout<<"\n"<<setw(65)<<"=== 1. Add a new information ===";
- cout<<"\n"<<setw(65)<<"=== 2. View and Edit some infos. in the file ===";
- cout<<"\n"<<setw(65)<<"=== 3. Exit ===";
- cout<<"\n"<<setw(65)<<"========================================================";
- cout<<"\n"<<setw(65)<<"========================================================";
- cout<<"Choice:";
- cin>>choice;
- system("cls");
- if(choice==1){
- cout<<"\n\n\n"<<setw(45);
- cout<<"Student Name";
- cout<<"\n\n\n"<<setw(30);
- cout<<"First Name:";
- cin.ignore();
- cin.getline(fn, 20);
- cout<<setw(30);
- cout<<"Last Name:";
- cin.getline(sn, 20);
- cout<<setw(30);
- cout<<"Age:";
- cin>>age;
- cout<<setw(30);
- cout<<"Birth Date:";
- cin.ignore();
- cin.getline(bertday, 20);
- system("cls");
- cout<<"\n"<<setw(52);
- bin:
- cout<<"Learning Reference Number:";
- cout<<"\n"<<setw(28)<<"-->:";
- getline(cin, lrn);
- if(lrn.length()==12){
- if(ab==0)
- {
- goto bin1;
- }
- system("cls");
- cout<<"\n"<<setw(32);
- cout<<"Religion:";
- cout<<"\n"<<setw(28)<<"-->:";
- cin.ignore();
- cin.getline(rel, 20);
- system("cls");
- jump :
- cout<<setw(50);
- cout<<"Your Grade Level next School Year:";
- cin>>gl;
- system("cls");
- switch(gl)
- {
- case 7:
- cout<<"\n"<<setw(51);
- cout<<"choose your curriculum\n";
- cout<<setw(58);
- cout<<"To select, choose from 1 to 7\n";
- cout<<setw(35);
- cout<<"1. STE\n";
- cout<<setw(37);
- cout<<"2. STVEP\n";
- cout<<setw(36);
- cout<<"3. SPFL\n";
- cout<<setw(35);
- cout<<"4. SPA\n";
- cout<<setw(35);
- cout<<"5. SPS\n";
- cout<<setw(35);
- cout<<"6. BEC\n";
- cout<<setw(35);
- cout<<"7. FFC\n";
- cout<<setw(32);
- cout<<"-->:";
- cin.ignore();
- cin.getline(ccl, 10);
- break;
- case 8:
- cout<<"\n"<<setw(51);
- cout<<"Select your previous curriculum\n";
- cout<<setw(58);
- cout<<"To select, choose from 1 to 7\n";
- cout<<setw(35);
- cout<<"1. STE\n";
- cout<<setw(37);
- cout<<"2. STVEP\n";
- cout<<setw(36);
- cout<<"3. SPFL\n";
- cout<<setw(35);
- cout<<"4. SPA\n";
- cout<<setw(35);
- cout<<"5. SPS\n";
- cout<<setw(35);
- cout<<"6. BEC\n";
- cout<<setw(35);
- cout<<"7. FFC\n";
- cout<<setw(32);
- cout<<"-->:";
- cin.ignore();
- cin.getline(ccl, 10);
- break;
- case 9:
- cout<<"\n"<<setw(51);
- cout<<"Select your previous curriculum\n";
- cout<<setw(58);
- cout<<"To select, choose from 1 to 7\n";
- cout<<setw(35);
- cout<<"1. STE\n";
- cout<<setw(37);
- cout<<"2. STVEP\n";
- cout<<setw(36);
- cout<<"3. SPFL\n";
- cout<<setw(35);
- cout<<"4. SPA\n";
- cout<<setw(35);
- cout<<"5. SPS\n";
- cout<<setw(35);
- cout<<"6. BEC\n";
- cout<<setw(35);
- cout<<"7. FFC\n";
- cout<<setw(32);
- cout<<"-->:";
- cin.ignore();
- cin.getline(ccl, 10);
- break;
- case 10:
- cout<<"\n"<<setw(51);
- cout<<"Select your previous curriculum\n";
- cout<<setw(58);
- cout<<"To select, choose from 1 to 7\n";
- cout<<setw(35);
- cout<<"1. STE\n";
- cout<<setw(37);
- cout<<"2. STVEP\n";
- cout<<setw(36);
- cout<<"3. SPFL\n";
- cout<<setw(35);
- cout<<"4. SPA\n";
- cout<<setw(35);
- cout<<"5. SPS\n";
- cout<<setw(35);
- cout<<"6. BEC\n";
- cout<<setw(35);
- cout<<"7. FFC\n";
- cout<<setw(32);
- cout<<"-->:";
- cin.ignore();
- cin.getline(ccl, 10);
- break;
- default:
- cout<<setw(42);
- cout<<"Please try again\n";
- goto jump;
- }
- system("cls");
- if(strcmp(ccl,"STVEP")==0)
- {
- cout<<"\n"<<setw(51);
- cout<<"Choose your Specialization\n";
- cout<<setw(49);
- cout<<"To select, choose from 1 to 7\n";
- cout<<setw(34);
- cout<<"1. Programming\n";
- cout<<setw(26);
- cout<<"2. CNT\n";
- cout<<setw(31);
- cout<<"3. DRAFTING\n";
- cout<<setw(32);
- cout<<"4. ANIMATION\n";
- cout<<setw(20);
- cout<<"-->:";
- cin.getline(sp, 20);
- }
- system("cls");
- cout<<"\n"<<setw(40);
- cout<<"ADDRESS\n";
- cout<<"\n"<<setw(31);
- cout<<"Barangay:";
- cin.getline(bg, 100);
- cout<<"\n"<<setw(31);
- cout<<"City/Municipality:";
- cin.getline(ct, 50);
- cout<<"\n"<<setw(31);
- cout<<"Zip Code:";
- cin.getline(zp, 5);
- system("cls");
- cout<<"\n"<<setw(40);
- cout<<"Are you a 4PS Member?:";
- cin.getline(ps, 10);
- if(strcmp(ps,"yes")==0)
- {
- pta=pta-100;
- total=pta+150+75;
- }
- system("cls");
- cout<<"\n"<<setw(38);
- cout<<"Name of Mother:";
- cin.getline(nm, 50);
- cout<<"\n"<<setw(38);
- cout<<"Occupation:";
- cin.getline(ocm, 30);
- system("cls");
- cout<<"\n"<<setw(38);
- cout<<"Name of Father:";
- cin.getline(nf, 50);
- cout<<"\n"<<setw(38);
- cout<<"Occupation:";
- cin.getline(ocf, 30);
- system("cls");
- cout<<"\n"<<setw(38);
- cout<<"Name of Guardian:";
- cin.getline(ng, 50);
- cout<<"\n"<<setw(38);
- cout<<"Contact Number:";
- cin.getline(nmb, 12);
- system("cls");
- bin1:
- cout<<"\n"<<setw(38);
- cout<<"WRITING DATA TO FILE...\n";
- cout<<"\n"<<setw(28);
- for(i=0;i<25;i++)
- {
- cout<<a;
- c=rand()%200;
- Sleep(c);
- cout<<"\r"<<setw(28);
- }
- for(i=0;i<25;i++)
- {
- cout<<b;
- d=rand()%150;
- Sleep(d);
- }
- cout<<"\n"<<setw(52);
- Sleep(1000);
- lrn+=".doc";
- ifstream nog(lrn.c_str());
- if(nog.is_open())
- {
- cout<<"\nERROR!!!!!!!\n";
- cout<<"\nfile exist\nPlease enter your lrn again idiot\n";
- ab=0;
- goto bin;
- }
- else{
- ofstream nog;
- nog.open(lrn.c_str());
- cout<<"\nDATA HAS BEEN SAVED!";
- nog<<"*/---------------------------------------------------------------------*/\n";
- nog<<" --STUDENT INFORMATION--";
- nog<<"\n*/---------------------------------------------------------------------*/";
- nog<<"\nNAME:"<<sn<<","<<fn;
- nog<<"\tAGE:"<<age;
- nog<<"\tBirth Date:"<<bertday;
- nog<<"\nReligion:"<<rel;
- nog<<"\nAddress:";
- nog<<"\nStreet/Barangay:"<<bg;
- nog<<"\nCity/Municipality:"<<ct;
- nog<<"\nZip Code:"<<zp;
- nog<<"\n*/---------------------------------------------------------------------*/\n";
- nog<<" --SOME IMPORTANT INFORMATION--";
- nog<<"\n*/---------------------------------------------------------------------*/";
- nog<<"\nLearner's Reference Number:"<<lrn;
- nog<<"\nGrade Level:"<<gl;
- nog<<"\tCurriculum:"<<ccl;
- if(strcmp(ccl,"STVEP")==0){
- nog<<"\t\tSpecialization:"<<sp;
- }
- nog<<"\n*/---------------------------------------------------------------------*/\n";
- nog<<" --PARENT INFORMATION--";
- nog<<"\n*/---------------------------------------------------------------------*/";
- nog<<"\nMother's Name:"<<nm;
- nog<<"\nReligion:"<<rel;
- nog<<"\nOccupation:"<<ocm;
- nog<<"\nFather's Name:"<<nf;
- nog<<"\nReligion:"<<rel;
- nog<<"\nOccupation:"<<ocf;
- nog<<"\n*/---------------------------------------------------------------------*/\n";
- nog<<" --GUARDIAN--";
- nog<<"\n*/---------------------------------------------------------------------*/";
- nog<<"\nGuardian's Name:"<<ng;
- nog<<"\nContact Number:"<<nmb;
- nog<<"\n*/---------------------------------------------------------------------*/\n";
- nog<<" --FEES--";
- nog<<"\n*/---------------------------------------------------------------------*/";
- nog<<"\nPTA = "<<pta<<".00 Php";
- nog<<"\nBRIGADA = 150.00 Php";
- nog<<"\nID = 75.00 Php";
- nog<<"\n\nTOTAL PAYMENT:"<<total<<".00 Php";
- nog<<"\n\nPlease proceed at the PTA Office to pay";
- goto menu;
- }}
- else
- {
- cout<<"\ntry again motherfucker"<<endl;
- system("pause>0");
- system("cls");
- goto bin;
- }
- }
- else if(choice==2)
- {
- cin.ignore();
- cout<<"Enter the name of the file"<<endl;
- getline(cin,nogname1);
- nogname1+=".doc";
- ifstream nog(nogname1.c_str());
- if(nog.is_open())
- {
- while(getline(nog,line))
- {
- cout<<line<<'\n';
- }
- cout<<"\n Search the data you want to change:";
- getline(cin,data);
- cout<<"Enter the data:";
- getline(cin,data1);
- while(getline(nog,line))
- {
- if(string::npos != line.find(data)){
- line.replace(line.find(data), data.length(), data1);
- }}
- }
- else
- {
- cout<<"File not found motherfucker";
- goto menu;
- }
- }
- }
- else
- {
- cout<<"\nACCESS DENIED\n";
- goto log;
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment