85 |
86 |
87 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/src/main/webapp/BSindex1.jsp:
--------------------------------------------------------------------------------
1 | <%@ page import="com.fruitDayDB.vo.User" %>
2 | <%@ page import="java.util.List" %>
3 | <%@ page import="java.util.ArrayList" %>
4 | <%--
5 | Created by IntelliJ IDEA.
6 | User: xi
7 | Date: 2015/10/18
8 | Time: 9:15
9 | To change this template use File | Settings | File Templates.
10 | --%>
11 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
12 |
13 |
14 |
15 |
16 |
85 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/src/main/webapp/BSindex3.jsp:
--------------------------------------------------------------------------------
1 | <%@ page import="com.fruitDayDB.vo.User" %>
2 | <%@ page import="java.util.List" %>
3 | <%@ page import="java.util.ArrayList" %>
4 | <%--
5 | Created by IntelliJ IDEA.
6 | User: xi
7 | Date: 2015/10/18
8 | Time: 9:15
9 | To change this template use File | Settings | File Templates.
10 | --%>
11 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
12 |
13 |
14 |
15 |
16 |
20 |
21 | <%
22 | String show="x0";
23 | if(request.getAttribute("sky")!=null)
24 | show=(String)request.getAttribute("sky");
25 | %>
26 |
27 |
28 |
85 |
86 |
87 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/target/x-test/BSindex4.jsp:
--------------------------------------------------------------------------------
1 | <%@ page import="com.fruitDayDB.vo.User" %>
2 | <%@ page import="java.util.List" %>
3 | <%@ page import="java.util.ArrayList" %>
4 | <%@ page import="com.fruitDayDB.vo.Fruit" %>
5 | <%--
6 | Created by IntelliJ IDEA.
7 | User: xi
8 | Date: 2015/10/18
9 | Time: 9:15
10 | To change this template use File | Settings | File Templates.
11 | --%>
12 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | <%
23 | String show="x0";
24 | if(request.getAttribute("sky")!=null)
25 | show=(String)request.getAttribute("sky");
26 | %>
27 |
28 |
29 |
30 |
31 |

