Internet Setup

       

Servers

It may be convenient to retain details for several 'Servers'. e.g. One Server may be the public Internet Server, another may be a local Server used for testing, and a third might be the local Server again but used for experimentation.

To create a new Server, type a name for it into the Server: box, and click anywhere outside the box.
A pop-up window will ask if a new Server is to be created.
- If so, the new Server will have the same attributes as the Server that was being displayed previously, except for the name.

To rotate around the Servers, click on the >>Next>> button.
To delete a Server, display it and then click on Delete This Server.

Active Server

One (and only one) of the Servers should be set as the Active Server. This is the one that will be used to create the Internet files by the Effect All button in the ENTMV Updates help screen.
The Effect All process will NOT download the files to the Internet Server, or to the Alternative Directory. That can only be done via the Internet Setup screen.

If a new Active Server is set, the Create Source Variants button should be pressed before any files are uploaded to the Server.
This will create a new version of the file sBinPath.j (among others). This file is included in each of the HTML files that send messages via the Internet, and defines the URL to be used be the GET statement that sends the message.

For Terminals that go through the Logon process (i.e. Agency Terminals), the Server may be changed from the Active Server to one of the others,
in the Terminal Parameters screen.
- During the logon, a new sBinPath.j path is generated.

The current Servers are:
Name Svr (Copy entmv/... to:) SvrToCgi (...CGI) Url (URL of entmv folder) UrlToCgi (...CGI)
C10 IIS Intranet \\C10\f\InetPub\wwwroot\ cgi-bin\ http://C10/ cgi/
C20 Apache Internet \\C20\c\util\Apache Group\Apache2\htdocs\ ..\cgi-bin\ http://www.tubbes.dyndns.org/ cgi/
C20 Apache Intranet \\C20\c\util\Apache Group\Apache2\htdocs\ ..\cgi-bin\ http://C20/ cgi/
Demon ISP (ftp) (inaccessible) http://www.chelys.demon.co.uk/
Virgin Media ISP (ftp) (inaccessible) http://homepage.ntlworld.com/michael.mcclellan/
C20 DOS
C15 Centre

Languages

Several files have a separate version for each language supported.
By convention, the file names start with an upper case letter designating the language, currently (may05) F for French, E for English, and S for Spanish.
These files may be generated in the following ways:

a) By having a source document which contains the text for each language.
The texts are prefixed by two characters: a tilde (~) and a lower case letter designating the language. e.g. ~f for French.
Each text string is terminated by another tilde, followed by either another lower case letter for another language (and followed by the text in that language), or by a second tilde if all the languages have been done.
e.g. ~FOui~EYes~SSí~~
The tilde character is assumed not to be used for any other purpose in the source file.
The various language versions are generated one at a time by calling the XFile OCX function genLangs.
This program copies the source file to the destination until a tilde is reached. If the next character is the one for the current language, the following string is retained. Otherwise the string is deleted up to the next tilde, and so on until the double tilde is reached.
The source is then copied to the detination as before, until another tilde is sencountered.

The calls to genLangs are in what is essentially a JavaScript batch file, started by clicking on the Create Source Variants button in InternetSetup.html, or run as part of the global file generation from the Effect All button in UpdatesHelp.html.
The batch sequence also calls the XFile OCX function stripComments before doing the language filtering.

b) By using XML files containing the text for each language.
The XML files are generated from setup screens, such as AllTypes.html.
The screens usually have a combo box to select the language. The combo box is populated from Languages.xml, which is created by Languages.html.
The Effect function scans the XML file for each language in turn, and generates the various files.

Timeout for Server response

Attempts to send msg to server

Agency

Agency number for Internet customers who are not part of an Agency.
The following two items are grabbed from the Agency record when Create Source Variants is clicked:
Tax for Nationals / Alien Residents - whether to charge tax if the purchaser is an Algerian national, or an alien resident in Algeria.
Stamp Id - each devise has a table of Stamp Ids, and the corresponding value. See Tarifs: Stamp.
and used to create statements (amongst others) setting those values in the file sBinPath.j, which is used by remote Terminals which use the Internet but do not go through the logon process.

Debug Level

Sets the amount of embedded debug code in the generated .html and .js files.
Level 0 removes all debug code, and level 9 includes the maximum amount. Levels 5 and above may insert buttons etc which will be visible to the user.
Levels 8 and above may insert alert or confirm statements.

These levels cause the source code to be changed by "../Agency/ISetGenLangs.js" genDebug, which removes or makes usable sections of code (usually a line of code at a time) which start with e.g. ¶7 and end with ¶¶
(where 7 is the debug level).

These debug levels are therefore completely different and separate from the debug/pause levels set by Batch/DebugLevel.html, which do not change any source code, and can be increased or decreased while the software is running.

Currently (mar08) there are the following ¶ ... ¶¶ sections:
Src File function Level Description
"../Term.html" 6 Controls to set virtual date
"../Agency/DynamicJs.js" HtmlError 8 confirm: debugger after script download error
"../Agency/RspUtils.js" chkRsp 4 confirm: debugger after comms failure
"../Agency/TimeTable/TimeTable.html" dspDebug 8 display timetable state; several calls.
Debugger 5 buttons to run debugger, display sDebug, genURL.
"../Agency/ZoneTable/SelectZVoyage.js" rspOneDay 8 call to dspDebug
"../Agency/ZoneTable/ChangeEfGnGs.html" dspDebug 8 dummy function
Debugger 5 buttons to run debugger, display sDebug, evaluate expression.
"../Agency/ZoneTable/NoCheckIn.html" dspDebug 8 dummy function
Debugger 5 buttons to run debugger, display sDebug, genURL.
"../Agency/ZoneTable/VReport.html" Debugger 5 buttons to run debugger, display sDebug, genURL.
"../Agency/Term/Logon.html" updateStats5 message stats, trace messages
"../Agency/Term/TermMenu.html" 6 Controls to set virtual date
8 message stats, trace messages, DosBox status
"../Agency/Pgrs/Pgrs.html" 5 buttons to run debugger, genURL.
"../Centre/Tarifs/effectTarifs.html" 7 alert: time to create tarif functions
8 alert: statistics of creating tarif functions


Create Source Variants

Generates HTML pages and JavaScript include files for each language. See Languages above.
Also creates versions of the HTML files which will run on an Agency Terminal with direct connection to the Reservations Centre.
For a list of the files created by this action, see Source Variants.

The generated files are the same regardless of which Internet Server is selected.

Path to Server HTML directory

This is the path used to load the HTML, JavaScript, and image files onto the Internet Server.
It may be the default Internet directory, where the site Home page (e.g. index.html or default.html) usually resides,
e.g. \\ServerComputerName\c\util\Apache Group\Apache2\htdocs\ or \\ServerComputerName\c\InetPub\wwwroot\
or a subdirectory of this (e.g. \\ServerComputerName\c\InetPub\wwwroot\Reservations\).

If a subdirectory is used, then the subdirectory path will usually appear in the Internet URL (unless an alias is set up by the Internet Server Manager). e.g.
www.algerieferries.com/Reservations/Agency/Route/FRoute.htm
and in the URL Stem which is used for testing over the LAN.

The slashes in the path may be all forward slashes (/) or all backslashes (\) or a mixture.
In most of the later fields, only forward slashes will work.

Path to Internet Server binaries

It is normal for the executable files on an Internet site to be kept in a separate directory. This allows easier control over which files are allowed to execute.
The directory name itself is usually cgi-bin, though this is only a convention, and any name could be used.

The Apache server by default creates cgi-bin at the same level as the home HTML directory htdocs. The relative path is therefore ../cgi-bin/.

