home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2002 August / INTERNET94.ISO / pc / software / windows / mail / ft_gate_office / ftgateoffice105.exe / Main / individual.fts < prev    next >
Encoding:
Text File  |  2002-03-08  |  6.0 KB  |  238 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 type=0
  8. #include </utility/common.fts>
  9. %>
  10. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
  11. <HTML>
  12. <HEAD>
  13. <LINK REL=STYLESHEET HREF="/utility/main<%=nn4%>.css" TYPE="text/css">
  14. <META NAME="GENERATOR" Content="Microsoft Developer Studio">
  15. <META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
  16. <TITLE>FTGatePro WebMail</TITLE>
  17. </HEAD>
  18.  
  19. <SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
  20. <!--
  21. var dir="<%=buttons%>"
  22.  
  23. if (!document.images) {}
  24. else {
  25.   ok0 = new Image();
  26.   ok0.src  = dir+"ok2.gif";
  27.   ok1 = new Image();
  28.   ok1.src = dir+"ok2on.gif";
  29.   cancel0 = new Image();
  30.   cancel0.src  = dir+"cancel.gif";
  31.   cancel1 = new Image();
  32.   cancel1.src = dir+"cancelon.gif";
  33. }
  34.  
  35. function change(Name,Image,No)
  36. {
  37.   if (!document.images) {}
  38.   else document [Name].src = eval(Image + No + ".src");
  39.  
  40.     st();
  41. }
  42.  
  43. <%
  44. if (netscape)
  45. {
  46.   %>
  47.   var enter=false;
  48.   document.captureEvents(Event.KEYPRESS|Event.FOCUS);
  49.   document.onkeypress = keypress;
  50.   document.onfocus = focus;
  51.  
  52.   function focus(event)
  53.   {
  54.     if (event.target==document.ftgate.body)
  55.     {
  56.       enter=true;
  57.     }
  58.     else
  59.       enter=false;
  60.   }
  61.  
  62.   function keypress(event)
  63.   {
  64.     if (enter)
  65.       return true;
  66.  
  67.     if (event.which==13)
  68.     {
  69.       onOK();
  70.       return false;
  71.     }
  72.  
  73.     return true;
  74.   }
  75.   <%
  76. }
  77. else
  78. {
  79.   %>
  80.   function keypress()
  81.   {
  82.     if (document.activeElement==document.ftgate.body)
  83.       return;
  84.  
  85.     if (event.keyCode==13)
  86.     {
  87.       event.returnValue=null;
  88.       onOK();
  89.     }
  90.   }
  91.   <%
  92. }
  93. %>
  94.  
  95. function onLoad()
  96. {
  97.     <%
  98.     if (err!="")
  99.         output.writeln("alert(\""+err+"\");")
  100.     %>
  101.  
  102.     document.ftgate.name.focus();
  103. }
  104.  
  105. function onLaunch(href)
  106. {
  107.     window.location.href=href
  108. }
  109.  
  110. function isOK(form)
  111. {
  112.     if (form.name.value=="")
  113.     {
  114.         alert("You must enter a Display name");
  115.         form.name.focus();
  116.  
  117.         return false;
  118.     }
  119.  
  120.     if (!isEmail(form.email.value))
  121.     {
  122.         alert("This isn't a valid email address");
  123.         form.email.focus();
  124.  
  125.         return false;
  126.     }
  127.  
  128.     return true;
  129. }
  130.  
  131. function onOK()
  132. {
  133.     change('okA','ok',0);
  134.  
  135.     if (!isOK(document.ftgate))
  136.         return;
  137.  
  138.     document.ftgate.submit();
  139. }
  140.  
  141.  
  142. function onCancel()
  143. {
  144.     change('cancelA','cancel',0);
  145.  
  146.     onLaunch("index.fts");
  147. }
  148.  
  149. //-->
  150. </SCRIPT>
  151. <SCRIPT LANGUAGE="JavaScript1.2" SRC="/utility/cookies.js" TYPE="text/javascript"></SCRIPT>
  152. <SCRIPT LANGUAGE="JavaScript1.2" SRC="/utility/core.js" TYPE="text/javascript"></SCRIPT>
  153.  
  154. <BODY BGCOLOR="white" onLoad="onLoad()" MARGINHEIGHT="0" MARGINWIDTH="0" onKeypress="keypress()">
  155.  
  156. <TABLE BORDER="0" BGCOLOR="<%=border%>" WIDTH="100%" HEIGHT="<%=bodyheight%>" CELLPADDING="0" CELLSPACING="0"><TR><TD> </TD><TD VALIGN="TOP">
  157.  
  158. <FORM NAME="ftgate" METHOD="POST" ACTION="individual.fts">
  159. <INPUT TYPE="HIDDEN" NAME="config" VALUE="1">
  160. <INPUT TYPE="HIDDEN" NAME="modify" VALUE="<%=modify%>">
  161. <INPUT TYPE="HIDDEN" NAME="id" VALUE="<%=id%>">
  162.  
  163. <TABLE ID="table" BORDER="0" CELLSPACING="0" CELLPADDING="0">
  164.   <TR>
  165.         <TD WIDTH="5" HEIGHT="18"><IMG SRC="/images/left.gif" VSPACE="0" BORDER="0" WIDTH="5" HEIGHT="18"></TD>
  166.         <TD CLASS="navoff" WIDTH="50" HEIGHT="18" ALIGN="CENTER"><A HREF="javascript:onLaunch('/inbox/index.fts')" CLASS="navoff">Inbox</A></TD>
  167.         <TD BGCOLOR="black" WIDTH="1" HEIGHT="18" ALIGN="CENTER"><IMG SRC="/images/1pixel.gif" WIDTH="1" HEIGHT="18"></TD>
  168.         <TD CLASS="navon" WIDTH="55" HEIGHT="18" ALIGN="CENTER"><A HREF="javascript:onLaunch('/addresses/index.fts')" CLASS="navon">Addresses</A></TD>
  169.         <TD BGCOLOR="black" WIDTH="1" HEIGHT="18" ALIGN="CENTER"><IMG SRC="/images/1pixel.gif" WIDTH="1" HEIGHT="18"></TD>
  170.         <TD CLASS="navoff" WIDTH="50" HEIGHT="18" ALIGN="CENTER"><A HREF="javascript:onLaunch('/options/index.fts')" CLASS="navoff">Options</A></TD>
  171.         <TD WIDTH="5" HEIGHT="18"><IMG SRC="/images/right.gif" VSPACE="0" BORDER="0" WIDTH="5" HEIGHT="18"></TD>
  172.         <TD WIDTH="<%=bodywidth-167%>" HEIGHT="18"> </TD>
  173.   </TR>
  174. </TABLE>
  175. <!--- end of the tabs ----->
  176.  
  177. <!--- start of the tab body --->
  178. <TABLE BORDER="0" BGCOLOR="<%=border%>" WIDTH="100%" CELLPADDING="0" CELLSPACING="0"><TR><TD>
  179. <TABLE <%=table%> CELLPADDING="0" CELLSPACING="0">
  180. <!----- start of block --->
  181. <TR>
  182. <TD VALIGN="TOP">
  183.     <!----- sub table goes here --->
  184.   <TABLE BORDER="0" WIDTH="100%">
  185.     <TR>
  186.       <TD>
  187.               <TABLE CLASS="box" WIDTH="100%">
  188.           <TR>
  189.             <TD>
  190.               <TABLE BORDER="0" WIDTH="100%">
  191.                                 <TR>
  192.                                     <TH COLSPAN="2">
  193.                                     <%
  194.                                         if (modify)
  195.                                             output.write("Modify ")
  196.                                         else
  197.                                             output.write("Create ")
  198.                                     %>Individual Contact</TH>
  199.                                 </TR>
  200.                                 <TR>
  201.                                     <TD>Display name</TD>
  202.                                     <TD><INPUT TYPE="EDIT" NAME="name" VALUE="<%=name%>"></TD>
  203.                                 </TR>
  204.                                 <TR>
  205.                                     <TD>Email address</TD>
  206.                                     <TD><INPUT TYPE="EDIT" NAME="email" SIZE="<%=size40%>" VALUE="<%=email%>"></TD>
  207.                                 </TR>
  208.               </TABLE>
  209.                         </TD>
  210.                     </TR>
  211.         </TABLE>
  212.       </TD>
  213.     </TR>
  214.     <TR>
  215.             <TD ALIGN="RIGHT">
  216.                 <A HREF="javascript:onOK()"
  217.                 onMouseOver="return st('Create the new contact')"
  218.                 onMouseDown="change('okA', 'ok', 1)"
  219.                 onMouseOut="change('okA', 'ok', 0)"><IMG SRC="<%=buttons%>ok2.gif" NAME="okA" BORDER="0" WIDTH="50" HEIGHT="20" ALT="Create the new contact"></A>
  220.                 <A HREF="javascript:onCancel()"
  221.                 onMouseOver="return st('Return to Address book without creating a new contact')"
  222.                 onMouseDown="change('cancelA', 'cancel', 1)"
  223.                 onMouseOut="change('cancelA', 'cancel', 0)"><IMG SRC="<%=buttons%>cancel.gif" NAME="cancelA" BORDER="0" WIDTH="50" HEIGHT="20" ALT="Do not create a new contact"></A>
  224.             </TD>
  225.         </TR>
  226.   </TABLE>
  227.     <!----- sub table ends here --->
  228. </TD>
  229. </TR>
  230. <!------ end of block ----->
  231. </TABLE>
  232. </TD></TR></TABLE>
  233.  
  234. </FORM>
  235. </TD><TD WIDTH="10"> </TD></TD></TR></TABLE>
  236. </BODY>
  237. </HTML>
  238.