home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 April / Chip CMCD0400.iso / SOFTWARE / Demo / InfoPulse / GateKeeper / gk3full.exe / data1.cab / ConfigSite_Files / proxies / addproxy.agp next >
Encoding:
Text File  |  1999-06-17  |  4.4 KB  |  179 lines

  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  4. <meta NAME="Author,Design" Content="GateKeeper Team; gatekeeper@infopulse.net">
  5. <meta NAME="Copyright" Content="Infopulse; www.infopulse.net">
  6. <title>Empty</title>
  7. </head>
  8.  
  9. <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080">
  10. <%
  11.     sFile = Request.ReqParam("file")
  12.     Set proxy = Proxies.NewProxy
  13.     proxy.FileName = sFile
  14.  
  15.     if Request.ReqParam("action") = "Commit" Then
  16.         ' Process the proxy settings
  17.         strProps = proxy.GetPropertyNames
  18.         tmpProps = strProps
  19.         While Len(tmpProps)
  20.             pos = InStr(tmpProps,",")
  21.             If pos > 0 Then
  22.                 propName = Left(tmpProps,pos - 1)
  23.                 tmpProps = Mid(tmpProps,pos + 1)
  24.             Else
  25.                 propName = tmpProps
  26.                 tmpProps = ""
  27.             End If
  28.                 
  29.             propType = proxy.GetPropertyType(propName)
  30.             if propType = "BOOL" Then
  31.                 propVal = Request.ReqParam(propName)
  32.                 if propVal <> "" then
  33.                     proxy.SetBoolProperty propName,True
  34.                 else
  35.                     proxy.SetBoolProperty propName,False
  36.                 end if
  37.             End if
  38.             if propType = "NUMBER" Then
  39.                 propVal = Request.ReqParam(propName)
  40.                 If Len(propVal) = 0 Then
  41.                     propVal = 0
  42.                 End If
  43.                 proxy.SetNumberProperty propName,propVal
  44.             End If
  45.             if propType = "STRING" Then
  46.                 propVal = Request.ReqParam(propName)
  47.                 proxy.SetStringProperty propName,propVal
  48.             End If
  49.             if propType = "PASSWORD" Then
  50.                 propVal = Request.ReqParam(propName)
  51.                 proxy.SetStringProperty propName,propVal
  52.             End If
  53.         Wend
  54.     
  55.         On Error Resume Next
  56.         proxy.Commit
  57.         If Not Err.Number = 0 Then 
  58.             ErrLine = Err.Description
  59.         else
  60.             Response.Redirect("curentproxies.agp")
  61.         End If
  62.     End If
  63.  
  64.     sType = Request.ReqParam("type")
  65. %>
  66. <p><big><strong><font face="Arial">Add a new <%Response.Write(sType)%> proxy</font></strong></big></p>
  67. <%
  68.     If Not Len(ErrLine) = 0 Then
  69.         Response.Write("<B><FONT COLOR=""#FF0000"">" & ErrLine & "</FONT></B><br>")
  70.     End If
  71. %>
  72.  
  73. <form method="POST" action= "/proxies/addproxy.agp">
  74.     <input type="hidden" name="file" value="<%Response.Write(sFile)%>">
  75.     
  76.     <div align="center"><center>
  77.     <table border="1" cellpadding="0" cellspacing="0" width="100%">
  78.     <tr>
  79.         <td width="50%" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
  80.             Option
  81.         </font></strong></td>
  82.         <td width="50%" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
  83.             Value
  84.         </font></strong></td>
  85.     </tr>
  86.     <%
  87.         strProps = proxy.GetPropertyNames
  88.         tmpProps = strProps
  89.         While Len(tmpProps)
  90.             pos = InStr(tmpProps,",")
  91.             If pos > 0 Then
  92.                 propName = Left(tmpProps,pos - 1)
  93.                 tmpProps = Mid(tmpProps,pos + 1)
  94.             Else
  95.                 propName = tmpProps
  96.                 tmpProps = ""
  97.             End If
  98.     %>
  99.     <tr>
  100.         <td><strong><font face="Arial">
  101.             <%Response.Write(propName)%>
  102.         </font></strong></td>
  103.         <td>
  104.             <%
  105.                 propType = proxy.GetPropertyType(propName)
  106.                 if propType = "BOOL" Then
  107.             %>
  108.                         <input    type="checkbox"
  109.                                 name="<%Response.Write(propName)%>"
  110.                             <%
  111.                                 If Not Len(ErrLine) = 0 Then
  112.                                     if Request.ReqParam(propName) <> "" Then
  113.                                         Response.Write("checked")
  114.                                     End If
  115.                                 End If
  116.                             %>
  117.                         >
  118.             <%
  119.                 End if
  120.                 if propType = "NUMBER" Then
  121.             %>
  122.                     <input    type="text"
  123.                             size="5"
  124.                             maxlength="5"
  125.                             name="<%Response.Write(propName)%>"
  126.                         <%
  127.                             If Not Len(ErrLine) = 0 Then
  128.                                 Response.Write("Value=""" & Request.ReqParam(propName) & """")
  129.                             End If
  130.                         %>
  131.                     >
  132.             <%
  133.                 End If
  134.                 if propType = "STRING" Then
  135.             %>
  136.                     <input    type="text"
  137.                             size="30"
  138.                             name="<%Response.Write(propName)%>"
  139.                         <%
  140.                             If propName = "Separator" Then
  141.                                 Response.Write("Value=""#""")
  142.                             End If
  143.                             If Not Len(ErrLine) = 0 Then
  144.                                 Response.Write("Value=""" & Request.ReqParam(propName) & """")
  145.                             End If
  146.                         %>
  147.                     >
  148.             <%
  149.                 End If
  150.                 if propType = "PASSWORD" Then
  151.             %>
  152.                     <input    type="password"
  153.                             size="30"
  154.                             name="<%Response.Write(propName)%>"
  155.                         <%
  156.                             If Not Len(ErrLine) = 0 Then
  157.                                 Response.Write("Value=""" & Request.ReqParam(propName) & """")
  158.                             End If
  159.                         %>
  160.                     >
  161.             <%
  162.                 End If
  163.             %>
  164.  
  165.         </td>        
  166.     </tr>
  167.     <%
  168.         Wend
  169.     %>
  170.     </table>
  171.     </center></div>
  172.     <p><input type="submit" name="action" value="Commit"></p>
  173. </form>
  174.  
  175. <font size="1" face="Arial"><%Response.Write(GateKeeper.Version)%></font>
  176.  
  177. </body>
  178. </html>
  179.