Merge remote-tracking branch 'remotes/origin/wyc_branch' into develop

# Conflicts:
#	left.jsp
#	xinyongAdd.jsp
develop
IE-WEB 8 months ago
commit 93c96c037f

@ -0,0 +1,81 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<script type="text/javascript" src="<%=path %>/js/popup_shuaxin.js"></script>
<script type="text/javascript">
function userlogin() //会员登录
{
var url="<%=path %>/site/userlogin/userlogin.jsp";
var pop=new Popup({ contentType:1,isReloadOnClose:false,width:400,height:200}); //pop类型为1内嵌iframe关闭后不重新加载页面
pop.setContent("contentUrl",url);
pop.setContent("title","会员登录");
pop.build();
pop.show();
}
function mycart() //我的购物车
{
<c:if test="${sessionScope.userType !=1}"> //判断是否登录了
alert("请先登录");
</c:if>
<c:if test="${sessionScope.userType==1}">
var url="<%=path %>/site/cart/mycart.jsp";
window.open(url,"_self");
</c:if>
}
function myorder()
{
<c:if test="${sessionScope.userType !=1}"> //判断是否登录了
alert("请先登录");
</c:if>
<c:if test="${sessionScope.userType==1}">
var url="<%=path %>/buy?type=myorder";
window.open(url,"_self");
</c:if>
}
</script>
</head>
<body>
<div id="menu">
<ul>
<li><a href="<%=path %>/goods?type=goodsNew">菜品信息</a></li>
<li><a href="<%=path %>/site/userreg/userreg.jsp">注册会员</a></li>
<li><a href="<%=path %>/site/goods/goodsSea.jsp">菜品查询</a></li>
<li><a href="#" onclick="mycart()">我的购物车</a></li>
<li><a href="#" onclick="myorder()">我的订单</a></li>
<li><a href="<%=path %>/liuyan?type=liuyanAll">系统留言板</a></li>
</ul>
</div>
<div id="search">
<form method="post" action="" style="color: white;font-family: 微软雅黑">
<c:if test="${sessionScope.userType ==1 }">
欢迎您:${sessionScope.user.name }&nbsp;&nbsp; <!--取得用户名-->
<a href="<%=path %>/user?type=userLogout" style="color: white;font-family: 微软雅黑">安全退出</a> &nbsp;&nbsp;
</c:if>
<c:if test="${sessionScope.userType !=1 }"> <!-- 如果未登录显示会员登录按钮 -->
<a href="#" onclick="userlogin()" style="color: white;font-family: 微软雅黑">会员登陆</a>
</c:if>
</form>
</div>
</body>
</html>

