home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2002 March / PCWMAR02.iso / software / windowsxp / ftgateoffice / ftgateoffice.exe / Main / handling.fts < prev    next >
Encoding:
Text File  |  2001-11-29  |  9.4 KB  |  308 lines

  1. <%
  2. #include </utility/global.fts>
  3. #include </utility/ftgate.fts>
  4. #include </utility/theme.fts>
  5. #include </utility/wmsecurity.fts>
  6.  
  7. var auto
  8. var fwdg
  9.  
  10. if (m.priv.domaindefaults)
  11. {
  12.     auto=d.priv.editauto
  13.     fwdg = d.priv.editforward
  14. }
  15. else
  16. {
  17.     auto=m.priv.editauto
  18.     fwdg = m.priv.editforward
  19. }
  20.  
  21. if (form.config==1)
  22. {
  23.     if (auto)
  24.     {
  25.         m.autoresponsemethod = form.autoresponsemethod
  26.         m.autoresponsesubject = form.autoresponsesubject
  27.         m.autoresponsetext = form.autoresponsetext
  28.         m.outofofficesubject = form.outofofficesubject
  29.         m.outofofficetext = form.outofofficetext
  30.         m.outofofficestate = form.outofofficestate
  31.     }
  32.  
  33.     if (fwdg)
  34.     {
  35.         m.forwardmethod = form.forwardmethod
  36.         m.forwardaddress = form.forwardaddress
  37.     }
  38.  
  39.     output.redirect(form.redirect)
  40. }
  41. else if (form.config==2)
  42.     output.redirect(form.redirect)
  43. %>
  44. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
  45. <HTML>
  46. <HEAD>
  47. <LINK REL=STYLESHEET HREF="/utility/main<%=nn4%>.css" TYPE="text/css">
  48. <META NAME="GENERATOR" Content="Microsoft Developer Studio">
  49. <META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
  50. <TITLE>FTGate Web Mail -- Handling Options</TITLE>
  51.  
  52. <SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
  53. <!--
  54. var dir="<%=buttons%>"
  55.  
  56. <%
  57. if (netscape)
  58. {
  59.     if (auto)
  60.         output.writeln("document.captureEvents(Event.KEYPRESS|Event.FOCUS);")
  61.     else
  62.         output.writeln("document.captureEvents(Event.KEYPRESS);")
  63.   %>
  64.  
  65.   var enter=false;
  66.   document.onkeypress = keypress;
  67.   document.onfocus = focus;
  68.  
  69.     <%
  70.     if (auto)
  71.     {
  72.         %>
  73.         function focus(event)
  74.         {
  75.                 if (event.target==document.ftgate.autoresponsetext||event.target==document.ftgate.outofofficetext)
  76.                     enter=true;
  77.             else
  78.                 enter=false;
  79.         }
  80.         <%
  81.     }
  82.     %>
  83.  
  84.  
  85.   function keypress(event)
  86.   {
  87.     if (event.which==13)
  88.     {
  89.       onClose();
  90.       return false;
  91.     }
  92.  
  93.     return true;
  94.   }
  95.   <%
  96. }
  97. else
  98. {
  99.   %>
  100.   function keypress()
  101.   {
  102.         <%
  103.         if (auto)
  104.         {
  105.             %>
  106.             if (document.activeElement==document.ftgate.autoresponsetext||document.activeElement==document.ftgate.outofofficetext)
  107.                 return;
  108.             <%
  109.         }
  110.         %>
  111.  
  112.     if (event.keyCode==13)
  113.     {
  114.       event.returnValue=null;
  115.       onClose();
  116.     }
  117.   }
  118.   <%
  119. }
  120. %>
  121.  
  122. function onLoad()
  123. {
  124.     <%
  125.     if (fwdg)
  126.         output.writeln("document.ftgate.forwardmethod[0].focus();")
  127.     else if (auto)
  128.         output.writeln("document.ftgate.autoresponsemethod[0].focus();")
  129.     %>
  130. }
  131.  
  132. function isOK(form)
  133. {
  134.     <%
  135.     if (fwdg)
  136.     {
  137.         %>
  138.         if ((form.forwardmethod[1].checked||form.forwardmethod[2].checked) && !isEmailList(form.forwardaddress.value))
  139.         {
  140.             window.alert(errEmailList);
  141.             form.forwardaddress.focus();
  142.             return false;
  143.         }
  144.         <%
  145.     }
  146.     if (auto)
  147.     {
  148.         %>
  149.         if (form.autoresponsemethod[1].checked && (form.autoresponsesubject.value==""))
  150.         {
  151.             window.alert("Enter an autoresponse message.");
  152.             form.autoresponsesubject.focus();
  153.             return false;
  154.         }
  155.  
  156.         if (form.outofofficestate[2].checked && (form.outofofficetext.value==""))
  157.         {
  158.             alert("Enter an out of office message");
  159.             form.outofofficesubject.focus();
  160.             return false;
  161.         }
  162.         <%
  163.     }
  164.     %>
  165.  
  166.     return true;
  167. }
  168.  
  169. //-->
  170. </SCRIPT>
  171. <SCRIPT LANGUAGE="JavaScript1.2" SRC="/utility/cookies.js" TYPE="text/javascript"></SCRIPT>
  172. <SCRIPT LANGUAGE="JavaScript1.2" SRC="/utility/core.js" TYPE="text/javascript"></SCRIPT>
  173. <SCRIPT LANGUAGE="JavaScript1.2" SRC="/utility/dialog.js" TYPE="text/javascript"></SCRIPT>
  174. </HEAD>
  175.  
  176. <BODY BGCOLOR="white" onLoad="onLoad()" MARGINHEIGHT="0" MARGINWIDTH="0" onKeypress="keypress()">
  177.  
  178. <TABLE BORDER="0" BGCOLOR="<%=border%>" WIDTH="100%" HEIGHT="<%=bodyheight%>" CELLPADDING="0" CELLSPACING="0"><TR><TD> </TD><TD VALIGN="TOP">
  179.  
  180. <SPAN ID="top">Mailbox:</SPAN> <SPAN ID="topsel"><%=m.name%>@<%=d.domainname%></SPAN>
  181.  
  182. <FORM NAME="ftgate" METHOD="POST" onSubmit="return isOK(this)" ACTION="handling.fts">
  183. <INPUT TYPE="HIDDEN" NAME="redirect" VALUE="">
  184. <INPUT TYPE="HIDDEN" NAME="config" VALUE="1">
  185.  
  186. <TABLE ID="table" BORDER="0" CELLSPACING="0" CELLPADDING="0">
  187.   <TR>
  188.         <TD WIDTH="5" HEIGHT="18"><IMG SRC="/images/left.gif" VSPACE="0" BORDER="0" WIDTH="5" HEIGHT="18"></TD>
  189.         <TD CLASS="navoff" WIDTH="50" HEIGHT="18" ALIGN="CENTER"><A HREF="javascript:onLaunch('/inbox/index.fts')" CLASS="navoff">Inbox</A></TD>
  190.         <TD BGCOLOR="black" WIDTH="1" HEIGHT="18" ALIGN="CENTER"><IMG SRC="/images/1pixel.gif" WIDTH="1" HEIGHT="18"></TD>
  191.         <TD CLASS="navoff" WIDTH="55" HEIGHT="18" ALIGN="CENTER"><A HREF="javascript:onLaunch('/addresses/index.fts')" CLASS="navoff">Addresses</A></TD>
  192.         <TD BGCOLOR="black" WIDTH="1" HEIGHT="18" ALIGN="CENTER"><IMG SRC="/images/1pixel.gif" WIDTH="1" HEIGHT="18"></TD>
  193.         <TD CLASS="navon" WIDTH="50" HEIGHT="18" ALIGN="CENTER"><A HREF="javascript:onLaunch('/options/index.fts')" CLASS="navon">Options</A></TD>
  194.         <TD WIDTH="5" HEIGHT="18"><IMG SRC="/images/right-s.gif" VSPACE="0" BORDER="0" WIDTH="5" HEIGHT="18"></TD>
  195.         <TD WIDTH="<%=bodywidth-167%>" HEIGHT="18"> </TD>
  196.   </TR>
  197. </TABLE>
  198. <!--- end of the tabs ----->
  199.  
  200. <!--- start of the tab body --->
  201. <TABLE BORDER="0" BGCOLOR="<%=border%>" WIDTH="100%" CELLPADDING="0" CELLSPACING="0"><TR><TD>
  202. <TABLE <%=table%> CELLPADDING="0" CELLSPACING="0">
  203.   <!----- start of block --->
  204.   <TR>
  205.     <TD VALIGN="TOP">
  206.         <!----- sub table goes here --->
  207.         <TABLE BORDER="0" WIDTH="100%">
  208.           <TR>
  209.                 <TD VALIGN="TOP">
  210.                         <TABLE CLASS="box" WIDTH="100%">
  211.                             <TR>
  212.                                 <TD>
  213.                                     <TABLE BORDER="0" WIDTH="100%">
  214.                                         <TR>
  215.                                             <TH COLSPAN="2">Mail Handling Options</TH>
  216.                                         </TR>
  217.                                         <%
  218.                                         if (fwdg)
  219.                                         {
  220.                                             %>
  221.                                             <TR>
  222.                                                 <TD VALIGN="TOP">Forwarding:</TD>
  223.                                                 <TD>
  224.                                                     <INPUT TYPE="RADIO" NAME="forwardmethod" VALUE="0" ACCESSKEY="N"
  225.                                                     <% if (m.forwardmethod==0) output.write("CHECKED") %>>Do <U>n</U>ot forward<BR>
  226.                                                     <INPUT TYPE="RADIO" NAME="forwardmethod" VALUE="1" ACCESSKEY="K"
  227.                                                     <% if (m.forwardmethod==1) output.write("CHECKED") %>>Forward and <U>k</U>eep<BR>
  228.                                                     <INPUT TYPE="RADIO" NAME="forwardmethod" VALUE="2" ACCESSKEY="D"
  229.                                                     <% if (m.forwardmethod==2) output.write("CHECKED") %>>Forward and <U>d</U>elete<BR>
  230.                                                 </TD>
  231.                                             </TR>
  232.                                             <TR>
  233.                                                 <TD> </TD>
  234.                                                 <TD>Forward to: <INPUT TYPE="TEXT" NAME="forwardaddress" SIZE="<%=size20%>" VALUE="<%=m.forwardaddress%>">
  235.                                                 </TD>
  236.                                             </TR>
  237.                                             <%
  238.                                         }
  239.                                         if (auto)
  240.                                         {
  241.                                             %>
  242.                                             <TR>
  243.                                                 <TD VALIGN="TOP">Auto response method:</TD>
  244.                                                 <TD>
  245.                                                     <INPUT TYPE="RADIO" NAME="autoresponsemethod" VALUE="0" onChange="setModified(true)"
  246.                                                     <% if (m.autoresponsemethod==0) output.write("CHECKED") %>>Off<BR>
  247.                                                     <INPUT TYPE="RADIO" NAME="autoresponsemethod" VALUE="2" onChange="setModified(true)"
  248.                                                     <% if (m.autoresponsemethod==2) output.write("CHECKED") %>>Send the following message<BR>
  249.                                                     Subject <INPUT TYPE="TEXT" onChange="setModified(true)" NAME="autoresponsesubject" VALUE="<%=m.autoresponsesubject%>"><BR>
  250.                                                     <TEXTAREA NAME="autoresponsetext" COLS="<%=size60%>" ROWS="4" onChange="setModified(true)">
  251. <%=m.autoresponsetext%></TEXTAREA>
  252.                                                 </TD>
  253.                                             </TR>
  254.                                             <TR>
  255.                                                 <TD VALIGN="TOP">When out of office</TD>
  256.                                                 <TD>
  257.                                                     <INPUT TYPE="RADIO" NAME="outofofficestate" VALUE="<%=OOO_IN%>" onChange="setModified(true)"
  258.                                                     <% if (m.outofofficestate==OOO_IN) output.write("CHECKED") %>>Show as here<BR>
  259.                                                     <INPUT TYPE="RADIO" NAME="outofofficestate" VALUE="<%=OOO_OUT%>" onChange="setModified(true)"
  260.                                                     <% if (m.outofofficestate==OOO_OUT) output.write("CHECKED") %>>Show as out<BR>
  261.                                                     <INPUT TYPE="RADIO" NAME="outofofficestate" VALUE="<%=OOO_MESSAGE%>" onChange="setModified(true)"
  262.                                                     <% if (m.outofofficestate==OOO_MESSAGE) output.write("CHECKED") %>>Show as out and send following message<BR>
  263.                                                     Subject: <INPUT TYPE="TEXT" NAME="outofofficesubject" SIZE="<%=size40%>" VALUE="<%=m.outofofficesubject%>" onChange="setModified(true)"><BR>
  264.                                                     <TEXTAREA NAME="outofofficetext" COLS="<%=size60%>" ROWS="4" onChange="setModified(true)">
  265. <%=m.outofofficetext%></TEXTAREA>
  266.                                                 </TD>
  267.                                             </TR>
  268.                                             <%
  269.                                         }
  270.                                         if (!(fwdg||auto))
  271.                                         {
  272.                                             %>
  273.                                             <TR>
  274.                                                 <TH COLSPAN="2">You do not have sufficient privileges to modify these details.</TH>
  275.                                             </TR>
  276.                                             <%
  277.                                         }
  278.                                         %>
  279.                                     </TABLE>
  280.                                 </TD>
  281.                             </TR>
  282.                         </TABLE>
  283.           </TD>
  284.             </TR>
  285.                 <TR>
  286.                     <TD ALIGN="RIGHT">
  287.                         <A HREF="javascript:onClose()"
  288.                         onMouseDown="change('closeA', 'ok', 1)"
  289.                         onMouseOut="change('closeA', 'ok', 0)"><IMG SRC="<%=buttons%>ok2.gif" NAME="closeA" BORDER="0" WIDTH="50" HEIGHT="20" ALT="Apply changes and close"></A>
  290.                     <A HREF="javascript:onCancel()"
  291.                         onMouseDown="change('cancelA', 'cancel', 1)"
  292.                         onMouseOut="change('cancelA', 'cancel', 0)"><IMG SRC="<%=buttons%>cancel.gif" NAME="cancelA" BORDER="0" WIDTH="50" HEIGHT="20" ALT="Cancel"></A>
  293.                     </TD>
  294.                 </TR>
  295.         </TABLE>
  296.         <!----- sub table ends here --->
  297.     </TD>
  298.   </TR>
  299.   <!------ end of block ----->
  300. </TABLE>
  301. <!--- end of the tab body --->
  302. </TD></TR></TABLE>
  303.  
  304. </FORM>
  305. </TD><TD WIDTH="10"> </TD></TD></TR></TABLE>
  306. </BODY>
  307. </HTML>
  308.