summaryrefslogtreecommitdiffstats
path: root/cgi-bin/query.pl
diff options
context:
space:
mode:
Diffstat (limited to 'cgi-bin/query.pl')
-rwxr-xr-xcgi-bin/query.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/cgi-bin/query.pl b/cgi-bin/query.pl
index 4a9ed26..35c2455 100755
--- a/cgi-bin/query.pl
+++ b/cgi-bin/query.pl
@@ -7,7 +7,13 @@ use DBI;
use CGI_Lite;
-my $dbh = DBI->connect("DBI:mysql:database=asm_main;host=localhost;port=3306", 'USER', 'PASSWORD');
+use XML::Simple qw(:strict);
+my $xs1 = XML::Simple->new( KeyAttr => ['id'], Cache => [ qw/memcopy/ ]);
+my $sqlconf = $xs1->XMLin( "/home/icxcnika/AntiSpamMeta/config-main/mysql.xml",
+ ForceArray => ['ident', 'geco'],
+ 'GroupTags' => { ignoredidents => 'ident', ignoredgecos => 'geco' });
+
+my $dbh = DBI->connect("DBI:mysql:database=" . $sqlconf->{db} . ";host=" . $sqlconf->{host} . ";port=" . $sqlconf->{port}, $sqlconf->{user}, $sqlconf->{pass});
my $debug = 0;