Forráskód Böngészése

上传文件至 'Shop/out/artifacts/Shop_war_exploded'

1801010538 5 éve
szülő
commit
3c9e722f65

+ 73 - 0
Shop/out/artifacts/Shop_war_exploded/head.jsp

@@ -0,0 +1,73 @@
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+
+<header class="header-area">
+    <div class="header-top theme-bg">
+        <div class="container">
+            <div class="row">
+                <div class="col-lg-4 col-md-4 col-12">
+                    <div class="welcome-area" style="width: 1100px">
+                        <c:if test="${empty msg}"><a href="login.jsp" style="display: inline-block;">
+                            <p style="color:white">用户登录入口</p></a></c:if>
+                        <c:if test="${not empty msg}"><p style="color: white;">欢迎${msg}</p></c:if>
+                        <c:if test="${empty msg}"><a href="admin_login.jsp" target="_blank" style="display: inline-block;float: right"><p style="color: white;">管理员登录</p></a></c:if>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+    <div class="header-bottom transparent-bar">
+        <div class="container">
+            <div class="row">
+                <div class="col-xl-2 col-lg-3 col-md-4 col-sm-4 col-5">
+                    <div class="logo pt-39">
+                        <a href="index.jsp"><img alt="" src="img/logo/logo.png"></a>
+                    </div>
+                </div>
+                <div class="col-xl-8 col-lg-7 d-none d-lg-block">
+                    <div class="main-menu text-center">
+                        <nav>
+                            <ul>
+                                <li><a href="index.jsp">HOME</a>
+                                </li>
+                                <li class="mega-menu-position"><a href="#">Food</a>
+                                </li>
+                                <li><a href="#">PAGES</a>
+                                </li>
+                                <li><a href="#">Blog</a>
+                                </li>
+                                <li><a href="#">ABOUT</a></li>
+                                <li><a href="#">contact us</a></li>
+                            </ul>
+                        </nav>
+                    </div>
+                </div>
+                <div class="col-xl-2 col-lg-2 col-md-8 col-sm-8 col-7">
+                    <div class="search-login-cart-wrapper">
+                        <div class="header-search same-style">
+                            <button class="search-toggle">
+                                <i class="glyphicon glyphicon-search"></i>
+                            </button>
+                        </div>
+                        <div class="header-login same-style">
+                            <c:if test="${empty agent}">
+                                <a href="login.jsp"><i class="glyphicon glyphicon-user"></i></a>
+                            </c:if>
+                            <c:if test="${not empty agent}">
+                                <a href="AgentInformationServlet?mid=${agent.mid}"><i class="glyphicon glyphicon-user"></i></a>
+                            </c:if>
+                        </div>
+                        <div class="header-cart same-style">
+                            <button class="icon-cart">
+                                <a href="company_entry.jsp" title="商家入驻">
+                                    <i class="glyphicon glyphicon-home"></i>
+                                </a>
+                            </button>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</header>

+ 126 - 0
Shop/out/artifacts/Shop_war_exploded/index.jsp

