1 |
<? |
2 |
|
3 |
$phormationdir = "../phormation"; |
4 |
$DB = "pgsql"; |
5 |
|
6 |
//------------------------------------------------------------------- |
7 |
|
8 |
$table="zaposleni"; |
9 |
|
10 |
$params["query"] = "select id,grupa,num,titula,ime,note,tel,email,pozicija,visible from zaposleni"; |
11 |
$params["defaultsort"] = "grupa,num,id"; |
12 |
$params["key"] = "id"; |
13 |
$params["delquery"] = "delete from $table where ".$params["key"]." = "; |
14 |
|
15 |
//------------------------------------------------------------------- |
16 |
|
17 |
$fields[] = "visible"; $names[] = "Visible"; |
18 |
$types[]="type=boolean&default=1"; |
19 |
|
20 |
//$fields[] = "id"; $names[] = "Ordinal number"; |
21 |
//$types[]="type=text&length=4&required=1&default=null"; |
22 |
|
23 |
$fields[] = "grupa"; $names[] = "Grupa"; |
24 |
$types[]="type=text&length=2&default=99"; |
25 |
|
26 |
$fields[] = "num"; $names[] = "Num (redosljed)"; |
27 |
$types[]="type=text&length=2&default=99"; |
28 |
|
29 |
$fields[] = "titula"; $names[] = "Titula (prije imena)"; |
30 |
$types[]="type=text&length=50"; |
31 |
|
32 |
$fields[] = "ime"; $names[] = "Ime ili naziv (bold)"; |
33 |
$types[]="type=text&length=50"; |
34 |
|
35 |
$fields[] = "pozicija"; $names[] = "Position"; |
36 |
$types[]="type=select&map[l]=Columns&map[c]=Centered&selecttype=dropdown"; |
37 |
|
38 |
$fields[] = "note"; $names[] = "Note"; |
39 |
$types[]="type=text&length=50"; |
40 |
|
41 |
$fields[] = "tel"; $names[] = "Tel"; |
42 |
$types[]="type=text&length=50"; |
43 |
|
44 |
$fields[] = "email"; $names[] = "e-mail"; |
45 |
$types[]="type=text&length=50"; |
46 |
|
47 |
//------------------------------------------------------------------- |
48 |
|
49 |
$conn = pg_connect( "dbname=plivasi 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 |
?> |