function SeePicNew(f, imgdid, frname, hpos, acname, formname, picname, picvalue) { var formname = formname ? formname : 'save'; var picname = picname ? picname : 'picname'; var picvalue = picvalue ? picvalue : 'picname'; var imgdid = imgdid ? imgdid : 'divpicview'; var newobj = null; if(f.value=='') return ; vImg = $Obj(imgdid); picnameObj = document.getElementById(picname); nFrame = $Nav()=='IE' ? eval('document.frames.'+frname) : $Obj(frname); nForm = f.form; if(nForm.detachEvent) nForm.detachEvent("onsubmit", checkSubmit); else nForm.removeEventListener("submit", checkSubmit, false); if(picname == 'picname') var picname = 'litpic'; nForm.action = 'archives_do.php?litpic='+picname+'&picname='+picvalue+'&divpicview='+imgdid; nForm.target = frname; nForm.dopost.value = 'uploadLitpic'; nForm.submit(); picnameObj.value = ''; newobj = $Obj('uploadwait'); if(!newobj) { newobj = document.createElement("DIV"); newobj.id = 'uploadwait'; newobj.style.position = 'absolute'; newobj.className = 'uploadwait'; newobj.style.width = 120; newobj.style.height = 20; newobj.style.top = hpos; newobj.style.left = 100; newobj.style.display = 'block'; document.body.appendChild(newobj); newobj.innerHTML = '<img src="images/loadinglit.gif" width="16" height="16" alit="" />上傳中...'; } newobj.style.display = 'block'; nForm.action = acname; nForm.dopost.value = formname; nForm.target = ''; } 2、打開 dedearchives_do.php 找到 else if($dopost=="uploadLitpic") { |
else if($dopost=="uploadLitpic") { $fname = $_GET['litpic'] ? $_GET['litpic'] : 'litpic'; $upfile = AdminUpload($fname, 'imagelit', 0, true ); if($upfile=='-1') { $msg = "<script language='javascript'> parent.document.getElementById('uploadwait').style.display = 'none'; alert('你沒指定要上傳的文件或文件大小超過限制!'); </script>"; } else if($upfile=='-2') { $msg = "<script language='javascript'> parent.document.getElementById('uploadwait').style.display = 'none'; alert('上傳文件失敗,請檢查原因!'); </script>"; } else if($upfile=='0') { $msg = "<script language='javascript'> parent.document.getElementById('uploadwait').style.display = 'none'; alert('文件類型不正確!'); </script>"; } else { if(!empty($cfg_uplitpic_cut) && $cfg_uplitpic_cut=='N') { $msg = "<script language='javascript'> parent.document.getElementById('uploadwait').style.display = 'none'; parent.document.getElementById('{$_GET[picname]}').value = '{$upfile}'; if(parent.document.getElementById('{$_GET[divpicview]}')) { parent.document.getElementById('{$_GET[divpicview]}').style.width = '150px'; parent.document.getElementById('{$_GET[divpicview]}').innerHTML = "<img src='{$upfile}?n' width='150' />"; } </script>"; } else { $msg = "<script language='javascript'> parent.document.getElementById('uploadwait').style.display = 'none'; window.open('imagecut.php?f={$_GET[picname]}&isupload=yes&file={$upfile}', 'popUpImagesWin', 'scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=150, top=50'); </script>"; } } echo $msg; exit(); } |
版權(quán)聲明: 本站資源均來自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!
轉(zhuǎn)載請注明: 織夢模板下載讓模型里的圖片字段支持本地上傳的辦法