/[corp_html]/back/newsletter/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

Annotation of /back/newsletter/global.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Thu Apr 11 14:02:03 2002 UTC (22 years, 1 month ago) by dpavlin
Branch: MAIN
CVS Tags: HEAD
news-letter back-end

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

  ViewVC Help
Powered by ViewVC 1.1.26