Professional Documents
Culture Documents
1.0 1.1Synopsis 1
1.2 Organization Profiles
5.0 Design 42
5.1Frontend design
5.2Backend design
7.0 Testing 72
8.0 Conclusion 76
10.0 References 80
CHAPTER 1
SYNOPSIS
The Smart Card technology is being applied in many industries. This technology
can be used for multiple functions like analyzing the data of an individual person. The
day to day transactions can be done using the smart cards. If the smart card is allocated to
each and every existing citizen as well as newborn babies then what changes take place in
the system/society is written further. This paper aims about the smart card
implementation in a city, region or country which could bring a great change in the
transactions and many more things which is further elaborated. As the technology is
developing on a daily basis there are many factors which are affecting the transactions
done as well as many frauds and thefts are taking place. Smart cards are one of the
technologies which can keep a track of all the things and can help in analyzing the data of
an individual. The smart card is made up of a plastic card in which a microprocessor is
embedded. This microprocessor can also be used to read, write, update and make changes
in the data of the smart card. It can act as an access control device for accessing particular
servers and transferring the data, for example: payments, hospital records, police records,
etc. Smart cards ensure availability, security, convenience and data probability. Smart
cards are of two types: contact smart cards and contact less smart card. The main focus on
the implementation of the smart card is further written in this paper.
1.2 ORGANIZATION PROFILES
ADMINISTRATION OFFICE
OFFICE ADDRESS:
No.17/595, 1st Floor Mannar Sarefoji Nagar 2nd Street,Opp.New Bus Stand,
Thanjavur-5.
CONTACT: 04362-228899, 9597754496.
E-MAIL: scionrd2009@gmail.com.
CHAPTER 2
SYSTEM ANALYSIS
2.1EXISTING SYSTEM
Currently smart card implementations can he seen around the world hut they are not
unified i.e. each developer uses different programming standards and data structures,
therefore a variety of smart cards exist in our society today. Currently, smart cards are
carried by most of us for various applications such as transportation, cash, payment of
bills, railway passes, ID cards, health cards, library cards.
Disadvantages
1. Less Secure.
2. Time consuming process.
3. More human power required.
2.2 PROPOSED SYSTEM
The smart card will need a device which will have a fingerprint scanner for
authentication of a particular person. This device will be placed in an individual
organisation for eg: hospital, which will only be able to fetch and access all the data
related to the hospital. This data will be accessed only if the individual person is
authenticated using the smart card and fingerprint scanning. The data then would be able
to validate, insert, update, and delete the records of that particular person. Using that
particular organization’s device nobody would be able to fetch the data of other
organizations, for eg: using a hospital's device, tax department’s data will not be fetched.
Advantages
IMPLEMENTATION IN HOSPITALS
If smart cards are used in hospitals for uploading each and every medical record
then that would ease the process of the hospitals during new medical issues when any
patient comes to the hospital. The medical history and the payment history for previous
medical tests and treatment can all be tracked once the smart card of a particular person
swiped in the hospital's system just like our atm cards.
IMPLEMENTATION IN POLICE RECORDS
If any person goes to the police station for filing a complaint or if any person has
any criminal records all the things can be tracked with a single smart card ID of that
particular person. This would also speed up the police work rather than searching the
documents of complaints then seeing the progress of it or any other paperwork task would
be eliminated. This would be beneficial for all the police personnel’s as their time would
be saved.
IMPLEMENTATION IN RTO
Suppose that, if a particular person could be reminded of his/her fines from time
to time for breaking the law while driving a vehicle or any other fines related to RTO by
linking the smart card then it would save the late fees and also track the problem of
unknown fines or any payment done but not received at the RTO sector which many
times causes a problem afterwards to that person. Smart cards will also include the license
information of particular vehicle types.
IMPLEMENTATION IN BANKING SECTOR
If the transactions which are done by UPI IDs are linked to the smart card of that
particular person then the banking sector will not have any problems tracking people who
have taken loans from the bank and then got absconded.
IMPLEMENTATION IN INCOME TAX DEPARTMENT
The tax department is nowadays working on how the black money would be
minimized. If the daily transactions of every person are tracked as the smart card will be
linked to the banks for payment purposes then it would be easier for the tax consultants to
track every single penny.
IMPLEMENTATION IN INSURANCE COMPANIES
After the implementation in insurance companies the phase of work process of any
insurance contract generation or insurance claim would speed up, as all things would be
traceable by the smart card.
CHAPTER 3
SYSTEM CONFIGURATION
Hardware Requirements
Hard disk : 1 TB
RAM : 4 GB
Processor : Core i3
Monitor : 15’’Color Monitor
Software Requirements
4.1SOFTWARE DESCRIPTION
Front end – HTML, CSS, JS
An overview:
HTML provides the basic structure of sites, which is enhanced and modified by
other technologies like CSS and JavaScript.
CSS is used to control presentation, formatting, and layout.
JavaScript is used to control the behavior of different elements.
Now, let's go over each one individually to help you understand the roles each plays on a
website and then we'll cover how they fit together. Let's start with good of' HTML.
HTML
HTML is at the core of every web page, regardless the complexity of a site or number of
technologies involved. It's an essential skill for any web professional. It's the starting
point for anyone learning how to create content for the web. And, luckily for us, it's
surprisingly easy to learn.
Markup languages work in the same way as you just did when you labeled those content
types, except they use code to do it -- specifically, they use HTML tags, also known as
"elements." These tags have pretty intuitive names: Header tags, paragraph tags, image
tags, and so on.
Every web page is made up of a bunch of these HTML tags denoting each type of content
on the page. Each type of content on the page is "wrapped" in, i.e. surrounded by, HTML
tags.
For example, the words you're reading right now are part of a paragraph. If I were coding
this web page from scratch (instead of using the WYSIWG editor in HubSpot's COS), I
would have started this paragraph with an opening paragraph tag: <p>. The "tag" part is
denoted by open brackets, and the letter "p" tells the computer that we're opening a
paragraph instead of some other type of content.
Once a tag has been opened, all of the content that follows is assumed to be part of that
tag until you "close" the tag. When the paragraph ends, I'd put a closing paragraph tag:
</p>. Notice that closing tags look exactly the same as opening tags, except there is a
forward slash after the left angle bracket. Here's an example:
<p>This is a paragraph.</p>
Using HTML, you can add headings, format paragraphs, control line breaks, make lists,
emphasize text, create special characters, insert images, create links, build tables, control
some styling, and much more.
To learn more about coding in HTML, I recommend checking out our guide to basic
HTML, and using the free classes and resources on codecademy -- but for now, let's move
on to CSS.
CSS
CSS stands for Cascading Style Sheets. This programming language dictates how the
HTML elements of a website should actually appear on the frontend of the page.
Whereas HTML was the basic structure of your website, CSS is what gives your entire
website its style. Those slick colors, interesting fonts, and background images? All thanks
to CSS. This language affects the entire mood and tone of a web page, making it an
incredibly powerful tool -- and an important skill for web developers to learn. It's also
what allows websites to adapt to different screen sizes and device types.
To show you what CSS does to a website, look at the following two screenshots. The first
screenshot is my colleague's blog post, but shown in Basic HTML, and the second
screenshot is that same blog post with HTML and CSS.
JavaScript
JavaScript is a more complicated language than HTML or CSS, and it wasn't released in
beta form until 1995. Nowadays, JavaScript is supported by all modern web browsers and
is used on almost every site on the web for more powerful and complex functionality.
avaScript is particularly useful for assigning new identities to existing website elements,
according to the decisions the user makes while visiting the page. For example, let's say
you're building a landing page with a form you'd like to generates leads from by capturing
information about a website visitor. You might have a "string" of JavaScript dedicated to
the user's first name. That string might look something like this:
Then, after the website visitor enters his or her first name -- and any other information
you require on the landing page -- and submits the form, this action updates the identity
of the initially undefined "Firstname" element in your code. Here's how you might thank
your website visitor by name in JavaScript:
para.textContent = 'Thanks, ' + First name + "! You can now download your ebook."
In the string of JavaScript above, the "First name" element has been assigned the first
name of the website visitor, and will therefore produce his or her actual first name on the
frontend of the webpage.
These three principles do not exist in isolation, but they inform and affect one another.
Therefore, any infosec system will involve a balance of these factors. As an extreme
example, information only available as a written sheet of paper stored in a vault is
confidential but not easily available. Information carved into stone displayed in the lobby
has a lot of integrity but is not confidential or available.
4.3 DIAGRAMS
Architecture Diagram
Class Diagram
Class diagram is the type of static structure diagram that describe the structure of a
system by showing the systems classes, their attributes operations or methods under
relationship among the objects.
Activity Diagram
Activity diagram is another important diagram in UML to describe the dynamic
aspects of the system. Activity diagram is basically a flowchart to represent the flow from
one activity to another activity. The activity can be described as an operation of the
system. The control flow is drawn from one operation to another. This flow can be
sequential, branched, or concurrent. Activity diagrams deal with all type of flow control
by using different elements such as fork, join, etc.
E-R Diagram
An Entity Relationship (ER) Diagram is a type of flowchart that illustrates how
“entities” such as people, objects or concepts relate to each other within a system. ER
Diagrams are most often used to design or debug relational databases in the fields of
software engineering, business information systems, education and research.
CHAPTER 5
DESIGN
5.1 FRONTEND DESIGN
5.2BACKEND DESIGN
DB Design:
CHAPTER 6
SAMPLE CODING
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Home</title>
<style>body,html{height:100%;width:100%;background-
color:#f0f0f0;}*{padding:0px;margin:0px}</style>
</head>
<body style="display: flex;justify-content: center;align-items: center;flex-direction:
column;">
<a href="/ration" style="background-color:#1c6ac4;color:#fff;border:none;border-radius:
10px;box-shadow: 0px 2px 6px #fff;padding:10px;">Ration Service</a>
<br>
<a href="/bank" style="background-color:#1c6ac4;color:#fff;border:none;border-radius:
10px;box-shadow: 0px 2px 6px #fff;padding:10px;">Bank Service</a>
</body>
</html>
admin/index.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Admin</title>
<link rel="shortcut icon" href="/static/images/favicon.png" type="image/x-icon">
<link rel="stylesheet" href="/static/css/bootstrap.css">
<script src='/static/js/bootstrap.js'></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
</head>
<body style="background-color: #2b74e2;background-position:center;background-repeat:
no-repeat;background-attachment: fixed;background-size: cover;">
<script>
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
if(urlParams.get('err')){
document.write("<div style='position:fixed;bottom:30px; right:30px;background-
color:tomato;padding:10px;border-radius:10px;box-shadow:2px 2px 4px
#aaa;color:white;font-weight:600'>"+urlParams.get('err')+"</div>")
}
setTimeout(()=>{
document.getElementById("err").style.display="none"
}, 5000)
</script>
<div data-aos="zoom-in" class="container" style="margin-top:120px;margin-
bottom:100px;width:500px;max-width:100vw;background-color: white;padding:30px
0px;border-radius: 30px;box-shadow: 2px 2px 8px #ccc;">
<h1 style="text-align: center;color:#2b74e2"><b>Admin</b></h1>
<br>
<form style="margin: 0 20%" method="POST" action="/admin/login.php">
<div class="form-outline mb-4">
<label class="form-label" for="form2Example1">Email :</label>
<input type="email" name="email" class="form-control" required/>
</div>
<div class="form-outline mb-4">
<label class="form-label" for="form2Example2">Password :</label>
<input type="password" name="password" class="form-control" required/>
</div>
<br>
<center>
<button type="submit" class="btn btn-block mb-4"
style="width:100%"><b>Login</b></button>
</center>
</form>
</div>
<style>
button{
background-color: #2b74e2 !important;
color:white !important;
height:45px !important;
font-size:22px !important;
}
.form-control:focus , .form-control:active{
box-shadow: none !important;
}
</style>
<script>
AOS.init();
</script>
</body>
</html>
admin/login.php
<?php
session_start();
if ($_POST["email"]=="admin@gmail.com") {
if ($_POST["password"]=="admin") {
$_SESSION["lock"] = "xiny9387tdpq##*&B98oyo8B@*O&^PB^B$";
header("Location: /admin/home.php");
die();
} else {
header("Location: /admin/?err=username or password is incorrect!");
die();
}
} else {
header("Location: /admin/?err=username or password is incorrect!");
die();
}
?>
admin/logout.php
<?php
session_start();
session_unset();
session_destroy();
header("Location: /admin/");
die();
?>
admin/home.php
<?php require("./layout/Header.php") ?>
<?php require("./layout/db.php") ?>
<div class="container mt-3">
<h3 class="mt-4" style="color:#2b74e2;display:flex;flex-direction:row;justify-
content:space-between">
<span>USERS :</span>
<span>
<button type="button" style="color:#fff;background-color:#2b74e2" class="btn" data-bs-
toggle="modal" data-bs-target="#myModal">
Add
</button>
</span>
</h3>
<div class="modal fade" id="myModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" style="color:#2b74e2">Add User</h4>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<!-- Modal body -->
<div class="modal-body">
<form onsubmit="document.getElementById('loader').style.display='block'"
action="/admin/action/user.php" method="post">
<div class="form-floating mb-3 ">
<input required type="text" class="form-control" name="name" placeholder="Hospital
Name">
<label>Name</label>
</div>
<div class="form-floating mb-3 mt-3">
<input required type="number" class="form-control" name="mobile"
placeholder="Mobile">
<label>Mobile</label>
</div>
<div class="form-floating mb-3 mt-3">
<input required type="email" class="form-control" name="email" placeholder="Email">
<label>Email</label>
</div>
<div class="form-floating mb-3 mt-3">
<input required type="password" class="form-control" name="pin" placeholder="PIN">
<label>PIN</label>
</div>
<div style="display:flex;justify-content:flex-end">
<button class="btn w-25" style="background-color:#2b74e2;color:#fff">Add</button>
</div>
</form>
</div>
</div>
</div>
</div>
<br>
<div class="table-responsive">
<table class="table table-striped table-bordered">
<thead style="text-align:center">
<tr>
<th>#</th>
<th>User Name</th>
<th>Mobile</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<?php
$result = $conn->query("SELECT * FROM user ORDER BY id DESC");
if($result->num_rows > 0){
$i=0;
while($row=$result->fetch_assoc()){
$i++;
?>
<tr>
<td style="text-align:center"><?php echo($i) ?></td>
<td><?php echo($row["name"]) ?></td>
<td><?php echo($row["mobile"]) ?></td>
<td><?php echo($row["email"]) ?></td>
</tr>
<?php
}
}else{
?>
<tr>
<td style="text-align:center" colspan="5">Nothing Found</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<br>
</div>
<script>
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
if(urlParams.get('err')){
document.write("<div id='err' style='position:fixed;bottom:30px; right:30px;background-
color:#FF0000;padding:10px;border-radius:10px;box-shadow:2px 2px 4px
#aaa;color:white;font-weight:600'>"+urlParams.get('err')+"</div>")
}
setTimeout(()=>{
document.getElementById("err").style.display="none"
}, 3000)
</script>
<script>
if(urlParams.get('msg')){
document.write("<div id='msg' style='position:fixed;bottom:30px;
right:30px;background-color:#4CAF50;padding:10px;border-radius:10px;box-
shadow:2px 2px 4px
#aaa;color:white;font-weight:600'>"+urlParams.get('msg')+"</div>")
}
setTimeout(()=>{
document.getElementById("msg").style.display="none"
}, 3000)
</script>
<?php require("./layout/Footer.php") ?>
action/
<?php
require("../layout/db.php");
function test_input($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
$name = test_input($_POST['name']);
$mobile = test_input($_POST['mobile']);
$email = test_input($_POST['email']);
$pin = test_input($_POST['pin']);
$sql = "INSERT INTO user (name , mobile , pin,email)
VALUES ('$name' ,'$mobile','$pin','$email')";
if ($conn->query($sql) === TRUE) {
header("Location: /admin/home.php?page=1&msg=User Added Successfully !");
die();
} else {
header("Location: /admin/home.php?page=1&err=Something went Wrong!");
die();
}
?>
layout/
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Admin</title>
<link rel="stylesheet" href="/static/css/bootstrap.min.css">
<link rel="stylesheet" href="/static/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="/static/js/moment.js"></script>
</head>
<body>
<!-- Navbar -->
<nav class="navbar navbar-expand-lg sticky-top" style="background:white;box-
shadow:1px 1px 2px #aaa;">
<div class="container">
<a class="navbar-brand" style="font-size:22px;font-weight:900;color:#2b74e2" href="">
Admin
</a>
<div class="collapse navbar-collapse" id="navbarTogglerDemo02">
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link <?php if($_SERVER['PHP_SELF'] == '/admin/home.php'){ echo
'active'; } ?>" aria-current="page" href="/admin/home.php">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" onclick="return confirm('Do you want to Logout?')"
href="/admin/logout.php">Logout</a>
</li>
</ul>
</div>
</div>
</nav>
<script src="/static/js/bootstrap.bundle.js"></script>
</body>
</html>
Db.php
<?php
$servername = "localhost";
$username = "root";
$password = "trysomething";
$db_name = "card";
$conn = new mysqli($servername, $username, $password,$db_name);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
?>
bank/
<br>
<?php
if(isset($_GET["mobile"])&&isset($_GET["pin"])){
$mobile = $_GET["mobile"];
$pin = $_GET["pin"];
$result = $conn->query("SELECT * FROM user WHERE mobile='$mobile' AND
pin='$pin'");
if($result->num_rows > 0){
while($row = $result->fetch_assoc()){
?>
<h2 style="text-align:center;color:#444;font-size:22px">User Name : <?php
echo($row["name"])?></h2>
<h2 style="text-align:center;color:#444;font-size:22px">User Email : <?php
echo($row["email"])?></h2>
<h2 style="text-align:center;color:#444;font-size:22px">User Mobile : <?php
echo($row["mobile"])?></h2>
<?php
}
}else{
?>
<h2 style="text-align:center;color:#aaa;font-size:22px">User Not Found</h2>
<?php
}
}else{
?>
<center>
<div class="container" style="width: 400px;">
<h4 class="modal-title" style="color:#2b74e2">Search User</h4>
<form action="/ration/home.php" method="get">
<div class="form-floating mb-3 mt-3">
<input required type="number" class="form-control" name="mobile" placeholder="User
Mobile No">
<label>User Mobile No</label>
</div>
<div class="form-floating mb-3 mt-3">
<input required type="password" class="form-control" name="pin" placeholder="User
PIN">
<label>User PIN</label>
</div>
<div>
<button class="btn w-50"
style="background-color:#2b74e2;color:#fff">Search</button>
</div>
</form>
</div>
</center>
<?php } ?>
<br>
</div>
<script>
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
if(urlParams.get('err')){
document.write("<div id='err' style='position:fixed;bottom:30px; right:30px;background-
color:#FF0000;padding:10px;border-radius:10px;box-shadow:2px 2px 4px
#aaa;color:white;font-weight:600'>"+urlParams.get('err')+"</div>")
}
setTimeout(()=>{
document.getElementById("err").style.display="none"
}, 3000)
</script>
<script>
if(urlParams.get('msg')){
document.write("<div id='msg' style='position:fixed;bottom:30px;
right:30px;background-color:#4CAF50;padding:10px;border-radius:10px;box-
shadow:2px 2px 4px
#aaa;color:white;font-weight:600'>"+urlParams.get('msg')+"</div>")
}
setTimeout(()=>{
document.getElementById("msg").style.display="none"
}, 3000)
</script>
Ration:
<?php require("./layout/Header.php") ?>
<?php require("./layout/db.php") ?>
admin/index.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Admin</title>
<link rel="shortcut icon" href="/static/images/favicon.png" type="image/x-icon">
<link rel="stylesheet" href="/static/css/bootstrap.css">
<script src='/static/js/bootstrap.js'></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
</head>
<body style="background-color: #2b74e2;background-position:center;background-repeat:
no-repeat;background-attachment: fixed;background-size: cover;">
<script>
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
if(urlParams.get('err')){
document.write("<div style='position:fixed;bottom:30px; right:30px;background-
color:tomato;padding:10px;border-radius:10px;box-shadow:2px 2px 4px
#aaa;color:white;font-weight:600'>"+urlParams.get('err')+"</div>")
}
setTimeout(()=>{
document.getElementById("err").style.display="none"
}, 5000)
</script>
<div data-aos="zoom-in" class="container" style="margin-top:120px;margin-
bottom:100px;width:500px;max-width:100vw;background-color: white;padding:30px
0px;border-radius: 30px;box-shadow: 2px 2px 8px #ccc;">
<h1 style="text-align: center;color:#2b74e2"><b>Admin</b></h1>
<br>
<form style="margin: 0 20%" method="POST" action="/admin/login.php">
<div class="form-outline mb-4">
<label class="form-label" for="form2Example1">Email :</label>
<input type="email" name="email" class="form-control" required/>
</div>
<div class="form-outline mb-4">
<label class="form-label" for="form2Example2">Password :</label>
<input type="password" name="password" class="form-control" required/>
</div>
<br>
<center>
<button type="submit" class="btn btn-block mb-4"
style="width:100%"><b>Login</b></button>
</center>
</form>
</div>
<style>
button{
background-color: #2b74e2 !important;
color:white !important;
height:45px !important;
font-size:22px !important;
}
.form-control:focus , .form-control:active{
box-shadow: none !important;
}
</style>
<script>
AOS.init();
</script>
</body>
</html>
admin/login.php
<?php
session_start();
if ($_POST["email"]=="admin@gmail.com") {
if ($_POST["password"]=="admin") {
$_SESSION["lock"] = "xiny9387tdpq##*&B98oyo8B@*O&^PB^B$";
header("Location: /admin/home.php");
die();
} else {
header("Location: /admin/?err=username or password is incorrect!");
die();
}
} else {
header("Location: /admin/?err=username or password is incorrect!");
die();
}
?>
admin/logout.php
<?php
session_start();
session_unset();
session_destroy();
header("Location: /admin/");
die();
?>
admin/home.php
<?php require("./layout/Header.php") ?>
<?php require("./layout/db.php") ?>
<div class="container mt-3">
<h3 class="mt-4" style="color:#2b74e2;display:flex;flex-direction:row;justify-
content:space-between">
<span>USERS :</span>
<span>
<button type="button" style="color:#fff;background-color:#2b74e2" class="btn" data-bs-
toggle="modal" data-bs-target="#myModal">
Add
</button>
</span>
</h3>
<div class="modal fade" id="myModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" style="color:#2b74e2">Add User</h4>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<!-- Modal body -->
<div class="modal-body">
<form onsubmit="document.getElementById('loader').style.display='block'"
action="/admin/action/user.php" method="post">
<div class="form-floating mb-3 ">
<input required type="text" class="form-control" name="name" placeholder="Hospital
Name">
<label>Name</label>
</div>
<div class="form-floating mb-3 mt-3">
<input required type="number" class="form-control" name="mobile"
placeholder="Mobile">
<label>Mobile</label>
</div>
<div class="form-floating mb-3 mt-3">
<input required type="email" class="form-control" name="email" placeholder="Email">
<label>Email</label>
</div>
<div class="form-floating mb-3 mt-3">
<input required type="password" class="form-control" name="pin" placeholder="PIN">
<label>PIN</label>
</div>
<div style="display:flex;justify-content:flex-end">
<button class="btn w-25" style="background-color:#2b74e2;color:#fff">Add</button>
</div>
</form>
</div>
</div>
</div>
</div>
<br>
<div class="table-responsive">
<table class="table table-striped table-bordered">
<thead style="text-align:center">
<tr>
<th>#</th>
<th>User Name</th>
<th>Mobile</th>
<th>Email</th>
</tr>
</thead>
<tbody>
<?php
$result = $conn->query("SELECT * FROM user ORDER BY id DESC");
if($result->num_rows > 0){
$i=0;
while($row=$result->fetch_assoc()){
$i++;
?>
<tr>
<td style="text-align:center"><?php echo($i) ?></td>
<td><?php echo($row["name"]) ?></td>
<td><?php echo($row["mobile"]) ?></td>
<td><?php echo($row["email"]) ?></td>
</tr>
<?php
}
}else{
?>
<tr>
<td style="text-align:center" colspan="5">Nothing Found</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<br>
</div>
<script>
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
if(urlParams.get('err')){
document.write("<div id='err' style='position:fixed;bottom:30px; right:30px;background-
color:#FF0000;padding:10px;border-radius:10px;box-shadow:2px 2px 4px
#aaa;color:white;font-weight:600'>"+urlParams.get('err')+"</div>")
}
setTimeout(()=>{
document.getElementById("err").style.display="none"
}, 3000)
</script>
<script>
if(urlParams.get('msg')){
document.write("<div id='msg' style='position:fixed;bottom:30px;
right:30px;background-color:#4CAF50;padding:10px;border-radius:10px;box-
shadow:2px 2px 4px
#aaa;color:white;font-weight:600'>"+urlParams.get('msg')+"</div>")
}
setTimeout(()=>{
document.getElementById("msg").style.display="none"
}, 3000)
</script>
<?php require("./layout/Footer.php") ?>
action/
<?php
require("../layout/db.php");
function test_input($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
$name = test_input($_POST['name']);
$mobile = test_input($_POST['mobile']);
$email = test_input($_POST['email']);
$pin = test_input($_POST['pin']);
<li class="nav-item">
<a class="nav-link" onclick="return confirm('Do you want to Logout?')"
href="/admin/logout.php">Logout</a>
</li>
</ul>
</div>
</div>
</nav>
<script src="/static/js/bootstrap.bundle.js"></script>
</body>
</html>
Db.php
<?php
$servername = "localhost";
$username = "root";
$password = "trysomething";
$db_name = "card";
$conn = new mysqli($servername, $username, $password,$db_name);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
?>
bank/
<?php require("./layout/Header.php") ?>
<?php require("./layout/db.php") ?>
<div class="container mt-3">
<h3 class="mt-4" style="color:#2b74e2;display:flex;flex-direction:row;justify-
content:space-between">
<span>USERS :</span>
</h3>
<br>
<?php
if(isset($_GET["mobile"])&&isset($_GET["pin"])){
$mobile = $_GET["mobile"];
$pin = $_GET["pin"];
$result = $conn->query("SELECT * FROM user WHERE mobile='$mobile' AND
pin='$pin'");
if($result->num_rows > 0){
while($row = $result->fetch_assoc()){
?>
<h2 style="text-align:center;color:#444;font-size:22px">User Name : <?php
echo($row["name"])?></h2>
<h2 style="text-align:center;color:#444;font-size:22px">User Email : <?php
echo($row["email"])?></h2>
<h2 style="text-align:center;color:#444;font-size:22px">User Mobile : <?php
echo($row["mobile"])?></h2>
<?php
}
}else{
?>
<h2 style="text-align:center;color:#aaa;font-size:22px">User Not Found</h2>
<?php
}
}else{
?>
<center>
<div class="container" style="width: 400px;">
<h4 class="modal-title" style="color:#2b74e2">Search User</h4>
<form action="/ration/home.php" method="get">
<div class="form-floating mb-3 mt-3">
<input required type="number" class="form-control" name="mobile" placeholder="User
Mobile No">
<label>User Mobile No</label>
</div>
<div class="form-floating mb-3 mt-3">
<input required type="password" class="form-control" name="pin" placeholder="User
PIN">
<label>User PIN</label>
</div>
<div>
<button class="btn w-50"
style="background-color:#2b74e2;color:#fff">Search</button>
</div>
</form>
</div>
</center>
<?php } ?>
<br>
</div>
<script>
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
if(urlParams.get('err')){
document.write("<div id='err' style='position:fixed;bottom:30px; right:30px;background-
color:#FF0000;padding:10px;border-radius:10px;box-shadow:2px 2px 4px
#aaa;color:white;font-weight:600'>"+urlParams.get('err')+"</div>")
}
setTimeout(()=>{
document.getElementById("err").style.display="none"
}, 3000)
</script>
<script>
if(urlParams.get('msg')){
document.write("<div id='msg' style='position:fixed;bottom:30px;
right:30px;background-color:#4CAF50;padding:10px;border-radius:10px;box-
shadow:2px 2px 4px
#aaa;color:white;font-weight:600'>"+urlParams.get('msg')+"</div>")
}
setTimeout(()=>{
document.getElementById("msg").style.display="none"
}, 3000)
</script>
<?php require("./layout/Footer.php") ?>
Ration:
<?php require("./layout/Header.php") ?>
<?php require("./layout/db.php") ?>
<script>
if(urlParams.get('msg')){
document.write("<div id='msg' style='position:fixed;bottom:30px;
right:30px;background-color:#4CAF50;padding:10px;border-radius:10px;box-
shadow:2px 2px 4px
#aaa;color:white;font-weight:600'>"+urlParams.get('msg')+"</div>")
}
setTimeout(()=>{
document.getElementById("msg").style.display="none"
}, 3000)
</script>
<?php require("./layout/Footer.php") ?>
CHAPTER 7
TESTING
SYSTEM TESTING
TYPES OF TESTS:
UNIT TESTING:
Unit testing involves the design of test cases that validate that the internal program
logic is functioning properly, and that program inputs produce valid outputs. All decision
branches and internal code flow should be validated. It is the testing of individual
software units of the application .it is done after the completion of an individual unit
before integration.
This is a structural testing, that relies on knowledge of its construction and is invasive.
Unit tests perform basic tests at component level and test a specific business process,
application, and/or system configuration. Unit tests ensure that each unique path of a
business process performs accurately to the documented specifications and contains
clearly defined inputs and expected results.
INTEGRATION TESTING:
FUNCTIONAL TEST:
Functional tests provide systematic demonstrations that functions tested are available
as specified by the business and technical requirements, system documentation, and user
manuals.
PERFORMANCE TESTING:
System testing ensures that the entire integrated software system meets requirements.
It tests a configuration to ensure known and predictable results. An example of system
testing is the configuration oriented system integration test. System testing is based on
process descriptions and flows, emphasizing pre-driven process links and integration
points.
Black Box Testing is testing the software without any knowledge of the inner workings,
structure or language of the module being tested. Black box tests, as most other kinds of
tests, must be written from a definitive source document, such as specification or
requirements document, such as specification or requirements document. It is a testing in
which the software under test is treated, as a black box .you cannot “see” into it. The test
provides inputs and responds to outputs without considering how the software works.
ACCEPTANCE TESTING:
User Acceptance Testing is a critical phase of any project and requires significant
participation by the end user. It also ensures that the system meets the functional
requirements.
Test Results: All the test cases mentioned above passed successfully. No defects
encountered
CHAPTER 8
CONCLUSION
Smart card will be the solution for all the problems related to citizen identity and
verification. Manpower, resources, money, time required for citizen identity in different
Government/Private offices/organizations will be exponentially reduced. Illegal
immigration/terrorist activities will be reduced because of the smart card project
implementation.
CHAPTER 9
FUTURE ENHANCEMENT
In future the work of instant messaging and further module development can be
done which will make our project fully automated and also more reliable software for the
event should be provided.
CHAPTER 10
REFERENCES
[1]. Apraising the smart card technology adoption; Case of application in University
Environment, Science Direct,2017 by Hamed Taherdoost.
[2]. NATIONAL IDENTITY CARDS: A STEP TOWARDS “BETTER”
GOVERNANCE?? by Ketan Mukhija and Yugank Goyal.
[3]. Creating Added Value for Smart Card Applications: The University as a Case Study
by Jen Wel Chen, Ching-Cha Hsieh and Hsiao-Chi Wu.
[4]. Application of Network Smart Cards to Citizens Identification Systems, September
2008, by Joaquin Torres, Mildrey Carbonell, Jesus Tellez, and Jose M. Sierra.
[5]. Implementation of Smart Card for Vehicular Information, June 2019 by Kunal Gupta,
Malya Ranjan Tripathy, Sushil Kumar.
[6]. Effective use of smart cards by Md. Kamrul Islam.
[7]. Performance Analysis of Smart Card-Based Fingerprint Recognition For Secure User
Authentication by Youn-Hee Gil, Yongwha Chung, Dosung Ahn, Jihyun Moon and Hakil
Kim.
[8]. Smart Card Security; Technology and Adoption by Hamed Taherdoost, Shamsul
Sahibuddin and Neda Jalaliyoon.
[9]. Smart Card Technology: Past, Present, and Future, 2004 by L. A Mohammed, Abdul
Rahman Ramli, V. Prakash, and Mohamed B. Daud.
[10].National Identification Issues and the Solution using Smart Card Technology by
Agwah C. Benjamin , Agbaraji C. Emmanuel (Corresponding Author), Ezetoha Franklin