# --------------------------------------------------------------------------
# Contacts.rc - Config-File for the Contact-Database
# --------------------------------------------------------------------------


# Here everything is defined, what has to do with the Database-Table
[Data]
Table     = contacts
Order     = company
UpdFields = title, sex, first_name, last_name, company, conttyp1, contadr1, conttyp2, contadr2, conttyp3, contadr3, conttyp4, contadr4, conttyp5, contadr5, comments, state, last_change
QryFields = id_contact, first_name, last_name, company, conttyp1, contadr1, conttyp2, contadr2, comments
PDFFields = id_contact, first_name, last_name, company, conttyp1, contadr1, conttyp2, contadr2, comments

IdField   = id_contact

# End of Data-Section

[Cache]
Timeout         = 0

[Browser]
MaxRows = 15

[Qry]
BgColor2     = #fefefe
NrOfColLine  = 5
SelType      = Link
BorderWidth  = 0

[Header]
Title = Contact-database

[GUI]

[State All]
BtnCancel  = Back.png


[State Init]
Header = "Search / Create"
BtnNew = Create.png
BtnQry = Search.png

[State Work]
BtnUpd = Save.png
BtnDel = Delete.png
Header = "Work with ..."

[State Qry]
Header = "Select data"
BtnDownloadPdb = "Generate Palm-PDA-data"
BtnReport = Report.png

[Layout Table]
Border      = 0
; The following entries are for documantation-purposes
; BgColor        = red
; Background     = Images/WWWdb_bg_blue

[Layout Qry _link]
Text = ""
Type = Ref
Value = "[ ]"
Align = Right

[Layout Label pers_angaben]
Text        = Data of the person
Pos         = +1.0+3.0
Font        = color=blue
Bold        = Ja
Big         = Ja
Align       = Center
BgColor     = #f0f0f0

[Layout Label title_1]
Text        = "Form of adress "
Pos         = +1.0.0
Align       = Right

[Layout Label title_2]
Text        = (b.E. Mr./Mrs.)
Pos         = +0.+0.+1
Small       = Ja

[Layout Field title]
Pos         = +0.+1.0
Size        = 8

[Layout Field title1]
Pos         = +0.+0.+1
Size        = 1
Type        = Select
Values      = <<EOF
SELECT DISTINCT title
FROM            contacts
WHERE           title <> ''
ORDER BY        title
EOF

[Layout Label sex]
Pos         = +0.+1.0
Text        = Sex
Align       = Right

[Layout Field sex]
Pos         = +0.+1.0
Type        = Radio
Values      = <<EOF
f\,Female
m\,Male
EOF

[Layout Label first_name]
Pos         = +1.0.0
Align       = Right
Text        = First name

[Layout Field first_name]
Pos         = +0.+1.0

[Layout Label last_name]
Pos         = +0.+1.0
Align       = Right
Text        = Name

[Layout Field last_name]
Pos         = +0.+1.0

[Layout Label company]
Pos         = +1.0.0
Text        = Company
Align       = Right
Bold        = Ja

[Layout Field company]
Pos         = +0.+1+2.0
Size        = 75
MaxLength   = 80

[Layout Qry company]
Align = Left
Bold = 1
Font        = color=blue

[Layout Label comments]
Pos         = +1.0.0
Text        = Comments
Align       = Right

[Layout Field comments]
Pos         = +0.1+2.0
Type        = Area
Rows        = 3
Size        = 75

[Layout Label cont_angaben_line]
Text        = <hr>
Pos         = +1.0+3.0

[Layout Label cont_angaben]
Text        = Contact-information
Pos         = +1.0+3.0
Font        = color=blue
Bold        = Ja
Big         = Ja
Align       = Center
BgColor     = #f0f0f0

[Layout Label conttyp1]
Pos         = +1.0.0
Text        = 1st Contact
Align       = Right
Bold        = Ja

[Layout Qry conttyp1]
UL = Left
Bold = 1
Font        = color=blue

