php header content-type image jpeg _string _num _GET image imageCreate

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?php
header('content-type: image/jpeg');
$g = _string(_num($_GET['g']));
$image = imageCreateFromPng('./images/maneken_/'.$g.'.png');
$w_7 = _string(_num($_GET['w_7']));
$w_7_item = _mysql_query('SELECT * FROM `items` WHERE `id` = "'.$w_7.'"');
$w_7_item = mysql_fetch_array($w_7_item);
if($w_7 && is_file('./images/maneken_/'.$g.'/'.$w_7.'.png') && $w_7_item['w'] == 7) {
$w_7_image = imageCreateFromPng('./images/maneken_/'.$g.'/'.$w_7.'.png');
imagecopy($image, $w_7_image, 0, 0, 0, 0, 120, 160);
}
$w_8 = _string(_num($_GET['w_8']));
$w_8_item = _mysql_query('SELECT * FROM `items` WHERE `id` = "'.$w_8.'"');
$w_8_item = mysql_fetch_array($w_8_item);
if($w_8 && is_file('./images/maneken_/'.$g.'/'.$w_8.'.png') && $w_8_item['w'] == 8) {
$w_8_image = imageCreateFromPng('./images/maneken_/'.$g.'/'.$w_8.'.png');
imagecopy($image, $w_8_image, 0, 0, 0, 0, 120, 160);
}
$w_3 = _string(_num($_GET['w_3']));
$w_3_item = _mysql_query('SELECT * FROM `items` WHERE `id` = "'.$w_3.'"');
$w_3_item = mysql_fetch_array($w_3_item);
if($w_3 && is_file('./images/maneken_/'.$g.'/'.$w_3.'.png') && $w_3_item['w'] == 3) {
$w_3_image = imageCreateFromPng('./images/maneken_/'.$g.'/'.$w_3.'.png');
imagecopy($image, $w_3_image, 0, 0, 0, 0, 120, 160);
}
$w_1 = _string(_num($_GET['w_1']));
$w_1_item = _mysql_query('SELECT * FROM `items` WHERE `id` = "'.$w_1.'"');
$w_1_item = mysql_fetch_array($w_1_item);
if($w_1 && is_file('./images/maneken_/'.$g.'/'.$w_1.'.png') && $w_1_item['w'] == 1) {
$w_1_image = imageCreateFromPng('./images/maneken_/'.$g.'/'.$w_1.'.png');
imagecopy($image, $w_1_image, 0, 0, 0, 0, 120, 160);
}
$w_2 = _string(_num($_GET['w_2']));
$w_2_item = _mysql_query('SELECT * FROM `items` WHERE `id` = "'.$w_2.'"');
$w_2_item = mysql_fetch_array($w_2_item);
if($w_2 && is_file('./images/maneken_/'.$g.'/'.$w_2.'.png') && $w_2_item['w'] == 2) {
$w_2_image = imageCreateFromPng('./images/maneken_/'.$g.'/'.$w_2.'.png');
imagecopy($image, $w_2_image, 0, 0, 0, 0, 120, 160);
}
$w_4 = _string(_num($_GET['w_4']));
$w_4_item = _mysql_query('SELECT * FROM `items` WHERE `id` = "'.$w_4.'"');
$w_4_item = mysql_fetch_array($w_4_item);
if($w_4 && is_file('./images/maneken_/'.$g.'/'.$w_4.'.png') && $w_4_item['w'] == 4) {
$w_4_image = imageCreateFromPng('./images/maneken_/'.$g.'/'.$w_4.'.png');
imagecopy($image, $w_4_image, 0, 0, 0, 0, 120, 160);
}
$w_6 = _string(_num($_GET['w_6']));
$w_6_item = _mysql_query('SELECT * FROM `items` WHERE `id` = "'.$w_6.'"');
$w_6_item = mysql_fetch_array($w_6_item);
if($w_6 && is_file('./images/maneken_/'.$g.'/'.$w_6.'.png') && $w_6_item['w'] == 6) {
$w_6_image = imageCreateFromPng('./images/maneken_/'.$g.'/'.$w_6.'.png');
imagecopy($image, $w_6_image, 0, 0, 0, 0, 120, 160);
}
$w_5 = _string(_num($_GET['w_5']));
$w_5_item = _mysql_query('SELECT * FROM `items` WHERE `id` = "'.$w_5.'"');
$w_5_item = mysql_fetch_array($w_5_item);
if($w_5 && is_file('./images/maneken_/'.$g.'/'.$w_5.'.png') && $w_5_item['w'] == 5) {
$w_5_image = imageCreateFromPng('./images/maneken_/'.$g.'/'.$w_5.'.png');
imagecopy($image, $w_5_image, 0, 0, 0, 0, 120, 160);
}
imagepng($image);
?>