基于javaweb+mysql的网上订餐在线点餐系统(前台、后台)

基于javaweb+mysql的网上订餐在线点餐系统(前台、后台)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

后台:登录、类别管理、菜品管理、会员管理、订单管理、留言管理等

前台:登录、注册、查看菜品、购买、留言

前台

后台

技术框架

JSP Servlet MySQL DBUtil Tomcat JavaScript CSS jstl


           var i=0;
           function catelogAll()//获得所有菜品类别函数
           {
               if(i==0)
               {
                   document.getElementById("indicator").style.display="block";
                   loginService.catelogAll(callback);
                   i=1;
               }             
           }
           function callback(data)
           {
               document.getElementById("indicator").style.display="none";
			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;	
		}
			key will now have the default browser behavior if TabSpaces=0. It will move the
			focus out of the editor (expect on Safari).</li>
		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2296">#2296</a>] Fixed
			permission denied error on clicking on files in the file browser.</li>
	</ul>
	<h3>
		Version 2.6.1</h3>
	<p>
		New Features and Improvements:</p>
	<ul>
		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2150">#2150</a>] The searching
			speed of the Find/Replace dialog has been vastly improved.</li>
		<li>New language file for <strong>Gujarati</strong> (by Nilam Doctor).</li>
		<li>A new TabIndex property has been added to the JavaScript integration files.</li>
		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2215">#2215</a>] Following
			the above new feature, the ReplaceTextarea method will now copy the textarea.tabIndex
			value if available.</li>
		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2163">#2163</a>] If the
			FCKConfig.DocType setting points to a HTML DocType then the output won't generate
			self-closing tags (it will output &lt;img &gt; instead of &lt;img /&gt;).</li>
		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2173">#2173</a>] A throbber
			will be shown in the Quick Uploads.</li>
		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2142">#2142</a>] HTML
			samples will now use sampleposteddata.php in action parameter inside a form.</li>
				user.setId(rs.getString("id"));
				user.setLoginname(rs.getString("loginname"));
				user.setLoginpw(rs.getString("loginpw"));
				user.setLoginpw(rs.getString("loginpw"));
				user.setName(rs.getString("name"));
				
				userList.add(user);
		    }
			rs.close();
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
		mydb.closed();
		
		req.setAttribute("userList", userList);
		req.setAttribute("xinyongList", liuService.getxinyongList(id));
		req.getRequestDispatcher("admin/user/userDetail.jsp").forward(req, res);
	}
	
	
	public void dispatch(String targetURI,HttpServletRequest request,HttpServletResponse response) 
	{
		<li>Due to Gecko bugs, two errors were thrown when loading the editor in a hidden div.
			Workarounds have been introduced. In any case, the testcase 004 hack is needed when
			showing the editor (as in a tabbed interface). </li>
		<li>An invalid path in the dialogs CSS file has been corrected. </li>
		<li>On IE, the Undo/Redo can now be controlled using the Ctrl+Z and Ctrl+Y shortcut
			keys. </li>
		<li>[<a target="_blank" href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1295538&amp;group_id=75348&amp;atid=543653">SF
			BUG-1295538</a> ] A few Undo/Redo fixes for IE have been done. </li>
		<li>[<a target="_blank" href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1247070&amp;group_id=75348&amp;atid=543653">SF
			BUG-1247070</a>] On Gecko, it is now possible to use the shortcut keys for Bold
			(CTRL+B), Italic (CTRL+I) and Underline (CTRL+U), like in IE. </li>
		<li>[<a target="_blank" href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1274303&amp;group_id=75348&amp;atid=543653">SF
			BUG-1274303</a>] The &quot;Insert Column&quot; command is now working correctly
			on TH cells. It also copies any attribute applied to the source cells. </li>
		<li>[<a target="_blank" href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1287070&amp;group_id=75348&amp;atid=543655">SF
			Patch-1287070</a> ] In the Universal Keyboard, the Arabic keystrokes translator
			is now working with Firefox. Thanks again to Abdul-Aziz Al-Oraij. </li>
		<li>The editor now handles AJAX requests with HTTP status 304. </li>
		<li>[<a target="_blank" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1157780&amp;group_id=75348&amp;atid=543653">SF
			BUG-1157780</a>] [<a target="_blank" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1229077&amp;group_id=75348&amp;atid=543653">SF
				BUG-1229077</a>] Weird comments are now handled correctly (ignored on some cases).
		</li>
		<li>[<a target="_blank" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1155774&amp;group_id=75348&amp;atid=543653">SF
			BUG-1155774</a>] A spelling error in the Bulleted List Properties dialog has been
	},

	// Non-normalized.
	GetTextNode : function()
	{
		return this._textNode ;
	},

	// Non-normalized.
	GetIndex : function()
	{
		return this._offset ;
	},

	// Return value means whehther we've crossed a line break or a paragraph boundary.
	MoveNext : function()
	{
		if ( this._offset < this._textNode.length - 1 )
		{
			this._offset++ ;
			mydb.doPstm(sql, params);
			ResultSet rs=mydb.getRs();
			while(rs.next())
			{
				TLiuyan liuyan=new TLiuyan();
				
				liuyan.setId(rs.getInt("id"));
				liuyan.setNeirong(rs.getString("neirong"));
				liuyan.setLiuyanshi(rs.getString("liuyanshi"));
				liuyan.setUser_id(rs.getString("user_id"));
				
				liuyan.setHuifu(rs.getString("huifu"));
				liuyan.setHuifushi(rs.getString("huifushi"));
			
				liuyanList.add(liuyan);
		    }
			rs.close();
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
		mydb.closed();
		
		req.setAttribute("liuyanList", liuyanList);
		req.getRequestDispatcher("site/liuyan/liuyanAll.jsp").forward(req, res);
									BUG-1165914</a>] [<a target="_blank" href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1111877&amp;group_id=75348&amp;atid=543653">SF
										BUG-1111877</a>] [<a target="_blank" href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1092373&amp;group_id=75348&amp;atid=543653">SF
											BUG-1092373</a>] [<a target="_blank" href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1101596&amp;group_id=75348&amp;atid=543653">SF
												BUG-1101596</a>] [<a target="_blank" href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1246952&amp;group_id=75348&amp;atid=543653">SF
													BUG-1246952</a>] The URLs for links and
			img are now correctly preserved as entered, no matter if you are using relative
			or absolute paths. </li>
		<li>[<a target="_blank" href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1162809&amp;group_id=75348&amp;atid=543653">SF
			BUG-1162809</a>] [<a target="_blank" href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1205638&amp;group_id=75348&amp;atid=543653">SF
				BUG-1205638</a>] The &quot;Image&quot; and &quot;Flash&quot;&nbsp;dialog windows
			now loads the preview correctly if the &quot;BaseHref&quot; configuration option
			is set. </li>
		<li>[<a target="_blank" href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1329807&amp;group_id=75348&amp;atid=543653">SF
			BUG-1329807</a>] The alert boxes are now showing correctly when doing cut/copy/paste
			operations on Firefox installations when it is not possible to execute that operations
			due to security settings. </li>
		<li>A new &quot;Panel&quot; system (used in the drop-dowm toolbar commands, color selectors
			and context menu) has been developed. The following bugs have been fixed with it:
			<ul>
		}
		mydb.closed();
		return orderitemList;
	}
	
	
	public static String panduan_zhanghao(String loginname)
	//判断账号密码是否正确
	{
		String s="meizhan";
		
		String sql="select * from t_user where del='no' and loginname=?";
		Object[] params={loginname.trim()};
		DB mydb=new DB();
		try
	{
		return ( this._textNode && this._textNode.nodeValue.charAt( this._offset ) ) || null ;
	},

	// Non-normalized.
	GetTextNode : function()
	{
		return this._textNode ;
	},

	// Non-normalized.
	GetIndex : function()
	{
				catelog.setId(rs.getString("id"));
				catelog.setName(rs.getString("name"));
				catelogList.add(catelog);
		    }
			rs.close();
		}
		catch(Exception e)
		{
			e.printStackTrace();
		}
		mydb.closed();
		return catelogList;
    }
}
package com.demo.action;

