Sunteți pe pagina 1din 94

2014

Student Alert System

Shilpa Mary George


Steffy Albert
Caroline David
Mini Project Report
on

STUDENT ALERT SYSTEM

Submitted by

SHILPA MARY GEORGE


STEFFY ALBERT
CAROLINE DAVID

in partial fulfillment for the award of the degree


of
B. TECH DEGREE
in
COMPUTER SCIENCE & ENGINEERING

SCHOOL OF ENGINEERING

COCHIN UNIVERSITY OF SCIENCE & TECHNOLOGY


KOCHI-682022

MARCH 2014
Division of Computer Science
School of Engineering
Cochin University of Science & Technology
Kochi-682022

CERTIFICATE
Certified that this is a bonafide record of the project work titled

STUDENT ALERT SYSTEM


done by

SHILPA MARY GEORGE


STEFFY ALBERT
CAROLINE DAVID

of VI semester Computer Science & Engineering in the year 2014 in


partial fulfillment of the requirements for the award of Degree of Bachelor
of Technology in Computer Science & Engineering of Cochin University
of Science & Technology.

ANCY ZACHARIAH PRAMOD PAVITHRAN


Project Guide Head Of the Division
ACKNOWLEDGEMENT

First of all we thank The Almighty God for blessing us and supporting us
throughout this endeavor.

We take this opportunity to express our profound and sincere gratitude to our
guide Mrs. Ancy Zachariah for her exemplary guidance, monitoring and
constant encouragement throughout the course of this project.

We also take this opportunity to express a deep sense of gratitude to our class co-
ordinators, Dr.Sudheep Elayidom and Mrs. Preetha S for their cordial support,
valuable suggestion and guidance.
We gratefully acknowledge the support extended by Head Of the Division,
Mr. Pramod Pavithran and also thank him for letting us use the lab facilities.

We are also obliged to the staff members of the division for their cooperation
during the period of the project.

Lastly, we thank all our friends without whom this project would not be possible.

SHILPA MARY GEORGE

STEFFY ALBERT

CAROLINE DAVID
ABSTRACT

Students have to search the internet each time to know about any news
updates like fee payment dates, exam results etc in the college website. The
project entitled “Student Alert System” is a system which sends latest news
updates from college website to a student, either via SMS or e-mail or both. The
system is developed so that students do not miss out on any alert and save their
valuable time. When they subscribe this service, they will be notified with latest
relevant news of their interest. Every student of the college can register in this
system to access this service.
The system extracts the latest news from the college website and sends
updates to the registered students. Only the registered students will receive the
notifications. The students subscribing this service will receive the alerts. Every
student will receive a username and password from the admin, to login in this
system. Notifications such as exam time table, fee details, syllabus, revaluation
results, exam results etc will be send as alerts to the students. Students can register
and choose the notifications they are interested in. They will receive the alerts for
their respective interests as chosen at the time of subscription. Facilities are
provided for the user to change their settings. The system groups the subscribers
according to their interest and securely sends alerts to all subscribers as and when
updates occur and keep the user informed. The user gets just the relevant news
without any glossy brochures or attention diverting advertisements.

i
LIST OF FIGURES

3.1 JSP container and JSP files 15

3.2 JSP life cycle 15

3.3 JSP Objects 17

3.4 Servlet tasks 21

3.5 Position of Servlets in a Web Application 22

4.1 Level 0 DFD 32

4.2 Level 1 DFD 33

4.3 Level 2 User DFD 34

4.4 Level 2 Admin DFD 35

5.1 Login Action 36

5.2 User Module 48

5.3 Admin Module 62

6.1 System Testing 80

ii
LIST OF TABLES

4.1 Login 28

4.2 Register 29

4.3 User Settings 29

4.4 Notification 30

iii
LIST OF ABBREVIATIONS

HTML : HyperText Markup Language

HTTP : HyperText Transfer Protocol

SQL : Structured Query Language

TCP : Transmission Control Protocol

UDP : User Datagram Protocol

SMS : Short Message Service

API : Application Programming Interface

SMTP : Simple Mail Transfer Protocol

POP : Post Office Protocol

MIME : Multipurpose Internet Mail Extensions

IMAP : Internet Message Access Protocol

NNTP : Network News Transfer Protocol

iv
TABLE OF CONTENTS

ABSTRACT i

LIST OF FIGURES ii

LIST OF TABLES iii

LIST OF ABBREVIATIONS iv

1. INTRODUCTION 1

1.1 OBJECTIVE 1

1.2 OVERVIEW 2

1.2.1 ADMIN MODULE 2

1.2.2 USER MODULE 3

2. SYSTEM ANALYSIS 5

2.1 EXISTING SYSTEM 5

2.2 PROPOSED SYSTEM 5

2.3 SOFTWARE REQUIREMENT SPECIFICATION 7

2.3.1 GENERAL DESCRIPTION 7

2.3.2 SYSTEM OBJECTIVES 7


2.3.3 SYSTEM REQUIREMENTS 7

2.3.3.1 NON-FUNCTIONAL REQUIREMENTS 7

2.3.3.2 FUNCTIONAL REQUIREMENTS 9

2.3.4 SYSTEM ENVIRONMENT 11

2.3.4.1 SOFTWARE REQUIREMENTS 11

2.3.4.2 HARDWARE REQUIREMENTS 12

3. SYSTEM TOOLS 13

3.1 FRONT END 13

3.1.1 JSP 13

3.1.2 HTML 17

3.1.3 CSS 18

3.1.4 JAVA SCRIPT 19

3.2 BACK END 20

3.2.1 MySQL 20
4. SYSTEM DESIGN 26

4.1 INPUT AND OUTPUT DESIGN 27

4.2 DATABASE 28

4.3 DATA FLOW DIAGRAM 30

5. SYSTEM IMPLEMENTATION 36

CODING & SCREENSHOTS 36

6. SYSTEM TESTING 78

6.1 UNIT TESTING 79

6.2 INTEGRATION TESTING 79

6.3 FINAL/SYSTEM TESTING 79

7. CONCLUSION 81

REFERENCES 84
Student Alert System

CHAPTER 1

INTRODUCTION

Nowadays, mobile phones and internet are indispensable factors of our daily life.
This reality played a very important role in coming up with the proposed alert
system. When users subscribe this service, they will be notified with any latest
relevant news of their interest. For example the system will extract news from
other website and summaries it and send SMS & email to subscribers. Different
users will receive the news for their respective interests as chosen at the time of
subscription. The system groups the subscribers according to their interest. This
service provides a means to get news of the user interest and alerts the user
whenever an update occurs at the website.

1.1 OBJECTIVE

The objective of this project is to send alerts to students in the form of mail and
sms notifications from college website. The user can login using username and
password provided by admin. After login the user can make changes in the
settings if needed and select the type of notifications needed in the user profile
page.
The software has been developed using the most powerful and secured backend
MySQL and the most widely accepted front end tool JSP with HTML & servlet
coding behind.

Division of Computer Science


1
Student Alert System

1.2 OVERVIEW

The Student Alert System consists of the following implementation modules.


 Admin module
 User module

1.2.1 ADMIN MODULE

Tasks of admin
i) Confirm all the registered students
ii) Manage confirmed students
iii) Event management
iv) Send notification
Confirm students
 The details of all registered students are listed in the confirm students
page, from which admin accepts the genuine users.
 The admin mail the login information such as username and password to
the confirmed (accepted) students.

Manage students
 All the confirmed (accepted) students are listed in this page.
 Users listed in this page only receive alerts
 Password and username verification are done from database created using
details of this page
Division of Computer Science
2
Student Alert System

Send notification
 Notifications are extracted from college website using rss feed.
 The admin receives all the notifications irrespective of the type of
notification.
 Admin groups the notifications as public and group notifications.
 Public notifications are for all users having common area of
interest.
Eg: SOE events
 Group notifications are for group of users.
Eg: syllabus, timetable
 Admin groups the news/events into different categories as
 Exam results
 Revaluation results
 Fee details
 Exam time table
 Syllabus
 School of engineering events

1.2.2 USER MODULE

User module consists of a user interface page. The user, with the username and
password provided by admin, reaches the user interface page.

Division of Computer Science


3
Student Alert System

The user interface page provides the following options.


 Edit profile
