!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-libintl-perl/sample/simplecal/bin/   drwxr-xr-x
Free 6181.95 GB of 6263.15 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:     simplecal.pl (2.47 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
#! /usr/local/bin/perl -w
# vim: tabstop=4

use strict;

# Include our little library.
use SimpleCal;

# For setlocale.
use POSIX qw (setlocale);
use Locale::Messages qw (LC_MESSAGES);

# Our script contains translatable messages.  We have to assign
# it a text domain.  Note that this is only needed here because the 
# script *itself* contains translatable messages from the text domain
# "com.cantanea.simplecal".
use Locale::TextDomain ('com.cantanea.simplecal');

use vars qw ($VERSION);
$VERSION = '1.0';

# Set the locale according to the environment.
setlocale LC_MESSAGES, "";

# Print a greeting message.  We want to be flexible with the package
# name, and so we will make this a placeholder.
my $package_name = "SimpleCal";
#print __x("Welcome to {package}!\n", package => $package_name);

# Inquire current date and time.
my @now = localtime;
my $year = $now[5] + 1900; # Current year.
my $month = $now[4];    # Current month in the range of 0-11.

# Print the header for our calendar.
my $month_name = SimpleCal::month_name ($month);
print "\t$month_name $year\n";

# And now print the abbreviation for every day of the week.
foreach my $i (0 .. 6) {
    # This makes the (insecure!) assumption that the abbreviated
    # week day is no longer than 5 characters.
    printf "%6s", abbr_week_day ($i);
}
# And a final newline.
print "\n";

# The rest of the program only prints out the day numbers and is not
# particularly interesting.

# We will start at a Sunday where month day <= 0 and suppress negative dates 
# later.
my $first_day = $now[3] - $now[6];
if ($first_day > 0) {
    $first_day %= 7;
    $first_day -= 7;
}

my $last_day;
if ($month == 1) {
    if (SimpleCal::is_leap_year ($year)) {
        $last_day = 29;
    } else {
        $last_day = 28;
    }
} elsif ($month == 3 || $month == 5 || $month == 8 || $month == 10) {
    $last_day = 30;
} else {
    $last_day = 31;
}

my $day_of_week = 0; # Sunday.
foreach my $mday ($first_day .. $last_day) {
    if ($mday <= 0) {
        printf "%6s", ' ';
    } else {
        printf "% 6d", $mday;
    }
    ++$day_of_week;
    if ($day_of_week == 7) {
        $day_of_week = 0;
        print "\n";
    }
}

print "\n" if $day_of_week;

# Say good bye.
# TRANSLATORS: This may be a colloquial way of saying good bye to the user.
#print __"Bye.\n";

__END__

Local Variables:
mode: perl
perl-indent-level: 4
perl-continued-statement-offset: 4
perl-continued-brace-offset: 0
perl-brace-offset: -4
perl-brace-imaginary-offset: 0
perl-label-offset: -4
cperl-indent-level: 4
cperl-continued-statement-offset: 2
tab-width: 4
End:

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