| @@ 688-702 (lines=15) @@ | ||
| 685 | } |
|
| 686 | } |
|
| 687 | // Pour l'image |
|
| 688 | if (isset($_POST['xoops_upload_file'][1])) { |
|
| 689 | $uploader_2 = new XoopsMediaUploader($uploaddir_shots, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png'), $xoopsModuleConfig['maxuploadsize'], null, null); |
|
| 690 | if ($uploader_2->fetchMedia($_POST['xoops_upload_file'][1])) { |
|
| 691 | $uploader_2->setPrefix('downloads_') ; |
|
| 692 | $uploader_2->fetchMedia($_POST['xoops_upload_file'][1]); |
|
| 693 | if (!$uploader_2->upload()) { |
|
| 694 | $errors = $uploader_2->getErrors(); |
|
| 695 | redirect_header("javascript:history.go(-1)",3, $errors); |
|
| 696 | } else { |
|
| 697 | $obj->setVar('logourl', $uploader_2->getSavedFileName()); |
|
| 698 | } |
|
| 699 | } else { |
|
| 700 | $obj->setVar('logourl', $_REQUEST['logo_img']); |
|
| 701 | } |
|
| 702 | } |
|
| 703 | // enregistrement |
|
| 704 | if ($downloads_Handler->insert($obj)) { |
|
| 705 | if (!isset($_REQUEST['downloads_modified'])) { |
|
| @@ 164-178 (lines=15) @@ | ||
| 161 | } |
|
| 162 | } |
|
| 163 | // Pour l'image |
|
| 164 | if (isset($_POST['xoops_upload_file'][1])) { |
|
| 165 | $uploader_2 = new XoopsMediaUploader($uploaddir_shots, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png'), $xoopsModuleConfig['maxuploadsize'], null, null); |
|
| 166 | if ($uploader_2->fetchMedia($_POST['xoops_upload_file'][1])) { |
|
| 167 | $uploader_2->setPrefix('downloads_') ; |
|
| 168 | $uploader_2->fetchMedia($_POST['xoops_upload_file'][1]); |
|
| 169 | if (!$uploader_2->upload()) { |
|
| 170 | $errors = $uploader_2->getErrors(); |
|
| 171 | redirect_header("javascript:history.go(-1)",3, $errors); |
|
| 172 | } else { |
|
| 173 | $obj->setVar('logourl', $uploader_2->getSavedFileName()); |
|
| 174 | } |
|
| 175 | } else { |
|
| 176 | $obj->setVar('logourl', $_REQUEST['logo_img']); |
|
| 177 | } |
|
| 178 | } |
|
| 179 | ||
| 180 | if ($downloadsmod_Handler->insert($obj)) { |
|
| 181 | $lid_dowwnloads = $obj->get_new_enreg(); |
|
| @@ 157-171 (lines=15) @@ | ||
| 154 | } |
|
| 155 | } |
|
| 156 | // Pour l'image |
|
| 157 | if (isset($_POST['xoops_upload_file'][1])) { |
|
| 158 | $uploader_2 = new XoopsMediaUploader($uploaddir_shots, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png'), $xoopsModuleConfig['maxuploadsize'], null, null); |
|
| 159 | if ($uploader_2->fetchMedia($_POST['xoops_upload_file'][1])) { |
|
| 160 | $uploader_2->setPrefix('downloads_') ; |
|
| 161 | $uploader_2->fetchMedia($_POST['xoops_upload_file'][1]); |
|
| 162 | if (!$uploader_2->upload()) { |
|
| 163 | $errors = $uploader_2->getErrors(); |
|
| 164 | redirect_header("javascript:history.go(-1)",3, $errors); |
|
| 165 | } else { |
|
| 166 | $obj->setVar('logourl', $uploader_2->getSavedFileName()); |
|
| 167 | } |
|
| 168 | } else { |
|
| 169 | $obj->setVar('logourl', $_REQUEST['logo_img']); |
|
| 170 | } |
|
| 171 | } |
|
| 172 | ||
| 173 | if ($downloads_Handler->insert($obj)) { |
|
| 174 | $lid_dowwnloads = $obj->get_new_enreg(); |
|