Online Shopping System
Online Shopping System
<tr>
</tr>
<tr>
</tr>
<tr>
<td><div id="result"></div></td>
</tr>
</table>
</form>
<script type="text/javascript">
<%
if (request.getParameter("login") != null &&
request.getParameter("login").contentEquals("failed")) {
%>
<% }
%> <%
%>
<% }
%> <%
<% }
%>
</script>
%@include file="template/body_end.jsp" %
REGISTRATION
<%@page import="DataBase.DB"%>
<%@page import="java.sql.ResultSet"%>
<div class="entry">
<table>
<tr>
<td>User Name
</td>
<td><input type="text" required="" name="uname" id="uname"
/>
</td>
</tr>
<tr>
<td>Password
</td>
</td>
</tr>
<tr>
<td>Login Name
</td>
</td>
</tr>
<tr>
<td>Email
</td>
</td>
</tr>
<tr>
<td>Mobile No.
</td>
</td>
</tr>
<tr>
<td>
</td>
<td><button class="button" type="submit">Register</button>
</td>
</tr>
</table>
</form>
</div>
<script type="text/javascript">
<%
<% }
%> <%
if
(request.getParame
request.getParamet
er("reg").contentEq
uals("success")) {
%>
alert("Registration Completed")
<% }
%>
</script>
%@include file="template/body_end.jsp" %
DB REGISTRATION
<%@page import="config.Config"%>
<%@page import="java.io.File"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="DataBase.DB"%>
<%
+ request.getParameter("upass") + "'),'"
+ "user" + "','"
+ "false" + "')")) {
r.next();
+ uid + ",'"
+ request.getParameter("lname") + "','"
+ request.getParameter("emailid") + "','"
+ request.getParameter("mobno") + "')")) {
// this code generates the qr code inside the QR_Code folder in the c
drive response.sendRedirect("index.jsp?reg=success");
} else {
response.sendRedirect("register.jsp?reg=failed");
}
%>
<%@page import="DataBase.DB"%>
<%@page import="java.sql.ResultSet"%>
<%
session.setAttribute("uname", uname);
session.setAttribute("uid", r.getString("uid"));
session.setAttribute("utype",r.getString("utype")); if
(r.getString("utype").contentEquals("admin")) {
response.sendRedirect("adminindex.jsp"); } else if
(r.getString("utype").contentEquals("mod")) {
response.sendRedirect("modindex.jsp");
} else if (r.getString("utype").contentEquals("user")) {
response.sendRedirect("userindex.jsp");
} else {
session.setAttribute("uname", null);
response.sendRedirect("login.jsp?login=unknown");
} else {
response.sendRedirect("login.jsp?login=dissabled");
} else {
response.sendRedirect("login.jsp?login=failed");
%>
DATABASE CONNECTION
package DataBase;
try {
Class.forName("com.mysql.jdbc.Driver");
con =
DriverManager.getConnection("jdbc:mysql://localhost:3306/online_shoppi ng",
"root", "root");
} catch (Exception e) {
System.out.println("Exception" + e);
return con;
false;
try {
con.createStatement(); int b =
stmt.executeUpdate(query);
if (b > 0) {
f = true; } else {
f = false;
} catch (Exception e) {
System.out.println("Exception" + e);
return f;
try {
con.createStatement(); rs = stmt.executeQuery(sql);
return rs;
} catch (Exception e) {
System.out.println("Exception" + e);
return null;
}
try {
} catch (Exception e) {
System.out.println("Exception" + e);
android.app.Activity; import
android.content.res.Configuration; import
android.webkit.WebView;
webView;
@Override
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_web_view);
// set the web view chrome client and set for showing a progress bar
this.webView.setWebChromeClient(new
CustomWebChromeClient(this));
this.webView.setWebViewClient(new
CustomWebViewClient(
getApplicationContext()));
runOnUiThread(new Runnable() {
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setPluginState(PluginState.ON);
webView.loadUrl(SITE_URL_START +
SITE_URL + SITE_URL_END);
});
// screen. @Override
webView.goBack();
return true;
@Override
super.onConfigurationChanged(newConfig);
CHAPTER 4
CONCLUSION
The system has been developed with much care and free of errors and at the same
time it is efficient and less time consuming. The purpose of this project was to
develop a web application and an android application for purchasing items from a
shop.
mysql . The entire system is secured. Also the project helped us understanding
about the development phases of a project and software development life cycle.
We learned how to test different features of a project.
There is a scope for further development in our project to a great extend. A number
of features can be added to this system in future like providing moderator more
control over products so that each moderator can maintain their own products.
Another feature we wished to implement was providing classes for customers so
that different offers can be given to each class. System may keep track of history
of purchases of each customer and provide suggestions based on their history.
These features could have implemented unless the time did not limited us.
REFERENCES
[3] Complete CSS Guide ,Maxine Sherrin and John Allsopp-O'Reilly Media;
September 2012
[4] http://www.w3schools.com/html/defualt.asp,
http://www.w3schools.com/css/default.asp,
http://www.w3schools.com/js/default.asp