-The user can edit his semester, email-id, mobile no.
 Select the required notifications
 Turn on/off SMS and mail notifications
 Change password
 Write comments

This system provides attractive design and proper arrangement of links and
images, which enables a browser to easily interpret and access the properties
of the site.

Division of Computer Science


4
Student Alert System

CHAPTER 2

SYSTEM ANALYSIS
System analysis is the process of gathering and interpreting facts, diagnosing
problems and using the information to recommend improvements on the system.
System analysis is a problem solving activity that requires intensive
communication between the system users and system developers.
System analysis or study is an important phase of any system development
process. The system is viewed as a whole, the inputs are identified and the system
is subjected to close study to identify the problem areas. The solutions are given
as a proposal. The proposal is reviewed on user request and suitable changes are
made. This loop ends as soon as the user is satisfied with the proposal.

2.1 EXISTING SYSTEM

In the current scenario a student has to search the college website each time to
know about any update which is time consuming. Moreover if a student doesn’t
have an internet connection it will not be easy to know about the updates of
college website, hence some students are not be informed about the about the
important events like fee payment date, results etc.

2.2 PROPOSED SYSTEM

The purpose of this project is to build software that alerts the students when an
update on an event or a new event is posted in college website. The student alert
system performs the following tasks:

Division of Computer Science


5
Student Alert System

(a) The system provides an interface for each user after registration.
(b) User can select the type of notification.
(c) User receives mail/sms notification when a news update comes in CUSAT
website.
(d) User can change password and edit the profile.

The main conceptual modules of the system are


1. System resources module
2. Profile Creation Module
3. Notification Module

Module 1: System resources module


The system resources that satisfy user profiles are determined by the specific
profiles. While registering user selects exact requirements of the profile. After
login user gets only those selected system resources. The system delivers relevant
data to the user when updates occur at those resources.

Module 2: Profile Creation Module


Admin specifies configurations of resources. At the time of profile creation, user
provides the mobile number and email id for the alerts.

Module 3: Notification Module


The module securely sends alerts to all subscribers as and when updates occur and
keep the user informed. The advantage of this system is that the user gets just the
relevant news without any glossy brochures or attention diverting advertisements.
Division of Computer Science
6
Student Alert System

2.3 SOFTWARE REQUIREMENT SPECIFICATION

2.3.1 GENERAL DESCRIPTION

Product Description:

Student Alert System helps user to receive timely alerts of all the latest activities
in the college via email and sms. It helps users to get to know about the recent
happenings.

Problem Statement:

There is no such an alert system where students can receive notifications on any
latest news. They periodically need to check the website for any updates. This
project is a solution for the above said problems.

2.3.2 SYSTEM OBJECTIVES


 The system is developed so that students do not miss out on any alert. The
system can add user, validate user and is also bug free.
 Save time
 Students need not check the website for alerts. They receive any latest update.
2.3.3 SYSTEM REQUIREMENTS

2.3.3.1 NON FUNCTIONAL REQUIREMENTS

i. EFFICIENCY REQUIREMENT

Division of Computer Science


7
Student Alert System

When an alert system is implemented the user can receive alerts


about the events in an efficient manner.

ii. RELIABILITY REQUIREMENT


The system should accurately performs user registration, user
validation , user confirmation, select notifications and send
notifications.

iii. USABILITY REQUIREMENT


The system is designed for a user friendly environment so that the
users do not face any difficulty.

iv. IMPLEMENTATION REQUIREMNTS


Implementation of the whole system is using html in front end with
jsp as server side scripting language which will be used for database
connectivity and the backend ie the database part is developed using
mysql.

v. DELIVERY REQUIREMENTS
The whole system is expected to be delivered in four months of time
with a weekly evaluation by the project guide.

Division of Computer Science


8
Student Alert System

2.3.3.2 FUNCTIONAL REQUIREMENTS

USER:
 USER LOGIN
Description of feature
This feature used by the user to login into system. They are required to enter
username and password before they are allowed to enter the system .The
username and password will be verified and if invalid, the user is not allowed to
enter the system.
Functional requirements
-username and password are provided when the user registrations are confirmed.
-The system must only allow users with valid username and password to enter the
system
-The user must be able to logout after they have finished using system.

 REGISTER NEW USER


Description of feature
The new users have to fill the registration form with the required details and wait
for their confirmation by the admin.
Functional requirements
-System must be able to verify information
-System must be able to validate the fields

Division of Computer Science


9
Student Alert System

 EDIT USER PROFILE


Description of feature
After login, the user can edit details such as current semester, e-mail id, phone no.
The users also have provisions to change their password and also write comments.
Functional requirements
-System must be able to update information
-System must be able to validate the fields

 SELECT NOTIFICATIONS
Description of feature
The users can select the notifications they want to receive. They can also turn
on/off mail and sms alerts.
Functional requirements
-System must be able to find selected notifications
-System must be able to send appropriate alerts

ADMIN:
 CONFIRM USER
Description of feature
The new users have to be confirmed by the admin. The admin can also see all the
details about the user provided at the time of registration.
Functional requirements
-System must be able to search information
-System must be able to confirm the user.

Division of Computer Science


10
Student Alert System

 MANAGE USER
Description of feature
The admin have to manage all the confirmed users. The admin can search for
users by their register no. The admin can also block users permanently.

Functional requirements
-System must be able to search information
-System must be able to block the user.

 SEND NOTIFICATION
Description of feature
The admin have to send notifications to users. The admin should classify the
update as public or group and send the notifications to the subscribed users via
sms or e-mail.
Functional requirements
-System must be able to send sms and e-mail notifications

2.3.4 SYSTEM ENVIRONMENT

2.3.4.1 SOFTWARE REQUIREMENTS


 Operating system- Windows 7 is used as the operating system as it is
stable and supports more features and is user friendly

Division of Computer Science


11
Student Alert System

 Database- MYSQL is used as database as it easy to maintain and


retrieve records by simple queries which are in English language which
are easy to understand and easy to write.
 Development tools and Programming language- HTML is used to
develop web pages with CSS, Java Script for validation and JSP for
sever side scripting.

2.3.4.2 HARDWARE REQUIREMENTS


 Intel core i3 is used as a processor because it is relatively fast and
provide reliable and stable environment.
 Windows 8 operating system is used.
 Ram 1 GB is used as it will provide fast reading and writing
capabilities and will in turn support in processing.

Division of Computer Science


12
Student Alert System

CHAPTER 3

SYSTEM TOOLS

The various system tools that have been used in developing both the front end and
the back end of the project are being discussed in this chapter.

3.1 FRONT END

JSP, HTML, CSS, JAVA SCRIPT are utilised to implement the frontend.

3.1.1 JavaServer Pages (JSP)

Java Server Pages (JSP) is a technology for developing web pages that
support dynamic content which helps developers to insert java code in HTML
pages by making use of special JSP tags, most of which start with <% and end
with %>. A JavaServer Pages component is a type of Java servlet that is designed
to fulfil the role of a user interface for a Java web application. Web developers
write JSPs as text files that combine HTML or XHTML code, XML
elements, and embedded JSP actions and commands. Using JSP, one can collect
input from users through web page forms, present records from a database or
another source, and create web pages dynamically. JSP tags can be used for a
variety of purposes, such as retrieving information from a database or registering

Division of Computer Science


13
Student Alert System

user preferences, accessing JavaBeans components, passing control between


pages and sharing information between requests, pages etc.
JavaServer Pages are built on top of the Java Servlets API, so like Servlets, JSP
also has access to all the powerful Enterprise Java APIs, including JDBC, JNDI,
EJB, JAXP etc. JSP pages can be used in combination with servlets that handle
the business logic, the model supported by Java servlet template engines. JSP is
also an integral part of J2EE, a complete platform for enterprise class
applications. This means that JSP can play a part in the simplest applications to
the most complex and demanding.

JSP Architecture

The web server needs a JSP engine ie. container to process JSP pages. The JSP
container is responsible for intercepting requests for JSP pages. This tutorial
makes use of Apache which has built -in JSP container to support JSP pages
development. A JSP container works with the Web server to provide the runtime
environment and other services a JSP needs. It knows how to understand the
special elements that are part of JSP.
Following diagram shows the position of JSP container and JSP files in a Web
Application.

Division of Computer Science


14
Student Alert System

Fig 3.1: JSP container and JSP files

The major phases of JSP life cycle are very similar to Servlet Life Cycle and they
are as follows:

Fig 3.2: JSP life cycle

JSP Syntax

Division of Computer Science


15
Student Alert System

The Scriptlet:

A scriptlet can contain any number of JAVA language statements, variable or


method declarations, or expressions that are valid in the page scripting language.

Following is the syntax of Scriptlet:


<% code fragment %>

JSP Declarations:

A declaration declares one or more variables or methods that one can use in Java
code later in the JSP file. One must declare the variable or method before its use
in the JSP file.

Following is the syntax of JSP Declarations:


<%! declaration; [ declaration; ]+ ... %>

JSP Expression:

A JSP expression element contains a scripting language expression that is


evaluated, converted to a string, and inserted where the expression appears in the
JSP file. Because the value of an expression is converted to a string, one can use
an expression within a line of text, whether or not it is tagged with HTML, in a
JSP file. The expression element can contain any expression that is valid
according to the Java Language Specification but one cannot use a semicolon to
end an expression.
Following is the syntax of JSP Expression:
Division of Computer Science
16
Student Alert System

<%= expression %>

JSP Implicit Objects:

JSP supports nine automatically defined variables, which are also called implicit
objects. These variables are given in Fig. 2.5.

Fig. 3.3: JSP Objects

3.1.2 HTML (HyperText Markup Language)

HTML is a syntax used to format a text document on the web. These documents
are interpreted by web browsers such as Internet Explorer and Netscape
Navigator. HTML can be created as standard ASCII text with "tags" included to
pass on extra information about character formatting and page layout to a web

Division of Computer Science


17
Student Alert System

browser. HTML is written in the form of HTML elements consisting


of tags enclosed in angle brackets (like <html>), within the web page content.
HTML tags most commonly come in pairs like <h1> and </h1>, although some
tags represent empty elements and so are unpaired, for example <img>. The first
tag in a pair is the start tag, and the second tag is the end tag (they are also
called opening tags and closing tags). In between these tags web designers can
add text, further tags, comments and other types of text-based content. The
purpose of a web browser is to read HTML documents and compose them into
visible or audible web pages. The browser does not display the HTML tags, but
uses the tags to interpret the content of the page.HTML elements form the
building blocks of all websites. HTML allows images and objects to be embedded
and can be used to create interactive forms. It provides a means to
create structured documents by denoting structural semantics for text such as
headings, paragraphs, lists, links, quotes and other items.

3.1.3 CSS (Cascading Style Sheets)

CSS is a style sheet language used for describing the look and formatting of a
document written in a markup language. While most often used to style web
pages and interfaces written in HTML and XHTML, the language can be applied
to any kind of XML document, including plain XML, SVG and XUL. CSS is a
cornerstone specification of the web and almost all web pages use CSS style
sheets to describe their presentation. CSS is designed primarily to enable the
separation of document content from document presentation, including elements
such as the layout, colours, and fonts. This separation can improve
Division of Computer Science
18
Student Alert System

content accessibility, provide more flexibility and control in the specification of


presentation characteristics, enable multiple pages to share formatting, and reduce
complexity and repetition in the structural content (such as by allowing
for tableless web design). CSS can also allow the same markup page to be
presented in different styles for different rendering methods, such as on-screen, in
print, by voice (when read out by a speech-based browser or screen reader) and
on Braille-based, tactile devices. It can also be used to allow the web page to
display differently depending on the screen size or device on which it is being
viewed.

3.1.4 Java Script

JS is a dynamic computer programming language. It is most commonly used as


part of web browsers, whose implementations allow client-side scripts to interact
with the user, control the browser, communicate asynchronously, and alter
the document content that is displayed. It is also being used in server-side
programming, game development and the creation of desktop and mobile
applications. JavaScript is a prototype-based scripting language with dynamic
typing and has first-class functions. Its syntax was influenced by C. JavaScript
copies many names and naming conventions from Java, but the two languages are
otherwise unrelated and have very different semantics. The key design principles
within JavaScript are taken from the self and Scheme programming languages. It
is a multi-paradigm language, supporting object-oriented, imperative,
and functional programming styles. The application of JavaScript to use outside

Division of Computer Science


19
Student Alert System

of web pages for example, in PDF documents, site-specific browsers, and desktop
widgets is also significant.

3.2 BACK END

The back end is implemented using servlets and MySQL which is used to design
the databases.

3.2.1 MySQL

MySQL is the world's second most widely used open-source relational database
management system (RDBMS). The SQL phrase stands for Structured Query
Language. The MySQL development project has made its source code available
under the terms of the GNU General Public License, as well as under a variety
of proprietary agreements. MySQL was owned and sponsored by a single for-
profit firm, the Swedish company MySQL AB, now owned by Oracle
Corporation. MySQL is a popular choice of database for use in web applications,
and is a central component of the widely used LAMP (Linux, Apache,
MySQL, Perl/PHP/Python) open source web application software stack (and
other 'AMP' stacks). Free-software-open source projects that require a full-
featured database management system often use MySQL. For commercial use,
several paid editions are available, and offer additional functionality. Applications
which use MySQL databases include: TYPO3, MODx, Joomla, WordPress,
phpBB, Drupal and other software. MySQL is also used in many high-profile,
large-scale websites, including Wikipedia, Google(though not for searches),
Facebook, Twitter, Flickr, and YouTube.

Division of Computer Science


20
Student Alert System

SERVLETS

Servlets are programs that run on a Web or application server and act as a middle
layer between a requests coming from a Web browser or other HTTP client and
databases or applications on the HTTP server. Their job is to perform the
following tasks, as illustrated in Fig. 2.6.

Fig.3.4: Servlet tasks

Using Servlets, one can collect input from users through web page forms,
present records from a database or another source, and create web pages
dynamically .Java Servlets often serve the same purpose as programs
implemented using the Common Gateway Interface (CGI). But Servlets offer
several advantages in comparison with the CGI.

 Performance is significantly better.


 Servlets execute within the address space of a Web server. It is not
necessary to create a separate process to handle each client request.
 Servlets are platform-independent because they are written in Java.
 Java security manager on the server enforces a set of restrictions to

Division of Computer Science


21
Student Alert System

protect the resources on a server machine. So servlets are trusted.


 The full functionality of the Java class libraries is available to a
servlet. It can communicate with applets, databases, or other software via
the sockets and RMI mechanisms that you have seen already.
 Servlets Architecture:
Following diagram shows the position of Servlets in a Web Application.

Fig.3.5: Position of Servlets in a Web Application

Mail API
The JavaMail is an API that is used to compose, write and read electronic
messages (emails). The JavaMail API provides protocol-independent and
platform-independent framework for sending and receiving mails.
The javax.mail and javax.mail.activation packages contain the core classes of

Division of Computer Science


22
Student Alert System

JavaMail API. The JavaMail facility can be applied to many events. It can be used
at the time of registering the user (sending notification such as thanks for your
interest to my site), forgot password (sending password to the users email id),
sending notifications for important updates etc. So there can be various usage of
JavaMail API. One can send email by using the SMTP server of gmail by SSL
(Secured Socket Layer). SSL is basically used for security for sending email
through gmail server.

For sending the email using JavaMail API, the two jar files are to be loaded.
 mail.jar
 activation.jar
There are some protocols that are used in JavaMail API.
 SMTP
 POP
 IMAP
 MIME
 NNTP and others

The java application uses JavaMail API to compose, send and receive emails.
The JavaMail API uses SPI (Service Provider Interfaces) that provides the
intermediatory services to the java application to deal with the different
protocols. There are three steps to send email using JavaMail.
They are as follows:

Division of Computer Science


23
Student Alert System

1. Get the session object that stores all the information of host like host name,
username, password etc.
2.Compose the message
3.Send the message

SMS API

An SMS gateway allows a computer to send or receive Short Message


Service (SMS) transmissions to or from a telecommunications network. Most
messages are eventually routed into the mobile phone networks. Many SMS
gateways support media conversion from email and other formats. An SMS
gateway typically sits between the end user who needs to send/receive SMS and a
mobile network's SMSC. Such gateways provide a choice of protocols including
HTTP, SMTP, Short Message Peer-to-Peer and web services. Providers of SMS
gateway services include SMS aggregators and mobile operators. SMS gateways
are also available as part of messaging services such as AOL, ICQ and others. An
SMS gateway connects with (i) mobile network SMSCs in order to send/receive
messages and/or (ii) other SMS gateways in order to reach mobile subscribers on
multiple mobile networks. It is therefore possible that an SMS gateway has a
combination of mobile network SMSC connections and connections with other
SMS gateways in order to provide its services. However, there is the increasing
potential for delivery problems with SMS the greater the number of SMS
gateways in the delivery chain.

Division of Computer Science


24
Student Alert System

Text messages can be sent from a personal computer to mobile devices via an
SMS gateway. The messages must be sent in ASCII "text-only" mode. If they are
sent in HTML mode, or using non-ASCII characters, they will most likely appear
as nonsense on the recipient's mobile telephone. Before the message can be sent,
one must determine the domain of the mobile carrier's SMS gateway. To
determine the SMS gateway domain, e.g., txt.att.net, may require research, as
mobile telephone users typically do not know this information when they provide
their telephone number and due to number portability the number may no longer
be associated with the carrier that originally issued it. The country code is not
needed, as the 10-digit telephone number, together with the email domain, are
sufficient to send the email from any location in the world. It is useful to perform
a character count to ensure that it is within the 160-character limit. If it exceeds
the limit, the SMS gateway should break the message into a set of consecutive
160-character, or shorter, messages to the mobile equipment, although the breaks
may occur in the middle of words. A message sent with an email client can be
simultaneously addressed to multiple mobile telephones, whereas text messages
sent in the usual manner between mobile telephones can only be sent to a single
recipient.

Division of Computer Science


25
Student Alert System

CHAPTER 4

SYSTEM DESIGN

System design is the solution for the creation of a new system. This phase focuses
on the detailed implementation of the feasible system. It emphasis on translating
design specifications to performance specification. System design has two phases
of development
 Logical design
 Physical design

During logical design phase the analyst describes inputs (sources), outputs
(destinations), databases (data sores) and procedures (data flows) all in a format
that meets the user requirements. The analyst also specifies the needs of the user
at a level that virtually determines the information flow in and out of the system
and the data resources. Here the logical design is done through data flow diagrams
and database design.
The physical design is followed by physical design or coding. Physical design
produces the working system by defining the design specifications, which specify
exactly what the candidate system must do. The programmers write the necessary
programs that accept input from the user, perform necessary processing on
accepted data and produce the required report on a hard copy or display it on the
screen.

Division of Computer Science


26
Student Alert System

4.1 INPUT AND OUTPUT DESIGN

INPUT DESIGN:
Input design is the link that ties the information system into the world of
its users. The input design involves determining the inputs, validating the data,
minimizing the data entry and provides a multi-user facility. Inaccurate inputs are
the most common cause of errors in data processing. Errors entered by the data
entry operators can be controlled by input design. The user-originated inputs are
converted to a computer based format in the input design. Input data are collected
and organized into groups of similar data. Once identified, the appropriate input
media are selected for processing. All the input data are validated and if any data
violates any conditions, the user is warned by a message. If the data satisfies all
the conditions, it is transferred to the appropriate tables in the database. In this
project the student details are to be entered at the time of registration. A page is
designed for this purpose which is user friendly and easy to use. The design is
done such that users get appropriate messages when exceptions occur.

OUTPUT DESIGN:
Computer output is the most important and direct source of information to the
user. Output design is a very important phase since the output needs to be in an
efficient manner. Efficient and intelligible output design improves the system
relationship with the user and helps in decision making. Allowing the user to view
the sample screen is important because the user is the ultimate judge of the quality
of output. The output module of this system is the selected notifications.

Division of Computer Science


27
Student Alert System

4.2 DATABASE

DATABASE DESIGN:

Databases are the storehouses of data used in the software systems. The data is
stored in tables inside the database. Several tables are created for the manipulation
of the data for the system. Two essential settings for a database are
 Primary Key- the field that is unique for all the record occurrences.
 Foreign Key-the field used to set relation between tables.
Normalization is a technique to avoid redundancy in the tables.

TABLES

 LOGIN

Table 4.1: Login

Division of Computer Science


28
Student Alert System

 REGISTER

Table 4.2: Register

 USER SETTINGS

Table 4.3: User Settings

Division of Computer Science


29
Student Alert System

 NOTIFICATIONS

Table 4.4: Notification table

4.3 DATA FLOW DIAGRAM

A Data Flow Diagram (DFD) is a structured analysis and design tool that can be
used for flowcharting. A DFD is a network that describes the flow of data and the
processes that change or transform the data throughout a system. This network is
constructed by using a set of symbols that do not imply any physical
implementation. It has the purpose of clarifying system requirements and
identifying major transformations. So it is the starting point of the design
phase that functionally decomposes the requirements specifications down to
the lowest level of detail. DFD can be considered to an abstraction of the logic of
an information-oriented or a process-oriented system flow-chart. For these
reasons DFD’s are often referred to as logical data flow diagrams.

CONTEXT LEVEL DIAGRAM (LEVEL 0)

The Top-level diagram is often called a context level diagram. It is also called 0
level data flow diagram. It contains a single process, but it plays a very

Division of Computer Science


30
Student Alert System

important role in studying the current system. The context diagram


determines the boundaries. Anything that is not inside the process identified in
the context diagram will not be part of the system study. The external
elements, that are the sources and sinks function will not be studied in detail
in the context level data flow diagram.

EXTERNAL ENTITY
An external entity is a source or destination of a data flow. Only those entities
which originate or receive data are represented on a data flow diagram. The
symbol used is a rectangular box.

PROCESS
A process shows a transformation or manipulation of data flow within the
system. The symbol used is an oval shape.

DATAFLOW
The data flow shows the flow of information from a source to its destination. Data
flow is represented by a line, with arrowheads showing the direction of flow.
Information always flows to or from a process and may be written, verbal or
electronic. Each data flow may be referenced by the processes or data stores at its
head and tail, or by a description of its contents.

DATA STORE
A data store is a holding place for information within the system: It is represented

Division of Computer Science


31
Student Alert System

by an open ended narrow rectangle. Data stores may be long-term files such as
sales ledgers, or may be short-term accumulations: for example batches of
documents that are waiting to be processed. Each data store should be given a
reference followed by an arbitrary number.

LEVEL 0

Fig 4.1: Level 0 DFD

Division of Computer Science


32
Student Alert System

LEVEL 1

Fig 4.2: Level 1 DFD

Division of Computer Science


33
Student Alert System

LEVEL 2

USER LEVEL DFD

Fig 4.3: Level 2 User DFD

Division of Computer Science


34
Student Alert System

LEVEL 2

ADMIN LEVEL DFD

Fig 4.4: Level 2 Admin DFD

Division of Computer Science


35
Student Alert System

CHAPTER 5

SYSTEM IMPLEMENTATION

LOGIN
The login page redirects user to the user interface page and admin to the admin
interface page.The login thus acts as the homepage. It provides additional links
such as About the project, Department, Map, Gallery etc.

ADMIN
INTERFACE

LOGIN

USER
INTERFACE

Fig 5.1: Login Action

CODE

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" lang="EN" dir="ltr">
<head profile="http://gmpg.org/xfn/11">
<title>STUDENT ALERT SYSTEM</title>

Division of Computer Science


36
Student Alert System

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />


<meta http-equiv="imagetoolbar" content="no" />
<link rel="stylesheet" href="styles/layout.css" type="text/css" />
<script type="text/javascript" src="scripts/jquery-1.8.2.min.js"></script>
<!-- liteAccordion is Homepage Only -->
<link rel="stylesheet" href="scripts/liteaccordion-v2.2/css/liteaccordion.css"
type="text/css" />
</head>

<body id="top">
<div class="wrapper row1">
<div id="header" class="clear">
<div class="fl_left">
<h1><a href="#">STUDENT ALERT SYSTEM</a></h1>

