if (empty($pdp->settings['image_ext'])) {
     fallback(FUSION_SELF . '?did=' . $download->id);
 }
 if (!empty($download->data['dl_pic'])) {
     $download->log_event($log_event, PDP_EIMG);
     fallback(FUSION_SELF . '?did=' . $download->id . '&errno=' . PDP_EIMG);
 }
 if (!isset($_FILES['upload'])) {
     $download->log_event($log_event, PDP_EUPLOAD);
     fallback(FUSION_SELF . "?did=" . $download->id . '&errno=' . PDP_EUPLOAD);
 }
 $ext = explode(',', $pdp->settings['image_ext']);
 foreach ($ext as $key => $val) {
     $ext[$key] = '.' . $val;
 }
 $errno = pdp_upload_file($_FILES['upload'], $pdp->settings['upload_image'], $pdp->settings['image_max'], $ext, $screen_fn);
 if ($errno) {
     $download->log_event($log_event, $errno);
     fallback(FUSION_SELF . '?did=' . $download->id . '&errno=' . $errno);
 }
 $file = $pdp->settings['upload_image'] . $screen_fn;
 if (!verify_image($file)) {
     $download->log_event($log_event, PDP_EIMGVERIFY);
     unlink($file);
     fallback(FUSION_SELF . "?did=" . $download->id . "&errno=" . PDP_EIMGVERIFY);
 }
 // check size
 if ($pdp->settings['image_max_w']) {
     $size = getimagesize($file);
     if ($size === false) {
         $log_event = PDP_EV_PICUPLOAD;
     // try UPLOAD last
 } elseif (isset($_FILES['upload']) && $_FILES['upload']['error'] != UPLOAD_ERR_NO_FILE) {
     if (empty($pdp->settings['file_ext'])) {
         fallback(FUSION_SELF . "?did=" . $download->id);
     }
     $log_event = PDP_EV_FILEUPLOAD;
     // cannot be updated.
     if (isset($file_id)) {
         $download->log_event($log_event, PDP_EACCESS);
         fallback(FUSION_SELF . "?did=" . $download->id . "&errno=" . PDP_EACCESS);
     }
     $ext = explode(",", $pdp->settings['file_ext']);
     foreach ($ext as $key => $val) {
         $ext[$key] = "." . $val;
     }
     $errno = pdp_upload_file($_FILES['upload'], $upload_dir, $pdp->settings['file_max'], $ext, $url);
     if ($errno) {
         $download->log_event($log_event, $errno);
         fallback(FUSION_SELF . "?did=" . $download->id . "&errno={$errno}");
     }
     if (empty($size)) {
         $size = parsebytesize(filesize($upload_dir . $url));
     }
 } else {
     //FIXME		fallback(FUSION_SELF.'?did='.$download->id);
     $url = 'file_url';
 }
 $ver = stripinput($_POST['version']);
 $desc = stripinput($_POST['desc']);
 $now = time();
 if (empty($url)) {