#!/bin/sh
eval 'if [ -x /usr/local/cpanel/3rdparty/bin/perl ]; then exec /usr/local/cpanel/3rdparty/bin/perl -x -- $0 ${1+"$@"}; else exec /usr/bin/perl -x $0 ${1+"$@"}; fi;'
if 0;
#!/usr/bin/perl
##LICENSE##
my $obj = RVSMainIndex->new();
$obj->initTemplate();
$obj->startOutput();
$obj->endOutput();
package RVSMainIndex;
use strict;
use warnings;
use File::Basename;
use Data::Dumper;
BEGIN {
push(@INC, dirname(__FILE__));
}
use RVSInstaller::Template;
use vars qw($BROWSER);
{
sub new {
my $class = shift;
my $self = {
INSTALLTITLE => "RVPackage Installer",
@_,
};
$BROWSER = ($ENV{'HTTP_USER_AGENT'}) ? 1 : 0;
bless $self, $class;
return $self;
}
sub initTemplate {
my $self = shift;
my $WEBROOT = '/';
if ($BROWSER) {
my ($path) = $ENV{'SCRIPT_URI'} ? $ENV{'SCRIPT_URI'} : $ENV{'SCRIPT_NAME'};
$WEBROOT = dirname($path);
if ( $WEBROOT !~/^\//i) {
$WEBROOT = '/' . $WEBROOT;
}
}
$self->{template} = RVSInstaller::Template->new(
masterTemplate => 'index.htm',
template => 'download.htm',
output => {
INS_PHP_FILE_TYPE => 'php',
INS_WEB_THEME_URL => $WEBROOT,
INS_WEB_ROOT => $WEBROOT,
INSTALLTITLE => $self->{INSTALLTITLE},
}
);
return $self->{template};
}
sub startOutput {
my $self = shift;
if ( $BROWSER ) {
#print "HTTP/1.1 200 OK\n";
print "Content-type: text/html\n\n";
print $self->{template}->displayTemplate();
$BROWSER = 1;
}
}
sub endOutput {
my $self = shift;
print "</body></html>\n";
exit(0);
}
}
Copyright 2K16 - 2K18 Indonesian Hacker Rulez