function showUploadMsg($msg)
{
    if (function_exists('showExtraMsg')) {
        showExtraMsg($msg);
    } else {
        Showmsg($msg);
    }
}
Пример #2
0
 } 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'];
     }
 }
 echo pwJsonEncode($attachInfo);
 ajax_footer();