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

📄 provision.jsp

📁 一个手机站点采用WML 等编写开发,具体可以看代码,比较简单
💻 JSP
字号:
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="java.util.*" %>
<%@ page import="com.intacpurun.wsms.srvclogic.*" %>
<%@ page import="com.intacpurun.wsms.comm.*"%>
<%@ page import="com.intacpurun.wsms.comm.vo.*"%>
<%@ page errorPage="error.jsp" %>

<%
  String serviceId = request.getParameter("serviceid");
  String userMsisdn = request.getParameter("msisdn");
  String password = request.getParameter("password");
  String aidedCode = request.getParameter("aidedcode");

  String validPass = (String)session.getAttribute("confirmcode");
  String validAided = (String)session.getAttribute("aidedcode");

  boolean isValid = false;
  boolean isSuccess = false;

  if ((validPass != null) && (validAided != null))
  {
    if (password.equals(validPass) && aidedCode.equals(validAided))
    {
      isValid = true;

      AddForecastProvisionVo addVo = new AddForecastProvisionVo();
      addVo.setServiceId(Integer.parseInt(serviceId));
      addVo.setUserMsisdn(userMsisdn);

      if (Integer.parseInt(serviceId) == Constants.SERVICE_WEATHER_FORECAST_ID)
      {
        //处理天气预报业务的订购
        String cityId = (String)session.getAttribute("cityid");

        if (cityId == null)
        {
          out.println("<script>");
          out.println("alert(\"你没有选择要订购的城市,请先选择要订购天气预报的城市!\");");
          out.println("</script>");
          response.sendRedirect("serviceintroduce.jsp?serviceid=" + serviceId);
        }

        addVo.setCityId(cityId); //天气预报的特殊处理
      }//else 为普通业务,无需处理

      //保存订购关系,此处注意继承性的应用
      isSuccess = ServiceMgr.provision(addVo);
    }else isValid = false;
  }else isValid = false;

%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>登录</TITLE>
<META http-equiv=content-type content="text/html; charset=gb2312">
  <LINK href="img/style.css" type=text/css rel=stylesheet>
  <base href="<%=request.getRequestURL()%>" />
<META content="MSHTML 6.00.2900.2912" name=GENERATOR>
</HEAD>
<script language="javascript">
function goBack()
{
  document.location.href="serviceview.jsp";
}
</script>
<BODY class=bg3 leftMargin=5 topMargin=5 marginwidth="5" marginheight="5">
<CENTER>
<TABLE cellSpacing=0 cellPadding=0 width=280 border=0>
  <TBODY>
  <TR>
    <TD width=12><IMG height=1 alt="" src="img/c.gif" width=1
      border=0></TD>
    <TD width=128><IMG height=41 alt="" src="img/notice.gif"
      width=139 border=0></TD>
    <TD vAlign=bottom width=22>&nbsp;</TD>
    <TD width=88><IMG height=1 alt="" src="img/c.gif" width=1
      border=0></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=280 border=0>
  <TBODY>
  <TR>
    <TD width=7 rowSpan=2><IMG height=1 alt="" src="img/c.gif"
      width=1 border=0></TD>
    <TD width=5 rowSpan=2><IMG height=5 src="img/noticelt.gif"
      width=5 border=0></TD>
    <TD class=bg0 width=128><IMG height=1 alt="" src="img/c.gif"
      width=1 border=0></TD>
    <TD class=bg0 width=83><IMG height=1 alt="" src="img/c.gif"
      width=1 border=0></TD>
    <TD width=5 rowSpan=2><IMG height=5 src="img/noticert.gif"
      width=5 border=0></TD></TR>
  <TR>
    <TD class=bg3 width=128><IMG height=4 alt="" src="img/c.gif"
      width=1 border=0></TD>
    <TD class=bg3 width=83><IMG height=4 alt="" src="img/c.gif"
      width=1 border=0></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=280 border=0>
  <TBODY>
  <TR>
    <TD width=7>&nbsp;</TD>
    <TD class=bg0 width=1><IMG height=25 alt=""
      src="img/noticelefthand2.gif" width=1 border=0></TD>
    <TD class=bg3 width=3>&nbsp;</TD>
    <TD class=bg3 align=middle width=268><BR><BR>
      <IMG height=7 hspace=4 src="img/pointred.gif" width=7 border=0>
      <%
        if (isValid)
        {
          if (isSuccess) out.println("定购成功!<BR>欢迎您定购我们的其他短信业务!");
          else out.println("订购关系生成失败!请重新操作一次!");
        }else
        {
          out.println("非法的订购请求!请重新操作!");
        }
      %>

      <IMG height=18 src="img/c.gif" width=1 border=0><BR>
      <IMG height=18 src="img/c.gif" width=1 border=0><BR>
        <center><INPUT onclick="javascript:goBack();" type=image src="img/submit.gif" align="middle" width=55 height=15 border=0></center>
          <IMG height=18 src="img/c.gif" width=1 border=0><BR>
    <TD class=bg0 width=1><IMG height=1 alt="" src="img/c.gif" width=1 border=0></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=280 border=0>
  <TBODY>
  <TR>
    <TD width=7 rowSpan=2><IMG height=1 alt="" src="img/c.gif" width=1 border=0></TD>
    <TD width=5 rowSpan=2><IMG height=5 alt="" src="img/noticelb.gif" width=5 border=0></TD>
    <TD class=bg3 width=263 height=5><IMG height=1 alt="" src="img/c.gif" width=1 border=0></TD>
    <TD width=5 rowSpan=2><IMG height=5 alt="" src="img/noticerb.gif" width=5 border=0></TD></TR>
  <TR>
    <TD class=bg0 width=233 height=1><IMG height=1 alt="" src="img/c.gif" width=1 border=0></TD></TR></TBODY></TABLE>

</CENTER></BODY></HTML>

⌨️ 快捷键说明

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