#!/usr/bin/perl

#Global variables for the DB Connections
use strict;
use DBI;
use DBD::mysql;

#EUP DB
our %eupAccessDetails = (
    "DB_PORT", "3306",
    "EUP_DB_SERVER", "localhost",
    "EUP_DB_USER", "wkidams",
    "EUP_DB_PASSWORD", 'wk999',
    "EUP_DB_DATABASE", "scb_demo_test",
	);
my $eupDbConnLink;
$eupDbConnLink     = "dbi:mysql:".$eupAccessDetails{"EUP_DB_DATABASE"}.":".$eupAccessDetails{"EUP_DB_SERVER"}.":".$eupAccessDetails{"DB_PORT"}.":";
our $eupConnection = DBI->connect($eupDbConnLink ,$eupAccessDetails{"EUP_DB_USER"}, $eupAccessDetails{"EUP_DB_PASSWORD"}) or 
                     die "Connecting from Perl to MySQL database failed: $DBI::errstr $DBI::errno";

#IPC DB
our %ipcAccessDetails = (
    "DB_PORT", "3306",
    "IPC_DB_SERVER", "localhost",
    "IPC_DB_USER", "wkidams",
    "IPC_DB_PASSWORD", 'wk999',
    "IPC_DB_DATABASE", "ipc_test",
	);
my $ipcDbConnLink;
$ipcDbConnLink     = "dbi:mysql:".$ipcAccessDetails{"IPC_DB_DATABASE"}.":".$ipcAccessDetails{"IPC_DB_SERVER"}.":".$ipcAccessDetails{"DB_PORT"}.":";
our $ipcConnection = DBI->connect($ipcDbConnLink,$ipcAccessDetails{"IPC_DB_USER"}, $ipcAccessDetails{"IPC_DB_PASSWORD"}) or
                     die "Connecting from Perl to MySQL database failed: $DBI::errstr $DBI::errno";

#AFFILIATE DB
our %affAccessDetails = (
    "DB_PORT", "3306",
    "AFF_DB_SERVER", "localhost",
    "AFF_DB_USER", "affiliate_dev",
    "AFF_DB_PASSWORD", '12Nov@Aff!DeImp09',
    "AFF_DB_DATABASE", "affiliate_dev",
	);
my $affDbConnLink;
$affDbConnLink     = "dbi:mysql:".$affAccessDetails{"AFF_DB_DATABASE"}.":".$affAccessDetails{"AFF_DB_SERVER"}.":".$affAccessDetails{"DB_PORT"}.":";
our $affConnection = DBI->connect($affDbConnLink,$affAccessDetails{"AFF_DB_USER"}, $affAccessDetails{"AFF_DB_PASSWORD"}) or
                    die "Connecting from Perl to MySQL database failed: $DBI::errstr $DBI::errno";




# CCR BR1 Auiditing filter condition for HTML access
our $ccr_br1_html_auditing_filter = 10;
