Electronic Shopstream
Electronic Shopstream
SHOPSTREAM
INDEX
1.INTRODUCTION
1.1 ABSTRACT………………………………….. 01
2.SYSTEM REQUIREMENTS
3.SYSTEM DESIGN
5.1 CONCLUSION.................................................... 15
6. 6.1 BIBLIOGRAPHY………………………………………… 17
6.2 APPENDIX-I………………………………………….… 18
6.3 APPENDIX-II…………………………………………….. 26
1.1 ABSTRACT:
In the advent of the information era, e-commerce has developed rapidly and has become signifi-
cant for every business. With the advanced information technologies, firms are now able to col-
lect and store mountains of data describing their myriad offerings and diverse customer profiles,
from which they seek to derive information about their customers’ needs and wants. Traditional
forecasting methods are no longer suitable for these business situations. This research used the
principles of data mining to cluster customer segments by using K-Means algorithm and data
from web log of various e-commerce websites consequently, the results showed that there was a
clear distinction between the segments in terms of customer behavior.
1.2 ABOUT THE PROJECT:
The web server log analysis system is a project that involves designing and developing a soft-
ware system to collect, process, and analyze web server logs generated by an eCommerce web-
site. The system is aimed at providing valuable insights and metrics about website usage, perfor-
mance, and user behavior .The project will require expertise in software development, data anal-
ysis, and web server technologies. The system can be developed using programming languages
such as Java, and can leverage popular open-source tools such as Netbeans. The project will in-
volve several stages such as requirements gathering, system design, implementation, testing, and
deployment. The project team will need to work closely with the stakeholders to ensure that the
system meets their needs and requirements. In conclusion, the eCommerce based web server log
analysis system is a complex project that involves several key components and stages. The sys-
tem will provide valuable insights and metrics to help optimize website performance, improve
user experience, and ensure website security.
CHAPTER - 2
SYSTEM REQUIREMENTS:
Collecting consumer information seemed have been available, but still how to analyze
these data effectively is of interest to marketers and researchers. All the analysis is done
manually. This would take a lot of time. Thus calculations had done manually have some
errors. Retrieve data’s from data base and analyzing these data’s are very complex
process. So to solve these problems we are going for proposed system. Some of the dis-
advantages of existing system are given below.
The existing systems of securing online reputation system falls under four major cate-
gories. They are as follows:
In the first category, the defense approaches limit the maximum number of ratings each
user could provide within certain time duration. Such type of approaches actually restricts
the rating power of each user ID. This can prevent the attackers from inserting a large
amount of dishonest ratings through a few user IDs within a short time.
In the second category, the defense schemes aim to increase the cost of launching an at-
tack.
In the third category, the defense approaches investigate rating statistics. They consider
ratings as random variables and assume dishonest ratings have statistical distributions dif-
ferent from normal ratings.
The defense approaches in the fourth category investigate users’ rating behaviors. Assum-
ing that users with bad rating history tend to provide dishonest ratings, such approaches
determine the weight of a rating based on the reputation of the user who provides this rat -
ing. Such reputation is also referred to as trust or reliability.
Manual work
Security of information is low
A lot of time consumed
Needs of lot of manpower
Frequent occurrence of error
Time domain
Majority rule
The traditional methods for predicting and analyzing customer demands have found a wide range
of applications. They are mainly used for predicting the total quantity of products that belong to
the same family rather than the relationship between the different customer groups and associ-
ated product groups. This paper clusters customer segments by using K-Means algorithm and
data from web log of various e-commerce websites. Consequently, the results showed that there
was a clear distinction between the segments in terms of customer behavior. It is seen that this
data mining model can serve as an efficient vehicle for firms not only to predict the products or
services that should be provided or improved for their target customer groups, but also to identify
the right customers for a specific product family or service.
In this work, we propose a reputation defense scheme, TATA. The objective of the proposed
scheme is to :
(1) Detect the malicious users who provide dishonest ratings.
(2) Recover reputation score of the target item, that receives dishonest ratings,
(3) Avoid interference to normal items’ reputation scores.
We propose a change detector in TATA as the anomaly detector, which takes the rating sequences
as inputs and detects changes occurring in the rating sequences. The proposed change detector
will detect not only sudden rapid changes but also small changes accumulated over time. In this
way, even if malicious users insert dishonest ratings with small shifts to gradually mislead items’
reputation scores, such type of changes will still be accumulated and finally be detected by the
proposed change detector.
ADVANTAGES OF PROPOSED SYSTEM:
A feasibility study is an evaluation of the practicality and viability of a proposed project. In the
case of a web server log analysis system, a feasibility study would assess whether such a system
is viable and practical to implement. Here are some factors that would be considered in a feasi -
bility study for a web server log analysis system:
The system should be able to collect, process and analyze web server logs to provide useful in-
sights and metrics about website usage, performance and user behavior. The system should be
able to perform the following tasks:
2.6.1 Log collection: The system should be able to collect web server logs generated by the
eCommerce website. This can be done through the use of log files or by integrating with the
website's web server software to collect real-time logs.
2.6.2 Log processing: The system should be able to parse and process the collected logs to ex-
tract relevant information such as user IP addresses, request URLs, response codes, timestamps,
user agents, and other relevant data.
2.6.3 User Behavior Analysis: The system should be able to analyze user behavior by tracking
user activities such as page views, clicks, searches, and purchases. This can help in identifying
popular pages and products, user preferences, and shopping patterns.
2.6.4 Performance Analysis: The system should be able to analyze web server performance by
tracking metrics such as response time, server errors, and server load. This can help in identify -
ing bottlenecks and optimizing server performance.
2.6.5 Security Analysis: The system should be able to detect and report security threats such as
hacking attempts, brute force attacks, and DDoS attacks. This can help in ensuring the security
and integrity of the eCommerce website.
2.6.6 Reporting and Visualization: The system should be able to generate reports and visual-
izations to present the analyzed data in a clear and understandable manner. This can help in iden-
tifying trends, making informed decisions, and optimizing website performance.
Overall, web server log analysis system should provide valuable insights and metrics to help op-
timize website performance, improve user experience, and ensure website security
Database : MYSQL
CHAPTER - 3
3.SYSTEM DESIGN
3.1 TABLE DESIGN:
3.2 DATA FLOW DIAGRAM:
3.3 ENTITY RELATIONSHIP DIAGRAM
CHAPTER- 4
4.IMPLEMENTATION AND TESTING
Unit methodology is done during the development process by the software developers
QA staff. testing is a software development process in which the smallest testable parts
of an application, called units, are individually and independently scrutinized for proper
operation. This testing The main objective of unit testing is to isolate written code to test
and determine if it and sometimes works as intended.
Unit testing involves the design of test cases that validate that the internal program logic
is functioning properly, and that program inputs produce valid outputs. All decision
branches and internal code flow should be validated. It is the testing of individual
software units of the application .it is done after the completion of an individual unit
before integration. This is a structural testing, that relies on knowledge of its construction
and is invasive. Unit tests perform basic tests at component level and test a specific
business process, application, and/or system configuration. Unit tests ensure that each
unique path of a business process performs accurately to the documented specifications
and contains clearly defined inputs and expected results.
Unit testing is usually conducted as part of a combined code and unit test phase of the
software lifecycle, although it is not uncommon for coding and unit testing to be
conducted as two distinct phases.
Integration testing is testing in which software modules are logically integrated and tested
as a whole group. A typical software project consists of multiple software modules coded
by different programmers. This testing aims to find bugs in the software modules when
they are integrated.
Integration tests are designed to test integrated software components to determine if they
actually run as one program. Testing is event driven and is more concerned with the
basic outcome of screens or fields. Integration tests demonstrate that although the
components were individually satisfaction, as shown by successfully unit testing, the
combination of components is correct and consistent. Integration testing is specifically
aimed at exposing the problems that arise from the combination of components.
The task of the integration test is to check that components or software applications, e.g.
components in a software system or – one step up – software applications at the company
level – interact without error.
Test Results: All the test cases mentioned above passed successfully. No defects
encountered.
4.3 SYSTEM TESTING
System Testing is a level of testing that validates the complete and fully integrated
software product. The purpose of a system test is to evaluate the end-to-end system
specifications. Usually, the software is only one element of a larger computer-based
system. Ultimately, the software is interfaced with other software/hardware systems.
System Testing is defined as a series of different tests whose sole purpose is to exercise
the full computer-based system.
System testing ensures that the entire integrated software system meets requirements.
It tests a configuration to ensure known and predictable results. An example of system
testing is the configuration oriented system integration test. System testing is based on
process descriptions and flows, emphasizing pre-driven process links and integration
points.
Validation testing is the process of assessing a new software product to ensure that its
performance matches consumer needs. Product development teams might perform
validation testing to learn about the integrity of the product itself and its performance
in different environments.
The purpose of this testing is to discover errors. Testing is the process of trying to
discover every conceivable fault or weakness in a work product. It provides a way to
check the functionality of components, sub assemblies, assemblies and/or a finished
product It is the process of exercising software with the intent of ensuring that the
Software system meets its requirements and user expectations and does not fail in an
unacceptable manner. There are various types of test. Each test type addresses a
specific testing requirement.
CHAPTER-5
5.1 CONCLUSION
In conclusion, an e-commerce web server log analysis system is a valuable tool that can
provide important insights into online customer behavior, purchasing patterns, and overall
website performance. By analyzing the logs generated by web servers, these systems can help e-
commerce businesses optimize their websites, identify and fix issues, and improve the customer
experience. An e-commerce web server log analysis system can provide a wealth of information,
including data on the number of visitors to a site, the pages they visited, the products they
viewed and purchased, the time spent on the site, and much more. This information can be used
to optimize website design, improve website performance, and increase sales and customer
loyalty. There are various e-commerce web server log analysis tools and platforms available,
ranging from open-source solutions to enterprise-grade systems with advanced features and
capabilities.Overall, an e-commerce web server log analysis system can be a critical component
of any e-commerce business strategy, providing valuable insights into customer behavior and
website performance that can help drive revenue and growth. By leveraging the data generated
by web server logs, e-commerce businesses can make informed decisions about how to imp0rove
their websites, optimize their marketing efforts, and ultimately achieve their business goal.
In future work,we plan to construct an enhanced version of a web server log analysis system
for various kinds of operation,as well as it reduces a overall communication overhead. Overall,
web server log analysis system will provide valuable insights and metrics to help optimize web-
site performance, improve user experience, and ensure website security. The results showed that
there was a clear distinction between the segments in terms of customer behavior. It is seen that
this data mining model can serve as an efficient vehicle for firms not only to predict the products
or services that should be provided or improved for their target customer groups, but also to
identify the right customers for a specific product family or service.
CHAPTER-6
6.BIBLIOGRAPHY
6.1 BIBLIOGRAPHY
[1] Dilip sisodia and shrish warma ”Web Usage Pattern Analysis Through Web Logs: A
Review”2012 ninth international conference on computer science and engineering.
[3] Wichian Premchaiswadi“ Extracting WebLog of Siam University for Learning User Behavior
on mapreduce” 4th International Conference on Intelligent and Advanced Systems (ICIAS2012)
[5] Chen Hu, Xuli Zong, Chung-wei Lee and Jyh-haw Yeh, “World WideWeb Usage Mining
Systems and Technologies”, Systemic, Cyberneticsand Informatics Vol. 1 – Number 4.
[6] The Apache Software Foundation, “Log files,” http:// httpd apache.org/ docs/ 1.3/ logs.html,
2010.
[7] Yuan, F., L.-J. Wang, et .al. (2003). Study on DataPreprocessing Algorithm in Web Log
Mining. Proceedingsof the Second International Conference on Machine Learningand
Cybernetics, Wan, 2-5 November 2003.
[8] Thomas Reidemeister, Miao Jiang and Paul A.S. Ward (2011). Mining Unstructured Log
Files for Recurrent Fault Diagnosis 12th IFIP/IEEE 1M 2011: Mini Conference
APPENDIX-1
ADMIN
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Admin</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="bg1">
<div id="header">
<h1>WEB SERVER LOG ANALYSIS SYSTEM</h1>
</div>
<!-- end #header -->
</div>
<!-- end #bg1 -->
<div id="bg2">
<div id="header2">
<div id="menu">
<ul>
<li><a href="Additem23.jsp">Add New Item</a></li>
<li><a href="ProductView.jsp">Product View Details</a></li>
<li><a href="UserdetailsView.jsp">User Details</a></li>
<li><a href="RatingEdit.jsp">Rating</a></li>
<li><a href="DatabaseCharts">Graph</a></li>
<li><a href="Home1.jsp">Logout</a></li>
</ul>
</div>
<!-- end #menu -->
<!-- end #search -->
<!-- end #header2 -->
<!-- end #bg2 -->
<!-- end #content -->
</center>
<!-- end #sidebar -->
<!-- end #page -->
<!-- end #bg3 -->
<div id="footer">
</div>
<!-- end #footer -->
<div style="position:absolute; top:235px; left:226px; width: 125px; height:221px;">
<img src="images/shop1.jpg" height="500"width="900"/>
</div>
</body>
</html>
HOME PAGE
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="button.js">
</script>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>WEB SERVER LOG ANALYSIS SYSTEM</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<script>
$(document).ready(function(){
$("button").click(function(){
$("#div1").fadeIn();
$("#div2").fadeIn("slow");
$("#div3").fadeIn(3000);
});
});
</script>
</head>
<body>
<div id="bg1">
<div id="header">
<h1>WEB SERVER LOG ANALYSIS SYSTEM</h1>
</div>
<div id="bg2">
<div id="header2">
<div id="menu">
<ul>
<li><a href="Login.jsp">Admin Login</a></li>
<li><a href="Userlogin.jsp">User Login</a></li>
</ul>
</div>
<!-- end #menu -->
<!-- end #search -->
</div>
<!-- end #header2 -->
</div>
<!-- end #bg2 -->
<div style="position:absolute; right:430px; top:300px; left:400px; width: 125px;
height:221px;">
<font color="red" size="+1">
<strong></strong>
</div>
<div style="position:absolute; right:230px; top:230px; left:430px; width: 125px;
height:221px;">
<font color="red" size="+1">
</font>
</div>
<div class="box search">
<div style="position:absolute; right:550px; top:300px; left:200px; width: 125px;
height:221px;">
<form action="product3.jsp">
<p>
<%
String sql = "SELECT distinct(productname) FROM `securing`.`additem`;";
System.out.println(";;;;;;;;;;;;;;;" + sql);
PreparedStatement pst = null;
Connection conn = null;
try {
Class.forName("com.mysql.jdbc.Driver");
conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/securing", "root", "root");
pst = conn.prepareStatement(sql);
ResultSet rs = pst.executeQuery();
while (rs.next()) {%>
<%}
} catch (Exception e) {
}%>
</p>
</form>
<div align="center"
</div>
<div style="position:absolute; top:20px; left:200px; width: 125px; height:221px;">
<fieldset>
<h1></h1>
<img src="images/online-shopping.jpg" height="300"width="600"/></fieldset>
</div>
<!-- end #content -->
<div id="sidebar">
</div>
<!-- end #sidebar -->
<div
<%-- <p><strong>VIEW RATING</strong></p>
<p><a href="rating3.jsp">Best(5star)View</a></p>
<p><a href="Mobiles.jsp">Good(3star)View</a></p>
<p><a href="cart2.jsp">Average(1star)View</a></p>--%>
</div>
<!-- end #page -->
</div>
<!-- end #bg3 -->
<div id="footer">
</div>
<!-- end #footer -->
</div>
<div style="position:absolute; right:250px; top:30px; left:870px; width: 125px; height:221px;">
</div>
<div style="position:absolute; right:150px; top:180px; left:730px; width: 125px;
height:221px;">
<font color="red" size="+0"><font></div>
<div style="position:absolute; right:140px; top:300px; left:430px; width: 125px;
height:221px;">
<div style="position:absolute; right:250px; top:60px; left:700px; width: 125px; height:221px;">
<%-- <p><a href="rating3.jsp">Best(5star)View</a></p>
<p><a href="Mobiles.jsp">Good(3star)View</a></p>
<p><a href="cart2.jsp">Average(1star)View</a></p>--%>
</div>
</body>
</html>
LOGIN
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Admin Login</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div id="bg1">
<div id="header">
<h1>WEB SERVER LOG ANALYSIS SYSTEM</h1>
</div>
<!-- end #header -->
</div>
<!-- end #bg1 -->
<div id="bg2">
<div id="header2">
<div id="menu">
<ul>
<li><a href="Home1.jsp">Home</a></li>
</ul>
</div>
<!-- end #menu -->
<div id="search">
</div>
<!-- end #search -->
</div>
<!-- end #header2 -->
</div>
<!-- end #bg2 -->
<%--
Document : Login
Created on : Oct 22, 2013, 11:51:03 AM
Author :m
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<fieldset> <center>
<br> <h1><strong>WELCOME TO ADMIN</strong></h1></br>
<table >
<form action ="Actionadmin.jsp" method ="get">
<tr><td> <label> Username</label> </td></tr>
<td> <input type="text" name
="username"style="font-family: fantasy;width: 180px;height: 25px"/></td></tr>
<tr><td> <label> Password</label> </td></tr>
<tr> <td> <input type="password"
name="password"style="font-family: fantasy;width: 180px;height: 25px"/></td></tr>
<tr></tr> <tr></tr> <tr></tr>
<tr><td><label> <input type="submit"
value="Login"style="font-family: fantasy;width: 90px;height: 30px"/>
<input type="reset" value="Clear"style="font-family: fantasy;width: 90px;height:
30px"/></td></tr>
</form>
</table></fieldset>
</center>
</body>
</html>
<!-- end #sidebar -->
<div style="clear: both; height: 40px;"> </div>
</div>
<!-- end #page -->
</div>
</div>
</div>
<!-- end #bg3 -->
<div id="footer">
</div>
<!-- end #footer -->
<div style="position:absolute; right:0px; top:280px; left:200px; width: 125px; height:221px;">
<img src="images/log.png" height="180"width="160"/>
</div>
</body>
</html>
RATING
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Rating Values</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="bg1">
<div id="header">
<h1>WEB SEREVER LOG ANALYSIS SYSTEM</h1>
</div>
<!-- end #header -->
</div>
<!-- end #bg1 -->
<div id="bg2">
<div id="header2">
<li><a href="Admin.jsp">Home</a></li>
</div>
<div id="menu">
<ul>
</ul>
</div>
<!-- end #menu -->
<div id="search">
</div>
<!-- end #search -->
</div>
<!-- end #header2 -->
</div>
<!-- end #bg2 -->
<div align="center"
<h1>WEB SERVER LOG ANALYSIS SYSTEM</h1>
<table border="7" cellspacing="10">
<tr>
<td><strong>USER NAME</strong></td>
<td><strong>FEEDBACK ABOUT ITEM</strong></td>
<td><strong>RATING</strong></td>
<td><strong>RATING VALUES</strong></td>
<td><strong>COMMENTS</strong></td>
<td><strong>IP ADDRESS</strong></td>
<td><strong>DATE/TIME</strong></td>
</tr>
<%
String pass = null, feedback = null, id = null, name = null, dob = null, mail = null, location =
null, contactno = null, rating = null, ratingvalues = null, comments = null, ipaddr = null,
date_time = null;
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/securing", "root",
"root");
// Statement st = con.createStatement();
Statement st1 = con.createStatement();
// ResultSet rs = st.executeQuery("select * from register");
ResultSet rs1 = st1.executeQuery("select * from feed");
while (rs1.next()) {
name = rs1.getString("name");
feedback = rs1.getString("feedback");
rating = rs1.getString("rating");
ratingvalues = rs1.getString("ratingvalues");
comments = rs1.getString("comments");
ipaddr = rs1.getString("ipaddr");
date_time = rs1.getString("date_time");
%>
<tr>
<td><%=name%></td>
<td><%=feedback%></td>
<td><%=rating%></td>
<td><%=ratingvalues%></td>
<td><%=comments%></td>
<td><%=ipaddr%></td>
<td><%=date_time%></td>
</tr>
<%
}
%>
</table>
</div>
</body>
<!-- end #sidebar -->
</div>
<!-- end #page -->
</div>
</div>
</div>
<!-- end #bg3 -->
<div id="footer">
</div>
<!-- end #footer -->
</body>
</html>
REGISTRATION
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Registration</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
<script language="JavaScript">
function valid(){
var var1 = document.f.name.value;
var var2= document.f.pass.value;
var var3 = document.f.date.value;
var var4=document.f.mail.value;
var var5=document.f.location.value;
var var6=document.f.contact.value;
var var7 =document.f.card.value;
// var pl = document.getElementById("locations").value;
// var mo = document.getElementById("mobile").value;
// var ca = document.getElementById("card").value;
// alert(mo);
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
var mob = /^[1-9]{1}[0-9]{10}$/;
if (var1 == "")
{
alert("Enter Name");
document.f.name.value;
return false;
}
if(var2=="")
{
alert("Enter pass");
document.f.pass.value;
return false;
}
if(var3=="")
{
alert("Enter date of birth");
document.f.date.value;
return false;
}
if(var4==""){
alert("enter email");
// document.getElementById("mails").value;
return false;
}
if (!filter.test(var4)) {
alert('Please provide a valid email address');
// email.focus;
return false;
}
if(var5=="")
{
alert("Enter location");
document.f.location.value;
return false;
}
if(var6==""){
alert("enter mobile");
// document.getElementById("mobile").value;
return false;
}
if (isNaN(var6))
{
alert("Enter Numbers Only");
// document.getElementById("mobile").value;
return false;
}
if (!/^[0-9]{10}$/.test(var6)) {
alert("Please input exactly 10 numbers!");
// document.getElementById("mobile").value;
return false;
}
if(var7==""){
alert("enter Valid card number");
// document.getElementById("card").value;
return false;
}
if (isNaN(var7))
{
alert("Enter card Numbers Only");
// document.getElementById("card").value;
return false;
}
if (!/^[0-9]{16}$/.test(var7)) {
alert("Please input exactly 16 numbers!");
// document.getElementById("card").value;
return false;
}
var myInput = document.getElementById("psw");
var letter = document.getElementById("letter");
var capital = document.getElementById("capital");
var number = document.getElementById("number");
var length = document.getElementById("length");
// When the user clicks on the password field, show the message box
myInput.onfocus = function() {
document.getElementById("message").style.display = "block";
}
// When the user clicks outside of the password field, hide the message box
myInput.onblur = function() {
document.getElementById("message").style.display = "none";
}
// When the user starts to type something inside the password field
myInput.onkeyup = function() {
// Validate lowercase letters
var lowerCaseLetters = /[a-z]/g;
if(myInput.value.match(lowerCaseLetters)) {
letter.classList.remove("invalid");
letter.classList.add("valid");
} else {
letter.classList.remove("valid");
letter.classList.add("invalid");
}
// Validate numbers
var numbers = /[0-9]/g;
if(myInput.value.match(numbers)) {
number.classList.remove("invalid");
number.classList.add("valid");
} else {
number.classList.remove("valid");
number.classList.add("invalid");
}
// Validate length
if(myInput.value.length >= 8) {
length.classList.remove("invalid");
length.classList.add("valid");
} else {
length.classList.remove("valid");
length.classList.add("invalid");
}
}
/* if(us==""){
alert("enter username");
document.getElementById("users").value;
return false;
}
if(pa==""){
alert("enter password");
document.getElementById("pas").value;
return false;
}
if(da==""){
alert("enter date of birth");
document.getElementById("dates").value;
return false;
}
if(em==""){
alert("enter email");
document.getElementById("mails").value;
return false;
}
if (!filter.test(email)) {
alert('Please provide a valid email address');
// email.focus;
return false;
}
if(pl==""){
alert("enter place");
document.getElementById("locations").value;
return false;
}
if(mo==""){
alert("enter mobile");
document.getElementById("mobile").value;
return false;
}
if (isNaN(mo))
{
alert("Enter Numbers Only");
document.getElementById("mobile").value;
return false;
}
if (!/^[0-9]{10}$/.test(mo)) {
alert("Please input exactly 10 numbers!");
document.getElementById("mobile").value;
return false;
}
if(ca==""){
alert("enter Valid card number");
document.getElementById("card").value;
return false;
}
if (isNaN(ca))
{
alert("Enter card Numbers Only");
document.getElementById("card").value;
return false;
}
if (!/^[0-9]{16}$/.test(ca)) {
alert("Please input exactly 16 numbers!");
document.getElementById("card").value;
return false;
}
// function validateNumbers() {
// var numbers = document.getElementById("numbers").value;
// var regex = /(\d{4}-){3}\d{4}/,g
// alert(regex.test(numbers));
//var val = number.value*/
}
</script>
</head>
<body>
<div id="bg1">
<div id="header">
<h1>WEB SERVER LOG ANALYSIS SYSTEM</h1>
</div>
<!-- end #header -->
</div>
<!-- end #bg1 -->
<div id="bg2">
<div id="header2">
<div id="menu">
<ul>
<li><a href="Home1.jsp">Home</a></li>
</ul>
</div>
<!-- end #menu -->
<div id="search">
</div>
<!-- end #search -->
</div>
<!-- end #header2 -->
</div>
<!-- end #bg2 -->
<fieldset>
<div style="position:absolute; top:400px; left:150px; ">
<img src="images/user.jpg" height="200"width="300"/>
</div>
<center>
<div style="margin-center:250px; ">
<br> <h1>USER REGISTRATION </h1></br>
<table>
<%-- </select></br></td></tr>
<tr><td><br>RATING VALUES: <input type="radio"
name="rating" value="1" class="star"/>1
<input type="radio" name="rating" value="2"class="star" >2
<input type="radio" name="rating" value="3" class="star">3
<input type="radio" name="rating" value="4" class="star">4
<input type="radio" name="rating" value="5" class="star">5</td></tr> --
%>
<p> <strong>E-MAIL ID:</strong>
<input type="text"name="mail"id="mail"style="font-family: fantasy;width:
180px;height: 25px"/></p>
<p><strong>LOCATION :</strong> <input
type="text"name="location" id="location"style="font-family: fantasy;width: 180px;height:
25px"/></p>