📄 deleteimg.asp
字号:
<!--#include FILE="UpLoadClass.asp"-->
<%
if session("flag")=2 then
%>
<%
if not isempty(Request.form("mapid")) then
idlist=Request.form("mapid")
'if instr(idlist,",")>0 then
dim idarr
idArr=Split(idlist, ",", -1, 1)
dim id,sss
sss=""
' else
' sss=idlist
' end if
cc = LoadFile("bilder/"&Request.form("now_dir")&"/bilder.txt")
dd = LoadFile("bilder/"&Request.form("now_dir")&"/info.txt")
ccEND = InStr(cc,"&fotos=")
imglist = mid(cc,ccEND+7)
Dim MyString, MyString2, MyString3, MyString4, rowscount,imgxhtmp,modiedimgname,okcount,deleteimg
imgxhtmp=""
MyString = Split(imglist, "|", -1, 1)
LenOfArray=UBound(MyString)-Lbound(MyString)
for i = 0 to ubound(idarr)
deleteimg=CInt(idarr(i))
MyString(deleteimg)=""
next
okcount = 0
for i=0 to LenOfArray
if MyString(i)<>"" then
okcount = okcount +1
imgxhtmp=imgxhtmp&trim(MyString(i))&"|"
end if
next
if okcount >0 then
imgxhtmp=mid(imgxhtmp,1,len(imgxhtmp)-1)
end if
ccBEGIN = InStr(cc,"&anz_bilder=") + 12
ccEND = InStr(cc,"&fotos=")
ccCOUNT = CStr(okcount)
cc = "&anz_bilder="&ccCOUNT&"&fotos="
imgxhtmp=cc&imgxhtmp
call SaveToFile(imgxhtmp,"bilder/"&Request.form("now_dir")&"/bilder.txt")
'Response.write imgxhtmp
'Response.write "<br><br><br>"
ccEND = InStr(dd,"&info=")
imglist = mid(dd,ccEND+6)
imgxhtmp=""
MyString3 = Split(imglist, "|", -1, 1)
LenOfArray=UBound(MyString3)-Lbound(MyString3)
for i = 0 to ubound(idarr)
deleteimg=CInt(idarr(i))
MyString3(deleteimg)=""
next
okcount = 0
for i=0 to LenOfArray
if MyString3(i)<>"" then
okcount = okcount +1
imgxhtmp=imgxhtmp&trim(MyString3(i))&"|"
end if
next
if okcount >0 then
imgxhtmp=mid(imgxhtmp,1,len(imgxhtmp)-1)
end if
ccBEGIN = InStr(dd,"&anz_bilder=") + 12
ccEND = InStr(dd,"&info=")
ccCOUNT = CStr(okcount)
dd = "&anz_bilder="&ccCOUNT&"&info="
imgxhtmp=dd&imgxhtmp
'Response.write imgxhtmp
call SaveToFile(imgxhtmp,"bilder/"&Request.form("now_dir")&"/info.txt")
'Response.end
end if
'Response.end
Response.redirect "editupfile.asp?dirss="&Request.form("now_dir")
%>
<%else%>
<%
response.write"<script>alert('请重新登录!');history.back();</script>"
response.end
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -