Вы находитесь на странице: 1из 75

INTRODUCTION

1
CHAPTER 1
INTRODUCTION

1.1 Embedded System

An embedded system is a combination of computer hardware and software, fixed in


capability or programmable, designed for a specific function or functions within a larger
system. Industrial machines, agricultural and process industry devices, automobiles, medical
equipment, cameras, household appliances, airplanes, vending machines and toys, as well as
mobile devices, are possible locations for an embedded system.

1.1.1 Embedded System hardware

Embedded systems are a combination of hardware and software where software


is usually known as firmware that is embedded into the hardware. One of its most important
characteristics of these systems is, it gives the o/p within the time limits. Embedded systems
support to make the work more perfect and convenient. So, we frequently use embedded
systems in simple and complex devices too.

Fig 1.1 Block Diagram of embedded system

2
1.1.2 RFID

Radio Frequency Identification (RFID) is the use of radio waves to read and capture
information stored on a tag attached to an object. A tag can be read from up to several feet
away and does not need to be within direct line-of-sight of the reader to be tracked. A RFID
system is made up of two parts: a tag or label and a reader. RFID tags or labels are embedded
with a transmitter and a receiver. The RFID component on the tags has two parts: a microchip
that stores and processes information, and an antenna to receive and transmit a signal. The tag
contains the specific serial number for one specific object. To read the information encoded
on a tag, a two-way radio transmitter-receiver called an interrogator or reader emits a signal
to the tag using an antenna. The tag responds with the information written in its memory
bank. The interrogator will then transmit the read results to an RFID computer program.

1.1.3. RFID Reader

The RFID reader sends a pulse of radio energy to the tag and listens for the tag’s
response. The tag detects this energy and sends back a response that contains the tag’s serial
number and possibly other information as well. In simple RFID systems, the reader’s pulse of
energy functioned as an on-off switch; in more sophisticated systems, the reader’s RF signal
can contain commands to the tag, instructions to read or write memory that the tag contains
and even passwords. Historically, RFID reader were designed to read only a king of tag, but
so-called multimode readers that can read many kinds of tags are becoming increasingly
popular.

RFID readers are usually on, continually transmitting radio energy and awaiting any
tags that enter their field of operation. However, for some applications, this is unnecessary
and could be undesirable in battery-powered devices that need to conserve energy. Thus, it is
possible to configure an RFID reader so that it sends the radio pulse only in response to an
external event. For example, most electronic toll collection systems have the reader
constantly powered up so that every passing car will be recorded. On the other hand, RFID
scanners used in veterinarian’s offices are frequently equipped with triggers and power up the
only when the trigger is pulled.

3
Like the tag, themselves, RFID readers come in many sizes. The largest readers
might consist of a desktop personal computer with a special card through shielded cable.
Such a reader would typically have a network connection as well so that it could report tags
that it reads to other computers. The smallest readers are the size of a postage stamp and are
designed to be embedded in mobile telephones. Most systems available on the world market
at present operate at one of the following frequencies or frequency ranges: below 125 kHz,
13.56 MHz, UHF, 2.45GHz and 5.8GHz. The operating and control characteristics are
different for each of these frequencies, and therefore each of them is more appropriate for
certain types of application or certain countries.

1.2 Examples of embedded Systems

Examples of embedded systems include various products such as washing machine,


microwave ovens, cameras, printers and automobiles. They use microprocessors and
microcontrollers as well as specially designed processors such as digital signal processors
(DSP).There are three basic components of an embedded system. They are the embedded
system hardware, embedded system software and the operating system.

1.3 Introduction to Hostel Autonomous Management System

 The proposed system for Hostel Autonomous Management System is based on


embedded systems and web application.
 Students will be provided with RFID card which will be used to identify them
individually.
 RFID card will have 12 digits number and it will be read by RFID Reader.
 After RFID reader reads the RFID Card, the corresponding web page of the student
will be displayed on the screen
 If the students buy anything in the store then that will be updated in the database by
the time they buy it.

4
 Whenever students buy something in the store, the total amount in the their account
will be reduced accordingly.
 Students can view their account balance and the things they bought last month, even
two months before details through web application at anytime.
 The admin (store owner) can be able to update their new products in the application
by log in to their account which will not be permitted for access to students.

1.4 Objective of the Project

 In an existing system, they are updating information of buying details manually in the
notebook.
 As they update information in the notebook, there will be chances of losing the
information in the future.
 It means, the data of students who bought things will be lost. this will create a big
issue when it happens.
 To overcome the situation of loosing data and the manual work of store owner came
up with this proposed system.
 It will reduce their time too.

1.5 System Inputs and Outputs

The RFID number will be the input to the system which then causes the system to
open the corresponding web pages of a student in the system monitor. So the Output is the
results displayed in the web application.

5
LITERATURE SURVEY

6
CHAPTER 2
LITERATURE SURVEY

2.1 RFID Based College Bus Management System (2014)


Author: M. Malleswari, M.Koteswara Rao, K.V.Supriya, K.Pavan Krishna, B.Ravi Teja.

The objective of this work is to implement an intelligent student bus monitoring


system based on current challenges and problems that is determining the person who is
getting into the bus, the time of getting into the bus and the place where he is getting into the
bus provided for student bus management system.
Advantages: The system gives the information of the person who is getting into bus, place
and time. It also gives the person who is getting down the bus, time and where he is getting
down. So that we can know the number of persons remaining in the bus at particular instant
of time and can also know that who is getting into bus

2.2 RFID based attendance system (2012)


Author: Murizah Kassim, Hasbullah Mazlan, Norliza Zaini, Muhammad Khidhir Salleh
Faculty of Electrical Engineering Universiti Teknologi MARA.

In this RFID based Attendance System project, we will explain you how can we count
attendance automatically by using RFID cards. RFID Technology is commonly used in
schools, colleges, office and stations for various purposes to automatically keep a track of
people. Here we will count the attendance of an authorized person by using RFID card.
Advantage: helps to take attendance for any organization

2.3 RFID based voting machine (2011)


Author: Shaik Mazhar Hussain , Chandrashekar Ramaiah , Rolito Asuncion , Shaikh
Azeemuddin Nizamuddin , Rakesh Veerabhadrappa.