32 |
33 |
34 |
35 |
用户管理
36 |
40 |
商品管理
41 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | - 水果
56 | -
57 | - 规格
58 | -
59 | - 单价
60 | -
61 | - 操作
62 |
63 |
64 | <%
65 | List
fruits=new ArrayList();
66 | if(request.getAttribute("allfruit")!=null) {
67 |
68 | fruits = (List) request.getAttribute("allfruit");
69 |
70 | for(Fruit fruit:fruits) {
71 | out.print(" \n" +
72 | "
\n" +
81 | "
");
82 | }
83 | }
84 | %>
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/src/main/webapp/BSindex4.jsp:
--------------------------------------------------------------------------------
1 | <%@ page import="com.fruitDayDB.vo.User" %>
2 | <%@ page import="java.util.List" %>
3 | <%@ page import="java.util.ArrayList" %>
4 | <%@ page import="com.fruitDayDB.vo.Fruit" %>
5 | <%--
6 | Created by IntelliJ IDEA.
7 | User: xi
8 | Date: 2015/10/18
9 | Time: 9:15
10 | To change this template use File | Settings | File Templates.
11 | --%>
12 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | <%
23 | String show="x0";
24 | if(request.getAttribute("sky")!=null)
25 | show=(String)request.getAttribute("sky");
26 | %>
27 |
28 |
29 |
30 |
31 |

32 |
33 |
34 |
35 |
用户管理
36 |
40 |
商品管理
41 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 | - 水果
56 | -
57 | - 规格
58 | -
59 | - 单价
60 | -
61 | - 操作
62 |
63 |
64 | <%
65 | List
fruits=new ArrayList();
66 | if(request.getAttribute("allfruit")!=null) {
67 |
68 | fruits = (List) request.getAttribute("allfruit");
69 |
70 | for(Fruit fruit:fruits) {
71 | out.print(" \n" +
72 | "
\n" +
81 | "
");
82 | }
83 | }
84 | %>
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/src/main/webapp/head/head.jsp:
--------------------------------------------------------------------------------
1 | <%@ page import="com.fruitDayDB.vo.User" %>
2 | <%--
3 | Created by IntelliJ IDEA.
4 | User: xi
5 | Date: 2015/10/3
6 | Time: 19:39
7 | To change this template use File | Settings | File Templates.
8 | --%>
9 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
10 |
11 |
12 |
13 |
14 |
15 | <%
16 | User user=new User(0,"","","","");
17 | int num=0;
18 | if(session.getAttribute("user")!=null)
19 | user=(User)session.getAttribute("user");
20 | if(request.getAttribute("num")!=null)
21 | num=(Integer)request.getAttribute("num");
22 | %>
23 |
24 |
25 |
26 |
27 |
28 |
29 |
您好,欢迎来到天天果园!
30 |
31 | <%
32 | if(user.getId()==0)
33 | out.print("
");
37 | else {
38 | out.print("
\n" +
39 | "
\n" +
40 | "
\n" +
41 | "
\n" +
42 | "
\n" +
43 | "
\n" +
45 | "
\n" +
46 | "
");
47 | }
48 | %>
49 |
50 |
51 |
52 |
53 | <%--网站图标、搜索框、购物车--%>
54 |
55 |
56 |
57 |
62 |
63 |
64 |
68 |
69 |
70 |
78 |
79 |
80 |
81 |
82 | <%--网站菜单--%>
83 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/target/x-test/head/head.jsp:
--------------------------------------------------------------------------------
1 | <%@ page import="com.fruitDayDB.vo.User" %>
2 | <%--
3 | Created by IntelliJ IDEA.
4 | User: xi
5 | Date: 2015/10/3
6 | Time: 19:39
7 | To change this template use File | Settings | File Templates.
8 | --%>
9 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
10 |
11 |
12 |
13 |
14 |
15 | <%
16 | User user=new User(0,"","","","");
17 | int num=0;
18 | if(session.getAttribute("user")!=null)
19 | user=(User)session.getAttribute("user");
20 | if(request.getAttribute("num")!=null)
21 | num=(Integer)request.getAttribute("num");
22 | %>
23 |
24 |
25 |
26 |
27 |
28 |
29 |
您好,欢迎来到天天果园!
30 |
31 | <%
32 | if(user.getId()==0)
33 | out.print("
");
37 | else {
38 | out.print("
\n" +
39 | "
\n" +
40 | "
\n" +
41 | "
\n" +
42 | "
\n" +
43 | "
\n" +
45 | "
\n" +
46 | "
");
47 | }
48 | %>
49 |
50 |
51 |
52 |
53 | <%--网站图标、搜索框、购物车--%>
54 |
55 |
56 |
57 |
62 |
63 |
64 |
68 |
69 |
70 |
78 |
79 |
80 |
81 |
82 | <%--网站菜单--%>
83 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/target/x-test/js/imgs.js:
--------------------------------------------------------------------------------
1 | var st;
2 |
3 | function qimg(){
4 |
5 | for(var i=0;i<5;i++)
6 | {
7 | var s=document.getElementById("p"+i);
8 |
9 | if(s.className=="show")
10 | {
11 | s.className="non";
12 | document.getElementById("l"+i).style.backgroundColor="#444444";
13 |
14 | i=(i+1)%5;
15 | document.getElementById("l"+i).style.backgroundColor="#669933";
16 | document.getElementById("p"+i).className="show";
17 | break;
18 | }
19 | }
20 | }
21 |
22 | function fimg(){
23 | st=setInterval("qimg()",5000);
24 | }
25 |
26 | function simg(n){
27 |
28 | window.clearInterval(st);
29 |
30 | var s=parseInt(n)-1;
31 |
32 | document.getElementById("p"+s).className="show";
33 | document.getElementById("l"+s).style.backgroundColor="#669933";
34 |
35 | var i=4;
36 |
37 | while(i--)
38 | {
39 | s=(s+1)%5;
40 | document.getElementById("p"+s).className="non";
41 | document.getElementById("l"+s).style.backgroundColor="#444444";
42 | }
43 | }
44 |
45 | function himg(n){
46 |
47 | var s=parseInt(n.charAt(1));
48 |
49 | document.getElementById("p"+s).className="show";
50 |
51 | var i=2;
52 |
53 | while(i--)
54 | {
55 | s=(s+1)%3;
56 | document.getElementById("p"+s).className="non";
57 | }
58 | }
59 |
60 | function number(s,fid){
61 | var num=document.getElementById("num"+fid);
62 |
63 | if(s=="0")
64 | {
65 | num.innerText=parseInt(num.innerText)+1;
66 | }
67 | else if(s=="1")
68 | {
69 | var k=parseInt(num.innerText)-1;
70 |
71 | num.innerText=k<1?1:k;
72 | }
73 | }
74 |
75 | function sum(fid)
76 | {
77 | var up=parseFloat(document.getElementById("up"+fid).innerText);
78 | var sum=document.getElementById("sum"+fid);
79 | var num=parseFloat(document.getElementById("num"+fid).innerText);
80 | var cen=up*num;
81 | sum.innerText=cen;
82 | }
83 |
84 | function money()
85 | {
86 | var sums=document.getElementsByClassName("fsum");
87 | var num=0;
88 | for(var i=0;i
2 | <%@ page import="java.util.List" %>
3 | <%@ page import="java.util.ArrayList" %>
4 | <%--
5 | Created by IntelliJ IDEA.
6 | User: xi
7 | Date: 2015/10/18
8 | Time: 9:15
9 | To change this template use File | Settings | File Templates.
10 | --%>
11 | <%@ page contentType="text/html;charset=UTF-8" language="java" %>
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | <%
22 | String show="x0";
23 | if(request.getAttribute("sky")!=null)
24 | show=(String)request.getAttribute("sky");
25 | %>
26 |
27 |
28 |
29 |
30 |

31 |
32 |
33 |
34 |
用户管理
35 |
39 |
商品管理
40 |
45 |
46 |
47 |
48 |
49 |
94 |
95 |
96 |
97 |
98 |
99 |
--------------------------------------------------------------------------------