yolanda/trunk/include.pl
josch c4b86cf26c some even smaller fixes
git-svn-id: http://yolanda.mister-muffin.de/svn@304 7eef14d0-6ed0-489d-bf55-20463b2d70db
2008-04-15 21:19:18 +00:00

25 lines
920 B
Perl

#!/usr/bin/perl -w
use CGI qw(:standard);
use CGI::Session;
use DBI;
use XML::Simple qw(:strict);
use Digest::SHA qw(sha256_hex);
use LWPx::ParanoidAgent;
use Net::OpenID::Consumer;
use CGI::Carp qw(fatalsToBrowser set_message);
use File::Copy;
set_message("It's not a bug, it's a feature!!<br />(include this error message in your bugreport here: <a href=\"http://yolanda.mister-muffin.de/newticket\">Yolanda bugtracker</a>)");
# change this as you install it somewhere else
$root = '/var/www/yolanda';
use lib qw(/var/www/yolanda);
#set global config variable
$config = XMLin("$root/config/backend.xml", KeyAttr => {string => 'id'}, ForceArray => [ 'string' ], ContentKey => '-content');
$config = $config->{"strings"}->{"string"};
$dbh = DBI->connect("DBI:mysql:".$config->{"database_name"}.":".$config->{"database_host"}, $config->{"database_username"}, $config->{"database_password"}) or die $DBI::errstr;
1;