@ -0,0 +1,158 @@
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `t_admin`
-- ----------------------------
DROP TABLE IF EXISTS `t_admin`;
CREATE TABLE `t_admin` (
`userId` int(11) NOT NULL,
`userName` varchar(50) default NULL,
`userPw` varchar(50) default NULL,
PRIMARY KEY (`userId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of t_admin
-- ----------------------------
INSERT INTO `t_admin` VALUES ('1', 'a', 'a');
-- ----------------------------
-- Table structure for `t_catelog`
-- ----------------------------
DROP TABLE IF EXISTS `t_catelog`;
CREATE TABLE `t_catelog` (
`id` varchar(50) NOT NULL,
`name` varchar(50) default NULL,
`del` varchar(50) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of t_catelog
-- ----------------------------
INSERT INTO `t_catelog` VALUES ('1393654966130', '凉拌菜', 'no');
INSERT INTO `t_catelog` VALUES ('1393654973698', '热炒菜', 'no');
INSERT INTO `t_catelog` VALUES ('1393654982744', '炖汤类', 'no');
-- ----------------------------
-- Table structure for `t_goods`
-- ----------------------------
DROP TABLE IF EXISTS `t_goods`;
CREATE TABLE `t_goods` (
`id` varchar(50) NOT NULL,
`catelog_id` varchar(50) default NULL,
`bianhao` varchar(500) default NULL,
`mingcheng` varchar(500) default NULL,
`jieshao` varchar(500) default NULL,
`fujian` varchar(500) default NULL,
`shichangjia` int(11) default NULL,
`tejia` int(11) default NULL,
`del` varchar(50) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of t_goods
-- ----------------------------
INSERT INTO `t_goods` VALUES ('1393655526789', '1393654966130', '0001', '凉拌金针菇', '用剪刀减去金针菇的根蒂部分再反复冲洗干净。较长的金针菇可以从中间剪开以方便食用红椒去籽切细锅中加水加1勺盐烧开后下入金针菇和红椒丝煮1分钟关火。&mdash;&mdash;只需1分钟金针菇很易熟时间煮长了反而容易塞', '/upload/1393655525402.jpg', '100', '100', 'no');
INSERT INTO `t_goods` VALUES ('1393655887280', '1393654982744', '0002', '三鲜豆腐羹', '豆腐洗净,切成小丁,切豆腐的时候可以从后往前切,切的同时可以用手压住,这样豆腐就不会总粘在刀上了大虾只取虾仁,并用小刀在虾背上划开,取出虾线,这样处理后做好的虾会更像虾球', '/upload/1393655885962.jpg', '100', '100', 'no');
INSERT INTO `t_goods` VALUES ('1393655949576', '1393654982744', '0003', '冬瓜薏仁鲫鱼汤', '薏米仁洗净后放水中浸泡一个小时枸杞洗净备用。冬瓜去皮切成块儿。鲫鱼去除内脏洗净备用开锅后放入葱段和姜片倒入少许料酒改文火慢炖50分钟', '/upload/1393655948031.jpg', '100', '100', 'no');
INSERT INTO `t_goods` VALUES ('1393656014209', '1393654973698', '0004', '糖醋排骨', '将排骨剁成长约5厘米的段然后洗干净放入锅中加上水没过排将锅烧开然后用勺子将上面的浮沫撇干净可以用大火烧开浮沫都飘起来这样很容易将浮沫撇的很干放入拍松的生姜块再加上八角、花椒、料酒、大葱一起煮小火盖上锅盖煮40分钟排骨熟', '/upload/1393656012959.jpg', '100', '100', 'no');
-- ----------------------------
-- Table structure for `t_liuyan`
-- ----------------------------
DROP TABLE IF EXISTS `t_liuyan`;
CREATE TABLE `t_liuyan` (
`id` int(11) NOT NULL auto_increment,
`neirong` varchar(200) default NULL,
`liuyanshi` varchar(2000) default NULL,
`user_id` varchar(50) default NULL,
`huifu` varchar(50) default NULL,
`huifushi` varchar(50) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of t_liuyan
-- ----------------------------
-- ----------------------------
-- Table structure for `t_order`
-- ----------------------------
DROP TABLE IF EXISTS `t_order`;
CREATE TABLE `t_order` (
`id` varchar(200) NOT NULL,
`bianhao` varchar(200) default NULL,
`shijian` varchar(200) default NULL,
`zhuangtai` varchar(200) default NULL,
`huifu` varchar(255) default NULL,
`songhuodizhi` varchar(200) default NULL,
`fukuanfangshi` varchar(200) default NULL,
`jine` int(11) default NULL,
`user_id` varchar(200) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of t_order
-- ----------------------------
-- ----------------------------
-- Table structure for `t_orderitem`
-- ----------------------------
DROP TABLE IF EXISTS `t_orderitem`;
CREATE TABLE `t_orderitem` (
`id` varchar(200) NOT NULL,
`order_id` varchar(200) default NULL,
`goods_id` varchar(50) default NULL,
`goods_quantity` int(11) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of t_orderitem
-- ----------------------------
INSERT INTO `t_orderitem` VALUES ('1393657633435', '1393657633280', '1393655303399', '1');
INSERT INTO `t_orderitem` VALUES ('1393657943847', '1393657943777', '1393655887280', '1');
INSERT INTO `t_orderitem` VALUES ('1393658063119', '1393658063033', '1393655949576', '1');
INSERT INTO `t_orderitem` VALUES ('1393658148327', '1393658147936', '1393655887280', '1');
INSERT INTO `t_orderitem` VALUES ('1393658173125', '1393658172985', '1393655949576', '1');
INSERT INTO `t_orderitem` VALUES ('1393658262440', '1393658262399', '1393655949576', '1');
INSERT INTO `t_orderitem` VALUES ('1393658284297', '1393658284160', '1393655949576', '1');
INSERT INTO `t_orderitem` VALUES ('1395033001797', '1395033001698', '1393655171464', '1');
INSERT INTO `t_orderitem` VALUES ('1395033002062', '1395033001698', '1393655526789', '1');
-- ----------------------------
-- Table structure for `t_user`
-- ----------------------------
DROP TABLE IF EXISTS `t_user`;
CREATE TABLE `t_user` (
`id` varchar(50) NOT NULL,
`loginname` varchar(50) default NULL,
`loginpw` varchar(50) default NULL,
`name` varchar(50) default NULL,
`del` varchar(50) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of t_user
-- ----------------------------
INSERT INTO `t_user` VALUES ('1349561912257', 'a', 'a', 'ch', 'no');
-- ----------------------------
-- Table structure for `t_xinyong`
-- ----------------------------
DROP TABLE IF EXISTS `t_xinyong`;
CREATE TABLE `t_xinyong` (
`id` varchar(50) NOT NULL,
`shuxing` varchar(50) default NULL,
`neirong` varchar(50) default NULL,
`shijian` varchar(50) default NULL,
`user_id` varchar(50) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of t_xinyong
-- ----------------------------

@ -0,0 +1,93 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="expires" content="0"/>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
<meta http-equiv="description" content="This is my page"/>
<link href="<%=path %>/css/qiantai.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
</script>
</head>
<body>
<div id="wrapper">
<div id="logo">
<h1><a href="#">基于JSP的高校快餐店订餐系统
</a></h1>
<p><em><a href="#">&nbsp;</a></em></p>
</div>
<hr/>
<!-- 头部 -->
<div id="header">
<jsp:include flush="true" page="/site/inc/daohang.jsp"></jsp:include>
</div>
<!-- 头部 -->
<div id="page">
<div id="page-bgtop">
<!-- 右侧 -->
<div id="content">
<div class="post">
<h2 class="title"><a href="#">菜品信息</a></h2>
<div class="entry"> <!-- 设置菜品图片样式 -->
<TABLE class=main border=0 cellSpacing=2 cellPadding=2>
<TR>
<c:forEach items="${requestScope.goodsList}" var="goods" varStatus="sta">
<c:if test="${sta.index%4==0}"><!-- 每行放4张图片 -->
</tr><tr>
</c:if>
<TD>
<TABLE onmouseover="this.style.backgroundColor='#FF6600'" onmouseout="this.style.backgroundColor=''" border=0 cellSpacing=1 cellPadding=2 width=98 bgColor=#e1e1e1 align=center height=100>
<TR>
<TD bgColor=#ffffff align=left>
<P align="center">
<A href="<%=path %>/goods?type=goodsDetailQian&id=${goods.id }"><IMG border=0 align=absMiddle src="<%=path %>/${goods.fujian }" width=150 height=140></A>
</>
<center><A href="<%=path %>/goods?type=goodsDetailQian&id=${goods.id }"><FONT color=#ff0000></FONT>${goods.mingcheng }</A></center>
</P>
</TD>
</TR>
</TABLE>
</TD>
</c:forEach>
</TR>
</TABLE>
</div>
</div>
</div>
<!-- 右侧 -->
<!-- 左侧 -->
<div id="sidebar">
<jsp:include flush="true" page="/site/inc/left.jsp"></jsp:include>
</div>
<!-- 左侧 -->
<div style="clear: both;">&nbsp;</div> <!-- clear:both该属性的值指出了不允许有浮动元素 -->
</div>
</div>
<div id="footer-bgcontent">
<div id="footer">
<p><a href="<%=path %>/login.jsp">系统后台</a></p>
</div>
</div>
</div>
</body>
</html>

@ -0,0 +1,110 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="expires" content="0"/>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
<meta http-equiv="description" content="This is my page"/>
<link href="<%=path %>/css/qiantai.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
function buy1()
{
<c:if test="${sessionScope.userType !=1}">
alert("请先登录");
</c:if>
<c:if test="${sessionScope.userType==1}">
if(document.buy.quantity.value=="")
{
alert("请输入购买数量");
return false;
}
document.buy.submit();
</c:if>
}
</script>
</head>
<body>
<div id="wrapper">
<div id="logo">
<h1><a href="#">基于JSP的高校快餐店订餐系统
</a></h1>
<p><em><a href="#">&nbsp;</a></em></p>
</div>
<hr/>
<!--头部 -->
<div id="header">
<jsp:include flush="true" page="/site/inc/daohang.jsp"></jsp:include>
</div>
<!-- 头部 -->
<div id="page">
<div id="page-bgtop">
<!-- 右侧 -->
<div id="content">
<div class="post">
<h2 class="title"><a href="#">菜品详细信息</a></h2>
<div class="entry">
<form action="<%=path %>/buy?type=addToCart" method="post" name="buy">
<table width="100%" border="0" cellpadding="9" cellspacing="9">
<tr>
<td align="left"><img width="220" height="180" src="<%=path %>/${requestScope.goods.fujian }" style="border:1px solid #ccc; padding:3px;"/></td>
</tr>
<tr>
<td align="left">商品编号:${requestScope.goods.bianhao }</td>
</tr>
<tr>
<td align="left">商品名称:${requestScope.goods.mingcheng }</td>
</tr>
<tr>
<td align="left">商品描述:<c:out value="${requestScope.goods.jieshao }" escapeXml="false"></c:out></td>
</tr>
<tr>
<td align="left">价格:${requestScope.goods.shichangjia }</td>
</tr>
<tr>
<td align="left">
数量:<input type="text" name="quantity" value="1" size="8" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"/>
<!--插入菜品的数量框onpropertychange当输入框属性变化时触发onchange1属性修改数据库菜品价格 下一句为按键之后触发将输入值为非数字的字符替换为空,粘贴之后触发将输入值为非数字的字符替换为空-->
<input type="hidden" name="goods_id" value="${requestScope.goods.id }"/>
<input type="button" value="购买" style="width: 80px;height: 30px;" onclick="buy1()">
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
<!-- 右侧 -->
<!-- 左侧 -->
<div id="sidebar">
<jsp:include flush="true" page="/site/inc/left.jsp"></jsp:include>
</div>
<!-- 左侧 -->
<div style="clear: both;">&nbsp;</div>
</div>
</div>
<div id="footer-bgcontent">
<div id="footer">
<p><a href="<%=path %>/login.jsp">系统后台</a></p>
</div>
</div>
</div>
</body>
</html>

@ -0,0 +1,93 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="expires" content="0"/>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
<meta http-equiv="description" content="This is my page"/>
<link href="<%=path %>/css/qiantai.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
</script>
</head>
<body>
<div id="wrapper">
<div id="logo">
<h1><a href="#">基于JSP的高校快餐店订餐系统
</a></h1>
<p><em><a href="#">&nbsp;</a></em></p>
</div>
<hr/>
<!-- 头部 -->
<div id="header">
<jsp:include flush="true" page="/site/inc/daohang.jsp"></jsp:include>
</div>
<!-- 头部 -->
<div id="page">
<div id="page-bgtop">
<!-- 右侧 -->
<div id="content">
<div class="post">
<h2 class="title"><a href="#">菜品信息</a></h2>
<div class="entry"> <!-- 设置菜品图片样式 -->
<TABLE class=main border=0 cellSpacing=2 cellPadding=2>
<TR>
<c:forEach items="${requestScope.goodsList}" var="goods" varStatus="sta">
<c:if test="${sta.index%4==0}"> <!-- 每行放4张图片 -->
</tr><tr>
</c:if>
<TD>
<TABLE onmouseover="this.style.backgroundColor='#FF6600'" onmouseout="this.style.backgroundColor=''" border=0 cellSpacing=1 cellPadding=2 width=98 bgColor=#e1e1e1 align=center height=100>
<TR>
<TD bgColor=#ffffff align=left>
<P align="center">
<A href="<%=path %>/goods?type=goodsDetailQian&id=${goods.id }"><IMG border=0 align=absMiddle src="<%=path %>/${goods.fujian }" width=150 height=140></A>
</>
<center><A href="<%=path %>/goods?type=goodsDetailQian&id=${goods.id }"><FONT color=#ff0000></FONT>${goods.mingcheng }</A></center>
</P>
</TD>
</TR>
</TABLE>
</TD>
</c:forEach>
</TR>
</TABLE>
</div>
</div>
</div>
<!-- 右侧 -->
<!-- 左侧 -->
<div id="sidebar">
<jsp:include flush="true" page="/site/inc/left.jsp"></jsp:include>
</div>
<!-- 左侧 -->
<div style="clear: both;">&nbsp;</div>
</div>
</div>
<div id="footer-bgcontent">
<div id="footer">
<p><a href="<%=path %>/login.jsp">系统后台</a></p>
</div>
</div>
</div>
</body>
</html>

@ -0,0 +1,92 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="expires" content="0"/>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
<meta http-equiv="description" content="This is my page"/>
<link href="<%=path %>/css/qiantai.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
</script>
</head>
<body>
<div id="wrapper">
<div id="logo">
<h1><a href="#">基于JSP的高校快餐店订餐系统
</a></h1>
<p><em><a href="#">&nbsp;</a></em></p>
</div>
<hr/>
<!-- 头部 -->
<div id="header">
<jsp:include flush="true" page="/site/inc/daohang.jsp"></jsp:include>
</div>
<!-- 头部 -->
<div id="page">
<div id="page-bgtop">
<!-- 右侧 -->
<div id="content">
<div class="post">
<h2 class="title"><a href="#">菜品信息</a></h2>
<div class="entry">
<TABLE class=main border=0 cellSpacing=2 cellPadding=2>
<TR>
<c:forEach items="${requestScope.goodsList}" var="goods" varStatus="sta">
<c:if test="${sta.index%4==0}">
</tr><tr>
</c:if>
<TD>
<TABLE onmouseover="this.style.backgroundColor='#FF6600'" onmouseout="this.style.backgroundColor=''" border=0 cellSpacing=1 cellPadding=2 width=98 bgColor=#e1e1e1 align=center height=100>
<TR>
<TD bgColor=#ffffff align=left>
<P align="center">
<A href="<%=path %>/goods?type=goodsDetailQian&id=${goods.id }"><IMG border=0 align=absMiddle src="<%=path %>/${goods.fujian }" width=150 height=140></A>
</>
<center><A href="<%=path %>/goods?type=goodsDetailQian&id=${goods.id }"><FONT color=#ff0000></FONT>${goods.mingcheng }</A></center>
</P>
</TD>
</TR>
</TABLE>
</TD>
</c:forEach>
</TR>
</TABLE>
</div>
</div>
</div>
<!-- 右侧 -->
<!-- 左侧 -->
<div id="sidebar">
<jsp:include flush="true" page="/site/inc/left.jsp"></jsp:include>
</div>
<!-- 左侧 -->
<div style="clear: both;">&nbsp;</div>
</div>
</div>
<div id="footer-bgcontent">
<div id="footer">
<p><a href="<%=path %>/login.jsp">系统后台</a></p>
</div>
</div>
</div>
</body>
</html>

@ -0,0 +1,90 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="expires" content="0"/>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
<meta http-equiv="description" content="This is my page"/>
<link href="<%=path %>/css/qiantai.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
</script>
</head>
<body>
<div id="wrapper">
<div id="logo">
<h1><a href="#">基于JSP的高校快餐店订餐系统
</a></h1>
<p><em><a href="#">&nbsp;</a></em></p>
</div>
<hr/>
<!-- 头部 -->
<div id="header">
<jsp:include flush="true" page="/site/inc/daohang.jsp"></jsp:include>
</div>
<!-- 头部 -->
<div id="page">
<div id="page-bgtop">
<!-- 右侧 -->
<div id="content">
<div class="post">
<!-- <h2 class="title"><a href="#">菜品信息</a></h2> -->
<div class="entry">
<form name="ff" method="post" action="<%=path %>/goods?type=goodsRes">
<table align="left" border="0" cellpadding="9" cellspacing="9">
<tr align='center'>
<td style="width: 60px;" align="left">
菜品名称:
</td>
<td align="left">
<input name="mingcheng" type="text" style="width: 200px;" />
</td>
</tr>
<tr align='center'>
<td style="width: 60px;" align="left"></td>
<td align="left">
<input type="submit" value="查询"/>&nbsp;
<input type="reset" value="重置"/>&nbsp;
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
<!-- 右侧 -->
<!-- 左侧 -->
<div id="sidebar">
<jsp:include flush="true" page="/site/inc/left.jsp"></jsp:include>
</div>
<!-- 左侧 -->
<div style="clear: both;">&nbsp;</div>
</div>
</div>
<div id="footer-bgcontent">
<div id="footer">
<p><a href="<%=path %>/login.jsp">系统后台</a></p>
</div>
</div>
</div>
</body>
</html>

@ -1,3 +1,4 @@
<<<<<<< HEAD
<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%
<<<<<<< HEAD
@ -417,3 +418,52 @@
</body>
</html>
>>>>>>> remotes/origin/wyp_branch
=======
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
</head>
<body>
<ul>
<!-- <li>
<h2>会员登录</h2>
<p>Mauris vitae nisl n ornare, orci in consectetuer hendrerit, volutpat.</p>
</li> -->
<li>
<h2>菜品类别</h2>
<ul>
<c:forEach items="${sessionScope.catelogList}" var="catelog">
<li><a href="<%=path %>/goods?type=goodsByCatelog&catelog_id=${catelog.id}">${catelog.name}</a></li>
</c:forEach>
</ul>
</li>
<li>
</li>
</ul>
</body>
</html>
>>>>>>> remotes/origin/wyc_branch

@ -0,0 +1,111 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();//获得当前的项目根目录路径赋值给path
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="expires" content="0"/>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
<meta http-equiv="description" content="This is my page"/>
<style type="text/css">
BODY {
FONT-FAMILY: 宋体, Arial, Helvetica, sans-serif; BACKGROUND: url(<%=path %>/images/LoginBg.jpg) #669acc repeat-x left top; FONT-SIZE: 12px
}
#Sizer {
MARGIN: 114px auto 0px; WIDTH: 656px; BACKGROUND: url(<%=path %>/images/LoginBg2.jpg); HEIGHT: 364px; OVERFLOW: hidden
}
TABLE {
MARGIN-TOP: 60px; WIDTH: 400px; MARGIN-LEFT: 120px
}
TABLE THEAD {
TEXT-ALIGN: left; LINE-HEIGHT: 40px; TEXT-INDENT: 50px; HEIGHT: 40px; FONT-WEIGHT: bold;font-family: 微软雅黑
}
TABLE TH {
TEXT-ALIGN: right; LINE-HEIGHT: 35px; WIDTH: 100px; HEIGHT: 35px; FONT-WEIGHT: normal;font-family: 微软雅黑
}
TABLE TD SPAN {
LINE-HEIGHT: 30px; CURSOR: pointer; TEXT-DECORATION: underline;font-family: 微软雅黑
}
.txt {
LINE-HEIGHT: 16px; WIDTH: 200px; HEIGHT: 16px;font-family: 微软雅黑
}
.cktxt {
LINE-HEIGHT: 16px; WIDTH: 100px; HEIGHT: 16px;font-family: 微软雅黑
}
</style>
<script type='text/javascript' src='<%=path %>/dwr/interface/loginService.js'></script>
<script type='text/javascript' src='<%=path %>/dwr/engine.js'></script>
<script type='text/javascript' src='<%=path %>/dwr/util.js'></script>
<script language="javascript">
function check1() //上面引入javascript文件来引入对象处理 #sizer上边距为114像素右边距自动下边距0宽度656px背景为图片高度为364px内容区内容溢出内容被修剪并且其余内容是不可见的
{
if(document.ThisForm.userName.value=="")
{
alert("请输入账号");
document.ThisForm.userName.focus();
return false;
} //如果账号为空提示输入账号使用focus使得在点击文本框时获得光标点击到外边时光标消失
document.getElementById("indicator").style.display="block"; //设置为块级元素使得两块级元素之间换行载入动画的id叫indicator
loginService.login(document.ThisForm.userName.value,document.ThisForm.userPw.value,0,callback); //使用src里面定义的loginService来实现对账号密码的验证之后执行callback函数
}
function callback(data) //账号密码错误,提示账号或密码错误,账号密码正确,提示通过验证,系统登录成功
{
document.getElementById("indicator").style.display="none";
if(data=="no")
{
alert("账号或密码错误");
}
if(data=="yes")
{
alert("通过验证,系统登录成功");
window.location.href="<%=path %>/loginSuccess.jsp";
}
}
</script>
</head>
<body>
<DIV id=Sizer>
<FORM method=post name=ThisForm action="<%=path %>/admin/index.jsp"> <!-- 表单的数据发送到action属性的页面 -->
<TABLE border=0 cellSpacing=0 cellPadding=0> <!--表中小格子边框为0小格子中文字距离小格子距离为0小格子之间距离为0小格子紧密的靠在一起-->
<THEAD> <!-- 表格的表头 tr行td列 横跨2列 对齐为居中 字体样式是23像素-->
<TR><TD colSpan=2 align="center" style="font-size: 23px;">基于JSP的高校快餐店订餐系统
</TD></TR>
</THEAD>
<TBODY>
<TR>
<TH>账号:</TH>
<TD><INPUT class=txt type=text name=userName></TD> <!-- 输入框类为txt 类型为文本 -->
</TR>
<TR>
<TH>密码:</TH>
<TD><INPUT class=txt type=password name=userPw></TD>
</TR>
<TR>
<TH>&nbsp;</TH>
<TD>
<INPUT class=btn value=系统登录 type=button name=submit style="font-family: 微软雅黑" onClick="check1()"> <!-- 类名为btn点击触发check1事件检查账号密码是否符合规范 -->
&nbsp;&nbsp;&nbsp;&nbsp;
<INPUT class=btn value=重新输入 type=reset name=reset style="font-family: 微软雅黑">
<img id="indicator" src="<%=path %>/images/loading.gif" style="display:none"/> <!-- 插入载入中动画 -->
</TD>
</TR>
</TBODY>
</TABLE>
</FORM>
</DIV>
</body>
</html>

@ -0,0 +1,28 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
</head>
<body>
<script type="text/javascript">
function tiao()
{
window.location.href="<%=path %>/admin/index.jsp"; //把url改变为<%=path %>/admin/index.jsp
}
setTimeout(tiao,1300) //1.3秒之后执行tiao功能跳转到index.jsp
</script>
<br> <br> <br> <br> <br> <br> <br> <br> <br>
<center><img src="<%=path %>/images/loading.gif"></center> <!-- 在此期间展示载入动画 -->
</body>
</html>

@ -0,0 +1,157 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="expires" content="0"/>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
<meta http-equiv="description" content="This is my page"/>
<link href="<%=path %>/css/qiantai.css" rel="stylesheet" type="text/css" media="screen" />
<script type='text/javascript' src='<%=path %>/dwr/interface/cartService.js'></script>
<script type='text/javascript' src='<%=path %>/dwr/engine.js'></script>
<script type='text/javascript' src='<%=path %>/dwr/util.js'></script>
<script type="text/javascript">
function delGoodsFromCart(goodsId) //删除购物车里的货物
{
document.getElementById("indicator1").style.display="block";
cartService.delGoodsFromCart(goodsId,callback111);
}
function clearCart() //清空购物车
{
document.getElementById("indicator1").style.display="block";
cartService.clearCart(callback111);
}
function modiNum(goodsId,quantity) //改变购物车里物品的数量
{
var r1= /^[0-9]*[1-9][0-9]*$/  //正整数
var val=r1.test(quantity); //quantity为你要判断的字符 执行返回结果 true 或 false
if(val==false)
{
alert("数量必须是数字,请重新输入");
}
else //否则调用modiNum函数改变购物车中物品的数量
{
document.getElementById("indicator1").style.display="block";
cartService.modiNum(goodsId,quantity,callback111);
}
}
function callback111(data) //判断是否订单符合库存
{
document.getElementById("indicator1").style.display="none";
if(data=="no")
{
alert("库存不足");
}
if(data=="yes") //够库存,重新加载该页面
{
document.location.reload(true);
}
}
</script>
</head>
<body>
<div id="wrapper">
<div id="logo">
<h1><a href="#">基于JSP的高校快餐店订餐系统
</a></h1>
<p><em><a href="#">&nbsp;</a></em></p>
</div>
<hr/>
<!-- 头部 -->
<div id="header">
<jsp:include flush="true" page="/site/inc/daohang.jsp"></jsp:include>
</div>
<!-- 头部 -->
<div id="page">
<div id="page-bgtop">
<!-- 右侧 -->
<div id="content">
<div class="post">
<h2 class="title"><a href="#">我的购物车</a></h2>
<div class="entry">
<table width="98%" border="0" cellpadding="2" cellspacing="1" align="center" style="margin-top:8px">
<tr align="center" bgcolor="#FAFAF1" height="22">
<td>商品名称</td>
<td>购买价格</td>
<td>购买数量</td>
<td>总金额</td>
<td>操作</td>
</tr>
<c:forEach items="${sessionScope.cart.items}" var="item">
<tr align='center' bgcolor="#FFFFFF" height="22">
<td bgcolor="#FFFFFF" align="center">${item.value.goods.mingcheng}</td>
<td bgcolor="#FFFFFF" align="center">¥:${item.value.goods.tejia}</td>
<td bgcolor="#FFFFFF" align="center"><input type="text" onChange="modiNum(${item.value.goods.id},this.value)" value="${item.value.goods_quantity}" size="4"/></td>
<!-- 改变数量 -->
<td bgcolor="#FFFFFF" align="center">${item.value.goods.tejia * item.value.goods_quantity}</td>
<!-- 总金额=特价*数量 -->
<td bgcolor="#FFFFFF" align="center">
<input type="button" value="删除" style="width: 50px;height: 20px;" onclick="delGoodsFromCart(${item.value.goods.id})">
</td>
</tr>
</c:forEach>
<tr>
<td colspan="5" class="Order_Total" align="right">
<br>
总金额:<span id="totalMoney">${sessionScope.cart.totalPrice}</span>
&nbsp;&nbsp;&nbsp;&nbsp;
<img id="indicator1" src="<%=path %>/images/loading.gif" style="display:none"/>
</td>
</tr>
</table>
<table>
<tr height="7"><td></td></tr>
<tr>
<td width="120"></td>
<td>
<input type="button" value="清空" style="width: 80px;height: 30px;" onclick="clearCart()">
</td>
<td>
<input type="button" value="继续" style="width: 80px;height: 30px;" onclick="javascript:window.location.href='<%=path %>/site/default.jsp'">
</td>
<td>
<input type="button" value="结账" style="width: 80px;height: 30px;" onclick="javascript:window.location.href='<%=path %>/site/order/orderQueren.jsp'">
</td>
</tr>
</table>
</div>
</div>
</div>
<!-- 右侧 -->
<!-- 左侧 -->
<div id="sidebar">
<jsp:include flush="true" page="/site/inc/left.jsp"></jsp:include>
</div>
<!-- 左侧 -->
<div style="clear: both;">&nbsp;</div>
</div>
</div>
<div id="footer-bgcontent">
<div id="footer">
<p><a href="<%=path %>/login.jsp">系统后台</a></p>
</div>
</div>
</div>
</body>
</html>

@ -0,0 +1,113 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="expires" content="0"/>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
<meta http-equiv="description" content="This is my page"/>
<link href="<%=path %>/css/qiantai.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
function orderDetail(order_id)//订单明细函数
{
var strUrl="<%=path %>/buy?type=orderDetail&order_id="+order_id;//传入参数
var ret = window.open(strUrl,"","dialogWidth:800px; dialogHeight:500px; dialogLeft: status:no; directories:yes;scrollbars:yes;Resizable=no;");
//点击订单明细弹出窗口宽800px高500px无状态栏目录栏可见有滚动栏不可改变大小
}
</script>
</head>
<body>
<div id="wrapper">
<div id="logo">
<h1><a href="#">基于JSP的高校快餐店订餐系统
</a></h1>
<p><em><a href="#">&nbsp;</a></em></p>
</div>
<hr/>
<!-- 我的订单页面的头部菜单栏daohang.jsp -->
<div id="header">
<jsp:include flush="true" page="/site/inc/daohang.jsp"></jsp:include>
</div>
<!-- 我的订单页面的头部菜单栏daohang.jsp -->
<div id="page">
<div id="page-bgtop">
<!-- 右侧 -->
<div id="content">
<div class="post">
<h2 class="title"><a href="#">我的订单</a></h2>
<div class="entry">
<c:forEach items="${requestScope.orderList}" var="order">
<fieldset style="width:95%; margin-left:5px;"><legend class="fieldtitle"></legend>
<table class="bill" width="97%" cellpadding="4" cellspacing="4">
<tr>
<td>订单编号:${order.bianhao}</td>
</tr>
<tr>
<td>下单时间:${order.shijian}</td>
</tr>
<tr>
<td>
订单状态:
<c:if test="${order.zhuangtai=='no'}"> <!-- if的插入 -->
未受理
</c:if>
<c:if test="${order.zhuangtai=='yes'}">
已受理
</c:if>
</td>
</tr>
<tr>
<td>排队计时:${order.huifu}</td>
</tr>
<tr>
<td>送货地址:${order.songhuodizhi}</td>
</tr>
<tr>
<td>付款方式:${order.fukuanfangshi}</td>
</tr>
<tr>
<td>总金额:${order.jine}&nbsp;
<a href="#" onclick="orderDetail(${order.id})"/>订单明细</a>
</td>
</tr>
</table>
</fieldset>
<br/>
</c:forEach>
</div>
</div>
</div>
<!-- 右侧 -->
<!-- 左侧菜品类别 -->
<div id="sidebar">
<jsp:include flush="true" page="/site/inc/left.jsp"></jsp:include>
</div>
<!-- 左侧菜品类别 -->
<div style="clear: both;">&nbsp;</div>
</div>
</div>
<div id="footer-bgcontent">
<div id="footer">
<p> <a href="<%=path %>/login.jsp">系统后台</a></p>
</div>
</div>
</div>
</body>
</html>

@ -0,0 +1,180 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My JSP 'orderDetail.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<style type="text/css">
a:link { color: #000000; text-decoration: none } //链接平常的状态,超链接无下划线
a:visited { color: #000000; text-decoration: none } //链接被访问之后,超链接无下划线
a:active { color: #000000; text-decoration: none } //鼠标放到连接上的时候,超链接无下划线
a:hover { color: #ff0000; text-decoration: none; position: relative; right: 0px; top: 1px } //连接被按下的时候,超链接无下划线,相对定位(随窗口大小变化而变化)
.C_Font{ font-weight:bold;}
.Red{ color:#FF0000; font-weight:bold;}
.Sell_Title{ text-align:center;background:url(<%=path %>/images/icon_sell.gif) top no-repeat left;
font-weight:bold; font-size:14px; color:#FFFFFF; height:30px;}
.UserName{ padding:4px 0;}
.UserName input{ width:100px; border:1px solid #666;}
.UserRegster{ padding:5px 8px 5px 0;}
.UserRegster a,.UserRegster a:link,.UserRegster a:visited{ color:#f50;}
.UserRegster input{ background:url(<%=path %>/images/button.gif) no-repeat; width:73px; height:23px; border:0px; cursor:hand;}
.LoginTitle{text-align:center;background:url(<%=path %>/images/icon_login.gif) top no-repeat left;font-weight:bold; font-size:14px; color:#FFFFFF; height:30px;}
.Logo{ text-align:center; vertical-align:top; margin:8px 0;}
.Item01Menu{ text-align:right; vertical-align:top;}
.Item01Menu a{ padding:2px 10px; background:url(<%=path %>/images/dot_main01.gif) no-repeat left;}
.C_Item_Title{ background:url(<%=path %>/images/icon05.gif) no-repeat center;font-weight:bold; text-align:center; color:#fff; height:34px;}
.C_Item_Title a,.C_Item_Title a:link,.C_Item_Title a:visited{font-weight:bold; text-align:center; color:#fff;}
.C_login_Title{ background:url(<%=path %>/images/heng.gif) no-repeat center;font-weight:bold;font-size:12px; text-align:center; color:#fff; height:34px; padding-top:10px;}
.C_Sell_Title{ background:url(<%=path %>/images/icon03.gif) no-repeat center;font-weight:bold; text-align:center; color:#fff; height:34px; padding-top:10px;}
.C_DC_Title{ background:url(<%=path %>/images/DC.gif) no-repeat center;font-weight:bold; text-align:center; color:#fff; height:34px; padding-top:10px;}
.C_Sort_Title{ background:url(<%=path %>/images/heng.gif) no-repeat center;font-weight:bold;font-size:12px; text-align:center; color:#fff; height:34px; padding-top:10px;}
.C_Sort_Title a,.C_Sort_Title a:link,.C_Sort_Title a:visited{ color:#fff;}
.C_Search_Title{ background:url(<%=path %>/images/Recomm_05.gif) no-repeat center;font-weight:bold; text-align:center; color:#fff; height:34px; padding-top:10px;}
.C_Help_Title{ padding:4px 0;}
.C_Help_Title a{ background:url(<%=path %>/images/icon_sell.gif) no-repeat center;font-weight:bold; color:#fff; height:24px; padding-left:15px; width:175px; padding-top:5px;}
.C_Help_Title a,.C_Help_Title a:link,.C_Help_Title a:visited{ color:#fff;}
.C_Goods_Title{ border:1px solid #ccc; background:url(<%=path %>/images/Bule_46.gif) repeat-x; margin-bottom:5px; height:32px;}
.C_Goods_Border{ border-top:4px solid #4380CC; padding-top:10px;}
.C_Item_bg{ background:url(<%=path %>/images/Bule_56.gif) repeat-y; padding:3px 8px;}
.C_pages{ padding:5px 10px; text-align:center;}
.C_Input{ background:url(<%=path %>/images/button2.gif) no-repeat; width:73px; height:23px; border:0px; cursor:hand; color:#333;}
.input{ color:#f50;height:18px; }
.C_Input02{background:url(<%=path %>/images/button.gif) no-repeat; width:73px; height:23px; border:0px; cursor:hand; color:#333;}
.C_Input03{background:url(<%=path %>/images/btn_2.png) no-repeat; width:69px; height:28px; border:0px; cursor:hand; color:#fff;}
.Register{background:url(<%=path %>/images/btn_1.png) no-repeat; width:105px; height:28px; border:0px; cursor:hand; text-align:center; padding-top:6px;}
//no-repeat不平铺
.Order_Table{ margin:15px 0;}
.Order_Table td{ font-size:14px;}
.Order_Font{ color:#FF0000; font-weight:bold;}
.Order_Title{ font-size:14px; font-weight:bold; padding:4px 5px;}
.Order_Total{ font-weight:bold; padding:5px 10px 0 10px; color:#FF0000; text-align:center; font-size:14px;}
.Car_Leftbg{ background:url(<%=path %>/images/Car_05.gif) repeat-y left; width:8px;}
.Car_Rightbg{ background:url(<%=path %>/images/Car_13.gif) repeat-y right; width:8px;}
.C_Carbg_Default{ background:url(<%=path %>/images/Car_21.gif) no-repeat center;font-size:12px; text-align:center; width:150px;}
.C_Carbg_Current{ background:url(<%=path %>/images/Car_18.gif) no-repeat center;font-size:12px; text-align:center; color:#fff; width:150px;}
.Onlinpay{
}
.Onlinpay input{ background:url(<%=path %>/images/Car_icon_07.gif) no-repeat center; width:115px; height:30px; border:0px; cursor:hand; padding-bottom:8px; padding-right:8px;}
.textBox{
border-bottom:1px;
border-left:1px;
border-right:1px;
border-top:1px;
border-color:#666666;
border-style:solid;
}
.itemTitle {
font-family: "黑体", "Arial Black";
font-size: 16px;
line-height: 40px;
font-weight: 200;
color: #000000;
text-decoration: none;
letter-spacing: 5px;
} //字母间距5px
.blueText {
font-family: "宋体", System;
font-size: 12px;
line-height: 20px;
color: #0033CC;
text-decoration: none;
}
.redText {
font-family: "宋体", System;
font-size: 12px;
line-height: 20px;
color: #FF0000;
text-decoration: none;
}
.text {
font-family: "宋体", System;
font-size: 12px;
line-height: 20px;
color: #000000;
text-decoration: none;
}
.body {
margin-left: 0px;
margin-top: 2px;
margin-right: 0px;
margin-bottom: 2px;
background-image: url(<%=path %>/images/backGroup.gif);
}
.header_menu{background:url(<%=path %>/images/header_menu_02.gif) repeat-x;}
.whiteTitle{
font-family: "宋体", System;
font-size: 13px;
line-height: 20px;
font-weight: bold;
color: #FFFFFF;
text-decoration: none;
}
.whiteText {
font-family: "宋体", System;
font-size: 12px;
line-height: 20px;
color: #FFFFFF;
text-decoration: none;
}
.blackTitle {
font-family: "宋体", System;
font-size: 12px;
font-weight: bold;
line-height: 20px;
color: #000000;
text-decoration: none;
}
</style>
</head>
<body class="body" leftmargin="0" rightmargin="0">
<table cellspacing="1" cellpadding="0" width="100%" border="0" bgcolor="#F7F3F7">
<tr height="26">
<td class="blackTitle" align="center">商品名称</td>
<td class="blackTitle" align="center">购买数量</td>
<td class="blackTitle" align="center">购买价格</td>
</tr>
<c:forEach items="${requestScope.orderItemList}" var="orderItem">
<tr class="text" align="center" bgcolor="#FFFFFF">
<td>${orderItem.goods.mingcheng}</td>
<td>${orderItem.goods_quantity}</td>
<td>${orderItem.goods.tejia}</td>
</tr>
</c:forEach>
</table>
</body>
</html>

@ -0,0 +1,123 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head> <!-- 订单填写界面 -->
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="expires" content="0"/>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
<meta http-equiv="description" content="This is my page"/>
<link href="<%=path %>/css/qiantai.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
function back1() //返回之前的页面
{
window.history.go(-1);
}
</script>
</head>
<body>
<div id="wrapper">
<div id="logo">
<h1><a href="#">基于JSP的高校快餐店订餐系统
</a></h1>
<p><em><a href="#">&nbsp;</a></em></p>
</div>
<hr/>
<!-- 头部各种功能 -->
<div id="header">
<jsp:include flush="true" page="/site/inc/daohang.jsp"></jsp:include>
</div>
<!-- 头部各种功能 -->
<div id="page">
<div id="page-bgtop">
<!--右侧 -->
<div id="content">
<div class="post">
<h2 class="title"><a href="#">填写订单</a></h2>
<div class="entry">
<form action="<%=path %>/buy?type=orderSubmit" name="f" method="post">
<table width="98%" align="center" border="0" cellpadding="9" cellspacing="9">
<tr align='center'>
<td width="20%" bgcolor="#FFFFFF" align="left">
收货人帐号:
</td>
<td width="80%" bgcolor="#FFFFFF" align="left">
<input type="text" readonly="readonly" value="${sessionScope.user.loginname}"/>
</td>
</tr>
<tr align='center'>
<td width="20%" bgcolor="#FFFFFF" align="left">
收货人姓名:
</td>
<td width="80%" bgcolor="#FFFFFF" align="left">
<input type="text" readonly="readonly" value="${sessionScope.user.name}"/>
</td>
</tr>
<tr align='center'>
<td width="20%" bgcolor="#FFFFFF" align="left">
送货地址:
</td>
<td width="80%" bgcolor="#FFFFFF" align="left">
<input type="text" name="songhuodizhi"/>
</td>
</tr>
<tr align='center'>
<td width="20%" bgcolor="#FFFFFF" align="left">
付款方式:
</td>
<td width="80%" bgcolor="#FFFFFF" align="left">
<select name="fukuanfangshi" style="width:155px;">
<option value="货到付款">货到付款</option>
</select> <!-- 下拉菜单 -->
</td>
</tr>
</table>
<table>
<tr height="7"><td></td></tr>
<tr>
<td width="120"></td>
<td>
<input type="button" value="返回" style="width: 80px;height: 30px;" onclick="back1()">
</td>
<td>
<input type="button" value="提交订单" style="width: 80px;height: 30px;" onclick="javascript:document.f.submit();">
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
<!-- 右侧 -->
<!-- 左侧菜品类别 -->
<div id="sidebar">
<jsp:include flush="true" page="/site/inc/left.jsp"></jsp:include>
</div>
<!-- 左侧菜品类别 -->
<div style="clear: both;">&nbsp;</div>
</div>
</div>
<div id="footer-bgcontent">
<div id="footer">
<p><a href="<%=path %>/login.jsp">系统后台</a></p>
</div>
</div>
</div>
</body>
</html>

@ -0,0 +1,94 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="expires" content="0"/>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
<meta http-equiv="description" content="This is my page"/>
<link href="<%=path %>/css/qiantai.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
function back1()//返回之前的界面
{
window.history.go(-1);
}
</script>
</head>
<body>
<div id="wrapper">
<div id="logo">
<h1><a href="#">基于JSP的高校快餐店订餐系统
</a></h1>
<p><em><a href="#">&nbsp;</a></em></p>
</div>
<hr/>
<!-- 头部各种功能 -->
<div id="header">
<jsp:include flush="true" page="/site/inc/daohang.jsp"></jsp:include>
</div>
<!-- 头部各种功能 -->
<div id="page">
<div id="page-bgtop">
<!-- 右侧 -->
<div id="content">
<div class="post">
<h2 class="title"><a href="#"></a></h2>
<div class="entry">
<table width="99%" border="0" cellpadding="5" cellspacing="5" bgcolor="#FFFFFF" align="center" style="margin-top:8px">
<tr>
<td align="left" style="color: red">恭喜您,订单提交成功!</td>
</tr>
<tr>
<td style="font-size: 15px;">订单编号:${requestScope.order.bianhao }</td>
</tr>
<tr>
<td style="font-size: 15px;">总金额:${requestScope.order.jine }</td>
</tr>
<tr>
<td style="font-size: 15px;">下单日期:${requestScope.order.shijian }</td>
</tr>
<tr>
<td style="font-size: 15px;">送货地址:${requestScope.order.songhuodizhi }</td>
</tr>
<tr>
<td style="font-size: 15px;">付款方式:${requestScope.order.fukuanfangshi }</td>
</tr>
</table>
</div>
</div>
</div>
<!-- 右侧 -->
<!-- 左侧菜品类别 -->
<div id="sidebar">
<jsp:include flush="true" page="/site/inc/left.jsp"></jsp:include>
</div>
<!-- 左侧菜品类别 -->
<div style="clear: both;">&nbsp;</div> <!--clear:both该属性的值指出了不允许有浮动元素 -->
</div>
</div>
<div id="footer-bgcontent">
<div id="footer">
<p><a href="<%=path %>/login.jsp">系统后台</a></p>
</div>
</div>
</div>
</body>
</html>

@ -0,0 +1,188 @@
var tcolor={
cColor:"#EEEEEE", //蒙皮颜色
bColor:"#FFFFFF", //背景颜色
tColor:"#9C9E9C", //标题背景颜色,边框颜色
wColor:"#FFFFFF" //标题文字颜色
};
function popclose()
{
var a = parent.document.getElementById("dialogBoxClose");
a.click();
}
if(!Array.prototype.push){
Array.prototype.push=function(){
var startLength=this.length;
for(var i=0;i<arguments.length;i++)
this[startLength+i]=arguments[i];
return this.length;
}
};
function G(){
//alert("aa");
var elements=new Array();
for(var i=0;i<arguments.length;i++){
var element=arguments[i];
if(typeof element=='string')
element=document.getElementById(element);
if(arguments.length==1)
return element;elements.push(element)
};
return elements
};
Function.prototype.bind=function(object){
var __method=this;
return function(){__method.apply(object,arguments)}
};
Function.prototype.bindAsEventListener=function(object){
var __method=this;
return function(event){__method.call(object,event||window.event)}
};
Object.extend=function(destination,source){
for(property in source){destination[property]=source[property]};return destination
};
if(!window.Event){var Event=new Object()};
Object.extend(Event,{observers:false,element:function(event){return event.target||event.srcElement},isLeftClick:function(event){return(((event.which)&&(event.which==1))||((event.button)&&(event.button==1)))},pointerX:function(event){return event.pageX||(event.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))},pointerY:function(event){return event.pageY||(event.clientY+(document.documentElement.scrollTop||document.body.scrollTop))},stop:function(event){if(event.preventDefault){event.preventDefault();event.stopPropagation()}else{event.returnValue=false;event.cancelBubble=true}},findElement:function(event,tagName){var element=Event.element(event);while(element.parentNode&&(!element.tagName||(element.tagName.toUpperCase()!=tagName.toUpperCase())))element=element.parentNode;return element},_observeAndCache:function(element,name,observer,useCapture){if(!this.observers)this.observers=[];if(element.addEventListener){this.observers.push([element,name,observer,useCapture]);element.addEventListener(name,observer,useCapture)}else if(element.attachEvent){this.observers.push([element,name,observer,useCapture]);element.attachEvent('on'+name,observer)}},unloadCache:function(){if(!Event.observers)return;for(var i=0;i<Event.observers.length;i++){Event.stopObserving.apply(this,Event.observers[i]);Event.observers[i][0]=null};Event.observers=false},observe:function(element,name,observer,useCapture){var element=G(element);useCapture=useCapture||false;if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.attachEvent))name='keydown';this._observeAndCache(element,name,observer,useCapture)},stopObserving:function(element,name,observer,useCapture){var element=G(element);useCapture=useCapture||false;if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.detachEvent))name='keydown';if(element.removeEventListener){element.removeEventListener(name,observer,useCapture)}else if(element.detachEvent){element.detachEvent('on'+name,observer)}}});
Event.observe(window,'unload',Event.unloadCache,false);
var Class=function(){
var _class=function(){
this.initialize.apply(this,arguments)
};
for(i=0;i<arguments.length;i++){
superClass=arguments[i];for(member in superClass.prototype){_class.prototype[member]=superClass.prototype[member]}
};
_class.child=function(){return new Class(this)};
_class.extend=function(f){for(property in f){_class.prototype[property]=f[property]}};
return _class
};
function space(flag){
if(flag=="begin"){
var ele=document.getElementById("ft");
if(typeof(ele)!="undefined"&&ele!=null)
ele.id="ft_popup";
ele=document.getElementById("usrbar");
if(typeof(ele)!="undefined"&&ele!=null)
ele.id="usrbar_popup"
}
else if(flag=="end"){
var ele=document.getElementById("ft_popup");
if(typeof(ele)!="undefined"&&ele!=null)ele.id="ft";
ele=document.getElementById("usrbar_popup");
if(typeof(ele)!="undefined"&&ele!=null)ele.id="usrbar"}
};
// Popup Class begin....
var Popup=new Class();
Popup.prototype={
iframeIdName:'ifr_popup', //iframe的名字
initialize:function(config){
this.config=Object.extend({ //属性设置
contentType:1, //pop类型 1. 内嵌iframe2. 显示给定的html 3. confirm框 4. alert框
isHaveTitle:true, //是否有标题栏
scrollType:'yes', //内嵌iframe是否可以滚动
isBackgroundCanClick:false, //背景是否可以点击
isSupportDraging:true, //是否支持拖动
isShowShadow:true, //是否显示阴影
isReloadOnClose:true, //关闭后是否重新加载页面
width:400, //宽度
height:300 //高度
},config||{});
this.info={ //参数
shadowWidth:0, //阴影宽度
title:"", //标题
contentUrl:"", //iframe的url
contentHtml:"", //内容的html
callBack:null, //回调函数
parameter:null, //调用的参数 如 {id:"divCall",str:"点击确定后显示的字符串",obj:pop}
confirmCon:"", //confirm的内容
alertCon:"", //alert的内容
someHiddenTag:"select,object,embed", //自动隐藏的页面元素
someDisabledBtn:"", //禁用的btn
someHiddenEle:"", //隐藏的匀速
overlay:0, //覆盖
coverOpacity:0 //蒙皮不透明度
};
this.color=tcolor;
this.dropClass=null;
this.someToHidden=[];
this.someToDisabled=[];
if(!this.config.isHaveTitle)
this.config.isSupportDraging=false;
this.iniBuild()
},
setContent:function(arrt,val){ //设置内容,即 this.info 的参数内容
if(val!=''){
switch(arrt){
case 'width':this.config.width=val;break;
case 'height':this.config.height=val;break;
case 'title':this.info.title=val;break;
case 'contentUrl':this.info.contentUrl=val;break;
case 'contentHtml':this.info.contentHtml=val;break;
case 'callBack':this.info.callBack=val;break;
case 'parameter':this.info.parameter=val;break;
case 'confirmCon':this.info.confirmCon=val;break;
case 'alertCon':this.info.alertCon=val;break;
case 'someHiddenTag':this.info.someHiddenTag=val;break;
case 'someHiddenEle':this.info.someHiddenEle=val;break;
case 'someDisabledBtn':this.info.someDisabledBtn=val;break;
case 'overlay':this.info.overlay=val}
}
},
iniBuild:function(){
G('dialogCase')?G('dialogCase').parentNode.removeChild(G('dialogCase')):function(){};
var oDiv=document.createElement('span');oDiv.id='dialogCase';document.body.appendChild(oDiv)
},
build:function(){
var baseZIndex=10001+this.info.overlay*10;
var showZIndex=baseZIndex+2;this.iframeIdName='ifr_popup'+this.info.overlay;
//关闭按钮
//var path="http://img.baidu.com/hi/img/";
//var close='<input type="image" id="dialogBoxClose" src="'+path+'dialogclose.gif" border="0" width="16" height="16" align="absmiddle" title="关闭"/>';
var close='<img id="dialogBoxClose" title="关闭" src=/dingcan/images/dialogclose.gif />';
var cB='filter: alpha(opacity='+this.info.coverOpacity+');opacity:'+this.info.coverOpacity/100+';';
var cover='<div id="dialogBoxBG" style="position:absolute;top:0px;left:0px;width:100%;height:100%;z-index:'+baseZIndex+';'+cB+'background-color:'+this.color.cColor+';display:none;"></div>';
var mainBox='<div id="dialogBox" style="border:1px solid '+this.color.tColor+';display:none;z-index:'+showZIndex+';position:relative;width:'+this.config.width+'px;"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="'+this.color.bColor+'">';if(this.config.isHaveTitle){mainBox+='<tr height="24" bgcolor="'+this.color.tColor+'"><td><table style="-moz-user-select:none;height:24px;" width="100%" border="0" cellpadding="0" cellspacing="0" ><tr>'+'<td width="6" height="24"></td><td id="dialogBoxTitle" style="color:'+this.color.wColor+';font-size:14px;font-weight:bold;">'+this.info.title+'&nbsp;</td>'+'<td id="dialogClose" width="20" align="right" valign="middle">'+close+'</td><td width="6"></td></tr></table></td></tr>'}
else{mainBox+='<tr height="10"><td align="right">'+close+'</td></tr>'};
mainBox+='<tr style="height:'+this.config.height+'px" valign="top"><td id="dialogBody" style="position:relative;"></td></tr></table></div>'+'<div id="dialogBoxShadow" style="display:none;z-index:'+baseZIndex+';"></div>';
if(!this.config.isBackgroundCanClick){G('dialogCase').innerHTML=cover+mainBox;G('dialogBoxBG').style.height=document.body.scrollHeight}
else G('dialogCase').innerHTML=mainBox;Event.observe(G('dialogBoxClose'),"click",this.reset.bindAsEventListener(this),false);
if(this.config.isSupportDraging){dropClass=new Dragdrop(this.config.width,this.config.height,this.info.shadowWidth,this.config.isSupportDraging,this.config.contentType);G("dialogBoxTitle").style.cursor="move"};this.lastBuild()},lastBuild:function(){var confirm='<div style="width:100%;height:100%;text-align:center;"><div style="margin:20px 20px 0 20px;font-size:14px;line-height:16px;color:#000000;">'+this.info.confirmCon+'</div><div style="margin:20px;"><input id="dialogOk" type="button" value=" 确定 "/>&nbsp;<input id="dialogCancel" type="button" value=" 取消 "/></div></div>';
var alert='<div style="width:100%;height:100%;text-align:center;"><div style="margin:20px 20px 0 20px;font-size:14px;line-height:16px;color:#000000;">'+this.info.alertCon+'</div><div style="margin:20px;"><input id="dialogYES" type="button" value=" 确定 "/></div></div>';
var baseZIndex=10001+this.info.overlay*10;var coverIfZIndex=baseZIndex+4;
if(this.config.contentType==1){var openIframe="<iframe width='100%' style='height:"+this.config.height+"px' name='"+this.iframeIdName+"' id='"+this.iframeIdName+"' src='"+this.info.contentUrl+"' frameborder='0' scrolling='"+this.config.scrollType+"'></iframe>";
var coverIframe="<div id='iframeBG' style='position:absolute;top:0px;left:0px;width:1px;height:1px;z-index:"+coverIfZIndex+";filter: alpha(opacity=00);opacity:0.00;background-color:#ffffff;'><div>";G("dialogBody").innerHTML=openIframe+coverIframe}
else if(this.config.contentType==2){G("dialogBody").innerHTML=this.info.contentHtml}else if(this.config.contentType==3){G("dialogBody").innerHTML=confirm;Event.observe(G('dialogOk'),"click",this.forCallback.bindAsEventListener(this),false);
Event.observe(G('dialogCancel'),"click",this.close.bindAsEventListener(this),false)}else if(this.config.contentType==4){G("dialogBody").innerHTML=alert;Event.observe(G('dialogYES'),"click",this.close.bindAsEventListener(this),false)}},reBuild:function(){G('dialogBody').height=G('dialogBody').clientHeight;this.lastBuild()},show:function(){this.hiddenSome();this.middle();if(this.config.isShowShadow)this.shadow()},forCallback:function(){return this.info.callBack(this.info.parameter)},shadow:function(){var oShadow=G('dialogBoxShadow');var oDialog=G('dialogBox');oShadow['style']['position']="absolute";oShadow['style']['background']="#000";oShadow['style']['display']="";oShadow['style']['opacity']="0.2";oShadow['style']['filter']="alpha(opacity=20)";oShadow['style']['top']=oDialog.offsetTop+this.info.shadowWidth;oShadow['style']['left']=oDialog.offsetLeft+this.info.shadowWidth;oShadow['style']['width']=oDialog.offsetWidth;oShadow['style']['height']=oDialog.offsetHeight},middle:function(){if(!this.config.isBackgroundCanClick)G('dialogBoxBG').style.display='';
var oDialog=G('dialogBox');
oDialog['style']['position']="absolute";
oDialog['style']['display']='';
//取得页面的宽度和高度
var sClientWidth=document.body.clientWidth;
var sClientHeight=document.body.clientHeight;
var sScrollTop=document.body.scrollTop;
//
var sleft=(sClientWidth/2)-(oDialog.offsetWidth/2);
var iTop=-80+(sClientHeight/2+sScrollTop)-(oDialog.offsetHeight/2);
var sTop=iTop>0?iTop:(sClientHeight/2+sScrollTop)-(oDialog.offsetHeight/2);
if(sTop<1)sTop="20";if(sleft<1)sleft="20";
oDialog['style']['left']=sleft+"px"; //左侧位置
oDialog['style']['top']=220+"px" //顶部位置
},
reset:function(){if(this.config.isReloadOnClose){top.location.reload()};this.close()},close:function(){G('dialogBox').style.display='none';
if(!this.config.isBackgroundCanClick)G('dialogBoxBG').style.display='none';
if(this.config.isShowShadow)G('dialogBoxShadow').style.display='none';G('dialogBody').innerHTML='';
this.showSome()},hiddenSome:function(){var tag=this.info.someHiddenTag.split(",");
if(tag.length==1&&tag[0]=="")tag.length=0;
for(var i=0;i<tag.length;i++){this.hiddenTag(tag[i])};
var ids=this.info.someHiddenEle.split(",");
if(ids.length==1&&ids[0]=="")ids.length=0;
for(var i=0;i<ids.length;i++){this.hiddenEle(ids[i])};
var ids=this.info.someDisabledBtn.split(",");
if(ids.length==1&&ids[0]=="")ids.length=0;
for(var i=0;i<ids.length;i++){this.disabledBtn(ids[i])};
space("begin")},disabledBtn:function(id){var ele=document.getElementById(id);
if(typeof(ele)!="undefined"&&ele!=null&&ele.disabled==false){ele.disabled=true;this.someToDisabled.push(ele)}},hiddenTag:function(tagName){var ele=document.getElementsByTagName(tagName);
if(ele!=null){for(var i=0;i<ele.length;i++){if(ele[i].style.display!="none"&&ele[i].style.visibility!='hidden'){ele[i].style.visibility='hidden';this.someToHidden.push(ele[i])}}}},hiddenEle:function(id){var ele=document.getElementById(id);if(typeof(ele)!="undefined"&&ele!=null){ele.style.visibility='hidden';this.someToHidden.push(ele)}},showSome:function(){for(var i=0;i<this.someToHidden.length;i++){this.someToHidden[i].style.visibility='visible'};for(var i=0;i<this.someToDisabled.length;i++){this.someToDisabled[i].disabled=false};space("end")}};var Dragdrop=new Class();Dragdrop.prototype={initialize:function(width,height,shadowWidth,showShadow,contentType){this.dragData=null;this.dragDataIn=null;this.backData=null;this.width=width;this.height=height;this.shadowWidth=shadowWidth;this.showShadow=showShadow;this.contentType=contentType;this.IsDraging=false;this.oObj=G('dialogBox');Event.observe(G('dialogBoxTitle'),"mousedown",this.moveStart.bindAsEventListener(this),false)},moveStart:function(event){this.IsDraging=true;if(this.contentType==1){G("iframeBG").style.display="";G("iframeBG").style.width=this.width;G("iframeBG").style.height=this.height};Event.observe(document,"mousemove",this.mousemove.bindAsEventListener(this),false);Event.observe(document,"mouseup",this.mouseup.bindAsEventListener(this),false);Event.observe(document,"selectstart",this.returnFalse,false);this.dragData={x:Event.pointerX(event),y:Event.pointerY(event)};this.backData={x:parseInt(this.oObj.style.left),y:parseInt(this.oObj.style.top)}},mousemove:function(event){if(!this.IsDraging)return;var iLeft=Event.pointerX(event)-this.dragData["x"]+parseInt(this.oObj.style.left);var iTop=Event.pointerY(event)-this.dragData["y"]+parseInt(this.oObj.style.top);if(this.dragData["y"]<parseInt(this.oObj.style.top))iTop=iTop-12;else if(this.dragData["y"]>parseInt(this.oObj.style.top)+25)iTop=iTop+12;this.oObj.style.left=iLeft;this.oObj.style.top=iTop;if(this.showShadow){G('dialogBoxShadow').style.left=iLeft+this.shadowWidth;G('dialogBoxShadow').style.top=iTop+this.shadowWidth};this.dragData={x:Event.pointerX(event),y:Event.pointerY(event)};document.body.style.cursor="move"},mouseup:function(event){if(!this.IsDraging)return;if(this.contentType==1)G("iframeBG").style.display="none";document.onmousemove=null;document.onmouseup=null;var mousX=Event.pointerX(event)-(document.documentElement.scrollLeft||document.body.scrollLeft);var mousY=Event.pointerY(event)-(document.documentElement.scrollTop||document.body.scrollTop);if(mousX<1||mousY<1||mousX>document.body.clientWidth||mousY>document.body.clientHeight){this.oObj.style.left=this.backData["x"];this.oObj.style.top=this.backData["y"];if(this.showShadow){G('dialogBoxShadow').style.left=this.backData.x+this.shadowWidth;G('dialogBoxShadow').style.top=this.backData.y+this.shadowWidth}};this.IsDraging=false;document.body.style.cursor="";Event.stopObserving(document,"selectstart",this.returnFalse,false)},returnFalse:function(){return false}};

@ -0,0 +1,188 @@
var tcolor={
cColor:"#EEEEEE", //蒙皮颜色
bColor:"#FFFFFF", //背景颜色
tColor:"#9C9E9C", //标题背景颜色,边框颜色
wColor:"#FFFFFF" //标题文字颜色
};
function popclose()
{
var a = parent.document.getElementById("dialogBoxClose");
a.click();
}
if(!Array.prototype.push){
Array.prototype.push=function(){
var startLength=this.length;
for(var i=0;i<arguments.length;i++)
this[startLength+i]=arguments[i];
return this.length;
}
};
function G(){
//alert("aa");
var elements=new Array();
for(var i=0;i<arguments.length;i++){
var element=arguments[i];
if(typeof element=='string')
element=document.getElementById(element);
if(arguments.length==1)
return element;elements.push(element)
};
return elements
};
Function.prototype.bind=function(object){
var __method=this;
return function(){__method.apply(object,arguments)}
};
Function.prototype.bindAsEventListener=function(object){
var __method=this;
return function(event){__method.call(object,event||window.event)}
};
Object.extend=function(destination,source){
for(property in source){destination[property]=source[property]};return destination
};
if(!window.Event){var Event=new Object()};
Object.extend(Event,{observers:false,element:function(event){return event.target||event.srcElement},isLeftClick:function(event){return(((event.which)&&(event.which==1))||((event.button)&&(event.button==1)))},pointerX:function(event){return event.pageX||(event.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))},pointerY:function(event){return event.pageY||(event.clientY+(document.documentElement.scrollTop||document.body.scrollTop))},stop:function(event){if(event.preventDefault){event.preventDefault();event.stopPropagation()}else{event.returnValue=false;event.cancelBubble=true}},findElement:function(event,tagName){var element=Event.element(event);while(element.parentNode&&(!element.tagName||(element.tagName.toUpperCase()!=tagName.toUpperCase())))element=element.parentNode;return element},_observeAndCache:function(element,name,observer,useCapture){if(!this.observers)this.observers=[];if(element.addEventListener){this.observers.push([element,name,observer,useCapture]);element.addEventListener(name,observer,useCapture)}else if(element.attachEvent){this.observers.push([element,name,observer,useCapture]);element.attachEvent('on'+name,observer)}},unloadCache:function(){if(!Event.observers)return;for(var i=0;i<Event.observers.length;i++){Event.stopObserving.apply(this,Event.observers[i]);Event.observers[i][0]=null};Event.observers=false},observe:function(element,name,observer,useCapture){var element=G(element);useCapture=useCapture||false;if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.attachEvent))name='keydown';this._observeAndCache(element,name,observer,useCapture)},stopObserving:function(element,name,observer,useCapture){var element=G(element);useCapture=useCapture||false;if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.detachEvent))name='keydown';if(element.removeEventListener){element.removeEventListener(name,observer,useCapture)}else if(element.detachEvent){element.detachEvent('on'+name,observer)}}});
Event.observe(window,'unload',Event.unloadCache,false);
var Class=function(){
var _class=function(){
this.initialize.apply(this,arguments)
};
for(i=0;i<arguments.length;i++){
superClass=arguments[i];for(member in superClass.prototype){_class.prototype[member]=superClass.prototype[member]}
};
_class.child=function(){return new Class(this)};
_class.extend=function(f){for(property in f){_class.prototype[property]=f[property]}};
return _class
};
function space(flag){
if(flag=="begin"){
var ele=document.getElementById("ft");
if(typeof(ele)!="undefined"&&ele!=null)
ele.id="ft_popup";
ele=document.getElementById("usrbar");
if(typeof(ele)!="undefined"&&ele!=null)
ele.id="usrbar_popup"
}
else if(flag=="end"){
var ele=document.getElementById("ft_popup");
if(typeof(ele)!="undefined"&&ele!=null)ele.id="ft";
ele=document.getElementById("usrbar_popup");
if(typeof(ele)!="undefined"&&ele!=null)ele.id="usrbar"}
};
// Popup Class begin....
var Popup=new Class();
Popup.prototype={
iframeIdName:'ifr_popup', //iframe的名字
initialize:function(config){
this.config=Object.extend({ //属性设置
contentType:1, //pop类型 1. 内嵌iframe2. 显示给定的html 3. confirm框 4. alert框
isHaveTitle:true, //是否有标题栏
scrollType:'yes', //内嵌iframe是否可以滚动
isBackgroundCanClick:false, //背景是否可以点击
isSupportDraging:true, //是否支持拖动
isShowShadow:true, //是否显示阴影
isReloadOnClose:true, //关闭后是否重新加载页面
width:400, //宽度
height:300 //高度
},config||{});
this.info={ //参数
shadowWidth:0, //阴影宽度
title:"", //标题
contentUrl:"", //iframe的url
contentHtml:"", //内容的html
callBack:null, //回调函数
parameter:null, //调用的参数 如 {id:"divCall",str:"点击确定后显示的字符串",obj:pop}
confirmCon:"", //confirm的内容
alertCon:"", //alert的内容
someHiddenTag:"select,object,embed", //自动隐藏的页面元素
someDisabledBtn:"", //禁用的btn
someHiddenEle:"", //隐藏的匀速
overlay:0, //覆盖
coverOpacity:0 //蒙皮不透明度
};
this.color=tcolor;
this.dropClass=null;
this.someToHidden=[];
this.someToDisabled=[];
if(!this.config.isHaveTitle)
this.config.isSupportDraging=false;
this.iniBuild()
},
setContent:function(arrt,val){ //设置内容,即 this.info 的参数内容
if(val!=''){
switch(arrt){
case 'width':this.config.width=val;break;
case 'height':this.config.height=val;break;
case 'title':this.info.title=val;break;
case 'contentUrl':this.info.contentUrl=val;break;
case 'contentHtml':this.info.contentHtml=val;break;
case 'callBack':this.info.callBack=val;break;
case 'parameter':this.info.parameter=val;break;
case 'confirmCon':this.info.confirmCon=val;break;
case 'alertCon':this.info.alertCon=val;break;
case 'someHiddenTag':this.info.someHiddenTag=val;break;
case 'someHiddenEle':this.info.someHiddenEle=val;break;
case 'someDisabledBtn':this.info.someDisabledBtn=val;break;
case 'overlay':this.info.overlay=val}
}
},
iniBuild:function(){
G('dialogCase')?G('dialogCase').parentNode.removeChild(G('dialogCase')):function(){};
var oDiv=document.createElement('span');oDiv.id='dialogCase';document.body.appendChild(oDiv)
},
build:function(){
var baseZIndex=10001+this.info.overlay*10;
var showZIndex=baseZIndex+2;this.iframeIdName='ifr_popup'+this.info.overlay;
//关闭按钮
//var path="http://img.baidu.com/hi/img/";
//var close='<input type="image" id="dialogBoxClose" src="'+path+'dialogclose.gif" border="0" width="16" height="16" align="absmiddle" title="关闭"/>';
var close='<img id="dialogBoxClose" title="关闭" src=/dingcan/images/dialogclose.gif />';
var cB='filter: alpha(opacity='+this.info.coverOpacity+');opacity:'+this.info.coverOpacity/100+';';
var cover='<div id="dialogBoxBG" style="position:absolute;top:0px;left:0px;width:100%;height:100%;z-index:'+baseZIndex+';'+cB+'background-color:'+this.color.cColor+';display:none;"></div>';
var mainBox='<div id="dialogBox" style="border:1px solid '+this.color.tColor+';display:none;z-index:'+showZIndex+';position:relative;width:'+this.config.width+'px;"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="'+this.color.bColor+'">';if(this.config.isHaveTitle){mainBox+='<tr height="24" bgcolor="'+this.color.tColor+'"><td><table style="-moz-user-select:none;height:24px;" width="100%" border="0" cellpadding="0" cellspacing="0" ><tr>'+'<td width="6" height="24"></td><td id="dialogBoxTitle" style="color:'+this.color.wColor+';font-size:14px;font-weight:bold;">'+this.info.title+'&nbsp;</td>'+'<td id="dialogClose" width="20" align="right" valign="middle">'+close+'</td><td width="6"></td></tr></table></td></tr>'}
else{mainBox+='<tr height="10"><td align="right">'+close+'</td></tr>'};
mainBox+='<tr style="height:'+this.config.height+'px" valign="top"><td id="dialogBody" style="position:relative;"></td></tr></table></div>'+'<div id="dialogBoxShadow" style="display:none;z-index:'+baseZIndex+';"></div>';
if(!this.config.isBackgroundCanClick){G('dialogCase').innerHTML=cover+mainBox;G('dialogBoxBG').style.height=document.body.scrollHeight}
else G('dialogCase').innerHTML=mainBox;Event.observe(G('dialogBoxClose'),"click",this.reset.bindAsEventListener(this),false);
if(this.config.isSupportDraging){dropClass=new Dragdrop(this.config.width,this.config.height,this.info.shadowWidth,this.config.isSupportDraging,this.config.contentType);G("dialogBoxTitle").style.cursor="move"};this.lastBuild()},lastBuild:function(){var confirm='<div style="width:100%;height:100%;text-align:center;"><div style="margin:20px 20px 0 20px;font-size:14px;line-height:16px;color:#000000;">'+this.info.confirmCon+'</div><div style="margin:20px;"><input id="dialogOk" type="button" value=" 确定 "/>&nbsp;<input id="dialogCancel" type="button" value=" 取消 "/></div></div>';
var alert='<div style="width:100%;height:100%;text-align:center;"><div style="margin:20px 20px 0 20px;font-size:14px;line-height:16px;color:#000000;">'+this.info.alertCon+'</div><div style="margin:20px;"><input id="dialogYES" type="button" value=" 确定 "/></div></div>';
var baseZIndex=10001+this.info.overlay*10;var coverIfZIndex=baseZIndex+4;
if(this.config.contentType==1){var openIframe="<iframe width='100%' style='height:"+this.config.height+"px' name='"+this.iframeIdName+"' id='"+this.iframeIdName+"' src='"+this.info.contentUrl+"' frameborder='0' scrolling='"+this.config.scrollType+"'></iframe>";
var coverIframe="<div id='iframeBG' style='position:absolute;top:0px;left:0px;width:1px;height:1px;z-index:"+coverIfZIndex+";filter: alpha(opacity=00);opacity:0.00;background-color:#ffffff;'><div>";G("dialogBody").innerHTML=openIframe+coverIframe}
else if(this.config.contentType==2){G("dialogBody").innerHTML=this.info.contentHtml}else if(this.config.contentType==3){G("dialogBody").innerHTML=confirm;Event.observe(G('dialogOk'),"click",this.forCallback.bindAsEventListener(this),false);
Event.observe(G('dialogCancel'),"click",this.close.bindAsEventListener(this),false)}else if(this.config.contentType==4){G("dialogBody").innerHTML=alert;Event.observe(G('dialogYES'),"click",this.close.bindAsEventListener(this),false)}},reBuild:function(){G('dialogBody').height=G('dialogBody').clientHeight;this.lastBuild()},show:function(){this.hiddenSome();this.middle();if(this.config.isShowShadow)this.shadow()},forCallback:function(){return this.info.callBack(this.info.parameter)},shadow:function(){var oShadow=G('dialogBoxShadow');var oDialog=G('dialogBox');oShadow['style']['position']="absolute";oShadow['style']['background']="#000";oShadow['style']['display']="";oShadow['style']['opacity']="0.2";oShadow['style']['filter']="alpha(opacity=20)";oShadow['style']['top']=oDialog.offsetTop+this.info.shadowWidth;oShadow['style']['left']=oDialog.offsetLeft+this.info.shadowWidth;oShadow['style']['width']=oDialog.offsetWidth;oShadow['style']['height']=oDialog.offsetHeight},middle:function(){if(!this.config.isBackgroundCanClick)G('dialogBoxBG').style.display='';
var oDialog=G('dialogBox');
oDialog['style']['position']="absolute";
oDialog['style']['display']='';
//取得页面的宽度和高度
var sClientWidth=document.body.clientWidth;
var sClientHeight=document.body.clientHeight;
var sScrollTop=document.body.scrollTop;
//
var sleft=(sClientWidth/2)-(oDialog.offsetWidth/2);
var iTop=-80+(sClientHeight/2+sScrollTop)-(oDialog.offsetHeight/2);
var sTop=iTop>0?iTop:(sClientHeight/2+sScrollTop)-(oDialog.offsetHeight/2);
if(sTop<1)sTop="20";if(sleft<1)sleft="20";
oDialog['style']['left']=sleft+"px"; //左侧位置
oDialog['style']['top']=220+"px" //顶部位置
},
reset:function(){if(this.config.isReloadOnClose){top.location.reload()};this.close()},close:function(){G('dialogBox').style.display='none';window.location.reload();
if(!this.config.isBackgroundCanClick)G('dialogBoxBG').style.display='none';
if(this.config.isShowShadow)G('dialogBoxShadow').style.display='none';G('dialogBody').innerHTML='';
this.showSome()},hiddenSome:function(){var tag=this.info.someHiddenTag.split(",");
if(tag.length==1&&tag[0]=="")tag.length=0;
for(var i=0;i<tag.length;i++){this.hiddenTag(tag[i])};
var ids=this.info.someHiddenEle.split(",");
if(ids.length==1&&ids[0]=="")ids.length=0;
for(var i=0;i<ids.length;i++){this.hiddenEle(ids[i])};
var ids=this.info.someDisabledBtn.split(",");
if(ids.length==1&&ids[0]=="")ids.length=0;
for(var i=0;i<ids.length;i++){this.disabledBtn(ids[i])};
space("begin")},disabledBtn:function(id){var ele=document.getElementById(id);
if(typeof(ele)!="undefined"&&ele!=null&&ele.disabled==false){ele.disabled=true;this.someToDisabled.push(ele)}},hiddenTag:function(tagName){var ele=document.getElementsByTagName(tagName);
if(ele!=null){for(var i=0;i<ele.length;i++){if(ele[i].style.display!="none"&&ele[i].style.visibility!='hidden'){ele[i].style.visibility='hidden';this.someToHidden.push(ele[i])}}}},hiddenEle:function(id){var ele=document.getElementById(id);if(typeof(ele)!="undefined"&&ele!=null){ele.style.visibility='hidden';this.someToHidden.push(ele)}},showSome:function(){for(var i=0;i<this.someToHidden.length;i++){this.someToHidden[i].style.visibility='visible'};for(var i=0;i<this.someToDisabled.length;i++){this.someToDisabled[i].disabled=false};space("end")}};var Dragdrop=new Class();Dragdrop.prototype={initialize:function(width,height,shadowWidth,showShadow,contentType){this.dragData=null;this.dragDataIn=null;this.backData=null;this.width=width;this.height=height;this.shadowWidth=shadowWidth;this.showShadow=showShadow;this.contentType=contentType;this.IsDraging=false;this.oObj=G('dialogBox');Event.observe(G('dialogBoxTitle'),"mousedown",this.moveStart.bindAsEventListener(this),false)},moveStart:function(event){this.IsDraging=true;if(this.contentType==1){G("iframeBG").style.display="";G("iframeBG").style.width=this.width;G("iframeBG").style.height=this.height};Event.observe(document,"mousemove",this.mousemove.bindAsEventListener(this),false);Event.observe(document,"mouseup",this.mouseup.bindAsEventListener(this),false);Event.observe(document,"selectstart",this.returnFalse,false);this.dragData={x:Event.pointerX(event),y:Event.pointerY(event)};this.backData={x:parseInt(this.oObj.style.left),y:parseInt(this.oObj.style.top)}},mousemove:function(event){if(!this.IsDraging)return;var iLeft=Event.pointerX(event)-this.dragData["x"]+parseInt(this.oObj.style.left);var iTop=Event.pointerY(event)-this.dragData["y"]+parseInt(this.oObj.style.top);if(this.dragData["y"]<parseInt(this.oObj.style.top))iTop=iTop-12;else if(this.dragData["y"]>parseInt(this.oObj.style.top)+25)iTop=iTop+12;this.oObj.style.left=iLeft;this.oObj.style.top=iTop;if(this.showShadow){G('dialogBoxShadow').style.left=iLeft+this.shadowWidth;G('dialogBoxShadow').style.top=iTop+this.shadowWidth};this.dragData={x:Event.pointerX(event),y:Event.pointerY(event)};document.body.style.cursor="move"},mouseup:function(event){if(!this.IsDraging)return;if(this.contentType==1)G("iframeBG").style.display="none";document.onmousemove=null;document.onmouseup=null;var mousX=Event.pointerX(event)-(document.documentElement.scrollLeft||document.body.scrollLeft);var mousY=Event.pointerY(event)-(document.documentElement.scrollTop||document.body.scrollTop);if(mousX<1||mousY<1||mousX>document.body.clientWidth||mousY>document.body.clientHeight){this.oObj.style.left=this.backData["x"];this.oObj.style.top=this.backData["y"];if(this.showShadow){G('dialogBoxShadow').style.left=this.backData.x+this.shadowWidth;G('dialogBoxShadow').style.top=this.backData.y+this.shadowWidth}};this.IsDraging=false;document.body.style.cursor="";Event.stopObserving(document,"selectstart",this.returnFalse,false)},returnFalse:function(){return false}};

@ -0,0 +1,188 @@
var tcolor={
cColor:"#EEEEEE", //蒙皮颜色
bColor:"#FFFFFF", //背景颜色
tColor:"#9C9E9C", //标题背景颜色,边框颜色
wColor:"#FFFFFF" //标题文字颜色
};
function popclose()
{
var a = parent.document.getElementById("dialogBoxClose");
a.click();
}
if(!Array.prototype.push){
Array.prototype.push=function(){
var startLength=this.length;
for(var i=0;i<arguments.length;i++)
this[startLength+i]=arguments[i];
return this.length;
}
};
function G(){
//alert("aa");
var elements=new Array();
for(var i=0;i<arguments.length;i++){
var element=arguments[i];
if(typeof element=='string')
element=document.getElementById(element);
if(arguments.length==1)
return element;elements.push(element)
};
return elements
};
Function.prototype.bind=function(object){
var __method=this;
return function(){__method.apply(object,arguments)}
};
Function.prototype.bindAsEventListener=function(object){
var __method=this;
return function(event){__method.call(object,event||window.event)}
};
Object.extend=function(destination,source){
for(property in source){destination[property]=source[property]};return destination
};
if(!window.Event){var Event=new Object()};
Object.extend(Event,{observers:false,element:function(event){return event.target||event.srcElement},isLeftClick:function(event){return(((event.which)&&(event.which==1))||((event.button)&&(event.button==1)))},pointerX:function(event){return event.pageX||(event.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft))},pointerY:function(event){return event.pageY||(event.clientY+(document.documentElement.scrollTop||document.body.scrollTop))},stop:function(event){if(event.preventDefault){event.preventDefault();event.stopPropagation()}else{event.returnValue=false;event.cancelBubble=true}},findElement:function(event,tagName){var element=Event.element(event);while(element.parentNode&&(!element.tagName||(element.tagName.toUpperCase()!=tagName.toUpperCase())))element=element.parentNode;return element},_observeAndCache:function(element,name,observer,useCapture){if(!this.observers)this.observers=[];if(element.addEventListener){this.observers.push([element,name,observer,useCapture]);element.addEventListener(name,observer,useCapture)}else if(element.attachEvent){this.observers.push([element,name,observer,useCapture]);element.attachEvent('on'+name,observer)}},unloadCache:function(){if(!Event.observers)return;for(var i=0;i<Event.observers.length;i++){Event.stopObserving.apply(this,Event.observers[i]);Event.observers[i][0]=null};Event.observers=false},observe:function(element,name,observer,useCapture){var element=G(element);useCapture=useCapture||false;if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.attachEvent))name='keydown';this._observeAndCache(element,name,observer,useCapture)},stopObserving:function(element,name,observer,useCapture){var element=G(element);useCapture=useCapture||false;if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.detachEvent))name='keydown';if(element.removeEventListener){element.removeEventListener(name,observer,useCapture)}else if(element.detachEvent){element.detachEvent('on'+name,observer)}}});
Event.observe(window,'unload',Event.unloadCache,false);
var Class=function(){
var _class=function(){
this.initialize.apply(this,arguments)
};
for(i=0;i<arguments.length;i++){
superClass=arguments[i];for(member in superClass.prototype){_class.prototype[member]=superClass.prototype[member]}
};
_class.child=function(){return new Class(this)};
_class.extend=function(f){for(property in f){_class.prototype[property]=f[property]}};
return _class
};
function space(flag){
if(flag=="begin"){
var ele=document.getElementById("ft");
if(typeof(ele)!="undefined"&&ele!=null)
ele.id="ft_popup";
ele=document.getElementById("usrbar");
if(typeof(ele)!="undefined"&&ele!=null)
ele.id="usrbar_popup"
}
else if(flag=="end"){
var ele=document.getElementById("ft_popup");
if(typeof(ele)!="undefined"&&ele!=null)ele.id="ft";
ele=document.getElementById("usrbar_popup");
if(typeof(ele)!="undefined"&&ele!=null)ele.id="usrbar"}
};
// Popup Class begin....
var Popup=new Class();
Popup.prototype={
iframeIdName:'ifr_popup', //iframe的名字
initialize:function(config){
this.config=Object.extend({ //属性设置
contentType:1, //pop类型 1. 内嵌iframe2. 显示给定的html 3. confirm框 4. alert框
isHaveTitle:true, //是否有标题栏
scrollType:'yes', //内嵌iframe是否可以滚动
isBackgroundCanClick:false, //背景是否可以点击
isSupportDraging:true, //是否支持拖动
isShowShadow:true, //是否显示阴影
isReloadOnClose:true, //关闭后是否重新加载页面
width:400, //宽度
height:300 //高度
},config||{});
this.info={ //参数
shadowWidth:0, //阴影宽度
title:"", //标题
contentUrl:"", //iframe的url
contentHtml:"", //内容的html
callBack:null, //回调函数
parameter:null, //调用的参数 如 {id:"divCall",str:"点击确定后显示的字符串",obj:pop}
confirmCon:"", //confirm的内容
alertCon:"", //alert的内容
someHiddenTag:"select,object,embed", //自动隐藏的页面元素
someDisabledBtn:"", //禁用的btn
someHiddenEle:"", //隐藏的匀速
overlay:0, //覆盖
coverOpacity:0 //蒙皮不透明度
};
this.color=tcolor;
this.dropClass=null;
this.someToHidden=[];
this.someToDisabled=[];
if(!this.config.isHaveTitle)
this.config.isSupportDraging=false;
this.iniBuild()
},
setContent:function(arrt,val){ //设置内容,即 this.info 的参数内容
if(val!=''){
switch(arrt){
case 'width':this.config.width=val;break;
case 'height':this.config.height=val;break;
case 'title':this.info.title=val;break;
case 'contentUrl':this.info.contentUrl=val;break;
case 'contentHtml':this.info.contentHtml=val;break;
case 'callBack':this.info.callBack=val;break;
case 'parameter':this.info.parameter=val;break;
case 'confirmCon':this.info.confirmCon=val;break;
case 'alertCon':this.info.alertCon=val;break;
case 'someHiddenTag':this.info.someHiddenTag=val;break;
case 'someHiddenEle':this.info.someHiddenEle=val;break;
case 'someDisabledBtn':this.info.someDisabledBtn=val;break;
case 'overlay':this.info.overlay=val}
}
},
iniBuild:function(){
G('dialogCase')?G('dialogCase').parentNode.removeChild(G('dialogCase')):function(){};
var oDiv=document.createElement('span');oDiv.id='dialogCase';document.body.appendChild(oDiv)
},
build:function(){
var baseZIndex=10001+this.info.overlay*10;
var showZIndex=baseZIndex+2;this.iframeIdName='ifr_popup'+this.info.overlay;
//关闭按钮
//var path="http://img.baidu.com/hi/img/";
//var close='<input type="image" id="dialogBoxClose" src="'+path+'dialogclose.gif" border="0" width="16" height="16" align="absmiddle" title="关闭"/>';
var close='<img id="dialogBoxClose" title="关闭" src=/dingcan/images/dialogclose.gif />';
var cB='filter: alpha(opacity='+this.info.coverOpacity+');opacity:'+this.info.coverOpacity/100+';';
var cover='<div id="dialogBoxBG" style="position:absolute;top:0px;left:0px;width:100%;height:100%;z-index:'+baseZIndex+';'+cB+'background-color:'+this.color.cColor+';display:none;"></div>';
var mainBox='<div id="dialogBox" style="border:1px solid '+this.color.tColor+';display:none;z-index:'+showZIndex+';position:relative;width:'+this.config.width+'px;"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="'+this.color.bColor+'">';if(this.config.isHaveTitle){mainBox+='<tr height="24" bgcolor="'+this.color.tColor+'"><td><table style="-moz-user-select:none;height:24px;" width="100%" border="0" cellpadding="0" cellspacing="0" ><tr>'+'<td width="6" height="24"></td><td id="dialogBoxTitle" style="color:'+this.color.wColor+';font-size:14px;font-weight:bold;">'+this.info.title+'&nbsp;</td>'+'<td id="dialogClose" width="20" align="right" valign="middle">'+close+'</td><td width="6"></td></tr></table></td></tr>'}
else{mainBox+='<tr height="10"><td align="right">'+close+'</td></tr>'};
mainBox+='<tr style="height:'+this.config.height+'px" valign="top"><td id="dialogBody" style="position:relative;"></td></tr></table></div>'+'<div id="dialogBoxShadow" style="display:none;z-index:'+baseZIndex+';"></div>';
if(!this.config.isBackgroundCanClick){G('dialogCase').innerHTML=cover+mainBox;G('dialogBoxBG').style.height=document.body.scrollHeight}
else G('dialogCase').innerHTML=mainBox;Event.observe(G('dialogBoxClose'),"click",this.reset.bindAsEventListener(this),false);
if(this.config.isSupportDraging){dropClass=new Dragdrop(this.config.width,this.config.height,this.info.shadowWidth,this.config.isSupportDraging,this.config.contentType);G("dialogBoxTitle").style.cursor="move"};this.lastBuild()},lastBuild:function(){var confirm='<div style="width:100%;height:100%;text-align:center;"><div style="margin:20px 20px 0 20px;font-size:14px;line-height:16px;color:#000000;">'+this.info.confirmCon+'</div><div style="margin:20px;"><input id="dialogOk" type="button" value=" 确定 "/>&nbsp;<input id="dialogCancel" type="button" value=" 取消 "/></div></div>';
var alert='<div style="width:100%;height:100%;text-align:center;"><div style="margin:20px 20px 0 20px;font-size:14px;line-height:16px;color:#000000;">'+this.info.alertCon+'</div><div style="margin:20px;"><input id="dialogYES" type="button" value=" 确定 "/></div></div>';
var baseZIndex=10001+this.info.overlay*10;var coverIfZIndex=baseZIndex+4;
if(this.config.contentType==1){var openIframe="<iframe width='100%' style='height:"+this.config.height+"px' name='"+this.iframeIdName+"' id='"+this.iframeIdName+"' src='"+this.info.contentUrl+"' frameborder='0' scrolling='"+this.config.scrollType+"'></iframe>";
var coverIframe="<div id='iframeBG' style='position:absolute;top:0px;left:0px;width:1px;height:1px;z-index:"+coverIfZIndex+";filter: alpha(opacity=00);opacity:0.00;background-color:#ffffff;'><div>";G("dialogBody").innerHTML=openIframe+coverIframe}
else if(this.config.contentType==2){G("dialogBody").innerHTML=this.info.contentHtml}else if(this.config.contentType==3){G("dialogBody").innerHTML=confirm;Event.observe(G('dialogOk'),"click",this.forCallback.bindAsEventListener(this),false);
Event.observe(G('dialogCancel'),"click",this.close.bindAsEventListener(this),false)}else if(this.config.contentType==4){G("dialogBody").innerHTML=alert;Event.observe(G('dialogYES'),"click",this.close.bindAsEventListener(this),false)}},reBuild:function(){G('dialogBody').height=G('dialogBody').clientHeight;this.lastBuild()},show:function(){this.hiddenSome();this.middle();if(this.config.isShowShadow)this.shadow()},forCallback:function(){return this.info.callBack(this.info.parameter)},shadow:function(){var oShadow=G('dialogBoxShadow');var oDialog=G('dialogBox');oShadow['style']['position']="absolute";oShadow['style']['background']="#000";oShadow['style']['display']="";oShadow['style']['opacity']="0.2";oShadow['style']['filter']="alpha(opacity=20)";oShadow['style']['top']=oDialog.offsetTop+this.info.shadowWidth;oShadow['style']['left']=oDialog.offsetLeft+this.info.shadowWidth;oShadow['style']['width']=oDialog.offsetWidth;oShadow['style']['height']=oDialog.offsetHeight},middle:function(){if(!this.config.isBackgroundCanClick)G('dialogBoxBG').style.display='';
var oDialog=G('dialogBox');
oDialog['style']['position']="absolute";
oDialog['style']['display']='';
//取得页面的宽度和高度
var sClientWidth=document.body.clientWidth;
var sClientHeight=document.body.clientHeight;
var sScrollTop=document.body.scrollTop;
//
var sleft=(sClientWidth/2)-(oDialog.offsetWidth/2);
var iTop=-80+(sClientHeight/2+sScrollTop)-(oDialog.offsetHeight/2);
var sTop=iTop>0?iTop:(sClientHeight/2+sScrollTop)-(oDialog.offsetHeight/2);
if(sTop<1)sTop="20";if(sleft<1)sleft="20";
oDialog['style']['left']=sleft+"px"; //左侧位置
oDialog['style']['top']=220+"px" //顶部位置
},
reset:function(){if(this.config.isReloadOnClose){top.location.reload()};this.close()},close:function(){G('dialogBox').style.display='none';
if(!this.config.isBackgroundCanClick)G('dialogBoxBG').style.display='none';
if(this.config.isShowShadow)G('dialogBoxShadow').style.display='none';G('dialogBody').innerHTML='';
this.showSome()},hiddenSome:function(){var tag=this.info.someHiddenTag.split(",");
if(tag.length==1&&tag[0]=="")tag.length=0;
for(var i=0;i<tag.length;i++){this.hiddenTag(tag[i])};
var ids=this.info.someHiddenEle.split(",");
if(ids.length==1&&ids[0]=="")ids.length=0;
for(var i=0;i<ids.length;i++){this.hiddenEle(ids[i])};
var ids=this.info.someDisabledBtn.split(",");
if(ids.length==1&&ids[0]=="")ids.length=0;
for(var i=0;i<ids.length;i++){this.disabledBtn(ids[i])};
space("begin")},disabledBtn:function(id){var ele=document.getElementById(id);
if(typeof(ele)!="undefined"&&ele!=null&&ele.disabled==false){ele.disabled=true;this.someToDisabled.push(ele)}},hiddenTag:function(tagName){var ele=document.getElementsByTagName(tagName);
if(ele!=null){for(var i=0;i<ele.length;i++){if(ele[i].style.display!="none"&&ele[i].style.visibility!='hidden'){ele[i].style.visibility='hidden';this.someToHidden.push(ele[i])}}}},hiddenEle:function(id){var ele=document.getElementById(id);if(typeof(ele)!="undefined"&&ele!=null){ele.style.visibility='hidden';this.someToHidden.push(ele)}},showSome:function(){for(var i=0;i<this.someToHidden.length;i++){this.someToHidden[i].style.visibility='visible'};for(var i=0;i<this.someToDisabled.length;i++){this.someToDisabled[i].disabled=false};space("end")}};var Dragdrop=new Class();Dragdrop.prototype={initialize:function(width,height,shadowWidth,showShadow,contentType){this.dragData=null;this.dragDataIn=null;this.backData=null;this.width=width;this.height=height;this.shadowWidth=shadowWidth;this.showShadow=showShadow;this.contentType=contentType;this.IsDraging=false;this.oObj=G('dialogBox');Event.observe(G('dialogBoxTitle'),"mousedown",this.moveStart.bindAsEventListener(this),false)},moveStart:function(event){this.IsDraging=true;if(this.contentType==1){G("iframeBG").style.display="";G("iframeBG").style.width=this.width;G("iframeBG").style.height=this.height};Event.observe(document,"mousemove",this.mousemove.bindAsEventListener(this),false);Event.observe(document,"mouseup",this.mouseup.bindAsEventListener(this),false);Event.observe(document,"selectstart",this.returnFalse,false);this.dragData={x:Event.pointerX(event),y:Event.pointerY(event)};this.backData={x:parseInt(this.oObj.style.left),y:parseInt(this.oObj.style.top)}},mousemove:function(event){if(!this.IsDraging)return;var iLeft=Event.pointerX(event)-this.dragData["x"]+parseInt(this.oObj.style.left);var iTop=Event.pointerY(event)-this.dragData["y"]+parseInt(this.oObj.style.top);if(this.dragData["y"]<parseInt(this.oObj.style.top))iTop=iTop-12;else if(this.dragData["y"]>parseInt(this.oObj.style.top)+25)iTop=iTop+12;this.oObj.style.left=iLeft;this.oObj.style.top=iTop;if(this.showShadow){G('dialogBoxShadow').style.left=iLeft+this.shadowWidth;G('dialogBoxShadow').style.top=iTop+this.shadowWidth};this.dragData={x:Event.pointerX(event),y:Event.pointerY(event)};document.body.style.cursor="move"},mouseup:function(event){if(!this.IsDraging)return;if(this.contentType==1)G("iframeBG").style.display="none";document.onmousemove=null;document.onmouseup=null;var mousX=Event.pointerX(event)-(document.documentElement.scrollLeft||document.body.scrollLeft);var mousY=Event.pointerY(event)-(document.documentElement.scrollTop||document.body.scrollTop);if(mousX<1||mousY<1||mousX>document.body.clientWidth||mousY>document.body.clientHeight){this.oObj.style.left=this.backData["x"];this.oObj.style.top=this.backData["y"];if(this.showShadow){G('dialogBoxShadow').style.left=this.backData.x+this.shadowWidth;G('dialogBoxShadow').style.top=this.backData.y+this.shadowWidth}};this.IsDraging=false;document.body.style.cursor="";Event.stopObserving(document,"selectstart",this.returnFalse,false)},returnFalse:function(){return false}};

@ -0,0 +1,474 @@
/*
* 打开新窗口 f:链接地址 n:窗口的名称 w:窗口的宽度 h:窗口的高度 s:窗口是否有滚动条1有滚动条0没有滚动条
*/
function openWin(f, n, w, h, s)
{
var result=window.open(f,n,"dialogHeight:"+h+";dialogWidth:"+w+";"+s);
if(result==true)
{
window.location.reload(true);
}
else
{
//window.location.reload(true);
}
}
/*
* 删除记录
*/
function del(url, info)
{
//if (openDeleteDialog(url, info))
//{
//window.location.reload(true);
//}
if (confirm(info))
{
var result=window.open(url,"window123","dialogHeight:234px;dialogWidth:271px;resizable:no;help:no;status:no;scroll:no");
if(result==true)
{
window.location.reload(true);
}
else
{
}
}
else
{
}
}
/*
* 校验checkbox
*/
function checkAll(chkName, checkboxName, pageSize) {
var src = event.srcElement;
var chkN = eval("document.all." + chkName);
if (src.checked) {
chkN[0].checked = true;
chkN[1].checked = true;
for (var i = 0; i < pageSize; i++) {
var chk = eval("document.all." + checkboxName + i);
if (chk) {
chk.checked = true;
}
}
} else {
chkN[0].checked = false;
chkN[1].checked = false;
for (var i = 0; i < pageSize; i++) {
var chk = eval("document.all." + checkboxName + i);
if (chk) {
chk.checked = false;
}
}
}
}
/*
*
*/
function makePages(maxPage, selectedPage, selectName) {
var sel = eval("document.all." + selectName);
sel.length = 0;
for (var i = 1; i <= maxPage; i++) {
sel.options[i] = new Option(i, i);
if (sel.options[i] == selectedPage) {
sel.options[i].selected = true;
}
}
}
/*
* 替换字符串
*/
function replaceStr(str) {
var re = "/( )/gi";
str = str.replace(re, "");
re = "/\</gi";
str = str.replace(re, "&lt;");
return str;
}
/*
* 去掉左边空格
*/
function LTrim(str) {
var whitespace = new String(" \t\n\r");
var s = new String(str);
if (whitespace.indexOf(s.charAt(0)) != -1) {
var j = 0, i = s.length;
while (j < i && whitespace.indexOf(s.charAt(j)) != -1) {
j++;
}
s = s.substring(j, i);
}
return s;
}
/*
* 去掉右边空格
*/
function RTrim(str) {
var whitespace = new String(" \t\n\r");
var s = new String(str);
if (whitespace.indexOf(s.charAt(s.length - 1)) != -1) {
var i = s.length - 1;
while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1) {
i--;
}
s = s.substring(0, i + 1);
}
return s;
}
/*
* 去掉两边空格
*/
function Trim(str) {
return RTrim(LTrim(str));
}
/*
*
*/
function exeOperation(exePath) {
var obj = new ActiveXObject("Microsoft.XMLHTTP");
obj.open("post", exePath, false);
obj.send();
var res = obj.responseText;
var rs = Trim(res);
if (rs.indexOf('true', 0) != -1) {
return true;
} else {
return false;
}
}
/*
*
*/
function exeValidate(exePath) {
var obj = new ActiveXObject("Microsoft.XMLHTTP");
obj.open("post", exePath, false);
obj.send();
var res = obj.responseText;
var rs = Trim(res);
if (rs.indexOf('validate_login_user', 0) != -1) {
return true;
} else {
return false;
}
}
/*
* 显示
*/
function validate_date(exePath) {
var obj = new ActiveXObject("Microsoft.XMLHTTP");
obj.open("post", exePath, false);
obj.send();
var res = obj.responseText;
var rs = Trim(res);
var begin_str = "<!--begin-->";
var beginIndex = rs.indexOf(begin_str) + begin_str.length;
var endIndex = rs.indexOf("<!--end-->");
rs = ((beginIndex >= 0) && (endIndex >= 0)) ? rs.substring(beginIndex,
endIndex) : "";
return Trim(rs);
}
/*
* 校验是否数字
*/
function checkNumber(name, TempS) {
for (Count = 0; Count < TempS.length; Count++) {
TempChar = TempS.substring(Count, Count + 1);
RefString = "0123456789";
if (RefString.indexOf(TempChar, 0) == -1) {
alert("请输入数字");
eval("document.all." + name).focus();
return false;
}
}
}
/*
* 是否有非法字符
*/
function chksafe(a) {
fibdn = new Array("'", "\\");
i = fibdn.length;
j = a.length;
for (ii = 0; ii < i; ii++) {
for (jj = 0; jj < j; jj++) {
temp1 = a.charAt(jj);
temp2 = fibdn[ii];
if (temp1 == temp2) {
return false;
}
}
}
return true;
}
/*
*
*/
function fucCheckNUM(NUM) {
var i, j, strTemp;
strTemp = "0123456789";
if (NUM.length == 0)
return false;
for (i = 0; i < NUM.length; i++) {
j = strTemp.indexOf(NUM.charAt(i));
if (j == -1) {
return false;
}
}
return true;
}
/*
*
*/
function fucCheckLength(strTemp) {
var i, sum;
sum = 0;
for (i = 0; i < strTemp.length; i++) {
if ((strTemp.charCodeAt(i) >= 0) && (strTemp.charCodeAt(i) <= 255)) {
sum = sum + 1;
} else {
sum = sum + 2;
}
}
return sum;
}
/*
*
*/
function chkElements(name, errMsg, max_length, lengthMsg) {
var el_name = eval("document.all." + name);
var v = el_name.value;
if (!chksafe(v)) {
el_name.focus();
alert(errMsg);
return false;
} else if (fucCheckLength(v) > max_length) {
el_name.focus();
alert(lengthMsg);
return false;
}
return true;
}
/*
* 校验空字符串
*/
function checkNullStr(name, msg) {
var el_name = eval("document.all." + name);
if (Trim(el_name.value).length == 0) {
alert(msg);
el_name.focus();
return false;
}
return true;
}
/*
* 显示日期控jian
*/
function GetDate(nText, para) {
var v_url = para == "1" ? "./common/data.html" : "../../common/data.html";
var reVal = window
.open(
v_url,
'data',
"status:no;center:yes;scroll:no;resizable:no;dialogWidth:255px;dialogHeight:260px");
if (reVal != null) {
var n = eval("document.all." + nText);
n.value = reVal;
}
}
/*
* 按比例缩小图片
*/
function DrawImage(ImgD, iwidth, iheight) {
var flag = false;
var image = new Image();
image.src = ImgD.src;
if (image.width > 0 && image.height > 0) {
flag = true;
if (image.width / image.height >= iwidth / iheight) {
if (image.width > iwidth) {
ImgD.width = iwidth;
ImgD.height = (image.height * iwidth) / image.width;
} else {
ImgD.width = image.width;
ImgD.height = image.height;
}
// ImgD.alt=image.width+"×"+image.height;
} else {
if (image.height > iheight) {
ImgD.height = iheight;
ImgD.width = (image.width * iheight) / image.height;
} else {
ImgD.width = image.width;
ImgD.height = image.height;
}
// ImgD.alt=image.width+"×"+image.height;
}
}
ImgD.style.visibility = "visible";
}
/*
* 回车键转为Tab键
*/
function enterTab() {
if (event.keyCode == 13) {
oElement = document.activeElement;
if (oElement.tagName != "TEXTAREA" && oElement.type != "button")
event.keyCode = 9;
return;
}
}
/*
*
*/
function objectEval(text) {
text = text.replace(/\n/g, " ");
text = text.replace(/\r/g, " ");
if (text.match(/^\s*\{.*\}\s*$/)) {
text = "[" + text + "]";
}
return eval(text)[0];
}
/*
* 打开领导查询页面 action - 查询的Action method - 调用的方法 title - 标题message name -
* 员工选择域的name
*/
function openLeaderQuery(action, method, title, name) {
openWin("../../common/selectStaff.jsp?action=" + action + "&method="
+ method + "&title=" + title + "&name=" + name,
"public_leader_find_page", "400", "150");
}
/*
* 第一行变色
*/
function chgColor() {
var v_table = document.all["PowerTable"];
var v_row = v_table.rows[1];
var len = v_row.cells.length;
for (var i = 0; i < len; i++) {
var v_cell = v_row.cells[i];
v_cell.style.backgroundColor = "yellow";
}
}
/*
* 第一行变色
*/
function chgColor2() {
var v_table = document.all["PowerTable"];
var rows_count = v_table.rows.length;
var v_row, v_cell, temp_len, len;
var rowspan = 0;
// get rowspan
if (v_table.rows.length > 1) {
len = v_table.rows[1].cells.length;
for (var r = 2; r < rows_count; r++) {
v_row = v_table.rows[r];
temp_len = v_row.cells.length;
if (temp_len == len) {
rowspan = r - 1;
break;
}
}
rowspan = (rowspan > 0) ? (rowspan + 1) : rows_count;
for (var r = 1; r < rowspan; r++) {
v_row = v_table.rows[r];
for (var t = 0; t < v_row.cells.length; t++) {
v_cell = v_row.cells[t];
v_cell.style.backgroundColor = "yellow";
}
}
}
}
/*
* 添加页面载入后触发的shijian
*/
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof(window.onload) != "function") {
window.onload = func;
} else {
window.onload = function() {
oldonload();
func();
}
}
}
// adsName:名称,adsUrl:地址,sTime:时间(小时) add by wujie 2005.12.12
function PopAds(adsName, adsUrl, sTime, number, w, h, s) {
if (document.cookie.indexOf(adsName) == -1) {
window.open(adsUrl, adsName);
self.focus();
var expireDate = new Date();
var lefttime = 1000 * (3600 * sTime);
expireDate.setTime(expireDate.getTime() + lefttime);
document.cookie = adsName + "=yes" + "; expires="
+ expireDate.toGMTString() + ";";
}
openWin(adsUrl, number, w, h, s);
}

@ -0,0 +1,49 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.jspsmart.upload.*" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><!--功能已删除-->
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
</head>
<body>
<%
try
{
String fujianPath=request.getParameter("fujianPath");//获得图片路径
String fujianYuashiMing=request.getParameter("fujianYuashiMing");//获得图片的原始名
fujianYuashiMing=java.net.URLDecoder.decode(fujianYuashiMing,"UTF-8");//图片原始名的编码方式
System.out.println(fujianYuashiMing+fujianPath);//输出图片的原始名和路径
SmartUpload su = new SmartUpload(); // 新建一个SmartUpload对象
su.initialize(pageContext); // 初始化
su.setContentDisposition(null);
// 设定contentDisposition为null以禁止浏览器自动打开文件
//保证点击链接后是下载文件。若不设定,则下载的文件扩展名为
//doc时浏览器将自动用word打开它。扩展名为pdf时将用acrobat打开
su.downloadFile(fujianPath, null, new String(fujianYuashiMing.getBytes(), "ISO8859-1")); // 下载中文文件
out.clear();
out=pageContext.pushBody();
}
catch(Exception e)
{%>
<script type="text/javascript">
alert("文件不存在。请联系管理人员");
window.history.back();
</script>
<%}
%>
</body>
</html>

@ -0,0 +1,122 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><!-- 会员注册页面 -->
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="expires" content="0"/>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
<meta http-equiv="description" content="This is my page"/>
<link href="<%=path %>/css/qiantai.css" rel="stylesheet" type="text/css" media="screen" />
<script type="text/javascript">
function check1()//会员注册界面信息完整判断
{
if(document.form1.loginname.value=="")
{
alert("请输入账号");
return false;
}
if(document.form1.loginpw.value=="")
{
alert("请输入密码");
return false;
}
document.form1.submit();
}
</script>
</head>
<body>
<div id="wrapper">
<div id="logo">
<h1><a href="#">基于JSP的高校快餐店订餐系统
</a></h1>
<p><em><a href="#">&nbsp;</a></em></p>
</div>
<hr/>
<div id="header">
<jsp:include flush="true" page="/site/inc/daohang.jsp"></jsp:include>
<!-- 进入daohang.jsp导航页面设置如果缓存区满了就输出数据。-->
</div>
<!--标题头部部分-->
<div id="page">
<div id="page-bgtop">
<!-- 中间 -->
<div id="content">
<div class="post">
<h2 class="title"><a href="#">&nbsp;&nbsp;会员注册 </a></h2>
<div class="entry">
<form action="<%=path %>/user?type=userReg" name="form1" method="post">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td width="20%" height="30" align="right" bgcolor="#F9F9F9" style="font-size: 11px;">
账号:
</td>
<td width="80%" bgcolor="#FFFFFF">
&nbsp;
<input type="text" name="loginname" style="width: 200px;"/>
</td>
</tr>
<tr>
<td height="30" align="right" bgcolor="#F9F9F9" style="font-size: 11px;">
密码:
</td>
<td bgcolor="#FFFFFF">
&nbsp;
<input type="password" name="loginpw" style="width: 200px;"/>
</td>
</tr>
<tr>
<td height="30" align="right" bgcolor="#F9F9F9" style="font-size: 11px;">
姓名:
</td>
<td bgcolor="#FFFFFF">
&nbsp;
<input type="text" name="name" style="width: 200px;"/>
</td>
</tr>
<tr>
<td height="30" align="right" bgcolor="#F9F9F9">
&nbsp;
</td>
<td bgcolor="#FFFFFF">
&nbsp;
<input type="button" value="注册" onclick="check1();"/>
<input type="reset" value="重置"/>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
<!-- 中间 -->
<!-- 左侧 -->
<div id="sidebar">
<jsp:include flush="true" page="/site/inc/left.jsp"></jsp:include><!--进入left.jsp左侧菜品类别页面设置如果缓存区满了就输出数据。-->
</div>
<!-- 左侧 -->
<div style="clear: both;">&nbsp;</div> <!--clear:both该属性的值指出了不允许有浮动元素 -->
</div>
</div>
<div id="footer-bgcontent">
<div id="footer">
<p><a href="<%=path %>/login.jsp">系统后台</a></p>
</div>
</div>
</div>
</body>
</html>

@ -1,4 +1,5 @@
<<<<<<< HEAD
<<<<<<< HEAD
<%@page import="java.text.SimpleDateFormat"%> <!-- 引入 SimpleDateFormat 用于格式化日期 -->
<%@page import="java.util.Date"%> <!-- 引入 Date 类用于获取当前日期和时间 -->
<%@ page language="java" pageEncoding="UTF-8"%> <!-- 设置页面的语言为 Java 和字符编码为 UTF-8 -->
@ -35,6 +36,8 @@ String path = request.getContextPath(); // 获取应用的上下文路径
document.formAdd.submit(); // 提交表单
=======
=======
>>>>>>> remotes/origin/wyc_branch
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.Date"%>
<%@ page language="java" pageEncoding="UTF-8"%>
@ -67,11 +70,15 @@ String path = request.getContextPath();
}
document.formAdd.submit(); //如果不为空则提交信息
<<<<<<< HEAD
>>>>>>> remotes/origin/wyp_branch
=======
>>>>>>> remotes/origin/wyc_branch
}
</script>
</head>
<<<<<<< HEAD
<<<<<<< HEAD
<body leftmargin="2" topmargin="9" background='<%=path %>/img/allbg.gif'> <!-- 设置页面背景 -->
<form action="<%=path %>/xinyong?type=xinyongAdd" name="formAdd" method="post"> <!-- 表单提交地址和方法 -->
@ -79,37 +86,51 @@ String path = request.getContextPath();
<body leftmargin="2" topmargin="9" background='<%=path %>/img/allbg.gif'> <!-- 距离左边为2距离上面为9背景图片为。。 -->
<form action="<%=path %>/xinyong?type=xinyongAdd" name="formAdd" method="post"> <!--表单的方法为提交 -->
>>>>>>> remotes/origin/wyp_branch
=======
<body leftmargin="2" topmargin="9" background='<%=path %>/img/allbg.gif'> <!-- 距离左边为2距离上面为9背景图片为。。 -->
<form action="<%=path %>/xinyong?type=xinyongAdd" name="formAdd" method="post"> <!--表单的方法为提交 -->
>>>>>>> remotes/origin/wyc_branch
<table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center" style="margin-top:8px">
<tr bgcolor="#E7E7E7">
<td height="14" colspan="4" background="<%=path %>/img/tbg.gif">&nbsp;&nbsp;</td>
</tr>
<<<<<<< HEAD
<<<<<<< HEAD
<!-- 评价属性选择 -->
=======
>>>>>>> remotes/origin/wyp_branch
=======
>>>>>>> remotes/origin/wyc_branch
<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
<td width="10%" bgcolor="#FFFFFF" align="right">
评价属性:
</td>
<td width="90%" bgcolor="#FFFFFF" align="left">
<<<<<<< HEAD
<<<<<<< HEAD
<!-- 评价属性的选择按钮 -->
=======
>>>>>>> remotes/origin/wyp_branch
=======
>>>>>>> remotes/origin/wyc_branch
<input type="radio" name="shuxing" value="好评" checked="checked" style="border: 0px;"/>好评
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="shuxing" value="差评" style="border: 0px;"/>差评
</td>
</tr>
<<<<<<< HEAD
<<<<<<< HEAD
<!-- 评价内容输入框 -->
=======
>>>>>>> remotes/origin/wyp_branch
=======
>>>>>>> remotes/origin/wyc_branch
<tr align='center' bgcolor="#FFFFFF" height="22">
<td width="10%" bgcolor="#FFFFFF" align="right">
评价内容:
</td>
<td width="90%" bgcolor="#FFFFFF" align="left">
<<<<<<< HEAD
<<<<<<< HEAD
<input type="text" name="neirong" size="40"/> <!-- 用户输入评价内容 -->
</td>
@ -120,27 +141,39 @@ String path = request.getContextPath();
</td>
</tr>
>>>>>>> remotes/origin/wyp_branch
=======
<input type="text" name="neirong" size="40"/>
</td>
</tr>
>>>>>>> remotes/origin/wyc_branch
<tr align='center' bgcolor="#FFFFFF" height="22">
<td width="10%" bgcolor="#FFFFFF" align="right">
评价时间:
</td>
<td width="90%" bgcolor="#FFFFFF" align="left">
<<<<<<< HEAD
<<<<<<< HEAD
<input type="text" name="shijian" size="40" value="<%=new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date())%>"/> <!-- 使用 SimpleDateFormat 获取当前日期和时间 -->
</td>
</tr>
<!-- 隐藏用户ID和表单操作按钮 -->
=======
=======
>>>>>>> remotes/origin/wyc_branch
<input type="text" name="shijian" size="40" value="<%=new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date())%>"/>
<!-- 取得系统当前时间格式为yyyy年-MM月-dd号 HH点mm分 -->
</td>
</tr>
<<<<<<< HEAD
>>>>>>> remotes/origin/wyp_branch
=======
>>>>>>> remotes/origin/wyc_branch
<tr align='center' bgcolor="#FFFFFF" height="22">
<td width="10%" bgcolor="#FFFFFF" align="right">
&nbsp;
</td>
<td width="90%" bgcolor="#FFFFFF" align="left">
<<<<<<< HEAD
<<<<<<< HEAD
<input type="hidden" name="user_id" value="<%=request.getParameter("user_id") %>"/> <!-- 获取传入的 user_id -->
<input type="reset" value="重置"/>&nbsp; <!-- 重置按钮 -->
@ -149,6 +182,11 @@ String path = request.getContextPath();
<input type="button" value="提交" onclick="c()"/>&nbsp;
<input type="reset" value="重置"/>&nbsp;
>>>>>>> remotes/origin/wyp_branch
=======
<input type="hidden" name="user_id" value="<%=request.getParameter("user_id") %>"/> <!-- 插入隐藏域获得用户的id -->
<input type="button" value="提交" onclick="c()"/>&nbsp;
<input type="reset" value="重置"/>&nbsp;
>>>>>>> remotes/origin/wyc_branch
</td>
</tr>
</table>

Loading…
Cancel
Save