Microsoft IIS seems not to create a default cgi-bin, and may also place restrictions on the user accessing directories at a higher level than the home page (i.e. using ../ in the URL).
For IIS, it may therefore be best to have cgi-bin as a subdirectory of the home page (e.g. at InetPub\wwwroot\cgi-bin), and the relative path is then cgi-bin/.

URL

The URL is either the Intranet Address or the Internet Address of the Server HTML Directory.
The Intranet Address is the LAN id of the Server PC (e.g. http://ServerComputerName/).
This obviously is only useful if this PC and the Internet Server are on the same network.

The Internet Address is the public address of the Server (e.g. http://www.algerieferries.com/).
This is only relevant if the PC is connected to the Internet.

Either of these may be appended by a subdirectory path if the Reservations files are not on the Home directory.

From URL stem to to (SxqServe).exe

Note that this is not necessarily the same as the Path to Internet Server binaries above, which is used to load SxqServe.exe onto the Server.
- The Internet Servers each have their own set of rules on how to locate the various folders.
Apache uses configuration file e.g. C:/util/Apache Group/Apache2/conf/httpd.conf which contains e.g.
DocumentRoot "C:/util/Apache Group/Apache2/htdocs
...
ScriptAlias /cgi-bin/ "C:/util/Apache Group/Apache2/cgi-bin

Used in GET call from Internet client to Centre via SxqServe.exe,
but note that cgi-bin must still be included in the URL parameter. e.g.:
http://tubbes.dyndns.org/cgi-bin/SxqServe.exe?F5...

- the response is obtained via the responseText method of the XMLHTTP object the GET was sent from.

The SxqServe.exe program gets the input data from the environment variable QUERY_STRING and sends the response to the standard output. The version at the Centre can be called directly via a DOS box.

Get Any File from Server

Uses the URL Stem entered above to download the named (path and) file.
The XMLHttpRequest object is used with GET to access the file on the site.
The file text is displayed in the text area above.

Colours and Fonts

Colours for timetables, etc, are defined in AStyle.css, which is generated as part of the Internet Setup Effect function.

Class Description Used in:
lux Lux Cabins Timetable: disponibilites.
Psgrs: Class selection.
cabA Cabins class A
cabB Cabins class B
cabC Cabins class C
ecoS Superior Couchettes
ecoN Normal Couchettes
efa Seats
veh Vehicles
VTyp Vehicle Types Psgrs: Veh selection.
Tarifs screen.
VTyX Vehicle Type Groups
VTypS Veh Types selected Vehicle Reductions.
VTyXS Veh Groups selected
Redn Reduction Psgrs: Reduction selection.
Tarifs screen.
Redx Reduction Groups
cGlow Mouse over 'button' Psgrs: Day of birth.
cDull Normal 'button'
cNorm Passenger & vehs Pgrs
cB Month before/after Route: calendar
cR Current year and month
Sail Selected voyage Timetable, Pgrs
STbl Timetable entry Timetable
BOff Button in Off state Timetable
BSet Button in On state Timetable

'Foreground' is the lines of the characters of the text itself. 'Background' is the area apart from this. Both of these may be set at the same time.

Font Size is normally specified as small, medium, large, or in pixels (e.g. 14px), but there are several other possibilities.
- See msdn: font-size Attribute | fontSize Property, and CSS Length Units Reference.
Note that a number on its own is taken as having px appended, but this is not valid in the strictest standards compliance mode.
For voyage timtables, a font size of 12px
Font Weight may be: lighter, normal, bold, bolder.
Numbers 100 (lightest), 200, ... 900 (heaviest) may also be used.
- See msdn: font-weight Attribute | fontWeight Property.

General is for additional styling. e.g. font-family:'Courier';
- See msdn: font-family Attribute | fontFamily Property.

When any of the above attributes are set, they are applied to the cells in the table (except that the 'Suggested Colours' columns retain their original colours).

Colour Adjuster

The Colour Adjuster is a free standing control that just displays a colour. Patch or type in a 6-character colour code, and use the various up or down coloured arrows to adjust the hue. Then copy the final code and paste it where needed.