</div>
<form action="LoginVerify" method="post" id="login">
<fieldset>
<legend>Student Login</legend>
<p>&nbsp; Username &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Password</p>
<input type="password" name="upass" required />
<input type="text" name="uname" required />
<div id="forgot"><a href="Registration.jsp">New user register here</a></div>
<input type="image" src="images/sign_in.gif" id="signin" alt="Sign In" />
</fieldset>
</form>
</div>
</div>
<!--
########################################################################
############################### -->
<div class="wrapper row2">
<div id="topnav">
<ul>
<li class="active"><a href="index.jsp">Homepage</a></li>

Division of Computer Science


37
Student Alert System

<li><a href="#">Quick Links</a>


<ul>
<li><a href="Department.jsp">Departments</a></li>
<li><a href="#">Events</a></li>
<li><a href="Map.jsp">Maps & Directions</a></li>
</ul>
</li>

<li><a href="gallery.html">Gallery</a></li>

</ul>
<div class="clear"></div>
</div>
</div>
<!--
########################################################################
############################### -->
<div class="wrapper row3">
<div id="featured_slide">
<!--
########################################################################
############################### -->
<ol>
<li>
<h2><span></span></h2>
<div><img src="PHOTOS/nlb.jpg" alt="" width="720" height="350" /></div>

</li>
<li>
<h2><span></span></h2>
<div><img src="PHOTOS/btech.jpg" alt="" width="720" height="350" /></div>
</li>
<li>
<h2><span></span></h2>
<div><img src="PHOTOS/flower.jpg" alt="" width="720" height="350" /></div>
</li>
<li>
<h2><span></span></h2>

Division of Computer Science


38
Student Alert System

<div><img src="PHOTOS/bus.jpg" alt="" width="720" height="350" /></div>


</li>
<li>
<h2><span></span></h2>
<div><img src="PHOTOS/hostel.jpg" alt="" width="720" height="350" /></div>
</li>
</ol>
<!--
########################################################################
############################### -->
</div>
</div>
<!--
########################################################################
############################### -->
<div class="wrapper row4">
<div id="container" class="clear">
<!--
########################################################################
############################### -->
<div id="homepage" class="clear">
<div class="fl_left">

<h2 class="title">Latest Gallery Images</h2>


<div id="hpage_gallery">
<ul class="clear">
<li><a href="gallery.html"><img src="PHOTOS/bubble.jpg" alt="" width="175"
height="130" /></a></li>
<li class="last"><a href="gallery.html"><img src="PHOTOS/ab.jpg" alt=""
width="175" height="130" /></a></li>
<li><a href="gallery.html"><img src="PHOTOS/marine.jpg" alt="" width="175"
height="130" /></a></li>
<li class="last"><a href="gallery.html"><img src="PHOTOS/doe.jpg" alt=""
width="175" height="130" /></a></li>
</ul>
</div>

Division of Computer Science


39
Student Alert System

<div id="hpage_socialize">

</div>
</div>
<!-- ############### -->
<div class="fl_right">
<h2 class="title">About this project..</h2>
<div id="hpage_latestnews">
<ul>
<li>
<div class="imgl"><img src="PHOTOS/ship.jpg" alt="" height="160"
width="150"/></div>
<p class="latestnews"> Nowadays, mobile phones and internet are indispensable factors
of our daily life. This reality played a very important role in coming up with the proposed alert
system. When users subscribe this service, they will be notified with any latest relevant news of
their interest. For example the system will extract news from other website and summaries it and
send SMS & email to subscribers. Different users will receive the news for their respective
interests as chosen at the time of subscription. The system groups the subscribers according to
their interest. This service provides a means to get news of the user interest and alerts the user
whenever an update occurs at the website. </p>
<p class="readmore"><a href="Aboutproject.jsp">Continue Reading
&raquo;</a></p>
</li>
<li>
<div class="imgl"></div>

</li>
<li class="last">
<div class="imgl"></div>
</li>
</ul>
</div>
</div>
</div>
<!--
########################################################################
############################### -->

Division of Computer Science


40
Student Alert System

</div>
</div>
<!--
########################################################################
############################### -->
<div class="wrapper row5">
<div id="footer" class="clear">

<!--
########################################################################
############################### -->

<div class="foot_contact">
<h2>COCHIN UNIVERSITY OF SCIENCE AND TECHNOLOGY</h2>
<address>
DIVISION OF COMPUTER SCIENCE</br>
SCHOOL OF ENGINEERING<br />
SOUTH KALAMASSERY<br />
COCHIN<br />
682022

</div>
<div class="footbox">

</div>
<div class="footbox">

</div>
<div class="footbox last">

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

<!--
########################################################################
############################### -->

Division of Computer Science


41
Student Alert System

<div class="wrapper">
<div id="copyright" class="clear">
<p class="fl_left">Copyright &copy; 2014 - All Rights Reserved - </p>

</div>
</div>
<!-- liteAccordion is Homepage Only -->
<script type="text/javascript" src="scripts/liteaccordion-
v2.2/js/liteaccordion.jquery.min.js"></script>
<script type="text/javascript">
$("#featured_slide").liteAccordion({
theme: "os-tpl",

containerWidth: 960, // fixed (px)


containerHeight: 360, // fixed (px) - overall height of the slider
headerWidth: 48, // fixed (px) - slide spine title

firstSlide: 1, // displays slide (n) on page load


activateOn: "click", // click or mouseover
autoPlay: false, // automatically cycle through slides
pauseOnHover: true, // pause slides on hover
rounded: false, // square or rounded corners
enumerateSlides: true, // put numbers on slides

slideSpeed: 800, // slide animation speed


cycleSpeed: 6000, // time between slide cycles
});
</script>
</body>
</html>

Division of Computer Science


42
Student Alert System

SCREEN SHOT

 LOGIN PAGE

Division of Computer Science


43
Student Alert System

Division of Computer Science


44
Student Alert System

 MAP

Division of Computer Science


45
Student Alert System

DEPARTMENTS

Division of Computer Science


46
Student Alert System

ABOUT THE PROJECT

Division of Computer Science


47
Student Alert System

USER INTERFACE

Upon login the user is redirected to the user interface page. This page provides
facilities to change user information such as email id and phone no, select the
required notifications and change password.

EDIT
PROFILE

CHANGE
PASSWORD

USER WRITE
INTERFACE COMMENTS

SELECT
NOTIFICATIONS

ON/OFF
SMS & E-MAIL

Fig 5.2: User Module

Division of Computer Science


48
Student Alert System

CODE

<%@page import="com.util.Data.DatabaseCon"%>
%@page import="java.sql.ResultSet"%
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" lang="EN" dir="ltr">
<head profile="http://gmpg.org/xfn/11">
<title>STUDENT ALERT SYSTEM</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="imagetoolbar" content="no" />
<link rel="stylesheet" href="styles/layout.css" type="text/css" />
<%!String r1=null,r2=null,r3=null,r4=null,r5=null,r6=null,r7=null,r8=null;%>
<%
String id=session.getAttribute("userloged").toString();
String str="select * from userwrites where username='"+id+"'";
ResultSet rs1=new DatabaseCon().getData(str);
while(rs1.next()){
r1=rs1.getString(3);
r2=rs1.getString(4);
r3=rs1.getString(5);
r4=rs1.getString(6);
r5 =rs1.getString(7);
r6=rs1.getString(8);
r7=rs1.getString(9);
r8=rs1.getString(10);
}
System.out.print(r1);
%>
<script>
function loaddata()
{ var r1="<%=r1%>";
var r2="<%=r2%>";
var r3="<%=r3%>";
var r4="<%=r4%>";
var r5="<%=r5%>";

Division of Computer Science


49
Student Alert System

var r6="<%=r6%>";
var r7="<%=r7%>";
var r8="<%=r8%>";
if(r1==='y')
{
document.getElementById('ex').checked=true;
document.getElementById('ex1').checked=false;
}
else
{
document.getElementById('ex1').checked=true;
document.getElementById('ex').checked=false;
}
if(r2==='y')
{
document.getElementById('re').checked=true;
document.getElementById('re1').checked=false;
}
else
{
document.getElementById('re1').checked=true;
document.getElementById('re').checked=false;
}
if(r3==='y')
{
document.getElementById('fe').checked=true;
document.getElementById('fe1').checked=false;
}
else
{
document.getElementById('fe1').checked=true;
document.getElementById('fe').checked=false;
}
if(r4==='y')
{
document.getElementById('tt').checked=true;
document.getElementById('tt1').checked=false;
}

Division of Computer Science


50
Student Alert System

else
{
document.getElementById('tt1').checked=true;
document.getElementById('tt').checked=false;
}
if(r5==='y')
{
document.getElementById('sy').checked=true;
document.getElementById('sy1').checked=false;
}
else
{
document.getElementById('sy1').checked=true;
document.getElementById('sy').checked=false;
}
if(r6==='y')
{
document.getElementById('ev').checked=true;
document.getElementById('ev1').checked=false;
}
else
{
document.getElementById('ev1').checked=true;
document.getElementById('ev').checked=false;
}
if(r7==='y')
{
document.getElementById('mail').checked=true;
document.getElementById('mail1').checked=false;
}
else
{
document.getElementById('mail1').checked=true;
document.getElementById('mail').checked=false;
}
if(r8==='y')
{

Division of Computer Science


51
Student Alert System

document.getElementById('mob').checked=true;
document.getElementById('mob1').checked=false;
}
else
{
document.getElementById('mob1').checked=true;
document.getElementById('mob').checked=false;
}
}
function validateform()
{ var y=document.forms["myForm1"]["txt5"].value;
var atpos=y.indexOf("@");
var dotpos=y.lastIndexOf(".");
if(atpos<1 || dotpos<atpos+2 || dotpos+2>=y.length)
{
alert("Not a valid email address");
return false;
}
var p=document.forms["myForm1"]["txt6"].value;
for(j=0,fl=0;j<=p.length;j++)
{
if(!(p.charAt(j)>=0&& p.charAt(j)<=9))
fl++; }
if(fl!==0)
{
alert("Only numbers allowed in phone no");
return false;

}
if(p.length!==10)
{
alert("Not a valid phone no.");
return false;
}

function OpenInNewTab()

Division of Computer Science


52
Student Alert System

{
url="http://results.cusat.ac.in/regforms/exam.php";
var win=window.open(url, '_blank');
win.focus();
}
function opentabsylab()
{
url="http://dspace.cusat.ac.in/jspui/handle/123456789/15";
var win=window.open(url, '_blank');
win.focus();
}
function events()
{
url="http://www.cusat.ac.in/";
var win=window.open(url, '_blank');
win.focus();
}
</script>
</head>
<body id="top" onload="loaddata();">
<div class="wrapper row1">
<div id="header" class="clear">
<div class="fl_left">
<h1><a href="#">STUDENT ALERT SYSTEM</a></h1>

</div>

</div>
</div>
<!--
###############################################################################
######################## -->
<div class="wrapper row2">
<div id="topnav">
<ul>
<li><a href="index.html">Homepage</a></li>
<li><a href="gallery.html">Gallery</a></li>

Division of Computer Science


53
Student Alert System

<li class="last"><a href="Logout.jsp">Logout</a></li>


</ul>
<div class="clear"></div>
</div>
</div>
<!--
###############################################################################
######################## -->
<div class="wrapper row4">
<div id="container" class="clear">
<!--
###############################################################################
######################## -->
<div id="content">
<%

String s="select * from register where reg_no='"+id+"'";


System.out.println(s);
ResultSet rs=new DatabaseCon().getData(s);
String name=null;
String email=null;
String sem=null;
String branch=null;
String ph=null;
while(rs.next())
{
name=rs.getString(2);
branch=rs.getString(3);
sem=rs.getString(4);
email=rs.getString(6);
ph=rs.getString(7);

%>
<h1><b><center>WELCOME &nbsp;<%=name%>.., </center></b> </h1>
<br />
<h2>CURRENT PROFILE</h2>

Division of Computer Science


54
Student Alert System

<table>
<tr> <td>NAME</td><td><%= name%></td></tr>
<tr> <td>BRANCH</td><td><%= branch%></td></tr>
<tr> <td>CURRENT SEMESTER</td><td><%= sem%></td></tr>
<tr> <td>EMAIL ID</td><td><%=email%></td></tr>
<tr> <td>PHONE NO.</td><td><%=ph%></td></tr>
</table>

<h3>EDIT YOUR PROFILE</h3>


<form name="myForm" action="SaveSettings.jsp" method="post">
<table>
<tr> <td>SEMESTER</td><td> <select name="sem">
<option>Select an option</option>
<option>S1 & S2</option>
<option>S3</option>
<option>S4</option>
<option>S5</option>
<option>S6</option>
<option>S7</option>
<option>S8</option>
</select></td></tr>
<tr> <td>EMAIL-ID</td><td> <input type="text" name="id" value="<%=email%>"
/></td></tr>
<tr> <td>PHONE NO</td><td> <input type="text" name="no" value="<%=ph%>"
/></td></tr>

</table>
</br>

<h3>ACCOUNT SETTINGS::</h3>
<table border="1">
<thead>
<tr>

</tr>

Division of Computer Science


55
Student Alert System

<tr>
<th>NOTIFICATION</th>
<th> YES </th>
<th> NO </th>

</thead>
<tbody>
<tr>
<td>EXAM RESULTS</td>
<td><input type="radio" name="g1" value="y" id="ex"/></td>
<td><input type="radio" name="g1" value="n" id ="ex1"/></td>
</tr>
<tr>
<td>REVALUATION RESULTS</td>
<td><input type="radio" name="g2" value="y" id="re"/></td>
<td><input type="radio" name="g2" value="n" id="re1"/></td>
</tr>
<tr>
<td>FEE DETAILS</td>
<td><input type="radio" name="g3" value="y" id="fe" /></td>
<td><input type="radio" name="g3" value="n" id="fe1"/></td>
</tr>
<tr>
<td>EXAM TIME TABLE</td>
<td><input type="radio" name="g4" value="y" id="tt" /></td>
<td><input type="radio" name="g4" value="n" id="tt1"/></td>

</tr>
<tr>
<td>SYLLABUS</td>
<td><input type="radio" name="g5" value="y" id="sy" /></td>
<td><input type="radio" name="g5" value="n" id="sy1"/></td>

</tr>
<tr>
<td>SOE EVENTS</td>
<td><input type="radio" name="g6" value="y" id="ev"/></td>
<td><input type="radio" name="g6" value="n" id="ev1"/></td>

Division of Computer Science


56
Student Alert System

</tr>
<tr>
<td>MAIL NOTIFICATION</td>
<td><input type="radio" name="g7" value="y" id="mail"/></td>
<td><input type="radio" name="g7" value="n" id="mail1"/></td>
</tr>
<tr>
<td>MOBILE NOTIFICATION</td>
<td><input type="radio" name="g8" value="y" id="mob"/></td>
<td><input type="radio" name="g8" value="n" id="mob1"/></td>
</tr>
</tbody>
</table>
<tr><td></td><td><input type="submit" value="SAVE" /></td></tr>
</form>
<div id="comments">
</br>
</br>
</div><div id="respond">
</div>
</div>
<div id="column">
<div class="subnav">
<h2>App Navigation</h2>
<ul>
<li><a href="Password.jsp">Change Password</a></li>

<li><a href="Comments.jsp">Write comment</a></li>


</ul>
<ul>
</br></br>
<h6>Selected Notifications</h6>
<% if(r1.equalsIgnoreCase("y"))
{%><li><a href="OpenInNewTab();">Exam Result</a></li><%}%>

<% if(r2.equalsIgnoreCase("y"))
{%><li><a href="OpenInNewTab();">Revaluation Result</a></li><%}%>

Division of Computer Science


57
Student Alert System

<% if(r3.equalsIgnoreCase("y"))
{%><li><a href="">Fee </a></li><%}%>
<% if(r4.equalsIgnoreCase("y"))
{%><li><a href="">Time Table</a></li><%}%>

<% if(r5.equalsIgnoreCase("y"))
{%><li><a href="opentabsylab();">Syllabus</a></li><%}%>
<% if(r6.equalsIgnoreCase("y"))
{%><li><a href="events();">SOE Events</a></li><%}%>
</ul>
</div>
<div class="holder">
<img class="imgr" src="PHOTOS/usr.jpg" alt="" width="300" height="300" />
</div>
<div id="featured">
</div>
</div>
<div class="clear"></div>
</div>
</div>
<!--
###############################################################################
######################## -->
<div class="wrapper row5">
<div id="footer" class="clear">
<div class="foot_contact">
<h2>COCHIN UNIVERSITY OF SCIENCE AND TECHNOLOGY</h2>
<address>
DIVISION OF COMPUTER SCIENCE</br>
SCHOOL OF ENGINEERING<br />
SOUTH KALAMASSERY<br />
COCHIN<br />
682022
</address>
</div>
<div class="footbox">
</div>

Division of Computer Science


58
Student Alert System

<!--
###############################################################################
######################## -->

<div class="footbox">
</div>
<div>
</div>
</div>
</div>
<!--
###############################################################################
######################## -->

<div class="wrapper">
<div id="copyright" class="clear">
<p class="fl_left">Copyright &copy; 2014 - All Rights Reserved - </p>
</div>
</div>
</body>
</html>

Division of Computer Science


59
Student Alert System

SCREENSHOT
 USER INTERFACE

Division of Computer Science


60
Student Alert System

 CHANGE PASSWORD

 WRITE COMMENT

Division of Computer Science


61
Student Alert System

ADMIN INTERFACE

Upon login the admin is redirected to the admin interface page. This page
provides facility to the admin to cofirm new registrations and manage existing
users.

CONFIRM
CONFIRM
USER
VIEW

SEARCH
MANAGE
USER
BLOCK

ADMIN
INTERFACE

PUBLIC
SEND
NOTIFICATION
GROUP

EVENT
MANAGEMENT

Fig 5.3: Admin Module

Division of Computer Science


62
Student Alert System

CODE

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" lang="EN" dir="ltr">


<head profile="http://gmpg.org/xfn/11">
<title>STUDENT ALERT SYSTEM</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="imagetoolbar" content="no" />
<link rel="stylesheet" href="styles/layout.css" type="text/css" />
</head>
<body id="top">
<div class="wrapper row1">
<div id="header" class="clear">
<div class="fl_left">
<h1><a href="#">STUDENT ALERT SYSTEM</a></h1>
</div>
</div>
</div>
<!--
###############################################################################
######################## -->
<div class="wrapper row2">
<div id="topnav">
<ul>
<li><a href="index.html">Homepage</a></li>
<li><a href="#">Send Notification</a>
<ul>
<li><a href="Pnotification.jsp">Public </a></li>
<li><a href="Gnotification.jsp">Group</a></li>
</ul>
</li>
<li ><a href="gallery.html">Gallery</a></li>
<li class="last"><a href="Logout.jsp">Logout</a></li>
</ul>
<div class="clear"></div>
</div>
</div>

Division of Computer Science


63
Student Alert System

<!--
###############################################################################
######################## -->

<div class="wrapper row4">


<div id="container" class="clear">
<!--
###############################################################################
######################## -->

<div id="content">
<h1><b> WELCOME ADMIN....</b></h1></br>

<ul>
<li><a href="Confirm.jsp">Confirm Students</a></li></br>
<li><a href="Manage.jsp">Manage Students</a></li></br>
<li><a href="EvtManage.jsp">Event Management</a></li>
</ul>
</div>
<div id="column">
<div class="subnav">
<img class="imgr" src="PHOTOS/adm.jpg" alt="" width="600" height="350" />
</div>
<div class="holder">
</div>
</div>
<div class="clear"></div>
</div>
</div>
<div class="wrapper row5">
<div id="footer" class="clear">
<!--
###############################################################################
######################## -->

<div class="foot_contact">
<h2>COCHIN UNIVERSITY OF SCIENCE AND TECHNOLOGY</h2>
<address>

Division of Computer Science


64
Student Alert System

DIVISION OF COMPUTER SCIENCE</br>


SCHOOL OF ENGINEERING<br />
SOUTH KALAMASSERY<br />
COCHIN<br />
682022
</address>
<ul>

<li></li>
</ul>
</div>
<div class="footbox">
</div>
<div class="footbox">
</div>
</div>
</div>
<!--
###############################################################################
######################## -->
<div class="wrapper">
<div id="copyright" class="clear">
<p class="fl_left">Copyright &copy; 2014 - All Rights Reserved - </p>

</div>
</div>
</body>
</html>

Division of Computer Science


65
Student Alert System

SCREENSHOT
 ADMIN INTERFACE

 CONFIRM PAGE

Division of Computer Science


66
Student Alert System

 VIEW USER

 MANAGE PAGE

Division of Computer Science


67
Student Alert System

 PUBLIC NOTIFICATION

 GROUP NOTIFICATION

Division of Computer Science


68
Student Alert System

REGISTRATION

New users must register themselves for subscribing this service to receive
alerts. Once the admin confirms their registration, they can login to their
profile.

CODE

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" lang="EN" dir="ltr">


<head profile="http://gmpg.org/xfn/11">
<title>STUDENT ALERT SYSTEMS</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="imagetoolbar" content="no" />
<link rel="stylesheet" href="styles/layout.css" type="text/css" />
<script>
function validateform()
{
var x=document.forms["myForm1"]["txt1"].value;

if(x===null || x==="")
{
alert("Name field cannot be empty");
return false;

}
var y=document.forms["myForm1"]["txt5"].value;
if(y===null || y==="")
{
alert("Email field cannot be empty");
return false;
}

var atpos=y.indexOf("@");
var dotpos=y.lastIndexOf(".");
if(atpos<1 || dotpos<atpos+2 || dotpos+2>=y.length)
{

Division of Computer Science


69
Student Alert System

alert("Not a valid email address");


return false;
}

var r=document.forms["myForm1"]["txt4"].value;

if(r===null || r==="")
{
alert("Register no. cannot be empty");
return false;

if(r.length!==8)
{
alert("Not a valid register no.");
return false;
}
var p=document.forms["myForm1"]["txt6"].value;

if(p===null || p==="")
{
alert("Phone no cannot be empty");
return false;
}
for(j=0,f=0,flag=0,i=0;j<=p.length||i<=r.length;i++,j++)
{
if(!(p.charAt(j)>=0&& p.charAt(j)<=9))
f++;
if(!(r.charAt(i)>=0&& r.charAt(i)<=9))
flag++;

}
if(flag!==0)
{
alert("Only numbers allowed in register no.");

Division of Computer Science


70
Student Alert System

return false;
}
if(f!==0)
{
alert("Only numbers allowed in phone no");
return false;
}

if(p.length!==10)
{
alert("Not a valid phone no.");
return false;
}

}
</script>
</head>
<body id="top">
<div class="wrapper row1">
<div id="header" class="clear">
<div class="fl_left">
<h1><a href="#">STUDENT ALERT SYSTEM</a></h1>
</div>
</div>
</div>
<div class="wrapper row2">
<div id="topnav">
<ul>
<li><a href="index.html">Homepage</a></li>
<li><a href="gallery.html">Gallery</a></li>
<li class="last"><a href="Logout.jsp">Logout</a></li>
</ul>
<div class="clear"></div>
</div>
</div>
<div class="wrapper row4">

Division of Computer Science


71
Student Alert System

<div id="container" class="clear">


<!--
###############################################################################
######################## -->
<div id="content">
<h1><b>REGISTRATION FORM</b></h1>
<div id="comments">
</div>
<div id="respond">
<form name="myForm1" action="AddUserAction" onsubmit="return
validateform()"method="post">
<center>
<table>
<tr><td> NAME::</td><td><input type="text" name="txt1" value="" /></td></tr>
<tr><td>BRANCH::</td><td><select name="txt2">
<option>Select an option</option>
<option>CIVIL ENGINEERING</option>
<option>COMPUTER SCIENCE & ENGINEERING</option>
<option>ELECTRICAL & ELECTRONICS ENGINEERING</option>
<option>ELECTRONICS & COMMUNICATION ENGINEERING</option>
<option>MECHANICAL ENGINEERING</option>
<option>INFORMATION TECHNOLOGY</option>
<option>FIRE AND SAFETY ENGINEERING</option>
</select></td></tr>
<tr><td> CURRENT SEMESTER::</td><td><select name="txt3">
<option>Select an option</option>
<option>S1 & S2</option>
<option>S3</option>
<option>S4</option>
<option>S5</option>
<option>S6</option>
<option>S7</option>
<option>S8</option>
</select></td></tr>

<tr><td> REGISTER NO::</td><td><input type="text" name="txt4" value=""


/></td></tr>

Division of Computer Science


72
Student Alert System

<tr><td>EMAIL ID::</td><td> <input type="text" name="txt5" value=""


/></td></tr>
<tr><td> PHONE NO::</td><td>+91<input type="text" name="txt6" value=""
/></td></tr>
<tr></tr><tr><td></td><td><input type="submit" value="SUBMIT" /></td></tr>
</table>
</center>
</form>
</div>
</div>
<div id="column">
<div class="subnav">
</ul></div>
<div class="holder"></div>
<div id="featured">
</ul>
</div>
<div class="holder">

</div>
</div>
<div class="clear"></div>
</div>
</div>
<div class="wrapper row5">
<div id="footer" class="clear">

<div class="foot_contact">
<h2>COCHIN UNIVERSITY OF SCIENCE AND TECHNOLOGY</h2>
<address>
DIVISION OF COMPUTER SCIENCE</br>
SCHOOL OF ENGINEERING<br />
SOUTH KALAMASSERY<br />
COCHIN<br />
682022 </address>
</div>
<div class="footbox">

Division of Computer Science


73
Student Alert System

</div>
<div class="footbox">
</div>
<div class="footbox last">
</div>
</div>
</div>
<div class="wrapper">
<div id="copyright" class="clear">
<p class="fl_left">Copyright &copy; 2014 - All Rights Reserved - </p>
</div>
</div>
</body>
</html>

SCREENSHOT

 REGISTRATION PAGE

Division of Computer Science


74
Student Alert System

SMS & E-MAIL NOTIFICATIONS

The user receives notifications as the college website is updated.

CODE FOR SENDSMS

package com.sms;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.util.Date;
public class SendSms {
public void sendSmstouser(String mobnumber,String type,String msg)
{
try {
Date mydate = new Date(System.currentTimeMillis());
String data = "";
data += "method=sendMessage";
data += "&userid=2000022557"; // your loginId
data += "&password=" +URLEncoder.encode("lakhotia123", "UTF-8"); // your passworddata
data+= "&msg=" + URLEncoder.encode("Type of Message: " +type+" Message: "+msg+" Date
"+ mydate.toString(), "UTF-8");
data += "&send_to=" +URLEncoder.encode(mobnumber, "UTF-8"); // a valid 10 digit phone no.
data += "&v=1.1" ;
data += "&msg_type=TEXT"; // Can by "FLASH" or"UNICODE_TEXT" or “BINARY”
data += "&auth_scheme=PLAIN";
URL url = new URL("http://enterprise.smsgupshup.com/GatewayAPI/rest?" + data);
HttpURLConnection conn =
(HttpURLConnection)url.openConnection();
conn.setRequestMethod("GET");
conn.setDoOutput(true);
conn.setDoInput(true);
conn.setUseCaches(false);
conn.connect();

Division of Computer Science


75
Student Alert System

try (BufferedReader rd = new BufferedReader(new


InputStreamReader(conn.getInputStream()))) {
String line;
StringBuilder buffer = new StringBuilder();
while ((line = rd.readLine()) != null){
buffer.append(line).append("\n");
}
System.out.println(buffer.toString());
}

conn.disconnect();
}
catch(IOException e){
}
}
}

CODE FOR TESTSMS


<%--
Document : testsms
Created on : Mar 15, 2014, 3:40:39 PM
Author : lenovo
--%>
<%@page import="com.mailsetting.SendMail"%>
<%@page import="com.sms.SendSms"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1> </h1>
<%

Division of Computer Science


76
Student Alert System

SendSms s=new SendSms();


s.sendSmstouser("9895361525","Fee","Last Date on 24-03-2013");
%>
</body>
</html>

SCREENSHOT

Division of Computer Science


77
Student Alert System

CHAPTER 6

SYSTEM TESTING
Testing is a set activity that can be planned and conducted systematically. Testing
begins at the module level and work towards the integration of entire computers
based system. For testing our software we test each and every path that user can
go at any point in the lifetime of the system .Nothing is complete without testing,
as it is vital success of the system.

There are several rules that can serve as testing objectives, they are

1. Testing is a process of executing a program with the intent of finding an error

2. A good test case is one that has high probability of finding an undiscovered
error.

3. A successful test is one that uncovers an undiscovered error.

If testing is conducted successfully according to the objectives as stated above, it


would uncover errors in the software. Also testing demonstrates that software
functions appear to the working according to the specification, that performance
requirements appear to have been met.
The entire testing process can be divided into 3 phases

1. Unit Testing
2. Integration Testing
3. Final/ System testing

Division of Computer Science


78
Student Alert System

6.1 UNIT TESTING

In unit testing we had tested every single part that is the forms of the software.
We did this simultaneously while the project is being built. The test data was
given to each and every module in all respects and got the desired output. Each
module has been tested found working properly. Then the various sets of input
values are devised with various combinations of inputs being out of range.

6.2 INTEGRATION TESTING

In this, all the Code Modules were tested individually one after the other.
Software is written in JSP, so it is a collection of pages. So we tested each and
every page carefully with various sets of input values with various combinations
of inputs being out of range. And we found all the components in the module
are working perfectly. In our case all the modules were combined and given the
test data. The combined module works successfully without any side effect on
other programs.

6.3. FINAL/SYSTEM TESTING

In this the entire system was tested as a whole with all forms, code, modules and
class modules. Popularly known as Black Box testing or system testing, it focus
on the functional requirement of the software. That is, Black Box testing enables
the software engineer to derive sets of input conditions that will fully exercise all
functional requirements for a program. Black Box testing attempts to find errors
in: incorrect or missing functions, interface errors, errors in data structures or

Division of Computer Science


79
Student Alert System

external database access, performance errors, initialization errors and termination


errors. Various sets of input values are devised with various combinations of
inputs being out of range.

Fig 6.1: System testing examples

Division of Computer Science


80
Student Alert System

CHAPTER 7

CONCLUSION

The project report entitled ”STUDENT ALERT SYSTEM” has been completed.
The system has been developed with much care that it is free of errors and at the
same time it is efficient and less time consuming. The purpose of this project
was to send sms and mail alerts to the students when there is any new update
in the college website and also provide facilities for selecting required
notifications.

The important thing is that the system is robust. We have tried our level best to
make the system as dynamic as possible. This project helped us in gaining
valuable information on several topics like web page design principle, handling
the user interface in a powerful way, to access the various pages across the
application etc. The entire system is secured. Also JSP and HTML are gaining
rapid acceptance as means to provide dynamic content on the Internet.
Running from the server in the secure manner, the application processes are also
limitless.

More than anything this project has given us great satisfaction in having designed
an application, which processes information from university to the students. This
system transfers the user’s needs into a software solution and saves their precious
time .This online system can be approved by the college and if it is implemented
it will be much useful for student.

Division of Computer Science


81
Student Alert System

There is a scope for further development in our project in terms of functionality


for users. The admin can track each user by their register no. and can be provided
only their specific details. Also other facilities such as hostel allotment, digital
library facility can be integrated with this project so that it becomes a single stop
solution for the students. Student communication with the admin as well as other
students can also be implemented.

Division of Computer Science


82
Student Alert System

REFERENCES

[1] Cody Lindley ” JavaScript Enlightenment”, -First Edition, based on JavaScript


1.5, ECMA-262, Edition.

[2] Herbert Schildit, Mc GrawHill’s, “Java: The complete reference” 7th Edition.

[3] Jaison Falkner and Kevin Jones,” Servlets and JavaServer Pages: The J2EE
Technology Web Tier” 2004.

[4 Mahesh P. Matha,”Jsp And Servlets: A Comprehensive Study”.

[5] Maxine Sherrin and John Allsopp “Complete CSS Guide”, -O'Reilly Media;
September 2012.

[6]Fundamentals of java mail API


http://www.digilife.be/quickreferences/pt/fundamentals of the javamail api.pdf
http://www.javatpoint.com/.

[7]Servlets and Jsp


http://courses.coreservlets.com/Course-Materials/csajsp2.html

[8]Sending SMS from java


http://www.ozekisms.com/index.php?owpn=112

Division of Computer Science


83

S-ar putea să vă placă și