Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ///////////////////////////////////////////////////////
- // FlowerBoy paveiksleliu mazinimo varikliukas v.1.2 //
- ///////////////////////////////////////////////////////
- $filename = $_GET['f'];
- if (isset ($_GET['p'])) { $plotis = $_GET['p']; }
- if (isset ($_GET['a'])) { $aukstis = $_GET['a']; }
- if (isset ($_GET['max'])) {
- $dydis = getimagesize ($filename);
- if ($dydis['0'] <= $dydis['1']) { $aukstis = $_GET['max']; }
- if ($dydis['0'] > $dydis['1']) { $plotis = $_GET['max']; }
- }
- if (isset ($_GET['min'])) {
- $dydis = getimagesize ($filename);
- if ($dydis['0'] >= $dydis['1']) { $aukstis = $_GET['min']; }
- if ($dydis['0'] < $dydis['1']) { $plotis = $_GET['min']; }
- }
- header("Content-type: image/jpeg");
- $source = imagecreatefromjpeg($filename);
- if ($plotis != "") {
- $thumbX = $plotis;
- $imageX = imagesx($source);
- $imageY = imagesy($source);
- $thumbY = (int) (($thumbX * $imageY) / $imageX );
- }
- if ($aukstis != "") {
- $thumbY = $aukstis;
- $imageX = imagesx($source);
- $imageY = imagesy($source);
- $thumbX = (int) (($thumbY * $imageX) / $imageY );
- }
- $dest = imagecreatetruecolor($thumbX, $thumbY);
- imagecopyresampled ($dest, $source, 0, 0, 0, 0, $thumbX, $thumbY, $imageX, $imageY);
- imagejpeg($dest, "", "100");
- imagedestroy($dest);
- imagedestroy($source);
- ?>
- Code is not returning this:
- <div class="fotoFullRemas" style="background-position :center; background-image: url('/keleiviu-vezimas-anglija-ispanija.php?f=media/image/keleiviu-vezimas-ispanija/keleiviu-vezimas-ispanija.jpg&min=80'); width: 80px; height: 80px;"><a onclick="window.open('/keleiviu-vezimas.php?fotoid=55','Image','width=1000,height=750,scrollbars=no,toolbar=no,location=no,status=no,resizable=no,screenX=120,screenY=100');return false;" title="keleiviu vezimas ispanija 1" href="#"><img alt="keleiviu vezimas ispanija 1" src="/media/blank.gif" class="fullFoto" style="width: 80px; height: 80px;"></a></div>
- Anymore after upgrade from 5.3.28 to 5.5.11
Advertisement
Add Comment
Please, Sign In to add comment