home *** CD-ROM | disk | FTP | other *** search
- <%
- #include </utility/security.fts>
- #include </utility/global.fts>
- #include </utility/theme.fts>
- #include </utility/ftgate.fts>
-
- var h = new server.httpproxy
- var id
-
- session.system.error=0
-
- if (form.config=="1")
- {
- h.id = form.id
- id = form.id
-
- if (form.command=="1")
- {
- h.bindaddr = form.bindaddr
- h.bindport = form.bindport
- h.timeout = form.timeout
- h.logaccess = (form.logaccess=="on")
- h.cachesize = form.cachesize
- }
- else if (form.command=="2")
- {
- h.flush();
- }
-
- if (form.redirect!="")
- output.redirect(form.redirect+"?id="+id+"&type=5")
- }
- else if (form.config=="2")
- {
- if (form.redirect!="")
- output.redirect(form.redirect+"?id="+form.id+"&type=5")
- }
- else
- {
- h.id = request.id
- id = request.id
- }
- %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
- <HTML>
- <HEAD>
- <LINK REL=STYLESHEET HREF="/utility/main<%=nn4%>.css" TYPE="text/css">
- <META name="GENERATOR" content="Microsoft Developer Studio">
- <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <TITLE>Services -- HTTP Proxy General</TITLE>
-
- <SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
- <!--
- var dir="<%=buttons%>";
- var pro=<%=build()==FTGATE_PRO%>;
-
- if (!document.images) {}
- else {
- plus0 = new Image();
- plus0.src = dir+"open.gif";
- plus1 = new Image();
- plus1.src = dir+"openon.gif";
- minus0 = new Image();
- minus0.src = dir+"close.gif";
- minus1 = new Image();
- minus1.src = dir+"closeon.gif";
- flush0 = new Image();
- flush0.src = dir+"flush.gif";
- flush1 = new Image();
- flush1.src = dir+"flushon.gif";
- }
-
- <%
- if (netscape)
- {
- %>
- document.captureEvents(Event.KEYPRESS);
- document.onkeypress = keypress;
-
- function keypress(event)
- {
- if (event.which==13)
- {
- onApply();
- return false;
- }
-
- return true;
- }
- <%
- }
- else
- {
- %>
- function keypress()
- {
- if (event.keyCode==13)
- {
- event.returnValue=null;
- onApply();
- }
- }
- <%
- }
- %>
-
- function onLoad()
- {
- setPage(5, "HTTP Proxy Service");
-
- document.ftgate.timeout.value = toNicePeriod(<%=h.timeout%>);
- document.ftgate.cachesize.value = toNiceBytes(<%=h.cachesize%>);
-
- document.ftgate.bindaddr.focus();
- }
-
- function isOK(form)
- {
- if (!isPort(form.bindport.value))
- {
- alert(errPort);
- form.bindport.focus();
- return false;
- }
-
- if (!isPeriod(form.timeout.value))
- {
- alert(errPeriod);
- form.timeout.focus()
- return false;
- }
-
- if (!isBytes(form.cachesize.value))
- {
- alert(errBytes);
- form.cachesize.focus();
- return false;
- }
-
- document.ftgate.timeout.value = fromNicePeriod(document.ftgate.timeout.value);
- document.ftgate.cachesize.value = fromNiceBytes(document.ftgate.cachesize.value);
- return true;
- }
-
- function onUpEdit(el, name, type)
- {
- change(name, 'plus', 0);
-
- switch (type)
- {
- case 1:
- onUpPeriod(el);
- break;
-
- case 2:
- onUp(el);
- break;
-
- case 3:
- onUpBytes(el);
- }
-
- setModified(true);
- }
-
- function onDownEdit(el, name, type)
- {
- change(name, 'minus', 0);
-
- switch (type)
- {
- case 1:
- onDownPeriod(el);
- break;
-
- case 2:
- onDown(el);
- break;
-
- case 3:
- onDownBytes(el);
- }
-
- setModified(true);
- }
-
- function onFlush()
- {
- change('flushA', 'flush', 0);
- document.ftgate.command.value="2";
- document.ftgate.submit();
- }
- //-->
- </SCRIPT>
- <SCRIPT LANGUAGE="JavaScript1.2" SRC="/utility/cookies.js" TYPE="text/javascript"></SCRIPT>
- <SCRIPT LANGUAGE="JavaScript1.2" SRC="/utility/core.js" TYPE="text/javascript"></SCRIPT>
- <SCRIPT LANGUAGE="JavaScript1.2" SRC="/utility/time.js" TYPE="text/javascript"></SCRIPT>
- <SCRIPT LANGUAGE="JavaScript1.2" SRC="/utility/spin.js" TYPE="text/javascript"></SCRIPT>
- <SCRIPT LANGUAGE="JavaScript1.2" SRC="/utility/dialog.js" TYPE="text/javascript"></SCRIPT>
- </HEAD>
-
- <BODY BGCOLOR="white" onLoad="onLoad()" MARGINHEIGHT="0" MARGINWIDTH="0" onkeypress="keypress()">
-
- <TABLE BORDER="0" BGCOLOR="<%=border%>" WIDTH="<%=bodywidth%>" HEIGHT="<%=bodyheight%>" CELLPADDING="0" CELLSPACING="0"><TR><TD> </TD><TD VALIGN="TOP">
-
- <A HREF="index.fts"><SPAN ID="top">Services</SPAN></A><SPAN ID="top"> /</SPAN>
- <SPAN ID="topsel"><%=h.name%></SPAN>
-
- <FORM NAME="ftgate" METHOD="POST" onSubmit="return isOK(this)" ACTION="proxyhttp.fts">
- <!-- hidden variables -->
- <INPUT TYPE="HIDDEN" NAME="config" VALUE="1">
- <INPUT TYPE="HIDDEN" NAME="command" VALUE="1">
- <INPUT TYPE="HIDDEN" NAME="id" VALUE="<%=id%>">
- <INPUT TYPE="HIDDEN" NAME="redirect" VALUE="">
-
- <!-- start of the tabs -->
- <TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0">
- <TR>
- <TD WIDTH="5" HEIGHT="18"><IMG SRC="/images/left-s.gif" VSPACE="0" BORDER="0" WIDTH="5" HEIGHT="18"></TD>
- <TD CLASS="navon" WIDTH="50" HEIGHT="18" ALIGN="CENTER"><A HREF="javascript:onLaunch('proxyhttp.fts')" CLASS="navon">General</A></TD>
- <TD BGCOLOR="black" WIDTH="1" HEIGHT="18" ALIGN="CENTER"><IMG SRC="/images/1pixel.gif" WIDTH="1" HEIGHT="18"></TD>
- <TD CLASS="navoff" WIDTH="75" HEIGHT="18" ALIGN="CENTER"><A HREF="javascript:onLaunch('typeshttp.fts')" CLASS="navoff">Files Types</A></TD>
- <TD BGCOLOR="black" WIDTH="1" HEIGHT="18" ALIGN="CENTER"><IMG SRC="/images/1pixel.gif" WIDTH="1" HEIGHT="18"></TD>
- <TD CLASS="navoff" WIDTH="55" HEIGHT="18" ALIGN="CENTER"><A HREF="javascript:onLaunch('times.fts')" CLASS="navoff">Times</A></TD>
- <TD BGCOLOR="black" WIDTH="1" HEIGHT="18" ALIGN="CENTER"><IMG SRC="/images/1pixel.gif" WIDTH="1" HEIGHT="18"></TD>
- <TD CLASS="navoff" WIDTH="50" HEIGHT="18"ALIGN="CENTER"><A HREF="javascript:onLaunch('addressproxy.fts')" CLASS="navoff">Addresses</A></TD>
- <TD WIDTH="5" HEIGHT="18"><IMG SRC="/images/right.gif" VSPACE="0" BORDER="0" WIDTH="5" HEIGHT="18"></TD>
- <TD WIDTH="<%=bodywidth-243%>" HEIGHT="18"> </TD>
- </TR>
- </TABLE>
- <!-- end of the tabs -->
-
- <!-- start of the tab body -->
- <TABLE BORDER="0" BGCOLOR="<%=border%>" WIDTH="100%" CELLPADDING="0" CELLSPACING="0"><TR><TD>
- <TABLE <%=table%> CELLPADDING="0" CELLSPACING="0">
- <!-- start of block -->
- <TR>
- <TD VALIGN="TOP">
- <TABLE BORDER="0" WIDTH="100%">
- <!-- sub table goes here -->
- <TR>
- <TD>
- <TABLE CLASS="box" WIDTH="100%">
- <TR>
- <TD>
- <TABLE BORDER="0" WIDTH="100%">
- <TR>
- <TD>Address</TD>
- <TD>
- <SELECT NAME="bindaddr">
- <%
- output.write("<OPTION VALUE=\"\" ")
- if (h.bindaddr==0)
- output.write("SELECTED")
- output.writeln(">Any unbound address</OPTION>")
-
- var str=h.bindaddrlist
- var pos=0
- var i=str.indexof(";", pos)
-
- while (i!=-1)
- {
- var entry = str.slice(pos, i)
-
- output.write("<OPTION VALUE=\""+entry+"\" ")
- if (entry==h.bindaddr)
- output.write("SELECTED")
- output.writeln(">"+entry+"</OPTION>")
-
- pos=i+1
- i=str.indexof(";", pos)
- }
- %>
- </SELECT>
- </TD>
- <TD>Port</TD>
- <TD><INPUT TYPE="TEXT" NAME="bindport" VALUE="<%=h.bindport%>" SIZE="6" onChange="setModified(true)"></TD>
- </TR>
- <TR>
- <TD>Idle timeout</TD>
- <TD COLSPAN="3">
- <INPUT TYPE="TEXT" NAME="timeout" VALUE="<%=h.timeout%>" SIZE="6" onChange="setModified(true)">
- <A HREF="javascript:onUpEdit(document.ftgate.timeout, 'plusA', 1)"
- onMouseDown="change('plusA', 'plus', 1)"
- onMouseOut="change('plusA', 'plus', 0)"><IMG SRC="<%=buttons%>open.gif" NAME="plusA" BORDER="0" WIDTH="20" HEIGHT="20" ALT="Increment"></A>
- <A HREF="javascript:onDownEdit(document.ftgate.timeout, 'minusA', 1)"
- onMouseDown="change('minusA', 'minus', 1)"
- onMouseOut="change('minusA', 'minus', 0)"><IMG SRC="<%=buttons%>close.gif" NAME="minusA" BORDER="0" WIDTH="20" HEIGHT="20" ALT="Decrement"></A>
- </TD>
- </TR>
- <TR>
- <TD COLSPAN="4" NOWRAP>
- <INPUT TYPE="CHECKBOX" NAME="logaccess" onClick="setModified(true)"
- <% if (h.logaccess) output.write("CHECKED") %>>Create connection log
- </TD>
- </TR>
- </TABLE>
- </TD>
- </TR>
- </TABLE>
- </TD>
- </TR>
- <!-- sub table ends here -->
- <!-- sub table goes here -->
- <TR>
- <TD>
- <TABLE CLASS="box" WIDTH="100%">
- <TR>
- <TD>
- <TABLE BORDER="0" WIDTH="100%">
- <TR>
- <TD>Total cache size</TD>
- <TD>
- <INPUT TYPE="TEXT" NAME="cachesize" VALUE="<%=h.cachesize%>" SIZE="6" onChange="setModified(true)">
- <A HREF="javascript:onUpEdit(document.ftgate.cachesize, 'plusB', 3)"
- onMouseDown="change('plusB', 'plus', 1)"
- onMouseOut="change('plusB', 'plus', 0)"><IMG SRC="<%=buttons%>open.gif" NAME="plusB" BORDER="0" WIDTH="20" HEIGHT="20" ALT="Increment"></A>
- <A HREF="javascript:onDownEdit(document.ftgate.cachesize, 'minusB', 3)"
- onMouseDown="change('minusB', 'minus', 1)"
- onMouseOut="change('minusB', 'minus', 0)"><IMG SRC="<%=buttons%>close.gif" NAME="minusB" BORDER="0" WIDTH="20" HEIGHT="20" ALT="Decrement"></A>
- </TD>
- <TD>
- <A HREF="javascript:onFlush()"
- onMouseDown="change('flushA', 'flush', 1)"
- onMouseOut="change('flushA', 'flush', 0)"><IMG SRC="<%=buttons%>flush.gif" NAME="flushA" BORDER="0" WIDTH="75" HEIGHT="20" ALT="Delete Files in Cache"></A>
- </TD>
- </TR>
- </TABLE>
- </TD>
- </TR>
- </TABLE>
- </TD>
- </TR>
- <!-- sub table ends here -->
- <!-- table footer goes here -->
- <TR>
- <TD ALIGN="RIGHT">
- <A HREF="javascript:onClose()"
- onMouseDown="change('closeA', 'ok', 1)"
- onMouseOut="change('closeA', 'ok', 0)"><IMG SRC="<%=buttons%>ok.gif" NAME="closeA" BORDER="0" WIDTH="50" HEIGHT="20" ALT="Apply changes and close" HSPACE="5"></A>
- <A HREF="javascript:onCancel()"
- onMouseDown="change('cancelA', 'cancel', 1)"
- onMouseOut="change('cancelA', 'cancel', 0)"><IMG SRC="<%=buttons%>cancel.gif" NAME="cancelA" BORDER="0" WIDTH="50" HEIGHT="20" ALT="Cancel"></A>
- <A HREF="javascript:onApply()"
- onMouseDown="change('applyA', 'apply', 1)"
- onMouseOut="change('applyA', 'apply', 0)"><IMG SRC="<%=buttons%>apply.gif" NAME="applyA" BORDER="0" WIDTH="50" HEIGHT="20" ALT="Apply changes" HSPACE="5"></A>
- </TD>
- </TR>
- <!-- table footer ends here -->
- </TABLE>
- </TD>
- </TR>
- <!-- end of block -->
-
- </TABLE>
- <!-- end of the tab body -->
- </TD></TR></TABLE>
-
- <!-- footer starts here -->
- <SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
- <!--
- var href="/services/proxyhttp.fts?id=<%=id%>&type=5";
- var bodywidth=<%=bodywidth%>;
- //-->
- </SCRIPT>
- <SCRIPT LANGUAGE="JavaScript1.2" SRC="/utility/footer.js" TYPE="text/javascript"></SCRIPT>
- <!-- footer ends here -->
- </FORM>
- </TD><TD WIDTH="10"> </TD></TR></TABLE>
- </BODY>
- </HTML>
-