1 |
dpavlin |
1.1 |
<? |
2 |
|
|
|
3 |
|
|
$phormationdir = "../phormation"; |
4 |
|
|
$DB = "pgsql"; |
5 |
|
|
|
6 |
|
|
//------------------------------------------------------------------- |
7 |
|
|
|
8 |
|
|
$table="zaposleni"; |
9 |
|
|
|
10 |
dpavlin |
1.3 |
$params["query"] = "select id,grupa,titula,ime,note,tel,email,pozicija,visible from zaposleni"; |
11 |
|
|
$params["defaultsort"] = "grupa,id"; |
12 |
dpavlin |
1.1 |
$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 |
dpavlin |
1.3 |
|
23 |
|
|
$fields[] = "grupa"; $names[] = "Grupa"; |
24 |
|
|
$types[]="type=text&length=2&default=99"; |
25 |
dpavlin |
1.1 |
|
26 |
|
|
$fields[] = "titula"; $names[] = "Titula (prije imena)"; |
27 |
|
|
$types[]="type=text&length=50"; |
28 |
|
|
|
29 |
|
|
$fields[] = "ime"; $names[] = "Ime ili naziv (bold)"; |
30 |
dpavlin |
1.2 |
$types[]="type=text&length=50"; |
31 |
dpavlin |
1.1 |
|
32 |
|
|
$fields[] = "pozicija"; $names[] = "Position"; |
33 |
|
|
$types[]="type=select&map[l]=<< Left&map[c]=|| Center&map[r]=>> Right&selecttype=dropdown"; |
34 |
|
|
|
35 |
|
|
$fields[] = "note"; $names[] = "Note"; |
36 |
|
|
$types[]="type=text&length=50"; |
37 |
|
|
|
38 |
|
|
$fields[] = "tel"; $names[] = "Tel"; |
39 |
|
|
$types[]="type=text&length=50"; |
40 |
|
|
|
41 |
|
|
$fields[] = "email"; $names[] = "e-mail"; |
42 |
|
|
$types[]="type=text&length=50"; |
43 |
|
|
|
44 |
|
|
//------------------------------------------------------------------- |
45 |
|
|
|
46 |
|
|
$conn = pg_connect( "dbname=plivasi user=dpavlin" ); |
47 |
|
|
if( !$conn ) { |
48 |
|
|
echo "Couldn't connect to database!<BR>"; |
49 |
|
|
} else { |
50 |
|
|
$result=pg_Exec($conn,"set datestyle = 'german'"); |
51 |
|
|
} |
52 |
|
|
|
53 |
|
|
//------------------------------------------------------------------- |
54 |
|
|
|
55 |
|
|
?> |