
{
my $width =  $bandwidthd{'width'} || "900";
my $height =  $bandwidthd{'height'} || "256";
my $interval =  $bandwidthd{'interval'} || "INT_DAILY";

$OUT .= "define('DFLT_WIDTH', $width);\n";
$OUT .= "define('DFLT_HEIGHT', $height);\n";
$OUT .= "define('DFLT_INTERVAL', $interval);\n";

}

// Select type of database you are using
// Possible values are DB_PGSQL and DB_MYSQL
{
 my $dbtype = $bandwidthd{'DbType'} || "mysql";
 if ( $dbtype eq "mysql")
	{$dbtype = "DB_MYSQL";}
else
	{$dbtype = "DB_PGSQL";}

 $OUT .= "\$dbtype = $dbtype;\n";

}

// Configuration for PostgreSQL
{
 $OUT .= "\n";
 my $dbtype = $bandwidthd{'DbType'} || "mysql";
 my $dbhost = $bandwidthd{'Dbhost'} || "localhost";

 $OUT .= "\$pgsql_connect_string = \"user = ".$bandwidthd{'DbUser'}." password = ". $bandwidthd{'DbPassword'} ."  dbname = ".$bandwidthd{'DbName'}." host = $dbhost\";\n"
unless $dbtype eq "mysql";

}
// Configuration for MySQL
// You can specify port after semicolon, for example "localhost:4067"
{
 my $dbhost = $bandwidthd{'Dbhost'} || "localhost";

 $OUT .= "\$mysql_host = \"$dbhost\";\n";
 $OUT .= "\$mysql_user = \"".$bandwidthd{'DbUser'}."\";\n";
 $OUT .= "\$mysql_pass = \"". $bandwidthd{'DbPassword'} ."\";\n";
 $OUT .= "\$mysql_dbname = \"".$bandwidthd{'DbName'}."\";\n";
}
