Leser: 1
10 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
Use of reserved word "our" is deprecated at Z:/perl583/lib/Socket.pm
line 3.
Use of reserved word "our" is deprecated at Z:/perl583/lib/warnings/
register.pm line 3.
Can't modify subroutine entry in scalar assignment at Z:/perl583/lib
/warnings/register.pm line 3, near "'1.00';"
BEGIN failed--compilation aborted at Z:/perl583/lib/Socket.pm line 1
79.
BEGIN failed--compilation aborted at N:/wntapp/perl/perl583/lib/Net/FTP.pm line
17.
BEGIN failed--compilation aborted at prj/ftpdialog.pm line 18.
BEGIN failed--compilation aborted at prj/cwidgets.pm line 18.
BEGIN failed--compilation aborted at D:\mona\mona.pl line 16.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
#!/usr/bin/perl -w
# ################################################
# cwidget.pm # perl 5
# ############
#
# MoniQuE - Administration
#
# cFile-Klasse
#
#
# ################################################
# don't use strict;
use lib "Z:/perl583/lib";
use warnings;
use Tk;
use Tk::DialogBox;
use Tk::HList;
use Net::FTP;
package prj::ftpdialog;
sub new
{
my $this = shift;
my $thisref = ref($this) || $this;
my $self;
$self->{'parent'} = $_[0];
$self->{"ftpuser"} = "qstest";
$self->{"ftppass"} = "qs-test";
$self->{"ftpserver"} = "monique";
$self->{"remoteroot"} = $_[1];
$self->{"localroot"} = $_[2];
$self->{"locallist"} = undef;
$self->{"remotelist"} = undef;
bless ($self, $thisref);
return $self;
}
sub Show
{
my $self = shift;
my $dialog = $self->{'parent'}->DialogBox (
-title => "FTP-Transfer",
-default_button => "Exit",
-buttons => ['Exit'],
);
# positioning frames
my $dheadl = $dialog->add ('Frame')->pack(-side=>'left');
my $dheadr = $dialog->add ('Frame')->pack(-side=>'right');
my $dheadc = $dialog->add ('Frame')->pack(-side=>'bottom');
# Create Heads
$dheadl->Label( -text => "Lokales Laufwerk",
)->pack(-side =>'top', -fill=>'y');
$dheadr->Label( -text => "Entferntes Laufwerk",
)->pack(-side =>'top', -fill=>'y');
# Create local view
my $locallist = $dheadl->Scrolled(
'HList',
-header => 1,
-columns => 3,
-width => 50,
-command => sub{localclick();},
)->pack(-side =>'bottom', -anchor => 'w');
$locallist->header('create', 0, -text => 'Dateiname');
$locallist->header('create', 1, -text => 'Datum');
$locallist->header('create', 2, -text => 'OGA');
$locallist->columnWidth (1, -char => 20);
$locallist->columnWidth (2, -char => 5);
$self->{'locallist'} = $locallist;
&reloadlocaldir($self);
# Create remote view
my $remotelist = $dheadr->Scrolled(
'HList',
-header => 1,
-columns => 3,
-width => 50,
-command => sub{remoteclick();},
)->pack(-side =>'bottom', -anchor => 'e');
$remotelist->header('create', 0, -text => 'Dateiname');
$remotelist->header('create', 1, -text => 'Datum');
$remotelist->header('create', 2, -text => 'OGA');
$remotelist->columnWidth (1, -char => 20);
$remotelist->columnWidth (2, -char => 5);
$self->{'remotelist'} = $remotelist;
&reloadremotedir($self);
# create Button List
$dialog->Show();
return;
}
# reload directory content
sub reloadlocaldir
{
my $self = $_[0];
print "opening $self->{'localroot'}\n";
opendir(DIR,$self->{'localroot'}) or die $!;
$self->{'locallist'}->delete("all");
while(my $file = readdir(DIR)){
my $path = $self->{'localroot'}.'/'.$file;
my ($date,$permissions) = (stat($path))[8,2];
my @sdate = localtime($date);
$date = sprintf ("%02i.%02i.%04i %02i:%02i:%02i", $sdate[3], $sdate[4], $sdate[5] + 1900, $sdate[2], $sdate[1], $sdate[0]);
$permissions = sprintf("%4o",$permissions & 07777);
$self->{'locallist'}->add($i);
if (-d $path)
{
$file .= "/";
}
my $l = 0;
for($file,$date,$permissions){
$self->{'locallist'}->itemCreate($i,$l,-text => $_);
$l++;
}
$i++;
}
closedir (DIR);
}
# reload directory content
sub reloadremotedir
{
my $self = $_[0];
opendir(DIR,$self->{'remoteroot'}) or die $!;
$self->{'remotelist'}->delete("all");
while(my $file = readdir(DIR)){
my $path = $self->{'remoteroot'}.'/'.$file;
my ($date,$permissions) = (stat($path))[8,2];
my @sdate = localtime($date);
$date = sprintf ("%02i.%02i.%04i %02i:%02i:%02i", $sdate[3], $sdate[4], $sdate[5] + 1900, $sdate[2], $sdate[1], $sdate[0]);
$permissions = sprintf("%4o",$permissions & 07777);
$$self->{'remotelist'}->add($i);
if (-d $path)
{
$file .= "/";
}
my $l = 0;
for($file,$date,$permissions){
$self->{'remotelist'}->itemCreate($i,$l,-text => $_);
$l++;
}
$i++;
}
closedir (DIR);
}
sub localclick
{
my $self = shift;
}
sub remoteclick
{
my $self = shift;
}
return 1;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl -w
# ################################################
# Mona.pl # perl 5
# #########
#
# MoniQuE - Administration
#
# Tool zur Steuerung von MoniQuE
#
#
# ################################################
use Tk;
use strict;
use prj::cwidgets;
use prj::login;
my $cwindow = prj::cwidgets->new();
MainLoop;
print "quitting...\n";
Quoteund zweitens würd ich fliegen, wenn ich's trotzdem täte.
QuoteNaja, werd mich mal umhören, ob ich die 5.8.3 vom Netzlaufwerk irgendwie nutzen kann...
10 Einträge, 1 Seite |