<% int templateid=StringUtils.toInt(request.getParameter("templateid"),-999); int linkedmoduleid=StringUtils.toInt(request.getParameter("linkedmoduleid"),-999); int linkedrecordid=StringUtils.toInt(request.getParameter("linkedrecordid"),-999); int key=StringUtils.toInt(request.getParameter("key"),-999); String webspacename=request.getParameter("webspacename"); String email=request.getParameter("email"); if (email == null) email = ""; String url=request.getParameter("url"); String subscribe=request.getParameter("subscribe"); if (subscribe == null) subscribe="yes"; out.println(""); %> <%@include file = "/util/cacheControl.jsp" %> <%@ page import="idetix.util.*, revize.util.*" %> <% //process jsp here NotifyMe notify = new NotifyMe(); NotifyMe.NotifyMeReturn rtn = null; String message = ""; try { if (subscribe.equals("confirm")) { rtn = notify.confirmSubscription(webspacename,templateid,linkedmoduleid,linkedrecordid,key); if (rtn.message.length() == 0) message = "Your email notification subscription to the following page is confirmed:" + "

" + notify.formatUrl(rtn.url); } else if (subscribe.equals("delete")) { rtn = notify.confirmDeletion(webspacename,templateid,linkedmoduleid,linkedrecordid,key); if (rtn.message.length() == 0) message = "Your email notification subscription to the following page is cancelled:" + "

" + notify.formatUrl(rtn.url); } else if (subscribe.equals("yes")) { rtn = notify.requestSubscription(webspacename,templateid,linkedmoduleid,linkedrecordid,email); if (rtn.message.length() == 0) message = "

Email notification request submitted to the following page:" + "

" + notify.formatUrl(rtn.url) + "

You will receive an email to confirm the notification." + "

You must click on the link in the email to complete the request."; } else if (subscribe.equals("no")) { rtn = notify.requestDeletion(webspacename,templateid,linkedmoduleid,linkedrecordid,email); if (rtn.message.length() == 0) message = "

Cancel email notification request submitted for the following page:" + "

" + notify.formatUrl(rtn.url) + "

You will receive an email to confirm the cancellation." + "

You must click on the link in the email to complete the request."; } else message = "

Unknown email notification request (" + subscribe + ")" + "

contact Technical Support."; } catch (Exception e) { message = "Difficulty completing request - Contact Technical Support"; } if (message.length() == 0) { message = rtn.message; if (rtn != null && rtn.url.length() > 0) message += "

" + notify.formatUrl(rtn.url); } out.println(message); //out.println("RZ.emailnotify.message=" + StringUtils.convertHtmlForSource(message)); //out.println("RZemailnotify_ajax_return();"); %>