diff options
author | Christian Pointner <equinox@helsinki.at> | 2010-02-17 21:51:59 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2010-02-17 21:51:59 (GMT) |
commit | fff93aea9647f441f688e2834104d3c1463d011b (patch) | |
tree | e96ee940fc681f9460a8bf393cf9469f478324f6 /rhimport.pl | |
parent | 0ef6c7615188f84e7373b9719e9c42df77ae423d (diff) |
updated (cleaned) GUI
git-svn-id: https://svn.helsinki.at/rhimport/trunk@4 7c65635b-ec39-4f67-a626-873dbafdd612
Diffstat (limited to 'rhimport.pl')
-rwxr-xr-x | rhimport.pl | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/rhimport.pl b/rhimport.pl index 8f8a4ed..5c3b2ca 100755 --- a/rhimport.pl +++ b/rhimport.pl @@ -40,37 +40,42 @@ EOF my $user = 'martinland';#$ENV{'USER'}; $user or die "Username not found in environment"; -my $dbh = DBI->connect( "DBI:mysql:$DB:$DBHOST","$DBUSER","$DBPW") or die "Database Error: $DBI::errstr"; +# my $dbh = DBI->connect( "DBI:mysql:$DB:$DBHOST","$DBUSER","$DBPW") or die "Database Error: $DBI::errstr"; -my $sql = qq{select USER_PERMS.GROUP_NAME,DROPBOXES.PATH from USER_PERMS, DROPBOXES where USER_PERMS.USER_NAME='$user' and DROPBOXES.GROUP_NAME=USER_PERMS.GROUP_NAME;}; +# my $sql = qq{select USER_PERMS.GROUP_NAME,DROPBOXES.PATH from USER_PERMS, DROPBOXES where USER_PERMS.USER_NAME='$user' and DROPBOXES.GROUP_NAME=USER_PERMS.GROUP_NAME;}; -my $sth = $dbh->prepare($sql); -$sth->execute(); +# my $sth = $dbh->prepare($sql); +# $sth->execute(); my @allowed_dbs; -while(my ($group, $path) = $sth->fetchrow_array()) { - $path =~ s/\/\*$//; - my $perm = {}; - $perm->{'GROUP'} = $group; - $perm->{'PATH'} = $path; - push @allowed_dbs, $perm; -} -$sth->finish(); +# while(my ($group, $path) = $sth->fetchrow_array()) { +# $path =~ s/\/\*$//; +# my $perm = {}; +# $perm->{'GROUP'} = $group; +# $perm->{'PATH'} = $path; +# push @allowed_dbs, $perm; +# } +# $sth->finish(); if($LISTALLOWED) { for my $href ( @allowed_dbs ) { print "$href->{'PATH'}\n"; } - $dbh->disconnect(); +# $dbh->disconnect(); exit 0; } ## GUI mode if(!$M3U) { - my $gui = Gtk2::GladeXML->new('rhimport.glade'); + my $guixml = Gtk2::GladeXML->new('rhimport.glade'); + $guixml or die "can't load glade xml file"; +# my $widget = $guixml->get_widget('appwin'); +# $widget or die "can't find main GUI Widget"; + Gtk2->main; +# $dbh->disconnect(); exit 0; } @@ -83,5 +88,5 @@ if($DONTCONCAT) { print "Will import $M3U (concatenated), with user $user\n\n"; } -$dbh->disconnect(); +# $dbh->disconnect(); exit 0; |