1 |
dpavlin |
1.1 |
<? |
2 |
|
|
|
3 |
|
|
$phormationdir = "../phormation"; |
4 |
|
|
$DB = "pgsql"; |
5 |
|
|
|
6 |
|
|
//------------------------------------------------------------------- |
7 |
|
|
|
8 |
|
|
$table="news_sent"; |
9 |
|
|
|
10 |
|
|
$params["query"] = "select id,date from $table"; |
11 |
|
|
$params["defaultsort"] = "date"; |
12 |
|
|
$params["key"] = "id"; |
13 |
|
|
$params["delquery"] = "delete from $table where ".$params["key"]." = "; |
14 |
|
|
|
15 |
|
|
// delete record in database |
16 |
|
|
|
17 |
|
|
$fields[] = "id"; $names[] = "Max. news ID"; |
18 |
|
|
$types[]="type=text&length=5&required=1"; |
19 |
|
|
|
20 |
|
|
$fields[] = "date"; $names[] = "Date sent"; |
21 |
|
|
$types[]="type=date&yearspan=8&default=now"; |
22 |
|
|
|
23 |
|
|
//------------------------------------------------------------------- |
24 |
|
|
|
25 |
|
|
$conn = pg_connect( "dbname=corp user=dpavlin" ); |
26 |
|
|
if( !$conn ) { |
27 |
|
|
echo "Couldn't connect to database!<BR>"; |
28 |
|
|
} else { |
29 |
|
|
$result=pg_Exec($conn,"set datestyle = 'german'"); |
30 |
|
|
} |
31 |
|
|
|
32 |
|
|
//------------------------------------------------------------------- |
33 |
|
|
|
34 |
|
|
?> |