⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index_jsp.java

📁 网上服装店 能让用户在该网站上对物品进行上传购买等操作。该设计为原版
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
      out.write("        </table></td>\r\n");
      out.write("      </tr>\r\n");
      out.write("    </table>\r\n");
      out.write('\r');
      out.write('\n');

	Date date=new Date();
	Condb con=new Condb();
	int year=date.getYear()+1900;
	int month=date.getMonth()+1;
	int dat=date.getDate();
	int hour=date.getHours();
	int min=date.getMinutes();
	int second=date.getSeconds();
	long time=date.getTime()/600000000;
	String yea=String.valueOf(year);
	String mon=String.valueOf(month);
	String da=String.valueOf(dat);
	String hou=String.valueOf(hour);
	String mi=String.valueOf(min);
	String sec=String.valueOf(second);
	String tim=String.valueOf(time);
	String sub=yea+mon+da+hou+mi+sec+tim;
	if(session.getAttribute("username")==null||session.getAttribute("username").equals("")){

      out.write("\r\n");
      out.write("\t<script language=\"javascript\">\r\n");
      out.write("\talert(\"请您先登录再订购商品\");\r\n");
      out.write("\twindow.location.href=\"../index.jsp\";\r\n");
      out.write("\t</script>\r\n");

	}else{
		String sql="select * from tb_User where Username='"+session.getAttribute("username")+"'";
		ResultSet rs=con.executeQuery(sql);
		if(rs.next()){
			String str=rs.getString(2);
			String Rname=rs.getString(3);
			String email=rs.getString(5);
			String address=rs.getString(6);
			String teleph=rs.getString(7);

      out.write("\r\n");
      out.write("<table width=\"800\" height=\"428\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"#E8FFFF\" class=\"tableBorder\">\r\n");
      out.write("  <form action=\"manage.jsp\" method=\"post\" name=\"form1\">\r\n");
      out.write("  <tr align=\"center\">\r\n");
      out.write("    <td height=\"37\" colspan=\"3\" class=\"bgcolor\"><marquee direction=\"left\" scrollamount=\"1\">各位会员朋友,请您不要恶意或非法提交订单以免造成不必要的麻烦</marquee></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr align=\"center\">\r\n");
      out.write("    <td height=\"25\" colspan=\"3\" bgcolor=\"#EFE9BB\" class=\"head\">填写订单</td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td width=\"274\" rowspan=\"10\" align=\"center\" valign=\"middle\"><img src=\"../images/images/looksub_2.gif\" width=\"251\" height=\"292\"></td>\r\n");
      out.write("    <td height=\"24\" class=\"bgcolor\">订单号</td>\r\n");
      out.write("    <td height=\"24\"><input name=\"subid\" type=\"text\" class=\"txt_grey\" size=\"40\" value=\"");
      out.print(sub);
      out.write("\"></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td width=\"112\" height=\"24\" class=\"bgcolor\">用户名</td>\r\n");
      out.write("    <td width=\"412\" height=\"24\"><input name=\"username\" type=\"text\" class=\"txt_grey\" size=\"40\" value=\"");
      out.print(str);
      out.write("\" readonly=\"yes\"></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"24\" class=\"bgcolor\">真实姓名</td>\r\n");
      out.write("    <td height=\"24\"><input name=\"name\" type=\"text\" class=\"txt_grey\" size=\"40\" value=\"");
      out.print(Rname);
      out.write("\"></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"24\" class=\"bgcolor\">Email</td>\r\n");
      out.write("    <td height=\"24\"><input name=\"email\" type=\"text\" class=\"txt_grey\" size=\"40\" value=\"");
      out.print(email);
      out.write("\"></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"24\" class=\"bgcolor\">用户地址</td>\r\n");
      out.write("    <td height=\"24\"><input name=\"address\" type=\"text\" class=\"txt_grey\" size=\"40\" value=\"");
      out.print(address);
      out.write("\"></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"24\" class=\"bgcolor\">邮编</td>\r\n");
      out.write("    <td height=\"24\"><input name=\"post\" type=\"text\" class=\"txt_grey\" size=\"40\"></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"24\" class=\"bgcolor\">付款方式</td>\r\n");
      out.write("    <td height=\"24\"><select name=\"pay\" class=\"wenbenkuang\">\r\n");
      out.write("      <option>银行付款</option>\r\n");
      out.write("      <option>邮政付款</option>\r\n");
      out.write("      <option>现金支付</option>\r\n");
      out.write("    </select></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"24\" class=\"bgcolor\">运送方式</td>\r\n");
      out.write("    <td height=\"24\"><select name=\"carry\" class=\"wenbenkuang\">\r\n");
      out.write("      <option>普通邮寄</option>\r\n");
      out.write("      <option>特快专递</option>\r\n");
      out.write("      <option>EMS专递方式</option>\r\n");
      out.write("    </select></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr>\r\n");
      out.write("    <td height=\"24\" class=\"bgcolor\">联系电话</td>\r\n");
      out.write("    <td height=\"24\"><input name=\"teleph\" type=\"text\" class=\"txt_grey\" size=\"40\" value=\"");
      out.print(teleph);
      out.write("\"></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr align=\"center\">\r\n");
      out.write("    <td height=\"75\" align=\"left\" class=\"bgcolor\">备注</td>\r\n");
      out.write("    <td height=\"75\" align=\"left\"><textarea name=\"demo\" cols=\"39\" rows=\"5\" class=\"txt_grey\"></textarea></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr align=\"center\" valign=\"middle\">\r\n");
      out.write("    <td height=\"25\" colspan=\"3\" bgcolor=\"#EFE9BB\">\r\n");
      out.write("        <input name=\"Submit\" type=\"submit\" class=\"btn_grey\" value=\"提交\" onClick=\"return check()\">\r\n");
      out.write("      <input name=\"Submit2\" type=\"reset\" class=\"btn_grey\" value=\"重置\"></td>\r\n");
      out.write("  </tr>\r\n");
      out.write("  <tr align=\"left\" valign=\"top\">\r\n");
      out.write("    <td height=\"48\" colspan=\"3\" background=\"../images/top1.gif\"><font color=\"#0000cc\" class=\"bgcolor\">注意:<br>\r\n");
      out.write("\t1.请您按正确方式认真填写,不要填写一些非法字符,认真核对你所填写的订单准确无误后按提交按钮.<br>\t\r\n");
      out.write("    2.请您牢记你的订单号码,以便查询订单的执行状态.<br>\r\n");
      out.write("\t3.当您的款项汇到我们的帐号请您尽快与我们取得联系.</font>\t</td>\r\n");
      out.write("    </tr>\r\n");
      out.write("  </form>\r\n");
      out.write("</table>\r\n");


		}
	}
	

      out.write("\r\n");
      out.write("</body>\r\n");
      out.write("</html>\r\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -