!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: Apache. PHP/5.6.40-67+ubuntu20.04.1+deb.sury.org+1 

uname -a: Linux hosting1.erectacloud.it 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC
2024 x86_64
 

uid=5229(web473) gid=5117(client172) groups=5117(client172),5002(sshusers) 

Safe-mode: OFF (not secure)

/var/www/clients/client172/web473/web/aps/resizeimg/thumb_plugins/   drwxr-xr-x
Free 182.71 GB of 490.84 GB (37.22%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     gd_reflection.inc.php (5.26 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * GD Reflection Lib Plugin Definition File
 * 
 * This file contains the plugin definition for the GD Reflection Lib for PHP Thumb
 * 
 * PHP Version 5 with GD 2.0+
 * PhpThumb : PHP Thumb Library <http://phpthumb.gxdlabs.com>
 * Copyright (c) 2009, Ian Selby/Gen X Design
 * 
 * Author(s): Ian Selby <ian@gen-x-design.com>
 * 
 * Licensed under the MIT License
 * Redistributions of files must retain the above copyright notice.
 * 
 * @author Ian Selby <ian@gen-x-design.com>
 * @copyright Copyright (c) 2009 Gen X Design
 * @link http://phpthumb.gxdlabs.com
 * @license http://www.opensource.org/licenses/mit-license.php The MIT License
 * @version 3.0
 * @package PhpThumb
 * @filesource
 */

/**
 * GD Reflection Lib Plugin
 * 
 * This plugin allows you to create those fun Apple(tm)-style reflections in your images
 * 
 * @package PhpThumb
 * @subpackage Plugins
 */
class GdReflectionLib
{
    
/**
     * Instance of GdThumb passed to this class
     * 
     * @var GdThumb
     */
    
protected $parentInstance;
    protected 
$currentDimensions;
    protected 
$workingImage;
    protected 
$newImage;
    protected 
$options;
    
    public function 
createReflection ($percent$reflection$white$border$borderColor, &$that)
    {
        
// bring stuff from the parent class into this class...
        
$this->parentInstance         $that;
        
$this->currentDimensions     $this->parentInstance->getCurrentDimensions();
        
$this->workingImage            $this->parentInstance->getWorkingImage();
        
$this->newImage                $this->parentInstance->getOldImage();
        
$this->options                $this->parentInstance->getOptions();
        
        
$width                $this->currentDimensions['width'];
        
$height                $this->currentDimensions['height'];
        
$reflectionHeight     intval($height * ($reflection 100));
        
$newHeight            $height $reflectionHeight;
        
$reflectedPart        $height * ($percent 100);
        
        
$this->workingImage imagecreatetruecolor($width$newHeight);
        
        
imagealphablending($this->workingImagetrue);
        
        
$colorToPaint imagecolorallocatealpha($this->workingImage,255,255,255,0);
        
imagefilledrectangle($this->workingImage,0,0,$width,$newHeight,$colorToPaint);
        
        
imagecopyresampled
        
(
            
$this->workingImage,
            
$this->newImage,
            
0,
            
0,
            
0,
            
$reflectedPart,
            
$width,
            
$reflectionHeight,
            
$width,
            (
$height $reflectedPart)
        );
        
        
$this->imageFlipVertical();
        
        
imagecopy($this->workingImage$this->newImage0000$width$height);
        
        
imagealphablending($this->workingImagetrue);
        
        for (
$i 0$i $reflectionHeight$i++) 
        {
            
$colorToPaint imagecolorallocatealpha($this->workingImage255255255, ($i/$reflectionHeight*-1+1)*$white);
            
            
imagefilledrectangle($this->workingImage0$height $i$width$height $i$colorToPaint);
        }
        
        if(
$border == true
        {
            
$rgb             $this->hex2rgb($borderColorfalse);
            
$colorToPaint     imagecolorallocate($this->workingImage$rgb[0], $rgb[1], $rgb[2]);
            
            
imageline($this->workingImage00$width0$colorToPaint); //top line
            
imageline($this->workingImage0$height$width$height$colorToPaint); //bottom line
            
imageline($this->workingImage000$height$colorToPaint); //left line
            
imageline($this->workingImage$width-10$width-1$height$colorToPaint); //right line
        
}
        
        if (
$this->parentInstance->getFormat() == 'PNG')
        {
            
$colorTransparent imagecolorallocatealpha
            
(
                
$this->workingImage
                
$this->options['alphaMaskColor'][0], 
                
$this->options['alphaMaskColor'][1], 
                
$this->options['alphaMaskColor'][2], 
                
0
            
);
            
            
imagefill($this->workingImage00$colorTransparent);
            
imagesavealpha($this->workingImagetrue);
        }
        
        
$this->parentInstance->setOldImage($this->workingImage);
        
$this->currentDimensions['width']     = $width;
        
$this->currentDimensions['height']    = $newHeight;
        
$this->parentInstance->setCurrentDimensions($this->currentDimensions);
        
        return 
$that;
    }
    
    
/**
     * Flips the image vertically
     * 
     */
    
protected function imageFlipVertical ()
    {
        
$x_i imagesx($this->workingImage);
        
$y_i imagesy($this->workingImage);

        for (
$x 0$x $x_i$x++) 
        {
            for (
$y 0$y $y_i$y++) 
            {
                
imagecopy($this->workingImage$this->workingImage$x$y_i $y 1$x$y11);
            }
        }
    }
    
    
/**
     * Converts a hex color to rgb tuples
     * 
     * @return mixed 
     * @param string $hex
     * @param bool $asString
     */
    
protected function hex2rgb ($hex$asString false
    {
        
// strip off any leading #
        
if (=== strpos($hex'#')) 
        {
           
$hex substr($hex1);
        } 
        elseif (
=== strpos($hex'&H')) 
        {
           
$hex substr($hex2);
        }

        
// break into hex 3-tuple
        
$cutpoint ceil(strlen($hex) / 2)-1;
        
$rgb explode(':'wordwrap($hex$cutpoint':'$cutpoint), 3);

        
// convert each tuple to decimal
        
$rgb[0] = (isset($rgb[0]) ? hexdec($rgb[0]) : 0);
        
$rgb[1] = (isset($rgb[1]) ? hexdec($rgb[1]) : 0);
        
$rgb[2] = (isset($rgb[2]) ? hexdec($rgb[2]) : 0);

        return (
$asString "{$rgb[0]} {$rgb[1]} {$rgb[2]}$rgb);
    }
}

$pt PhpThumb::getInstance();
$pt->registerPlugin('GdReflectionLib''gd');

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0081 ]--