} elseif ($type == 'diary') { L::loadClass('diaryupload', 'upload', false); $mutiupload = new diaryMutiUpload($uid); } elseif ($type == 'message') { L::loadClass('messageupload', 'upload', false); $mutiupload = new messageMutiUpload($uid); } elseif ($type == 'cms') { require_once R_P . 'mode/cms/lib/upload/articleupload.class.php'; $mutiupload = new articleMutiUpload($uid); } elseif ($type && file_exists(R_P . "require/extents/attach/{$type}mutiupload.class.php")) { $class = $type . 'MutiUpload'; require_once S::escapePath(R_P . "require/extents/attach/{$type}mutiupload.class.php"); $mutiupload = new $class($uid); } else { L::loadClass('attmutiupload', 'upload', false); $mutiupload = new AttMutiUpload($uid, intval($_POST['fid'])); } if (($return = $mutiupload->check()) !== true) { showExtraMsg($return); } PwUpload::upload($mutiupload); $attachInfo = $mutiupload->getAttachInfo(); if ($ua && $attachInfo) { $attachService = L::loadClass('attachs', 'forum'); if ($attachInfo['path']) { $tmp = $db_ifftp ? $db_ftpweb : $attachpath; strpos($attachInfo['path'], "{$tmp}/") === 0 && ($tmpPath = substr($attachInfo['path'], strlen("{$tmp}/"))); strpos($tmpPath, "thumb/") === 0 && ($tmpPath = substr($tmpPath, 6)); $tmpPath && ($attachInfo['path'] = $attachService->getThreadAttachMini($tmpPath)); $attachInfo['attachurl'] = $tmpPath ? $tmpPath : $attachInfo['path']; }
} elseif ($type == 'diary') { L::loadClass('diaryupload', 'upload', false); $mutiupload = new diaryMutiUpload($uid); } elseif ($type == 'message') { L::loadClass('messageupload', 'upload', false); $mutiupload = new messageMutiUpload($uid); /*} elseif ($type == 'cms') { require_once(R_P . 'mode/cms/lib/upload/articleupload.class.php'); $mutiupload = new articleMutiUpload($uid);*/ } elseif ($type && file_exists(R_P . "require/extents/attach/{$type}mutiupload.class.php")) { $class = $type . 'MutiUpload'; require_once S::escapePath(R_P . "require/extents/attach/{$type}mutiupload.class.php"); $mutiupload = new $class($uid); } else { L::loadClass('attmutiupload', 'upload', false); $mutiupload = new AttMutiUpload($uid, intval($_POST['fid'])); } if (($return = $mutiupload->check()) !== true) { showExtraMsg($return); } L::loadClass('download', '', false); $downloaded = PwDownload::getRemoteFiles($urls, $mutiupload); $attachs = $mutiupload->getAttachs(); //×é×°Êä³ö $tmpArray = array(); foreach ($urls as $k => $v) { if (isset($downloaded[$k])) { $attachInfo = array_shift($attachs); if ($attachInfo['attachurl']) { list($attachInfo['attachurl']) = geturl($attachInfo['attachurl'], 'lf', $attachInfo['ifthumb'] & 1); //list($attachInfo['attachurl']) = geturl($attachInfo['attachurl'], 'lf');