import java.io.IOException;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
				<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>
	}
	else
	{
		startTextNode = GetNextNonEmptyTextNode( domRange.StartNode, domRange.StartNode.parentNode ) ;
		if ( !startTextNode )
			return null ;
		startIndex = 0 ;
	}

	if ( endContainer.nodeType == 3 && w3cRange.endOffset > 0 )
	{
		endTextNode = endContainer ;
		endIndex = w3cRange.endOffset - 1 ;
			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>
		mydb.closed();
		
		req.setAttribute("msg", "留言完毕");
        String targetURL = "/common/msg.jsp";
		dispatch(targetURL, req, res);
	}
	
	public void liuyanMana(HttpServletRequest req,HttpServletResponse res) throws ServletException, IOException
	{
		List liuyanList=new ArrayList();
		String sql="select * from t_liuyan order by liuyanshi";
		Object[] params={};
		DB mydb=new DB();
		try
		{
			mydb.doPstm(sql, params);
			ResultSet rs=mydb.getRs();
			while(rs.next())
			{
				TLiuyan liuyan=new TLiuyan();
				
				liuyan.setId(rs.getInt("id"));
				liuyan.setNeirong(rs.getString("neirong"));
				liuyan.setLiuyanshi(rs.getString("liuyanshi"));
				liuyan.setUser_id(rs.getString("user_id"));
				

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述


版权声明:本文为m0_69590785原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。