These systems use RFID communication system. RFID is used in shopping malls to
stop theft as the products are tagged with RFID chip and when a person leaves the building

7
with the RFID chip an alarm is raised automatically.
The RFID tag is designed as small as part of sand. The RFID authentication systems
are easy to design and are cheap in cost. Some schools and colleges nowadays use RFID
based attendance systems. In this project we are going to design a voting machine which only
counts authenticated votes. This is done by using RFID tag.
Advantage: helps to authenticate votes.

2.4 RFID based toll collection system (2010)


Author: K.Balamurugan, Asst. Prof. (Selection Grade) Dr.R.Mahalakshmi, Professor
Dr.S.Elangovan, Associate Professor, Dept. of EEE Janson Institute of Technology
Coimbatore R.Pavithra, Student Member, IEEE Sri Ramakrishna Engg. College Coimbatore.

In this project we are going to design a RFID based toll collection system for security
purposes. So this system open gates and allow people only with the authorized RFID tags.

The authorized tags holder ID’s are programmed in to the ATMEGA Microcontroller
and only those holders are allowed to leave or enter the premises.
Advantage: It helps to authorize the person who has RFID tag and are allowed to leave or
enter the toll gate.

2.5 Door locking system using RFID (2010)


Author: Md. Kishwar Shafin , Kazi Lutful Kabir , Nazmul Hasan , Israt Jahan Mouri Samina
Tasnia Islam , Lazima Ansari , Md. Mahboob Karim and Md. Afzal Hossain

RFID Door Lock Mechanism in some Hotels and other places, where you don’t need
a key to unlock the room. You are given a card and you just need to put it in front of a RFID
Reader box, and the lock gets unlocked with a Beep and a Blink of LED. This RFID Door
Lock can be made easily at your home and you can install it in any door. These Door lock is
just electrically operating door lock which gets open when you apply some voltage to it. Here
in this project we are using Arduino and relay to trigger the Electric Door Lock and RFID to
authenticate, so your RFID tag will act as a key.

8
If you place wrong RFID card near RFID reader a buzzer will beep to alert about
wrong card.
Advantage: RFID tag helps to security purpose and also for authentication process.

2.6 RFID-Cloud Smart Cart System (2009)


Author: Yerlan Berdaliyev, Alex Pappachen James Department of Electrical and Electronic
Engineering School of Engineering, Nazarbayev University Astana, Kazakhstan

The main purpose of this work is in reducing the queuing delays in major
supermarkets or other shopping centers by means of an Electronic Smart Cart System which
will introduce an intellectual approach to billing process through RFID technology. Smart
Cart System is a cooperative performance of three separate systems: a website developed for
the shopping market, electronic smart cart device and anti-theft RFID gates. This project
focuses on developing the electronic smart cart device itself.
Advantage: reducing the queuing delays in major supermarkets.

2.7 RFID based security and access control system using arduino with GSM module
(2009)
Author: Grewal Kaushal, Rishabh Mishra, Neelam Chaurasiya, Paramdeep Singh

There has been rising demand for secure system that must be dependable and quick
respond for the industries and company. This project is based upon security access and
control system using RFID and Arduino with GSM module. Security access system is very
convenient to use at home, office and commercial buildings.
Advantage: It is helps to provide secure and access control to the system.

9
SYSTEM REQUIREMENTS

10
CHAPTER 3
SYSTEM REQUIREMENTS

The hardware and software for the system are selected by considering several factors
and the recommended hardware and software specifications are as follows:

3.1 Hardware Requirements

 Processor : Intel Pentium and above


 System Type : 32/64 bit
 Free Disk Space : 1 GB
 Key Board : Standard Windows Keyboard
 Memory (RAM) : 1GB and above
 Arduino : Arduino Uno
 Display : Web Application
 RFID cards
 RFID reader : EM-18 Module
 Connecting Wires

3.2 Software Requirements

 Operating System : Windows OS, Linux OS, Mac OS


 Programming Language : Arduino language.
 Markup language : HTML,CSS
 Scripting language : PHP, Javascript, JQuery
 Software : Arduino IDE and Tera term, XAMPP
 Compiler : Arduino

11
SYSTEM DESIGN

12
CHAPTER 4
SYSTEM DESIGN

4.1System Architecture

Matching RFID Display the Student can


RFID Reader Arduino UNO number with student purchase
Database details their Item’s

RFID Card
If not
matched

Add new data to Database

Fig 4.1 System Design

System Architecture is the conceptual model that defines the structure, behavior, and
more views of a system. An architecture description is a formal description and
representation of a system, organized in a way that supports the reasoning about the
structures and behaviors of the system.

13
4.2 Components

RFID Reader:

A radio frequency identification reader is a device used to gather information from an


RFID tag. It is used to identify individual objects. Radio waves are used to transfer the data
from the tag to the reader.

Fig 4.2.1 RFID Reader Module

Pin diagram of RFID reader:

Fig 4.2.2 Pin diagram of RFID Reader Module

14
RFID card/tags:

There are three types of tags in RFID card. They are described below,

Passive Tags:

 This tag allows wave penetration that eliminates line of sight transmission.
 Which use Radio Frequency (RF) electromagnetic energy.
 It enables readers to detect and identify objects.
 These are amenable to large-scale applications such as GPS and sensor technology.
 It can monitor and record sensor data: time, temperature, pressure, etc., but only
active tags are continuously monitoring and recording.
 It bears data that can be manipulated or static: read-write, read-only, and WORM.
 It enables “simultaneous reads” through anti-collision algorithms of entire fields since
radio frequency waves penetrate most objects.
 It can carry regulations as to control of tag ownership or origination.
 It bears data that can be manipulated or static: read-write 128 KB, read-only, and
WORM.

Fig 4.2.3 RFID Passive Tag

Active Tags:

 These are usually larger than passive tags.

 It has energy that comes from their own batteries to send strong radio frequency
waves to readers.

 It recognizes low signal strength from reader because of their on-board battery and it
can enable readers to detect objects at distances up to 750 feet away.

