| @@ 1383-1387 (lines=5) @@ | ||
| 1380 | imagecopyresampled($tim, $im, 0, 0, 0, 0, $tw, $th, $w, $h); |
|
| 1381 | ||
| 1382 | // check directories or create them |
|
| 1383 | if (!file_exists("$thumbpath/$thumb_dir1")) { |
|
| 1384 | if (!mkdir("$thumbpath/$thumb_dir1")) { |
|
| 1385 | return 'mkdir in thumbpath failed'; |
|
| 1386 | } |
|
| 1387 | } |
|
| 1388 | if (!file_exists("$thumbpath/$thumb_dir1/$thumb_dir2")) { |
|
| 1389 | if (!mkdir("$thumbpath/$thumb_dir1/$thumb_dir2")) { |
|
| 1390 | return 'mkdir in thumbpath failed'; |
|
| @@ 1388-1392 (lines=5) @@ | ||
| 1385 | return 'mkdir in thumbpath failed'; |
|
| 1386 | } |
|
| 1387 | } |
|
| 1388 | if (!file_exists("$thumbpath/$thumb_dir1/$thumb_dir2")) { |
|
| 1389 | if (!mkdir("$thumbpath/$thumb_dir1/$thumb_dir2")) { |
|
| 1390 | return 'mkdir in thumbpath failed'; |
|
| 1391 | } |
|
| 1392 | } |
|
| 1393 | ||
| 1394 | // save thumb |
|
| 1395 | if ($ext == 'jpg') { |
|