--- m/menu.pl 2001/11/05 10:47:10 1.7 +++ m/menu.pl 2001/11/07 12:09:58 1.8 @@ -14,6 +14,8 @@ my $h_base=13; my $h; +my $dir="/data/pliva-si/m"; + my %iso2utf_tab = ( '¹' => 0x0161, 'ð' => 0x0111, 'è' => 0x010d, 'æ' => 0x0107, '¾' => 0x017e, '©' => 0x0160, 'Ð' => 0x0110, 'È' => 0x010c, 'Æ' => 0x0106, '®' => 0x017d @@ -50,10 +52,10 @@ $text=iso2utf($text); if ($type == TYPE_BULLET) { $image->Annotate('text' => $text, 'geometry' => '+17+10', - 'font' => "\@arialbd.ttf", 'pointsize' => 11, + 'font' => "\@$dir/arialbd.ttf", 'pointsize' => 11, 'fill' => '#ffffff', 'align' => 'left'); # $image->Annotate('text' => $text, 'geometry' => '+17+1', -# 'font' => "\@arialbd.ttf", 'pointsize' => 11, +# 'font' => "\@$dir/arialbd.ttf", 'pointsize' => 11, # 'pen' => '#FFFFFF', 'align' => 'left'); # $image->Blur('radius' => 0.1); $image->Draw('primitive' => 'rectangle', 'stroke' => '#00D000', @@ -61,7 +63,7 @@ '7,4 10,7'); } elsif ($type == TYPE_BLUEDOT) { $image->Annotate('text' => $text, 'geometry' => '+17+10', - 'font' => "\@arialbd.ttf", 'pointsize' => 11, + 'font' => "\@$dir/arialbd.ttf", 'pointsize' => 11, 'fill' => '#ffffff', 'align' => 'left'); $image->Draw('primitive' => 'rectangle', 'stroke' => '#00b2dc', 'fill' => '#00b2dc', 'antialias' => 1, 'points' => @@ -89,13 +91,13 @@ } } $image->Annotate('text' => $text, 'geometry' => '+3+10', - 'font' => "\@arialbd.ttf", 'pointsize' => 11, + 'font' => "\@$dir/arialbd.ttf", 'pointsize' => 11, 'fill' => '#FFFFFF', 'align' => 'left'); # $image->Blur('radius' => 1); } print " -> " unless ($file eq "-"); $file .= ".gif" unless ($file eq "-"); - $image->Write('filename' => "gif:$file", 'colors' => 256, + $image->Write('filename' => "gif:$dir/$file", 'colors' => 256, 'interlace' => "none", 'compress' => 'lzw'); print "$file\n" unless ($file eq "-"); return "$file"; @@ -106,7 +108,7 @@ #exit $?; # -my $dbh = DBI->connect("DBI:Pg:dbname=plivasi", "", "") || +my $dbh = DBI->connect("DBI:Pg:dbname=plivasi", "dpavlin", "") || die $DBI::errstr; my $sth = $dbh->prepare("SELECT section,item,url,level,num FROM menu") || die $dbh->errstr();