15
 It enables tags to always be “on” to receive radio frequency waves from the reader.

 It has high read reliability and facilitates less reliance on a centralized database
because of more data storage and operates at set intervals from 433 MHz to 5.6 GHz
for a range of up to 100 meters.

 It can continuously monitor and record sensor data: time, temperature, pressure, etc. at
high speeds and It is expensive.

 It can initiate conditional transmissions and readers are, typically, fixed mounted.

 It needs maintenance such as battery replacement and which are usually attached to
expensive items.

Working principle of RFID reader and RFID card:

The reader transmits radio frequency when powered ON. When the tag is placed near
the reader, the RFID tag will receive the radio frequency via the antenna inside tag. The radio
frequency received will be converted into electrical power that is enough for the tag to
transmit the data back to the RFID reader. Further, the reader will transmit the tag ID to the
external device by serial communication. This module read the RFID passive tag and sends
the tag ID to the Arduino microcontroller.

Fig 4.2.4: working of Em-18 module

16
Arduino Uno:

The Arduino Uno is a microcontroller board based on the ATmega328. It has


14 digital input/output, 6 analog inputs, a 16 MHz crystal oscillator, a USB connection, a
power jack, an ICSP header, and a reset button. It contains everything needed to support the
microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-
DC adapter or battery to get started. The Uno differs from all preceding boards in that it does
not use the FTDI USB-to-serial driver chip. Instead, it features the Atmega8U2 programmed
as a USB-to-serial converter.

Fig 4.2.5 Arduino Uno

17
Summary of Arduino Uno:

Microcontroller ATmega328

Operating Voltage 5V
Input Voltage (recommended) 7-12V
Input Voltage (limits) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB of which 0.5 KB used by
Bootloader
SRAM 2 KB
EEPROM 1 KB
Clock Speed 16 MHz

18
IMPLEMENTATION

19
CHAPTER 5
IMPLEMENTATION

5.1 RFID Module


The RFID card number is detected by EM-18 module sensor with the help of RFID tag library
provided within the Arduino IDE.

5.1.1 Pin Configuration:

EM-18 module Arduino Uno


TX -> RX
GND -> GND
+5V -> 5V

5.1.2 Input:
RFID Card signal.

5.1.3 Output:
RFID Card Number.

Student's unique identificaiton

Students will be provided with RFID card which will be used to identify them
individually. RFID card will have 12 digits number and it will be read by RFID Reader. After
RFID reader reads the RFID Card, the corresponding web page of the student will be
displayed on the screen. If the students buy anything in the store then that will be updated in
the database by the time they buy it. Whenever students buy something in the store, the total
amount in the account will be reduced accordingly.

20
Web application

This will be a user interface for all the students and the store owner(the
admin).Students can view their account balance and the things they bought last month, even
two months before details through web application at any time. The admin (store owner) can
be able to update. Their new products in the application by log in to their account which will
not be permitted for access to students.

Connecting web application through college LAN

All the students and the admin will be provided with authentication to access the LAN.
They are only able to connect the application through this LAN.

Purpose of connecting through LAN

Purpose of connecting through LAN is, this application must be used by the particular
college students. Others are not allowed here. Especially, the students who are all studying in
other colleges should not be allowed to use this application.

Security provided to access

Each and every student are given with username or rollno as login id and passwords so
that they can only be able to connect their devices to the college LAN. If any student wants to
their login password, they are allowed to do it.

Modules in web application

The admins and Students would be provided with different modules to be used by
them. Because the admin (store owner) can be able to update their new products in the
application by log in to their account. They will only be provided with these kinds of
modules. Whereas the students have to view their account balance and the things they bought
last month, even two months before details at any time. So students will be provided with
these kinds of modules.

21
Admin module

 View Student details


 Add student details
 Manage student details
 Add new products
 Update rate of product
 settings

View student details

The admin is able to see all students buying details and their history. That’s what all
are the thing they had bought for the past two or more months.

Add student details

If any new students come to buy something in the store, then it should be added with
all students information. So that’s the purpose of this module.

Manage student details

If any details of student want to change, then this module will help for it. This change
will affect the database of student details.

Add new products

If any new products arrive to the store, it must be updated so that students will know
about it. And, they will try to buy it in the future.

Update rate of product

If the rate of a product increases, it will be updated accordingly.

22
Settings

If admin wants to change their details, this module will help them to do it. It may be
their password and username of the account.

Student module

 View details
 View store's product
 Settings

View details

They are able to see their buying details and their history. That’s what are all the
thing they had bought for the past two or more months and can also see how much amount is
available in your account.

View store's product

If the students want to buy something in the store, they must know what are all the
things that available in the store so that they will choose it from the application and buy it.

Settings
If student wants to change their details, this module will help them to do it. It may be
their password and username of the account.

Analyzing product dataset

The store’s product datasets and in that datasets, frequently bought things will be
taken into the consideration for the analysis. Whenever the students buy something in the
store, the count of the corresponding product will be incremented. With that count, the
percentage sale of particular product will be calculated. The percentage will be shown in plot.

23
If the percentage sale is less, then store owner don’t have to buy that particular
product more than certain count in the next month. This will reduce the total amount with
which they buy something to the store.

24
RESULTS AND DISCUSSION

25
CHAPTER 6
RESULTS AND DISCUSSION

Admin module:
In the admin module, admin can login using their username and password. Then they
can enter into the home page of admin module. Where admin can view the options such as
student detail, purchase item, add student details, manage student details, contact us and
about us, change password and logout. There by, admin can view the student details and
manage their details by using this web application and also admin can change username and
password by change password option in the topmost right corner of the web application.

Home Page:

Fig 6.1: Home page

26
Add student detail:

Fig 6.2: Add student detail

Manage student details:

Fig 6.3: Manage student details

27
About us:

Fig 6.4: About us

Contact us:

Fig 6.5: Contact us

28
Change Password:

Fig 6.6: Change Password

Student module
They are able to see their buying details and their history. That’s what are all the
thing they had bought for the past two or more months and can also see how much amount is
available in your account. If the students want to buy something in the store, they must know
what are all the things that available in the store so that they will choose it from the
application and buy it. If student wants to change their details, this module will help them to
do it. It may be their password and username of the account.

