📄 functionmanage.asp
字号:
loop
rs88.close
set rs88=nothing
conn.execute ("delete from "&tabName&" where "& fieldName &" in ("&selectid&")")
response.Redirect "?action="&request("action")&"&page="&request("page")&"&keyword="&request("keyword")&"&class="&request("class")
end if
Response.Write"<tr>"
Response.Write"<td height='22' class='forumRowHighlight STYLE1'> </td>"
Response.Write"<td height='22' colspan='10' class='forumRowHighlight' align='right'>全选"
Response.Write"<input type='checkbox' name='checkbox' value='Check All' onClick='mm()'>"
Response.Write"<input type='submit' name='Submit' value='删 除' onClick='return test();' class=button> </td>"
Response.Write"</tr>"
end function
'--------------------------------------------------------------------
'函数名:DelNews()
'作 用:删除信息
'--------------------------------------------------------------------
function DelNews(tabName,fieldName)
selectid=request("selectid")
if selectid<>"" then
set rs88=conn.execute("select * from "&tabName&" where "& fieldName &" in ("&selectid&")")
do while not rs88.eof
DelFile(rs88("PicName"))
rs88.movenext
loop
rs88.close
set rs88=nothing
conn.execute ("delete from "&tabName&" where "& fieldName &" in ("&selectid&")")
response.Redirect "?action="&request("action")&"&page="&request("page")&"&keyword="&request("keyword")&"&class="&request("class")
end if
Response.Write"<tr>"
Response.Write"<td height='22' class='forumRowHighlight STYLE1'> </td>"
Response.Write"<td height='22' colspan='10' class='forumRowHighlight' align='right'>全选"
Response.Write"<input type='checkbox' name='checkbox' value='Check All' onClick='mm()'>"
Response.Write"<input type='submit' name='Submit' value='删 除' onClick='return test();' class=button> </td>"
Response.Write"</tr>"
end function
'--------------------------------------------------------------------
'函数名:DelProClass()
'作 用:删除信息类别
'--------------------------------------------------------------------
function DelProClass(tabName,fieldName)
selectid=request("selectid")
if selectid<>"" then
set rs88=conn.execute("select * from Product where ClassID in ("&selectid&")")
do while not rs88.eof
DelFile(rs88("SmallPic"))
DelFile(rs88("BigPic"))
rs88.movenext
loop
rs88.close
set rs88=nothing
conn.execute ("delete from "&tabName&" where "& fieldName &" in ("&selectid&")")
response.Redirect "?action="&request("action")&"&page="&request("page")&"&keyword="&request("keyword")&"&class="&request("class")
end if
Response.Write"<tr>"
Response.Write"<td height='22' class='forumRowHighlight STYLE1'> </td>"
Response.Write"<td height='22' colspan='10' class='forumRowHighlight' align='right'>全选"
Response.Write"<input type='checkbox' name='checkbox' value='Check All' onClick='mm()'>"
Response.Write"<input type='submit' name='Submit' value='删 除' onClick='return test();' class=button> </td>"
Response.Write"</tr>"
end function
'--------------------------------------------------------------------
'函数名:DelUpFile()
'作 用:删除产品
'--------------------------------------------------------------------
function DelUpFile(tabName,fieldName)
selectid=request("selectid")
if selectid<>"" then
set rs88=conn.execute("select * from "&tabName&" where "& fieldName &" in ("&selectid&")")
do while not rs88.eof
DelFile(rs88("FileName"))
rs88.movenext
loop
rs88.close
set rs88=nothing
conn.execute ("delete from "&tabName&" where "& fieldName &" in ("&selectid&")")
response.Redirect "?action="&request("action")&"&page="&request("page")&"&keyword="&request("keyword")&"&class="&request("class")
end if
Response.Write"<tr>"
Response.Write"<td height='22' class='forumRowHighlight STYLE1'> </td>"
Response.Write"<td height='22' colspan='10' class='forumRowHighlight' align='right'>全选"
Response.Write"<input type='checkbox' name='checkbox' value='Check All' onClick='mm()'>"
Response.Write"<input type='submit' name='Submit' value='删 除' onClick='return test();' class=button> </td>"
Response.Write"</tr>"
end function
'--------------------------------------------------------------------
'函数名:DelFile()
'作 用:删除文件
'--------------------------------------------------------------------
function DelFile(FileName)
Set Fso=server.createobject("scripting.filesystemobject")
on error resume next
FileName=server.mappath("/UpLoadFile/"&FileName)
Fso.DeleteFile FileName
Set Fso=nothing
end function
'--------------------------------------------------------------------
'函数名:ChangePage()
'作 用:分页
'--------------------------------------------------------------------
function ChangePage()
Response.Write "<form action=?"&url&"&page="&request("page")&" method=""post"" name=form2>"
Response.Write "<tr>"
Response.Write "<td height=""22"" colspan=""12"" align=""center"" class=""forumrow"">"
Response.Write "共有"&int(intCount)&"记录,分"&int(intPageCount)&"页,"
if page=1 then
response.Write("首页 前页 ")
else
response.Write("<a href="&request.ServerVariables("SCRIPT_NAME")&"?"&url&"page=1>首页</a> <a href="&request.ServerVariables("SCRIPT_NAME")&"?"&url&"page="&page-1&">前页</a> ")
end if
if page = intpagecount then
response.Write("下页 末页 ")
else
response.Write("<a href="&request.ServerVariables("SCRIPT_NAME")&"?"&url&"page="&page+1&">下页</a> <a href="&request.ServerVariables("SCRIPT_NAME")&"?"&url&"page="&intpagecount&">末页</a>")
end if
Response.Write "当前页"&int(Page)&",每页显示"&int(intPageSize)&"条记录 页数:转到<font class=""songti12_1_4"">"
Response.Write "<input maxLength=""8"" size=""4"" name=""page"" value="&page&">"
Response.Write "<input type=""hidden"" value="&word&" name=""word"">页<span lang=""en-us""> </span>"
Response.Write "<input type=""submit"" value=""转到"" class=""button"" style=""width: 40; height: 22; border-style: solid; border-width: 1px; background-color: #FFFFFF"">"
Response.Write "</font><br>"
Response.Write "</td>"
Response.Write "</tr>"
Response.Write "</form>"
end function
'--------------------------------------------------------------------
'函数名:ChangePageFront()
'作 用:分页
'--------------------------------------------------------------------
function ChangePageFront()
%>
<tr>
<td height="22" colspan="10" align="center" class="wz02">
共有<%=int(intCount)%>记录,分<%=int(intPageCount)%>页,
<%
if page=1 then
response.Write("首页 前页 ")
else
response.Write("<a href=" &request.ServerVariables("SCRIPT_NAME") &"?" &url &"page=1&keyword=" &request("keyword") &"&ModuleName=" &request("ModuleName") &">首页</a> <a href=" &request.ServerVariables("SCRIPT_NAME") &"?"&url &"page=" &page-1 &"&keyword="&request("keyword")&"&ModuleName=" &request("ModuleName") &" >前页</a> ")
end if
if page = intpagecount then
response.Write("下页 末页 ")
else
response.Write("<a href=" &request.ServerVariables("SCRIPT_NAME") &"?" &url &"page=" &page+1 &"&keyword=" &request("keyword") &"&ModuleName=" &request("ModuleName") &" >下页</a> <a href=" &request.ServerVariables("SCRIPT_NAME") &"?" &url &"page=" &intpagecount &"&keyword=" &request("keyword") &"&ModuleName=" &request("ModuleName") &">末页</a>")
end if
%>
当前页<%=int(Page)%>,每页显示<%=int(intPageSize)%>条记录 <br>
</td>
</tr>
<% end function %>
<%function ChangePageFront2()
%>
<tr>
<td height="22" colspan="10" align="center" class="wz02">
共有<%=int(intCount)%>记录,分<%=int(intPageCount)%>页,
<%
if page=1 then
response.Write("首页 前页 ")
else
response.Write("<a href=" &request.ServerVariables("SCRIPT_NAME") &"?" &url &"page=1&name=" &request.QueryString("Name") &">首页</a> <a href=" &request.ServerVariables("SCRIPT_NAME") &"?"&url &"page=" &page-1 &"&name="&request.QueryString("Name") &" >前页</a> ")
end if
if page = intpagecount then
response.Write("下页 末页 ")
else
response.Write("<a href=" &request.ServerVariables("SCRIPT_NAME") &"?" &url &"page=" &page+1 &"&name=" &request.QueryString("Name") &" >下页</a> <a href=" &request.ServerVariables("SCRIPT_NAME") &"?" &url &"page=" &intpagecount &"&name=" &request.QueryString("Name") &">末页</a>")
end if
%>
当前页<%=int(Page)%>,每页显示<%=int(intPageSize)%>条记录 <br>
</td>
</tr>
<% end function %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -