home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / iis4_03.cab / iilogmn.asp < prev    next >
Text File  |  1997-11-12  |  8KB  |  256 lines

  1. <%@ LANGUAGE=VBScript %>
  2. <% Option Explicit %>
  3. <% Response.Expires = 0 %>
  4.  
  5. <%
  6. Const L_GENERAL_TEXT = "General Logging Options"
  7. Const L_EXTPROPERTIES_TEXT = "Extended Logging Options"
  8. Const L_NEWTIMEPERIOD_TEXT = "New Log Time Period"
  9. Const L_DAILY_TEXT = "Daily"
  10. Const L_WEEKLY_TEXT= "Weekly"
  11. Const L_MONTHLY_TEXT = "Monthly"
  12. Const L_UNLIMITED_TEXT = "Unlimited file size"
  13. Const L_LIMITED_TEXT = "When file size reaches:"
  14. Const L_MB_TEXT = "MB"
  15. Const L_LOGDIR_TEXT = "Log file directory:"
  16. Const L_LOGFILE_TEXT = "Log file name:"
  17. Const L_BROWSE_TEXT = "Browse..."
  18. Const L_DATE_TEXT = "Date"
  19. Const L_TIME_TEXT = "Time"
  20. Const L_CLIENTIPADDRESS_TEXT = "Client IP Address"
  21. Const L_USERNAME_TEXT = "User Name"
  22. Const L_SERVICENAME_TEXT = "Service Name"
  23. Const L_SERVERNAME_TEXT = "Server Name"
  24. Const L_SERVERIP_TEXT = "Server IP"
  25. Const L_SERVERPORT_TEXT = "Server Port"
  26. Const L_METHOD_TEXT = "Method"
  27. Const L_URISTEM_TEXT = "URI Stem"
  28. Const L_URIQUERY_TEXT = "URI Query"
  29. Const L_HTTPSTATUS_TEXT = "Http Status"
  30. Const L_WIN32STATUS_TEXT = "Win32 Status"
  31. Const L_BYTESSENT_TEXT = "Bytes Sent"
  32. Const L_BYTESRECEIVED_TEXT = "Bytes Received"
  33. Const L_TIMETAKEN_TEXT = "Time Taken"
  34. Const L_USERAGENT_TEXT = "User Agent"
  35. Const L_COOKIE_TEXT = "Cookie"
  36. Const L_REFERER_TEXT = "Referer"
  37. Const L_HTTPVER_TEXT = "W3C Version"
  38.  
  39. Const L_ODBCOPTIONS_TEXT = "ODBC Logging Options"
  40. Const L_ODBCDSNAME_TEXT = "ODBC Data Source Name (DSN)"
  41. Const L_TABLE_TEXT = "Table"
  42. Const L_USER_TEXT = "User Name"
  43. Const L_PASSWORD_TEXT = "Password"
  44.  
  45. Const MD_UNLIMITED_FILESIZE =  "&HFFFFFFFF"
  46.  
  47. On Error Resume Next 
  48.  
  49. Dim path, currentobj, lfSize
  50.  
  51. path=Session("spath")
  52. Session("path")=path
  53. Session("SpecObj")=""
  54. Session("SpecProps")=""
  55. Set currentobj=GetObject(path)
  56.  
  57. function writeLogFileName()
  58.     writeLogFileName = "xxyyzz.log"
  59. end function
  60. %>
  61.  
  62. <!--#include file="iiset.inc"-->
  63.  
  64. <HTML>
  65. <HEAD>
  66.     <TITLE></TITLE>
  67.     
  68. <% if Session("canBrowse") then %>    
  69. <SCRIPT LANGUAGE="JavaScript" SRC="JSBrowser/JSBrowser.js">
  70. </SCRIPT>
  71. <% end if %>
  72.     
  73. <SCRIPT LANGUAGE="JavaScript">
  74.     function buildListForm(){
  75.         qstr="numrows=0";
  76.         top.hlist.location.href="iihdn.asp?"+qstr;
  77.     }
  78.  
  79.     function SetListVals(){
  80.     }
  81.     
  82.     function calcLFSize(mbCntrl){
  83.         num = parseInt(mbCntrl.value);
  84.         if (!isNaN(num)){
  85.             mbCntrl.value = num;        
  86.             document.userform.LogFileTruncateSize.value = mbCntrl.value * 1048576;
  87.         }
  88.         else
  89.         {
  90.                alert("Please enter an integer.");        
  91.         }
  92.     }
  93.     
  94.     function isNum(txtcntrl,min,max) {
  95.         str=txtcntrl.value;
  96.         for (var i=0; i < str.length; i++) {
  97.               num = parseInt(str);
  98.             if (isNaN(num)){
  99.                    alert("Please enter an integer.");
  100.                 return false;
  101.               }
  102.             else{
  103.                 txtcntrl.value = parseInt(str);
  104.                 if (num < min) {
  105.                     alert("Please enter an integer greater than " + (min-1) + ".");
  106.                     return false;
  107.                 }
  108.                 if (num > max) {
  109.                     alert("Please enter an integer less than " + (max + 1) + ".");
  110.                     return false;
  111.                 }            
  112.             }
  113.          }
  114.         return true;
  115.     }    
  116.     
  117.     
  118.     function listFuncs(){
  119.         this.writeList=buildListForm;
  120.         this.SetListVals=SetListVals;
  121.         this.mainframe = top.opener.top;        
  122.     }    
  123. listFunc=new listFuncs();    
  124. </SCRIPT>
  125.  
  126. </HEAD>
  127.  
  128. <BODY TOPMARGIN=10 LEFTMARGIN=10 BGCOLOR="#CCCCCC" LINK="#000000" VLINK="#000000">
  129.  
  130. <FONT SIZE=1 FACE="HELV,ARIAL">
  131. <FORM NAME="userform">
  132.  
  133. <% if Session("setLogUI") = "ODBC" then %>
  134. <A NAME="ODBC"></A>
  135. <TABLE WIDTH  =100% HEIGHT = 375>
  136. <TR>
  137.     <TD COLSPAN = 2><FONT SIZE=1 FACE="HELV,ARIAL">
  138.     <B><%= L_ODBCOPTIONS_TEXT %></B><P>
  139.     </FONT>
  140.     </TD>
  141. </TR>
  142. <TR>
  143. <TD COLSPAN = 2 VALIGN="top"><FONT SIZE=1 FACE="HELV,ARIAL">
  144.  
  145.     <%= L_ODBCDSNAME_TEXT %><BR>
  146.         <%= text("LogOdbcDataSource",50,"","", "",False,False) %><P>
  147.     <%= L_TABLE_TEXT %><BR>
  148.         <%= text("LogOdbcTableName",50,"","", "",False,False) %><P>
  149.     <%= L_USER_TEXT %><BR>
  150.         <%= text("LogOdbcUserName",50,"","", "",False,False) %><P>
  151.     <%= L_PASSWORD_TEXT %><BR>
  152.         <%= pword("LogOdbcPassword",50,"","", "",False,False) %><P>
  153. </TR>
  154. </TABLE>
  155.  
  156. <% else %>
  157. <A NAME="GENERAL">
  158. <TABLE WIDTH  =100% HEIGHT = 375>
  159. <TR>
  160.     <TD COLSPAN = 2><FONT SIZE=1 FACE="HELV,ARIAL">
  161.     <B><%= L_GENERAL_TEXT %></B><P>
  162.     </FONT>
  163.     </TD>
  164. </TR>
  165. <TR>
  166. <TD COLSPAN = 2 VALIGN="top"><FONT SIZE=1 FACE="HELV,ARIAL">
  167. <%= L_NEWTIMEPERIOD_TEXT %>
  168.     <BLOCKQUOTE>
  169.         <INPUT TYPE="hidden" NAME="LogFilePeriod" VALUE="<%= currentobj.LogFilePeriod %>">        
  170.         <%= printradio("LogFilePeriod", currentobj.LogFilePeriod = 1, "document.userform.LogFilePeriod.value=1;",False) %>
  171.         <%= L_DAILY_TEXT %><BR>
  172.         <%= printradio("LogFilePeriod", currentobj.LogFilePeriod = 2, "document.userform.LogFilePeriod.value=2;",False) %>
  173.         <%= L_WEEKLY_TEXT %><BR>
  174.         <%= printradio("LogFilePeriod", currentobj.LogFilePeriod = 3, "document.userform.LogFilePeriod.value=3;",False) %>
  175.         <%= L_MONTHLY_TEXT %><BR>
  176.         <%= printradio("LogFilePeriod", currentobj.LogFilePeriod = 0, "document.userform.LogFilePeriod.value=0;document.userform.LogFileTruncateSize.value='" & CLng(MD_UNLIMITED_FILESIZE) & "';",False) %>
  177.         <%= L_UNLIMITED_TEXT %><BR>
  178.         <%= printradio("LogFilePeriod", currentobj.LogFilePeriod = 0 and currentobj.LogFileTruncateSize <> CLng(MD_UNLIMITED_FILESIZE), "document.userform.LogFilePeriod.value=0;document.userform.LogFileTruncateSize.value=document.userform.hdnLogFileTruncateSize.value * 1048576;",False) %>
  179.         <%= L_LIMITED_TEXT %><P>
  180.         <BLOCKQUOTE>
  181.         <%
  182.             if currentobj.LogFilePeriod <> 0 or currentobj.LogFileTruncateSize = CLng(MD_UNLIMITED_FILESIZE) then
  183.                 lfSize = ""
  184.             else                
  185.                 lfSize = currentobj.LogFileTruncateSize/1048576
  186.             end if 
  187.         %>
  188.         <%= inputbox(0,"text", "hdnLogFileTruncateSize",lfSize,10,"","", "calcLFSize(this);",True,False,False) %> <%= L_MB_TEXT %>
  189.         <INPUT TYPE="hidden" NAME="LogFileTruncateSize" VALUE="<%= currentobj.LogFileTruncateSize %>">
  190.         </BLOCKQUOTE>
  191.     </BLOCKQUOTE>
  192.     <HR>
  193.         <%= L_LOGDIR_TEXT %><P>
  194.         <%= text("LogFileDirectory",40,"","", "",False,False) %>
  195.         <% if Session("canBrowse") then %>        
  196.             <INPUT TYPE="button" NAME="hdnBrowser" VALUE="<%= L_BROWSE_TEXT %>" OnClick="JSBrowser = new BrowserObj(document.userform.LogFileDirectory,true,TFILE,<%= Session("FONTSIZE") %>);">
  197.         <% end if %>
  198.         <P>
  199.     </TD>
  200. </TR>
  201. </TABLE>
  202. </A>
  203. <% if Session("setLogUI") = "EXT" then %>
  204.  
  205. <A NAME="EXT">
  206. <% if not Session("IsIE") then %>
  207. <P> 
  208. <% end if %>
  209.  
  210. <TABLE WIDTH  =100% HEIGHT = 375>
  211. <TR>
  212.     <TD COLSPAN = 2><FONT SIZE=1 FACE="HELV,ARIAL">
  213.     <B><%= L_EXTPROPERTIES_TEXT %></B>
  214.     </FONT>
  215.     </TD>
  216. </TR>
  217. <TR>
  218. <TD VALIGN= "TOP" WIDTH = 50%><FONT SIZE=1 FACE="HELV,ARIAL">
  219. <%= checkbox("LogExtFileDate","",false) %><%= L_DATE_TEXT %><BR>
  220. <%= checkbox("LogExtFileTime","",false) %><%= L_TIME_TEXT %><BR>
  221. <%= checkbox("LogExtFileClientIp","",false) %><%= L_CLIENTIPADDRESS_TEXT %><BR>
  222. <%= checkbox("LogExtFileUserName","",false) %><%= L_USERNAME_TEXT %><BR>
  223. <%= checkbox("LogExtFileSiteName","",false) %><%= L_SERVICENAME_TEXT %><BR>
  224. <%= checkbox("LogExtFileComputerName","",false) %><%= L_SERVERNAME_TEXT %><BR>
  225. <%= checkbox("LogExtFileServerIp","",false) %><%= L_SERVERIP_TEXT %><BR>
  226. <%= checkbox("LogExtFileServerPort","",false) %><%= L_SERVERPORT_TEXT %><BR>
  227. <%= checkbox("LogExtFileMethod","",false) %><%= L_METHOD_TEXT %><BR>
  228. <%= checkbox("LogExtFileUriStem","",false) %><%= L_URISTEM_TEXT %>
  229. </FONT>
  230. </TD>
  231. <TD VALIGN= "TOP" ><FONT SIZE=1 FACE="HELV,ARIAL">
  232. <%= checkbox("LogExtFileUriQuery","",false) %><%= L_URIQUERY_TEXT %><BR>
  233. <%= checkbox("LogExtFileHttpStatus","",false) %><%= L_HTTPSTATUS_TEXT %><BR>
  234. <%= checkbox("LogExtFileWin32Status","",false) %><%= L_WIN32STATUS_TEXT %><BR>
  235. <%= checkbox("LogExtFileBytesSent","",false) %><%= L_BYTESSENT_TEXT %><BR>
  236. <%= checkbox("LogExtFileBytesRecv","",false) %><%= L_BYTESRECEIVED_TEXT %><BR>
  237. <%= checkbox("LogExtFileTimeTaken","",false) %><%= L_TIMETAKEN_TEXT %><BR>
  238. <%= checkbox("LogExtFileProtocolVersion","",false) %><%= L_HTTPVER_TEXT %><BR>
  239. <%= checkbox("LogExtFileUserAgent","",false) %><%= L_USERAGENT_TEXT %><BR>
  240. <%= checkbox("LogExtFileCookie","",false) %><%= L_COOKIE_TEXT %><BR>
  241. <%= checkbox("LogExtFileReferer","",false) %><%= L_REFERER_TEXT %>        
  242. </FONT>
  243. </TD>
  244. </TR>
  245. </TABLE>
  246. </A>
  247. <% end if %>
  248. <% end if %>
  249.  
  250.  
  251. </FORM>
  252. </FONT>
  253.  
  254. </BODY>
  255. </HTML>
  256.