sharee.bike/copri4/shareedms-operator/src/Lib/Config.pm

65 lines
2.1 KiB
Perl
Raw Normal View History

2021-12-30 12:05:56 +01:00
package Config;
#Deprecated config file
#Please use shareeconf/*
use strict;
use warnings;
use CGI;
use Config::General;
my $q = new CGI;
sub new {
my $class = shift;
my $self = {};
bless($self,$class);
return $self;
}
sub envonline(){
my $self = shift;
2022-01-06 18:14:14 +01:00
my $server_type = "operator";
my $server_key = "sharee_operator";
2021-12-30 12:05:56 +01:00
my $globalconf_file = "/var/www/copri4/shareeconf/global.cfg";
my $conf = Config::General->new($globalconf_file);
my %globalconf = $conf->getall;
2022-01-06 18:14:14 +01:00
my $basedir = "$globalconf{copri_conf}->{basedir}/$globalconf{$server_type}{$server_key}->{dir_dms}";
my $metahost = $globalconf{$server_type}{$server_key}->{operatorDMS1};
2021-12-30 12:05:56 +01:00
my %varenv = (
2022-01-06 18:14:14 +01:00
dbname => $globalconf{$server_type}{$server_key}{database}->{dbname},
dbuser => $globalconf{$server_type}{$server_key}{database}->{user},
dbpassw => $globalconf{$server_type}{$server_key}{database}->{passwd},
dbhost => $globalconf{$server_type}{$server_key}{database}->{host},
2022-02-01 20:53:23 +01:00
syshost => $globalconf{$server_type}{$server_key}->{dir_dms},
2022-01-06 18:14:14 +01:00
wwwhost => $globalconf{$server_type}{$server_key}->{operatorDMS},
praefix => $globalconf{$server_type}{$server_key}{database}->{dbname},
2021-12-30 12:05:56 +01:00
systype => "sharee",#(azn)
mandant => $globalconf{shareedms_conf}->{parent_node},
start => $globalconf{shareedms_conf}->{start},
profile => $globalconf{shareedms_conf}->{profile},
superu_id => $globalconf{copri_conf}->{superu_id},
debug => $globalconf{copri_conf}->{debug},
logdir => $globalconf{copri_conf}->{logdir},
2022-01-06 18:14:14 +01:00
live_hostname => $globalconf{$server_type}{$server_key}->{live_hostname},
2021-12-30 12:05:56 +01:00
metahost=>"$metahost",
orga => "dms",
basedir => "$basedir",
csv => "$basedir/csv",
pdf => "$basedir/pdf",
data => "$basedir/data",
xmlfile => "$basedir/xml",
head_logo => "$metahost/img/sharee_bike_Logo.jpg",
printer => "PDF"
);
return %varenv;
}
1;