| Server IP : 208.122.213.31 / Your IP : 216.73.216.185 Web Server : Apache System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64 User : WHMCS_MIA_382 ( 1001) PHP Version : 7.4.33 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/httpd/html/tits-bigtits.com/cgi-bin/tgp/ |
Upload File : |
#!/usr/bin/perl
##############################
## AutoGallery Pro v3.0.x ##
#############################################################
## patch.cgi - Update files after a patch is uploaded ##
#############################################################
eval
{
require 'common.pl';
require 'agp.pl';
Header("Content-type: text/html\n\n");
main();
};
if( $@ )
{
Error("$@", 'patch.cgi');
}
sub main
{
if( !-w 'cron.cgi' || !-w 'scanner.cgi' )
{
print 'Please set the permissions to 777 on the cron.cgi and scanner.cgi files' .
' and then run this script again';
}
else
{
SetupScripts();
RecompileTemplates();
print 'Files have been patched successfully';
}
}
sub SetupScripts
{
my $cwd = `pwd`;
my @scripts = qw(cron.cgi scanner.cgi);
chomp($cwd);
for( @scripts )
{
my $file = $_;
my $data = FileReadScalar($file);
$$data =~ s/\r//gi;
$$data =~ s/\$CDIR = '[^']+'/\$CDIR = '$cwd'/;
FileWrite($file, $$data);
if( -o $file )
{
chmod(0755, $file);
}
}
}
sub RecompileTemplates
{
my $list = GetPageList();
GetCategoryList();
for( split(',', $list) )
{
my $page = $_;
$CATEGORY = PageToCategory($page);
my $html = FileReadScalar("$DDIR/html/$page");
my $compiled = CompileTGPPage($html);
FileWrite("$DDIR/html/$page.comp", $$compiled);
}
}