Download as pdf or txt
Download as pdf or txt
You are on page 1of 75

“ONLINE VOTING SYSTEM”

MAJOR PROJECT (BCA-606P)

SUBMITTED TO

CHAUDHARY CHARAN SINGH UNIVERSITY, MEERUT

FOR THE PARTIAL FULFILLMENT OF THE DEGREE OF


BACHELOR

IN COMPUTER APPLICATION
A.Y. 2022-23

Under the Guidance of Submitted by


Prof. Akanksha Verma Aarchi Aggarwal(R200919106001)
Assistant Professor Annanya Sinha (R200919106033)
School of IT Bhavya Srivastava (R200919106051)
IMS Noida

INSTITUTE OF MANAGEMENT STUDIES, NOIDA


PERFORMA FOR APPROVAL OF THE BCA MAJOR PROJECT (606-P)
PROPOSAL

Roll No.: R200919106001


Name of the Student: Aarchi Aggarwal
E-mail: aarchi.aggarwalbca2021168@imsnoida.com
Mob. No.: 6397272497
Title of the Project: Online Voting System
Name of the Project Guide: Prof. Akanksha Verma

For Office Use Only:

Signature of the Guide

Approved Not Approved Date :

Suggestions (if any):-


1
2
3
4
5
6
7
8
CERTIFICATE OF ORIGINALITY

I hereby declare that Major Project (BCA-606P) titled “ONLINE VOTING


SYSTEM” has been submitted to School of IT, IMS Noida, which is affiliated
with CHAUDHARY CHARAN SINGH UNIVERSITY, MEERUT (U.P.), for
the partial fulfillment of the degree of Bachelor of Computer Application, in A.Y.
2022-23. This has not previously formed the basis for the award of any other
degree, diploma or other title from any other University.

Place: IMS Noida Date:

Name of Student:Aarchi Aggarwal


University Roll Number:R200919106001

Signature
ACKNOWLEDGEMENT

I would like to express my profound gratitude to Prof. Monika Dixit Bajpai ,HoD
School of IT and IMS Noida for their contributions to the completion of my project
titled Online Voting System.
I would like to express my special thanks to my project guide Prof. Akanksha
Verma Ma’am for her time and efforts that he/she provided throughout the year.
Her useful advice and suggestions were really helpful to me during the project’s
completion. I am eternally grateful to my project guide.
I would like to acknowledge that this project was completed entirely by me and not
by someone else.

Signature
Aarchi Aggarwal(R200919106001)
INDEX
No. Description Page No.
1. Project Profile [1- 9]
1.1 Project Definition 01
1.2 Project Description 01
1.3 Existing System / Work Environment 02
1.4 Problem Statements 03
1.5 Need for New System 04
1.6 Proposed System & Features 05
1.7 Scope 06
1.8 Outcomes 07
1.9 Tools & Technology used 08
1.10 Project Plan 09
2. Requirement Analysis [10-18]
2.1 Feasibility Study 10-11
2.2 Users of the System 12
2.3 Modules 13
2.4 Process Model 14
2.5 Hardware & Software Requirements 15-16
2.6 Use Cases 17
2.7 Use Case Diagrams 18
3. Design [19 -24]
3.1 Use Case Scenarios 19
3.2 Diagrams 20 – 22
3.2.1 UML / DFD 20-21
3.2.2 Entity Relationship Diagram 22
3.3 Data Dictionary 23-24
4. Implementation [25- 63]
4.1 Form Layouts 25-26
4.2 Report Layouts 27
4.3 Coding Convention 28-29
4.4 Code 30-63
5. Testing [64 - 68]
5.1 Test Strategy 64-65
5.2 Test Cases 66-68
6. Future Enhancement 69
7. Bibliography 70
Project Profile 2022 - 2023

Chapter 1- Project Profile

1.1 Project Definition

An online voting system is a platform that enables individuals to cast their votes
electronically via the internet, rather than using traditional paper ballots. This type of
system typically requires users to have a secure login, after which they can select their
preferred candidates or choices and submit their vote electronically.

1.2 Project Description

An online voting system is a software-based platform designed to enable people to cast


their votes electronically via the internet. This can be done from any device with an
internet connection, such as a computer, tablet or smartphone.

To use an online voting system, voters typically need to first register and create an
account on the platform. This involves providing personal information, such as their
name, address, and identification details, to verify their eligibility to vote. Once their
account is created, they can log in to the system and access the ballot.

The ballot is designed to replicate the traditional paper-based ballot, allowing voters to
select their preferred candidates or choices.

Online voting systems are designed with security and privacy in mind. Measures such
as encryption, multi-factor authentication, and digital signatures are often used to
ensure the integrity and confidentiality of the voting process.

Online Voting System 1


Project Profile 2022 - 2023

1.3 Work Environment

The work environment of an online voting system can vary depending on the specific
system:

System Developers: These are the software engineers and developers who
design, build, and maintain the online voting system. They may work for a
government agency, a private company, or a third-party vendor contracted to
provide the system.

Security Experts: These professionals are responsible for ensuring the security
of the online voting system. They may conduct regular security audits,
implement security protocols and measures, and monitor the system for
potential threats or vulnerabilities.
Election Officials: These are the individuals responsible for overseeing the
voting process and ensuring that it is conducted in accordance with the law
and established protocols. They may manage the registration process, monitor
the voting process, and certify the results.

Online Voting System 2


Project Profile 2022 - 2023

1.4 Problem Statements:

An online voting system has the potential to solve several problems associated
with traditional paper-based voting systems. Some of these problems include:

Increased accessibility: Online voting systems can increase accessibility


and convenience for voters who may face barriers to physical polling
stations, such as individuals with mobility issues or those living in remote
locations. This can lead to increased voter turnout and participation.
Improved accuracy: Online voting systems can help reduce the likelihood
of human error, such as miscounting or misplacing ballots. They can also
offer features such as real-time vote counting and automatic error checking,
which can improve the accuracy and efficiency of the voting process.
Reduced costs: Online voting systems have the potential to reduce the costs
associated with traditional paper-based voting systems, such as printing and
transportation costs. This can free up resources for other important initiatives
and programs.
Enhanced security: While security concerns are a potential problem for
online voting systems, they also have the potential to enhance security in the
voting process.

Online Voting System 3


Project Profile 2022 - 2023

1.5 Need For System:

The need for a new online voting system arises from several factors, including:

Increasing demand for convenience and accessibility: As the world becomes


more digital, many people are looking for more convenient and accessible ways to
participate in the voting process. An online voting system can provide a
convenient and accessible option for voters who may face barriers to traditional
polling stations.
Rising costs of traditional paper-based voting systems: Traditional paper-based
voting systems can be costly due to the need for printing, transportation, and
storage of paper ballots. An online voting system can help reduce these costs and
free up resources for other important initiatives and programs.
Improving accuracy and efficiency: Online voting systems have the potential to
improve the accuracy and efficiency of the voting process by reducing the
likelihood of human error and providing real-time vote counting and error
checking.
Enhancing security: An online voting system can provide enhanced security
measures to prevent tampering and ensure the integrity of the voting process. This
can increase public trust in the voting process and reduce concerns around fraud
and manipulation.
Addressing accessibility and inclusivity issues: An online voting system can help
address accessibility and inclusivity issues, particularly for voters who may have
mobility issues, live in remote locations, or have other challenges that make it
difficult to participate in traditional paper-based voting systems.

Online Voting System 4


Project Profile 2022 - 2023

1.6 Proposed System and Features:

