Professional Documents
Culture Documents
Sample of Project File
Sample of Project File
SUBMITTED TO
IN COMPUTER APPLICATION
A.Y. 2022-23
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
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.
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.
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.
An online voting system has the potential to solve several problems associated
with traditional paper-based voting systems. Some of these problems include:
The need for a new online voting system arises from several factors, including:
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.
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.
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.
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.
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.
Tools
Visual Studio Code Editor (VS code) : [Version 1.76.1]
MYSQL : [Version 8.0.32]
XAMPP : [Version 8.0.25]
Technology
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.
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.
The process model of an online voting system typically involves several stages,
including:
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.
Technology Used:
2. Backend : PHP
3. Database: SQL
Minimum Specification:
2. RAM: 2 GB
4. HDD: 80 GB
Software Requirement:
Languages:
2. Backend: PHP
Work Area:
1. HTML:
2. CSS:
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.
Chapter 3 - Design
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:
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.
3.2 Diagrams
Admin
Candidate
Voter
Chapter 4 - Implementation
Registration Page
Login Page
Output Page
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.
These coding conventions can help ensure that the codebase for the online voting system is well-
organized, maintainable, and secure.
4.4 Code
<div class="container">
<div class="row">
<div class="menue">
</div>
<div class="col-md-4 col-md-offset-4">
<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/>
<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>
<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>
?>
</form>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function page (src) {
window.location = src;
}
</script>
<?php
include ('footer.php');
?>
</body>
</html>
<?php
require_once 'admin/dbcon.php';
if(isset($_POST['login'])){
$idno=$_POST['idno'];
$password=$_POST['password'];
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
}
}
?>
<body>
<div id="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>
</body>
</html>
<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']))
{
$_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
{
$_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();
<?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
{
</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;' />";
}
?>
</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 />
<?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
{
</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> Yes</button></a>
<a href = "vote.php"><button class="btn btn-
danger" aria-hidden="true"><i class="icon-remove icon-
large"></i> Back</button></a>
</center></div>
<!-- /.modal-content -->
</body>
<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;
}
.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;
}
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;
}
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 a {
padding: 3px 20px;
min-height: 0;
}
.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;
.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 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;
}
}
.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;
.chat li .chat-body p {
margin: 0;
}
.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%;
}
.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;
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;
}
.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;
<body>
<div id="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>
<script>
function page (src){
window.location=src;
}
</script>
<p/>
</heading>
<div class="row">
<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` = '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>
</div>
<!-- /.panel-body -->
</div>
</div>
<!-- /.row -->
</div>
<!-- /#page-wrapper -->
</div>
<!-- /#wrapper -->
<?php
include ('footer.php');
?>
</body>
</html>
<body>
<div id="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>
<script>
function page (src){
window.location=src;
}
</script>
<p/>
</heading>
<div class="row">
<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'];
?>
<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>
</div>
<!-- /.panel-body -->
</div>
</div>
<!-- /.row -->
</div>
<!-- /#page-wrapper -->
</div>
<!-- /#wrapper -->
<?php
include ('footer.php');
?>
</body>
</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;
}
table.dataTable {
clear: both;
margin-top: 6px !important;
margin-bottom: 6px !important;
max-width: none !important;
}
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;
div.dataTables_scrollBody table {
margin-top: 0 !important;
margin-bottom: 0 !important;
border-top: none;
}
div.dataTables_scrollFoot table {
margin-top: 0 !important;
border-top: none;
}
/*
* TableTools styles
*/
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;
}
div.DTTT_print_info.modal {
height: 150px;
margin-top: -75px;
text-align: center;
}
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_RightBodyWrapper table,
div.DTFC_LeftBodyWrapper table {
margin-bottom: 0 !important;
border-top: none;
}
div.DTFC_RightFootWrapper table,
div.DTFC_LeftFootWrapper table {
border-top: none;
}
Chapter 5 - Testing
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.
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 .
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.
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.
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.
Here are some possible future enhancements that can be made to an online voting 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.
Chapter -7 Bibliography
https://www.javatpoint.com/