@@ -0,0 +1,126 @@
+<%--
+  Created by IntelliJ IDEA.
+  User: 91476
+  Date: 2019/12/9
+  Time: 22:12
+  To change this template use File | Settings | File Templates.
+--%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+<html lang="en">
+<head>
+    <title>主页面</title>
+    <!-- all css here -->
+    <link rel="stylesheet" href="css/style.css">
+    <link rel="stylesheet" href="css/bootstrap.css">
+    <script src="js/jquery-3.3.1.min.js"></script>
+    <script src="js/bootstrap.js"></script>
+    <script>
+        $(function()  {
+            $.get("ProductServlet/findProduct",{},function(data){
+                var products="";
+              for (var i=0; i<data.length;i++){
+                  var product = '<div class="col-xl-3 col-lg-4 col-md-6 col-sm-6">' +
+                                    '<div class="product-wrapper mb-10">' +
+                                        '<div class="product-img">' +
+                                            '<a href="/Shop/ProductServlet?mid='+data[i].mid+'" target="_blank">' +
+                                                '<img src="products/'+data[i].img+'" alt="">' +
+                                            '</a>' +
+                                        '</div>' +
+                                        '<div class="product-content">' +
+                                            '<h4><a href="/Shop/ProductServlet?mid='+data[i].mid+'" target="_blank">'+data[i].name+'</a></h4>' +
+                                             '<div class="product-price">' +
+                                                 '<span class="new">$'+data[i].price+'</span>' +
+                                              '</div>' +
+                                      ' </div>' +
+                                    '</div>' +
+                                '</div>';
+                  products +=product;
+              }
+              // if($("#products").val().indexof('undefined')>0){
+              //
+              // }
+              $("#products").html(products);
+            });
+        });
+    </script>
+</head>
+<%@ include file="head.jsp"%>
+<div class="slider-area">
+    <div class="slider-active owl-dot-style owl-carousel">
+        <div class="single-slider pt-100 pb-100 yellow-bg">
+            <div class="container">
+                <div class="row">
+                    <div class="col-lg-6 col-md-6 col-12 col-sm-7">
+                        <div class="slider-content slider-animated-1 pt-114">
+                            <h3 class="animated">We keep pets for pleasure.</h3>
+                            <h1 class="animated">Food & Vitamins <br>For all Pets</h1>
+                            <div class="slider-btn">
+                                <a class="animated" href="product-details.html">SHOP NOW</a>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="col-lg-6 col-md-6 col-12 col-sm-5">
+                        <div class="slider-single-img slider-animated-1">
+                            <img class="animated" src="img/slider/slider-single-img.png" alt="">
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+    </div>
+    <div class="food-category food-category-col pt-100 pb-60">
+        <div class="container">
+            <div class="row">
+                <div class="col-lg-4 col-md-4">
+                    <div class="single-food-category cate-padding-1 text-center mb-30">
+                        <div class="single-food-hover-2">
+                            <img src="img/product/product-1.jpg" alt="">
+                        </div>
+                        <div class="single-food-content">
+                            <h3>Dogs Food</h3>
+                        </div>
+                    </div>
+                </div>
+                <div class="col-lg-4 col-md-4">
+                    <div class="single-food-category cate-padding-2 text-center mb-30">
+                        <div class="single-food-hover-2">
+                            <img src="img/product/product-2.jpg" alt="">
+                        </div>
+                        <div class="single-food-content">
+                            <h3>Cats Food</h3>
+                        </div>
+                    </div>
+                </div>
+                <div class="col-lg-4 col-md-4">
+                    <div class="single-food-category cate-padding-3 text-center mb-30">
+                        <div class="single-food-hover-2">
+                            <img src="img/product/product-3.jpg" alt="">
+                        </div>
+                        <div class="single-food-content">
+                            <h3>Fishs Food</h3>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+    <div class="product-area pt-95 pb-70 gray-bg">
+        <div class="container">
+            <div class="section-title text-center mb-55">
+                <h4>Most Populer</h4>
+                <h2>Recent Products</h2>
+            </div>
+            <div class="row" id="products">
+
+            </div>
+        </div>
+    </div>
+</div>
+<jsp:include page="footer.jsp"></jsp:include>
+
+</body>
+</html>
+

+ 90 - 0
Shop/out/artifacts/Shop_war_exploded/login.jsp

@@ -0,0 +1,90 @@
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+<html>
+<head>
+  <meta charset="utf-8">
+  <title>登录注册</title>
+  <link rel="stylesheet" href="css/index.css">
+  <script src="js/jquery-3.3.1.js"></script>
+  <script>
+    $(function () {
+      $.get("FindCompanyServlet/findCompany",{},function (data) {
+        var op = '<option>请选择...</option>';
+        for(var i =0 ; i <data.length;i++){
+          var op1 = '<option>'+data[i].name+'</option>';
+          op += op1;
+        }
+        $(".company").html(op);
+      });
+    });
+  </script>
+</head>
+
+<body>
+<div class="content">
+  <div class="form sign-in">
+    <h2>欢迎回来</h2>
+    <form method="post" action="/Shop/LoginServlet">
+    <label>
+      <span>用户名</span>
+      <input type="text" name="name"/>
+    </label>
+    <label>
+      <span>密码</span>
+      <input type="password" name="password" />
+    </label>
+    <p class="forgot-pass"><a href="javascript:">忘记密码?</a></p>
+    <button type="submit" class="submit">登 录</button>
+    </form>
+    <center><span style="color: #ff1b2c">${msg}</span></center>
+  </div>
+  <div class="sub-cont">
+    <div class="img">
+      <div class="img__text m--up">
+        <h2>还未注册?</h2>
+        <p>立即注册,发现大量机会!</p>
+      </div>
+      <div class="img__text m--in">
+        <h2>已有帐号?</h2>
+        <p>有帐号就登录吧,好久不见了!</p>
+      </div>
+      <div class="img__btn">
+        <span class="m--up">注 册</span>
+        <span class="m--in">登 录</span>
+      </div>
+    </div>
+    <div class="form sign-up">
+      <h2>立即注册</h2>
+      <form action="/Shop/RegisterServlet" method="post" enctype="multipart/form-data">
+      <label>
+        <span>用户名</span>
+        <input type="text" name="name"/>
+      </label>
+      <label>
+        <span>公司</span>
+        <select name="company" class="company">
+        </select>
+      </label>
+      <label>
+        <span>手机</span>
+        <input type="text" name="phone"/>
+      </label>
+      <label>
+        <span>证件</span>
+        <input type="file" accept="image/png,image/jpeg" name="img" style="font-size: 12px;text-align: center">
+      </label>
+      <label>
+        <span>密码</span>
+        <input type="password" name="password"/>
+      </label>
+      <button type="submit" class="submit">注 册</button>
+      </form>
+    </div>
+  </div>
+</div>
+
+<script src="js/index.js"></script>
+</body>
+
+</html>

