function checkMuList(psid, cmid) { if ($Obj("pagestyle3").checked) { $Obj("cfgmulist").style.display = "table-row"; $Obj("spagelist").style.display = "none"; } else if ($Obj("pagestyle1").checked) { $Obj("cfgmulist").style.display = "none"; $Obj("spagelist").style.display = "table-row"; } else { $Obj("cfgmulist").style.display = "none"; $Obj("spagelist").style.display = "none"; } } function checkSubmitAlb() { if ($("#gallery .atlas").length > 0) { $("#gallery .atlas").each(function() { albums.push({ "img": $(this).find("img").attr("src"), "txt": $(this).find("input").val() }) }) } $("#albums").val(JSON.stringify(albums)); return true; } function delAlbPic(pid) { var tgobj = $Obj("atlasok" + pid); fetch("swfupload.php?dopost=del&id=" + pid).then(resp => resp.text()).then((d) => { tgobj.innerHTML = d; $Obj("gallery").removeChild(tgobj); }); } function delAlbPicOld(picfile, pid) { var tgobj = $Obj("albold" + pid); fetch("swfupload.php?dopost=delold&picfile=" + picfile).then(resp => resp.text()).then((d) => { tgobj.innerHTML = d; $Obj("galleryedit").removeChild(tgobj); }); } function seePicNewAlb(f, imgdid, frname, hpos, acname) { var newobj = null; if (f.value == '') return; vImg = $Obj(imgdid); picnameObj = document.getElementById("picname"); nFrame = $Nav() == $Obj(frname); nForm = f.form; if (nForm.detachEvent) nForm.detachEvent("onsubmit", checkSubmitAlb); else nForm.removeEventListener("submit", checkSubmitAlb, false); nForm.action = "archives_do.php"; 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; document.body.appendChild(newobj); newobj.innerHTML = ''; } newobj.style.display = "block"; nForm.action = acname; nForm.dopost.value = "save"; nForm.target = ''; nForm.litpic.disabled = true; } var atlasimg = 0; function addImage(src, pid) { var newImgDiv = document.createElement("div"); var delstr = ''; atlasimg++; if (pid != 0) { atlasimg = 'ok' + pid; delstr = '
删除

'; } else { atlasimg = 'err' + atlasimg; } newImgDiv.className = 'atlas'; newImgDiv.id = 'atlas' + atlasimg; document.getElementById("gallery").appendChild(newImgDiv); newImgDiv.innerHTML = '
' + delstr; if (typeof arctype != 'undefined' && arctype == 'article') { if (pid != 0) { newImgDiv.innerHTML = '
' + delstr; } } newImgDiv.innerHTML += '
'; }