Secure authentication and access control: The system would include a secure
login and authentication process to ensure that only eligible voters are able to
access the system and vote.
Electronic ballot casting: The system would allow voters to cast their ballots
electronically, either through a web-based interface or a mobile application.
Real-time vote counting and tabulation: The system would provide real-time
vote counting and tabulation, allowing for timely and accurate results.
Encryption and digital signatures: The system would use encryption and digital
signatures to ensure the integrity of the voting process and prevent tampering.
Audit trails and logs: The system would maintain detailed audit trails and logs of
all voting activity to facilitate transparency and accountability.
Accessibility features: The system would include accessibility features, such as
text-to-speech and high-contrast options, to ensure that all voters, including those
with disabilities, are able to participate.
Compliance with regulatory requirements: The system would comply with all
regulatory requirements, such as those related to data protection, privacy, and
election laws.
User Support: The system would provide user support, such as help
documentation and technical assistance, to ensure that all voters are able to use
the system effectively.
Testing and validation: The system would undergo thorough testing and
validation to ensure its security, reliability, and accuracy.

Overall, a proposed online voting system would include features and components that
ensure security, accuracy, accessibility, compliance, and support for users, while also
providing real-time results and audit trails.

Online Voting System 5


Project Profile 2022 - 2023

1.7 Scope

The scope of an online voting system can be quite broad, as it can potentially impact
the entire voting process from registration to results. Here are some of the key areas
that can be covered by an online voting system:

Voter registration: An online voting system can provide a platform for voters to
register and update their voter information, including their name, address, and other
relevant details.

Candidate and issue information: An online voting system can provide voters with
access to information about candidates and issues, helping them make informed
decisions when casting their votes.

Ballot casting and tabulation: An online voting system can allow voters to cast their
ballots electronically, and can tabulate the votes in real-time, ensuring timely and
accurate results.

Accessibility: An online voting system can provide accessibility features, such as text-
to- speech and high-contrast options, to ensure that all eligible voters can participate in
the voting process.

Security: An online voting system can implement robust security measures to protect
the voting process from cyber-attacks and other forms of manipulation, including
encryption, authentication, and digital signatures.

User support: An online voting system can provide user support to ensure that all
eligible voters can use the system effectively, including help documentation and
technical assistance.

Testing and validation: An online voting system can undergo thorough testing and
validation to ensure its security, reliability, and accuracy, including testing for
scalability and load balancing.

Online Voting System 6


Project Profile 2022 - 2023

1.8 Outcomes

The outcomes of an online voting system can vary depending on the specific goals of
the system and the context in which it is implemented. Here are some potential
outcomes of an online voting system:

Increased voter turnout: An online voting system can make it easier and more
convenient for voters to cast their ballots, which may increase overall voter turnout.

Improve Accessibility: An online voting system can provide accessibility features,


such as text-to-speech and high-contrast options, to ensure that all eligible voters can
participate in the voting process.

Increased efficiency: An online voting system can streamline the voting process,
reducing the time and resources required for traditional paper-based voting methods.

Improved accuracy: An online voting system can reduce the risk of errors and
discrepancies in the voting process, as votes can be automatically tabulated and
verified.

Improved transparency: An online voting system can provide real-time updates


on the vote count, as well as an audit trail to track all voting activity, increasing
transparencyand accountability.

Cost savings: An online voting system can reduce the costs associated with traditional
paper-based voting methods, including printing, distribution, and storage of ballots.

Increased Security: An online voting system can implement robust security measures
to protect the voting process from cyber-attacks and other forms of manipulation,
increasing the security and integrity of the voting process.

Online Voting System 7


Project Profile 2022 - 2023

1.9 Tools & Technology used

Tools
 Visual Studio Code Editor (VS code) : [Version 1.76.1]
 MYSQL : [Version 8.0.32]
 XAMPP : [Version 8.0.25]

Technology

• CSS (Version - CSS4.15)


• JavaScript (Version - 13)
• HTML (Version – HTML5)
• PHP ( Version – 8.2 )

Online Voting System 8


Project Profile 2022 - 2023

1.10 Project Plan

31/03/23 – Submission of Project Profile


05/04/23 – Completion of Requirement Analysis
19/04/23 – Completion of Design Phase
04/05/23 – Completion of Project Development
17/05/23 – Completion of Testing Using Test Cases
30/05/23 – Deployment and Submission

Online Voting System 9


Requirement Analysis 2022 - 2023

Chapter 2 - Requirement Analysis

2.1 Feasibility Study


Feasibility study is the process of whether or not a project is worth doing. Feasibility
studies are undertaken within tight time constraints and normally culminate in a written
and oral feasibility report. I have taken a fixed time in feasibility study with my co-
developer. The contents and recommendations of this feasibility study helped us as a
sound basis for deciding how to precede the project. It helped in making decisions such
as which software to use, hardware combinations etc.
Technical Feasibility: This is concerned with specifying equipment of software and
hardware that will successfully satisfy the user requirements the technical needs of the
system may vary considerably, but might include:
• The facility to produce output in a given time.
• Response time under certain conditions Particular speed.
• Facility to communicate data to distant locations. The application is feasible to
everyone as it is a website application. The website options are so easy and simple that
users can understand what this website is about. The website as well requires an internet
connection.
Economic Feasibility: Economics feasibility analysis is the most commonly used
method for determining the efficiency of a new project. It is also known as cost analysis.
It helps in identifying profit Against investment expected from a project. Cost and time
are the most essential factors involved in this field of study. The website is economically
feasible to all the users and it does not have any other purchase that requires the internet
connection and the web browser to be present with the user. The website does not charge
any other price, nor does it require any other purchases for its proper working. This
makes it economically feasible to all the users. The website do not have any other
hardware or software requirements for It's a properly working mobile/computer and a
web browser. At development end the only cost it requires is of server, domain and
Hosting that has to be purchased for deploying the project.

Online Voting System 10


Requirement Analysis 2022 - 2023

Operational Feasibility: Operational feasibility is the measure of how well a proposed


system solves the problems, and takes advantage of the opportunities identified during
scope definition and how it satisfies the requirements identified in the requirements
analysis phase of system development. The operational feasibility assessment focuses on
the degree to which the proposed development project fits in with the existing business
environment and objectives with regard to development schedule delivery date corporate
culture and existing business processes. To ensure success, desired operational outcomes
must be imparted during design and development. These include such design-dependent
parameters as reliability, maintainability, supportability, usability predictability,
disposability, sustainability, affordability and others. 12 The website is completely
operational with just the requirement of good Internet connection and the computer or
web browser for it to run on several interface.

Online Voting System 11


Requirement Analysis 2022 - 2023

2.2 Users of the System

The users of an online voting system would typically include:

Registered Voters: The primary users of an online voting system would be registered
voters who are eligible to participate in an election. They would use the system to cast
their votes from their own devices, such as computers, smartphones, or tablets.
Election Officials: Election officials would also be users of the online voting system,
as they would be responsible for managing the system, verifying voter eligibility, and
ensuring the security and integrity of the voting process.
IT Personnel: The development, maintenance, and support of the online voting
system would require the involvement of IT personnel, including software
developers, network engineers, and cybersecurity experts.
Political Parties and Candidates: Political parties and candidates may also have a
role in an online voting system, such as monitoring the voting process or challenging
the results.
Observers and Auditors: Observers and auditors may be appointed to monitor the
online voting system and ensure that it operates in accordance with established rules
and regulations.

The specific users of an online voting system may vary depending on the jurisdiction,
type of election, and other factors. However, the above list covers the most common
users of such a system.

Online Voting System 12


Requirement Analysis 2022 - 2023

2.3 Modules

An online voting system typically comprises several modules, each serving a specific
function in the voting process. Here are the most common modules of a system:

Authentication Module: This module is responsible for verifying the identity of the
voter before allowing them to access the system. It typically uses various
authentication methods, such as usernames, passwords, biometric scans, or multi-
factor authentication.

