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

  1. <%
  2. #include </utility/security.fts>
  3. #include </utility/global.fts>
  4. #include </utility/theme.fts>
  5. #include </utility/ftgate.fts>
  6.  
  7. var d = new server.domain
  8. var buildType=build()
  9.  
  10. var domain
  11. var name
  12.  
  13. session.system.error=0
  14.  
  15. if (form.config>=1)
  16.     d.domainname = form.domain
  17. else
  18.     d.domainname = request.domain
  19.  
  20. var m = new d.mailbox
  21.  
  22. if (form.config==1)
  23. {
  24.     domain = form.domain
  25.     name = form.name
  26.  
  27.     m.name=name
  28.  
  29.     m.forwardmethod = form.forwardmethod
  30.     m.forwardaddress = form.forwardaddress
  31.     m.autoresponsemethod = form.autoresponsemethod
  32.     m.autoresponsesubject = form.autoresponsesubject
  33.     m.autoresponsetext = form.autoresponsetext
  34.     m.ccto = form.ccto
  35.     m.outofofficesubject = form.outofofficesubject
  36.     m.outofofficetext = form.outofofficetext
  37.     m.outofofficestate = form.outofofficestate
  38.  
  39.     if (form.redirect!="")
  40.     {
  41.         var parms="?domain="+domain+"&name="+name
  42.         output.redirect(form.redirect+parms)
  43.     }
  44. }
  45. else if (form.config=="2")
  46. {
  47.   if (form.redirect!="")
  48.         output.redirect(form.redirect+"?domain="+form.domain+"&name="+form.name)
  49. }
  50. else
  51. {
  52.     domain = request.domain
  53.     name = request.name
  54.  
  55.     m.name=name
  56. }
  57. %>
  58. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
  59. <HTML>
  60. <HEAD>
  61. <LINK REL=STYLESHEET HREF="/utility/main<%=nn4%>.css" TYPE="text/css">
  62. <META NAME="GENERATOR" Content="Microsoft Developer Studio">
  63. <META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
  64. <TITLE>Mailboxes -- Options</TITLE>
  65. <SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
  66. <!--
  67. var dir="<%=buttons%>";
  68. var pro=<%=build()==FTGATE_PRO%>;
  69.  
  70. <%
  71. if (netscape)
  72. {
  73.   %>
  74.   var enter=false;
  75.   document.captureEvents(Event.KEYPRESS|Event.FOCUS);
  76.   document.onkeypress = keypress;
  77.   document.onfocus = focus;
  78.  
  79.   function focus(event)
  80.   {
  81.     if (event.target==document.ftgate.autoresponsetext||event.target==document.ftgate.outofofficetext)
  82.     {
  83.       enter=true;
  84.     }
  85.     else
  86.       enter=false;
  87.   }
  88.  
  89.   function keypress(event)
  90.   {
  91.     if (enter)
  92.       return true;
  93.  
  94.     if (event.which==13)
  95.     {
  96.       onApply();
  97.       return false;
  98.     }
  99.  
  100.     return true;
  101.   }
  102.   <%
  103. }
  104. else
  105. {
  106.   %>
  107.   function keypress()
  108.   {
  109.     if (document.activeElement==document.ftgate.autoresponsetext||document.activeElement==document.ftgate.outofofficetext)
  110.       return;
  111.  
  112.     if (event.keyCode==13)
  113.     {
  114.       event.returnValue=null;
  115.       onApply();
  116.     }
  117.   }
  118.   <%
  119. }
  120. %>
  121.  
  122. function isOK(form)
  123. {
  124.     if ((form.ccto.value!="")&&(!isEmail(form.ccto.value)))
  125.     {
  126.         alert(errEmail);
  127.         form.ccto.focus();
  128.         return false;
  129.     }
  130.  
  131.     if ((form.forwardmethod[1].checked||form.forwardmethod[2].checked) && !isEmailList(form.forwardaddress.value))
  132.     {
  133.         alert(errEmailList);
  134.         form.forwardaddress.focus();
  135.         return false;
  136.     }
  137.  
  138.     if (form.autoresponsemethod[1].checked && (form.autoresponsesubject.value==""))
  139.     {
  140.         alert("Enter a subject for the message to send");
  141.         form.autoresponsesubject.focus();
  142.         return false;
  143.     }
  144.  
  145.     if (form.autoresponsemethod[1].checked && (form.autoresponsetext.value==""))
  146.     {
  147.         alert("Enter a message to send");
  148.         form.autoresponsetext.focus();
  149.         return false;
  150.     }
  151.  
  152.     if (form.outofofficestate[2].checked && (form.outofofficesubject.value==""))
  153.     {
  154.         alert("Enter an out of office message subject");
  155.         form.outofofficesubject.focus();
  156.         return false;
  157.     }
  158.  
  159.     if (form.outofofficestate[2].checked && (form.outofofficetext.value==""))
  160.     {
  161.         alert("Enter an out of office message");
  162.         form.outofofficetext.focus();
  163.         return false;
  164.     }
  165.     return true;
  166. }
  167.  
  168. function onLoad()
  169. {
  170.     <%
  171.     if (build()==FTGATE_PRO)
  172.         output.writeln("setPage(4, \"User Mailbox\");")
  173.     else
  174.         output.writeln("setPage(3, \"User Mailbox\");")
  175.     %>
  176.  
  177.   document.ftgate.ccto.focus();
  178. }
  179. //-->
  180. </SCRIPT>
  181. <SCRIPT LANGUAGE="JavaScript1.2" SRC="/utility/cookies.js" TYPE="text/javascript"></SCRIPT>
  182. <SCRIPT LANGUAGE="JavaScript1.2" SRC="/utility/core.js" TYPE="text/javascript"></SCRIPT>
  183. <SCRIPT LANGUAGE="JavaScript1.2" SRC="/utility/dialog.js" TYPE="text/javascript"></SCRIPT>
  184. </HEAD>
  185.  
  186. <BODY BGCOLOR="white" onLoad="onLoad()" MARGINHEIGHT="0" MARGINWIDTH="0" onkeypress="keypress()">
  187.  
  188. <TABLE BORDER="0" BGCOLOR="<%=border%>" WIDTH="<%=bodywidth%>" HEIGHT="<%=bodyheight%>" CELLPADDING="0" CELLSPACING="0"><TR><TD> </TD><TD VALIGN="TOP">
  189.  
  190. <A HREF="javascript:onLaunch('/domains/index.fts')"><SPAN ID="top">Domains</SPAN></A><SPAN ID="top"> / </SPAN>
  191. <A HREF="javascript:onLaunch('/mailboxes/index.fts')"><SPAN ID="top"><%=d.domainname%></SPAN></A><SPAN ID="top"> / </SPAN>
  192. <SPAN ID="topsel"><%=m.name%></SPAN><SPAN ID="top"></SPAN>
  193.  
  194. <!-- start of the tabs -->
  195. <FORM NAME="ftgate" METHOD="POST" onSubmit="return isOK(this)" ACTION="optionsuser.fts">
  196. <INPUT TYPE="HIDDEN" NAME="config" VALUE="1">
  197. <INPUT TYPE="HIDDEN" NAME="domain" VALUE="<%=domain%>">
  198. <INPUT TYPE="HIDDEN" NAME="name" VALUE="<%=name%>">
  199. <INPUT TYPE="HIDDEN" NAME="redirect" VALUE="">
  200.  
  201. <TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0">
  202.   <TR>
  203.         <TD WIDTH="5" HEIGHT="18"><IMG SRC="/images/left.gif" VSPACE="0" BORDER="0" WIDTH="5" HEIGHT="18"></TD>
  204.         <TD CLASS="navoff" WIDTH="50" HEIGHT="18" ALIGN="CENTER"><A HREF="javascript:onLaunch('general.fts')" CLASS="navoff">General</A></TD>
  205.         <TD BGCOLOR="black" WIDTH="1" HEIGHT="18" ALIGN="CENTER"><IMG SRC="/images/1pixel.gif" WIDTH="1" HEIGHT="18"></TD>
  206.         <TD CLASS="navon" WIDTH="55" HEIGHT="18"ALIGN="CENTER"><A HREF="javascript:onLaunch('optionsuser.fts')" CLASS="navon">Options</A></TD>
  207.         <TD BGCOLOR="black" WIDTH="1" HEIGHT="18" ALIGN="CENTER"><IMG SRC="/images/1pixel.gif" WIDTH="1" HEIGHT="18"></TD>
  208.         <%
  209.         var width=bodywidth
  210.         width=width-56
  211.         %>
  212.         <TD CLASS="navoff" WIDTH="55" HEIGHT="18" ALIGN="CENTER"><A HREF="javascript:onLaunch('script.fts')" CLASS="navoff">Script</A></TD>
  213.         <TD BGCOLOR="black" WIDTH="1" HEIGHT="18" ALIGN="CENTER"><IMG SRC="/images/1pixel.gif" WIDTH="1" HEIGHT="18"></TD>
  214.         <TD CLASS="navoff" WIDTH="55" HEIGHT="18" ALIGN="CENTER"><A HREF="javascript:onLaunch('security.fts')" CLASS="navoff">Security</A></TD>
  215.         <TD BGCOLOR="black" WIDTH="1" HEIGHT="18" ALIGN="CENTER"><IMG SRC="/images/1pixel.gif" WIDTH="1" HEIGHT="18"></TD>
  216.         <TD CLASS="navoff" WIDTH="55" HEIGHT="18" ALIGN="CENTER"><A HREF="javascript:onLaunch('info.fts')" CLASS="navoff">Info</A></TD>
  217.         <TD BGCOLOR="black" WIDTH="1" HEIGHT="18" ALIGN="CENTER"><IMG SRC="/images/1pixel.gif" WIDTH="1" HEIGHT="18"></TD>
  218.         <TD CLASS="navoff" WIDTH="55" HEIGHT="18" ALIGN="CENTER"><A HREF="javascript:onLaunch('quota.fts')" CLASS="navoff">Quota</A></TD>
  219.         <TD BGCOLOR="black" WIDTH="1" HEIGHT="18" ALIGN="CENTER"><IMG SRC="/images/1pixel.gif" WIDTH="1" HEIGHT="18"></TD>
  220.         <TD CLASS="navoff" WIDTH="55" HEIGHT="18" ALIGN="CENTER"><A HREF="javascript:onLaunch('privileges.fts')" CLASS="navoff">Privileges</A></TD>
  221.         <TD BGCOLOR="black" WIDTH="1" HEIGHT="18" ALIGN="CENTER"><IMG SRC="/images/1pixel.gif" WIDTH="1" HEIGHT="18"></TD>
  222.         <TD CLASS="navoff" WIDTH="50" HEIGHT="18" ALIGN="CENTER"><A HREF="javascript:onLaunch('mailbox.fts')" CLASS="navoff">Mailbox</A></TD>
  223.         <TD BGCOLOR="<%=border%>" WIDTH="5" HEIGHT="18" ALIGN="CENTER"><IMG SRC="/images/right.gif" WIDTH="5" HEIGHT="18"></TD>
  224.         <%
  225.         if (buildType==FTGATE_PRO)
  226.         {
  227.             %>
  228.             <TD WIDTH="<%=(bodywidth-447)%>"> </TD>
  229.             <%
  230.         }
  231.         else
  232.         {
  233.             %>
  234.             <TD WIDTH="<%=(bodywidth-391)%>"> </TD>
  235.             <%
  236.         }
  237.         %>
  238.   </TR>
  239. </TABLE>
  240. <!-- end of the tabs -->
  241.  
  242. <!-- start of the tab body -->
  243. <TABLE BORDER="0" BGCOLOR="<%=border%>" WIDTH="100%" CELLPADDING="0" CELLSPACING="0"><TR><TD>
  244. <TABLE <%=table%> CELLPADDING="0" CELLSPACING="0">
  245.   <!-- start of block -->
  246.   <TR>
  247.     <TD VALIGN="TOP">
  248.         <!-- sub table goes here -->
  249.         <TABLE BORDER="0" WIDTH="100%">
  250.           <TR>
  251.                 <TD VALIGN="TOP">
  252.                         <TABLE CLASS="box" WIDTH="100%">
  253.                           <TR>
  254.                                 <TD VALIGN="TOP">
  255.                                     <TABLE BORDER="0" WIDTH="100%">
  256.                                         <TR>
  257.                                             <TH COLSPAN="2">Send Options</TH>
  258.                                         </TR>
  259.                                         <TR>
  260.                                             <TD>Send copy to:</TD>
  261.                                             <TD><INPUT TYPE="TEXT" NAME="ccto" SIZE="<%=size40%>" VALUE="<%=m.ccto%>" onChange="setModified(true)"></TD>
  262.                                         </TR>
  263.                                     </TABLE>
  264.                                 </TD>
  265.                             </TR>
  266.                         </TABLE>
  267.                     </TD>
  268.                 </TR>
  269.             </TABLE>
  270.         <!-- sub table ends here -->
  271.         <!-- sub table goes here -->
  272.         <TABLE BORDER="0" WIDTH="100%">
  273.           <TR>
  274.                 <TD VALIGN="TOP">
  275.                         <TABLE CLASS="box" WIDTH="100%">
  276.                             <TR>
  277.                                 <TD>
  278.                                 <TABLE BORDER="0" WIDTH="100%">
  279.                                         <TR>
  280.                                             <TH COLSPAN="2">Forward Options</TH>
  281.                                         </TR>
  282.                                         <TR>
  283.                                             <TD VALIGN="TOP">Forward method</TD>
  284.                                             <TD>
  285.                                                 <INPUT TYPE="RADIO" NAME="forwardmethod" VALUE="<%=FM_KEEP%>" onChange="setModified(true)"
  286.                                                 <% if (m.forwardmethod==FM_KEEP) output.write("CHECKED") %>>Do not forward<BR>
  287.                                                 <INPUT TYPE="RADIO" NAME="forwardmethod" VALUE="<%=FM_FORWARDKEEP%>" onChange="setModified(true)"
  288.                                                 <% if (m.forwardmethod==FM_FORWARDKEEP) output.write("CHECKED") %>>Forward and keep<BR>
  289.                                                 <INPUT TYPE="RADIO" NAME="forwardmethod" VALUE="<%=FM_FORWARDDELETE%>" onChange="setModified(true)"
  290.                                                 <% if (m.forwardmethod==FM_FORWARDDELETE) output.write("CHECKED") %>>Forward and delete<BR>
  291.                                                 Forward to: <INPUT TYPE="TEXT" NAME="forwardaddress" SIZE="<%=size40%>" VALUE="<%=m.forwardaddress%>" onChange="setModified(true)">
  292.                                             </TD>
  293.                                         </TR>
  294.                                     </TABLE>
  295.                                 </TD>
  296.                             </TR>
  297.                         </TABLE>
  298.                     </TD>
  299.                 </TR>
  300.             </TABLE>
  301.         <!-- sub table ends here -->
  302.         <!-- sub table goes here -->
  303.         <TABLE BORDER="0" WIDTH="100%">
  304.           <TR>
  305.                 <TD VALIGN="TOP">
  306.                         <TABLE CLASS="box" WIDTH="100%">
  307.                             <TR>
  308.                                 <TD>
  309.                                 <TABLE BORDER="0" WIDTH="100%">
  310.                                         <TR>
  311.                                             <TH>Auto Response Options</TH>
  312.                                         </TR>
  313.                                         <TR>
  314.                                             <TD VALIGN="TOP">Auto response method</TD>
  315.                                             <TD>
  316.                                                 <INPUT TYPE="RADIO" NAME="autoresponsemethod" VALUE="0" onChange="setModified(true)"
  317.                                                 <% if (m.autoresponsemethod==0) output.write("CHECKED") %>>Off<BR>
  318.                                                 <INPUT TYPE="RADIO" NAME="autoresponsemethod" VALUE="2" onChange="setModified(true)"
  319.                                                 <% if (m.autoresponsemethod==2) output.write("CHECKED") %>>Send the following message<BR>
  320.                                                 Subject: <INPUT TYPE="TEXT" NAME="autoresponsesubject" SIZE="<%=size40%>" VALUE="<%=m.autoresponsesubject%>" onChange="setModified(true)"><BR>
  321.                                                 <TEXTAREA NAME="autoresponsetext" COLS="40" ROWS="4" onChange="setModified(true)">
  322. <%=m.autoresponsetext%></TEXTAREA>
  323.                                             </TD>
  324.                                         </TR>
  325.                                     </TABLE>
  326.                                 </TD>
  327.                             </TR>
  328.                         </TABLE>
  329.                     </TD>
  330.                 </TR>
  331.             </TABLE>
  332.         <!-- sub table ends here -->
  333.         <!-- sub table goes here -->
  334.         <TABLE BORDER="0" WIDTH="100%">
  335.           <TR>
  336.                 <TD VALIGN="TOP">
  337.                         <TABLE CLASS="box" WIDTH="100%">
  338.                             <TR>
  339.                                 <TD>
  340.                                 <TABLE BORDER="0" WIDTH="100%">
  341.                                         <TR>
  342.                                             <TH>Out of office options</TH>
  343.                                         </TR>
  344.                                         <TR>
  345.                                             <TD VALIGN="TOP">When out of office</TD>
  346.                                             <TD>
  347.                                                 <INPUT TYPE="RADIO" NAME="outofofficestate" VALUE="<%=OOO_IN%>" onChange="setModified(true)"
  348.                                                 <% if (m.outofofficestate==OOO_IN) output.write("CHECKED") %>>Show as here<BR>
  349.                                                 <INPUT TYPE="RADIO" NAME="outofofficestate" VALUE="<%=OOO_OUT%>" onChange="setModified(true)"
  350.                                                 <% if (m.outofofficestate==OOO_OUT) output.write("CHECKED") %>>Show as out<BR>
  351.                                                 <INPUT TYPE="RADIO" NAME="outofofficestate" VALUE="<%=OOO_MESSAGE%>" onChange="setModified(true)"
  352.                                                 <% if (m.outofofficestate==OOO_MESSAGE) output.write("CHECKED") %>>Show as out and send following message<BR>
  353.                                                 Subject: <INPUT TYPE="TEXT" NAME="outofofficesubject" SIZE="<%=size40%>" VALUE="<%=m.outofofficesubject%>" onChange="setModified(true)"><BR>
  354.                                                 <TEXTAREA NAME="outofofficetext" COLS="40" ROWS="4" onChange="setModified(true)">
  355. <%=m.outofofficetext%></TEXTAREA>
  356.                                             </TD>
  357.                                         </TR>
  358.                                     </TABLE>
  359.                                 </TD>
  360.                             </TR>
  361.                         </TABLE>
  362.                     </TD>
  363.                 </TR>
  364.             </TABLE>
  365.         <!-- sub table ends here -->
  366.         <!-- sub table goes here -->
  367.         <TABLE BORDER="0" WIDTH="100%">
  368.                 <TR>
  369.                     <TD VALIGN="TOP" ALIGN="RIGHT">
  370.                         <A HREF="javascript:onClose()"
  371.                         onMouseDown="change('closeA', 'ok', 1)"
  372.                         onMouseOut="change('closeA', 'ok', 0)"><IMG SRC="<%=buttons%>ok.gif" NAME="closeA" BORDER="0" WIDTH="50" HEIGHT="20" ALT="Apply changes and close" HSPACE="5"></A>
  373.                         <A HREF="javascript:onCancel('domain=<%=domain%>')"
  374.                         onMouseDown="change('cancelA', 'cancel', 1)"
  375.                         onMouseOut="change('cancelA', 'cancel', 0)"><IMG SRC="<%=buttons%>cancel.gif" NAME="cancelA" BORDER="0" WIDTH="50" HEIGHT="20" ALT="Cancel"></A>
  376.                         <A HREF="javascript:onApply()"
  377.                         onMouseDown="change('applyA', 'apply', 1)"
  378.                         onMouseOut="change('applyA', 'apply', 0)"><IMG SRC="<%=buttons%>apply.gif" NAME="applyA" BORDER="0" WIDTH="50" HEIGHT="20" ALT="Apply changes" HSPACE="5"></A>
  379.                     </TD>
  380.                 </TR>
  381.         </TABLE>
  382.         <!-- sub table ends here -->
  383.     </TD>
  384.     </TR>
  385.   <!-- end of block -->
  386. </TABLE>
  387. <!-- end of the tab body -->
  388. </TD></TR></TABLE>
  389. <SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
  390. <!--
  391.     var href="/mailboxes/optionsuser.fts?domain=<%=domain%>&name=<%=name%>";
  392.     var bodywidth=<%=bodywidth%>;
  393. //-->
  394. </SCRIPT>
  395. <SCRIPT LANGUAGE="JavaScript1.2" SRC="/utility/footer.js" TYPE="text/javascript"></SCRIPT>
  396. </FORM>
  397. </TD><TD WIDTH="10"> </TD></TR></TABLE>
  398. </BODY>
  399. </HTML>
  400.