HEX
Server: Apache/2.4.25 (Debian)
System: Linux server17 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
User: web37 (1062)
PHP: 7.4.30
Disabled: show_source, highlight_file, apache_child_terminate, apache_get_modules, apache_note, apache_setenv, virtual, dl, disk_total_space, posix_getpwnam, posix_getpwuid, posix_mkfifo, posix_mknod, posix_setpgid, posix_setsid, posix_setuid, posix_uname, proc_nice, openlog, syslog, pfsockopen
Upload Files
File: /var/www/web37/htdocs/sexportal/galerie/thumbs.php
<?php
require('config.php');
$image = $_GET['image'] ; 
$newwidth = $_GET['newwidth'];
$newheight = $_GET['newheight'];
$height = $_GET['height'];
$width = $_GET['width'];
$correctheight = round($width/2*3);
$correctwidth = round($height/3*2);
$correctheightb = round($width/3*2);
$correctwidthb = round($height/2*3);
$ratio = ($height/$width);
$src = imagecreatefromjpeg("$image");
$im = imagecreatetruecolor($newwidth,$newheight);  

if ($croptofit)
{
if ($height > $width)
{ 
if ($ratio > 1.5)
{
$newy = round(($height-$correctheight)/2);
imagecopyresampled($im,$src,0,0,0,$newy,$newwidth,$newheight,$width,$correctheight); 
}
else
{
$newx = round(($width-$correctwidth)/2);
imagecopyresampled($im,$src,0,0,$newx,0,$newwidth,$newheight,$correctwidth,$height); 
}
}
else
if ($ratio < 0.67)
{
$newx = round(($width-$correctwidthb)/2);
imagecopyresampled($im,$src,0,0,$newx,0,$newwidth,$newheight,$correctwidthb,$height); 
}
else
{
$newy = round(($height-$correctheightb)/2);
imagecopyresampled($im,$src,0,0,0,$newy,$newwidth,$newheight,$width,$correctheightb); 
}
}
else
{
imagecopyresampled($im,$src,0,0,0,0,$newwidth,$newheight,$width,$height); 
}

imagejpeg($im, '',85); 
imagedestroy($im); 





?>