1step & 2step changes

git-svn-id: svn://10.0.0.236/trunk@6818 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
racham%netscape.com
1998-07-30 00:18:47 +00:00
parent 1380afdee5
commit 5b140ce414
8 changed files with 860 additions and 13 deletions

View File

@@ -148,15 +148,18 @@ pages[ 56 ][ 1 ] = new method( "2step.htm", "parent.content.go( '' )", true );
pages[ 57 ] = new Array();
pages[ 57 ][ 0 ] = new page( "2step.htm", null, null );
pages[ 57 ][ 1 ] = new method( "register.htm", "parent.content.go( '' )", true );
pages[ 57 ][ 1 ] = new method( "reg2stp.htm", "parent.content.go( '' )", true );
pages[ 8 ] = new Array();
pages[ 8 ][ 0 ] = new page( "connect1.htm", null, null );
pages[ 8 ][ 1 ] = new method( "editfour.htm", "checkEditMode('')", true );
pages[ 8 ][ 2 ] = new method( "register.htm", "parent.content.go('')", true );
pages[ 8 ][ 2 ] = new method( "reg1stp.htm", "parent.content.go('')", true );
pages[ 9 ] = new Array();
pages[ 9 ][ 0 ] = new page( "register.htm", null, null );
pages[ 9 ][ 0 ] = new page( "reg1stp.htm", null, null );
pages[ 61 ] = new Array();
pages[ 61 ][ 0 ] = new page( "reg2stp.htm", null, null );
// Existing Account Path
@@ -220,8 +223,9 @@ pages[ 21 ][ 0 ] = new page( "okreboot.htm", null, null );
pages[ 22 ] = new Array();
pages[ 22 ][ 0 ] = new page( "error.htm", null, null );
pages[ 22 ][ 1 ] = new method( "register.htm", "parent.content.go( 'New Path' )", true );
pages[ 22 ][ 2 ] = new method( "connect2.htm", "parent.content.go( 'Existing Path' )", true );
pages[ 22 ][ 1 ] = new method( "reg1stp.htm", "parent.content.go( '1step' )", true );
pages[ 22 ][ 2 ] = new method( "reg2stp.htm", "parent.content.go( '2step' )", true );
pages[ 22 ][ 3 ] = new method( "connect2.htm", "parent.content.go( 'Existing Path' )", true );
pages[ 23 ] = new Array();
pages[ 23 ][ 0 ] = new page( "later.htm", null, null );
@@ -367,7 +371,7 @@ pages[51][1]=new action("main.htm");
pages[52]=new Array();
pages[52][0]=new page("editfour.htm",null,null);
pages[52][1]=new method("register.htm","parent.content.go('register.htm')",true);
pages[52][1]=new method("reg1stp.htm","parent.content.go('register.htm')",true);
pages[52][2]=new method("ok.htm","parent.content.go('ok.htm')",true);
pages[52][3]=new method("okreboot.htm","parent.content.go('okreboot.htm')",true);
pages[52][4]=new method("error.htm","parent.content.go('error.htm')",true);
@@ -675,8 +679,8 @@ function go( msg )
{
pageName = pageHistory.substring( x + 1, pageHistory.length );
globals.document.vars.pageHistory.value = pageHistory.substring( 0, x + 1 );
if ( ( pageName == "register.htm" ) || ( pageName == "error.htm" ) ||
( pageName == "error2.htm" ) )
if ( ( pageName == "reg1stp.htm" ) || ( pageName == "error.htm" ) ||
( pageName == "error2.htm" ) || ( pageName == "reg2stp.htm" ) )
historyCleanup = true;
}
else

View File

@@ -267,7 +267,7 @@ function generateControls()
if ( editMode == true )
showScreenOptions = true;
}
else if ( formName == "register.htm" )
else if ( formName == "reg1stp.htm" || formName == "reg2stp.htm" )
{
showHelp = false;
showBack = false;
@@ -719,7 +719,7 @@ function generateToolBarControls()
showScreenOptions=true;
else if (formName == "connect2.htm")
;
else if (formName == "register.htm")
else if (formName == "reg1stp.htm" || formName == "reg2stp.htm" )
;
else if (formName == "ok.htm")
showScreenOptions=true;

View File

@@ -61,11 +61,11 @@ onload="loadData()" ID="editfour100">
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2" BGCOLOR="#FFFFFF" WIDTH= ID="nospace">
<TR>
<TD VALIGN="TOP">
<A HREF="about:blank" onclick="setPath('register.htm');return false" ID="editfour101"><IMG NAME="next" SRC="images/nxt_up.gif" BORDER=0 HEIGHT=32 WIDTH=32></A>
<A HREF="about:blank" onclick="setPath('reg1stp.htm');return false" ID="editfour101"><IMG NAME="next" SRC="images/nxt_up.gif" BORDER=0 HEIGHT=32 WIDTH=32></A>
</TD>
<TD><FONT STYLE="fontFamily='PrimaSans BT,Helvetica,Arial';fontSize='10px';marginTop='0';marginLeft='24'
">
<B>register.htm</B>
<B>reg1stp.htm</B>
</FONT>
<spacer type=vertical size=8>
<FONT STYLE="fontFamily='PrimaSans BT,Helvetica,Arial';fontSize='10px';marginTop='0';marginLeft='24'

View File

@@ -21,7 +21,7 @@ function go( msg )
{
if ( parent.parent.globals.document.vars.editMode.value != "yes" )
{
if ( msg == parent.parent.globals.document.vars.path.value )
if ( msg == parent.parent.globals.document.vars.path.value || (msg == "1step") || (msg == "2step"))
{
parent.parent.globals.document.vars.tryAgain.value = "yes";
return checkData();

View File

@@ -0,0 +1,106 @@
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
The contents of this file are subject to the Netscape Public License
Version 1.0 (the "NPL"); you may not use this file except in
compliance with the NPL. You may obtain a copy of the NPL at
http://www.mozilla.org/NPL/
Software distributed under the NPL is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
for the specific language governing rights and limitations under the
NPL.
The Initial Developer of this code under the NPL is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998 Netscape Communications Corporation. All Rights
Reserved.
-->
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
<HTML>
<HEAD>
<TITLE>Account Setup</TITLE>
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="reg1stp.js">
</SCRIPT>
<LINK REL=STYLESHEET TYPE="text/JavaScript" ARCHIVE="asw.jar" HREF="sheet.js">
</LINK>
</HEAD>
<BODY BACKGROUND="images/bg.gif" BGCOLOR="cccccc" onLoad="loadData()" ID="reg1stp100">
<!-- The layer below contains the Account Setup identifier. -->
<LAYER NAME = "tagtext" LEFT = 420 TOP = 0 VISIBILITY = SHOW>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="images/tag.gif">
<B CLASS="previewtag">ACCOUNT SETUP</B>
</TD></TR>
</TABLE>
</LAYER>
<!-- The layer below contains the headline and text of this screen -->
<FORM TARGET="_parent" METHOD="post">
<P CLASS="title"><B>Connecting to the Internet <BR>account server...</B></P>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH=500>
<TR>
<TD ALIGN=LEFT VALIGN=TOP>
<!-- The following values can be set by changing the VALUE item -->
<INPUT NAME="RS_FORM_TYPE" TYPE="hidden" VALUE="custinfo">
<INPUT NAME="REG_SETUP_NAME" TYPE="hidden" VALUE="Account Setup">
<INPUT NAME="REG_SIGNUP_VERSION" TYPE="hidden" VALUE="4.0">
<INPUT NAME="REG_SCRIPTING" TYPE="hidden" VALUE="Yes">
<INPUT NAME="REG_SOURCE" TYPE="hidden" VALUE="DUK4">
<INPUT NAME="REG_CHANNEL" TYPE="hidden" VALUE="">
<INPUT NAME="AS_LCK_SUPPORT" TYPE="hidden" VALUE="YES">
<INPUT NAME="AS_BOOKMARK_SUPPORT" TYPE="hidden" VALUE="YES">
<INPUT NAME="AS_MAC_ANIMATION_SUPPORT" TYPE="hidden" VALUE="NO">
<INPUT NAME="AS_WIN_ANIMATION_SUPPORT" TYPE="hidden" VALUE="NO">
<!-- The following values are set via JavaScript -->
<INPUT NAME="REG_PLATFORM" TYPE="hidden">
<INPUT NAME="AS_INTLMODE" TYPE="hidden">
<INPUT NAME="CST_LAST_NAME" TYPE="hidden">
<INPUT NAME="CST_FIRST_NAME" TYPE="hidden">
<INPUT NAME="CST_ORGANIZATION_NAME" TYPE="hidden">
<INPUT NAME="CST_STREET_1" TYPE="hidden">
<INPUT NAME="CST_STREET_2" TYPE="hidden">
<INPUT NAME="CST_STREET_3" TYPE="hidden">
<INPUT NAME="CST_CITY" TYPE="hidden">
<INPUT NAME="CST_STATE_PROVINCE" TYPE="hidden">
<INPUT NAME="CST_POSTAL_CODE" TYPE="hidden">
<INPUT NAME="CST_COUNTRY" TYPE="hidden">
<INPUT NAME="CST_PHONE" TYPE="hidden">
<INPUT NAME="CST_HOMEPHONE" TYPE="hidden">
<INPUT NAME="CST_CC_NO" TYPE="hidden">
<INPUT NAME="CST_CC_TYPE" TYPE="hidden">
<INPUT NAME="CST_CC_MTH_EXPIRE" TYPE="hidden">
<INPUT NAME="CST_CC_YEAR_EXPIRE" TYPE="hidden">
<INPUT NAME="CST_CC_CARDHOLDER" TYPE="hidden">
<INPUT NAME="CST_JUNK_MAIL" TYPE="hidden">
</TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>

View File

@@ -0,0 +1,344 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
<!-- to hide script contents from old browsers
function go(msg)
{
if (parent.parent.globals.document.vars.editMode.value == "yes")
return true;
else
return(checkData());
}
function checkData()
{
return(true);
}
function loadData()
{
netscape.security.PrivilegeManager.enablePrivilege("AccountSetup");
if (parent.controls.generateControls) parent.controls.generateControls();
if (parent.parent.globals.document.vars.editMode.value != "yes") { // only connect to reggie if editmode is off
var connectStatusFlag = parent.parent.globals.document.setupPlugin.IsDialerConnected();
if (connectStatusFlag == true) {
if (confirm("Account Setup can't connect until you close your current connection. Close the connection now?") == false) {
return;
}
parent.parent.globals.document.setupPlugin.DialerHangup();
}
var theFolder = parent.parent.globals.getConfigFolder(self);
var theFile = parent.parent.globals.getAcctSetupFilename(self);
var theRegFile = theFolder + parent.parent.globals.document.vars.regServer.value;
var intlFlag = parent.parent.globals.GetNameValuePair(theFile,"Mode Selection","IntlMode");
intlFlag = intlFlag.toLowerCase();
// determine name of scripting file
var scriptEnabledFlag = "FALSE";
var theScriptFile = parent.parent.globals.GetNameValuePair(theRegFile,"Dial-In Configuration","ScriptFileName");
if (theScriptFile != null && theScriptFile != "") {
theScriptFile = theFolder + theScriptFile;
scriptEnabledFlag = "TRUE";
}
else {
theScriptFile="";
scriptEnabledFlag = "FALSE";
}
// determine tty
var ttyFlag = parent.parent.globals.GetNameValuePair(theRegFile,"Security","SecurityDevice");
ttyFlag = ttyFlag.toLowerCase();
if (ttyFlag == "yes") {
ttyFlag = "TRUE";
}
else {
ttyFlag = "FALSE";
}
// determine outside line access string
var outsideLineAccessStr = "";
if (parent.parent.globals.document.vars.prefixData.value != "") {
outsideLineAccessStr = parent.parent.globals.document.vars.prefixData.value;
x = outsideLineAccessStr.indexOf(",");
if (x<0) outsideLineAccessStr = outsideLineAccessStr + ",";
}
// Fix #75735
// Allow IAS files to specify DialAsLongDistance and DialAreaCode flags
// Else check international mode and turn them off
// Else check against ISP & user area codes and turn them off it they match
var dialAsLongDistance = parent.parent.globals.GetNameValuePair(theRegFile,"Dial-In Configuration","DialAsLongDistance");
dialAsLongDistance = dialAsLongDistance.toLowerCase();
var dialAreaCode = parent.parent.globals.GetNameValuePair(theRegFile,"Dial-In Configuration","DialAreaCode");
dialAreaCode = dialAreaCode.toLowerCase();
if ((dialAsLongDistance != null && dialAsLongDistance!="") || (dialAreaCode != null && dialAreaCode!="") ) {
// compare these dialer flags against "no" because the default we want is "TRUE"
var dialAsLongDistanceFlag = (dialAsLongDistance=="no") ? "FALSE":"TRUE";
var dialAreaCodeFlag = (dialAreaCode == "no") ? "FALSE":"TRUE";
}
else if (intlFlag == "yes") {
var dialAsLongDistanceFlag = "FALSE";
var dialAreaCodeFlag = "FALSE";
}
else {
var dialAsLongDistanceFlag = "TRUE";
var dialAreaCodeFlag = "TRUE";
var ispAreaCode="";
var ispPhoneNum = parent.parent.globals.GetNameValuePair(theRegFile,"Dial-In Configuration","Phone");
if (ispPhoneNum != null && ispPhoneNum!="") {
var x=ispPhoneNum.indexOf("(");
if (x>=0) {
var y=ispPhoneNum.indexOf(")",x+1);
ispAreaCode=ispPhoneNum.substring(x+1,y);
}
}
var userAreaCode=parent.parent.globals.document.vars.modemAreaCode.value;
if (ispAreaCode == userAreaCode) {
dialAsLongDistanceFlag="FALSE";
dialAreaCodeFlag = "FALSE";
}
}
// configure dialer for Registration Server
dialerData = parent.parent.globals.document.setupPlugin.newStringArray(28); // increment this # as new dialer strings are added
dialerData[0] = "FileName=" + theRegFile;
dialerData[1] = "AccountName=" + parent.parent.globals.GetNameValuePair(theRegFile,"Dial-In Configuration","SiteName");
dialerData[2] = "ISPPhoneNum=" + parent.parent.globals.GetNameValuePair(theRegFile,"Dial-In Configuration","Phone");
dialerData[3] = "LoginName=" + parent.parent.globals.GetNameValuePair(theRegFile,"Dial-In Configuration","Name");
dialerData[4] = "Password=" + parent.parent.globals.GetNameValuePair(theRegFile,"Dial-In Configuration","Password");
dialerData[5] = "DNSAddress=" + parent.parent.globals.GetNameValuePair(theRegFile,"IP","DNSAddress");
dialerData[6] = "DNSAddress2=" + parent.parent.globals.GetNameValuePair(theRegFile,"IP","DNSAddress2");
dialerData[7] = "DomainName=" + parent.parent.globals.GetNameValuePair(theRegFile,"IP","DomainName");
dialerData[8] = "IPAddress=" + parent.parent.globals.GetNameValuePair(theRegFile,"IP","IPAddress");
dialerData[9] = "IntlMode=" + ((intlFlag=="yes") ? "TRUE":"FALSE");
dialerData[10] = "DialOnDemand=TRUE";
dialerData[11] = "ModemName=" + parent.parent.globals.document.vars.modem.value;
dialerData[12] = "ModemType=" + parent.parent.globals.document.setupPlugin.GetModemType(parent.parent.globals.document.vars.modem.value);
dialerData[13] = "DialType=" + parent.parent.globals.document.vars.dialMethod.value;
dialerData[14] = "OutsideLineAccess=" + outsideLineAccessStr;
dialerData[15] = "DisableCallWaiting=" + ((parent.parent.globals.document.vars.cwData.value != "") ? "TRUE":"FALSE");
dialerData[16] = "DisableCallWaitingCode=" + parent.parent.globals.document.vars.cwData.value;
dialerData[17] = "UserAreaCode=" + parent.parent.globals.document.vars.modemAreaCode.value; // XXX what to do if international mode?
dialerData[18] = "CountryCode=" + parent.parent.globals.document.vars.countryCode.value;
dialerData[19] = "LongDistanceAccess=1"; // XXX
dialerData[20] = "DialAsLongDistance=" + dialAsLongDistanceFlag; // As processed above (fix #75735)
dialerData[21] = "DialAreaCode=" + dialAreaCodeFlag; // As processed above (fix #75735)
dialerData[22] = "ScriptEnabled=" + scriptEnabledFlag;
dialerData[23] = "ScriptFileName=" + theScriptFile;
dialerData[24] = "NeedsTTYWindow=" + ttyFlag;
dialerData[25] = "Location=Home";
dialerData[26] = "DisconnectTime=" + parent.parent.globals.GetNameValuePair(theFile,"Mode Selection","Dialer_Disconnect_After");
dialerData[27] = "Path=Server";
// write out dialer data to Java Console
if (parent.parent.globals.document.vars.debugMode.value.toLowerCase() == "yes") {
parent.parent.globals.debug("\nDialer data (for Registration Server): ");
var numElements = dialerData.length;
for (var x=0; x<numElements; x++) {
parent.parent.globals.debug(" " + x + ": " + dialerData[x]);
}
}
parent.parent.globals.document.setupPlugin.DialerConfig(dialerData,true);
// check if we need to reboot
if (parent.parent.globals.document.setupPlugin.NeedReboot() == true) {
parent.parent.globals.forceReboot("reg1stp.htm"); // XXX hardcode in name of next screen???
return;
}
if (parent.parent.globals.document.setupPlugin.DialerConnect() == false) {
parent.parent.globals.document.setupPlugin.DialerHangup();
window.location.replace("error.htm"); // XXX hardcode in name of next screen???
return;
}
// get platform (XXX Macintosh should not be uppercased?)
var thePlatform = new String(navigator.userAgent);
var x=thePlatform.indexOf("(")+1;
var y=thePlatform.indexOf(";",x+1);
thePlatform=thePlatform.substring(x,y);
if (thePlatform == "Win16") thePlatform = "WIN31";
else if (thePlatform == "Win95") thePlatform = "WIN95";
else if (thePlatform == "WinNT") thePlatform = "WINNT";
// get registration server reference
/*
var theFolder = parent.parent.globals.getConfigFolder(self);
var theRegFile = parent.parent.globals.GetNameValuePair(theFile,"New Acct Mode","RegServer");
var theRegServer = "";
if (theRegFile == null || theRegFile == "") {
theRegFile = parent.parent.globals.document.vars.regServer.value;
}
if (theRegFile == null || theRegFile == "") {
alert("Internal problem determining the Registration Server.");
return;
}
theRegFile = theFolder + theRegFile;
*/
theRegServer = parent.parent.globals.GetNameValuePair(theRegFile,"IP","RegCGI");
if (theRegServer == null || theRegServer == "") {
alert("Internal problem determining the Registration Server.");
}
// build TAPI phone number
var theHomePhone="";
var thePhone="";
var theCountry="";
if (intlFlag == "yes") {
theHomePhone = parent.parent.globals.document.vars.phoneNumber.value;
thePhone = parent.parent.globals.document.vars.modemPhoneNumber.value;
theCountry = parent.parent.globals.document.vars.country.value;
}
else {
theHomePhone = "(" + parent.parent.globals.document.vars.areaCode.value + ") " + parent.parent.globals.document.vars.phoneNumber.value;
thePhone = "(" + parent.parent.globals.document.vars.modemAreaCode.value + ") " + parent.parent.globals.document.vars.modemPhoneNumber.value;
theCountry = "USA";
}
// mangle year and month for submission to registration server
var theYear = parseInt(parent.parent.globals.document.vars.year.value);
while (theYear >= 100) {
theYear -= 100;
}
if (theYear<10) {
theYear = "0" + theYear;
}
var theMonth = parseInt(parent.parent.globals.document.vars.month.value);
theMonth += 1;
// the following values are commented out as the values are set in HTML
/*
document.forms[0].RS_FORM_TYPE.value = "custinfo";
document.forms[0].REG_SETUP_NAME.value = "Account Setup";
document.forms[0].REG_SIGNUP_VERSION.value = "4.0";
document.forms[0].REG_SCRIPTING.value = "Yes";
document.forms[0].REG_SOURCE.value = "test";
document.forms[0].REG_CHANNEL.value = "";
*/
// fill out custinfo form elements, then submit
document.forms[0].REG_PLATFORM.value = thePlatform;
document.forms[0].AS_INTLMODE.value = intlFlag;
document.forms[0].CST_LAST_NAME.value = parent.parent.globals.document.vars.last.value;
document.forms[0].CST_FIRST_NAME.value = parent.parent.globals.document.vars.first.value;
document.forms[0].CST_ORGANIZATION_NAME.value = parent.parent.globals.document.vars.company.value;
document.forms[0].CST_STREET_1.value = parent.parent.globals.document.vars.address1.value;
document.forms[0].CST_STREET_2.value = parent.parent.globals.document.vars.address2.value;
document.forms[0].CST_STREET_3.value = parent.parent.globals.document.vars.address3.value;
document.forms[0].CST_CITY.value = parent.parent.globals.document.vars.city.value;
document.forms[0].CST_STATE_PROVINCE.value = parent.parent.globals.document.vars.state.value;
document.forms[0].CST_POSTAL_CODE.value = parent.parent.globals.document.vars.zip.value;
document.forms[0].CST_COUNTRY.value = theCountry;
document.forms[0].CST_PHONE.value = thePhone;
document.forms[0].CST_HOMEPHONE.value = theHomePhone;
document.forms[0].CST_CC_NO.value = parent.parent.globals.document.vars.cardnumber.value;
document.forms[0].CST_CC_TYPE.value = parent.parent.globals.document.vars.cardcode.value;
document.forms[0].CST_CC_MTH_EXPIRE.value = theMonth;
document.forms[0].CST_CC_YEAR_EXPIRE.value = theYear;
document.forms[0].CST_CC_CARDHOLDER.value = parent.parent.globals.document.vars.cardname.value;
document.forms[0].CST_JUNK_MAIL.value = ""; // XXX
document.forms[0].action=theRegServer;
// for win32 platforms make sure we don't get ISP's with scripting
if ((thePlatform == "WIN95") || (thePlatform == "WINNT")) {
document.forms[0].REG_SCRIPTING.value = "No";
}
// declare animation support for appropriate platform
if (thePlatform == "Macintosh") {
document.forms[0].AS_MAC_ANIMATION_SUPPORT.value = "YES";
document.forms[0].AS_WIN_ANIMATION_SUPPORT.value = "NO";
}
else {
document.forms[0].AS_MAC_ANIMATION_SUPPORT.value = "NO";
document.forms[0].AS_WIN_ANIMATION_SUPPORT.value = "YES";
}
// write out Milan data to Java Console
if (parent.parent.globals.document.vars.debugMode.value.toLowerCase() == "yes") {
parent.parent.globals.debug("\nRegServer (Milan) data: " + document.forms[0].action);
var numElements = document.forms[0].length;
for (var x=0; x<document.forms[0].length; x++) {
parent.parent.globals.debug(" " + x + ": " + document.forms[0].elements[x].name + "=" + document.forms[0].elements[x].value);
}
}
// submit Milan data
navigator.preference("security.warn_submit_insecure", false);
navigator.preference("security.warn_entering_secure", false);
navigator.preference("security.warn_leaving_secure", false);
parent.parent.globals.setRegisterMode(1);
document.forms[0].submit(); // automatically submit form to registration server
}
}
function saveData()
{
}
// end hiding contents from old browsers -->

View File

@@ -0,0 +1,106 @@
<!-- -*- Mode: HTML; tab-width: 8; indent-tabs-mode: nil -*-
The contents of this file are subject to the Netscape Public License
Version 1.0 (the "NPL"); you may not use this file except in
compliance with the NPL. You may obtain a copy of the NPL at
http://www.mozilla.org/NPL/
Software distributed under the NPL is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
for the specific language governing rights and limitations under the
NPL.
The Initial Developer of this code under the NPL is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998 Netscape Communications Corporation. All Rights
Reserved.
-->
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.0//EN">
<HTML>
<HEAD>
<TITLE>Account Setup</TITLE>
<SCRIPT LANGUAGE = "JavaScript" ARCHIVE="asw.jar" SRC="reg2stp.js">
</SCRIPT>
<LINK REL=STYLESHEET TYPE="text/JavaScript" ARCHIVE="asw.jar" HREF="sheet.js">
</LINK>
</HEAD>
<BODY BACKGROUND="images/bg.gif" BGCOLOR="cccccc" onLoad="loadData()" ID="reg2stp100">
<!-- The layer below contains the Account Setup identifier. -->
<LAYER NAME = "tagtext" LEFT = 420 TOP = 0 VISIBILITY = SHOW>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=200 ID="nospace">
<TR><TD HEIGHT=20 VALIGN=MIDDLE BACKGROUND="images/tag.gif">
<B CLASS="previewtag">ACCOUNT SETUP</B>
</TD></TR>
</TABLE>
</LAYER>
<!-- The layer below contains the headline and text of this screen -->
<FORM TARGET="_parent" METHOD="post">
<P CLASS="title"><B>Connecting to the Internet <BR>account server...</B></P>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH=500>
<TR>
<TD ALIGN=LEFT VALIGN=TOP>
<!-- The following values can be set by changing the VALUE item -->
<INPUT NAME="RS_FORM_TYPE" TYPE="hidden" VALUE="custinfo">
<INPUT NAME="REG_SETUP_NAME" TYPE="hidden" VALUE="Account Setup">
<INPUT NAME="REG_SIGNUP_VERSION" TYPE="hidden" VALUE="4.0">
<INPUT NAME="REG_SCRIPTING" TYPE="hidden" VALUE="Yes">
<INPUT NAME="REG_SOURCE" TYPE="hidden" VALUE="DUK4">
<INPUT NAME="REG_CHANNEL" TYPE="hidden" VALUE="">
<INPUT NAME="AS_LCK_SUPPORT" TYPE="hidden" VALUE="YES">
<INPUT NAME="AS_BOOKMARK_SUPPORT" TYPE="hidden" VALUE="YES">
<INPUT NAME="AS_MAC_ANIMATION_SUPPORT" TYPE="hidden" VALUE="NO">
<INPUT NAME="AS_WIN_ANIMATION_SUPPORT" TYPE="hidden" VALUE="NO">
<!-- The following values are set via JavaScript -->
<INPUT NAME="REG_PLATFORM" TYPE="hidden">
<INPUT NAME="AS_INTLMODE" TYPE="hidden">
<INPUT NAME="CST_LAST_NAME" TYPE="hidden">
<INPUT NAME="CST_FIRST_NAME" TYPE="hidden">
<INPUT NAME="CST_ORGANIZATION_NAME" TYPE="hidden">
<INPUT NAME="CST_STREET_1" TYPE="hidden">
<INPUT NAME="CST_STREET_2" TYPE="hidden">
<INPUT NAME="CST_STREET_3" TYPE="hidden">
<INPUT NAME="CST_CITY" TYPE="hidden">
<INPUT NAME="CST_STATE_PROVINCE" TYPE="hidden">
<INPUT NAME="CST_POSTAL_CODE" TYPE="hidden">
<INPUT NAME="CST_COUNTRY" TYPE="hidden">
<INPUT NAME="CST_PHONE" TYPE="hidden">
<INPUT NAME="CST_HOMEPHONE" TYPE="hidden">
<INPUT NAME="CST_CC_NO" TYPE="hidden">
<INPUT NAME="CST_CC_TYPE" TYPE="hidden">
<INPUT NAME="CST_CC_MTH_EXPIRE" TYPE="hidden">
<INPUT NAME="CST_CC_YEAR_EXPIRE" TYPE="hidden">
<INPUT NAME="CST_CC_CARDHOLDER" TYPE="hidden">
<INPUT NAME="CST_JUNK_MAIL" TYPE="hidden">
</TD>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>

View File

@@ -0,0 +1,287 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
<!-- to hide script contents from old browsers
var globals = parent.parent.globals;
var plugin = globals.document.setupPlugin;
var documentVars = globals.document.vars;
function go( msg )
{
if ( parent.parent.globals.document.vars.editMode.value == "yes" )
return true;
else
return checkData();
}
function checkData()
{
return true;
}
function loadData()
{
netscape.security.PrivilegeManager.enablePrivilege( "AccountSetup" );
if ( parent.controls.generateControls )
parent.controls.generateControls();
if ( globals.document.vars.editMode.value != "yes" )
{ // only connect to reggie if editmode is off
var connectStatusFlag = globals.document.setupPlugin.IsDialerConnected();
if ( connectStatusFlag == true )
{
if ( confirm( "Account Setup can't connect until you close your current connection. Close the connection now?" ) == false )
return;
globals.document.setupPlugin.DialerHangup();
}
var acctSetupFile = globals.getAcctSetupFilename( self );
var regFile = globals.getFolder( self ) + "isp/en/" + globals.selectedISP + "/client_data/config/config.ias.r";
// determine name of scripting file
var scriptEnabledFlag = "FALSE";
var scriptFile = globals.GetNameValuePair( regFile, "Dial-In Configuration", "ScriptFileName" );
if ( scriptFile != null && scriptFile != "" )
{
scriptFile = acctSetupFolder + scriptFile;
scriptEnabledFlag = "TRUE";
}
else
{
scriptFile = "";
scriptEnabledFlag = "FALSE";
}
// determine tty
var ttyFlag = globals.GetNameValuePair( regFile, "Security", "SecurityDevice" );
ttyFlag = ttyFlag.toLowerCase();
if ( ttyFlag == "yes" )
ttyFlag = "TRUE";
else
ttyFlag = "FALSE";
// determine outside line access string
var outsideLineAccessStr = "";
if ( globals.document.vars.prefixData.value != "" )
{
outsideLineAccessStr = parent.parent.globals.document.vars.prefixData.value;
x = outsideLineAccessStr.indexOf( "," );
if ( x < 0 )
outsideLineAccessStr = outsideLineAccessStr + ",";
}
// configure dialer for Registration Server
dialerData = globals.document.setupPlugin.newStringArray( 28 ); // increment this # as new dialer strings are added
dialerData[0] = "FileName=" + regFile;
dialerData[1] = "AccountName=" + globals.GetNameValuePair( regFile, "Dial-In Configuration", "SiteName" );
dialerData[2] = "ISPPhoneNum=" + globals.GetNameValuePair( regFile, "Dial-In Configuration", "Phone" );
dialerData[3] = "LoginName=" + globals.GetNameValuePair( regFile, "Dial-In Configuration", "Name" );
dialerData[4] = "Password=" + globals.GetNameValuePair( regFile, "Dial-In Configuration", "Password" );
dialerData[5] = "DNSAddress=" + globals.GetNameValuePair( regFile, "IP", "DNSAddress" );
dialerData[6] = "DNSAddress2=" + globals.GetNameValuePair( regFile, "IP", "DNSAddress2" );
dialerData[7] = "DomainName=" + globals.GetNameValuePair( regFile, "IP", "DomainName" );
dialerData[8] = "IPAddress=" + globals.GetNameValuePair( regFile, "IP", "IPAddress" );
dialerData[9] = "IntlMode=" + ( ( intlFlag=="yes" ) ? "TRUE" : "FALSE" );
dialerData[10] = "DialOnDemand=TRUE";
dialerData[11] = "ModemName=" + globals.document.vars.modem.value;
dialerData[12] = "ModemType=" + globals.document.setupPlugin.GetModemType( parent.parent.globals.document.vars.modem.value );
dialerData[13] = "DialType=" + globals.document.vars.dialMethod.value;
dialerData[14] = "OutsideLineAccess=" + outsideLineAccessStr;
dialerData[15] = "DisableCallWaiting=" + ( ( globals.document.vars.cwData.value != "" ) ? "TRUE" : "FALSE" );
dialerData[16] = "DisableCallWaitingCode=" + globals.document.vars.cwData.value;
dialerData[17] = "UserAreaCode=" + globals.document.vars.modemAreaCode.value; // XXX what to do if international mode?
dialerData[18] = "CountryCode=" + globals.document.vars.countryCode.value;
dialerData[19] = "LongDistanceAccess=1"; // XXX
dialerData[20] = "DialAsLongDistance=TRUE"; // XXX
dialerData[21] = "DialAreaCode=TRUE"; // XXX
dialerData[22] = "ScriptEnabled=" + scriptEnabledFlag;
dialerData[23] = "ScriptFileName=" + scriptFile;
dialerData[24] = "NeedsTTYWindow=" + ttyFlag;
dialerData[25] = "Location=Home";
dialerData[26] = "DisconnectTime=" + globals.GetNameValuePair( acctSetupFile, "Mode Selection", "Dialer_Disconnect_After" );
dialerData[27] = "Path=Server";
// write out dialer data to Java Console
if ( globals.document.vars.debugMode.value.toLowerCase() == "yes" )
{
globals.debug( "\nDialer data (for Registration Server): " );
var numElements = dialerData.length;
for ( var x = 0; x < numElements; x++ )
globals.debug( " " + x + ": " + dialerData[ x ] );
}
globals.document.setupPlugin.DialerConfig( dialerData, true );
// check if we need to reboot
if ( globals.document.setupPlugin.NeedReboot() == true )
{
globals.forceReboot( "2step.htm" ); // XXX hardcode in name of next screen???
return;
}
if ( globals.document.setupPlugin.DialerConnect() == false )
{
globals.document.setupPlugin.DialerHangup();
window.location.replace( "error.htm" ); // XXX hardcode in name of next screen???
return;
}
// get platform (XXX Macintosh should not be uppercased?)
platform = globals.getPlatform();
if ( platform == "Win16" )
platform = "WIN31";
else if ( platform == "Win95" )
platform = "WIN95";
else if ( platform == "WinNT" )
platform = "WINNT";
// get registration server reference
/*
var theFolder = parent.parent.globals.getConfigFolder(self);
var theRegFile = parent.parent.globals.GetNameValuePair(theFile,"New Acct Mode","RegServer");
var theRegServer = "";
if (theRegFile == null || theRegFile == "") {
theRegFile = parent.parent.globals.document.vars.regServer.value;
}
if (theRegFile == null || theRegFile == "") {
alert("Internal problem determining the Registration Server.");
return;
}
theRegFile = theFolder + theRegFile;
*/
regServer = globals.GetNameValuePair( regFile, "IP", "RegCGI" );
if ( regServer == null || regServer == "" )
{
alert( "Internal problem determining the Registration Server." );
return;
}
// build TAPI phone number
var theHomePhone="";
var thePhone="";
var theCountry="";
var intlFlag = parent.parent.globals.GetNameValuePair( acctSetupFile, "Mode Selection", "IntlMode" );
intlFlag = intlFlag.toLowerCase();
if ( intlFlag == "yes" )
{
theHomePhone = globals.document.vars.phoneNumber.value;
thePhone = globals.document.vars.modemPhoneNumber.value;
theCountry = globals.document.vars.country.value;
}
else
{
theHomePhone = "(" + globals.document.vars.areaCode.value + ") " + globals.document.vars.phoneNumber.value;
thePhone = "(" + globals.document.vars.modemAreaCode.value + ") " + globals.document.vars.modemPhoneNumber.value;
theCountry = "USA";
}
// mangle year and month for submission to registration server
var year = parseInt( globals.document.vars.year.value );
while ( year >= 100 )
year -= 100;
if ( year < 10 )
yeahr = "0" + year;
var month = parseInt( globals.document.vars.month.value );
month += 1;
// the following values are commented out as the values are set in HTML
/*
document.forms[0].RS_FORM_TYPE.value = "custinfo";
document.forms[0].REG_SETUP_NAME.value = "Account Setup";
document.forms[0].REG_SIGNUP_VERSION.value = "4.0";
document.forms[0].REG_SCRIPTING.value = "Yes";
document.forms[0].REG_SOURCE.value = "test";
document.forms[0].REG_CHANNEL.value = "";
*/
// fill out custinfo form elements, then submit
document.forms[0].REG_PLATFORM.value = platform;
document.forms[0].AS_INTLMODE.value = intlFlag;
document.forms[0].CST_LAST_NAME.value = globals.document.vars.last.value;
document.forms[0].CST_FIRST_NAME.value = globals.document.vars.first.value;
document.forms[0].CST_ORGANIZATION_NAME.value = globals.document.vars.company.value;
document.forms[0].CST_STREET_1.value = globals.document.vars.address1.value;
document.forms[0].CST_STREET_2.value = globals.document.vars.address2.value;
document.forms[0].CST_STREET_3.value = globals.document.vars.address3.value;
document.forms[0].CST_CITY.value = globals.document.vars.city.value;
document.forms[0].CST_STATE_PROVINCE.value = globals.document.vars.state.value;
document.forms[0].CST_POSTAL_CODE.value = globals.document.vars.zip.value;
document.forms[0].CST_COUNTRY.value = theCountry;
document.forms[0].CST_PHONE.value = thePhone;
document.forms[0].CST_HOMEPHONE.value = theHomePhone;
document.forms[0].CST_CC_NO.value = globals.document.vars.cardnumber.value;
document.forms[0].CST_CC_TYPE.value = globals.document.vars.cardcode.value;
document.forms[0].CST_CC_MTH_EXPIRE.value = month;
document.forms[0].CST_CC_YEAR_EXPIRE.value = year;
document.forms[0].CST_CC_CARDHOLDER.value = globals.document.vars.cardname.value;
document.forms[0].CST_JUNK_MAIL.value = ""; // XXX
document.forms[0].action = regServer;
// for win32 platforms make sure we don't get ISP's with scripting
if ( ( platform == "WIN95" ) || ( platform == "WINNT" ) )
document.forms[0].REG_SCRIPTING.value = "No";
// declare animation support for appropriate platform
if ( platform == "Macintosh" )
{
document.forms[0].AS_MAC_ANIMATION_SUPPORT.value = "YES";
document.forms[0].AS_WIN_ANIMATION_SUPPORT.value = "NO";
}
else
{
document.forms[0].AS_MAC_ANIMATION_SUPPORT.value = "NO";
document.forms[0].AS_WIN_ANIMATION_SUPPORT.value = "YES";
}
// write out Milan data to Java Console
if ( globals.document.vars.debugMode.value.toLowerCase() == "yes" )
{
globals.debug( "\nRegServer (Milan) data: " + document.forms[ 0 ].action );
var numElements = document.forms[ 0 ].length;
for ( var x = 0; x < document.forms[ 0 ].length; x++ )
globals.debug( " " + x + ": " + document.forms[ 0 ].elements[ x ].name + "=" + document.forms[ 0 ].elements[ x ].value );
}
// submit Milan data
navigator.preference( "security.warn_submit_insecure", false );
navigator.preference( "security.warn_entering_secure", false );
navigator.preference( "security.warn_leaving_secure", false );
parent.parent.globals.setRegisterMode( 1 );
document.forms[ 0 ].submit(); // automatically submit form to registration server
}
}
function saveData()
{
}
// end hiding contents from old browsers -->