THIS PROGRAM WILL TRACK OF ALL FACULTY AND STUDENTS DATA BASICALLY THIS
IS
A VERY SIMPLE
YHE
DATA
THIS PROGRAM WILL STORE DATA ACCORDING TO THE DIRECTORY BASED SYSTEM
AND MAKE TWO ENCRYTED TEXT FILES OF EACH PERSON NAME FOLLOWED BY A & P
YOU CAN ADD AS MANY AS INFORMATION YOU WANT BY RECODE ONLY TWO
FUNCTIONS
JUST GO THROUGH IT AND YOU WILL UNDERSTAND EASILY REALLY ITS A VERY
SIMPLE
PROGRAM
JUST COMPILE IT MAKE ITS EXECUTABLE FILE AND COPY IT IN ANY DRIVES
EITHER C,D,E OR F AND THEN RUN IT DONT RUN IT WITHIN BORLAND C++ WINDOW
*/
#include<graphics.h>
#include<dos.h>
#include<stdlib.h>
#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<process.h>
#include<fstream.h>
#include<dir.h>
#include<stdio.h>
// GLOBAL Funcions
void grap();
void intro();
void box();
void mainwindow();
void faculty();
void student();
void enterdata();
void personaldetial();
void seeyearfaculty();
void fullaccessfaculty();
void modifyfaculty();
void deletefaculty();
void prin();
void enterdatast();
void personalst();
void seetotalst();
void fullaccessst();
void modifyst();
void deletest();
void closeprog();
void quit();
// GLOBAL Variables
int option,pass,i,access,x,y,status;
char year[10],ch,name[100],temp[200],newfile[100],a[50],mod;
void *p;
size_t area;
void main()
grap();
a:clearviewport();
i=0;
rectangle(getmaxx()/2-140,getmaxy()/2-20,getmaxx()/2+135,getmaxy()/2+4);
outtextxy(getmaxx()/2-127,getmaxy()/2-12,"Enter Accesscode:");
gotoxy(43,15);
//Password Code
do
pass=getch();
if(pass==13) goto b;
a[i]=char(pass);
cout<<"*";
sound(500);delay(100);nosound();
i++;
}while(pass!=13);
b:a[i]=0;
access=stricmp(a,"doeacc");
if(access==0)
intro();
textcolor(BLACK);
textbackground(YELLOW);
mainwindow();
else
clearviewport();
getch();
goto a;
// INTRODUCTION SCREEN
void intro()
int a,b,c,d;
setfillstyle(8,1);
for(a=0,b=getmaxx(),c=getmaxx()/2,d=getmaxx()/2;a<getmaxx()/2+3;a+=5,b-=5,
c-=5,d+=5)
line(c,xy(8),d,xy(8));line(c,xy(51),d,xy(51));
bar(0,xy(9),a,xy(50));bar(b,xy(9),getmaxx(),xy(50));
sound(10*(a+250));delay(10);
nosound();
setfillpattern(pattern,1);
bar(0,0,640,480);
settextstyle(1,0,5);
setcolor(10);
outtextxy(100,140,"INSTITUTE MANAGEMENT");
outtextxy(250,200,"SYSTEM");
getch();
setcolor(0);
for(i=0;i<=320;i++)
rectangle(0+i,0,640-i,480);
delay(5);
closegraph();
// DETECTION OF GRAPHICS
void grap()
{
int gd= DETECT, gm, errorcode;
errorcode = graphresult();
if(errorcode != grOk)
exit(1);
void box(void)
int i,x,y;
gotoxy(11,2);
putch(196);
gotoxy(11,6);
putch(196);
gotoxy(68,2);
putch(191);
y=3;
gotoxy(68,y);
y++;
putch(179);
gotoxy(68,24);
putch(217);
gotoxy(11,24);
putch(196);
gotoxy(11,24);
putch(192);
y=3;
for(i=1; i<=21; i++)
gotoxy(11,y);
y++;
putch(179);
gotoxy(11,2);
putch(218);
void mainwindow()
clrscr();
box();
gotoxy(26,5);cout<<"===========================";
gotoxy(26,16);cout<<"Press 0 To Exit";
switch(option)
case 1 : faculty();
break;
case 2 : student();
break;
case 3 : prin();
break;
default : closeprog();
break;
};
void faculty()
clrscr();
box();
gotoxy(26,22);cout<<"Option------> ";
cin>>option;
switch(option)
case 1 : enterdata();
break;
case 2 : seeyearfaculty();
break;
case 3 : fullaccessfaculty();
break;
case 4 : modifyfaculty();
break;
case 5 : deletefaculty();
break;
default : closeprog();
break;
};
void enterdata()
clrscr();
cout<<" Enter The Year Which you Want To Add The Data ";
cout<<"
============================================= ";
gets(year);
mkdir("data");
chdir("data");
mkdir("faculty");
chdir("faculty");
mkdir(year);
chdir(year);
gets(name);
mkdir(name);
chdir(name);
personaldetial();
chdir("\n");
mainwindow();
void personaldetial()
gets(name);
mkdir(name);
chdir(name);
strcpy(newfile,"p");
strcat(newfile,name);
strcat(newfile,".txt");
ofstream fout(newfile);
if(!fout)
clrscr();
perror("Cannot Open The File ");
getch();
chdir("\n");
mainwindow();
fout<<"NAME : "<<name;
gets(temp);
fout<<"ADDRESS :"<<temp;
gets(temp);
fout.close();
encrypt(newfile);
admindetails(name);
clrscr();
strcpy(newfile,"a");
strcat(newfile,name);
strcat(newfile,".txt");
ofstream foutt(newfile);
if(!foutt)
clrscr();
getch();
chdir("\n");
mainwindow();
foutt<<"NAME : "<<name;
gets(temp);
foutt<<"EDUCATIONAL QUALIFICATIONS :"<<temp;
gets(temp);
gets(temp);
gets(temp);
gets(temp);
gets(temp);
gets(temp);
foutt.close();
encrypt(newfile);
ofstream fout("temp.txt");
ifstream fin(newfile);
while(fin)
{
fin.get(ch);
if(ch==EOF)break;
mod=~ch;
fout<<mod;
remove(newfile);
rename("temp.txt",newfile);
void seeyearfaculty()
clrscr();
cout<<" Enter The Year Of Which You Want To See The Faculties";
gets(year);
chdir("data");
chdir("faculty");
chdir(year);
gets(name);
chdir(name);
clrscr();
cout<<" ";
getch();
chdir("\n");
mainwindow();
void fullaccessfaculty()
clrscr();
chdir("data");
chdir("faculty");
gets(year);
chdir(year);
cout<<" Enter The Name Of The Faculty : ";
gets(name);
chdir(name);
gets(name);
chdir(name);
cin>>option;
clrscr();
cout<<"";
if(option==1)
strcpy(newfile,"p");
strcat(newfile,name);
strcat(newfile,".txt");
ifstream fin(newfile);
if(!fin)
clrscr();
getch();
chdir("\n");
mainwindow();
while(fin.get(ch)!=0)
mod=~ch;
cout<<mod;
getch();
fin.close();
if(option==2)
strcpy(newfile,"a");
strcat(newfile,name);
strcat(newfile,".txt");
ifstream fin(newfile);
if(!fin)
clrscr();
getch();
chdir("\n");
mainwindow();
while(fin.get(ch)!=0)
mod=~ch;
cout<<mod;
getch();
fin.close();
chdir("\n");
mainwindow();
clrscr();
chdir("data");
chdir("faculty");
gets(year);
chdir(year);
gets(name);
chdir(name);
gets(name);
status=rmdir(name);
if(status==0)
personaldetial();
else
{
clrscr();
getch();
chdir("\n");
mainwindow();
chdir("\\");
mainwindow();
void deletefaculty()
clrscr();
chdir("data");
chdir("faculty");
gets(year);
chdir(year);
chdir(name);
gets(name);
cin>>ch;
if(ch=='y')
status=rmdir(name);
if(status==0)
getch();
chdir("\\");
mainwindow();
else
clrscr();
chdir("\\");
mainwindow();
else
chdir("\\");
mainwindow();
void prin()
clrscr();
cin>>option;
chdir("data");
if(option==1)
chdir("faculty");
gets(year);
chdir(year);
gets(name);
chdir(name);
cout<<"Option------> ";
cin>>option;
if(option==1)
strcpy(newfile,"p");
strcat(newfile,name);
strcat(newfile,".txt");
ifstream fin;
fin.open(newfile);
if(!fin)
clrscr();
getch();
chdir("\\");
mainwindow();
ofstream fout;
fout.open("PRN");
if(!fout)
clrscr();
getch();
chdir("\\");
mainwindow();
while(fin.get(ch)!=0)
mod=~ch;
fout.put(mod);
fout.close();
fin.close();
if(option==2)
strcpy(newfile,"a");
strcat(newfile,name);
strcat(newfile,".txt");
ifstream fin;
fin.open(newfile);
if(!fin)
clrscr();
getch();
chdir("\\");
mainwindow();
ofstream fout;
fout.open("PRN");
if(!fin)
clrscr();
getch();
chdir("\\");
mainwindow();
while(fin.get(ch)!=0)
mod=~ch;
fout.put(mod);
fout.close();
fin.close();
if(option==2)
chdir("student");
gets(year);
chdir(year);
gets(name);
chdir(name);
cout<<"Option------> ";
cin>>option;
if(option==1)
strcpy(newfile,"p");
strcat(newfile,name);
strcat(newfile,".txt");
ifstream fin;
fin.open(newfile);
if(!fin)
clrscr();
getch();
chdir("\\");
mainwindow();
ofstream fout;
fout.open("PRN");
if(!fout)
clrscr();
getch();
chdir("\\");
mainwindow();
while(fin.get(ch)!=0)
mod=~ch;
fout.put(mod);
fout.close();
fin.close();
}
if(option==2)
strcpy(newfile,"a");
strcat(newfile,name);
strcat(newfile,".txt");
ifstream fin;
fin.open(newfile);
if(!fin)
clrscr();
getch();
chdir("\\");
mainwindow();
ofstream fout;
fout.open("PRN");
if(!fout)
clrscr();
chdir("\\");
mainwindow();
while(fin.get(ch)!=0)
mod=~ch;
fout.put(mod);
fout.close();
fin.close();
chdir("\\");
mainwindow();
void student()
clrscr();
box();
gotoxy(26,4);cout<<"INSTITUTE MANAGEMENT SYSTEM ";
gotoxy(26,5);cout<<"===========================";
gotoxy(26,22);cout<<"Option------> ";
cin>>option;
switch(option)
case 1 : enterdatast();
break;
case 2 : seetotalst();
break;
case 3 : fullaccessst();
break;
case 4 : modifyst();
break;
case 5 : deletest();
break;
default : closeprog();
break;
};
void enterdatast()
clrscr();
cout<<"Enter The Year Which you Want To Add The Data ";
cout<<"=============================================
== ";
gets(year);
mkdir("data");
chdir("data");
mkdir("student");
chdir("student");
mkdir(year);
chdir(year);
personalst();
chdir("\\");
mainwindow();
void personalst()
gets(name);
mkdir(name);
chdir(name);
strcpy(newfile,"p");
strcat(newfile,name);
strcat(newfile,".txt");
ofstream fout(newfile);
if(!fout)
clrscr();
getch();
chdir("\\");
mainwindow();
gets(temp);
gets(temp);
gets(temp);
cout<<"Address : ";
gets(temp);
fout<<"ADDRESS :"<<temp;
gets(temp);
fout.close();
encrypt(newfile);
academic(name);
}
clrscr();
strcpy(newfile,"a");
strcat(newfile,name);
strcat(newfile,".txt");
ofstream foutt(newfile);
if(!foutt)
clrscr();
getch();
chdir("\\");
mainwindow();
}
foutt<<" NAME : "<<name;
gets(temp);
gets(temp);
gets(temp);
gets(temp);
gets(temp);
gets(temp);
gets(temp);
foutt.close();
encrypt(newfile);
void seetotalst()
clrscr();
chdir("data");
chdir("student");
cout<<" Enter The Year Of Which You Want To See The Students";
gets(year);
chdir(year);
chdir("\\");
mainwindow();
void fullaccessst()
clrscr();
chdir("data");
chdir("student");
gets(year);
chdir(year);
gets(name);
chdir(name);
cin>>option;
clrscr();
cout<<" ";
if(option==1)
strcpy(newfile,"p");
strcat(newfile,name);
strcat(newfile,".txt");
ifstream fin(newfile);
if(!fin)
clrscr();
getch();
chdir("\\");
mainwindow();
while(fin.get(ch)!=0)
{
mod=~ch;
cout<<mod;
getch();
fin.close();
if(option==2)
strcpy(newfile,"a");
strcat(newfile,name);
strcat(newfile,".txt");
ifstream fin(newfile);
if(!fin)
clrscr();
getch();
chdir("\\");
mainwindow();
while(fin.get(ch)!=0)
{
mod=~ch;
cout<<mod;
getch();
fin.close();
chdir("\\");
mainwindow();
void modifyst()
chdir("data");
chdir("student");
gets(year);
chdir(year);
gets(name);
status=rmdir(name);
if(status==0)
personalst();
else
clrscr();
getch();
chdir("\\");
mainwindow();
chdir("\\");
mainwindow();
void deletest()
clrscr();
chdir("data");
chdir("student");
gets(year);
chdir(year);
gets(name);
cin>>ch;
if(ch=='y')
status=rmdir(name);
if(status==0)
getch();
chdir("\\");
mainwindow();
else
{
clrscr();
getch();
chdir("\\");
mainwindow();
else
chdir("\\");
mainwindow();
void closeprog()
grap();
setcolor(6);
for(i=0;i<=220;i++)
rectangle(0+i,0+i,640-i,480-i);
delay(15);
for(i=0;i<=220;i++)
rectangle(100+i,100,540-i,380);
delay(10);
quit();
closegraph();
exit(0);
void quit()
int a,b,c;
setcolor(0);
for(a=1,b=getmaxy()-1,c=200;a<=getmaxy()/2;a++,b--,c--)
line(1,a,getmaxx()-1,a);
line(1,b,getmaxx()-1,b);
sound(10*(c+200));
delay(1);
}
delay(300);
nosound();
setcolor(4);
delay(1000);
setcolor(0);
delay(100);
setcolor(4);
delay(500);
setcolor(4);
typeme(xy(2),xy(26),"EMAIL ME AT dropurmails_here@yahoo.com",30);
delay(2000);
char code[2];
int length=strlen(word);
for(int i=0;i<=length;i++)
code[0]=word[i];
code[1]=' ';