+ 188 - 0
Shop/out/artifacts/Shop_war_exploded/main.jsp

@@ -0,0 +1,188 @@
+<%--
+  Created by IntelliJ IDEA.
+  User: 91476
+  Date: 2019/12/9
+  Time: 22:12
+  To change this template use File | Settings | File Templates.
+--%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+<html lang="en">
+<head>
+    <title>主页面</title>
+    <!-- all css here -->
+    <link rel="stylesheet" href="css/style.css">
+    <link rel="stylesheet" href="css/bootstrap.css">
+</head>
+<%@ include file="head.jsp"%>
+<div class="slider-area">
+    <div class="slider-active owl-dot-style owl-carousel">
+        <div class="single-slider pt-100 pb-100 yellow-bg">
+            <div class="container">
+                <div class="row">
+                    <div class="col-lg-6 col-md-6 col-12 col-sm-7">
+                        <div class="slider-content slider-animated-1 pt-114">
+                            <h3 class="animated">We keep pets for pleasure.</h3>
+                            <h1 class="animated">Food & Vitamins <br>For all Pets</h1>
+                            <div class="slider-btn">
+                                <a class="animated" href="product-details.html">SHOP NOW</a>
+                            </div>
+                        </div>
+                    </div>
+                    <div class="col-lg-6 col-md-6 col-12 col-sm-5">
+                        <div class="slider-single-img slider-animated-1">
+                            <img class="animated" src="img/slider/slider-single-img.png" alt="">
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+    </div>
+    <div class="food-category food-category-col pt-100 pb-60">
+        <div class="container">
+            <div class="row">
+                <div class="col-lg-4 col-md-4">
+                    <div class="single-food-category cate-padding-1 text-center mb-30">
+                        <div class="single-food-hover-2">
+                            <img src="img/product/product-1.jpg" alt="">
+                        </div>
+                        <div class="single-food-content">
+                            <h3>Dogs Food</h3>
+                        </div>
+                    </div>
+                </div>
+                <div class="col-lg-4 col-md-4">
+                    <div class="single-food-category cate-padding-2 text-center mb-30">
+                        <div class="single-food-hover-2">
+                            <img src="img/product/product-2.jpg" alt="">
+                        </div>
+                        <div class="single-food-content">
+                            <h3>Cats Food</h3>
+                        </div>
+                    </div>
+                </div>
+                <div class="col-lg-4 col-md-4">
+                    <div class="single-food-category cate-padding-3 text-center mb-30">
+                        <div class="single-food-hover-2">
+                            <img src="img/product/product-3.jpg" alt="">
+                        </div>
+                        <div class="single-food-content">
+                            <h3>Fishs Food</h3>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+    <div class="product-area pt-95 pb-70 gray-bg">
+        <div class="container">
+            <div class="section-title text-center mb-55">
+                <h4>Most Populer</h4>
+                <h2>Recent Products</h2>
+            </div>
+            <div class="row">
+                <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6">
+                    <div class="product-wrapper mb-10">
+                        <div class="product-img">
+                            <a href="product_details.jsp">
+                                <img src="img/product/product-4.jpg" alt="">
+                            </a>
+                        </div>
+                        <div class="product-content">
+                            <h4><a href="product_details.jsp">Dog Calcium Food</a></h4>
+                            <div class="product-price">
+                                <span class="new">$20.00 </span>
+                                <span class="old">$50.00</span>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6">
+                    <div class="product-wrapper mb-10">
+                        <div class="product-img">
+                            <a href="product_details.jsp">
+                                <img src="img/product/product-5.jpg" alt="">
+                            </a>
+                        </div>
+                        <div class="product-content">
+                            <h4><a href="product_details.jsp">Cat Buffalo Food</a></h4>
+                            <div class="product-price">
+                                <span class="new">$22.00 </span>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6">
+                    <div class="product-wrapper mb-10">
+                        <div class="product-img">
+                            <a href="product_details.jsp">
+                                <img src="img/product/product-6.jpg" alt="">
+                            </a>
+                        </div>
+                        <div class="product-content">
+                            <h4><a href="product_details.jsp">Legacy Dog Food</a></h4>
+                            <div class="product-price">
+                                <span class="new">$50.00 </span>
+                                <span class="old">$70.00</span>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6">
+                    <div class="product-wrapper mb-10">
+                        <div class="product-img">
+                            <a href="product_details.jsp">
+                                <img src="img/product/product-7.jpg" alt="">
+                            </a>
+                        </div>
+                        <div class="product-content">
+                            <h4><a href="product_details.jsp">Chicken Dry Cat Food</a></h4>
+                            <div class="product-price">
+                                <span class="new">$60.00 </span>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6">
+                    <div class="product-wrapper mb-10">
+                        <div class="product-img">
+                            <a href="product-details.html">
+                                <img src="img/product/product-8.jpg" alt="">
+                            </a>
+                        </div>
+                        <div class="product-content">
+                            <h4><a href="product_details.jsp">Stomach Dog Food</a></h4>
+                            <div class="product-price">
+                                <span class="new">$70.00 </span>
+                                <span class="old">$90.00</span>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="col-xl-3 col-lg-4 col-md-6 col-sm-6">
+                    <div class="product-wrapper mb-10">
+                        <div class="product-img">
+                            <a href="product_details.jsp">
+                                <img src="img/product/product-9.jpg" alt="">
+                            </a>
+                        </div>
+                        <div class="product-content">
+                            <h4><a href="product_details.jsp">Nourish Puppy Food</a></h4>
+                            <div class="product-price">
+                                <span class="new">$80.00 </span>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+<jsp:include page="footer.jsp"></jsp:include>
+<script src="js/jquery-3.3.1.min.js"></script>
+<script src="js/bootstrap.js"></script>
+</body>
+</html>
+

+ 97 - 0
Shop/out/artifacts/Shop_war_exploded/product_details.jsp

@@ -0,0 +1,97 @@
+<%--
+  Created by IntelliJ IDEA.
+  User: 91476
+  Date: 2019/12/10
+  Time: 14:40
+  To change this template use File | Settings | File Templates.
+--%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
+<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
+<html>
+<head>
+    <title>产品详情</title>
+    <!-- all css here -->
+    <link rel="stylesheet" href="css/style.css">
+    <link rel="stylesheet" href="css/bootstrap.css">
+    <script src="js/jquery-3.3.1.min.js"></script>
+    <script src="js/bootstrap.min.js"></script>
+
+</head>
+<%@ include file="head.jsp"%>
+<body>
+<script>
+
+</script>
+<div class="breadcrumb-area pt-95 pb-95 bg-img" style="background-image:url(img/banner/banner-2.jpg);">
+    <div class="container">
+        <div class="breadcrumb-content text-center">
+            <h2>Product Details</h2>
+            <ul>
+                <li><a href="login.jsp">home</a></li>
+                <li class="active">Product Details</li>
+            </ul>
+        </div>
+    </div>
+</div>
+<div class="shop-area pt-95 pb-100">
+    <div class="container">
+        <div class="row">
+            <div class="col-lg-6 col-md-6">
+                <div class="product-details-img">
+                    <img id="zoompro" src="products/${product.img}" alt="">
+                </div>
+            </div>
+            <div class="col-lg-6 col-md-6">
+                <div class="product-details-content" >
+                    <h2>${product.name}</h2><br><br>
+                    <h3>${product.scompany}</h3><br>
+                    <div class="product-price"style="border-bottom: 1px solid #e4e4e4;">
+                        <span class="new">$ <span class="price">${product.price}</span> </span>
+                    </div>
+                    <br><br><br>
+                    <p class="detail">${product.detail}</p>
+<c:if test="${agent.company!=product.scompany}">
+                    <form action="/Shop/OrderServlet?name=${agent.name}&buyer=${agent.company}&saler=${product.scompany}&product=${product.name}&price=${product.price}" method="post">
+                    <div class="quality-wrapper mt-30 product-quantity">
+                        <label>Number:</label>
+                        <div class="cart-plus-minus">
+                            <input class="cart-plus-minus-box" id="amount" type="text" name="amount" value="1">
+                        </div>
+                    </div>
+                    <div class="product-list-action">
+                        <div class="product-list-action-left">
+                            <button type="submit" id="button" class="addtocart-btn">
+                                Order Immediately
+                            </button>
+                        </div>
+                    </div>
+                    </form>
+</c:if>
+                    <c:if test="${agent.company==product.scompany}">
+                            <div class="quality-wrapper mt-30 product-quantity">
+                                <label>Number:</label>
+                                <div class="cart-plus-minus">
+                                    <input class="cart-plus-minus-box"  type="text" name="amount" value="1">
+                                </div>
+                            </div>
+                            <div class="product-list-action">
+                                <div class="product-list-action-left">
+                                    <button type="submit" id="no" class="addtocart-btn">
+                                        Order Immediately
+                                    </button>
+                                </div>
+                            </div>
+                    </c:if>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>
+<script>
+    $("#no").click(function () {
+        alert("不能购买自家产品");
+    })
+</script>
+</body>
+</html>