Student Detail:

Fig 6.7: Student Detail

29
6.8 Coding and Data analysis:

Index.php:

<?php

session_start();

include('includes/config.php');

if(isset($_POST['login']))

$uname=$_POST['username'];

$password=$_POST['password'];

$sql =mysqli_query($con,"SELECT AdminUserName,AdminEmailId,AdminPassword


FROM tbladmin WHERE (AdminUserName='$uname' || AdminEmailId='$uname')");

$num=mysqli_fetch_array($sql);

if($num>0)

$hashpassword=$num['AdminPassword'];

if (password_verify($password, $hashpassword)) {

$_SESSION['login']=$_POST['username'];

echo "<script type='text/javascript'> document.location = 'dashboard.php'; </script>";

} else {

echo "<script>alert('Wrong Password');</script>";

30
}

else{

echo "<script>alert('User not registered with us');</script>";

?>

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<meta name="description" content="Stationary Portal.">

<meta name="author" content="Marivignesh">

<title>Stationary Portal | Admin Panel</title>

<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />

<link href="assets/css/core.css" rel="stylesheet" type="text/css" />

<link href="assets/css/components.css" rel="stylesheet" type="text/css" />

<link href="assets/css/icons.css" rel="stylesheet" type="text/css" />

<link href="assets/css/pages.css" rel="stylesheet" type="text/css" />

<link href="assets/css/menu.css" rel="stylesheet" type="text/css" />

<link href="assets/css/responsive.css" rel="stylesheet" type="text/css" />

31
<script src="assets/js/modernizr.min.js"></script>

</head>

<body class="bg-transparent">

<section>

<h4 align="center">STATIONARY PORTAL</h4>

<div class="container-alt">

<div class="row">

<div class="col-sm-12">

<div class="wrapper-page">

<div class="m-t-40 account-pages">

<div class="text-center account-logo-box">

</div>

<div class="account-content">

<form class="form-horizontal" method="post">

<div class="form-group ">

<div class="col-xs-12">

<input class="form-control" type="text" required="" name="username"


placeholder="Username or email" autocomplete="off">

</div>

</div>

<div class="form-group">

<div class="col-xs-12">

32
<input class="form-control" type="password" name="password" required=""
placeholder="Password" autocomplete="off">

</div>

</div>

<div class="form-group account-btn text-center m-t-10">

<div class="col-xs-12">

<button class="btn w-md btn-bordered btn-danger waves-effect


waves-light" type="submit" name="login">Log In</button>

</div> </div>

</form> <div class="clearfix"></div>

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

</section>

<script>

var resizefunc = [];

</script>

<script src="assets/js/jquery.min.js"></script>

<script src="assets/js/bootstrap.min.js"></script>

<script src="assets/js/detect.js"></script>

<script src="assets/js/fastclick.js"></script>

<script src="assets/js/jquery.blockUI.js"></script>

<script src="assets/js/waves.js"></script>

<script src="assets/js/jquery.slimscroll.js"></script>

<script src="assets/js/jquery.scrollTo.min.js"></script>

33
<script src="assets/js/jquery.core.js"></script>

<script src="assets/js/jquery.app.js"></script>

</body>

</html>

topheader.php:

<div class="topbar">

<div class="topbar-left">

<H4><span>STATIONARY PORTAL</span></H4>

</div>

<div class="navbar navbar-default" role="navigation">

<div class="container">

<ul class="nav navbar-nav navbar-left">

<li>

<button class="button-menu-mobile open-left waves-effect">

<i class="mdi mdi-menu"></i>

</button>

</li>

</ul>

<ul class="nav navbar-nav navbar-right">

<li class="dropdown user-box">

34
<a href="" class="dropdown-toggle waves-effect user-link" data-toggle="dropdown" aria-
expanded="true">

<img src="assets/images/users/avatar-1.jpg" alt="user-img" class="img-circle user-img">

</a>

<ul class="dropdown-menu dropdown-menu-right arrow-dropdown-menu arrow-menu-right


user-list notify-list">

<li>

<h5>Hi, Admin</h5>

</li>

<li><a href="change-password.php"><i class="ti-settings m-r-5"></i> Change


Password</a></li>

<li><a href="logout.php"><i class="ti-power-off m-r-5"></i> Logout</a></li>

</ul>

</li>

</ul>

</div>

</div>

</div>

Leftsidebar.php:

<div class="left side-menu">

<div class="sidebar-inner slimscrollleft">

<div id="sidebar-menu">

<ul>

35
<li class="has_sub">

<a href="dashboard.php" class="waves-effect"><i class="mdi mdi-view-


dashboard"></i> <span> Home </span> </a>

</li>

<li class="has_sub">

<a href="javascript:void(0);" class="waves-effect">

<i class="mdi mdi-format-list-bulleted"></i>

<span>student Detail </span>

<span class="menu-arrow"></span></a>

<ul class="list-unstyled">

<li><a href="add-category.php">Student Detail</a></li>

</ul>

</li>

<li class="has_sub">

<a href="javascript:void(0);" class="waves-effect"><i class="mdi mdi-


format-list-bulleted"></i> <span>Purchase Item </span> <span class="menu-
arrow"></span></a>

<ul class="list-unstyled">

<li><a href="add-post.php">purchase</a></li>

<li><a href="manage-posts.php">History of Recent purchase</a></li>

</ul>

</li>

<li class="has_sub">

36
<a href="javascript:void(0);" class="waves-effect"><i class="mdi mdi-
format-list-bulleted"></i> <span>Student </span> <span class="menu-arrow"></span></a>

<ul class="list-unstyled">

<li><a href="add-post.php">Add Student Detail</a></li>

<li><a href="manage-posts.php">Manage Student Detail</a></li>

</ul>

</li>

<li class="has_sub">

<a href="javascript:void(0);" class="waves-effect"><i class="mdi mdi-


format-list-bulleted"></i> <span> Pages </span> <span class="menu-arrow"></span></a>

<ul class="list-unstyled">

<li><a href="aboutus.php">About us</a></li>

<li><a href="contactus.php">Contact us</a></li>

</ul>

</ul>

</div>

<div class="clearfix"></div>

<div class="help-box">

<h5 class="text-muted m-t-0">For Help ?</h5>

<p class=""><span class="text-custom">Email:</span> <br/>


marivigneshcse@gmail.com</p>

</div>

</div>

</div>

37
Config.php:

<?php

define('DB_SERVER','localhost');

define('DB_USER','root');

define('DB_PASS' ,'');

define('DB_NAME','newsportal');

$con = mysqli_connect(DB_SERVER,DB_USER,DB_PASS,DB_NAME);

// Check connection

if (mysqli_connect_errno())

echo "Failed to connect to MySQL: " . mysqli_connect_error();

?>

Fooder.php:

<footer class="footer text-right">

2019 © Developed by marivignesh.

</footer>

dashboard.php:

<?php

session_start();

include('includes/config.php');

error_reporting(0);

if(strlen($_SESSION['login'])==0)

38
{

header('location:index.php');

else{

?>

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<meta name="description" content="A fully featured admin theme which can be used to
build CRM, CMS, etc.">

<meta name="author" content="Coderthemes">

<title>Stationary Portal | Home</title>

<link rel="stylesheet" href="../plugins/morris/morris.css">

<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />

<link href="assets/css/core.css" rel="stylesheet" type="text/css" />

<link href="assets/css/components.css" rel="stylesheet" type="text/css" />

<link href="assets/css/icons.css" rel="stylesheet" type="text/css" />

<link href="assets/css/pages.css" rel="stylesheet" type="text/css" />

<link href="assets/css/menu.css" rel="stylesheet" type="text/css" />

<link href="assets/css/responsive.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" href="../plugins/switchery/switchery.min.css">

39
<script src="assets/js/modernizr.min.js"></script>

</head>

<body class="fixed-left">

<div id="wrapper">

<div class="topbar">

<div class="topbar-left">

<a href="index.html" class="logo"><span>NP<span>Admin</span></span><i


class="mdi mdi-layers"></i></a>

</div>

<?php include('includes/topheader.php');?>

</div>

<?php include('includes/leftsidebar.php');?>

<div class="content-page">

<div class="content">

<div class="container">

<div class="row">

<div class="col-xs-12">

<div class="page-title-box">

<h4 class="page-title">Home</h4>

<ol class="breadcrumb p-0 m-0">

<li> <p>Stationary Portal/ </p> </li>

<li> <p> Admin</p> </li>

<li class="active">Home </li>

40
</ol> <div class="clearfix">

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

<h4 align="center"> Welcome you the CIT Stationary Portal</h4></div>

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

<script>

var resizefunc = [];

</script>

<script src="assets/js/jquery.min.js"></script>

<script src="assets/js/bootstrap.min.js"></script>

<script src="assets/js/detect.js"></script>

<script src="assets/js/fastclick.js"></script>

<script src="assets/js/jquery.blockUI.js"></script>

<script src="assets/js/waves.js"></script>

<script src="assets/js/jquery.slimscroll.js"></script>

<script src="assets/js/jquery.scrollTo.min.js"></script>

<script src="../plugins/switchery/switchery.min.js"></script>

<script src="../plugins/waypoints/jquery.waypoints.min.js"></script>

<script src="../plugins/counterup/jquery.counterup.min.js"></script>

<script src="../plugins/morris/morris.min.js"></script>

<script src="../plugins/raphael/raphael-min.js"></script>

<script src="assets/pages/jquery.dashboard.js"></script>

<script src="assets/js/jquery.core.js"></script>

<script src="assets/js/jquery.app.js"></script>

41
</body>

</html>

<?php } ?>

Add-category.php:

<?php

session_start();

include('includes/config.php');

error_reporting(0);

if(strlen($_SESSION['login'])==0)

header('location:index.php');

else{

if(isset($_POST['submit']))

$category=$_POST['category'];

$description=$_POST['description'];

$status=1;

$query=mysqli_query($con,"insert into tblcategory(CategoryName,Description,Is_Active)


values('$category','$description','$status')");

if($query)

42
{

$msg="Category created ";

else{

$error="Something went wrong . Please try again.";

?>

<!DOCTYPE html>

<html lang="en">

<head>

<title>Stationary portal | Student Detail</title>

<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />

<link href="assets/css/core.css" rel="stylesheet" type="text/css" />

<link href="assets/css/components.css" rel="stylesheet" type="text/css" />

<link href="assets/css/icons.css" rel="stylesheet" type="text/css" />

<link href="assets/css/pages.css" rel="stylesheet" type="text/css" />

<link href="assets/css/menu.css" rel="stylesheet" type="text/css" />

<link href="assets/css/responsive.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" href="../plugins/switchery/switchery.min.css">

<script src="assets/js/modernizr.min.js"></script>

<scriptsrc="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>

43
<script>

$(document).ready(function(){

$('#item').keyup(function(){

var query = $(this).val();

if(query != '')

$.ajax({

url:"autocomplete.php",

method:"POST",

data:{query:query},

success:function(data)

$('#itemList').fadeIn();

$('#itemList').html(data);

});

});

$(document).on('click', 'li', function(){

$('#item').val($(this).text());

$('#itemList').fadeOut();

});

44
});

</script>

</head>

<body class="fixed-left">

<div id="wrapper">

<?php include('includes/topheader.php');?>

<?php include('includes/leftsidebar.php');?>

<div class="content-page">

<div class="content">

<div class="container">

<div class="row">

<div class="col-xs-12">

<div class="page-title-box">

<h4 class="page-title">Student Detail</h4>

<ol class="breadcrumb p-0 m-0">

<li><a href="#">Admin</a>

</li><li class="active">student detail</li>

</ol>

<div class="clearfix"></div>

</div>

</div>

</div>

45
<div class="row">

<div class="col-sm-12">

<div class="card-box">

<h4 class="m-t-0 header-title"><b>Student Detail </b></h4>

<hr />

<div class="row">

<div class="col-sm-6">

<?php if($msg){ ?>

<div class="alert alert-success" role="alert">

<strong>Well done!</strong> <?php echo htmlentities($msg);?>

</div>

<?php } ?>

<?php if($error){ ?>

<div class="alert alert-danger" role="alert">

<strong>Oh snap!</strong> <?php echo htmlentities($error);?></div>

<?php } ?>

</div>

</div>

<div class="row">

<div class="col-md-6">
<form class="form-horizontal" name="category" method="post">

<div class="form-group"

<p align="center" >

46
<font align face="times new roman" size=4><br>

<?php

include('includes/config.php');

$result = mysqli_query($con,"SELECT * FROM student");

while($row = mysqli_fetch_array($result))

echo $row['name']; echo"</br>";

echo $row['rollno']; echo"<br>";

echo $row['dept']; echo"<br>";

echo $row['phno']; echo"<br>";

mysqli_close($con);

?>

</p>

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

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

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

</div>

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

</div></div><script>

var resizefunc = [];

</script>

<script src="assets/js/jquery.min.js"></script>

47
<script src="assets/js/bootstrap.min.js"></script>

<script src="assets/js/detect.js"></script>

<script src="assets/js/fastclick.js"></script>

<script src="assets/js/jquery.blockUI.js"></script>

<script src="assets/js/waves.js"></script>

<script src="assets/js/jquery.slimscroll.js"></script>

<script src="assets/js/jquery.scrollTo.min.js"></script>

<script src="../plugins/switchery/switchery.min.js"></script>

<script src="assets/js/jquery.core.js"></script>

<script src="assets/js/jquery.app.js"></script>

</body>

</html>

<?php } ?>

Add-post.php:

<?php

session_start();

include('includes/config.php');

error_reporting(0);

if(strlen($_SESSION['login'])==0)

header('location:index.php');

48
else{

if(isset($_POST['submit']))

$posttitle=$_POST['posttitle'];

$catid=$_POST['category'];

$subcatid=$_POST['subcategory'];

$postdetails=$_POST['postdescription'];

$arr = explode(" ",$posttitle);

$url=implode("-",$arr);

$status=1;

$query=mysqli_query($con,"insertintotblposts(PostTitle,CategoryId,SubCategoryId,PostDeta
ils,PostUrl,Is_Active,PostImage)values('$posttitle','$catid','$subcatid','$postdetails','$url','$stat
us','$imgnewfile')");

if($query)

$msg="Post successfully added ";

else{

$error="Something went wrong . Please try again.";

?>

<!DOCTYPE html>

49
<html lang="en">

<head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<meta name="description" content="A fully featured admin theme which can be used to
build CRM, CMS, etc.">

<meta name="author" content="Coderthemes">

<link rel="shortcut icon" href="assets/images/favicon.ico">

<title>Stationary portal | Add Post</title>

<link href="../plugins/summernote/summernote.css" rel="stylesheet" />

<link href="../plugins/select2/css/select2.min.css" rel="stylesheet" type="text/css" />

<link href="../plugins/jquery.filer/css/jquery.filer.css" rel="stylesheet" />

<linkhref="../plugins/jquery.filer/css/themes/jquery.filer-dragdropbox-theme.css"
rel="stylesheet" />

<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />

<link href="assets/css/core.css" rel="stylesheet" type="text/css" />

<link href="assets/css/components.css" rel="stylesheet" type="text/css" />

<link href="assets/css/icons.css" rel="stylesheet" type="text/css" />

<link href="assets/css/pages.css" rel="stylesheet" type="text/css" />

<link href="assets/css/menu.css" rel="stylesheet" type="text/css" />

<link href="assets/css/responsive.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" href="../plugins/switchery/switchery.min.css">

<script src="assets/js/modernizr.min.js"></script>

50
<script>

function getSubCat(val) {

$.ajax({

type: "POST",

url: "get_subcategory.php",

data:'catid='+val,

success: function(data){

$("#subcategory").html(data);

});

</script>

</head>

<body class="fixed-left">

<div id="wrapper">

<?php include('includes/topheader.php');?>

<?php include('includes/leftsidebar.php');?>

<div class="content-page">

<div class="content">

<div class="container">

<div class="row">

<div class="col-xs-12">

<div class="page-title-box">

51
<h4 class="page-title">ADD New Student details</h4>

<ol class="breadcrumb p-0 m-0">

<li><a href="#">Post</a></li>

<li><a href="#">Add Post </a>

</li><li class="active">Add Post</li>

</ol><div class="clearfix"></div>

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

<div class="row">

<div class="col-sm-6">

<?php if($msg){ ?>

<div class="alert alert-success" role="alert">

<strong>Well done!</strong> <?php echo htmlentities($msg);?>

</div>

<?php } ?>

<?php if($error){ ?>

<div class="alert alert-danger" role="alert">

<strong>Oh snap!</strong> <?php echo htmlentities($error);?></div>

<?php } ?>

</div></div>

<div class="row">

<div class="col-md-10 col-md-offset-1">

<div class="p-6">

52
<div class="">

<form name="addpost" method="post" enctype="multipart/form-data">

<div class="form-group m-b-20">

<label for="exampleInputEmail1">Enter the name:</label>

<input type="text" class="form-control" id="name" name="posttitle" placeholder="name">

</div>

<div class="form-group m-b-20">

<label for="exampleInputEmail1">Enter the rollno:</label>

<input type="text" class="form-control" id="rollno" name="posttitle" placeholder="rollno">

</div>

<div class="form-group m-b-20">

<label for="exampleInputEmail1">Enter the department</label>

<input type="text" class="form-control" name="category" id="name"


placeholder="department">

</div>

<div class="form-group m-b-20">

<label for="exampleInputEmail1">Enter the phonenumber:</label>

<input type="text" class="form-control" name="subcategory" id="phno"


placeholder="phonenumber">

</div></div>

<div class="form-group m-b-20">

<label for="exampleInputEmail1">Enter the RFID Number:</label>

<input type="text" class="form-control" name="subcategory" id="rfidno"


placeholder="RFID Number">

53
</div></div>

<button type="submit" name="submit" class="btn btn-success waves-effect waves-


light">Save and Post</button>

<button type="button" class="btn btn-danger waves-effect waves-light">Discard</button>

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

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

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

</div></div> <script>

var resizefunc = [];

</script>

<script src="assets/js/jquery.min.js"></script>

<script src="assets/js/bootstrap.min.js"></script>

<script src="assets/js/detect.js"></script>

<script src="assets/js/fastclick.js"></script>

<script src="assets/js/jquery.blockUI.js"></script>

<script src="assets/js/waves.js"></script>

<script src="assets/js/jquery.slimscroll.js"></script>

<script src="assets/js/jquery.scrollTo.min.js"></script>

<script src="../plugins/switchery/switchery.min.js"></script>

<script src="../plugins/summernote/summernote.min.js"></script>

<script src="../plugins/select2/js/select2.min.js"></script>

<script src="../plugins/jquery.filer/js/jquery.filer.min.js"></script>

<script src="assets/pages/jquery.blog-add.init.js"></script>

54
<script src="assets/js/jquery.core.js"></script>

<script src="assets/js/jquery.app.js"></script>

<script>

jQuery(document).ready(function(){

$('.summernote').summernote({

height: 240,

minHeight: null,

maxHeight: null,

focus: false

});

$(".select2").select2();

$(".select2-limiting").select2({

maximumSelectionLength: 2

});

});

</script>

<script src="../plugins/switchery/switchery.min.js"></script>

<script src="../plugins/summernote/summernote.min.js"></script>

</body>

</html>

<?php } ?>

55
Autocomplete.php:

<?php

include('includes/config.php');

if(isset($_POST["query"]))

$output = '';

$query = "SELECT * FROM item WHERE COL 1 LIKE '%".$_POST["query"]."%'";

$result = mysqli_query($con, $query);

$output = '<ul class="list-unstyled">';

if(mysqli_num_rows($result) > 0)

while($row = mysqli_fetch_array($result))

$output .= '<li>'.$row["item_name"].'</li>';

else

$output .= '<li>Item Not Found</li>';

$output .= '</ul>';

echo $output;

56
}

?>

aboutus.php:

<?php

session_start();

include('includes/config.php');

error_reporting(0);

if(strlen($_SESSION['login'])==0)

header('location:index.php');

else{

if(isset($_POST['update']))

$pagetype='aboutus';

$pagetitle=$_POST['pagetitle'];

$pagedetails=$_POST['pagedescription'];

$query=mysqli_query($con,"updatetblpagessetPageTitle='$pagetitle',Description=

'$pagedetails' where PageName='$pagetype' ");

if($query)

$msg="About us page successfully updated ";

57
}

else{

$error="Something went wrong . Please try again.";

?>

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<meta name="description" content="A fully featured admin theme which can be used to
build CRM, CMS, etc.">

<meta name="author" content="Coderthemes">

<link rel="shortcut icon" href="assets/images/favicon.ico">

<title>Stationary portal | About us Page</title>

<link href="../plugins/summernote/summernote.css" rel="stylesheet" />

<link href="../plugins/select2/css/select2.min.css" rel="stylesheet" type="text/css" />

<link href="../plugins/jquery.filer/css/jquery.filer.css" rel="stylesheet" />

<linkhref="../plugins/jquery.filer/css/themes/jquery.filer-dragdropbox-theme.css"
rel="stylesheet" />

<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />

58
<link href="assets/css/core.css" rel="stylesheet" type="text/css" />

<link href="assets/css/components.css" rel="stylesheet" type="text/css" />

<link href="assets/css/icons.css" rel="stylesheet" type="text/css" />

<link href="assets/css/pages.css" rel="stylesheet" type="text/css" />

<link href="assets/css/menu.css" rel="stylesheet" type="text/css" />

<link href="assets/css/responsive.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" href="../plugins/switchery/switchery.min.css">

<script src="assets/js/modernizr.min.js"></script>

</head>

<body class="fixed-left">

<div id="wrapper">

<?php include('includes/topheader.php');?>

<?php include('includes/leftsidebar.php');?>

<div class="content-page">

<div class="content">

<div class="container">

<div class="row">

<div class="col-xs-12">

<div class="page-title-box">

<h4 class="page-title">About Page </h4>

<ol class="breadcrumb p-0 m-0">

<li><a href="#">Pages</a>

</li><li class="active">About us</li>

59
</ol><div class="clearfix"></div>

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

<div class="row">

<div class="col-sm-6">

<?php if($msg){ ?>

<div class="alert alert-success" role="alert">

<strong>Well done!</strong> <?php echo htmlentities($msg);?>

</div>

<?php } ?>

<?php if($error){ ?>

<div class="alert alert-danger" role="alert">

<strong>Oh snap!</strong> <?php echo htmlentities($error);?></div>

<?php } ?>

</div>

</div>

<?php

$pagetype='aboutus';

$query=mysqli_query($con,"select PageTitle,Description from tblpages where


PageName='$pagetype'");

while($row=mysqli_fetch_array($query))

{ ?>

<div class="row">

<div class="col-md-10 col-md-offset-1">

60
<div class="p-6">

<div class="">

<form name="aboutus" method="post">

<div class="form-group m-b-20">

<label for="exampleInputEmail1">Page Title</label>

<input type="text" class="form-control" id="pagetitle" name="pagetitle" value="<?php echo


htmlentities($row['PageTitle'])?>" required>

</div>

<div class="row">

<div class="col-sm-12">

<div class="card-box">

<h4 class="m-b-30 m-t-0 header-title"><b>Page Details</b></h4>

<textarea class="summernote" name="pagedescription" required><?php echo


htmlentities($row['Description'])?></textarea>

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

<?php } ?>

<button type="submit" name="update" class="btn btn-success waves-effect waves-


light">Update and Post</button>

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

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

</div>

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

</div></div><script>

var resizefunc = [];

61
</script>

<script src="assets/js/jquery.min.js"></script>

<script src="assets/js/bootstrap.min.js"></script>

<script src="assets/js/detect.js"></script>

<script src="assets/js/fastclick.js"></script>

<script src="assets/js/jquery.blockUI.js"></script>

<script src="assets/js/waves.js"></script>

<script src="assets/js/jquery.slimscroll.js"></script>

<script src="assets/js/jquery.scrollTo.min.js"></script>

<script src="../plugins/switchery/switchery.min.js"></script>

<script src="../plugins/summernote/summernote.min.js"></script>

<script src="../plugins/select2/js/select2.min.js"></script>

<script src="../plugins/jquery.filer/js/jquery.filer.min.js"></script>

<script src="assets/pages/jquery.blog-add.init.js"></script>

<script src="assets/js/jquery.core.js"></script>

<script src="assets/js/jquery.app.js"></script>

<script>

jQuery(document).ready(function(){

$('.summernote').summernote({

height: 240,

minHeight: null,

maxHeight: null,

focus: false

62
});

$(".select2").select2();

$(".select2-limiting").select2({

maximumSelectionLength: 2

});

});

</script>

<script src="../plugins/switchery/switchery.min.js"></script>

<script src="../plugins/summernote/summernote.min.js"></script>

</body>

</html>

<?php } ?>

Code for analyzing model dataset:

#analyzing and plotting bar graph


itemid <- seq(150:1)
totalcount <- rep(30:21,each=2,times=8,len=150)
totalsale <- rep(6:25,each=2,times=4,len=150)
df <- data.frame(itemid,totalcount,totalsale) # data to be analyzed
a<-rep(30,8)
b<-rep(60,20)
c<-rep(90,12)
d<-c(a,b,c)
for (n in df$itemid)
{
percentage<- (totalsale/totalcount) * 100
}
df.combinee<-cbind(df,percentage)
library(ggplot2) #inbuilt library for plotting graph
ggplot(df.combinee,aes(x=percentage))+geom_histogram(bins=25,fill="lightblue",col="blue"
)
#histogram graph

63
Execution

Fig 6.8: Execution

Result of data analysis for model dataset

Fig 6.9: result of data analysis for model dataset

64
Generated Model Dataset

Fig 6.10: Model dataset

65
66
67
Explanation

 The store’s product datasets and in that datasets, frequently bought things will be
taken into the consideration for the analysis.
 Whenever the students buy something in the store, the count of the corresponding
product will be incremented.
 With that count, the percentage sale of particular product will be calculated.
 The percentage will be shown in plot.
 If the percentage sale is less, then store owner don’t have to buy that particular
product more than certain count in the next month.
 This will reduce the total amount with which they buy something to the store.

68
CONCLUSION

69
CHAPTER 7
CONCLUSION

Our proposed system will reduce the manual work as well as store owner is able to
update the buying details as soon as students buy it and students can be able to view their
transaction details from local area at any time with their web application. Our existing system
involved hand written papers, so there are more possibilities to lose data. But our proposed
system completely reduces the managing of store card for all students in hostel and also the
data is guaranteed and will not be damaged by natural factors

70
FUTURE WORK

71
CHAPTER 8
FUTURE WORK

So the future work of this project will be, may be able to find the probability of a
product which will be bought by the students in the future. That’s prediction of products will
be sold out in the future by using machine learning algorithms. So it’s more efficient way to
run any business in this modern world. We can also add future functionality such as the
students are able to pay their hostel and mess bill through our web application itself. So that
the student don’t want to go ATM for paying their hostel and mess fees, Which will reduces
the time and the students can pay from their place itself.

72
REFERENCES

73
CHAPTER 9
REFERENCES

[1] Komal Satish Agarwal, Kranthi Drive “RFID Based Intelligent Bus Management and
Monitoring System”. International Journal of Engineering & Technology, ISSN: 2278-0181,
Vol.3 Issue 7, July-2014.
[2] Mahyidin, M.F. Student Attendance Using RFID System. December 2012; Available
from: http://umpir.ump.edu.my.

[3] Company, C. RFID based voting System. http://www.chiyu-t.com.tw/ 2011 [cited 2011
April 2011].

[4] Yahaya, C.K.H.C.K., et al., A framework on halal product recognition system through
smartphone authentication, in (2011) Lecture Notes in Electrical Engineering. 2011. p. 49-56.

[5] Sulaiman, N.A. and M. Kassim. Developing a customized software engineering testing
for Shared Banking Services (SBS) System. in 2011 IEEE International Conference on
System Engineering and Technology, ICSET 2011. 2011. UiTM, Shah Alam, Malaysia.

[6] Yahaya, C.K.H.C.K., M.N. Ismail, and M. Kassim. A study on automated, speech and
remote temperature monitoring for modeling Web based temperature monitoring system. in
2010 2nd International Conference on Education Technology and Computer (ICETC). 2010.
Shanghai, China.

[7] Wahab, M.H.A., et al. Door locking system using RFID. in Intelligent and Advanced
Systems (ICIAS), 2010 International Conference on. 2010. 2012 IEEE Control and System
Graduate Res.

[8] Sulaiman, N.A. and M. Kassim. An approach using RUP Test Discipline process for
Shared Banking Services (SBS) system. in (2010) 2nd International Conference on Computer
Research and Development, ICCRD 2010. 2010. Kuala Lumpur, Malaysia.

[9] X.S. Wu et al., "A New Method for Bar Code Localization and Recognition," in Image
and Signal Processing. CISP '09. 2nd International Congress on , vol., no., 2009, pp. 1-6

[10] HID Corporation, “Understanding Card Data Formats”, Technology Basics White
Paper, 2009.

74
[11] Kassim, M. and S. Yahya. A case study: Reliability of smartcard applications and
implementation in university environment, Malaysia. in 2009 International Semiconductor
Device Research Symposium, ISDRS '09. 2009. USA.

[12] Lim, T.S., S.C. Sim, and M.M. Mansor. RFID based attendance system. in Industrial
Electronics & Applications, 2009. ISIEA 2009. IEEE Symposium on. 2009

[13] S. Shepard, “RFID Radio Frequency Identification”, s.l.: MacGraw-Hill, 2005.

[14] Sato DCS & Labeling Worldwide, “The RFID Guidebook (Revision 8)”, 2004.

[15] Qaiser, A. and S.A. Khan. Automation of Time and Attendance using RFID Systems. in
Emerging Technologies, 2006. ICET '06. International Conference on. 2006.

75