Registration Module: This module is responsible for registering eligible voters and
ensuring that their information is accurate and up-to-date. It may include features
such as voter registration forms, identity verification, and voter database
management.

Ballot Module: This module is responsible for presenting the ballot to the voter and
recording their choices. It may include features such as candidate or proposition
information, instructions, and multiple language support.

Tabulation Module: This module is responsible for counting the votes and
generating election results. It may include features such as vote aggregation,
verification, and auditing.

Security Module: This module is responsible for ensuring the security and integrity
of the online voting system. It may include features such as encryption, firewalls,
intrusion detection, and access controls.

Accessibility Module: This module is responsible for ensuring that the online voting
system is accessible to all eligible voters, regardless of their abilities or disabilities. It
may include features such as alternative formats, text-to-speech, or visual aids.

The specific modules of an online voting system may vary depending on the system's
design, the jurisdiction, and other factors. However, the above list covers the most
common modules of an online voting system.

Online Voting System 13


Requirement Analysis 2022 - 2023

2.4 Process Model

The process model of an online voting system typically involves several stages,
including:

Voter Registration: Eligible voters register to participate in the online voting


system. The registration process may involve identity verification, registration
forms, and voter database management.

Voter Authentication: Voters are authenticated using various methods, such as


usernames, passwords, biometric scans, or multi-factor authentication.

Ballot Preparation: The ballot is prepared, including candidate or proposition


information, instructions, and multiple language support.

Voting: Voters cast their votes using the online voting system. The voting process
may include features such as verification, error correction, and confirmation.

Vote Collection: The votes are collected and securely stored, typically using
encryption and other security measures.

Vote Tabulation: The votes are tabulated and aggregated, and the election results
are generated. The tabulation process may include features such as verification,
auditing, and recounting.

Reporting: Reports on the voting process and results are generated and made
available to election officials, political parties, and the public. The reporting
process may include features such as real-time updates, voter turnout, and
demographic data.

Security: The security and integrity of the online voting system are maintained
throughout the process, using measures such as encryption, firewalls, intrusion
detection, and access controls.

The specific process model of an online voting system may vary depending on the
system's design, the jurisdiction, and other factors.

Online Voting System 14


Requirement Analysis 2022 - 2023

2.5 Hardware and Software Requirements

Technology Used:

1. Language : HTML,CSS , BOOTSTRAP.

2. Backend : PHP

3. Database: SQL

Minimum Specification:

1. CPU: Intel Pentium 4 processor 2.6 GHz

2. RAM: 2 GB

3. Motherboard: Intel Original/Chipset

4. HDD: 80 GB

5. CD/DVD ROM: Any brand For Optical Use

6. Monitor: 17 Inches with Resolution 800 X 600

Software Requirement:

1. Operating System: Windows XP and Others

2. Web Browser: Chrome, Mozilla Firefox

Languages:

1. Frontend: HTML, CSS, JavaScript

2. Backend: PHP

Online Voting System 15


Requirement Analysis 2022 - 2023

Work Area:

1. HTML:

• HTML stands for Hyper Text Mark-up Language.


• It is the standard mark-up language for creating and describing the structure of a
web pages.
• HTML elements tell the browser how to display the content.

2. CSS:

• CSS stands for Cascading Style Sheets.

• CSS describes how HTML elements are to be displayed on screen, paper, or in


social media.

Online Voting System 16


Requirement Analysis 2022 - 2023

2.6 Use Cases

Here are some possible use cases for an online voting system:

Casting a Vote: This is the main use case of an online voting system. A voter logs
into the system, selects their preferred candidates for each position, and submits their
vote.

Registering to Vote: Before being able to cast a vote, a voter must first register with
the system. This involves providing personal information such as name, address, and
date of birth, and verifying their identity.

Managing Elections: An administrator can use the system to create and manage
elections. This includes setting up positions, adding candidates, and setting the start
and end dates of the election.

Managing Candidates: An administrator can use the system to manage the list of
candidates running for each position. This includes adding or removing candidates
and updating their information.

Managing Voters: An administrator can use the system to manage the list of
registered voters. This includes adding new voters, updating their information, and
removing voters who are no longer eligible to vote.

Verifying Votes: The system can be used to verify that each vote is valid and has not
been tampered with. This involves checking that the voter is eligible to vote, that they
have not already voted, and that their vote has been recorded accurately.

Reporting Election Results: After the election is over, the system can be used to
generate reports showing the results of each position, including the number of votes
each candidate received and the percentage of the total votes.

Sending Notifications: The system can be used to send notifications to voters and
administrators about important dates and events related to the election, such as
registration deadlines, voting periods, and the announcement of result.

Online Voting System 17


Requirement Analysis 2022 - 2023

2.7 Use Case Diagram

Fig. 1 Use Case Diagram of an Online Voting System

Online Voting System 18


Design 2022 - 2023

Chapter 3 - Design

3.1 Use Case Scenarios

Online voting systems can be used in various contexts, including political elections,
organizational or association voting, and public opinion surveys. Here's an example
scenario for an online voting system:

Scenario: A local community organization is holding an election for a new board of


directors. The organization has members from different parts of the community, and
some members cannot attend the in-person voting due to scheduling conflicts or distance.
To ensure maximum participation, the organization decides to use an online voting
system.

The online voting system allows members to log in to a secure website, verify their
identity, and cast their vote remotely. The system uses encryption and other security
measures to ensure the integrity of the voting process and prevent fraud.

Before the election, the organization sends out an email to all members with instructions
on how to access the online voting system, including a unique login ID and password.
Members can also contact the organization's support team for assistance if they have any
issues accessing the system.

Online Voting System 19


Design 2022 - 2023

3.2 Diagrams

3.2.1 UML / DFD

Fig. 2: DFD 0 Level

Online Voting System 20


Design 2022 - 2023

Fig.3 : DFD 1 Level

Online Voting System 21


Design 2022 - 2023

3.2.2 Entity Relationship Diagram

Fig.4 : Entity Relationship Diagram of online voting system

Online Voting System 22


Design 2022 - 2023

3.3 Data Dictionary

Admin

FIELD DATA FIELD CONSTRAINTS DESCRIPTION


NAME TYPE LENGTH

U_name Varchar 30 Not null Name of the user


Password Varchar 10 Not null Login password

Table 1: Data Dictionary For Admin Table

Candidate

FIELD DATA FIELD CONSTRAINTS DESCRIPTION


NAME TYPE LENGTH

Candidate_id Integer 10 Primary key & Candidate


foreign key identification
name varchar 30 Not null Name of the
candidate
Status varchar 30 Not null Status of the
candidate
Age Integer 10 Not null Age of the
candidate

Table 2: Data Dictionary for Candidate Table

Online Voting System 23


Design 2022 - 2023

Voter

FIELD DATA FIELD CONSTRAINTS DESCRIPTION


NAME TYPE LENGTH

Voter_id Integer 10 Primary key Voting no.


Login_id Integer 30 secondary key Login no.
Date of Integer 10 Not null Date of birth of
birth voter
Phone no. Integer 30 Not null Phone no. of the
voter
Password Varchar 30 Not null Login password
Name Varchar 30 Not null Name of voter
Address Varchar 30 Not null Address of voter

Table 3: Data Dictionary for Voter Table

Online Voting System 24


Implementation 2022 - 2023

Chapter 4 - Implementation

4.1 Form Layouts

Registration Page

Fig.5 : Registration Page of an Online Voting System

Online Voting System 25


Implementation 2022 - 2023

Login Page

Fig. 6 : Login Page of an Online Voting System

Online Voting System 26


Implementation 2022 - 2023

4.2 Report Layouts

Output Page

Fig. 7 : Output Page of an Online Voting System

Online Voting System 27


Implementation 2022 - 2023

4.3 Coding Convention

Here are some coding conventions that could be followed when developing an online voting
system:

