0% found this document useful (0 votes)
7 views44 pages

Computer Project

The document outlines a project work in Computer Science submitted by a student of Montfort School, Anakkara, focusing on the development of a school website. The website includes features such as an application form for new admissions, a 'We Care Panel' for students and teachers, and a stationary list, all supported by a MySQL database. The project also includes source code for creating and managing the database and its tables.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views44 pages

Computer Project

The document outlines a project work in Computer Science submitted by a student of Montfort School, Anakkara, focusing on the development of a school website. The website includes features such as an application form for new admissions, a 'We Care Panel' for students and teachers, and a stationary list, all supported by a MySQL database. The project also includes source code for creating and managing the database and its tables.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 44

MONTFORT SCHOOL

ANAKKARA
(Affiliated to CBSE Delhi)

PROJECT WORK
IN
COMPUTER SCIENCE
SUBMITTED BY
NAME :
CLASS:
ROLLNO:
MONTFORT SCHOOL
ANAKKARA
(Affiliated to CBSE Delhi)

CERTIFICATE
This is to certify that the project work in Computer Science is a
bonafide record carried out by ………………………….......................
Montfort School, Anakkara in the partial fulfillment of study of class
XII CBSE scheme in ‘COMPUTER SCIENCE’.

PRINCIPAL Internal Guide


Bro.Joseph Thomas Mrs. Rahana .A

EXTERNAL EXAMINER INTERNAL EXAMINER


DECLARATION
I hereby declare that the project work in COMPUTER
SCIENCE is submitted in partial fulfillment of the study of class
XII under CBSE scheme in COMPUTER SCIENCE is a
bonafide research carried out by me under the guidance of Mrs.
Rahana.A Department of Computer Science, Montfort School ,
Anakkara.

Name : ……………………………….

Dated : ………………………………
ACKNOWLEDGEMENT
I sincerely express my gratitude on the occasion on the completion
of this project on “COMPUTER SCIENCE”. It was through the
immense grace of the LORD ALMIGHTY that made me complete
this task. So I submit everything before HIM.
I am grateful to Rev. Bro. Joseph Thomas – Principal , Rev. Bro.
Ignatius, Rev.Bro.MP John and the whole management of the
Montfort School, Anakkara for providing all kinds of facilities,
encouragement and all the help I required.
I would wish to express my sincere gratitude to Mrs.Rahana A. of
Montfort School who supervised my project by giving me necessary
suggestion and guidance.
I extend my sincere love and gratitude to all my teachers, staff and
students of Montfort School, Anakkara for their encouragement and
support they gave me throughout the course and especially in the
completion of my project work.
CONTENTS
 INTRODUCTION
 PROJECT OVERVIEW
 SOURCE CODE
 OUTPUT
 CONCLUSION
 BIBLIOGRAPHY
INTRODUCTION
The Project titled “ SCHOOL WEBSITE” designs a school website
which can be accessed by anyone and provides a brief history
along with a list of few of the facilities of the school.
Further the website has an application form for the new
students who are seeking admission to the school. The details of
the applicant submitted in the application form are stored in the
school database(MySQL).
Then for the students and teachers of the school there is a
separate feature called the “WE CARE PANEL” which they can
access using the username and the password provided by the
school. Using the Panel the students can search for the details
about their teachers via their name and vice versa. (It can also
display the imformation of the person who logges in.)
Both students and teachers can also submit any enquiry in the
panel.
The enquiry too would be stored in the school database
(MySQL).
Then there is the school stationary ehich provides a list of items
available in the stationary and also calculates the total cost of
the items as per the quantity.
There is another option in the website which can be accessed
only by the School Management and is used to either update or
delete the information of a student or a teacher.
PROJECT OVERVIEW

\
SELECT * FROM STUDENTS;

SELECT * FROM TEACHERS;


ABOUT THE SCHOOL:
SHOWS THE HISTORY AND DETAILS REGARDING THE
INSTITUTION.

OUR FACILITIES:
SHOWS A LIST OF FACILITIES PROVIDED BY THE SCHOOL

NEW ADMISSIONS:
AN APPLICATION FORM TO REGISTER THE DETAILS
THE DETAILS REGARDING THE APPLICANT SUBMITTED IN THE
FORM ARE STORED IN THE SCHOOL DATABASE (MYSQL TABLE
‘APPLICANT)

WE CARE PANEL:


STUDENTS LOGIN: SHOWS THE STUDENT’S INFO AND ALSO
ALLOWS TO SEARCH THE DETAILS (EG: CONTACT) OF THE
TEACHERS.
TEACHERS LOGIN: SHOWS THE DETAILS OF THE TEACHER’S AND
ALSO ALLOWS SEARCHES THE DETAILS OF STUDENTS.
(BOTH THE STUDENTS PANEL AND THE TEACHERS PANEL ARE TO
BE ACCESSED USING THE USERNAME AND PASSWORD
AFTER LOGIN THEY CAN HAVE ACCESS TO VARIOUS CLASS LISTS)

STATIONARY:
CALCULATES THE PRICE OF THE STATIONARY ITEMS YOU SELECT
AS PER THE QUANTITY

SCHOOL MANAGEMENT:
A FEATURE WHICH CAN BE ACCESSED ONLY BY THE SCHOOL
MANAGEMENT AND IS USED TO UPDATE OR DELETE THE
INFORMATION OF A STUDENT OR A TEACHER.
SOURCE CODE
CODE - 1
import mysql.connector

#CREATE DATABSE 'SCHOOL'


mydb=mysql.connector.connect(host="localhost",user="root",passwd="MySQL")
mycursor=mydb.cursor()
mycursor.execute("CREATE DATABASE IF NOT EXISTS SCHOOL")

#CREATING THE TABLES


mydb=mysql.connector.connect(host="localhost",user="root",passwd="MySQL",d
atabase="SCHOOL")
mycursor=mydb.cursor()

#CREATE TABLE 'TEACHERS'


mycursor.execute("CREATE TABLE IF NOT EXISTS TEACHERS(NAME
VARCHAR(25),GENDER VARCHAR(6),DATE_OF_BIRTH CHAR(10),SUBJECT
VARCHAR(12),CONTACT CHAR(10),USERNAME VARCHAR(15),PASSWORD
CHAR(8))")
#CREATE TABLE 'STUDENTS'
mycursor.execute("CREATE TABLE IF NOT EXISTS STUDENTS(ADMIN_NO
CHAR(4),CLASS VARCHAR(3),R_NO VARCHAR(3),NAME
VARCHAR(20),PARENT_NAME VARCHAR(20),GENDER
VARCHAR(6),DATE_OF_BIRTH CHAR(10),CONTACT CHAR(10),USERNAME
VARCHAR(15),PASSWORD CHAR(8))")
#CREATE TABLE 'APPLICANTS'
mycursor.execute("CREATE TABLE IF NOT EXISTS APPLICANTS(NAME_OF_PUPIL
VARCHAR(25),FATHER_NAME VARCHAR(25),MOTHER_NAME
VARCHAR(25),DATE_OF_BIRTH CHAR(10),GENDER VARCHAR(6),STREAM
VARCHAR(20),ADMISSION_TO_HOSTEL VARCHAR(15),PHONE_NO CHAR(10))")
#CREATE TABLE 'SCHOOL_MANAGEMENT'
mycursor.execute("CREATE TABLE IF NOT EXISTS SCHOOL_MANAGEMENT(NAME
VARCHAR(25),GENDER VARCHAR(6),DATE_OF_BIRTH VARCHAR(10),DESIGNATION
VARCHAR(15),USERNAME VARCHAR(15),PASSWORD CHAR(8))")
#CREATE TABLE 'STATIONARY'
mycursor.execute("CREATE TABLE IF NOT EXISTS STATIONARY(ITEM
VARCHAR(30),PRICE INT(4))")
#CREATE TABLE 'ENQUIRIES'
mycursor.execute("CREATE TABLE IF NOT EXISTS ENQUIRIES(NAME
VARCHAR(25),ENQUIRY VARCHAR(150))")
mydb.commit()

