1 |
<? |
2 |
|
3 |
$phormationdir = "../phormation"; |
4 |
$DB = "pgsql"; |
5 |
|
6 |
//------------------------------------------------------------------- |
7 |
|
8 |
$table="fc_contact"; |
9 |
|
10 |
$params["query"] = "select num,is_office,office,name,comment,addr1,addr2,email,tel,fax from fc_contact"; |
11 |
$params["defaultsort"] = "num"; |
12 |
$params["key"] = "num"; |
13 |
$params["delquery"] = "delete from $table where $params[key] = "; |
14 |
|
15 |
//------------------------------------------------------------------- |
16 |
|
17 |
$fields[] = "num"; $names[] = "Ordinal number"; |
18 |
$types[]="type=text&length=4&required=1&default=999"; |
19 |
|
20 |
$fields[] = "is_office"; $names[] = "Is office?"; |
21 |
$types[]="type=boolean&default=0"; |
22 |
|
23 |
$fields[] = "office"; $names[] = "Office name"; |
24 |
$types[]="type=text&length=50"; |
25 |
|
26 |
$fields[] = "addr1"; $names[] = "Address line 1"; |
27 |
$types[]="type=text&length=50"; |
28 |
|
29 |
$fields[] = "addr2"; $names[] = "Address line 2"; |
30 |
$types[]="type=text&length=50"; |
31 |
|
32 |
$fields[] = "name"; $names[] = "First/Last name"; |
33 |
$types[]="type=text&length=50"; |
34 |
|
35 |
$fields[] = "comment"; $names[] = "Comment (after name)"; |
36 |
$types[]="type=text&length=50"; |
37 |
|
38 |
$fields[] = "email"; $names[] = "e-mail"; |
39 |
$types[]="type=text&length=50"; |
40 |
|
41 |
$fields[] = "tel"; $names[] = "tel"; |
42 |
$types[]="type=text&length=50"; |
43 |
|
44 |
$fields[] = "fax"; $names[] = "fax"; |
45 |
$types[]="type=text&length=50"; |
46 |
|
47 |
//------------------------------------------------------------------- |
48 |
|
49 |
$conn = pg_connect( "dbname=corp user=dpavlin" ); |
50 |
if( !$conn ) { |
51 |
echo "Couldn't connect to database!<BR>"; |
52 |
} else { |
53 |
$result=pg_Exec($conn,"set datestyle = 'german'"); |
54 |
} |
55 |
|
56 |
//------------------------------------------------------------------- |
57 |
|
58 |
?> |