Naming Convention: Use meaningful and descriptive names for variables, functions, and
classes. Names should be in camelCase or snake_case format and should reflect their purpose.

Indentation: Use consistent and clear indentation to improve code readability. Generally, a tab
or 4 spaces are used for indentation.

Comments: Include clear and concise comments in the code to explain the purpose of code
blocks, functions, and classes. Comments should be in clear English and should not include
irrelevant information.

Error Handling: Proper error handling should be implemented to ensure that errors are caught
and handled correctly. Meaningful error messages should be displayed to the user.

Code Reuse: Avoid duplicating code by using functions and libraries wherever possible.
Reusable code should be stored in separate files and modules.

Code Formatting: Use consistent formatting across the codebase to improve code readability.
Use a consistent style for braces, parentheses, and other syntax elements.

Testing: Include automated tests in the code base to ensure that the code functions as intended.
Tests should cover all major use cases and edge cases.

Security: Ensure that the codebase is secure by following secure coding practices and using
secure libraries and frameworks.

Online Voting System 28


Implementation 2022 - 2023

Documentation: Include documentation in the codebase to explain the architecture, design


decisions, and technical details of the system. Documentation should be clear, concise, and easy
to understand.

These coding conventions can help ensure that the codebase for the online voting system is well-
organized, maintainable, and secure.

Online Voting System 29


Implementation 2022 - 2023

4.4 Code

<?php include ('head.php');?>


<body>
<?php include ('index_banner.php');?>

<div class="container">
<div class="row">

<div class="menue">

</div>
&nbsp;&nbsp;&nbsp;
<div class="col-md-4 col-md-offset-4">

<div class="login-panel"><!-- has form in it-->

<div class="form-panel"><center>
<i>Login As:</i>
<select onchange = "page(this.value)">
<option value = "admin/index.php">System
Admin</option>
<option value = "admin2/index.php">System
User</option>
<option selected disables>Student Voter</option>
</select>
<p/>
</center>
<form role="form" method = "post" enctype =
"multipart/form-data" class="index-form">
<div class="form-heading">
<center>Student Login</center>
</div>

<div class="form-field">
<label for = "username">Student ID:
</label><br/>

Online Voting System 30


Implementation 2022 - 2023

<input class="form-control"
placeholder="Enter Student ID" name="idno" type="text" required = "required"
autofocus>
</div>

<div class="form-field">
<label for = "username" >Password: </label>
<input class="form-control"
placeholder="Enter Password" name="password" type="password" required =
"required">
</div>
<br/>
<center><button class="btn btn-lg btn-success
btn-block " name = "login" style= " margin-bottom:0px;" width="50">Login</button>
&nbsp;
<a href="register/index.php"><button type="button"
class="btn btn-lg btn-success btn-block" data-dismiss="modal" style= " margin-
bottom:0px;">Register</button></a>

&nbsp;

<?php include ('login_query.php');

?>

</form>
</div>
</div>
</div>
</div>

</div>

<?php include ('script.php');?>

<script type="text/javascript">
function page (src) {
window.location = src;
}
</script>
<?php
include ('footer.php');
?>

</body>

Online Voting System 31


Implementation 2022 - 2023

</html>

<?php
require_once 'admin/dbcon.php';

