Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ranjithrajkumar2001 authored Jun 15, 2021
1 parent 22fa56f commit 835123d
Show file tree
Hide file tree
Showing 33 changed files with 4,224 additions and 0 deletions.
69 changes: 69 additions & 0 deletions Acceptservlet.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@


import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.sun.corba.se.spi.orbutil.fsm.Guard.Result;

/**
* Servlet implementation class Acceptservlet
*/
@WebServlet("/Acceptservlet")
public class Acceptservlet extends HttpServlet {
private static final long serialVersionUID = 1L;

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html");
//PrintWriter pw=response.getWriter();
String orderid=request.getParameter("orderid");
int id=Integer.parseInt(orderid);
String table=request.getParameter("tablename");
String status="Accepted";
if(table.equalsIgnoreCase("orders")){
try{
Class.forName("com.mysql.jdbc.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/bootathon2","db","java");
PreparedStatement ps=con.prepareStatement("update orders set status=? where order_id=?");
ps.setString(1, status);
ps.setInt(2, id);
ps.executeUpdate();
}
catch(Exception e)
{
System.out.println(e);
}
RequestDispatcher rd=getServletContext().getRequestDispatcher("/photographerprofile.jsp");
rd.forward(request,response);
}
else
{
try{
Class.forName("com.mysql.jdbc.Driver");
Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/bootathon2","db","java");
PreparedStatement ps=con.prepareStatement("update order_rent set status=? where order_id=?");
ps.setString(1, status);
ps.setInt(2, id);
ps.executeUpdate();
}
catch(Exception e)
{
System.out.println(e);
}
RequestDispatcher rd=getServletContext().getRequestDispatcher("/photographerprofile.jsp");
rd.forward(request,response);
}

}
}


15 changes: 15 additions & 0 deletions Message.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Message</title>
</head>
<body>
<center>
<h3><%=request.getAttribute("Message")%></h3>
</center>
</body>
</html>
53 changes: 53 additions & 0 deletions bootathon2.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
<link rel="preconnect" href="https://fonts.gstatic.com">

<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<link rel="Stylesheet" type="text/css" href="booton2.css">

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

</head>
<body>

<header class="container-fluid">
<nav>
<div id="tops" class="nav-wrapper black">
<a href="#" class="brand-logo white-text darken-3 left"><i id="logo" class="material-icons medium">camera_alt</i></a>
<ul class="right hide-on-med-and-down">
<li class="nav-item">
<a class="nav-link active white-text" id="lin1" aria-current="page" href="#">About</a>
</li>
<li class="nav-item">
<a class="nav-link white-text" id="lin2" href="#">Login</a>
</li>
<li class="nav-item">
<a class="nav-link white-text" id="lin3" href="#">Sign up</a>
</li>
</ul>

</nav>

</div>
<img src="frontfirst.jpg" class="img-fluid" id="camera" alt="...">
</header>
<section>

</section>

<form method="post" action="logpage.jsp">
<button class="btn waves-effect waves-light black" id="booknow">Book now</button>
</form>

<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
</body>
</html>
103 changes: 103 additions & 0 deletions booton2.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
@charset "ISO-8859-1";
body{
overflow-x:hidden;
overflow-y:hidden;
}

#tops{
height:50px;
}
i#logo{
position: relative;
bottom: 70px;
}

nav.col{
height:80px;
}
#block{
padding-bottom:2rem;
margin-left:-1rem;
margin-right:-1rem;
margin-bottom:0px;
position:absolute;
width:100%;
background-color: transparent;
}

#lin1{
color:black;
text-decoration: none;
}
#lin2{
color:black;
}
#lin3{
color:black;
}
#lin1:hover{
color:snow;
}
#lin2:hover{
color:snow;
}
#lin3:hover{
color:snow;
}
#camera{
width:100%;
height:600px;
object-fit:cover;
bottom:200px;
}
#booknow{
position:relative;
bottom:300px;
left:720px;
}


/*logpage.css*/

body{
overflow-x: hidden;
overflow-y: hidden;
}

#top{
background-color:transparent;
border-radius:20px;
height:730px;
}

/*#signup{
margin:0px;
position:relative;
width:10%;
left:73%;
top:100px;
}*/

#profilepic{
height:200px;
width:200px;
position:relative;
left:70%;
top:80px;
}
#login{
position:relative;
width:500px;
top:140px;
left:850px;
}
#sideimg{
margin:0px;
width:55%;
height:121%;
object-fit:cover;
position:relative;
bottom:85%;
right:2.3%;
border-radius:20px;
}
Loading

0 comments on commit 835123d

Please sign in to comment.