Решение проблем по всему.
- Создан 4 февраля 2016
- Топиков 55
Vova1234
Модераторы (0)
Модераторов здесь не замечено
UPDATE dle_post SET short_story = REPLACE (short_story, 'bincobox.com', 'vova1234.com');
UPDATE dle_post SET full_story = REPLACE (full_story, 'bincobox.com', 'vova1234.com');
root@s1:~# /usr/bin/apt-get -qy remove awstats
Reading package lists...
Building dependency tree...
Reading state information...
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libc-dev-bin : Depends: libc6 (> 2.19) but 2.13-38+deb7u8 is to be installed
libc6-dev : Depends: libc6 (= 2.19-18+deb8u1) but 2.13-38+deb7u8 is to be insta lled
libc6-i386 : Depends: libc6 (= 2.19-18+deb8u1) but 2.13-38+deb7u8 is to be inst alled
locales : Depends: libc-bin (> 2.19)
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a s olution).
function createsquarethumbnail($filetype, $origfile, $thumbfile, $new_size) {
$compression = "gd2";
if ($filetype == 1) { $origimage = imagecreatefromgif($origfile); }
elseif ($filetype == 2) { $origimage = imagecreatefromjpeg($origfile); }
elseif ($filetype == 3) { $origimage = imagecreatefrompng($origfile); }
$old_x = imagesx($origimage);
$old_y = imagesy($origimage);
$x = 0; $y = 0;
if ($old_x > $old_y) {
$x = ceil(($old_x - $old_y) / 2);
$old_x = $old_y;
} elseif ($old_y > $old_x) {
$y = ceil(($old_y - $old_x) / 2);
$old_y = $old_x;
}
$new_image = imagecreatetruecolor($new_size,$new_size);
if ($filetype == 3 && $compression != "gd1") {
imagealphablending($new_image, false);
imagesavealpha($new_image, true);
}
imagecopyresampled($new_image,$origimage,0,0,$x,$y,$new_size,$new_size,$old_x,$old_y);
if ($filetype == 1) { imagegif($new_image,$thumbfile,100); }
elseif ($filetype == 2) { imagejpeg($new_image,$thumbfile,100); }
elseif ($filetype == 3) { imagepng($new_image,$thumbfile,5); }
imagedestroy($origimage);
imagedestroy($new_image);
}
createsquarethumbnail(3, getcwd()."/photo.png", getcwd()."/photo_box.png", 150);
для PNG например.