File 1
File 1
File 1
INTRODUCTION
The scope or limitation of this college management system is only those who are in
campus they can access. teachers, principle only able to access this software. The
database of this software is inside the campus to new member have to take permission
of a particular college staff.
1
1.5.2 Module description
The module description specifies the different modules of software. This
application contains following modules:
1.5.2.1 General Module
In this user can change their password if they have forgot their
login password.
2
1.5.2.2.1.2.2 View
This module helps to view the information about
particular staff.
1.5.2.2.1.2.3 Delete:
This module will delete the particular record of
staff details
1.5.2.2.1.3 Salary Payment module:
This module will be the salary related activates of staff
and it has the sub modules.
1.5.2.2.1.3.1 Calculate
This module will calculate the amount of salary to be
given to the staff based on his attendance.
1.5.2.2.1.3.1 Save
This module simply saves the salary payment
details of the staff.
1.5.2.2.1.4 Staff Attendance:
This module is used to manage the attendance record of
the staffs.
1.5.2.2.2 Report module:
This module provides academic report of the staffs. It contains
following sub modules.
1.5.2.2.2.1 Staff salary report module:
This module provides report of the staff salary.
1.5.2.2.2.2 Staff attendance report module:
This module provides report of the attendance of staff.
1.5.2.2.2.3 Staff achievement report module:
This module provides report of the achievement of staff.
1.5.2.3 Staff Module
1.5.2.3.1 Registration module:
This module gives to registration of new staff and provides
password and user name.
3
1.5.2.3.2 Admission module:
This module helps the staff to fill the admission related
activates of staff.
1.5.2.3.3 Achievement module:
This module helps the staff to add his achievements of other
activities. It has following sub modules:
Add
Update
1.5.2.3.4 Staff attendance:
This module helps the staff to add his attendance details.
1.5.2.3.5 View staff salary:
This module helps the staff to view his monthly salary details.
4
1.6 System architecture:
USER
GUI
Packages
PYTHON Functions
Connections
XAMPP
DS
RDBMS MYSQL
Operating system
Processing modules
5
1.7 End user:
An end user is staff of the college who makes use of the services produced by the
system.
1.8 Software/Hardware need for the development:
It refers to a set of computer activities dedicated to a process of creating, designing,
deploying supporting software.
Front end: Python 3.10 64-bit (TK-inter)
Back end: XAMPP
1.9 Software/Hardware need for the implementation:
Operating system: Windows, Linux and Mac
4 GB of RAM
6
2. SOFTWARE REQUIREMENT SPECIFICATION
2.1 Introduction
A software requirements specification (SRS) is a document that describes what the
software will do how it will be expected to perform. A software requirement
specification is a description of software system to be developed. It has to bridge
communication gap between developer and user. It describes functional and non-
functional requirement and may include a set of cases that describes user interaction
that the software must provide.
A typical SRS includes:
A Purpose
An overall description
The purpose of this document is to provide overall description of the event with
functionalities and their dependencies with each other and their requirement.
An SRS forms the basis of an organization’s entire project, sets out the framework
that all the development teams will follow. It provides critical information to all the
teams, including development, operations, quality assurance (QA) and maintenance,
ensuring the teams are in agreement.
Using the SRS helps an enterprise confirm that the requirements are fulfilled and
helps business leaders make decisions about the lifecycle of their product, such as
when to retire a feature.
In addition, writing an SRS can help developers reduce the time effort
necessary to meet their goals as well as save money on the cost of
development.
Boundaries of software products are defined by set of requirements. The
software development designs, implements, tests and deliver this requirement
to user. A requirement is automatic unit of software product.
SRS document provides a reference for validation of the final product. A high-
quality SRS is a prerequisite to high quality software. In future one can refer
the following SRS to extend the same software by referring this SRS document
other developers can develop and extend this software to network level. It
specifies basic requirement constraints and interface for the proposed system.
7
2.2 Overall Description
This section describes the function of the project and their aim. It also includes the
constraints and the requirements of the project.
2.2.1 Product Perspective
8
2.2.2 Product Functions
User should have basic computer knowledge and know about the
functionalities of the application and user should be able to read or
understand English. It specifies the End Users minimum characteristics or
knowledge required use the application. The user/ admin should have basic
knowledge about the computer. They must have basic idea about the college
management. Admin is the super user and control over the entire event.
The basic assumption is made about end users that they should be computer
literate, should know the usage of computer system and should know English
and user should have basic knowledge about college management.
9
2.4.1.2 Forgot Password
In this user can change their password if they have forgot their login
password.
Process: When user enters security key, if the security key is valid, then
the user will be asked to enter the new password where the user can
change their password.
10
Process:
Check for the staff record in the database
which has to be deleted.
Output:
The specified record is deleted from the
database.
2.4.2.1.2 Admission
: 2.4.2.1.2.1 Update
Input:
Input the staff id and name of the staff which
has to be updated.
Process:
Check for the staff record in the database
which has to be updated.
Output:
The specified staff record is updated.
2.4.2.1.2.2 View
Input:
Input the staff id and name of the staff which
has to be displayed.
Process:
Check for the staff record in the database
which has to be displayed.
Output:
The specified staff record is displayed.
2.4.2.1.2.3 Delete
Input:
Input the staff id and name of the staff which
has to be deleted.
Process:
Check for the staff record in the database
which has to be deleted.
Output:
The specified record is deleted from the
database.
11
Process:
Checks for specified staff attendance in the
database and calculates salary amount
according to it.
Output:
Specified staff salary amount is generated.
2.4.2.1.3.2 Save
Input:
Inputs the staff id and name whose salary
report to be saved.
Process:
Checks for specified staff details in the
database which has to be saved.
Output:
Specified staff salary amount is generated.
12
Output:
Specified staff achievement report is generated.
2.4.3.1 Registration
In this new user will register to the system using user credentials.
Input:
Username, password.
Process:
Check username, password against different validation. If
both username and password are valid, user will be
registered and a security key will be generated.
Output:
If both username and password are valid user will be
registered and a security key will be generated and displayed
to the user.
2.4.3.2 Admission
Input:
Input the basic information like staff name, staff id. degree,
college, university, marks obtained.
Process:
Stores the information of the staff to the database.
Output:
Displays ‘Admission successful’ message else displays 'Staff
record already exist’ message.
13
2.4.3.3 Achievements
2.4.3.3.1 Add
Input:
Input the staff id and name whose achievements details
to be added to the database.
Process:
Stores the staff achievements details to the database.
Output:
Staff achievement record will be added to the
database:
2.4.3.3.2 Update
Input:
Input the staff id and name whose achievements
details to be updated.
Process:
Checks for the staff achievement record in the data
base which has to be updated.
Output:
The specified staff achievements details is updated in
the database.
2.4.3.4 Staff attendance
Input:
Input the staff id and name whose attendance details to be
added.
Process:
If staff ID is valid then staff attendance details is added to
database.
Output:
If the staff ID is valid display ‘Staff attendance is added
successfully’ else display error message.
2.4.3.5 View salary report
Input:
Input the staff id and name of the staff whose salary report
has to be displayed.
Process:
14
If the name and password are correct then it will load
respective page.
Output:
If the information is valid displays staff salary report else
displays error message.
2.5 Design Constraints
2.5.1 Hardware Constraints
15
This application system must be highly reliable and it should generate all the
outputs in the selected order.
2.6.3 Maintainability
This application will be developed in such a way that it can be modified.
2.6.4 Scalability
Not applicable
2.7 Other requirements
Not applicable
16
3. SYSTEM DESIGN
3.1 Introduction
System design is the process of defining the architecture, module interfaces and
data for a system to satisfy specified requirements.
The purpose of the design phase is to plan the solution of the problem specified by
the requirement documents.
This is the first step that moving from problem domain to the solution domain.
The design of the system is essentially a blueprint or a plan for a solution for the
system.
All the functional requirement collected from client are sufficient for the project
life-cycle.
All the Non-functional and Specific requirement specified in SRS well enough for
the development of system.
Time constraint.
3.3 Functional decomposition
17
3.3.1 System Software Architecture
Approve
Achievement
View
Add
Delete
Update
Admission
Attendance
Update
Delete
Salary payment
Calculate
Save
Staff Attendance
Report
18
3.3.2 System technical architecture
Desktop
Internet Xampp MySQL
Database
Fig 3.2
Fig 3.3
Achievement
Login Details
registration
Attendance
details
Attendance reports
Report generation
Request for login
Staff management
Salary payment,
Attendance
Admin
Fig 3.4
Login
Staff
management
Forgot Report
password
USER
Registration
View salary
report
Admission
Attendance
Achievement
Fig 3.5
General module
21
Invalid
Display Error
Data
message Login
Compare
Username, Password Validated
username,
Admin/Staff Validation
password and
User Type data user Type
Valid Data
Display Home
page
Fig 3.6
Admin module
Staff Report
management
Admin
Staff module
22
Achievement
Attendance
Staff
Display error
message
Invalid
Load
Valid
Input name and respective
Admin/Staff Validation page
password
REG table
Display
successful
message
Input:
User type, Username, Password.
Process definition:
23
If the name and password are correct then it will load
respective page.
Output:
If the information is valid displays ‘Login successful’
else displays error message.
Display error
message
Invalid
Vali
d
REG table
Display Store to
successful database
message
Input:
Username, Email, New password, re-type password.
Process definition:
24
If he / she forgot password it will ask email id and
username that is used in registration time. If it is correct
email id then we can generate new password and re-type
password.
Output:
If the information is valid displays ‘Password
successfully changed’ else displays error message.
Display error
message
Invalid
Valid Approve
Select the the staff
Admin details of Validation
details
staff
REG table
Display
successful
message
25
Input:
Status
Process definition:
Admin reads the details of staff and if the details are
correct then it will load the respective page.
Output:
If the information is valid displays ‘Success’ message
else displays error message.
3.5.2.1.1.2 View
Click on
Select Staff view
Admin details button
REG table
Input:
Staff ID
Process definition:
Admin reads the details of staff and if the details are
correct then it will load the respective page.
. Output:
If the information is valid displays all the details of staff.
3.5.2.1.1.3 Delete
REG
Display error table
message
Invalid
Valid Delete
Input details from
Admin of staff Validation database
REG table
Display “staff
record is
deleted” 26
message
Input:
Staff ID.
Process definition:
If the staff ID is valid then staff information is deleted
and from database.
Output:
If the staff ID is valid displays ‘staff record is deleted’
else display error message
3.5.2.1.2 Admission
3.5.2.1.2.1 Update
Invalid
Show message “Staff
record does not exist” REG table
Valid input
Admission
Update
details
27
Input:
Staff ID.
Process definition:
If the staff ID is valid then staff information is updated
and stored to database.
Output:
If the staff ID is valid displays ‘staff record is updated’
else display error message.
3.5.2.1.2.2 View
Click
Select Staff on view
Admin
details button
REG table
View the
details of
staff
Input:
Staff ID
Process definition:
Admin reads the details of staff and if the details are
correct then it will load the respective page.
. Output:
28
If the information is valid displays all the details of staff.
3.5.2.1.2.3 Delete
Invalid
Delete
Valid from
Admin Validation database
Input details
of staff
REG table
Display staff
record is
deleted
message
Input:
Username and password
Process definition:
If the staff ID is valid then staff information is deleted
and from database.
Output:
If the staff ID is valid displays ‘staff record is deleted’
else display error message
Attendance
Calculate
Select the Click salary based
Admin Calculate
details of on
staff Button attendance
29
Store to
database
Input:
Staff ID
Process definition:
Admin reads the details of staff and then clicks on
Calculate button to calculate salary based on attendance
stored in database.
Output:
If the information is valid then stores staff salary to the
database.
3.5.2.1.3.2 Save
Saves the
Click on amount of
Admin Select the Save salary
details of Button calculated
staff
Salary
Store to
database
Input:
30
Staff ID
Process definition:
Admin reads the details of staff and then clicks on save
button which saves the amount of salary to database.
Output:
If the information is valid then stores staff salary to the
database.
Valid input
Attendance
Input:
Staff ID.
Process definition:
If the staff ID is valid then staff attendance is added to
database.
Output:
If the staff ID is valid displays ‘staff attendance is added
successfully’ message else display error message.
3.5.2.2 Report
3.5.2.2.1 Staff salary report
31
Invalid
Show message “Staff
record does not exist” REG table
Valid input
Salary
Selects from
database
Input:
Staff ID.
Process Definition:
If staff ID is valid then staff salary report is displayed
from database.
Output:
If the id is valid displays ‘Staff salary report is
generated’ else display error message.
32
Invalid
Show message “Staff REG table
record does not exist”
Valid
input
Achievement
Input:
Staff ID.
Process Definition:
If staff ID is valid then staff achievement report is
displayed from database.
Output:
If the id is valid displays ‘Staff achievement report is
generated’ else display error message.
Invalid
Show message “Staff
record does not exist”
REG table
Valid input
Attendance
Input:
Staff ID.
33
Process Definition:
If staff ID is valid then staff attendance report is
displayed from database.
Output:
If the id is valid displays ‘Staff attendance report is
generated’ else display error message.
Display error
message
Invalid
Valid Store to
Input user Validation database
Staff
details
REG table
Display
successful
message
Input:
Username, Password, Phone, Email.
Process Definition:
User information if it is correct then information is stored
into database.
Output:
If the information is valid displays ‘Registration
successful message’ else display error message.
Interface with other functional components:
It is an independent module.
Resource Allocation:
REG table
User interface:
It includes buttons and labels for selecting option and
perform operation.
3.5.3.2 Admission
34
Show
message
“Staff ID
already exist”
Invalid
Valid Store to
Input user Validation database
Staff
details
REG table
Display
successful
message
Input:
Staff name, Staff ID, DOB, DOJ, phone.
Process Definition:
If input information is valid then staff record is added to
the database.
Output:
If the staff information is valid displays ‘Admission
successful message’ else display error message.
35
3.5.3.3 Achievement Module:
3.5.3.3.1 Add
Invalid
Show message “Staff
record does not exist” REG table
Valid input
Achievement
Input
achievement
details
Input:
Staff ID.
Process Definition:
If Staff Id is valid then achievement details is stored to
database.
Output:
If the staff ID is valid display ‘Staff achievement is added’
else display error message.
36
3.5.3.3.2 Update:
Valid input
Achievement
Update
details
Input:
Staff ID.
Process definition:
If the staff ID is valid then staff information is updated and
stored to database.
Output:
If the staff ID is valid displays ‘staff record is updated’ else
display error message.
37
3.5.3.4 Attendance Module
Invalid
Show message “Staff ID
does not exist” REG table
Valid input
Attendance
Input:
Staff ID.
Process Definition:
If Staff Id is valid then staff attendance details is added to
database.
Output:
If the staff ID is valid display ‘Staff attendance is added
successfully’ else display error message.
38
3.5.3.5 View salary report
View
staff
Admin Input Staff salary
details report
Salary
Show
successful
message
Input:
Staff ID
Process definition:
If the name and password are correct then it will load
respective page.
Output:
If the information is valid displays staff salary report else
displays error message.
39
4. DATABASE DESIGN
4.1 Introduction
Purpose
Avoid Redundant Data
The table in the database should be constructed following standards and with
utmost dedication. It should have different fields and minimize redundant data.
The table should always have a Primary Key that would be a unique id.
Faultless Information
The database should follow the standards and conventions and provide
meaningful information useful to the organization(Constraint).
Data Integrity
Integrity assists in guaranteeing that the values are valid and faultless. Data
Integrity is set to tables, relationships, etc.
Modify
The database developed should be worked upon with the conventions and
standards, so that it can be easily modified whenever the need arise.
40
Scope
• Normalization of Database.
• Imposing Integrity Constraint.
• Establishing the Relation between the tables.
• Accessing the data from multiple tables. (Usage of join and sub query….)
• Tables
• Columns
• Views
• Sequences
• Indexes
• Stored Procedures
In a relational database, the schema defines the tables, fields, relationships, views,
indexes, packages, procedures, function s, queues, triggers, types, sequences,
materialized views.
41
Fig 4.1 Schema
• Register Table
42
Column Name Data Type Size Constraint Description
• Admission Table
The physical design is where you translate schemas into actual database
structures.
• Entity to Table
• Tuples to rows
• Attribute to Column
• Primary Key and Alternate Key to Unique Index
• Domain into Constraints
44
The data dictionary, in general, includes information about the following:
• Aliases
• Description/purpose
• Range of values
4.8 ER Diagram
45
Symbols Conversion
Entity
Weak entity
Relation
Identity Relation
Attribute
Derived Attribute
User name
Password
Phone number
Registration
Email
46
Date of join
Gender 1
Staff ID
1
Admission has
Staff name 1
1. Entity many
Staff ID
An entity
has can be a real-world object, either animate or inanimate, that can be
merely identifiable.
Achievement
1
An entity is denoted as a rectangle in an ER diagram. For example, in a
school database, many
students, teachers, classes, and courses offered can be treated as
Time ofentities. All these entities have some attributes or properties thatImage
give them their
attend identity. Text
Attendance
Entity Set
An entity set is a collection of related types of entities.
Attend generate
Strong Entity
Staff ID An entity with uniquely identified by its attribute.
Date of many
attend
Salary
No of
Weak Entity Status days
2. Attributes
Entities are denoted utilizing their
properties, known as attributes. All attributes have values. For example, a student
entity may have name, class, and age as attributes.
There exists a domain or range of values that can be assigned to attributes.
For example, a student's name cannot be a numeric value. It has to be alphabetic. A
student's age cannot be negative, etc.
47
1. Key attribute
2. Composite attribute
3. Single-valued attribute
4. Multi-valued attribute
5. Derived attribute
48
5. Derived attribute: Derived attributes are the attribute that does not exist in
the physical database, but their values are derived from other attributes present
in the database. For example, age can be derived from date_of_birth. In the ER
diagram, Derived attributes are depicted by the dashed ellipse.
3. Relationships
The association among entities is known as relationship. Relationships are
represented by the diamond-shaped box. For example, an employee works at a
department, a student enrolls in a course. Here, Works at and Enrolls are called
relationships.
49
2. Binary relationship: It is a relationship between the instances of two entity
types. For example, the Teacher teaches the subject.
3.
Cardinality Ratio
Cardinality describes the number of entities in one entity set, which can be
associated with the number of entities of other sets via relationship set.
Types of Cardinalities
1. One to One: One entity from entity set A can be contained with at most one entity
of entity set B and vice versa. Let us assume that each student has only one student ID,
and each student ID is assigned to only one person. So, the relationship will be one to
one.
50
2. One to many: When a single instance of an entity is associated with more than one
instances of another entity then it is called one to many relationships. For example, a
client can place many orders; a order cannot be placed by many customers.
3. Many to One: More than one entity from entity set A can be associated with at
most one entity of entity set B, however an entity from entity set B can be associated
with more than one entity from entity set A. For example - many students can study in a
single college, but a student cannot study in many colleges at the same time.
4. Many to Many: One entity from A can be associated with more than one entity
from B and vice-versa. For example, the student can be assigned to many
projects, and a project can be assigned to many students.
51
Identifying relationship
An identifying relationship is a relationship between two entities in which an
instance of a child entity is identified through its association with a parent entity,
which means the child entity is dependent on the parent entity for its identity and
cannot exits without it.
Participation Contraints
52
1. In phpmyadmin, click the Users tab at the top.
2. Find the row that has User root and Host 127.0.0.1.
3. Click Edit Privileges.
4. Click Change password.
5. Enter the password twice (write it down somewhere if you're not sure you can
remember it)
6. Click the Go button
Recovery is the process of restoring a database to the correct state in the event
of a failure
53
The export function is used as a backup, and the import function is used to restore.
1. Open phpMyAdmin. On the directory tree on the left, click the database
you want to back up.
This should open the directory structure in the right-hand window.
You’ll also notice that, in the directory tree on the left, all the assets under
the main database are highlighted.
Leave the Format field set to SQL, unless you have a good reason to
change it.
3. Click Go. If you select Quick, your web browser will download a copy of
the database into your specified downloads folder. You can copy that to a
safe location.
2. Click the check all box near the bottom. Then, use the drop-down menu
labeled With selected to select Drop.
3. The tool should prompt you to confirm that you want to go forward. Click
yes.
This will get rid of all the existing data, clearing the way for your restoration.
54
2. The first section is labeled File to import. A couple of lines down, there’s
a line that starts with “Browse your computer,” with a button labeled
Choose File. Click that button.
3. Use the dialog box to navigate to the location where you’ve saved the
export file that you want to restore. Leave all the options set to default. (If
you created your backup with different options, you can select those here.)
4. Click Go.
5. DETAILED DESIGN
5.1 Introduction
During detailed design, the internal logic of each module specified in system design
is decided. During this phase further details of the modules are decided. Design of each of
the modules usually specified in a high-level description language which is independent of
the language in which software eventually be implemented.
Forgot Password
55 Registration Admission
Approve
Achievement
Add
Delete
Update
Admission
Attendance
Update
Delete
Salary payment
Calculate
Save
Staff Attendance
Report
Structure chart:
Structure chart is a top-down modular design, consist of squares representing
different models in a system and lines. Structure chart shows how program has been
partitioned into manageable modules hierarchy and organization of those modules
and communicational interface.
56
Table 5.1 Symbols of Structured chart
Flow chart:
Flow chart is a graphical representation of solution to the given problems. A
Flowchart is pictorial representation of an algorithm, workflow or process. The
diagrammatic representation illustrates a solution model to given problem. It uses the
following symbol.
57
In-page
Table 5.2 Symbols
of Flow chart
Off- page
5.3.1 General
module Delay
5.3.1.1
Login
5.3.1.1.1 Input
User name, password
5.3.1.1.2 Procedural details
Structure chart:
LOGIN
DISPLAY PAGE
VALIDATION
INPUT DETAILS
58
READ MESSAGE
USER_ID
AND
PASSWORD
Algorithm:
Step 1: start
Step 2: input username and password
Step 3: Validation
Step 5: IF Email exits
Load to home page
Display respective page
ELSE
Display error message
GOTO step 2
END IF
Step 5: stop
Flow chart:
Start
Validation Register
table
59
Display error input
message False valid?
?
True
Load home
page
Stop
FORGOT PASSWORD
VALIDATION
INPUT
DETAILS
60
Algorithm:
Step 1: start
Step 2: input username, new password, confirm password
Step 3: IF Email id is valid THEN
Send OTP
ELSE
Display error message
End IF
Step 4: IF OTP is valid THEN
Password is changed
ELSE
Display error message
End IF
Step 5: stop
Flow chart:
Start
Validation
Display error If
message input
False
61 is
valid?
True
False
Display error If OTP
message is valid?
True
Store to
Register table
database
Display Password is
changed
Stop
Structured chart:
APPROVE
62
VALIDATION DISPLAY
INPUT SUCCESSFUL
DETAILS MESSAGE
DISPLAY DATA IS
READ DEATAILS ERROR APPROVED
TO BE APPROVED MESSAGE
Algorithm:
Step 1: start
Step 2: read staff details
Step 3: check the validation of the input
Step 4: IF valid THEN
Approve the staff details
and display “success” message
ELSE
Display error message
Step 5: stop
Flow chart:
Start
False
If Display error message
valid?
True
63
Stop
5.3.2.1.1.2 View
5.3.2.1.1.2.1 Input
User name, password
VIEW
64
Algorithm:
Step 1: start
Step 2: select staff details
Step 3: Click view button
Step 4: View details of staff on the registration table
Step 5: Stop
Flow chart:
Start
Stop
5.3.2.1.1.3 Delete
5.3.2.1.1.3.1 Input
Staff ID
5.3.2.1.1.3.2 Procedural details
Structured chart:
65
DELETE
If you want to
delete
Yes No
Flow chart:
Start
66
No
Is
confirm?
Yes
Display Successful
message
Stop
5.3.2.1.2 Admission
5.3.2.1.2.1 Update
5.3.2.1.2.1.1 Input
Staff name, Staff ID, DOB, DOJ, phone.
5.3.2.1.2.1.2 Procedural details
Structured chart:
STAFF MANAGEMENT
UPDATE STORE TO
INPUT STAFF DETAILS OF DATABASE
DETAILS STAFF
67
Flow chart:
Start
False
If
Display error message
valid?
True
Stop
5.3.2.1.2.2 View
5.3.2.1.2.3.1 Input
User name, password, confirm password, email-id, phone
number, status
5.3.2.1.2.3.2 Procedural details
68
Structured chart:
VIEW
Algorithm:
Step 1: start
Step 2: select staff details
Step 3: Click view button
Step 4: View details of staff on the registration table
Step 5: Stop
Flow chart:
Start
Stop
69
5.3.2.1.2.3.3 File I/O interfaces
Registration table
5.3.2.1.2.3.4 Outputs
Views only client details in entry box
5.3.2.1.2.3.5 Implementation aspects
Button.
5.3.2.1.2.3 Delete
5.3.2.1.2.2.1 Input
Staff id.
5.3.2.1.2.2.2 Procedural details
Structured chart:
STAFF MANAGEMENT
Flow chart:
Start
False
If
Display error message
valid?
True
SALARY PAYMENT
CALCULATE STORE TO
INPUT STAFF AMOUNT OF DATABASE
DETAILS SALARY BASED
ON ATTENDANCE
Flow chart:
71
Start
Stop
5.3.2.1.3.2 Save
5.3.2.1.3.2.1 Input
Button clicks
5.3.2.1.3.2.2 Procedural details
Structured chart:
SALARY PAYMENT
72
Flow chart:
Start
Stop
ATTENDANCE
VALIDATION SHOW
INPUT STAFF SUCCESSFUL
DETAILS MESSAGE
Store to Error
73 message
database
Staff id Time Date Attend
Flow chart:
Start
Add attendance
Attendance table details
Stop
5.3.2.2 Report
5.3.2.2.1 Staff salary report
5.3.2.2.1.1 Input
Staff id
5.3.2.2.1.2 Procedural details
74
Structured chart:
Flow chart:
Start
Input staff ID
Stop
75
ACHIEVEMENT
DISPLAY
VALIDATION DETAILS
INPUT DETAILS
Flow chart:
Start
Validation Achievement
table
76
If
Display error input
message False valid?
True
Stop
77
Flow chart:
Start
Input staff ID
Stop
REGISTRATION
VALIDATION
INPUT
DETAILS
78 ERROR
DISPLAY LOAD
READ MESSAGE RESPECTIVE
USER_ID PAGE
Algorithm:
Step 1: start
Step 2: input username, password, confirm password, email.
Step 3: IF input
Load respective page
ELSE
Display error message
END IF
Step 4: stop
Flow chart:
Start
Validation
Store to
Display successful message
Stop
5.3.3.2 Admission
5.3.3.2.1 Input
Button clicks
5.3.3.2.2 Procedural details
Structured chart:
ADMISSION
Display Update
Read details Error data to
messages Database
80
Flow chart:
Start
Validation
Display error If
message valid?
False
True
Stop
81
Structured chart:
ACHIEVEMENT
Flow chart:
Start
Stop
5.3.3.3.2 Update
5.3.3.3.2.1 Input
Staff achievement
5.3.3.3.2.2 Procedural details
Structured chart:
ACHIEVEMENT
82
INPUT DETAILS TO SUCCESSFUL
ACHIEVEMENT DATABASE MESSAGE
DETAILS
Flow chart:
Start
Input Achievement
details
Update achievement
Achievement table details
Stop
83
ATTENDANCE
VALIDATION SHOW
INPUT STAFF SUCCESSFUL
DETAILS MESSAGE
Store to Error
database message
Staff id Time Date Attend
Flow chart:
Start
True
84
Show successful message
Stop
Flow chart:
Start
Input staff ID
85
Stop
5.3.3.5.3 File I/O interfaces
Staff salary table
5.3.3.5.4 Outputs
If the staff id is valid Staff can view salary report generated
else display error message.
5.3.3.5.5 Implementation aspects
Button.
86
import os
import signup_page
from PIL import Image,ImageTk
import PIL.Image
import smtplib
import stmf
import admin
import random
import staffme
import attend
import login_page
import addis
import datetime
from time import strftime
from tkinter import filedialog
class login_page:
def __init__(self, root):
self.window = root
self.window.title("Login page")
# Set the window size
# Here 0,0 represents the starting point of the window
self.window.geometry("1550x800+0+0")
self.window.config(bg = "white")
self.frame5=Frame(self.window)
self.name=""
self.frame5.place(x=0,y=0,width=1550,height=1000)
imk=PIL.Image.open("bck1.jpg")
re1=imk.resize((2000,1000))
self.poi=ImageTk.PhotoImage(re1)
label=Label(self.frame5,image=self.poi)
label.place(x=0,y=0,width=2000,height=1000)
self.frame3 = Frame(self.frame5, bg="#a8acb3")
87
self.frame3.place(x=140,y=150,width=400,height=450)
self.email_label = Label(self.frame3,text="Email Address",
font=("helvetica",20,"bold"),bg="#a8acb3", fg="black").place(x=50,y=40)
self.email_entry = Entry(self.frame3,font=("times new
roman",15,"bold"),bg="white",fg="gray")
self.email_entry.place(x=50, y=80, width=300)
self.password_label = Label(self.frame3,text="Password",
font=("helvetica",20,"bold"),bg="#a8acb3", fg="black").place(x=50,y=120)
self.password_entry = Entry(self.frame3,font=("times new
roman",15,"bold"),bg="white",fg="gray",show="*")
self.password_entry.place(x=50, y=160, width=300)
self.login_button = Button(self.frame3,text="Log
In",command=self.login_func,font=("times new roman",15,
"bold"),bd=0,cursor="hand2",bg="blue",fg="white").place(x=50,y=200,width=300)
self.forgotten_pass = Button(self.frame3,text="Forgotten
password?",command=self.forgot_func,font=("times new roman",10,
"bold"),bd=0,cursor="hand2",bg="white",fg="blue").place(x=125,y=260,width=150)
self.create_button = Button(self.frame3,text="Create New
Account",command=self.redirect_window,font=("times new roman",18,
"bold"),bd=0,cursor="hand2",bg="green2",fg="white").place(x=80,y=320,width=250)
radiobutton_1 = Radiobutton(self.frame3, text='Admin', font=("times new
roman",18),value=1,bg="#a8acb3",command=self.adml)
radiobutton_1.place(x=50,y=400,width=100,height=40)
radiobutton_2 = Radiobutton(self.frame3, text='Staff', font=("times new
roman",18),value=0,bg="#a8acb3",command=self.stfl)
radiobutton_2.place(x=250,y=400,width=100,height=40)
def lo(self):
self.frame5=Frame(self.window)
self.frame5.place(x=0,y=0,width=1550,height=1000)
imk=PIL.Image.open("bck1.jpg")
re1=imk.resize((2000,1000))
self.poi=ImageTk.PhotoImage(re1)
label=Label(self.frame5,image=self.poi)
label.place(x=0,y=0,width=2000,height=1000
self.frame3 = Frame(self.frame5, bg="#a8acb3")
self.frame3.place(x=140,y=150,width=400,height=450)
88
self.email_label = Label(self.frame3,text="Email Address",
font=("helvetica",20,"bold"),bg="#a8acb3", fg="black").place(x=50,y=40)
self.email_entry = Entry(self.frame3,font=("times new
roman",15,"bold"),bg="white",fg="gray")
self.email_entry.place(x=50, y=80, width=300)
self.password_label = Label(self.frame3,text="Password",
font=("helvetica",20,"bold"),bg="#a8acb3", fg="black").place(x=50,y=120)
self.password_entry = Entry(self.frame3,font=("times new
roman",15,"bold"),bg="white",fg="gray",show="*")
self.password_entry.place(x=50, y=160, width=300)
self.login_button = Button(self.frame3,text="Log
In",command=self.login_func,font=("times new roman",15,
"bold"),bd=0,cursor="hand2",bg="blue",fg="white").place(x=50,y=200,width=300)
self.forgotten_pass = Button(self.frame3,text="Forgotten
password?",command=self.forgot_func,font=("times new roman",10,
"bold"),bd=0,cursor="hand2",bg="white",fg="blue").place(x=125,y=260,width=150)
self.create_button = Button(self.frame3,text="Create New
Account",command=self.redirect_window,font=("times new roman",18,
"bold"),bd=0,cursor="hand2",bg="green2",fg="white").place(x=80,y=320,width=250)
radiobutton_1 = Radiobutton(self.frame3, text='Admin', font=("times new
roman",18),value=1,bg="#a8acb3",command=self.adml)
radiobutton_1.place(x=50,y=400,width=100,height=40)
radiobutton_2 = Radiobutton(self.frame3, text='Staff', font=("times new
roman",18),value=0,bg="#a8acb3",command=self.stfl)
radiobutton_2.place(x=250,y=400,width=100,height=40)
def stfl(self):
self.frame3 = Frame(self.frame5, bg="#a8acb3")
self.frame3.place(x=140,y=150,width=400,height=450)
self.email_label = Label(self.frame3,text="Email Address",
font=("helvetica",20,"bold"),bg="#a8acb3", fg="black").place(x=50,y=40)
self.email_entry = Entry(self.frame3,font=("times new
roman",15,"bold"),bg="white",fg="gray")
self.email_entry.place(x=50, y=80, width=300)
self.password_label = Label(self.frame3,text="Password",
font=("helvetica",20,"bold"),bg="#a8acb3", fg="black").place(x=50,y=120)
self.password_entry = Entry(self.frame3,font=("times new
roman",15,"bold"),bg="white",fg="gray",show="*")
self.password_entry.place(x=50, y=160, width=300)
89
self.login_button = Button(self.frame3,text="Log
In",command=self.login_func,font=("times new roman",15,
"bold"),bd=0,cursor="hand2",bg="blue",fg="white").place(x=50,y=200,width=300)
self.forgotten_pass = Button(self.frame3,text="Forgotten
password?",command=self.forgot_func,font=("times new roman",10,
"bold"),bd=0,cursor="hand2",bg="white",fg="blue").place(x=125,y=260,width=150)
self.create_button = Button(self.frame3,text="Create New
Account",command=self.redirect_window,font=("times new roman",18,
"bold"),bd=0,cursor="hand2",bg="green2",fg="white").place(x=80,y=320,width=250)
radiobutton_1 = Radiobutton(self.frame3, text='Admin', font=("times new
roman",18),value=1,bg="#a8acb3",command=self.adml)
radiobutton_1.place(x=50,y=400,width=100,height=40)
radiobutton_2 = Radiobutton(self.frame3, text='Staff', font=("times new
roman",18),value=0,bg="#a8acb3",command=self.stfl)
radiobutton_2.place(x=250,y=400,width=100,height=40)
def adml(self):
self.frame3 = Frame(self.frame5, bg="#a8acb3")
self.frame3.place(x=140,y=150,width=400,height=450)
self.email_label = Label(self.frame3,text="Email Address",
font=("helvetica",20,"bold"),bg="#a8acb3", fg="black").place(x=50,y=40)
self.email_entry = Entry(self.frame3,font=("times new
roman",15,"bold"),bg="white",fg="gray")
self.email_entry.place(x=50, y=80, width=300)
self.password_label = Label(self.frame3,text="Password",
font=("helvetica",20,"bold"),bg="#a8acb3", fg="black").place(x=50,y=120)
self.password_entry = Entry(self.frame3,font=("times new
roman",15,"bold"),bg="white",fg="gray",show="*")
self.password_entry.place(x=50, y=160, width=300)
self.login_button = Button(self.frame3,text="Log
In",command=self.ano,font=("times new roman",15,
"bold"),bd=0,cursor="hand2",bg="blue",fg="white").place(x=50,y=200,width=300)
self.forgotten_pass = Button(self.frame3,text="Forgotten
password?",command=self.forgot_func,font=("times new roman",10,
"bold"),bd=0,cursor="hand2",bg="white",fg="blue").place(x=125,y=260,width=150)
radiobutton_1 = Radiobutton(self.frame3, text='Admin', font=("times new
roman",18),value=1,bg="#a8acb3",command=self.adml)
radiobutton_1.place(x=50,y=400,width=100,height=40)
radiobutton_2 = Radiobutton(self.frame3, text='Staff', font=("times new
roman",18),value=0,bg="#a8acb3",command=self.stfl)
90
radiobutton_2.place(x=250,y=400,width=100,height=40)
def login_func(self):
if self.email_entry.get()=="" or self.password_entry.get()=="":
messagebox.showerror("Error!","All fields are required",parent=self.window)
else:
try:
connection=pymysql.connect(host="localhost", user="root", password="",
database="log")
cur = connection.cursor()
self.name=self.email_entry.get()
cur.execute("select * from reg where email=%s and passw=%s",
(self.email_entry.get(),self.password_entry.get()))
row=cur.fetchone()
if row == None:
messagebox.showerror("Error!","Invalid USERNAME &
PASSWORD",parent=self.window)
else:
messagebox.showinfo("Success","Wellcome to bck",parent=self.window)
# Clear all the entries
self.reset_fields()
# self.window.destroy()
self.menustaf()
connection.commit()
connection.close()
except Exception as e:
messagebox.showerror("Error!",f"Error due to
{str(e)}",parent=self.window)
def ano(self):
if self.email_entry.get()=="" or self.password_entry.get()=="":
messagebox.showerror("Error!","All fields are required",parent=self.window)
else:
try:
91
connection=pymysql.connect(host="localhost", user="root", password="",
database="log")
cur = connection.cursor()
cur.execute("select * from amb where us=%s and pssw=%s",
(self.email_entry.get(),self.password_entry.get()))
row=cur.fetchone()
if row == None:
messagebox.showerror("Error!","Invalid USERNAME &
PASSWORD",parent=self.window)
else:
messagebox.showinfo("Success","Wellcome
Admin",parent=self.window)
self.window.destroy()
root = Tk()
obj = admin.sta(root)
root.mainloop()
except Exception as e:
messagebox.showerror("Error!",f"Error due to
{str(e)}",parent=self.window)
def forgot_func(self):
if self.email_entry.get()=="":
messagebox.showerror("Error!", "Please enter your valid register Email
Id",parent=self.window)
else:
try:
connection = pymysql.connect(host="localhost", user="root", password="",
database="log")
cur = connection.cursor()
cur.execute("select * from reg where email=%s", self.email_entry.get())
row=cur.fetchone()
if row == None:
messagebox.showerror("Error!", " Register Email Id doesn't exists")
else:
self.frame = Frame(self.window, bg="#488583")
92
self.frame.place(x=140,y=150,width=400,height=450)
self.usnmao = Label(self.frame,text="User name",
font=("helvetica",15,"bold"),bg="#488583", fg="black").place(x=50,y=40)
self.usnma= Entry(self.frame,font=("times new
roman",15,"bold"),bg="white",fg="gray")
self.usnma.place(x=50, y=80, width=300)
self.nempasol = Label(self.frame,text=" New Password",
font=("helvetica",15,"bold"),bg="#488583", fg="black").place(x=50,y=120)
self.newpass = Entry(self.frame,font=("times new
roman",15,"bold"),bg="white",fg="gray",show="*")
self.newpass.place(x=50, y=160, width=300)
self.confrompass = Label(self.frame,text=" Confrom Password",
font=("helvetica",15,"bold"),bg="#488583", fg="black").place(x=50,y=190)
self.confpwss = Entry(self.frame,font=("times new
roman",15,"bold"),bg="white",fg="gray",show="*")
self.confpwss.place(x=50, y=240, width=300)
self.OTPl = Label(self.frame,text=" OTP ",
font=("helvetica",15,"bold"),bg="#488583", fg="black").place(x=50,y=290)
self.oplm = Entry(self.frame,font=("times new
roman",15,"bold"),bg="white",fg="gray",show="*")
self.oplm.place(x=50, y=320, width=300)
self.create_button = Button(self.frame,text="Send OTP",font=("times
new roman",18,
"bold"),bd=0,cursor="hand2",bg="green2",fg="white",command=self.very).place(x=9
5,y=350,width=200)
self.create_button = Button(self.frame,text="Verfy &
send",command=self.change_pass,font=("times new roman",18,
"bold"),bd=0,cursor="hand2",bg="green2",fg="white").place(x=10,y=400,width=200)
#self.create_button = Button(self.frame,text="Submit",font=("times new
roman",18,
"bold"),bd=0,cursor="hand2",bg="green2",fg="white").place(x=120,y=400,width=10
0)
self.create_button =
Button(self.frame,text="Back",command=self.lo,font=("times new roman",18,
"bold"),bd=0,cursor="hand2",bg="green2",fg="white").place(x=250,y=400,width=10
0)
except Exception as e:
messagebox.showerror("Error", f"{e}")
def very(self):
try:
93
s = smtplib.SMTP("smtp.gmail.com" , 587) # 587 is a port number
s.starttls()
s.login("namegmail.com" , "sdfghjklwqertyui")
self.otp = random.randint(1000, 9999)
self.otp = str(self.otp)
s.sendmail("[email protected]" , self.email_entry.get() , self.otp)
messagebox.showinfo("Send OTP via Email", f"OTP sent to
{self.email_entry.get()}")
s.quit()
except:
messagebox.showinfo("Send OTP via Email", "Please enter the valid email
address OR check an internet connection")
def change_pass(self):
if self.usnma.get() == "":
messagebox.showerror("Error!", "Please enter registred user name")
elif self.newpass.get() == "" or self.confpwss.get() == "" :
messagebox.showerror("error","please enter password and confirm password")
elif self.newpass.get() != self.confpwss.get():
messagebox.showerror("error","password and confirm password is not same")
elif self.oplm.get()=="" :
messagebox.showerror("error","otp is not entered")
else:
try:
connection = pymysql.connect(host="localhost", user="root", password="",
database="log")
cur = connection.cursor()
cur.execute("select * from reg where email=%s and usnam=%s",
(self.email_entry.get(),self.usnma.get()))
row=cur.fetchone()
if row == None:
print("p")
messagebox.showerror("Error!", "Entered user name not matched")
else:
try:
94
print("u")
cur.execute("update reg set passw=%s where email=%s",
(self.newpass.get(),self.name))
connection.commit()
messagebox.showinfo("Successful", "Password has changed
successfully")
connection.close()
self.lo
except Exception as er:
messagebox.showerror("Error!", f"{er}")
except Exception as er:
messagebox.showerror("Error!", f"{er}")
def redirect_window(self):
self.window.destroy()
# Importing the signup window.
# The page must be in the same directory
root = Tk()
obj = signup_page.SignUp(root)
root.mainloop()
def reset_fields(self):
self.email_entry.delete(0,END)
self.password_entry.delete(0,END)
def menustaf(self):
self.fr=Frame(self.window,bg="white")
self.fr.place(x=0,y=0,width=1550,height=1000)
imk2=PIL.Image.open("bck8.jpg")
re3=imk2.resize((230,140))
self.poi3=ImageTk.PhotoImage(re3)
label=Label(self.fr,image=self.poi3)
label.place(x=0,y=0,width=230,height=140)
95
imk89=PIL.Image.open("bck55.jpg")
re89=imk89.resize((1500,850))
self.poi89=ImageTk.PhotoImage(re89)
label=Label(self.fr,image=self.poi89)
label.place(x=0,y=0,width=1500,height=850)
#imk3=PIL.Image.open("bck7.jpg")
#re4=imk3.resize((2000,800))
#self.poi4=ImageTk.PhotoImage(re4)
#label=Label(self.window,image=self.poi4)
#label.place(x=100,y=100,width=2000,height=500)
self.log = Button(self.fr, text="logout",font=("times new roman",18,
"bold"),bd=0,cursor="hand2",bg="#FFEBE7",command=self.lo).place(
x=1300, y=10, width=230)
title1 = Label(self.window, text="Menu", font=(
"times new roman", 25, "bold"), bg="#A5C6DB").place(x=0,
y=150,width=230)
nm=self.email_entry.get()
connection=pymysql.connect(host="localhost", user="root", password="",
database="log")
cur = connection.cursor()
cur.execute("select email from admis where email=%s",self.name)
row=cur.fetchone()
if row==None:
cur.execute("select status,email from reg where email=%s",self.name)
row=cur.fetchall()
for i in row:
el=StringVar(value=i[0])
self.aopl = Entry(self.fr, font=("arial"),text=el,state='readonly')
self.aopl.place(x=0, y=150, width=200)
if self.aopl.get()=="aprove":
self.attn = Button(self.fr, text="Admission",font=("times new roman",18,
"bold"),bd=0,cursor="hand2" ,command=self.am).place(
x=0, y=350, width=230)
else:
96
messagebox.showerror("error","You not have
approved",parent=self.window)
self.attn = Button(self.fr, text="Admission",font=("times new roman",18,
"bold"),bd=0,cursor="hand2",state = DISABLED ,command=self.am).place(
x=0, y=350, width=230)
else:
self.atm = Button(self.fr, text="Attendance",font=("times new roman",18,
"bold"),bd=0,cursor="hand2",command=self.amt).place( x=0, y=200, width=230)
self.acm = Button(self.fr, text="Achievement", font=("times new roman",18,
"bold"),bd=0,cursor="hand2",command=self.ach).place(
x=0, y=250, width=230)
self.sal = Button(self.fr, text="Salary Report",font=("times new roman",18,
"bold"),bd=0,cursor="hand2" ,command=self.lok).place(
x=0, y=300, width=230)
# self.senmel=Button(self.fr,text="Request",font=("times new
roman",18,"bold"),bd=0,cursor="hand2",command=self.lmtpo).place(x=0,y=350,widt
h=230)
connection.commit()
connection.close()
def am(self):
self.window.destroy()
root = Tk()
obj = addis.addmis(root)
root.mainloop()
def amt(self):
self.frame = Frame(self.window, bg="#6C7BE6")
self.frame.place(x=8, y=8, width=1000, height=1000)
self.date = StringVar()
imk90=PIL.Image.open("bck56.jpg")
re90=imk90.resize((1000,800))
self.poi90=ImageTk.PhotoImage(re90)
label=Label(self.frame,image=self.poi90)
label.place(x=0,y=0,width=1000,height=800)
97
title1 = Label(self.frame, text="Attendance", font=(
"times new roman", 25, "bold"), bg="#f2fafb").place(x=20, y=10)
usn = Label(self.frame, text="Staff Id", font=(
"helvetica", 15, "bold"), bg="#f2fafb").place(x=30, y=100)
padt = Label(self.frame, text="Date",font=(
"helvetica", 15, "bold"), bg="#f2fafb").place(x=30, y=260)
d1 = datetime.datetime.now()
self.date.set(d1.strftime("%d-%m-%y"))
self.padte = Entry(self.frame, font=("arial"),
state='readonly',textvariable=self.date)
self.padte.place(x=30, y=300, width=200)
self.time1 = ''
self.time2 = strftime('%H:%M:%S %p')
connection = pymysql.connect(host="localhost", user="root", password="",
database="log")
cur = connection.cursor()
cur.execute("select stid,email from admis where email=%s",self.name)
row=cur.fetchall()
for i in row:
el=StringVar(value=i[0])
self.stlid = Entry(self.frame, font=("arial"),text=el,state='readonly')
self.stlid.place(x=30, y=130, width=200)
# adding time to Entry
l1 = Label(self.frame, text="Add Time", font=(
"helvetica", 15, "bold"),
bg="#f2fafb",textvariable=self.changeLabel).place(x=30, y=180)
self.watch = Label(self.frame, text=self.time2,
font=("arial"))
self.watch.place(x=30, y=210, width=200)
self.changeLabel()
self.atml = IntVar()
atml=
Checkbutton(self.frame,text="Attend",variable=self.atml,onvalue=1,offvalue=0,bg="#
f2fafb",font=("times new roman",13)).place(x=30, y=350)
98
self.create_button = Button(self.frame, text="submit", font=(
"times new roman", 18, "bold"), bd=0, cursor="hand2", bg="green2",
fg="black",command=self.sen).place(x=30, y=400, width=250)
self.create_button = Button(self.frame, text="Back", font=(
"times new roman", 18, "bold"), bd=0, cursor="hand2", bg="green2",
command=self.menustaf,fg="black").place(x=30, y=450, width=250)
def sen(self):
if self.atml.get() == 0:
messagebox.showerror("Error!","tick the attend part",parent=self.window)
else:
try:
connection = pymysql.connect(host="localhost", user="root", password="",
database="log")
cur = connection.cursor()
p=datetime.datetime.now()
x = p.strftime(' %H:%M:%S')
cur.execute("select * from attend where stid=%s and pdate=%s",
(self.stlid.get(),self.padte.get()))
row=cur.fetchone()
# Check if th entered email id is already exists or not.
if row!=None:
messagebox.showerror("Error!","Registration ID allready
exsits",parent=self.window)
else:
cur.execute("insert into attend (stid,pdate,ptime,present) values(%s,%s,%s,
%s)",
(
self.stlid.get(),
self.padte.get(),
x,
self.atml.get()
))
connection.commit()
connection.close()
99
messagebox.showinfo("attend","Attendance is
Successful",parent=self.window)
except Exception as e:
messagebox.showerror("Error!",f"Error due to
{str(e)}",parent=self.window)
def changeLabel(self):
self.time2 = strftime('%H:%M:%S %p')
self.watch.configure(text=self.time2)
# it'll call itself continuously
self.frame.after(200, self.changeLabel)
def bac(self):
self.window.destroy()
root = Tk()
obj = stmf.sta(root)
root.mainloop()
def ach(self):
self.frame10 = Frame(self.window, bg="#6C7BE6")
self.frame10.place(x=8, y=8, width=1500, height=850)
self.texscrol = Scrollbar(self.window)
self.domte = Text(self.frame10, bg="white",
yscrollcommand=self.texscrol.set, font=("arial"))
self.domte.place(x=510, y=0, width=1010, height=650)
self.texscrol.config(command=self.domte.yview)
self.texscrol.pack(side=RIGHT, fill=Y)
title1 = Label(self.frame10, text="Achievement", font=(
"times new roman", 25, "bold"), bg="#6C7BE6").place(x=20, y=10)
self.upload = Button(self.frame10, text="Back", font=("times new
roman",18),command=self.menustaf).place(x=1000,y=700,width=100)
self.add=Button(self.frame10, text="Add", font=("times new
roman",18),command=self.add_data).place(x=900,y=700,width=100)
# self.add=Button(self.frame10, text="upload", font=("times new
roman",18),command=self.upload_file).place(x=270,y=30)
100
self.add=Button(self.frame10, text="Update", font=("times new
roman",18),command=self.upd).place(x=700,y=700,width=100)
b2 =Button(self.frame10,text="Upload",font=("times new
roman",18),command=self.upload_file) # using Button
b2.place(x=10,y=300,width=300,height=250)
bm=Label(self.frame10,text="If you dont have any certificate then your photo
must be added")
bm.place(x=0,y=250)
self.usn = Label(self.frame10, text="Staff Id", font=("helvetica", 15, "bold"),
bg="#6C7BE6").place(x=30, y=100)
connection = pymysql.connect(host="localhost", user="root", password="",
database="log")
cur = connection.cursor()
cur.execute("select stid,email from admis where email=%s",self.name)
row=cur.fetchall()
for i in row:
el=StringVar(value=i[0])
self.stalib = Entry(self.frame10, font=("arial"),text=el,state='readonly')
self.stalib.place(x=30,y=150,width=200)
cur.execute("select image from achev ")
ro=cur.fetchall()
connection = pymysql.connect(host="localhost", user="root", password="",
database="log")
conn = connection.cursor()
em=conn.execute("select text from achev where stid=%s ",self.stalib.get())
r1=conn.fetchall()
print("hh",r1[0])
em1=conn.execute("select image from achev where stid=%s ",self.stalib.get())
r2=conn.fetchall()
self.domte.insert(1.0,r1)
self.v={}
for i in r2:
#self.imag=i[0]
#print(self.imag)
self.imk2=PIL.Image.open(i[0])
101
self.re3=self.imk2.resize((300,250))
self.v[i]=ImageTk.PhotoImage(self.re3)
#lb1=Button(self.frame12,image=self.v[i],command=self.uploa_file)
#lb1.place(x=200,y=0,width=150,height=180)
b2 =Button(self.frame10,image=self.v[i],command=self.uploa_file) # using
Button
b2.place(x=10,y=300,width=300,height=250)
# e4=StringVar(value=i[2])
conn.close()
# assume mydb is the connection object of MySQL database
connection.commit() # make sure to commit the change
def upload_file(self): # Image upload and display
global filename,img
f_types =[('Png files','*.png'),('Jpg Files', '*.jpg')]
filename = filedialog.askopenfilename(filetypes=f_types)
self.imk=PIL.Image.open(filename)
self.re2=self.imk.resize((300,250))
img = ImageTk.PhotoImage(self.re2)
b2 =Button(self.frame10,image=img) # using Button
b2.place(x=10,y=300,width=300,height=250)#display uploaded photo
def uploa_file(self): # Image upload and display
global filename,img
f_types =[('Png files','*.png'),('Jpg Files', '*.jpg')]
filename = filedialog.askopenfilename(filetypes=f_types)
self.img = ImageTk.PhotoImage(file=filename)
b2 =Button(self.frame10,image=self.img) # using Button
b2.place(x=10,y=300,width=300,height=250)
def upd(self):
global filename
f=filename
print(f)
if filename=="" or self.domte.get(1.0, "end-1c")=="" :
102
messagebox.showerror("error","photo and text is not added")
else:
connection = pymysql.connect(host="localhost", user="root", password="",
database="log")
cur = connection.cursor()
cur.execute("update achev set image=%s,text=%s Where stid=%s",
(filename,self.domte.get(1.0, "end-1c"),self.stalib.get()))
connection.commit()
connection.close()
messagebox.showinfo("sucess","your file is updated")
def add_data(self): # Add data to MySQL table
global filename
f=filename
print(f)
if filename=="":
messagebox.showerror("error","photo is not added")
else:
connection = pymysql.connect(host="localhost", user="root", password="",
database="log")
cur = connection.cursor()
cur.execute("insert into achev (stid,text,image) values(%s,%s,%s)",
( self.stalib.get(),
self.domte.get(1.0, "end-1c"),
filename ))
connection.commit()
connection.close()
messagebox.showinfo("wow","your achievement photo and text is added")
def op_data(self): # Add data to MySQL table
global filename
connection = pymysql.connect(host="localhost", user="root", password="",
database="log")
cur = connection.cursor()
103
( self.stalib.get(),
self.domte.get(1.0, "end-1c"),
filename ))
connection.commit()
connection.close()
messagebox.showinfo("wow","your achievement photo and text is added")
def lok(self):
self.frame90 = Frame(self.window, bg="#6C7BE6")
self.frame90.place(x=8, y=8, width=500, height=1000)
imk1=Image.open("money.jpg")
re2=imk1.resize((500,800))
self.poi1=ImageTk.PhotoImage(re2)
label=Label(self.frame90,image=self.poi1)
label.place(x=0,y=0,width=500,height=800)
but=Button(self.frame90,text="Back",command=self.menustaf) # using Button
but.place(x=0,y=0,width=250,height=60)
self.frame100 = Frame(self.window, bg="#6C7BE6")
self.frame100.place(x=500, y=8, width=1010, height=830)
connection = pymysql.connect(host="localhost", user="root", password="",
database="log")
cur = connection.cursor()
cur.execute("select stid,email from admis where email=%s",self.name)
row=cur.fetchall()
for i in row:
el=StringVar(value=i[0])
self.roll = Entry(self.frame100, font=("arial"),text=el,state='readonly')
self.roll.place(x=30,y=150,width=200)
self.trv = ttk.Treeview(self.frame100, selectmode ='browse')
self.trv.place(x=0,y=0,width=1000,height=800)
# number of columns
self.trv["columns"] = ("1", "2", "3","4","5")
# Defining heading
104
self.trv['show'] = 'headings'
# width of columns and alignment
self.trv.column("1", width = 30, anchor ='c')
self.trv.column("2", width = 80, anchor ='c')
self.trv.column("3", width = 80, anchor ='c')
self.trv.column("4", width = 80, anchor ='c')
self.trv.column("5", width = 80, anchor ='c')
# Headings
# respective columns
self.trv.heading("1", text ="Staff ID")
self.trv.heading("2", text ="Time")
self.trv.heading("3", text ="Date")
self.trv.heading("4", text ="Amount")
self.trv.heading("5", text ="Status")
# getting data from MySQL student table
connection = pymysql.connect(host="localhost", user="root", password="",
database="log")
conn = connection.cursor()
conn.execute("select * from salry where stid=%s ",self.roll.get())
for dt in conn:
self.trv.insert("", 'end',iid=dt[2],
values =(dt[0],dt[1],dt[2],dt[3],dt[4]))
hsb=ttk.Scrollbar(self.frame100,orient="vertical")
hsb.configure(command=self.trv.yview)
self.trv.configure(xscrollcommand=hsb.set)
hsb.pack(fill=Y,side=RIGHT)
def lmtpo(self):
self.frame93 = Frame(self.window, bg="#6C7BE6")
self.frame93.place(x=8, y=8, width=500, height=1000)
imk90=PIL.Image.open("bck102.jpg")
re90=imk90.resize((500,1000))
self.poi90=ImageTk.PhotoImage(re90)
label=Label(self.frame93,image=self.poi90)
105
label.place(x=0,y=0,width=500,height=1000)
connection = pymysql.connect(host="localhost", user="root", password="",
database="log")
cur = connection.cursor()
cur.execute("select stid,email from admis where email=%s",self.name)
row=cur.fetchall()
for i in row:
el=StringVar(value=i[0])
self.soplm = Entry(self.frame93, font=("arial"),text=el,state='readonly')
self.soplm.place(x=150,y=150,width=200)
e2=StringVar(value=i[1])
self.emtyui=Entry(self.frame93,
font=("arial"),text=e2,state='readonly').place(x=150,y=200)
connection.commit()
connection.close()
oplut=Label(self.frame93, text="Staff number",font=(
"helvetica", 15, "bold"), bg="#6C7BE6").place(x=0,y=150)
oplut=Label(self.frame93, text="From",font=(
"helvetica", 15, "bold"), bg="#6C7BE6").place(x=0,y=200)
oplut=Label(self.frame93, text="To",font=(
"helvetica", 15, "bold"), bg="#6C7BE6").place(x=0,y=250)
self.eqwe=Label(self.frame93, text="[email protected]",font=(
"arial",15)).place(x=150,y=250)
oplut=Label(self.frame93, text="Message",font=(
"helvetica", 15, "bold"), bg="#6C7BE6").place(x=0,y=300)
self.otpll=Entry(self.frame93, font=("arial"))#Text(self.frame93, bg="green",
font=("arial"))
self.otpll.place(x=10, y=400, width=450, height=60)
self.sulp = Button(self.frame93, text="Upload", font=("times new
roman",18),command=self.tyui,width=10).place(x=10,y=500)
self.sulp = Button(self.frame93, text="Back", font=("times new
roman",18),command=self.menustaf,width=10).place(x=10,y=700)
# The main function
if __name__ == "__main__":
106
root = Tk()
obj = login_page(root)
root.mainloop()
7. USER INTERFACE
7.1 Login page of Staff :
107
7.3 Registration:
7.4 Admission:
108
7.5 Staff Home page
109
7.6 Staff attendance
110
7.8 Staff achievement(blank):
111
7.10 Admin Home page
112
7.13 Admin Staff payment:
113
7.14 Admin Staff Attendance:
114
7.16 Admin staff salary report:
115
7.18 Admin Staff Achievement report (after search):
8. TESTING
8.1 Introduction
Testing is the major quality control measures and during the software development it is
used to detect errors that could have occurred during any of the phase like requirement
analysis, design, coding. The goal of the testing is to uncover errors in the program.
116
After new testing the modules are gradually integrated into sub systems. It is performed to
detect design errors by focusing on testing the interconnection between modules.
System Testing
System is tested against the system requirement if all the requirements are met and if the
system performs as specified by the requirement.
Acceptance Testing
It is performed to demonstrate to the client on real life data of the client, the operation of the
system.
8.3 Test Case
It is the input that tests the genuineness of the program and successful execution of the test
case revels. that there are no errors in the program that are under testing. it is a set of
conditions or variables under which tester will determine whether an application or software
is working currently
Test case-ID 01
117
Valid output:
118
Test case-ID 02
Valid output:
119
Testcase-ID 03
Test data User name, Phone number, Email ,confirm password and
Password.
Invalid output:
Invalid output:
120
Test case-ID 04
Valid output:
Test case-ID 05
121
Steps Step:1Enter Name, Designation, Gender, Email_id and
select date of birth
2. If record not entry shows required to enter
3. Else display successful message.
Expected Output
Invalid output:
Invalid output:
Invalid output:
122
Valid output:
Test case-ID 06
123
5.Else error message as not ticked
6. If again try to click of same day
7.Display Error as already exist
124
Expected Output Invalid output:
Valid output:
Invalid output:
Test case-ID 07
125
Test Case Title Achievement
126
Invalid output:
127
Valid output(update ):
Test case-ID 08
128
Valid output:
Test case-ID 09
129
4.else if delete is yes
5.it will delete from database
6.else it will not delete returning to the main application
Expected Output
Invalid output:
Invalid output:
130
Testcase-ID 10
Expected Output
Invalid output:
Valid output:
Valid output:
Testcase-ID 11
Invalid output:
Valid output:
132
133