GetOne("SELECT * FROM `#@__uploads` WHERE aid='$aid ';"); if(!is_array($arow)) { ShowMsg('附件不存在', '-1'); exit(); } if($arow['mid'] != $cfg_ml->M_ID) { ShowMsg("你没有修改这个附件的权限!","-1"); exit(); } include(DEDEMEMBER."/templets/uploads_edit.htm"); exit(); } else if($dopost=='save') { $title = HtmlReplace($title,2); if($mediatype==1) $utype = 'image'; else if($mediatype==2) { $utype = 'flash'; } else if($mediatype==3) { $utype = 'media'; } else { $utype = 'addon'; } $title = HtmlReplace($title, 2); $oldurl = HtmlReplace($oldurl); $exname = preg_replace("#(.*)/#", "", $oldurl); $exname = preg_replace("#\.(.*)$#", "", $exname); $filename = MemberUploads('addonfile', $oldurl, $cfg_ml->M_ID, $utype,$exname, -1, -1, TRUE); SaveUploadInfo($title, $filename, $mediatype); ShowMsg("成功修改文件!", "uploads_edit.php?aid=$aid"); }