#INSERTING THE VALUES IN THE TABLE 'STUDENTS'


def
insert(ADMIN_NO,CLASS,R_NO,NAME,PARENT_NAME,GENDER,DATE_OF_BIRTH,C
ONTACT,USERNAME,PASSWORD):

mydb=mysql.connector.connect(host="localhost",user="root",passwd="MySQL",d
atabase="SCHOOL")
mycursor=mydb.cursor()
insert_query="""INSERT INTO
STUDENTS(ADMIN_NO,CLASS,R_NO,NAME,PARENT_NAME,GENDER,DATE_OF_BIR
TH,CONTACT,USERNAME,PASSWORD) VALUES(%s,%s,%s,%s,%s,%s,%s,%s,%s,
%s)"""

data=(ADMIN_NO,CLASS,R_NO,NAME,PARENT_NAME,GENDER,DATE_OF_BIRTH,C
ONTACT,USERNAME,PASSWORD)
mycursor.execute(insert_query,data)
mydb.commit()

insert("7680","8A","02","ALBEENA ELIZABETH","JOSE JOSEPH","FEMALE","21-06-


2007","7657847837","ALBEENA2007","AE210607")
insert("7661","8A","16","DANIEL JAMES","JAMES DAVID","MALE","09-10-
2007","8282824455","DANIEL2007","DJ091007")

insert("7191","8B","05","ALEENA THOMAS","THOMAS EDIN","FEMALE","19-08-


2007","9824516354","ALEENA2007","AT190807")
insert("7240","8B","12","CHIRAG KAMRA","PRABHAT KAMRA","MALE","22-01-
2007","8836925364","CHIRAG2007","CK220107")

insert("6908","9A","06","BENJAMIN JOSEPH","JOSEPH JAMES","MALE","11-11-


2006","7887869855","BENJAMIN2006","BJ111106")
insert("6558","9A","10","CHRISTOPHER RAO","RAO RAJMKUMAR","MALE","25-10-
2006","9553628201","CHRISTOPHER2006","CR251006")

insert("6690","9B","14","DAVID SAMUEL","SAMUEL JAMES","MALE","18-06-


2006","9342678391","DAVID2006","DS180606")
insert("7850","9B","26","RIDHIMA SHARMA","GUPTA SHARMA","FEMALE","24-01-
2007","9674511782","RIDHIMA2007","RS240107")
insert("5822","10A","03","ANSHIKA AUGUSTY","AUGUSTY JOSE","FEMALE","28-
09-2005","9866375295","ANSHIKA2005","AA280905")
insert("5507","10A","28","VIJAY GARG","GARG SHARMA","MALE","13-07-
2005","7589499965","VIJAY2005","VG130705")

insert("5765","10B","08","BINOLY BIJU","BIJU ABARAHAM","FEMALE","04-02-


2005","9879656765","BINOLY2005","BB040205")
insert("5489","10B","11","CHETAN BHAGAT","BHAGAT CHANDRAN","MALE","21-
04-2005","8798665621","CHETAN2005","CB210405")

insert("4101","11A","02","ABHYA VAJPAYEE","RAJ VAYPAYEE","FEMALE","31-10-


2004","9675868599","ABHYA2004","AV311004")
insert("4855","11A","13","EDWIN GEORGE","GEORGE SAMSON","MALE","04-12-
2004","9834144796","EDWIN2004","EG041204")

insert("4245","11B","10","DREW GEORGE","GEORGE KM","MALE","22-10-


2004","9224011020","DREW2004","DG221004")
insert("4371","11B","20","MANNA JACOB","JACOB SIMON","FEMALE","16-03-
2004","9862163655","MANNA2004","MJ160304")

insert("4466","11C","05","ADITYA SHARMA","RD SHARMA","MALE","17-07-


2004","6785848851","ADITYA2004","AS170704")
insert("4745","11C","17","KHUSHI GUPTA","GUPTA SHARMA","FEMALE","30-12-
2004","9836579396","KHUSHI2004","KG301204")

insert("3654","12A","07","BINU GOEL","GOEL GUPTA","MALE","04-12-


2003","9037373195","BINOY2003","BR041203")
insert("3375","12A","24","RUTH GABRIEL","DHRUV GABREIL","FEMALE","16-04-
2003","7654667373","RUTH2003","RG160403")

insert("3921","12B","18","GEORGE D JOSEPH","JOSEPH JOY","MALE","17-09-


2003","6775879837","GEORGE2003","GJ170903")
insert("3452","12B","20","JESSNA JINESH","JINESH JOHN","FEMALE","11-11-
2003","9256736337","JESSNA2003","JJ111103")

insert("3333","12C","09","CAROLINE ROSE","JOY SEBASTIAN","FEMALE","09-04-


2003","9919550537","CAROLINE2003","CR090403")
insert("3001","12C","10","CATHERINE TOM","TOM THOMAS","FEMALE","25-01-
2003","9823227667","CATHERINE2003","CT250103")
#INSERTING THE VALUES IN THE TABLE 'TEACHERS'
def
insert(NAME,GENDER,DATE_OF_BIRTH,SUBJECT,CONTACT,USERNAME,PASSWORD
):

mydb=mysql.connector.connect(host="localhost",user="root",passwd="MySQL",d
atabase="SCHOOL")
mycursor=mydb.cursor()
insert_query="""INSERT INTO
TEACHERS(NAME,GENDER,DATE_OF_BIRTH,SUBJECT,CONTACT,USERNAME,PASSW
ORD) VALUES(%s,%s,%s,%s,%s,%s,%s)"""

data=(NAME,GENDER,DATE_OF_BIRTH,SUBJECT,CONTACT,USERNAME,PASSWORD
)
mycursor.execute(insert_query,data)
mydb.commit()

insert("MR.JAGDISH MATHUR","MALE","12-12-
1985","MATHEMATICS","7876755678","JAGDISH1985","JM121285")
insert("MR.SANDEEP KM","MALE","29-06-
1992","SCIENCE","8978673345","SANDEEP1992","SK290692")

insert("MR. CHARU ARORA","FEMALE","28-06-


1986","PHYSICS","9845367345","CHARU1986","CA280686")
insert("MRS.DAISY JOSEPH","FEMALE","13-04-
1984","CHEMISTRY","7658324501","DAISY1984","DJ130484")

insert("MR.RAHUL ARYAN","MALE","16-03-
1989","BIOLOGY","7845236510","RAHUL1989","RA160389")
insert("MRS.MANVI SINGH","FEMALE","08-11-
1990","COMPUTER","8201654325","MANVI1990","MS081190")

insert("MR.JITHIN GEORGE","MALE","23-10-
1987","HISTORY","8291463598","MUKUL1987","JG231087")
insert("MRS.SANJANA WILSON","FEMALE","23-02-
1994","ACCOUNTANCY","7102893547","SANJANA1994","SW230294")

insert("MR.ROY THOMAS","MALE","11-11-
1990","ENGLISH","9426835801","ROY1990","RT111190")
insert("MRS.ISHITA AGGARWAL","FEMALE","18-12-
1988","ECONOMICS","8016753254","ISHITA1988","IA181288")

#INSERTING THE VALUES IN THE TABLE 'SCHOOL MANAGEMENT'


def
insert(NAME,GENDER,DATE_OF_BIRTH,DESIGNATION,USERNAME,PASSWORD):

mydb=mysql.connector.connect(host="localhost",user="root",passwd="MySQL",d
atabase="SCHOOL")
mycursor=mydb.cursor()
insert_query="""INSERT INTO
SCHOOL_MANAGEMENT(NAME,GENDER,DATE_OF_BIRTH,DESIGNATION,USERNA
ME,PASSWORD) VALUES(%s,%s,%s,%s,%s,%s)"""
data=(NAME,GENDER,DATE_OF_BIRTH,DESIGNATION,USERNAME,PASSWORD)
mycursor.execute(insert_query,data)
mydb.commit()
insert("MR.GEO PAUL","MALE","13-01-
1974","PRINCIPAL","GEO1974","GP130174")
insert("MRS.KAREN ALBY","FEMALE","17-05-1980","VICE
PRINCIPAL","KAREN1980","KA170580")
insert("MR.RIJU C JOSE","MALE","19-11-
1980","HEADMASTER","RIJU1980","RJ191180")

#INSERTING THE VALUES IN THE TABLE 'STATIONARY'


def insert(ITEM,PRICE):

mydb=mysql.connector.connect(host="localhost",user="root",passwd="MySQL",d
atabase="SCHOOL")
mycursor=mydb.cursor()
insert_query="""INSERT INTO STATIONARY(ITEM,PRICE) VALUES(%s,%s)"""
data=(ITEM,PRICE)
mycursor.execute(insert_query,data)
mydb.commit()
insert("CLASS-X ENGLISH READER",160)
insert("CLASS-X SCIENCE",400)
insert("CLASS-X MATHEMATICS",220)
insert("CLASS-X SOCIAL SCIENCE",500)
insert("CLASS-XI ENGLISH READER",120)
insert("CLASS-XI MATHEMATICS",290)
insert("CLASS-XI PHYSICS+CHEMISTRY",550)
insert("CLASS-XI BIOLOGY",250)
insert("CLASS-XI ACCOUNTACY+ECONOMICS",400)
insert("CLASS-XI BUSINESS STUDIES",250)
insert("CLASS-XI COMPUTER SCIENCE",500)
insert("CLASS-XII ENGLISH READER",300)
insert("CLASS-XII MATHEMATICS",320)
insert("CLASS-XII PHYSICS+CHEMISTRY",690)
insert("CLASS-XII BIOLOGY",340)
insert("CLASS-XII ACCOUNTACY+ECONOMICS",520)
insert("CLASS-XII BUSINESS STUDIES",370)
insert("CLASS-XII COMPUTER SCIENCE",600)

CODE – 2
from tkinter import *
import mysql.connector
from random import *

#THE FUNCTION IMPORTS DATA FROM THE SQL TABLE AND STORES IT IN A
DICTIONARY
def import_data():
L1=[]
global D1
D1={} #D1 STORES DATA FROM THE TABLE 'STUDENTS' WITH NAME OF
STUDENT AS THE KEYWORD

mydb=mysql.connector.connect(host="localhost",user="root",passwd="MySQL",d
atabase="SCHOOL")
mycursor=mydb.cursor()
mycursor.execute("SELECT * FROM STUDENTS")
myrecords=mycursor.fetchall()
for i in myrecords:
i2=list(i)
L1.append(i2)
l=len(L1)
for i in range(l):
D1[L1[i][3]]=L1[i][0],L1[i][1],L1[i][2],L1[i][4],L1[i][5],L1[i][6],L1[i][7],L1[i]
[8],L1[i][9]

L2=[]
global D2
D2={} #D2 STORES DATA FROM THE TABLE 'TEACHERS' WITH NAME OF
TEACHER AS THE KEYWORD

mydb=mysql.connector.connect(host="localhost",user="root",passwd="MySQL",d
atabase="SCHOOL")
mycursor=mydb.cursor()
mycursor.execute("SELECT * FROM TEACHERS")
myrecords=mycursor.fetchall()
for i in myrecords:
i2=list(i)
L2.append(i2)
l=len(L2)
for i in range(l):
D2[L2[i][0]]=L2[i][1],L2[i][2],L2[i][3],L2[i][4],L2[i][5],L2[i][6]
L3=[]
global D3
D3={} #D3 STORES DATA FROM THE TABLE 'SCHOOL_MANAGEMENT' WITH
THE NAMES AS KEYWORD

mydb=mysql.connector.connect(host="localhost",user="root",passwd="MySQL",d
atabase="SCHOOL")
mycursor=mydb.cursor()
mycursor.execute("SELECT * FROM SCHOOL_MANAGEMENT")
myrecords=mycursor.fetchall()
for i in myrecords:
i2=list(i)
L3.append(i2)
l=len(L3)
for i in range(l):
D3[L3[i][0]]=L3[i][1],L3[i][2],L3[i][3],L3[i][4],L3[i][5]

L4=[]
global D4
D4={} #D4 STORES THE DATA FROM TABLE STATIONARY WITH THE ITEM
NAME AS THE KEYWORD

mydb=mysql.connector.connect(host="localhost",user="root",passwd="MySQL",d
atabase="SCHOOL")
mycursor=mydb.cursor()
mycursor.execute("SELECT * FROM STATIONARY")
myrecords=mycursor.fetchall()
for i in myrecords:
i2=list(i)
L4.append(i2)
l=len(L4)
for i in range(l):
D4[L4[i][0]]=L4[i][1]
import_data()

#"ABOUT THE SCHOOL"


def about(): #GIVES A BRIEF DESCRIPTION ON THE SCHOOL'S HISTORY AND
CONDUCTS
window1=Tk()
window1.geometry("850x725")
window1.title("SCHOOL WEBSITE")
window1.configure(bg="maroon2")
A="HOGWARTS SCHOOL OF ARTS AND SCIENCE WAS FOUNDED BY FOUR OF
THE"
B="GREATEST SCHOLARS OF ALL TIMES. THE SCHOOL FOLLOWS WESTERN
TEACHING"
C="METHODS AND CONSISTS OF STAFFS AND STUDENTS FROM ALL OVER
INDIA."
D="IT IS A STATE-OWNED SCHOOL FUNDED BY THE MINISTRY OF EDUCATION."
E="ESTABLISHED IN THE YEAR 1824 ,HOGWARTS IS ONE OF THE FINEST
EDUCATIONAL"
F="INSTITUTIONS IN INDIA TODAY. THE TEACHERS AND THE STUDENTS PUT IN
THERE"
G="EFFORTS AS THEY PURSUE GOOD MORAL AND INTELLECTUAL FORMATIONS"
H="BESIDES PHYSICAL AND SPIRITUAL DEVELOPMENT. THE MEDIUM OF
INSTRUCTION"
I="IS ENGLISH AND THE SCHOOL IS A CO-EDUCATIONAL INSTITUTION. MAKING"
J="LEARNING FUN AND INSTILLING DISPLINE AND KNOWLEDGE IN THE
CHILDREN"
K="WITH LOVE AND CARE IS THE MAIN AGENDA OF THE SCHOOL."
L=[A,B,C,D,E,F,G,H,I,J,K]
l1=Label(window1,text="ABOUT THE
SCHOOL",font=("Algerian",34,"underline"),fg="white",bg="maroon3")
l1.place(x=190,y=20)
n=0
for i in range(11):
l=Label(window1,text=L[i],width=67,font=("Segoe UI
Semibold",16),fg="black",bg="yellow")
l.place(x=20,y=90+int(n))
n=n+50

back=Button(window1,text="BACK",width=7,command=window1.destroy,font=("C
alibri",16,"bold"),fg="white",bg="grey")
back.place(x=383,y=645)

#"FACILITIES OF THE SCHOOL"


def facility(): #SHOWS A LIST OF FACILITIES PROVIDED BY THE SCHOOL
window2=Tk()
window2.geometry("850x730")
window2.title("SCHOOL WEBSITE")
window2.configure(bg="coral2")
l1=Label(window2,text="FACILITIES",font=("Algerian",38,"underline"),fg="white",b
g="red")
l1.place(x=295,y=20)
L1=["BOARDING","SCIENCE LAB","LIBRARY","FOOTBALL GROUND","SKATING
GROUND","SMART CLASSES"]
L2=["MUSIC ROOM","TRANSPORT","AUDITORIUM","BASKETBALL
COURT","COMPUTER LAB","SWIMMING POOL"]
n=0
for i in range(6):
b10=Button(window2,text=L1[i],width=20,font=("Segoe UI
Semibold",20),fg="navy blue",bg="light pink")
b10.place(x=55,y=110+int(n))
n=n+90
n=0
for i in range(6):
b10=Button(window2,text=L2[i],width=20,font=("Segoe UI
Semibold",20),fg="navy blue",bg="light pink")
b10.place(x=470,y=110+int(n))
n=n+90

back=Button(window2,text="BACK",command=window2.destroy,width=7,font=("C
alibri",16,"bold"),fg="white",bg="grey")
back.place(x=383,y=645)

#"APPLICATION FORM FOR ADMISSION"


def submit(NN,A,B): #TO CONFIRM THAT GIVEN COMMAND IS EXECUTED
submit=Tk()
submit.geometry("500x120")
submit.title("COMMAND EXECUTED")
submit.configure(bg="slateblue3")
lb1=Label(submit,text=NN,width=30,font=("Lucida
Fax",20,),fg="azure2",bg="slateblue3")
lb1.place(x=A,y=B)

back=Button(submit,text="BACK",command=submit.destroy,width=8,font=("Calibr
i",14,"bold"),fg="white",bg="grey")
back.place(x=205,y=70)
def admission(): #TO CREATE THE APPLICATION FORM
def apply(): #FOR ENTERING THE APPLICATION FORM DETAILSS TO THE
MYSQL TABLE 'APPLICANTS'
r1=e1.get()
r2=e2.get()
r3=e3.get()
r4=e4.get()
r5=i.get()
r6=tklist.get()
r7=j.get()
r8=e5.get()

mydb=mysql.connector.connect(host="localhost",user="root",passwd="MySQL",d
atabase="SCHOOL")
mycursor=mydb.cursor()
insert="INSERT INTO APPLICANTS VALUES(%s,%s,%s,%s,%s,%s,%s,%s)"
data=(r1,r2,r3,r4,r5,r6,r7,r8)
try:
mycursor.execute(insert,data)
mydb.commit()
except:
mydb.rollback()
mydb.close()

window3=Tk()
window3.geometry("850x725")
window3.title("SCHOOL WEBSITE")
window3.configure(bg="dark slate grey")
l1=Label(window3,text="APPLICATION
FORM",font=("Algerian",36,"underline"),fg="white",bg="lightseagreen")
l1.place(x=205,y=20)
l2=Label(window3,text="NAME OF THE
PUPIL",width=22,font=("Calibri",20),fg="black",bg="lightsalmon")
l2.place(x=50,y=125)
l3=Label(window3,text="FATHER'S
NAME",width=22,font=("Calibri",20),fg="black",bg="lightsalmon")
l3.place(x=50,y=185)
l4=Label(window3,text="MOTHER'S
NAME",width=22,font=("Calibri",20),fg="black",bg="lightsalmon")
l4.place(x=50,y=245)
l5=Label(window3,text="DATE OF BIRTH (YYYY-MM-
DD)",width=26,font=("Calibri",17),fg="black",bg="lightsalmon")
l5.place(x=50,y=305)

l6=Label(window3,text="GENDER",width=22,font=("Calibri",20),fg="black",bg="lig
htsalmon")
l6.place(x=50,y=360)
l7=Label(window3,text="SELECT THE
STREAM",width=22,font=("Calibri",20),fg="black",bg="lightsalmon")
l7.place(x=50,y=420)
l8=Label(window3,text="SEEKING ADMISSION TO THE
HOSTEL",width=31,font=("Calibri",14),fg="black",bg="lightsalmon")
l8.place(x=50,y=480)
l9=Label(window3,text="PHONE
NUMBER",width=24,font=("Calibri",19),fg="black",bg="lightsalmon")
l9.place(x=50,y=535)

e1=Entry(window3,width=25,font=("Calibri",20),fg="black",bg="lightcyan2")
e1.place(x=440,y=125)
e2=Entry(window3,width=25,font=("Calibri",20),fg="black",bg="lightcyan2")
e2.place(x=440,y=185)
e3=Entry(window3,width=25,font=("Calibri",20),fg="black",bg="lightcyan2")
e3.place(x=440,y=245)
e4=Entry(window3,width=29,font=("Calibri",17),fg="black",bg="lightcyan2")
e4.place(x=440,y=305)
i=StringVar(window3,"MALE")

rad1=Radiobutton(window3,text="FEMALE",width=10,font=("Calibri",17),variable=
i,value="FEMALE",bg="lightcyan2")
rad1.place(x=639,y=360)

rad2=Radiobutton(window3,text="MALE",width=10,font=("Calibri",17),variable=i,v
alue="MALE",bg="lightcyan2")
rad2.place(x=439,y=360)
streams=["SCIENCE (BIO-MATHS)","SCIENCE (BIO-COMP)","COMMERCE WITH
MATHS","COMMERCE WITH IP","HUMANITIES"]
tklist=StringVar()
tklist.set("STREAMS")
menu=OptionMenu(window3,tklist,*streams)
menu.configure(width=51,bg="lightcyan2")
menu.place(x=438,y=420)
j=StringVar(window3,"REQUIRED")
rad3=Radiobutton(window3,text="NO",width=16,font=("Calibri",12),variable=j,val
ue="NOT REQUIRED",bg="lightcyan2")
rad3.place(x=636,y=480)

rad4=Radiobutton(window3,text="YES",width=16,font=("Calibri",12),variable=j,val
ue="REQUIRED",bg="lightcyan2")
rad4.place(x=438,y=480)
e5=Entry(window3,width=25,font=("Calibri",20),fg="black",bg="lightcyan2")
e5.place(x=439,y=535)

b1=Button(window3,text="SUBMIT",command=lambda:
[apply(),window3.destroy(),submit("APPLICATION
SUBMITTED",15,20)],font=("Calibri",16,"bold"),fg="white",bg="grey")
b1.place(x=360,y=600)

back=Button(window3,text="BACK",command=window3.destroy,width=7,font=("C
alibri",16,"bold"),fg="white",bg="grey")
back.place(x=360,y=660)

#"LOGIN PAGES"
def common(win): #THE COMMON DETAILS TO BE VIEWED IN BOTH
STUDENTS AND TEACHERS PANEL
import_data()
f1=Frame(win,width=260,height=540,bg="slategray3")
f1.place(x=575,y=93)
l1=Label(f1,text="CLASS
LISTS",width=12,font=("Calibri",28),fg="white",bg="coral3")
l1.place(x=13,y=85)
C1=["8A","9A","10A","11A","11B","11C"]
C2=["8B","9B","10B","12A","12B","12C"]
n=0
for i in C1:
C=[]
C.append(i)
for j in D1:
if D1[j][1]==i:
A=[D1[j][2],j]
C.append(A)
tklist=StringVar()
tklist.set(i)
menu=OptionMenu(f1,tklist,*C)
menu.configure(width=4,font=("Calibri",24),fg="black",bg="lightgrey")
menu.place(x=12,y=150+int(n))
n=n+65

n=0
for i in C2:
C=[]
C.append(i)
for j in D1:
if D1[j][1]==i:
A=[D1[j][2],j]
C.append(A)
tklist=StringVar()
tklist.set(i)
menu=OptionMenu(f1,tklist,*C)
menu.configure(width=4,font=("Calibri",24),fg="black",bg="lightgrey")
menu.place(x=139,y=150+int(n))
n=n+65

C=[]
title="TEACHERS LIST->"
C.append(title)
for i in D2:
C.append(i)
tklist=StringVar()
tklist.set("TEACHERS LIST")
menu=OptionMenu(f1,tklist,*C)
menu.configure(width=12,font=("Calibri",24),fg="white",bg="coral3") #A
MENU BUTTON SHOWING THE NAMES OF ALL THE TEACHERS
menu.place(x=12,y=10)

A="\"LEARNING IS A TREASURE THAT,\n FOLLOWS ITS OWNER EVERYWHERE.\""


B="\"EDUCATION IS NOT LEARNING THE FACT,\n BUT TRAINING THE MIND TO
THINK.\""
C="\"IF YOU ARE DETERMINED TO LEARN\n NO ONE CAN STOP YOU FROM
DOING SO.\""
D="\"LEARNING IS NOT A CHILD'S PLAY,\n WE CANNOT LEARN WITHOUT
PAIN.\""
E="\"LEARN FROM YESTERDAY LIVE\n FOR TODAY AND HOPE FOR
TOMORROW.\""
Q=[A,B,C,D,E]
n=randint(0,4)
f2=Frame(win,width=550,height=75,bg="seagreen1")
f2.place(x=12,y=95)
l2=Label(f2,text=Q[n],width=35,font=("Calribi",19),fg="black",bg="seagreen1")
l2.place(x=10,y=6)

def enquiry(): #A FUNCTION FOR BOTH TEACHERS AND STUDENTS TO SUBMIT


ANY ENQUIRIES THEY NEED TO MAKE TO THE SCHOOL
v1=name
v2=en.get()

mydb=mysql.connector.connect(host="localhost",user="root",passwd="MySQL",d
atabase="SCHOOL")
mycursor=mydb.cursor()
insert="INSERT INTO ENQUIRIES VALUES(%s,%s)"
data=(v1,v2)
mycursor.execute(insert,data)
mydb.commit()
mydb.close()

f5=Frame(win,width=550,height=95,bg="lightblue3")
f5.place(x=10,y=530)

l5=Label(f5,text="ENQUIRIES",width=14,font=("Calribi",17),fg="black",bg="lightblu
e3")
l5.place(x=10,y=5)
en=Entry(f5,width=28,font=("Calibri",17),fg="black",bg="grey")
en.place(x=205,y=5)

b=Button(f5,text="SUBMIT",command=lambda:[enquiry(),submit("ENQUIRY
SUBMITTED",18,20)],width=7,font=("Calibri",13,"bold"),fg="white",bg="black")
b.place(x=465,y=45)

def student_details(win,a,b,c): #FUNCTION TO SHOW THE STUDENT DETAILS


S=c
f=Frame(win,width=550,height=270,bg="ivory4")
f.place(x=a,y=b)
I=["ADMIN NO","PARENT NAME","GENDER","CLASS","DATE OF
BIRTH","CONTACT"]
n=42
for i in I:
l2=Label(f,text=i,width=16,font=("Calribi",16),fg="black",bg="palegreen")
l2.place(x=10,y=10+int(n))
n=n+36

I2=[]
n=42
for i in D1:
if i==S:
global name
name=i
A=[D1[i][0],D1[i][3],D1[i][4],D1[i][1],D1[i][5],D1[i][6],D1[i][7]]
I2.append(A)
for i in I2:
for j in range(6):
l3=Label(f,text=i[j],width=28,font=("Calibri",16),fg="black",bg="purple1")
l3.place(x=230,y=10+int(n))
n=n+36

l3=Label(f,text=name,width=35,font=("Calibri",22),fg="black",bg="navajowhite3")
l3.place(x=10,y=5)

def Tpanel(): #THE TEACHERS PANEL


def student_search(): #SEARCHING THE DETAILS OF A STUDENT VIA NAME
E=tklist1.get()
if E in D1:
window8=Toplevel()
window8.geometry("605x320")
window8.title("STUDENT DETAILS")
window8.configure(bg="black")
global eE
eE=tklist1.get()
student_details(window8,30,30,eE)

window7=Toplevel()
window7.geometry("850x700")
window7.title("TEACHER PANEL")
window7.configure(bg="brown4")
l1=Label(window7,text="TEACHER'S
PANEL",font=("Algerian",36,"underline"),fg="white",bg="steelblue")
l1.place(x=205,y=20)
common(window7)
f3=Frame(window7,width=550,height=240,bg="ivory3")
f3.place(x=10,y=195)
I=["GENDER","DATE OF BIRTH","SUBJECT","CONTACT"]
n=42
for i in I:
l2=Label(f3,text=i,width=14,font=("Calribi",18),fg="black",bg="limegreen")
l2.place(x=8,y=25+int(n))
n=n+42

I2=[]
n=42
for i in D2:
if D2[i][4]==U1:
global name
name=i
A=[D2[i][0],D2[i][1],D2[i][2],D2[i][3],D2[i][4]]
I2.append(A)
for i in I2:
for j in range(4):

l3=Label(f3,text=i[j],width=24,font=("Calibri",19),fg="black",bg="mediumpurple4")
l3.place(x=220,y=25+int(n))
n=n+42
l3=Label(f3,text=name,width=29,font=("Calibri",26),fg="white",bg="blue")
l3.place(x=10,y=10)

f4=Frame(window7,width=550,height=45,bg="white")
f4.place(x=10,y=460)
l4=Label(f4,text="STUDENT
NAME",width=15,font=("Calibri",17),fg="black",bg="sienna2")
l4.place(x=10,y=5)
T1=[]
for i in D1:
T1.append(i)
tklist1=StringVar()
tklist1.set("STUDENTS")
T1.sort()
menu=OptionMenu(f4,tklist1,*T1)
menu.configure(width=24,font=("Calibri",13),fg="black",bg="sienna3")
menu.place(x=205,y=3)
b=Button(f4,text="SEARCH",command=student_search,width=7,font=("Calibri",14,
"bold"),fg="black",bg="grey")
b.place(x=460,y=3)

back=Button(window7,text="BACK",width=7,command=window7.destroy,font=("C
alibri",16,"bold"),fg="white",bg="grey")
back.place(x=383,y=645)

def Spanel(): #THE STUDENTS PANEL


def teach_search(): #SEARCHING THE DETAILS OF TEACHER VIA NAME
window8=Tk()
window8.geometry("572x220")
window8.title("TEACHER DETAILS")
window8.configure(bg="black")
f4=Frame(window8,width=537,height=185,bg="azure3")
f4.place(x=18,y=20)
S=tklist2.get()

I=["SUBJECT","DATE OF BIRTH","CONTACT"]
n=42
for i in I:

l2=Label(f4,text=i,width=14,font=("Calribi",18),fg="black",bg="mediumpurple2")
l2.place(x=10,y=19+int(n))
n=n+42

I2=[]
n=42
for i in D2:
if i==S:
global name
name=i
A=[D2[i][2],D2[i][1],D2[i][3]]
I2.append(A)
for i in I2:
for j in range(3):
l3=Label(f4,text=i[j],width=24,font=("Calibri",18),fg="black",bg="plum3")
l3.place(x=230,y=19+int(n))
n=n+42
l3=Label(f4,text=name,width=34,font=("Calibri",22),fg="white",bg="sienna2")
l3.place(x=10,y=9)

window6=Toplevel()
window6.geometry("850x700")
window6.title("STUDENT PANEL")
window6.configure(bg="dodgerblue3")
l1=Label(window6,text="STUDENT'S
PANEL",font=("Algerian",36,"underline"),fg="white",bg="black")
l1.place(x=205,y=20)
common(window6)
student_details(window6,10,185,name)

f4=Frame(window6,width=550,height=45,bg="white")
f4.place(x=10,y=470)
l4=Label(f4,text="TEACHER
NAME",width=15,font=("Calibri",17),fg="white",bg="blue")
l4.place(x=10,y=5)

T2=[]
for i in D2:
T2.append(i)
T2.sort()
tklist2=StringVar()
tklist2.set("TEACHERS")
menu=OptionMenu(f4,tklist2,*T2)
menu.configure(width=24,font=("Calibri",13),fg="white",bg="blue")
menu.place(x=205,y=3)

b=Button(f4,text="SEARCH",command=teach_search,width=7,font=("Calibri",14,"b
old"),fg="black",bg="grey")
b.place(x=460,y=3)

def panel(): #LOGIN PAGE TO STUDENT AND TEACHER PANEL


def sign_up(): #CHECKS THE VALIDITY OF THE USERNAME AND PASSWORD
global check
check=""
global U1
U1=e1.get()
global P1
P1=e2.get()
val=p.get()
if val=="STUD":
global n
n=[]
for i in D1:
n.append(i)
l=[]
for i in D1:
l.append(D1[i][7])
m=[]
for i in D1:
m.append(D1[i][8])
if U1 not in l:
l3=Label(window5,text="(INVALID USERNAME OR
PASSWORD)",width=32,font=("Calibri",12,"bold"),fg="red",bg="white")
l3.place(x=163,y=195)
else:
i=l.index(U1)
if P1!=m[i]:
l3=Label(window5,text="(INVALID USERNAME OR
PASSWORD)",width=30,font=("Calibri",10,"bold"),fg="red",bg="white")
l3.place(x=186,y=195)
else:
check=0
global name
name=n[i]
window5.destroy()

elif val=="TEACH":
n=[]
for i in D2:
n.append(i)
l=[]
for i in D2:
l.append(D2[i][4])
m=[]
for i in D2:
m.append(D2[i][5])
if U1 not in l:
l3=Label(window5,text="(INVALID USERNAME OR
PASSWORD)",width=32,font=("Calibri",12,"bold"),fg="red",bg="white")
l3.place(x=163,y=195)
else:
i=l.index(U1)
if P1!=m[i]:
l3=Label(window5,text="(INVALID USERNAME OR
PASSWORD)",width=30,font=("Calibri",10,"bold"),fg="red",bg="white")
l3.place(x=186,y=195)
else:
check=1
window5.destroy()
if check==0:
Spanel()
elif check==1:
Tpanel()

window5=Tk()
window5.geometry("600x350")
window5.title("LOGIN")
window5.configure(bg="black")
l=Label(window5,text="WE-CARE
LOGIN",font=("Algerian",32,"underline"),fg="white",bg="black")
l.place(x=140,y=15)

l1=Label(window5,text="USERNAME",width=16,font=("Calibri",20),fg="black",bg="
white")
l1.place(x=50,y=90)

l2=Label(window5,text="PASSWORD",width=16,font=("Calibri",20),fg="black",bg="
white")
l2.place(x=50,y=145)
e1=Entry(window5,width=16,font=("Calibri",22),fg="black",bg="white")
e1.place(x=308,y=90)

e2=Entry(window5,show="*",width=16,font=("Calibri",22),fg="black",bg="white")
e2.place(x=308,y=145)

p=StringVar(window5,"STUD")
rad3=Radiobutton(window5,text="STUDENT
LOGIN",width=15,font=("Calibri",12),variable=p,value="STUD",bg="white")
rad3.place(x=390,y=250)
rad4=Radiobutton(window5,text="TEACHER'S
LOGIN",width=15,font=("Calibri",12),variable=p,value="TEACH",bg="white")
rad4.place(x=390,y=290)

b2=Button(window5,text="SIGN
UP",command=sign_up,width=6,font=("Calibri",14,"bold"),fg="white",bg="grey")
b2.place(x=259,y=235)

back=Button(window5,text="BACK",command=window5.destroy,width=6,font=("C
alibri",14,"bold"),fg="white",bg="grey")
back.place(x=259,y=285)

def update(a): #PAGE FOR UPDATING DETAILS OF STUDENT OR TEACHER


import_data()
def update_sql(): #UPDATING DETAILS OF STUDENT OR TEACHER IN THE SQL
TABLE
f=field.get()
n=nam.get()
newi=new.get()

mydb=mysql.connector.connect(host="localhost",user="root",passwd="MySQL",d
atabase="SCHOOL")
mycursor=mydb.cursor()
if a=="TEACHER":
if f=="NAME":
mycursor.execute("UPDATE TEACHERS SET NAME ='"+newi+"' WHERE
NAME ='"+n+"'")
elif f=="DATE_OF_BIRTH":
mycursor.execute("UPDATE TEACHERS SET DATE_OF_BIRTH ='"+newi+"'
WHERE NAME ='"+n+"'")
elif f=="SUBJECT":
mycursor.execute("UPDATE TEACHERS SET SUBJECT ='"+newi+"' WHERE
NAME ='"+n+"'")
elif f=="CONTACT":
mycursor.execute("UPDATE TEACHERS SET CONTACT ='"+newi+"' WHERE
NAME ='"+n+"'")

if a=="STUDENT":
if f=="CLASS":
mycursor.execute("UPDATE STUDENTS SET CLASS ='"+newi+"' WHERE
NAME ='"+n+"'")
elif f=="R_NO":
mycursor.execute("UPDATE STUDENTS SET R_NO ='"+newi+"' WHERE
NAME ='"+n+"'")
elif f=="NAME":
mycursor.execute("UPDATE STUDENTS SET NAME ='"+newi+"' WHERE
NAME ='"+n+"'")
elif f=="PARENT_NAME":
mycursor.execute("UPDATE STUDENTS SET PARENT_NAME ='"+newi+"'
WHERE NAME ='"+n+"'")
elif f=="DATE_OF_BIRTH":
mycursor.execute("UPDATE STUDENTS SET DATE_OF_BIRTH ='"+newi+"'
WHERE NAME ='"+n+"'")
elif f=="CONTACT":
mycursor.execute("UPDATE STUDENTS SET CONTACT ='"+newi+"' WHERE
NAME ='"+n+"'")
mydb.commit()

window11=Toplevel()
window11.geometry("750x350")
window11.title("UPDATE")
window11.configure(bg="black")
l=Label(window11,text="UPDATE "+a+"
INFO",font=("Algerian",28,"underline"),fg="white",bg="black")
l.place(x=175,y=15)
I=["SELECT THE NAME","SELECT FIELD TO BE UPDATED","ENTER THE NEW
RECORD"]
n=60
for i in I:
l2=Label(window11,text=i,width=30,font=("Calribi",18),fg="black",bg="white")
l2.place(x=25,y=25+int(n))
n=n+55
if a=="TEACHER":
T1=[]
for i in D2:
T1.append(i)
T1.sort()
nam=StringVar()
nam.set("TEACHERS")
menu=OptionMenu(window11,nam,*T1)
menu.configure(width=22,font=("Calibri",13),fg="black",bg="white")
menu.place(x=480,y=82)
T2=["NAME","DATE_OF_BIRTH","SUBJECT","CONTACT"]
field=StringVar()
field.set("FIELDS")
menu=OptionMenu(window11,field,*T2)
menu.configure(width=22,font=("Calibri",13),fg="black",bg="white")
menu.place(x=480,y=140)

if a=="STUDENT":
T1=[]
for i in D1:
T1.append(i)
T1.sort()
nam=StringVar()
nam.set("STUDENTS")
menu=OptionMenu(window11,nam,*T1)
menu.configure(width=22,font=("Calibri",13),fg="black",bg="white")
menu.place(x=480,y=82)

T2=["CLASS","R_NO","NAME","PARENT_NAME","DATE_OF_BIRTH","CONTACT"]
field=StringVar()
field.set("FIELDS")
menu=OptionMenu(window11,field,*T2)
menu.configure(width=22,font=("Calibri",13),fg="black",bg="white")
menu.place(x=480,y=140)

new=Entry(window11,text=i,width=16,font=("Calribi",20),fg="black",bg="white")
new.place(x=480,y=195)

b1=Button(window11,text="UPDATE",command=lambda:
[update_sql(),window11.destroy(),submit("DETAILS UPDATED
SUCCESSFULLY",5,15)],width=22,font=("Calibri",16,"bold"),fg="white",bg="grey")
b1.place(x=475,y=255)
def delete(a): #PAGE FOR DELETING DETAILS OF STUDENT OR TEACHER
import_data()
def delete_sql(): #DELETING DETAILS OF STUDENT OR TEACHER FROM THE
SQL TABLE
n=nam.get()
mydb=mysql.connector.connect(host="localhost",user="root",passwd="MySQL",d
atabase="SCHOOL")
mycursor=mydb.cursor()

if a=="TEACHER":
mycursor.execute("DELETE FROM TEACHERS WHERE NAME ='"+n+"'")

elif a=="STUDENT":
mycursor.execute("DELETE FROM STUDENTS WHERE NAME ='"+n+"'")
mydb.commit()

window11=Toplevel()
window11.geometry("850x200")
window11.title("DELETE")
window11.configure(bg="black")
l=Label(window11,text="DELETE "+a+"
INFO",font=("Algerian",28,"underline"),fg="white",bg="black")
l.place(x=175,y=15)
l2=Label(window11,text="NAME OF "+a+" WHOSE INFO IS TO BE
DELETE",width=50,font=("Calribi",14),fg="black",bg="white")
l2.place(x=25,y=85)
T=[]
if a=="TEACHER":
for i in D2:
T.append(i)
nam=StringVar()
nam.set("TEACHERS")
elif a=="STUDENT":
for i in D1:
T.append(i)
nam=StringVar()
nam.set("STUDENTS")
T.sort()
menu=OptionMenu(window11,nam,*T)
menu.configure(width=18,font=("Calibri",13),fg="black",bg="white")
menu.place(x=600,y=80)
b1=Button(window11,text="DELETE",command=lambda:
[delete_sql(),window11.destroy(),submit("DETAILS DELETED
SUCCESSFULLY",5,15)],width=22,font=("Calibri",13,"bold"),fg="white",bg="grey")
b1.place(x=600,y=140)
def SMpanel(): #THE PANEL ONLY FOR THE SCHOOL MANAGEMENT STAFFS
(PRINCIPAL--VICE PRINCIPAL--HEADMASTER)
import_data()
window10=Toplevel()
window10.geometry("850x700")
window10.title("SCHOOL MANAGEMENT PANEL")
window10.configure(bg="darkorchid")
l1=Label(window10,text="SCHOOL MANAGEMENT
PANEL",font=("Algerian",34,"underline"),fg="white",bg="orchid4")
l1.place(x=100,y=20)
common(window10)

f1=Frame(window10,width=550,height=205,bg="peachpuff2")
f1.place(x=10,y=195)
I=["GENDER","DATE OF BIRTH","DESIGNATION"]
n=42
for i in I:
l2=Label(f1,text=i,width=14,font=("Calribi",18),fg="white",bg="black")
l2.place(x=8,y=30+int(n))
n=n+42

I2=[]
n=42
for i in D3:
if D3[i][3]==U1:
global name
name=i
A=[D3[i][0],D3[i][1],D3[i][2],D3[i][3]]
I2.append(A)
for i in I2:
for j in range(3):
l3=Label(f1,text=i[j],width=24,font=("Calibri",19),fg="white",bg="black")
l3.place(x=220,y=30+int(n))
n=n+42
l3=Label(f1,text=name,width=29,font=("Calibri",26),fg="white",bg="black")
l3.place(x=10,y=10)

f2=Frame(window10,width=550,height=220,bg="green2")
f2.place(x=10,y=410)
I1=["STUDENT RECORD -->","TEACHER RECORD -->"]
n=10
for i in I1:
l2=Label(f2,text=i,width=24,font=("Calribi",18),fg="white",bg="black")
l2.place(x=8,y=2+int(n))
n=n+100

b1=Button(f2,text="UPDATE S",width=12,command=lambda:
[update("STUDENT")],font=("Calribi",14),fg="white",bg="black")
b1.place(x=375,y=10)
b2=Button(f2,text="DELETE S",width=12,command=lambda:
[delete("STUDENT")],font=("Calribi",14),fg="white",bg="black")
b2.place(x=375,y=60)
b3=Button(f2,text="UPDATE T",width=12,command=lambda:
[update("TEACHER")],font=("Calribi",14),fg="white",bg="black")
b3.place(x=375,y=110)
b4=Button(f2,text="DELETE T",width=12,command=lambda:
[delete("TEACHER")],font=("Calribi",14),fg="white",bg="black")
b4.place(x=375,y=160)

def school_management(): #LOGIN PAGE FOR SCHOOL MANAGEMENT


def sign_up2(): #CHECKING THE USERNAME AND PASSWORD
global U1
U1=e1.get()
global P1
P1=e2.get()
global n
n=[]
for i in D3:
n.append(i)
l=[]
for i in D3:
l.append(D3[i][3])
m=[]
for i in D3:
m.append(D3[i][4])
if U1 not in l:
l3=Label(window9,text="(INVALID USERNAME OR
PASSWORD)",width=32,font=("Calibri",12,"bold"),fg="red",bg="white")
l3.place(x=163,y=195)
else:
i=l.index(U1)
if P1!=m[i]:
l3=Label(window9,text="(INVALID USERNAME OR
PASSWORD)",width=30,font=("Calibri",10,"bold"),fg="red",bg="white")
l3.place(x=186,y=195)
else:
check=0
global name
name=n[i]
window9.destroy()
SMpanel()
window9=Tk()
window9.geometry("600x350")
window9.title("LOGIN")
window9.configure(bg="black")
l=Label(window9,text="SCHOOL MANAGEMENT
LOGIN",font=("Algerian",28,"underline"),fg="white",bg="black")
l.place(x=60,y=15)

l1=Label(window9,text="USERNAME",width=16,font=("Calibri",20),fg="black",bg="
white")
l1.place(x=50,y=90)

l2=Label(window9,text="PASSWORD",width=16,font=("Calibri",20),fg="black",bg="
white")
l2.place(x=50,y=145)
e1=Entry(window9,width=16,font=("Calibri",22),fg="black",bg="white")
e1.place(x=308,y=90)

e2=Entry(window9,show="*",width=16,font=("Calibri",22),fg="black",bg="white")
e2.place(x=308,y=145)

b2=Button(window9,text="SIGN
UP",command=sign_up2,width=6,font=("Calibri",14,"bold"),fg="white",bg="grey")
b2.place(x=259,y=235)

back=Button(window9,text="BACK",command=window9.destroy,width=6,font=("C
alibri",14,"bold"),fg="white",bg="grey")
back.place(x=259,y=285)

def stationary(): #THE SCHOOL STATIONARY


def calculate(): #CALCULATES THE BILL OF THE SELECTED ITEMS
v1=item1.get()
v2=item2.get()
v3=item2.get()
q1=e1.get()
q2=e2.get()
q3=e3.get()

if q1!="" and q2=="" and q3=="":


bill=(D4[v1]*int(q1))

elif q1!="" and q2!="" and q3=="":


bill=(D4[v1]*int(q1))+(D4[v2]*int(q2))

elif q1!="" and q2!="" and q3!="":


bill=(D4[v1]*int(q1))+(D4[v2]*int(q2))+(D4[v3]*int(q3))

else:
bill=0
window14=Tk()
window14.geometry("500x120")
window14.title("BILL")
window14.configure(bg="black")
lb1=Label(window14,text="THE TOTAL BILL IS
Rs."+str(bill),width=30,font=("Microsoft Yahei",20,),fg="white",bg="black")
lb1.place(x=20,y=20)

back=Button(window14,text="BACK",command=window14.destroy,width=8,font=
("Calibri",14,"bold"),fg="white",bg="grey")
back.place(x=205,y=65)

window13=Toplevel()
window13.geometry("850x500")
window13.title("SCHOOL STATIONARY")
window13.configure(bg="slateblue4")
fram=Frame(window13,width=800,height=375,bg="lavender")
fram.place(x=20,y=100)
l1=Label(window13,text="SCHOOL
STATIONARY",font=("Algerian",36,),fg="white",bg="black")
l1.place(x=170,y=20)

n=50
for i in range(0,3):
l1=Label(fram,text="SELECT THE ITEM
NAME",width=24,font=("Calibri",20,),fg="white",bg="black")
l1.place(x=10,y=25+n)
n=n+65
ITEM=[]
for i in D4:
ITEM.append(i)
ITEM.sort()
item1=StringVar()
item1.set("ITEMS")
menu=OptionMenu(fram,item1,*ITEM)
menu.configure(width=30,font=("Calibri",15,"bold"),fg="white",bg="black")
menu.place(x=370,y=75)

ITEM=[]
for i in D4:
ITEM.append(i)
ITEM.sort()
item2=StringVar()
item2.set("ITEMS")
menu=OptionMenu(fram,item2,*ITEM)
menu.configure(width=30,font=("Calibri",15,"bold"),fg="white",bg="black")
menu.place(x=370,y=140)

ITEM=[]
for i in D4:
ITEM.append(i)
ITEM.sort()
item3=StringVar()
item3.set("ITEMS")
menu=OptionMenu(fram,item3,*ITEM)
menu.configure(width=30,font=("Calibri",15,"bold"),fg="white",bg="black")
menu.place(x=370,y=205)

e1=Entry(fram,width=3,font=("Calibri",20,"bold"),fg="white",bg="black")
e1.place(x=735,y=77)
q1=""
e2=Entry(fram,width=3,font=("Calibri",20,"bold"),fg="white",bg="black")
e2.place(x=735,y=142)
q2=""
e3=Entry(fram,width=3,font=("Calibri",20,"bold"),fg="white",bg="black")
e3.place(x=735,y=207)
q3=""

b1=Button(fram,text="ITEMS
AVAILABLE",width=33,font=("Calibri",15,"bold"),fg="white",bg="grey")
b1.place(x=372,y=18)

b2=Button(fram,text="QTY",width=4,font=("Calibri",15,"bold"),fg="white",bg="gre
y")
b2.place(x=733,y=18)

bill=Button(fram,text="BILL",width=12,height=3,command=calculate,font=("Calibri
",16,"bold"),fg="white",bg="grey")
bill.place(x=372,y=260)

#"THE HOME PAGE"


def home(): #DISPLAYS THE HOME PAGE OF SCHOOL WEBSITE
window=Tk()
window.geometry("850x725")
window.title("SCHOOL WEBSITE")
window.configure(bg="cornflower blue")
l1=Label(window,text="HOGWARTS SCHOOL",font=("Algerian",56,),fg="ghost
white",bg="royal Blue")
l1.place(x=90,y=20)
l1=Label(window,text="OF ARTS AND SCIENCE",font=("Algerian",38,),fg="ghost
white",bg="royal Blue")
l1.place(x=245,y=100)
b1=Button(window,text="ABOUT THE
SCHOOL",command=about,width=20,font=("Times New
Roman",24,"bold"),fg="thistle1",bg="red")
b1.place(x=20,y=190)
b2=Button(window,text="OUR
FACILITIES",command=facility,width=20,font=("Times New
Roman",24,"bold"),fg="thistle1",bg="red")
b2.place(x=20,y=260)
b3=Button(window,text="NEW
ADMISSIONS",command=admission,width=20,font=("Times New
Roman",24,"bold"),fg="thistle1",bg="red")
b3.place(x=20,y=330)
b4=Button(window,text="WE-CARE
PANEL",command=panel,width=20,font=("Times New
Roman",24,"bold"),fg="thistle1",bg="red")
b4.place(x=20,y=400)

b5=Button(window,text="STATIONARY",command=stationary,width=20,font=("Ti
mes New Roman",24,"bold"),fg="thistle1",bg="red")
b5.place(x=20,y=470)
b6=Button(window,text="SCHOOL
MANAGEMENT",command=school_management,width=21,font=("Times New
Roman",24,"bold"),fg="black",bg="red3")
b6.place(x=430,y=645)
l2=Label(window,text="CONTACT-
XXXXXXXXXX",font=("Calibri",18,"bold"),fg="ghost white",bg="cornflower Blue")
l2.place(x=500,y=570)
l3=Label(window,text="MAIL-
[email protected]",font=("Calibri",18,"bold"),fg="ghost white",bg="cornflower
Blue")
l3.place(x=500,y=600)
home()
CONCLUSION
Working on this project has helped me and my team to get a taste
of the practical applications of the things that we learn at school.
This has helped me understand the concepts very well. Besides
learning about the subject. We were also able to work as a team
and cultivated essential values like teamwork and patience.
I hope the things that I learned while doing this project will help
me in the future when I’m presented with difficult situations. I
have done this project in the best possible way I could and I hope
it serves its purpose well.

THANK YOU.
BIBLIOGRAPHY
 www.geeksforgeeks.org
 www.msqltutorial.org
 www.w3schools.com
 www.tutorialspoint.com
 stackoverflow.com
 Computer Science with Python – Textbook Class 11
 Computer Science with Python – Textbook Class 12

You might also like