home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2002 March / PCWMAR02.iso / software / windowsxp / ftgateoffice / ftgateoffice.exe / Main / attach.fts < prev    next >
Encoding:
Text File  |  2001-11-29  |  4.4 KB  |  196 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 m
  9.  
  10. var domain
  11. var name
  12.  
  13. session.system.error=0
  14.  
  15. if ((form.command==1)||(form.command==3))
  16. {
  17.     domain = form.domain
  18.     name = form.name
  19.  
  20.     d.domainname = form.domain
  21.     m = new d.mailbox
  22.     m.name=name
  23.  
  24.     m.attachtextenable = form.attachtextenable
  25.     m.attachtext = form.attachtext
  26.  
  27.     if (form.command==3)
  28.         output.redirect("done.fts")
  29.     else
  30.         output.redirect("listmembers.fts?domain="+domain+"&name="+name)
  31. }
  32. else if (form.command=="2")
  33. {
  34.     output.redirect("leave.fts?domain="+form.domain+"&name="+form.name)
  35. }
  36. else
  37. {
  38.     domain = request.domain
  39.     name = request.name
  40.  
  41.     d.domainname = request.domain
  42.     m = new d.mailbox
  43.     m.name=name
  44. }
  45. %>
  46. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
  47. <HTML>
  48. <HEAD>
  49. <LINK REL=STYLESHEET HREF="/utility/main<%=nn4%>.css" TYPE="text/css">
  50. <META NAME="GENERATOR" Content="Microsoft Developer Studio">
  51. <META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
  52. <TITLE>Mailbox Wizard</TITLE>
  53. <SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
  54. <!--
  55. var dir="<%=buttons%>";
  56.  
  57. <%
  58. if (netscape)
  59. {
  60.   %>
  61.   var enter=false;
  62.   document.captureEvents(Event.KEYPRESS|Event.FOCUS);
  63.   document.onkeypress = keypress;
  64.   document.onfocus = focus;
  65.  
  66.   function focus(event)
  67.   {
  68.     if (event.target==document.ftgate.attachtext)
  69.     {
  70.       enter=true;
  71.     }
  72.     else
  73.       enter=false;
  74.   }
  75.  
  76.   function keypress(event)
  77.   {
  78.     if (enter)
  79.       return true;
  80.  
  81.     if (event.which==13)
  82.     {
  83.       onNext();
  84.       return false;
  85.     }
  86.  
  87.     return true;
  88.   }
  89.   <%
  90. }
  91. else
  92. {
  93.   %>
  94.   function keypress()
  95.   {
  96.     if (document.activeElement==document.ftgate.attachtext)
  97.       return;
  98.  
  99.     if (event.keyCode==13)
  100.     {
  101.       event.returnValue=null;
  102.       onNext();
  103.     }
  104.   }
  105.   <%
  106. }
  107. %>
  108.  
  109. function isOK(form)
  110. {
  111.     if (form.attachtextenable.checked && form.attachtext.value=="")
  112.     {
  113.         alert("Enter a message to attach to each posting.")
  114.         form.attachtext.focus();
  115.  
  116.         return false;
  117.     }
  118.  
  119.     return true;
  120. }
  121.  
  122. function onLoad()
  123. {
  124.     <%
  125.     if (session.system.error)
  126.     {
  127.         output.writeln("alert(aspError("+session.system.error+"));")
  128.     }
  129.     %>
  130.   document.ftgate.attachtext.focus();
  131. }
  132. //-->
  133. </SCRIPT>
  134. <SCRIPT LANGUAGE="JavaScript1.2" SRC="/utility/cookies.js" TYPE="text/javascript"></SCRIPT>
  135. <SCRIPT LANGUAGE="JavaScript1.2" SRC="/utility/core.js" TYPE="text/javascript"></SCRIPT>
  136. <SCRIPT LANGUAGE="JavaScript1.2" SRC="/utility/wizard.js" TYPE="text/javascript"></SCRIPT>
  137. </HEAD>
  138.  
  139. <%
  140. var pagetitle="Attach Text"
  141. #include <header.fts>
  142. %>
  143.  
  144. <!-- start of the tabs -->
  145. <FORM NAME="ftgate" METHOD="POST" onSubmit="return isOK(this)" ACTION="attach.fts">
  146. <INPUT TYPE="HIDDEN" NAME="command" VALUE="1">
  147. <INPUT TYPE="HIDDEN" NAME="domain" VALUE="<%=domain%>">
  148. <INPUT TYPE="HIDDEN" NAME="name" VALUE="<%=name%>">
  149.  
  150. <!-- start of the tab body -->
  151. <TABLE BORDER="0" BGCOLOR="<%=border%>" WIDTH="100%" CELLPADDING="0" CELLSPACING="0"><TR><TD>
  152. <TABLE <%=table%> CELLPADDING="0" CELLSPACING="0">
  153.   <!-- start of block -->
  154.   <TR>
  155.     <TD VALIGN="TOP">
  156.         <!-- sub table goes here -->
  157.         <TABLE BORDER="0" WIDTH="100%">
  158.           <TR>
  159.                 <TD>
  160.                         <TABLE BORDER="0" WIDTH="100%">
  161.                             <TR>
  162.                                 <TH COLSPAN="3">If the box is cheked then the message below it will be
  163.                                 attached to the bottom of all postings to the list.<P></TH>
  164.                             </TR>
  165.                             <TR>
  166.                                 <TD ROWSPAN="2" VALIGN="TOP">Append to Message</TD>
  167.                                 <TD COLSPAN="2">
  168.                                 <INPUT TYPE="CHECKBOX" NAME="attachtextenable"
  169.                                 <% if (m.attachtextenable) output.writeln("CHECKED") %>>Append this text to all outgoing messages
  170.                             </TR>
  171.                             <TR>
  172.                                 <TD> </TD>
  173.                                 <TD><TEXTAREA NAME="attachtext" ROWS="5" COLS="40" onKeyPress="setModified(true)">
  174. <%=m.attachtext%></TEXTAREA></TD>
  175.                             </TR>
  176.                         </TABLE>
  177.           </TD>
  178.             </TR>
  179.                 <%
  180.                 #include <footer.fts>
  181.                 %>
  182.         </TABLE>
  183.         <!-- sub table ends here -->
  184.     </TD>
  185.   </TR>
  186.   <!-- end of block -->
  187. </TABLE>
  188. <!-- end of the tab body -->
  189. </TD></TR></TABLE>
  190. <INPUT TYPE="HIDDEN" NAME="href" VALUE="/mailboxes/wizard/attach.fts?domain=<%=domain%>&name=<%=name%>">
  191. </FORM>
  192.  
  193. </TD><TD WIDTH="10"> </TD></TR></TABLE>
  194. </BODY>
  195. </HTML>
  196.