home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / ins.cab / nngen.asp < prev    next >
Text File  |  1997-10-23  |  7KB  |  235 lines

  1. <% Response.Expires = 0 %>
  2.  
  3. <%
  4. REM LOCALIZATION
  5.  
  6. L_PAGETITLE_TEXT = "Microsoft Internet Service Manager"
  7. L_GENERALPROPS_TEXT = "General Properties for"
  8. L_ALLOWCLIENTPOSTING_TEXT = "Allow Client Posting"
  9. L_MAXPOSTSIZE_TEXT = "Maximum post size:"
  10. L_KILOBYTES_TEXT = "kilobytes"
  11. L_MAXCONNSIZE_TEXT = "Maximum connection size:"
  12. L_MEGABYTES_TEXT = "megabytes"
  13. L_ALLOWFEEDPOSTING_TEXT = "Allow Feed Posting"
  14. L_ALLOWCNTRLMSGS_TEXT = "Allow Control Messages"
  15. L_SMTPSERVER_TEXT = "SMTP server for moderated groups:"
  16. L_DFLTMOD_TEXT = "Default moderator domain:"
  17. L_ADMINISTRATOR_TEXT    = "Administrator Email account:"
  18. L_ENTERINTEGER_ERRORMESSAGE = "Please enter an integer between "
  19. L_AND_TEXT    = " and "
  20.  
  21.  
  22. REM END LOCALIZATION
  23. %>
  24.  
  25. <% svr = Request("svr") %>
  26.  
  27. <HTML>
  28. <HEAD>
  29. <TITLE><% = L_PAGETITLE_TEXT %></TITLE>
  30.  
  31. <SCRIPT LANGUAGE = "javascript">
  32.  
  33.     <% REM Create uForm object and methods %>
  34.  
  35.     uForm = new Object();
  36.     uForm.writeForm = writeForm;
  37.     uForm.readCache = readCache; 
  38.  
  39.     function readCache() 
  40.     {
  41.         hform = top.menu.document.hiddenform;
  42.         uform = document.userform;
  43.         uform.chkConfigAllowClientPosting.checked = (hform.chkConfigAllowClientPosting.value == "1");
  44.         uform.hdnConfigServerPostSoftLimit.value = hform.txtConfigServerPostSoftLimit.value;
  45.         uform.hdnConfigServerPostHardLimit.value = hform.txtConfigServerPostHardLimit.value;
  46.         if (uform.chkConfigAllowClientPosting.checked) 
  47.         {
  48.             uform.txtConfigServerPostSoftLimit.value = uform.hdnConfigServerPostSoftLimit.value;
  49.             uform.txtConfigServerPostHardLimit.value = uform.hdnConfigServerPostHardLimit.value;
  50.         }
  51.         uform.chkConfigAllowControlMessages.checked = (hform.chkConfigAllowControlMessages.value == "1");
  52.         uform.txtConfigSmtpServerAddress.value = hform.txtConfigSmtpServerAddress.value;
  53.         uform.txtConfigDefaultModeratorDomain.value = hform.txtConfigDefaultModeratorDomain.value;
  54.         uform.txtAdministratorEmail.value            = hform.txtAdministratorEmail.value;
  55.  
  56.     }    
  57.  
  58.     function writeForm() 
  59.     {
  60.         hform = top.menu.document.hiddenform;
  61.         uform = document.userform;
  62.         hform.chkConfigAllowClientPosting.value = (chkToTxt(uform.chkConfigAllowClientPosting));
  63.         hform.txtConfigServerPostSoftLimit.value = uform.hdnConfigServerPostSoftLimit.value;
  64.         hform.txtConfigServerPostHardLimit.value = uform.hdnConfigServerPostHardLimit.value;
  65.         hform.chkConfigAllowControlMessages.value = (chkToTxt(uform.chkConfigAllowControlMessages));    
  66.         hform.txtConfigSmtpServerAddress.value = uform.txtConfigSmtpServerAddress.value;
  67.         hform.txtConfigDefaultModeratorDomain.value = uform.txtConfigDefaultModeratorDomain.value;
  68.         hform.txtAdministratorEmail.value            = uform.txtAdministratorEmail.value
  69.     }
  70.  
  71.     <% REM Javascript function chkToTxt converts checkbox bools to text value for hiddenform %>
  72.     
  73.     function chkToTxt(chkControl)
  74.      {
  75.         if (chkControl.checked) 
  76.         {
  77.             return "1";
  78.         }
  79.         else {
  80.             return "0";
  81.         }
  82.     }
  83.  
  84.  
  85.     <% REM Javascript function setUpdated sets "updated" flag in hiddenform when a field is changed %>
  86.  
  87.     function setUpdated() 
  88.     {
  89.         top.menu.document.hiddenform.updated.value = "true";    
  90.     }    
  91.  
  92.     function maintainChk(index) 
  93.     {
  94.         uform = document.userform;
  95.         if (uform.elements[index].checked) 
  96.         {
  97.             uform.elements[index+1].value = uform.elements[index+2].value;
  98.             uform.elements[index+3].value = uform.elements[index+4].value;
  99.         }
  100.         else 
  101.         {
  102.             uform.elements[index+2].value = uform.elements[index+1].value;
  103.             uform.elements[index+4].value = uform.elements[index+3].value;
  104.             uform.elements[index+1].value = "";
  105.             uform.elements[index+3].value = "";
  106.         }
  107.     }
  108.  
  109.     function maintainTxt(txtIndex,chkIndex) 
  110.     {
  111.         uform = document.userform;
  112.         uform.elements[txtIndex+1].value = uform.elements[txtIndex].value;
  113.         if (!(uform.elements[chkIndex].checked)) 
  114.         {
  115.             uform.elements[chkIndex].checked = true;
  116.             maintainChk(chkIndex);
  117.         }
  118.     }
  119.  
  120.  
  121.  
  122. <% REM Javascript function checkRange checks values between 0 and specified range %>
  123.  
  124.     function checkRange(thisControl,low,high)
  125.     {
  126.         if (isFull(thisControl.value) && isNum(thisControl.value))
  127.         {
  128.             if ((thisControl.value > high) || (thisControl.value < low))
  129.             {
  130.                 alert("<% = L_ENTERINTEGER_ERRORMESSAGE %>" + low + "<% = L_AND_TEXT %>" + high + ".");
  131.                 readCache();
  132.                 thisControl.focus();
  133.             }
  134.         }
  135.     }
  136.  
  137. </SCRIPT>
  138.     <!--#include file="nnisnum.htm" -->
  139.     <!--#include file="nnisfull.htm" -->
  140.             
  141. </HEAD>
  142.  
  143. <BODY BGCOLOR="#CCCCCC" TEXT="#000000" TOPMARGIN="10">
  144.  
  145. <FORM NAME="userform" onSubmit="return false">  
  146.  
  147. <P><IMG SRC="images/gnicttl.gif" ALIGN="textmiddle" HEIGHT=10 WIDTH=10> <FONT SIZE=2 FACE="Arial"><B><% = L_GENERALPROPS_TEXT %>  </B></FONT><FONT FACE="Times New Roman" SIZE=3><I><% = svr %></I></FONT>
  148.  
  149. <P>    
  150. <TABLE WIDTH=100% CELLPADDING=0>
  151.  
  152.     <TR><TD>
  153.  
  154.     <FONT SIZE=2 FACE="Arial">
  155.     <INPUT NAME="chkConfigAllowClientPosting" TYPE="checkbox" onBlur="maintainChk(0);setUpdated();" onClick="maintainChk(0);setUpdated();"> <B><% = L_ALLOWCLIENTPOSTING_TEXT %></B>
  156.  
  157.     <BLOCKQUOTE>
  158.  
  159.     <TABLE WIDTH=410>
  160.         <TR>
  161.             <TD WIDTH=200 ALIGN="left">
  162.                 <FONT SIZE=2 FACE="Arial"><% = L_MAXPOSTSIZE_TEXT %></FONT>
  163.             </TD>
  164.             <TD WIDTH=210 ALIGN="left">
  165.                 <INPUT NAME="txtConfigServerPostSoftLimit" TYPE="text" onBlur="checkRange(this,0,32000);maintainTxt(1,0);setUpdated();" onChange="checkRange(this,0,32000);maintainTxt(1,0);setUpdated();" SIZE=5>
  166.                   <FONT SIZE=2 FACE="Arial"><% = L_KILOBYTES_TEXT %></FONT>
  167.                 <INPUT NAME="hdnConfigServerPostSoftLimit" TYPE="hidden">
  168.             </TD>
  169.         </TR>
  170.         <TR>
  171.             <TD HEIGHT=4 BGCOLOR="#CCCCCC"></TD>
  172.         </TR>
  173.         <TR>
  174.             <TD WIDTH=200 ALIGN="left">
  175.                 <FONT SIZE=2 FACE="Arial"><% = L_MAXCONNSIZE_TEXT %></FONT>
  176.             </TD>
  177.             <TD WIDTH=210 ALIGN="left">
  178.                 <INPUT NAME="txtConfigServerPostHardLimit" TYPE="text" onBlur="checkRange(this,0,4000);maintainTxt(3,0);setUpdated();" onChange="checkRange(this,0,4000);maintainTxt(3,0);setUpdated();" SIZE=5>
  179.                   <FONT SIZE=2 FACE="Arial"><% = L_MEGABYTES_TEXT %></FONT>
  180.                 <INPUT NAME="hdnConfigServerPostHardLimit" TYPE="hidden">
  181.             </TD>
  182.         </TR>
  183.         <TR>
  184.             <TD HEIGHT=4></TD>
  185.         </TR>
  186.     </TABLE>
  187.  
  188.     </BLOCKQUOTE>
  189.  
  190. <P>
  191.     <INPUT NAME="chkConfigAllowControlMessages" TYPE="checkbox"  onClick="setUpdated();"> <% = L_ALLOWCNTRLMSGS_TEXT %>
  192.     <BR> 
  193.  
  194.     <TABLE WIDTH=565>
  195.         <TR>
  196.             <TD WIDTH=265>
  197.                 <FONT SIZE=2 FACE="Arial"><% = L_SMTPSERVER_TEXT %>  
  198.             </TD>
  199.             <TD WIDTH=300>
  200.                 <INPUT NAME="txtConfigSmtpServerAddress" TYPE="text" VALUE="" onBlur="setUpdated();" onChange="setUpdated();" SIZE=25>
  201.             </TD>
  202.         </TR>
  203.         <TR>
  204.             <TD HEIGHT=4></TD>
  205.         </TR>
  206.         <TR>
  207.             <TD WIDTH=265>
  208.                 <FONT SIZE=2 FACE="Arial"><% = L_DFLTMOD_TEXT %>  
  209.             </TD>
  210.             <TD WIDTH=300>
  211.                 <INPUT NAME="txtConfigDefaultModeratorDomain" TYPE="text" VALUE = "" onBlur="setUpdated();" onChange="setUpdated();" SIZE=25>
  212.             </TD>
  213.         </TR>
  214.         <tr>
  215.             <td>
  216.                 <FONT SIZE=2 FACE="Arial">
  217.                 <% = L_ADMINISTRATOR_TEXT %>  
  218.                 </font>
  219.             </td>
  220.             <td>
  221.                 <INPUT NAME="txtAdministratorEmail" TYPE="text" VALUE="" onBlur="setUpdated();" onChange="setUpdated();" Size="25">
  222.             </td>
  223.         </tr>
  224.     </TABLE>
  225.  
  226. </TABLE>
  227.  
  228. </FORM> 
  229. <script language="javascript">
  230.     readCache();
  231. </script>
  232. </BODY>
  233. </HTML>
  234.  
  235.