_tema = $tema; $this->_db = $db; $this->_dil = $dil; $this->_lang = $lang; } //======================================================================== // KÜÇÜK RESİM GÖRÜNTÜSÜ OLUŞTUR //======================================================================== function Thumb($image,$w,$h) { $image_data = imagecreatefromjpeg($image); // Original width && height $width = imagesx($image_data); $height = imagesy($image_data); // create $new = imagecreatetruecolor($w, $h); imagecopyresampled($new, $image_data, 0, 0, 0, 0, $w, $h, $width, $height); // Finally, output.. $image_data = imagejpeg($new); // Flush memory imagedestroy($image_data); imagedestroy($new); } //======================================================================== // EKLENMİŞ GALERİ GÖSTERİR //======================================================================== function GaleriGoster($id,$template,$limit){ if($limit==0){ $limitle = "LIMIT $limit"; } else { $limitle = ""; } $query = $db->Query("SELECT * FROM " . PREFIX . "_galeriresim WHERE galeriid = $id AND dil ='".$this->_dil."' ORDER BY sira $limitle"); $t_width = 140; $t_height = 100; $galeri = array(); while ($resim = $query->fetchrow()) { $resim->thumblink = "index.php?sayfa=galeri&bolum=resimdetay&resimid=" . $resim->resimid . ""; $resim->thumbyarat = $this->thumb($resim->yol,$t_width,$t_height); array_push($galeri, $resim); } $this->_tema->assign('galeri', $galeri); $this->_tema->assign('lang', $this->_lang); $pre_tpl = $this->_tema->fetch($template); } } ?>