@@ 1443-1447 (lines=5) @@ | ||
1440 | imagecopyresampled($tim, $im, 0, 0, 0, 0, $tw, $th, $w, $h); |
|
1441 | ||
1442 | // check directories or create them |
|
1443 | if (!file_exists("$thumbpath/$thumb_dir1")) { |
|
1444 | if (!mkdir("$thumbpath/$thumb_dir1")) { |
|
1445 | return 'mkdir in thumbpath failed'; |
|
1446 | } |
|
1447 | } |
|
1448 | if (!file_exists("$thumbpath/$thumb_dir1/$thumb_dir2")) { |
|
1449 | if (!mkdir("$thumbpath/$thumb_dir1/$thumb_dir2")) { |
|
1450 | return 'mkdir in thumbpath failed'; |
|
@@ 1448-1452 (lines=5) @@ | ||
1445 | return 'mkdir in thumbpath failed'; |
|
1446 | } |
|
1447 | } |
|
1448 | if (!file_exists("$thumbpath/$thumb_dir1/$thumb_dir2")) { |
|
1449 | if (!mkdir("$thumbpath/$thumb_dir1/$thumb_dir2")) { |
|
1450 | return 'mkdir in thumbpath failed'; |
|
1451 | } |
|
1452 | } |
|
1453 | ||
1454 | // save thumb |
|
1455 | if ($ext == 'jpg') { |