35 |
sub dump_gif { |
sub dump_gif { |
36 |
my ($text, $type, $file) = @_; |
my ($text, $type, $file) = @_; |
37 |
$type ||= TYPE_NONE; |
$type ||= TYPE_NONE; |
38 |
$file ||= $text; |
$file ||= "$text-$type"; |
39 |
$file =~ s/[^a-zA-Z0-9\-]/_/g; |
$file =~ s/[^a-zA-Z0-9\-]/_/g; |
40 |
$file = lc($file); |
$file = lc($file); |
41 |
print "$text" unless ($file eq "-"); |
print "$text" unless ($file eq "-"); |
105 |
#dump_gif("NOVOSTI", TYPE_LINE, "-"); |
#dump_gif("NOVOSTI", TYPE_LINE, "-"); |
106 |
#exit $?; |
#exit $?; |
107 |
|
|
108 |
|
# |
109 |
my $dbh = DBI->connect("DBI:Pg:dbname=plivasi", "", "") || |
my $dbh = DBI->connect("DBI:Pg:dbname=plivasi", "", "") || |
110 |
die $DBI::errstr; |
die $DBI::errstr; |
111 |
my $sth = $dbh->prepare("SELECT section,item,url,level,num FROM menu") || |
my $sth = $dbh->prepare("SELECT section,item,url,level,num FROM menu") || |