Файл: vsime.com/files/inc/act_prev.php
Строк: 22
<?php
$file = mysqli_fetch_array(mysqli_query($dbi, "SELECT * FROM `files` WHERE `id` = '".intval($_GET['id'])."' AND `type` = 'file'"));
if ($file != NULL) {
$dir = dir_files_info($file['id_dir']);
$ank = profile($file['id_user']); // гг
if (!dir_files_access($dir, NULL, 1)) {
dir_files_access($dir, access_denied());
}
$width = intval($_GET['width']);
$height = intval($_GET['height']);
if ($width == 48 && $height == 48 || $width == 128 && $height == 128 || $width == 96 && $height == 96 || $width == 256 && $height == 256 || $width == 400 && $height == 400) {
$file['path'] = H."system/files/files/users/user$file[id_user]/dir$file[id_dir]/".$file['id'].".dat";
$name = create_screen($file['path'], NULL, $width, $height, NULL, NULL, 1);
if ($name)exit();
$text = "Invalid image";
} else {
$text = "Invalid size of image";
}
} else {
$text = "File not founded";
}
header("Content-type: image/png");
$image = imagecreate(200, 18);
$background_color = imagecolorallocate ($image, 255, 255, 255);
$count_chars = 2;
$black = imagecolorallocate($image, 255, 0, 0);
ImageString($image,6,$count_chars,1,$text,$black);
imagepng($image);
imagedestroy($image);
exit();
?>