home *** CD-ROM | disk | FTP | other *** search
- <%
- #include </utility/security.fts>
- #include </utility/global.fts>
- #include </utility/theme.fts>
- #include </utility/ftgate.fts>
-
- var s = new server.schedule
-
- var d = new server.domain
- const DOM_INTERNET = 2
- const DOM_ALIAS = 3
-
- function domainType(d)
- {
- var type
-
- if (d.description=="Local")
- type=DOM_LOCAL
- else if (d.description=="Remote")
- type=DOM_REMOTE
- else
- type=DOM_ALIAS
-
- return type
- }
-
- if (form.config=="1")
- {
- if (build()==FTGATE_PRO)
- s.name = form.name
- else
- s.first()
-
- var ok=true
- while (ok)
- {
- s.dun.profile = form.profile
- s.dun.username = form.username
- s.dun.password = form.password
- s.dun.connecttimeout = form.connecttimeout
- s.dun.logintimeout = form.logintimeout
- s.dun.attemptpause = form.attemptpause
- s.dun.startdelay = form.startdelay
- s.dun.maxattempts = form.maxattempts
-
- if (build()!=FTGATE_PRO)
- {
- ok=s.next()
- }
- else
- ok=false
- }
-
- if (build()!=FTGATE_PRO)
- s.first()
-
- if (form.redirect!="")
- {
- var str = form.redirect
- if (str.indexof("?",0)==-1)
- output.redirect(form.redirect+"?schedule="+s.name)
- else
- output.redirect(form.redirect+"&schedule="+s.name)
- }
- }
- else if (form.config=="2")
- {
- if (form.redirect!="")
- {
- var str = form.redirect
- if (str.indexof("?",0)==-1)
- output.redirect(form.redirect+"?schedule="+form.name)
- else
- output.redirect(form.redirect+"&schedule="+form.name)
- }
- }
- else
- {
- if (build()==FTGATE_PRO)
- s.name = request.schedule
- else
- s.first()
- }
- %>
- <!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>Schedules -- Dialup</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";
- }
-
- <%
- 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()
- {
- document.ftgate.connecttimeout.value = toNicePeriod(<%=s.dun.connecttimeout%>);
- document.ftgate.logintimeout.value = toNicePeriod(<%=s.dun.logintimeout%>);
- document.ftgate.attemptpause.value = toNicePeriod(<%=s.dun.attemptpause%>);
- document.ftgate.startdelay.value = toNicePeriod(<%=s.dun.startdelay%>);
-
- <%
- if (build()==FTGATE_PRO)
- output.writeln("setPage(3, \"Schedules\");")
- else
- output.writeln("setPage(4, \"Remote Domain\");")
-
- if (s.profile.first())
- {
- %>
- document.ftgate.profile.focus();
- <%
- }
- else
- {
- %>
- document.ftgate.username.focus();
- <%
- }
- %>
- }
-
- function isOK(form)
- {
- var periodErr = "The period is invalid: enter a number followed by s, m, h, or d";
-
- if (!isPeriod(form.connecttimeout.value))
- {
- alert(periodErr);
- form.connecttimeout.focus();
-
- return false;
- }
-
- if (!isPeriod(form.logintimeout.value))
- {
- alert(periodErr);
- form.logintimeout.focus();
-
- return false;
- }
-
- if (!isPeriod(form.attemptpause.value))
- {
- alert(periodErr);
- form.attemptpause.focus();
-
- return false;
- }
-
- if (!isPeriod(form.startdelay.value))
- {
- alert(periodErr);
- form.startdelay.focus();
-
- return false;
- }
-
- if (!isPositive(form.maxattempts.value))
- {
- alert("Enter a number greater than zero.");
- form.maxattempts.focus();
-
- return false;
- }
-
- form.connecttimeout.value = fromNicePeriod(form.connecttimeout.value)
- form.logintimeout.value = fromNicePeriod(form.logintimeout.value)
- form.attemptpause.value = fromNicePeriod(form.attemptpause.value)
- form.startdelay.value = fromNicePeriod(form.startdelay.value)
-
- return true;
- }
-
- function onUpEdit(edit, name)
- {
- change(name, 'plus', 0);
- onUpPeriod(edit);
- setModified(true);
- }
-
- function onDownEdit(edit, name)
- {
- change(name, 'minus', 0);
- onDownPeriod(edit, false);
- setModified(true);
- }
-
- function onUpValue(edit, name)
- {
- change(name, 'plus', 0);
- onUp(edit);
- setModified(true);
- }
-
- function onDownValue(edit, name)
- {
- change(name, 'minus', 0);
- onDown(edit, false);
- setModified(true);
- }
-
- function onCancelLocal()
- {
- <%
- if (build()==FTGATE_PRO)
- output.writeln("onCancel()")
- else
- {
- %>
- if (!checkModified())
- return;
-
- window.location.href="/domains/index.fts";
- <%
- }
- %>
- }
-
- function onCloseLocal()
- {
- <%
- if (build()==FTGATE_PRO)
- output.writeln("onClose()")
- else
- {
- %>
- if (!isOK(document.ftgate))
- return;
-
- document.ftgate.redirect.value="/domains/index.fts"
- 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">
-
- <%
- if (build()==FTGATE_PRO)
- {
- %>
- <A HREF="index.fts"><SPAN ID="top">Schedules</SPAN></A><SPAN ID="top"> /</SPAN>
- <SPAN ID="topsel"><%=s.name%></SPAN>
- <%
- }
- else
- {
- var ok=d.findfirst("*")
- while (ok&&(domainType(d)!=DOM_REMOTE))
- ok=d.findnext()
- %>
- <A HREF="/domains/index.fts"><SPAN ID="top">Domains</SPAN></A><SPAN ID="top"> /</SPAN>
- <SPAN ID="topsel"><%=d.domainname%></SPAN>
- <%
- }
- %>
-
- <FORM NAME="ftgate" METHOD="POST" onSubmit="return isOK(this)" ACTION="dialup.fts">
- <!-- hidden variables -->
- <INPUT TYPE="HIDDEN" NAME="name" VALUE="<%=s.name%>">
- <INPUT TYPE="HIDDEN" NAME="config" VALUE="1">
- <INPUT TYPE="HIDDEN" NAME="redirect" VALUE="">
-
- <!-- start of the tabs -->
- <%
- if (build()==FTGATE_PRO)
- {
- %>
- <TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0">
- <TR>
- <TD WIDTH="5" HEIGHT="18"><IMG SRC="/images/left.gif" VSPACE="0" BORDER="0" WIDTH="5" HEIGHT="18"></TD>
- <TD CLASS="navoff" WIDTH="50" HEIGHT="18" ALIGN="CENTER"><A HREF="javascript:onLaunch('schedule.fts')" CLASS="navoff">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="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="navon" WIDTH="50" HEIGHT="18"ALIGN="CENTER"><A HREF="javascript:onLaunch('dialup.fts')" CLASS="navon">Dialup</A></TD>
- <TD WIDTH="5" HEIGHT="18"><IMG SRC="/images/right-s.gif" VSPACE="0" BORDER="0" WIDTH="5" HEIGHT="18"></TD>
- <TD WIDTH="<%=bodywidth-167%>" HEIGHT="18"> </TD>
- </TR>
- </TABLE>
- <%
- }
- else
- {
- %>
- <TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0">
- <TR>
- <TD WIDTH="5" HEIGHT="18"><IMG SRC="/images/left.gif" VSPACE="0" BORDER="0" WIDTH="5" HEIGHT="18"></TD>
- <TD CLASS="navoff" WIDTH="50" HEIGHT="18" ALIGN="CENTER"><A HREF="javascript:onLaunch('/domains/remote.fts')" CLASS="navoff">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="55" HEIGHT="18" ALIGN="CENTER"><A HREF="javascript:onLaunch('/domains/delivery.fts')" CLASS="navoff">Delivery</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('/domains/security.fts')" CLASS="navoff">Security</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('/domains/details.fts')" CLASS="navoff">Details</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('/domains/priority.fts')" CLASS="navoff">Priority</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="70" HEIGHT="18" ALIGN="CENTER"><A HREF="javascript:onLaunch('/schedules/schedule.fts')" CLASS="navoff">Connection</A></TD>
- <TD BGCOLOR="black" WIDTH="1" HEIGHT="18" ALIGN="CENTER"><IMG SRC="/images/1pixel.gif" WIDTH="1" HEIGHT="18"></TD>
- <TD CLASS="navon" WIDTH="55" HEIGHT="18" ALIGN="CENTER"><A HREF="javascript:onLaunch('/schedules/dialup.fts')" CLASS="navon">Dialup</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('/schedules/times.fts?id=1')" CLASS="navoff">Times A</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('/schedules/times.fts?id=2')" CLASS="navoff">Times B</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('/mailboxes/mailbox.fts')" CLASS="navoff">Outbox</A></TD>
- <TD WIDTH="5" HEIGHT="18"><IMG SRC="/images/right.gif" VSPACE="0" BORDER="0" WIDTH="5" HEIGHT="18"></TD>
- <TD WIDTH="<%=bodywidth-574%>" 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>
- <TH COLSPAN="2">Dialup Connection Settings</TH>
- </TR>
- <TR>
- <TD>Dialup profile</TD>
- <TD COLSPAN="3">
- <%
- var wm = new server.webmail
- var ok=s.profile.first()
- if (ok)
- {
- output.writeln("<SELECT NAME='profile' onChange='setModified(true)'>")
- while (ok)
- {
- %>
- <OPTION VALUE="<%=wm.escape(s.profile.name)%>" <%
- if (s.profile.name==s.dun.profile)
- {
- output.write(" SELECTED")
- }
- %>><%=wm.escape(s.profile.name)%></OPTION>
- <%
- ok=s.profile.next()
- }
- output.writeln("</SELECT>")
- }
- else
- {
- output.writeln("No Dialup profiles defined.")
- }
- %>
- </TD>
- </TR>
- <TR>
- <TD>Login username</TD>
- <TD><INPUT TYPE="TEXT" NAME="username" SIZE="<%=size20%>" VALUE="<%=s.dun.username%>" onChange="setModified(true)"></TD>
- <TD>Login password</TD>
- <TD><INPUT TYPE="PASSWORD" NAME="password" SIZE="<%=size20%>" VALUE="<%=s.dun.password%>" onChange="setModified(true)"></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>
- <TH COLSPAN="4">When Connecting</TH>
- </TR>
- <TR>
- <TD>Connect timeout</TD>
- <TD>
- <INPUT TYPE="TEXT" NAME="connecttimeout" SIZE="<%=size5%>" VALUE="<%=s.dun.connecttimeout%>" onChange="setModified(true)">
- <A HREF="javascript:onUpEdit(document.ftgate.connecttimeout, 'plusA')"
- 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.connecttimeout, 'minusA')"
- 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>
- <TD>Login timeout</TD>
- <TD>
- <INPUT TYPE="TEXT" NAME="logintimeout" SIZE="<%=size5%>" VALUE="<%=s.dun.logintimeout%>" onChange="setModified(true)">
- <A HREF="javascript:onUpEdit(document.ftgate.logintimeout, 'plusB')"
- 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.logintimeout, 'minusB')"
- 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>
- </TR>
- <TR>
- <TD>Retry after</TD>
- <TD>
- <INPUT TYPE="TEXT" NAME="attemptpause" SIZE="<%=size5%>" VALUE="<%=s.dun.attemptpause%>" onChange="setModified(true)">
- <A HREF="javascript:onUpEdit(document.ftgate.attemptpause, 'plusC')"
- onMouseDown="change('plusC', 'plus', 1)"
- onMouseOut="change('plusC', 'plus', 0)"><IMG SRC="<%=buttons%>open.gif" NAME="plusC" BORDER="0" WIDTH="20" HEIGHT="20" ALT="Increment"></A>
- <A HREF="javascript:onDownEdit(document.ftgate.attemptpause, 'minusC')"
- onMouseDown="change('minusC', 'minus', 1)"
- onMouseOut="change('minusC', 'minus', 0)"><IMG SRC="<%=buttons%>close.gif" NAME="minusC" BORDER="0" WIDTH="20" HEIGHT="20" ALT="Decrement"></A>
- </TD>
- <TD>Max attempts</TD>
- <TD>
- <INPUT TYPE="TEXT" NAME="maxattempts" SIZE="<%=size5%>" VALUE="<%=s.dun.maxattempts%>" onChange="setModified(true)">
- <A HREF="javascript:onUpValue(document.ftgate.maxattempts, 'plusE')"
- onMouseDown="change('plusE', 'plus', 1)"
- onMouseOut="change('plusE', 'plus', 0)"><IMG SRC="<%=buttons%>open.gif" NAME="plusE" BORDER="0" WIDTH="20" HEIGHT="20" ALT="Increment"></A>
- <A HREF="javascript:onDownValue(document.ftgate.maxattempts, 'minusE')"
- onMouseDown="change('minusE', 'minus', 1)"
- onMouseOut="change('minusE', 'minus', 0)"><IMG SRC="<%=buttons%>close.gif" NAME="minusE" BORDER="0" WIDTH="20" HEIGHT="20" ALT="Decrement"></A>
- </TD>
- </TR>
- <TR>
- <TD>Start delay</TD>
- <TD>
- <INPUT TYPE="TEXT" NAME="startdelay" SIZE="<%=size5%>" VALUE="<%=s.dun.startdelay%>" onChange="setModified(true)">
- <A HREF="javascript:onUpEdit(document.ftgate.startdelay, 'plusD')"
- onMouseDown="change('plusD', 'plus', 1)"
- onMouseOut="change('plusD', 'plus', 0)"><IMG SRC="<%=buttons%>open.gif" NAME="plusD" BORDER="0" WIDTH="20" HEIGHT="20" ALT="Increment"></A>
- <A HREF="javascript:onDownEdit(document.ftgate.startdelay, 'minusD')"
- onMouseDown="change('minusD', 'minus', 1)"
- onMouseOut="change('minusD', 'minus', 0)"><IMG SRC="<%=buttons%>close.gif" NAME="minusD" BORDER="0" WIDTH="20" HEIGHT="20" ALT="Decrement"></A>
- </TD>
- <TD COLSPAN="2"> </TD>
- </TR>
- </TABLE>
- </TD>
- </TR>
- </TABLE>
- </TD>
- </TR>
- <!-- sub table ends here -->
-
- <!-- table footer goes here -->
- <TR>
- <TD ALIGN="RIGHT">
- <A HREF="javascript:onCloseLocal()"
- 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:onCancelLocal()"
- 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>
- <!-- sub table ends here -->
- </TD>
- </TR>
- <!-- end of block -->
- </TABLE>
- </TD></TR></TABLE>
-
- <!-- footer starts here -->
- <SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
- <!--
- var href="/schedules/dialup.fts?schedule=<%=s.name%>";
- 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>
-