Astromart for internet

Introduction

The AstroMart for Internet package is composed of three parts:
1.Databases on a server, which use Firebird (see http://www.firebirdsql.org/) . This part cannot be accessed directly from the internet.
2.Compiled programs and their configuration files in the install directory of the site (astro). The directory of the programs is not visible from internet, and is accessed by php scripts.
3.Html template files in the astro/forms directory. The programs read these files and replace special tags <# > with output.

Files

astro : executable of the software
graphic : on-the-fly graphics
astro.cfg, planets4.cfg : configuration files for all the programs
serif.ttf, sans.ttf : true type fonts for the graphics
lang/en.txt, de.txt, ... : language files
The programs can be called from the command line by adding the same parameters as the url:
   $ astro "page=natal&index=5"
This is used to include the program in a php script using the exec instruction.

Page

Birth chart http://astro-software.com/astro/index.php?page=natal
Previsions http://www.new-astrology.com/index.php?page=prev&index=1
and all the other links on http://www.new-astrology.com You can add on several parameters such as
lang=en or fr, de, etc
dformat=0 (USA) 1 (Europe)
user : local user name for logging into the databases, etc.
ssi=true suppresses the html headers
database, table : local database and table for analysis texts
userid : member userid in the chart database
index : index in the chart database
recalc : recalculate the member data
zone time zone for the "now" service
incdate now+1
planet : only for the 'planetinfo" service

The following parameters are usually supplied by <#input > or <#hidden > tags
name, firstname, sex, birthplace, country, state, city, citylist, adjust, lt, lat, lg, long date, date2,date1x,date2x, time, time2, hour, hour2, d1year, d2year, d1month, d2month, d1day, d2day, d1hour, d2hour, d1min, d2min nohouses

The program "graphic" is usually called by "astro" in the <#image> tags.
The font files serif.ttf, sans.ttf are used by "graphic". You can copy other fonts to the same name to change the display.

The language files correspond to the parameter "lang", i.e. if you specify lang=it, then the programs use "it.txt" (Italian).

Template files

You can also specify a template file other than the default. If the function name exceeds the minimal name for calling the command, then the program tries to open a html file set (display file and dialog file starting with "d"). The minimal command names are "natal, comp2, comp2f, compd, compdf, page, prev, trans, now". Thus "compdf001" will try to open the pair of files "compf001.html" for display and "dcompf001.html" for dialog.

Note the command "page". It loads a page assuming that all data is correct. You can use it with the <#link > tag to spread the output over several pages, ie
<#link href="http://www.new-astrology.com/index.php?page=graph01&index=1" value="Graphic">

astro.cfg

This file lets you set default options for the programs, you do not need to edit it unless you want to change a parameter. All settings have default values that work well in most cases. For example

;This is a comment

[global]        ; Global options
user=frank      ;
;host=localhost  ;
password=    ; Needed to connect to your database
database=    ;  If you have installed a different database
chartdb= ; user charts
language=   ; Default language: en, fr, etc.
dformat=1
timezone=-3
showsymbol=true ; abbreviation or glyphs
showdegree=false ; show degrees next to the glyph
transparent=false ; background is transparent or opaque
startgraphic=1 ; 0 (Aries) or 1 (Ascendant)

[comp2f]   ; Options for fast love compare
database=    ;  To override global if you have installed a different database

[compdf]   ; Options for fast transits
;user=bill      ;  commented out

[prev]   ; Options for previsions
The options in the [global] section apply but can be overridden by setting new options in a sub-section. "user", "host" and "password" are used to access your database ("astro" for the basic data and "analysis" by default for the interpretation texts).
"database" specifies a database other than "analysis" for the interpretation texts.
"language" sets the default language, for example "language=fr" will cause everything to be displayed in French unless the parameter "lang" is passed to the programs.
"dformat" is the default format for dates: 0 = mm/dd/yyyy, 1 = dd/mm/yyyy, 2 = yyyy/mm/dd
timezone is the default time zone used by certain functions (now).

planet4.cfg

This file contains the configuration for each planet.

Template files

Setting up the input html pages

These files are stored in the directory "astro/forms", they are used by default and must be supplied as the programs uses them in case of error.
These files are used by default and must be supplied as the programs uses them in case of error. The files with "d" prefixed are used for the dialog, the other is used for output

ddefault.html, default.html are displayed in case of error such as bad or missing function or a user trying to tweak the program.
dnatal.html is for the birth chart
dcompdf.html is for the fast horoscope
dcomp2f.html is for love charts
dprev.html is for previsions

The following tags are used in input pages.

The program converts these tags to <input> tags or to selection lists. All tags are in the format "name=xxx value=xxx" where value depends on the tag's function.

<#input name=langmenu>
This inserts a list for selecting the language. This tag is not used by the calculations and can be omitted if the language is English or if it is specified in "/cgi‑bin/astro.cfg".

<#input name=date>
<#input name=date2>
<#input name=dformat>
These insert edit tags for entering the dates for the birth chart and the second chart if relevant. They use the date format selected by dformat.

<#input name=date1X>
<#input name=date2X>
<#input name=d1year>
<#input name=d1month>
<#input name=d1day>
<#input name=d2year>
<#input name=d2month>
<#input name=d2day>
These insert lists for entering the dates for the birth chart and the second chart if relevant.

<#input name=time>
<#input name=time2>
These insert edit tags for entering the times for the birth chart and the second chart if relevant.
<#input name=d1hour>
<#input name=d1min>
<#input name=d2hour>
<#input name=d2min>
These insert lists for entering the times for the birth chart and the second chart if relevant.

<#input name=adjust>
This inserts an edit tag for entering the time zone. It is shown only if the program cannot find the time zone automatically. It must be present in the natal dialog, if not the program will block if it cannot determine the time zone.

<#input name=name>
<#input name=firstname>
These tags insert edit tags for entering the name and first name. The name is displayed in the graphics but these tags are not used for the calculations and may be omitted.

<#input name=sex>
This tag inserts a list for selecting the sex. The sex is used in the analysis texts. This tag can be omitted in many cases.

<#input name=nohouses>
This tag inserts a check box for ignoring the time of birth (setting it to 12:00) and houses.

<#input name=housetype>
Sets the house system, 0=Placidus

<#input name=city>
This inserts an edit tag for entering the first letters of the city.

<#input name=citylist>
This inserts an edit tag for list for selecting the city. It is called by the "city" tag and should not be used directly.

<#hidden name=..>
This sends a hidden parameter with the form. This parameter is one of the input parameters. Example <#hidden name=lang> forwards the value of the language parameter, i.e. it adds "lang=.." to the form call.

<#text value=xxx>
This inserts the line number xxx from the current language file, i.e. en.txt, de.txt, fr.txt, etc.

<#include virtual="file location">
This tag includes the contents of the given file in the document. The file location is relative to the document root and should be absolute, i.e. starting with "/".
Example: <#include virtual="/banner/_en_small_1.html"> to include a banner.

Setting up the output html pages

These files are stored in the directory "astro/forms", they are used by default and must be supplied as the programs uses them in case of error.

compd.html is for the horoscope
compdf.html is for the fast horoscope
comp2.html is for love charts
comp2f.html is for love charts
default.html is displayed in case of error such as bad or missing function or a user trying to tweak the program
moonret.html is for moon return
natal.html is for the birth chart
now.html is for the "now" function
page.html
planetinfo.html
prev.html is for previsions
prog.html is for progression
trans.html is for transits

You can add your own sets of template files such as natal01.html,natal02.html, etc. These files are used when you choose a the coresponding template in the "Display" menu.

The following tags are used in output pages. Any additional parameters in the tags are passed through.

<#link href="url" value="Text">

This inserts an anchor with all available parameters appended, additional parameters can be added directly to the url.
Example: <#link href="http://www.new-astrology.com/graphic.php?type=01&index=1&x=1600&y=1600" value="Click to enlarge graphic">

<#text value=xxx>

This inserts the line number xxx from the current language, see "Utilities/National and Language.

<#header>

This inserts the normal header information.
<#header type=short>
<#header type=long>
<#header type=list>

<#image>

<#image type="daisy14" showsymbol="true" showdegree="false" transparent="false" startgraphic="1">

This inserts the graphic specified in the type parameter, possible values are
01 = Daisy01
02 = Daisy02
03 = Daisy03
04 = Daisy04
11 = Daisy11
12 = Daisy12
13 = Daisy13
14 = Daisy14
21 = Daisy21
22 = Daisy22
23 = Daisy23
24 = Daisy24
31 = Two1
32 = Two2
33 = SidebySide1
34 = SidebySide2
41 = Linegraph
42 = Prevision
51 = AspectsGraph
52 = DataGrid
61 = TransitAll
62 = TransitOne
71 = MoonGraph

daisy01, daisy02, daisy03, daisy04
daisy11, daisy12, daisy13, daisy14
daisy21, daisy22, daisy23, daisy24
prev
two1, two2, two3, two4

The width parameter specifies the actual width in pixels of the graphic. You can add all the other parameters for a normaltag, but if the height parameter is different from the corresponding width, the graphic will be distorted.
showsymbol set to false, the graphic displays abbreviation in the current language instead of glyphs.
showdegree set to true, displays the position of the point in degrees next to the glyph or text.
transparent changes how the background is displayed, when true the background is transparent, thus the same as the underlying page.
startgraphic can be 0 (Aries) or 1 (Ascendant)
Example : <#image type="daisy14" width="750">

<#table>

This tag inserts a table. You can use all the parameters for a normal <TABLE> tag. If the type is absent, then the first three types are inserted, otherwise it can be one of the following. The variant with "new" shows an enhanced version.
<#table type=planets> inserts the positions of the planets and houses.
<#table type=planetsnew> inserts the positions of the planets and houses.
<#table type=planetsext> inserts the position of the additional asteroids and points.
<#table type=planetsextnew> inserts the position of the additional asteroids and points.
<#table type=planethouse> inserts the position of the planets in the houses.
<#table type=planethousenew> inserts the position of the planets in the houses.
<#table type=houses> inserts the position of the houses.
<#table type=housesnew> inserts the position of the houses.
<#table type=signtypes> inserts the table of sign types (earth, fire, etc.).
<#table type=signtypesnew> inserts the table of sign types (earth, fire, etc.).
<#table type=list> inserts a full list of planets with positions, etc.
<#table type=listnew> inserts a full list of planets with positions, etc.
<#table type=aspects> inserts a table of aspects.
<#table type=aspectsnew> inserts a table of aspects.
<#table type=values> inserts a table of values.
<#table href=path> provides the base url for tables that produce links, currently only "prev".
Example: <#table type="planets" border="3" cellpadding="5" width="500">

<#analysis>

This inserts the interpretation.
<#analysis sort=planet> displays the texts sorted by planet.
<#analysis threshold=100> or <#analysis sort=planet threshold=100> display only the aspects having a worth of more than threshold. For the normal sorting order, the first aspect less than threshold is displayed. This elimates lesser aspects that might confuse the visitor.
<#analysis planet=x> displays only the texts concerning planet=x (houses are numbered 13 to 24).

<#planet number=1> This displays information about a planet in the format "Sun in Aries 24.03". Number can range from 1 to 24 where 13..24 represent houses 1 to 12.
The full format is :
<#planet number=1 lable=true degree=true decimals=2 label=false > removes "Sun in"; degree=false removes "24.03"; decimals=0 displays "24" instead of "24.03"

<#transits period=2 planets=5,6,7,8,9>

<#compareday>

<#data>

<#data type=all> display raw data as a comma separated list, very useful in php scripts
<#data type=name>
<#data type=firstname>
<#data type=reference>
<#data type=birthplace>
<#data type=birthdate>
<#data type=birthtime>
<#data type=pl1>

<#include virtual="file location">

This tag includes the contents of the given file in the document. The file location is relative to the document root and should be absolute, i.e. starting with "/".
Example: <#include virtual="/banner/_en_small_1.html"> to include a banner.

<#options housetype=2 houseorb=0 housecentered=true zodiac=1>

housecentered : houses are centered on cusps
housetype : 1=Placidus, 2=Campanus, 3=Montroyal, 4=Equal, 5=Koch, 6=Meridian, 7=Morinus, 8=Porphyry, 9=Topocentric, 255= no houses
houseorb : point is in the house when the in the orb before the house cusp
aspecttypes : 1=major, 2=minor, 3=both
zodiac 0=tropical, >0 = sideral
dformat : 0=mm/dd/yyyy, 1=dd/mm/yyyy, 2=yyyy/mm/dd
timezone : +5 for New York, -2 for Paris
database : default database
dbanatable : database for analysis
dbcharts : database for charts
dbuser : login user for database
dbhost : host for database (localhost)
dbpassword : login password
birthplace, country, long, lat : default values for charts and graphics

You can have several options tags on a page, each is valid until the next is read.