[Layout Field conttyp1]
Pos         = +0.+1+2.0
Type        = Select
Values      = <<EOF
SELECT   key_value, label, sort_nr
FROM     wwwdb_lookup
WHERE    key_name = 'conttype' AND
         lang     = 'en'
ORDER BY sort_nr
EOF


[Layout Field contadr1]
Pos         = +0.+0.+1
Size        = 50

[Layout Label conttyp2]
Pos         = +1.0.0
Text        = 2nd Contact
Align       = Right

[Layout Field conttyp2]
Pos         = +0.+1+2.0
Type        = Select
Values      = <<EOF
SELECT   key_value, label, sort_nr
FROM     wwwdb_lookup
WHERE    key_name = 'conttype' AND
         lang     = 'en'
ORDER BY sort_nr
EOF

[Layout Field contadr2]
Pos         = +0.+0.+1
Size        = 50

[Layout Label conttyp3]
Pos         = +1.0.0
Text        = 3rd Contact
Align       = Right

[Layout Field conttyp3]
Pos         = +0.+1+2.0
Type        = Select
Values      = <<EOF
SELECT   key_value, label, sort_nr
FROM     wwwdb_lookup
WHERE    key_name = 'conttype' AND
         lang     = 'en'
ORDER BY sort_nr
EOF

[Layout Field contadr3]
Pos         = +0.+0.+1
Size        = 50

[Layout Label conttyp4]
Pos         = +1.0.0
Text        = 4th Contact
Align       = Right

[Layout Field conttyp4]
Pos         = +0.+1+2.0
Type        = Select
Values      = <<EOF
SELECT   key_value, label, sort_nr
FROM     wwwdb_lookup
WHERE    key_name = 'conttype' AND
         lang     = 'en'
ORDER BY sort_nr
EOF

[Layout Field contadr4]
Pos         = +0.+0.+1
Size        = 50

[Layout Label conttyp5]
Pos         = +1.0.0
Text        = 5th Contact
Align       = Right

[Layout Field conttyp5]
Pos         = +0.+1+2.0
Type        = Select
Values      = <<EOF
SELECT   key_value, label, sort_nr
FROM     wwwdb_lookup
WHERE    key_name = 'conttype' AND
         lang     = 'en'
ORDER BY sort_nr
EOF

[Layout Field contadr5]
Pos         = +0.+0.+1
Size        = 50

[Layout Label ende_line]
Text        = <hr>
Pos         = +1.0+3.0

[Layout Label state]
Pos         = +0.+0.+1
Text        = ""

[Layout Field state]
Pos         = +0.+0.+1
Type        = Hidden

[Layout Label last_change]
Pos         = +0.+0.+1
Text        = ""

[Layout Field last_change]
Pos         = +0.+0.+1
Type        = Hidden

[Layout Label id_contact]
Pos         = +0.+0.+1
Text        = ""

[Layout Field id_contact]
Pos         = +0.+0.+1
Type        = Hidden



[PDF]
Title      = "List of contacts"

PageWidth  = 600
PageHeight = 792
LeftBorder = 20
TopBorder  =  5
HeaderSize = 60
FooterSize = 30
RecordSize = 35
FieldSize  = 100
FontSize   = 10

[Layout PDF id_contact]
Label       = "Id."
Pos         = 10,45
FontSize    = 14
Align       = Right

[Layout PDF first_name]
Label       = "First name"
Pos         = 0,50

[Layout PDF last_name]
Label       = "Last name"
Pos         = 0,150

[Layout PDF conttyp1]
Label       = "1st type"
Pos         = 0,350

[Layout PDF contadr1]
Label       = "1st address"
Pos         = 0,400

[Layout PDF company]
Label       = "Company"
Pos         = 10,50

[Layout PDF conttyp2]
Label       = "2nd type"
Pos         = 10,350

[Layout PDF contadr2]
Label       = "2nd address"
Pos         = 10,400

[Layout PDF comments]
Label       = "Comments"
Pos         = 20,50
FontSize    = 9