Thanks both guys!
I have this working, as messy as it is: (though it is nice to see better ways to do it, thanks Paul, I will tinker with your suggestion.)
Sorry about the woeful formatting, makes it hard to read, but it is fine inside my plug-in
for (@sess) {
$sess = do("$path/$_");
$user = $sess->{username};
@editor_catid = $DB->table('Editors')->select(['CategoryID'],{Username => $user})->fetchall_list;
my $file = $path . "/" . $_;
my $modtime = localtime( (stat($file))[9] );
print "<b>$user</b> : ";
if ($editor_catid[0] > 0) {
print qq~<font size="2" color="#FF9900"><b><i>Editor</i></b></font> <small>($modtime)</small><br>~;
}
else {
print qq~<i>User</i> <small>($modtime)</small><br>~;
}
foreach $catid (@editor_catid) {
if ($catid > 0) {
my $cat = $DB->table('Category')->select( ['Full_Name'], { ID => $catid } )->fetchrow_array;
print qq~<font size="2" color="#333333"> Category: $cat</font><br>~;
}
}
http://www.iuni.com/...tware/web/index.html
Links Plugins
I have this working, as messy as it is: (though it is nice to see better ways to do it, thanks Paul, I will tinker with your suggestion.)
Sorry about the woeful formatting, makes it hard to read, but it is fine inside my plug-in
Quote:
for (@sess) {
$sess = do("$path/$_");
$user = $sess->{username};
@editor_catid = $DB->table('Editors')->select(['CategoryID'],{Username => $user})->fetchall_list;
my $file = $path . "/" . $_;
my $modtime = localtime( (stat($file))[9] );
print "<b>$user</b> : ";
if ($editor_catid[0] > 0) {
print qq~<font size="2" color="#FF9900"><b><i>Editor</i></b></font> <small>($modtime)</small><br>~;
}
else {
print qq~<i>User</i> <small>($modtime)</small><br>~;
}
foreach $catid (@editor_catid) {
if ($catid > 0) {
my $cat = $DB->table('Category')->select( ['Full_Name'], { ID => $catid } )->fetchrow_array;
print qq~<font size="2" color="#333333"> Category: $cat</font><br>~;
}
}
http://www.iuni.com/...tware/web/index.html
Links Plugins