if(isset($_POST['login'])){
$idno=$_POST['idno'];
$password=$_POST['password'];

$result = $conn->query("SELECT * FROM voters WHERE id_number = '$idno' &&


password = '".md5($password)."' && `account` = 'active' && `status` = 'Unvoted'")
or die(mysqli_errno());
$row = $result->fetch_array();
$voted = $conn->query("SELECT * FROM `voters` WHERE id_number = '$idno'
&& password = '".md5($password)."' && `status` = 'Voted'")->num_rows;
$numberOfRows = $result->num_rows;

if ($numberOfRows > 0){


session_start();
$_SESSION['voters_id'] = $row['voters_id'];
header('location:vote.php');
}

if($voted == 1){
?>
<script type="text/javascript">
alert('Sorry You Already Voted')
</script>
<?php
}else{
?>
<script type="text/javascript">
alert('Your account is not Actived')
</script>
<?php
}

}
?>

Online Voting System 32


Implementation 2022 - 2023

<?php include ('sess.php');?>


<?php include ('head.php');?>

<body>

<div id="wrapper">

<?php include ('view_banner.php');?>


<!-- Page Content -->
<!-- Navigation -->
<div id="page-wrapper">

<heading class="menue-select">
<center>
<select onchange = "page(this.value)">
<option disabled selected>Select Candidate Group</option>
<option value = "candidates/pres.php">President</option>
<option value = "candidates/vp.php">Vice President</option>
<option value = "candidates/ua.php">Union Advisor</option>
<option value = "candidates/ss.php">Sports Secretary</option>
<option value = "candidates/ea.php">Entertainment
Advisor</option>
<option value = "candidates/tr.php">Treasurer</option>
<option value = "candidates/vtr.php">Vice Treasurer</option>
<option value = "candidates/sg.php">Secretary General</option>
<option value = "candidates/ta.php">Transport &
Accommodation</option>
<option value = "candidates/pb.php">Publicity</option>
<option value = "candidates/ac.php">Academics</option>
</select>
</center>

</heading>
</div>
<!-- /#page-wrapper -->

</div>
<!-- /#wrapper -->
<?php
include ('footer.php');
?>

<script>

Online Voting System 33


Implementation 2022 - 2023

function page (src){


window.location=src;
}
</script>

</body>

</html>

<?php include ('head.php');?>


<?php include ('sess.php');?>

<body>
<?php include 'side_bar.php'; ?>
<div id="row">
<?php
if(ISSET($_POST['submit']))
{
if(!ISSET($_POST['pres_id']))
{
$_SESSION['pres_id'] = "";
}
else
{
$_SESSION['pres_id'] = $_POST['pres_id'];
}
if(!ISSET($_POST['vp_id']))
{
$_SESSION['vp_id'] = "";
}
else
{
$_SESSION['vp_id'] = $_POST['vp_id'];
}
if(!ISSET($_POST['ua_id']))
{
$_SESSION['ua_id'] = "";
}
else
{
$_SESSION['ua_id'] = $_POST['ua_id'];
}
if(!ISSET($_POST['ss_id']))

Online Voting System 34


Implementation 2022 - 2023

{
$_SESSION['ss_id'] = "";
}
else
{
$_SESSION['ss_id'] = $_POST['ss_id'];
}
if(!ISSET($_POST['ea_id']))
{
$_SESSION['ea_id'] = "";
}
else
{
$_SESSION['ea_id'] = $_POST['ea_id'];
}
if(!ISSET($_POST['treasurer_id']))
{
$_SESSION['treasurer_id'] = "";
}
else
{
$_SESSION['treasurer_id'] = $_POST['treasurer_id'];
}
if(!ISSET($_POST['sg_id']))
{
$_SESSION['sg_id'] = "";
}
else
{
$_SESSION['sg_id'] = $_POST['sg_id'];
}
if(!ISSET($_POST['vtr_id']))
{
$_SESSION['vtr_id'] = "";
}
else
{
$_SESSION['vtr_id'] = $_POST['vtr_id'];
}
if(!ISSET($_POST['tas_id']))
{
$_SESSION['tas_id'] = "";
}
else
{

Online Voting System 35


Implementation 2022 - 2023

$_SESSION['tas_id'] = $_POST['tas_id'];
}
if(!ISSET($_POST['ps_id']))
{
$_SESSION['ps_id'] = "";
}
else
{
$_SESSION['ps_id'] = $_POST['ps_id'];
}
if(!ISSET($_POST['as_id']))
{
$_SESSION['as_id'] = "";
}
else
{
$_SESSION['as_id'] = $_POST['as_id'];
}
}
?>
</div>
<center>
<div class="col-lg-8" style = "margin-left:25%; margin-right:25%;" >
<div class = "alert alert-info">
<div class="panel-heading"><center>PRESIDENT</center></div>
<br />
<?php
if(!$_SESSION['pres_id'])
{

}
else
{
$fetch = $conn->query("SELECT * FROM `candidate` WHERE
`candidate_id` = '$_SESSION[pres_id]'")->fetch_array();

echo $fetch['firstname']." ".$fetch['lastname']." "."<img


src = 'admin/".$fetch['img']."' style = 'height:80px; width:80px; border-
radius:500px;' />";
}
?>
</div>
<div class = "alert alert-success" >
<div class="panel-heading"><center>VICE PRESIDENT</center></div>
<br />

Online Voting System 36


Implementation 2022 - 2023

<?php
if(!$_SESSION['vp_id'])
{

}
else
{
$fetch = $conn->query("SELECT * FROM `candidate` WHERE
`candidate_id` = '$_SESSION[vp_id]'")->fetch_array();
echo $fetch['firstname']." ".$fetch['lastname']." "."<img
src = 'admin/".$fetch['img']."' style = 'height:80px; width:80px; border-
radius:500px;' />";
}
?>
</div>
<div class = "alert alert-info">
<div class="panel-heading"><center>UNION ADVISOR</center></div>
<br/>
<?php
if(!$_SESSION['ua_id'])
{

}
else
{
$fetch = $conn->query("SELECT * FROM `candidate` WHERE
`candidate_id` = '$_SESSION[ua_id]'")->fetch_array();
echo $fetch['firstname']." ".$fetch['lastname']." "."<img
src = 'admin/".$fetch['img']."' style = 'height:80px; width:80px; border-
radius:500px;' />";
}
?>

</div>
<div class = "alert alert-success" >
<div class="panel-heading"><center>SPORTS SECRETARY</center></div>
<br />
<?php
if(!$_SESSION['ss_id'])
{

}
else
{

Online Voting System 37


Implementation 2022 - 2023

$fetch = $conn->query("SELECT * FROM `candidate` WHERE


`candidate_id` = '$_SESSION[ss_id]'")->fetch_array();
echo $fetch['firstname']." ".$fetch['lastname']." "."<img
src = 'admin/".$fetch['img']."' style = 'height:80px; width:80px; border-
radius:500px;' />";
}
?>

</div>
<div class = "alert alert-info">

<div class="panel-heading"><center>ENTERTAINMENT
ADVISOR</center></div>
<br />
<?php
if(!$_SESSION['ea_id'])
{

}
else
{
$fetch = $conn->query("SELECT * FROM `candidate` WHERE
`candidate_id` = '$_SESSION[ea_id]'")->fetch_array();
echo $fetch['firstname']." ".$fetch['lastname']." "."<img
src = 'admin/".$fetch['img']."' style = 'height:80px; width:80px; border-
radius:500px;' />";
}
?>

</div>
<div class = "alert alert-success">
<div class="panel-heading"><center>TREASURER</center></div>
<br />
<?php
if(!$_SESSION['treasurer_id'])
{

}
else
{
$fetch = $conn->query("SELECT * FROM `candidate` WHERE
`candidate_id` = '$_SESSION[treasurer_id]'")->fetch_array();
echo $fetch['firstname']." ".$fetch['lastname']." "."<img
src = 'admin/".$fetch['img']."' style = 'height:80px; width:80px; border-
radius:500px;' />";

Online Voting System 38


Implementation 2022 - 2023

}
?>

</div>
<div class = "alert alert-info" >
<div class="panel-heading"><center>SECRETARY GENERAL</center></div>
<br />
<?php
if(!$_SESSION['sg_id'])
{

}
else
{
$fetch = $conn->query("SELECT * FROM `candidate` WHERE
`candidate_id` = '$_SESSION[sg_id]'")->fetch_array();
echo $fetch['firstname']." ".$fetch['lastname']." "."<img
src = 'admin/".$fetch['img']."' style = 'height:80px; width:80px; border-
radius:500px;' />";
}
?>
</div>
<div class = "alert alert-success">
<div class="panel-heading"><center>VICE TREASURER</center></div>
<br />
<?php
if(!$_SESSION['vtr_id'])
{

}
else
{
$fetch = $conn->query("SELECT * FROM `candidate` WHERE
`candidate_id` = '$_SESSION[vtr_id]'")->fetch_array();
echo $fetch['firstname']." ".$fetch['lastname']." "."<img
src = 'admin/".$fetch['img']."' style = 'height:80px; width:80px; border-
radius:500px;' />";
}
?>

</div>
<div class = "alert alert-info">
<div class="panel-heading"><center>TRANSPORT & ACCOMMODATION
SECRETARY</center></div>
<br />

Online Voting System 39


Implementation 2022 - 2023

<?php
if(!$_SESSION['tas_id'])
{

}
else
{
$fetch = $conn->query("SELECT * FROM `candidate` WHERE
`candidate_id` = '$_SESSION[tas_id]'")->fetch_array();
echo $fetch['firstname']." ".$fetch['lastname']." "."<img
src = 'admin/".$fetch['img']."' style = 'height:80px; width:80px; border-
radius:500px;' />";
}
?>

</div>
<div class = "alert alert-success">
<div class="panel-heading"><center>PUBLICITY SECRETARY</center></div>
<br />
<?php
if(!$_SESSION['ps_id'])
{

}
else
{
$fetch = $conn->query("SELECT * FROM `candidate` WHERE
`candidate_id` = '$_SESSION[ps_id]'")->fetch_array();
echo $fetch['firstname']." ".$fetch['lastname']." "."<img
src = 'admin/".$fetch['img']."' style = 'height:80px; width:80px; border-
radius:500px;' />";
}
?>

</div>
<div class = "alert alert-info">
<div class="panel-heading"><center>ACADEMICS SECRETARY</center></div>
<br />
<?php
if(!$_SESSION['as_id'])
{

}
else
{

Online Voting System 40


Implementation 2022 - 2023

$fetch = $conn->query("SELECT * FROM `candidate` WHERE


`candidate_id` = '$_SESSION[as_id]'")->fetch_array();
echo $fetch['firstname']." ".$fetch['lastname']." "."<img
src = 'admin/".$fetch['img']."' style = 'height:80px; width:80px; border-
radius:500px;' />";
}
?>

</div>
<br />
</div>
</center>
<div class="modal-body">
<p><center>Are you sure you want to
submit your Votes? </center></p>
</div>

<div class="modal-footer"><center>
<a href = "submit_vote.php"><button type =
"submit" class="btn btn-success"><i class="icon-check"></i>&nbsp;Yes</button></a>
<a href = "vote.php"><button class="btn btn-
danger" aria-hidden="true"><i class="icon-remove icon-
large"></i>&nbsp;Back</button></a>
</center></div>
<!-- /.modal-content -->

<!-- /.modal-dialog -->

</body>

<?php include ('script.php');


include ('footer.php');?>
</html>

Online Voting System 41


Implementation 2022 - 2023

<?php include ('head.php');?>

<body>
<?php include ('view_banner.php');?>

<heading class="voters_heading">
<center><h1>University Of Lusaka Student's Union</h1>
</heading>
<div class="image">
<img src="img/img1.jpg" width="40%" hieght="40%"/>
</div>
<div class="union-infor">
Information about the Union go here.
</div>

<?php
include ('footer.php');
?>

</body>
</html>

body{
background-color: white;
}
.page-head{

}
/*Styling the form*/

form{
background-color: ;
}
.link{
font-style: italic;

Online Voting System 42


Implementation 2022 - 2023

}
.link a:hover{
color: green;
}
.form-panel{
background-color:;
width: 350px;
margin-left:auto;
margin-right: auto;
}
.form-heading{
font-weight: bold;
background-color:#449d44;
font-size: 20px;
color: white;
border-top-right-radius: 10px;
border-top-left-radius: 10px;

}
.reg-btn-sbt{
padding-bottom: 10px;

}
.form-field{
}
label{
color: green;
font-style: italic;
font-weight: bold;
}
button{
font-size: larger;
background-color: ;
cursor: pointer;
height: 40px;
border-style: solid;
border-color: darkgreen;
border-width: thin;
border-radius: 5px;

}
button:hover{
background-color: green;
color: white;
}

Online Voting System 43


Implementation 2022 - 2023

select{
width: 50%;
background-color: whitesmoke;
color: green;

}
input:hover, select:hover{
background-color: transparent;
}
.footer{
color: white;
text-align: center;
padding-bottom: 20px;
background-color: rgba(0, 100, 0, 1);
font-size: large;
}
a{
text-decoration: none;
}
.footer a:hover{
color: white;
text-decoration: underline;
}
a:visited{
color: black;
}
a:hover{
cursor: pointer;
}

/*Dropdown menue*/
nav{
padding-top: 10px;
margin-left:auto;
margin-right: auto;
}
nav ul li{
display: inline-block;
padding: 0px 20px 10px 20px;
list-style: none;

}
nav ul li a:hover{
color: white;
text-decoration: none;

Online Voting System 44


Implementation 2022 - 2023

}
nav ul li a{
color: black;
}
/*Dropdown End*/

body {
background-color: #f8f8f8;
}

#wrapper {
width: 100%;
}

#page-wrapper {
padding: 0 15px;
min-height: 200px;
}

@media(min-width:768px) {

.navbar-top-links li {
display: inline-block;
}

.navbar-top-links li:last-child {
margin-right: 15px;
}

.navbar-top-links li a {
padding: 15px;
min-height: 50px;
}

.navbar-top-links .dropdown-menu li {
display: block;
}

.navbar-top-links .dropdown-menu li:last-child {


margin-right: 0;
}

Online Voting System 45


Implementation 2022 - 2023

.navbar-top-links .dropdown-menu li a {
padding: 3px 20px;
min-height: 0;
}

.navbar-top-links .dropdown-menu li a div {


white-space: normal;
}

.navbar-top-links .dropdown-messages,
.navbar-top-links .dropdown-tasks,
.navbar-top-links .dropdown-alerts {
width: 310px;
min-width: 0;
}

.navbar-top-links .dropdown-messages {
margin-left: 5px;
}

.navbar-top-links .dropdown-tasks {
margin-left: -59px;
}

.navbar-top-links .dropdown-alerts {
margin-left: -123px;
}

.navbar-top-links .dropdown-user {
right: 0;
left: auto;
}

.sidebar .sidebar-nav.navbar-collapse {
padding-right: 0;
padding-left: 0;
}

.sidebar .sidebar-search {
padding: 15px;
}

.sidebar ul li {
border-bottom: 1px solid #e7e7e7;

Online Voting System 46


Implementation 2022 - 2023

.sidebar ul li a.active {
background-color: #eee;
}

.sidebar .arrow {
float: right;
}

.sidebar .fa.arrow:before {
content: "\f104";
}

.sidebar .active>a>.fa.arrow:before {
content: "\f107";
}

.sidebar .nav-second-level li,


.sidebar .nav-third-level li {
border-bottom: 0!important;
}

.sidebar .nav-second-level li a {
padding-left: 37px;
}

.sidebar .nav-third-level li a {
padding-left: 52px;
}

@media(min-width:768px) {
.sidebar {
z-index: 1;
position: absolute;
width: 250px;
margin-top: 51px;
}

.navbar-top-links .dropdown-messages,
.navbar-top-links .dropdown-tasks,
.navbar-top-links .dropdown-alerts {
margin-left: auto;
}
}

Online Voting System 47


Implementation 2022 - 2023

.btn-outline {
color: inherit;
background-color: transparent;
transition: all .5s;
}

.btn-primary.btn-outline {
color: #428bca;
}

.btn-success.btn-outline {
color: #5cb85c;
}

.btn-info.btn-outline {
color: #5bc0de;
}

.btn-warning.btn-outline {
color: #f0ad4e;
}

.btn-danger.btn-outline {
color: #d9534f;
}

.btn-primary.btn-outline:hover,
.btn-success.btn-outline:hover,
.btn-info.btn-outline:hover,
.btn-warning.btn-outline:hover,
.btn-danger.btn-outline:hover {
color: #fff;
}

.chat {
margin: 0;
padding: 0;
list-style: none;
}

.chat li {
margin-bottom: 10px;
padding-bottom: 5px;
border-bottom: 1px dotted #999;

Online Voting System 48


Implementation 2022 - 2023

.chat li.left .chat-body {


margin-left: 60px;
}

.chat li.right .chat-body {


margin-right: 60px;
}

.chat li .chat-body p {
margin: 0;
}

.panel .slidedown .glyphicon,


.chat .glyphicon {
margin-right: 5px;
}

.chat-panel .panel-body {
height: 350px;
overflow-y: scroll;
}

.login-panel {
margin-top: 25%;
}

.flot-chart {
display: block;
height: 400px;
}

.flot-chart-content {
width: 100%;
height: 100%;
}

table.dataTable thead .sorting,


table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_asc_disabled,
table.dataTable thead .sorting_desc_disabled {
background: 0 0;
}

Online Voting System 49


Implementation 2022 - 2023

table.dataTable thead .sorting_asc:after {


content: "\f0de";
float: right;
font-family: fontawesome;
}

table.dataTable thead .sorting_desc:after {


content: "\f0dd";
float: right;
font-family: fontawesome;
}

table.dataTable thead .sorting:after {


content: "\f0dc";
float: right;
font-family: fontawesome;
color: rgba(50,50,50,.5);
}

.btn-circle {
width: 30px;
height: 30px;
padding: 6px 0;
border-radius: 15px;
text-align: center;
font-size: 12px;
line-height: 1.428571429;
}

.btn-circle.btn-lg {
width: 50px;
height: 50px;
padding: 10px 16px;
border-radius: 25px;
font-size: 18px;
line-height: 1.33;
}

.btn-circle.btn-xl {
width: 70px;
height: 70px;
padding: 10px 16px;
border-radius: 35px;
font-size: 24px;

Online Voting System 50


Implementation 2022 - 2023

line-height: 1.33;
}

.show-grid [class^=col-] {
padding-top: 10px;
padding-bottom: 10px;
border: 1px solid #ddd;
background-color: #eee!important;
}

.show-grid {
margin: 15px 0;
}

.huge {
font-size: 40px;
}

.panel-green {
border-color: #5cb85c;
}

.panel-green .panel-heading {
border-color: #5cb85c;
color: #fff;
background-color: #5cb85c;
}

.panel-green a {
color: #5cb85c;
}

.panel-green a:hover {
color: #3d8b3d;
}

.panel-red {
border-color: #d9534f;
}

.panel-red .panel-heading {
border-color: #d9534f;
color: #fff;
background-color: #d9534f;
}

Online Voting System 51


Implementation 2022 - 2023

.panel-red a {
color: #d9534f;
}

.panel-red a:hover {
color: #b52b27;
}

.panel-yellow {
border-color: #f0ad4e;
}

.panel-yellow .panel-heading {
border-color: #f0ad4e;
color: #fff;
background-color: #f0ad4e;
}

.panel-yellow a {
color: #f0ad4e;
}

.panel-yellow a:hover {
color: #df8a13;

<?php include ('head.php');?>

<body>

<div id="wrapper">

<!-- Navigation -->


<?php include ('view_banner.php');?>
<!-- Page Content -->
<div id="page-wrapper">

<heading class="voters_heading">
<center><h1>Registered Publicity Secretary Candidates</h1>
<center>
<select onchange = "page(this.value)">
<option disabled selected>Select Candidate Group</option>
<option value = "pres.php">President</option>
<option value = "vp.php">Vice President</option>
<option value = "ua.php">Union Advisor</option>

Online Voting System 52


Implementation 2022 - 2023

<option value = "ss.php">Sports Secretary</option>


<option value = "ea.php">Entertainment Advisor</option>
<option value = "tr.php">Treasurer</option>
<option value = "vtr.php">Vice Treasurer</option>
<option value = "sg.php">Secretary General</option>
<option value = "ta.php">Transport & Accommodation</option>
<option disabled selected>Publicity</option>
<option value = "ac.php">Academics</option>
</select>
</center>

<script>
function page (src){
window.location=src;
}
</script>
<p/>

</heading>
<div class="row">

<div class="panel panel-default">

<!-- /.panel-heading -->

<div class="panel-body">

<div class="table-responsive">
<table class="table table-striped table-bordered
table-hover" id="dataTables-example" border="0">

<thead class="thead">

<tr>
<th>Image</th>
<th>Firstname</th>
<th>Lastname</th>
<th>Party</th>
<th>Year Level</th>
<th>Gender</th>

</tr>
</thead>
<tbody>

Online Voting System 53


Implementation 2022 - 2023

<tr>
<?php
require '../admin/dbcon.php';
$bool = false;
$query = $conn->query("SELECT * FROM
candidate WHERE `position` = 'Publicity Secretary'");
while($row = $query-
>fetch_array()){

$candidate_id=$row['candidate_id'];
?>

<td width="50"><img
src="../admin/<?php echo $row['img']; ?>" width="50" height="50" class="img-
rounded"></td>
<td><?php echo $row
['firstname'];?></td>
<td><?php echo $row
['lastname'];?></td>
<td><?php echo $row ['party'];?></td>
<td><?php echo $row
['year_level'];?></td>
<td><?php echo $row
['gender'];?></td>
</tr>

<?php } ?>
</tbody>
</table>
</div>

<!-- /.table-responsive -->

</div>
<!-- /.panel-body -->
</div>

</div>
<!-- /.row -->
</div>
<!-- /#page-wrapper -->

Online Voting System 54


Implementation 2022 - 2023

</div>
<!-- /#wrapper -->
<?php
include ('footer.php');
?>

<?php include ('../script.php');?>

</body>

</html>

?php include ('head.php');?>

<body>

<div id="wrapper">

<!-- Navigation -->


<?php include ('view_banner.php');?>
<!-- Page Content -->
<div id="page-wrapper">

<heading class="voters_heading">
<center><h1>Registered Treasurer Candidates</h1>
<center>
<select onchange = "page(this.value)">
<option disabled selected>Select Candidate Group</option>
<option value = "pres.php">President</option>
<option value = "vp.php">Vice President</option>
<option value = "ua.php">Union Advisor</option>
<option value = "ss.php">Sports Secretary</option>
<option value = "ea.php">Entertainment Advisor</option>
<option disabled selected>Treasurer</option>
<option value = "vtr.php">Vice Treasurer</option>
<option value = "sg.php">Secretary General</option>
<option value = "ta.php">Transport & Accommodation</option>
<option value = "pb.php">Publicity</option>
<option value = "ac.php">Academics</option>
</select>
</center>

Online Voting System 55


Implementation 2022 - 2023

<script>
function page (src){
window.location=src;
}
</script>
<p/>

</heading>
<div class="row">

<div class="panel panel-default">

<!-- /.panel-heading -->

<div class="panel-body">

<div class="table-responsive">
<table class="table table-striped table-bordered
table-hover" id="dataTables-example" border="0">

<thead class="thead">

<tr>
<th>Image</th>
<th>Firstname</th>
<th>Lastname</th>
<th>Party</th>
<th>Year Level</th>
<th>Gender</th>

</tr>
</thead>
<tbody>

<tr>
<?php
require '../admin/dbcon.php';
$bool = false;
$query = $conn->query("SELECT * FROM
candidate WHERE `position` = 'Treasurer'");
while($row = $query-
>fetch_array()){

$candidate_id=$row['candidate_id'];

Online Voting System 56


Implementation 2022 - 2023

?>

<td width="50"><img
src="../admin/<?php echo $row['img']; ?>" width="50" height="50" class="img-
rounded"></td>
<td><?php echo $row
['firstname'];?></td>
<td><?php echo $row
['lastname'];?></td>
<td><?php echo $row ['party'];?></td>
<td><?php echo $row
['year_level'];?></td>
<td><?php echo $row
['gender'];?></td>
</tr>

<?php } ?>
</tbody>
</table>
</div>

<!-- /.table-responsive -->

</div>
<!-- /.panel-body -->
</div>

</div>
<!-- /.row -->
</div>
<!-- /#page-wrapper -->

</div>
<!-- /#wrapper -->
<?php
include ('footer.php');
?>

<?php include ('../script.php');?>

</body>

Online Voting System 57


Implementation 2022 - 2023

</html>

div.dataTables_length label {
float: left;
text-align: left;
font-weight: normal;
}

div.dataTables_length select {
width: 75px;
}

div.dataTables_filter label {
float: right;
font-weight: normal;
}

div.dataTables_filter input {
width: 16em;
}

div.dataTables_info {
padding-top: 8px;
}

div.dataTables_paginate {
float: right;
margin: 0;
}

div.dataTables_paginate ul.pagination {
margin: 2px 0;
white-space: nowrap;
}

table.dataTable,
table.dataTable td,
table.dataTable th {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}

Online Voting System 58


Implementation 2022 - 2023

table.dataTable {
clear: both;
margin-top: 6px !important;
margin-bottom: 6px !important;
max-width: none !important;
}

table.dataTable thead .sorting,


table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_asc_disabled,
table.dataTable thead .sorting_desc_disabled {
cursor: pointer;
}

table.dataTable thead .sorting {


background: url('../images/sort_both.png') no-repeat center right;
}

table.dataTable thead .sorting_asc {


background: url('../images/sort_asc.png') no-repeat center right;
}

table.dataTable thead .sorting_desc {


background: url('../images/sort_desc.png') no-repeat center right;
}

table.dataTable thead .sorting_asc_disabled {


background: url('../images/sort_asc_disabled.png') no-repeat center right;
}

table.dataTable thead .sorting_desc_disabled {


background: url('../images/sort_desc_disabled.png') no-repeat center right;
}

table.dataTable th:active {
outline: none;
}

/* Scrolling */

div.dataTables_scrollHead table {
margin-bottom: 0 !important;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;

Online Voting System 59


Implementation 2022 - 2023

div.dataTables_scrollHead table thead tr:last-child th:first-child,


div.dataTables_scrollHead table thead tr:last-child td:first-child {
border-bottom-left-radius: 0 !important;
border-bottom-right-radius: 0 !important;
}

div.dataTables_scrollBody table {
margin-top: 0 !important;
margin-bottom: 0 !important;
border-top: none;
}

div.dataTables_scrollBody tbody tr:first-child th,


div.dataTables_scrollBody tbody tr:first-child td {
border-top: none;
}

div.dataTables_scrollFoot table {
margin-top: 0 !important;
border-top: none;
}

/*
* TableTools styles
*/

.table tbody tr.active td,


.table tbody tr.active th {
color: white;
background-color: #08C;
}

.table tbody tr.active:hover td,


.table tbody tr.active:hover th {
background-color: #0075b0 !important;
}

.table tbody tr.active a {


color: white;
}

.table-striped tbody tr.active:nth-child(odd) td,


.table-striped tbody tr.active:nth-child(odd) th {

Online Voting System 60


Implementation 2022 - 2023

background-color: #017ebc;
}

table.DTTT_selectable tbody tr {
cursor: pointer;
}

div.DTTT .btn {
font-size: 12px;
color: #333 !important;
}

div.DTTT .btn:hover {
text-decoration: none !important;
}

ul.DTTT_dropdown.dropdown-menu {
z-index: 2003;
}

ul.DTTT_dropdown.dropdown-menu a {
color: #333 !important; /* needed only when demo_page.css is included */
}

ul.DTTT_dropdown.dropdown-menu li {
position: relative;
}

ul.DTTT_dropdown.dropdown-menu li:hover a {
color: white !important;
background-color: #0088cc;
}

div.DTTT_collection_background {
z-index: 2002;
}

/* TableTools information display */

div.DTTT_print_info.modal {
height: 150px;
margin-top: -75px;
text-align: center;
}

Online Voting System 61


Implementation 2022 - 2023

div.DTTT_print_info h6 {
margin: 1em;
font-size: 28px;
font-weight: normal;
line-height: 28px;
}

div.DTTT_print_info p {
font-size: 14px;
line-height: 20px;
}

/*
* FixedColumns styles
*/

div.DTFC_LeftHeadWrapper table,
div.DTFC_LeftFootWrapper table,
div.DTFC_RightHeadWrapper table,
div.DTFC_RightFootWrapper table,
table.DTFC_Cloned tr.even {
background-color: white;
}

div.DTFC_RightHeadWrapper table,
div.DTFC_LeftHeadWrapper table {
margin-bottom: 0 !important;
border-top-right-radius: 0 !important;
border-bottom-left-radius: 0 !important;
border-bottom-right-radius: 0 !important;
}

div.DTFC_RightHeadWrapper table thead tr:last-child th:first-child,


div.DTFC_RightHeadWrapper table thead tr:last-child td:first-child,
div.DTFC_LeftHeadWrapper table thead tr:last-child th:first-child,
div.DTFC_LeftHeadWrapper table thead tr:last-child td:first-child {
border-bottom-left-radius: 0 !important;
border-bottom-right-radius: 0 !important;
}

div.DTFC_RightBodyWrapper table,
div.DTFC_LeftBodyWrapper table {
margin-bottom: 0 !important;
border-top: none;
}

Online Voting System 62


Implementation 2022 - 2023

div.DTFC_RightBodyWrapper tbody tr:first-child th,


div.DTFC_RightBodyWrapper tbody tr:first-child td,
div.DTFC_LeftBodyWrapper tbody tr:first-child th,
div.DTFC_LeftBodyWrapper tbody tr:first-child td {
border-top: none;
}

div.DTFC_RightFootWrapper table,
div.DTFC_LeftFootWrapper table {
border-top: none;
}

Online Voting System 63


Testing 2022 - 2023

Chapter 5 - Testing

5.1 Test Strategy

The test strategy for an online voting system should ensure the system is secure, reliable, and
accurate. Here are some key considerations to guide the testing process:

Security Testing: Security is of utmost importance when it comes to an online voting system.
Testing should be carried out to identify any vulnerabilities in the system that could be exploited
by hackers or malicious actors. Testing should include penetration testing, vulnerability
scanning, and network security testing.

Usability Testing: Usability testing should be carried out to ensure that the system is easy to use
and understand for voters. The testing should be carried out on a representative sample of users
to get an accurate idea of how the system performs in real-world situations.

Performance Testing: Performance testing should be carried out to ensure that the system can
handle the expected load. Testing should include load testing, stress testing, and scalability
testing to ensure that the system can handle a large number of users without crashing.

Functionality Testing: Functionality testing should be carried out to ensure that the system
functions as expected. Testing should include verifying that voters can register, cast their vote,
and view their results. Testing should also ensure that the system is accessible to all users,
including those with disabilities.

Compatibility Testing: Compatibility testing should be carried out to ensure that the system
works correctly across different platforms, browsers, and devices. Testing should include
verifying that the system works on both desktop and mobile devices.

Reliability Testing: Reliability testing should be carried out to ensure that the system operates
correctly and without errors. Testing should include verifying that the system can recover from
failures and that votes are counted accurately.

Online voting system 1


Testing 2022 - 2023

Compliance Testing: Compliance testing should be carried out to ensure that the system meets
all relevant regulations and standards, including data privacy laws and election regulations.

In conclusion, the test strategy for an online voting system should cover all aspects of the system,
including security, usability, performance, functionality, compatibility, reliability, and
compliance. A comprehensive testing process will ensure that the system is ready for use and
that voters can trust the results .

Online voting system 2


Testing 2022 - 2023

5.2 Test Cases

Here are some test cases that can be considered while testing an online voting system for
different modules.

Registration Module:
 Verify that all required fields are present on the registration form (e.g., name,
password).
 Test the validation of input fields, ensuring that appropriate error messages are
displayed for invalid inputs.
 Validate that the student ID entered during registration is unique and not already
registered in the system.
 Verify that a confirmation message is sent to the user after successful registration.
 Test that the registration process is successful and the user is redirected to the login
page after registration.

Fig 8: Registration for Voting

Online voting system 3


Testing 2022 - 2023

Login Module:
 Verify that the login page is displayed when a user attempts to access a protected
page without logging in.
 Test that users can't log in with invalid credentials (i.e., incorrect id or password).
 Verify that users are redirected to the voting page after successful login.
 Verify that users are logged out after a period of inactivity.
 Test that users can log in using their registered id and password.

Fig 9 : Login for Voting

Online voting system 4


Testing 2022 - 2023

Voting Module:
 Verify that the user has cast their v o t e .
 Test that the vote contains the appropriate information .

 Test that the information is only accessible to users who have successfully completed
the voting
 Verify that the vote details is only valid for a certain period of time (if applicable).

 Test that the voting page is responsive and displays correctly on different screen sizes
and devices.

Fig 10 : Figure Showing Vote Casted Positively


ositively

Online voting system 5


Future Enhancement 2022 - 2023

Chapter 6 – Future Enhancement

Here are some possible future enhancements that can be made to an online voting system:

 Biometric Verification: Biometric verification can be used to authenticate voters,


making it harder for fraudulent users to access the system.
 Artificial Intelligence: Artificial intelligence can be used to improve the accuracy of the
voting process by analyzing voting patterns and detecting potential fraud.
 Mobile Voting: Mobile voting can increase accessibility by allowing voters to cast their
vote from their mobile devices. This can increase voter turnout and make the process
more convenient.
 Improved Security Features: The system's security features can be improved to ensure
that the system is secure from cyber threats and other types of fraud.
 Voter Education: Voter education can be provided through the online voting system to
help voters understand the process better and reduce the likelihood of errors or confusion.
 Accessibility Features: Additional accessibility features can be added to the system,
such as text-to-speech and high contrast modes, to make the system more accessible to
users with disabilities.
 Feedback Mechanisms: Feedback mechanisms can be added to the system to allow
users to report any issues or provide feedback to improve the system.

These enhancements can help improve the security, accessibility, and usability of the online
voting system, leading to a more accurate and inclusive voting process.

Online Voting System 69


Bibliography 2022 - 2023

Chapter -7 Bibliography

 Advanced web development:


https://practice.geeksforgeeks.org/
https://www.tutorialspoint.com/

https://www.javatpoint.com/

 Website and form layouts:


https://bootstrapstudio.io/
https://www.youtube.com/@codewithharry
https://www.codewithharry.com/videos/php-tutorials-in-hindi-4/

 Login form and registration form:


https://www.youtube.com/watch?v=LTPGyaEyTI4

 Database Connectivity PHP with MYSQL


https://www.youtube.com/watch?v=R1djM9B0ay0

Online Voting System 70

You might also like