/[corp_html]/back/fc_contact/global.inc
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /back/fc_contact/global.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Fri Sep 7 14:10:57 2001 UTC (22 years, 7 months ago) by dpavlin
Branch: MAIN
CVS Tags: HEAD
FineChemicals / ContactUs from database

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 ?>

  ViewVC Help
Powered by ViewVC 1.1.26