Current Path : /data/web/virtuals/51568/virtual/www/www/fotopruh/ |
Current File : /data/web/virtuals/51568/virtual/www/www/fotopruh/fotopruh-galerie-kopiruj.php |
<?php require "../../class/pdoDB.class.php"; require "../../class/obrazek.class.php"; $pdo = new pdoDB(); $fotka = (isset($_POST["fotka"])) ? $_POST["fotka"] : ""; $fotkaObj = json_decode($fotka); $sql = "SELECT `folder` FROM `soubory_galerie` g left join `soubory` s on s.`galerie_id` = g.`id` WHERE s.`id` = :id"; $folder = $pdo->queryOne($sql, Array(':id' => $fotkaObj->id)); $targetTmp = '../../_web/footerimg/'.$fotkaObj->id.'tmp.jpg'; $target = '../../_web/footerimg/'.$fotkaObj->id.'.jpg'; $source = '../../ftp/galerie/'.$folder->folder.'/'.$fotkaObj->id.'.jpg'; copy($source, $targetTmp); $obrazek=new Obrazek(); $obrazek->nastav($targetTmp,$targetTmp); $obrazek->zmensi90($target); unlink ($targetTmp); ?>