www.gusucode.com > 漂亮的地方旅游景点景观介绍网站源代码 > admin/about/aboutclass.asp
<!--#include file="../config.asp" --> <!--#include file="../../inc/page.asp" --> <% call zwtj() sub tssx(sx1,sx2) if sx1=1 then Response.Write("<span class=""fontr"">[置顶]<span>") end if if sx2=1 then Response.Write("<span class=""fontr"">[禁用]<span>") end if end sub function ymdh() if fid=0 then ymdh="" end if dim fpath,path,i fpath=getmc("Jw_aboutclass","id",fid,"fpath") path=split(fpath,",") for i=1 to (ubound(path)-1) ymdh=ymdh&"<a href=""?fid="&path(i)&""">"&getmc("Jw_aboutclass","id",path(i),"mc")&"</a> > " next end function mytit=mytit&"<a href=""?fid=0"">信息管理</a> > " select case action case "add" mytit=mytit&ymdh()&"写文章" call add() case "del" call del() case "show","" mytit=mytit&ymdh()&"文章列表" call show() case "ups" mytit=mytit&ymdh()&"编辑文章" call ups() case "px" mytit=mytit&ymdh()&"文章排序" call cdpx() case "zd" call zd() case "qxzd" call qxzd() case "jy" call jy() case "qy" call qy() case "aadd" call aadd() case "doup" call doup() case "qqzz" call qqzz() end select '显示 sub show() sql="select * from Jw_aboutclass where fid="&fid&" order by zd desc,qz asc" call record(rs,sql,1) call head() %> <link href="../inc/mm.css" rel="stylesheet" type="text/css" /> <script type="text/JavaScript"> <!-- function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } //--> </script> <table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#116BAE"> <tr> <td bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td id="tit"><%= mytit %> || <a href="?action=add&fid=<%= fid %>">写文章 </a>|| <a href="?action=px&fid=<%= fid %>">文章排序</a></td> </tr> <tr> <td> <table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF"> <form name="form1" id="form1" method="post" action=""> <tr> <td width="3%" align="center" bgcolor="#C5E0F3"><strong>ID</strong></td> <td width="33%" bgcolor="#C5E0F3"><strong>信息名称</strong></td> <td width="12%" align="center" bgcolor="#C5E0F3"><strong>创建者</strong></td> <td width="12%" align="center" bgcolor="#C5E0F3"><strong>所属分类</strong></td> <td width="11%" align="center" bgcolor="#C5E0F3"><strong>权重</strong></td> <td width="12%" align="center" bgcolor="#C5E0F3"><strong>属性</strong></td> <td width="14%" align="center" bgcolor="#C5E0F3"><strong>操作</strong></td> <td width="3%" align="center" bgcolor="#C5E0F3"><input type="checkbox" name="selectall" onClick="selectit()"/></td> </tr> <% dim i,sz sz=20 i=sz dim bgc %> <div style="display:none"><% call fenpage(sz,rs,10) %></div> <% do while not rs.eof and i>0 if i mod 2=0 then bgc="#D2E9FF" else bgc="#D2E1EE" end if %> <tr id="r<%=rs("id")%>" bgcolor=<%= bgc %> onMouseOver="museing(r<%=rs("id")%>,0,'<%= bgc %>')" onMouseOut="museing(r<%=rs("id")%>,1,'<%= bgc %>')"> <td align="center"><%= rs("id") %></td> <td> <% If rs("path")<>"" Then %> <a href="<%= rs("path") %>?fid=<%= fid %>&id=<%= rs("id") %>" target="_blank"><%= rs("mc") %></a> <% Else %> <%= rs("mc") %> <% End If %> <% call tssx(rs("zd"),rs("show")) %></td> <td align="center"><a href="../sys/admin.asp?action=ups&uname=<%= rs("creater") %>"><%= rs("creater") %> </a></td> <td align="center"> <% If fid=0 Then Response.Write("根目录") else Response.Write(getmc("Jw_aboutclass","id",fid,"mc")) end if %></td> <td align="center"><%= rs("qz") %></td> <td align="center"> <% If fid=0 Then Response.Write("1级") else Response.Write(getjs("Jw_aboutclass")&"级") end if %></td> <td align="center"><table width="80" border="0" cellpadding="2" cellspacing="0"> <tr> <td width="34" valign="bottom"><a href="?fid=<%= rs("id") %>"><img src="../../images/admin/20060713191005984.gif" alt="子栏目管理" width="16" height="16" border="0" align="absbottom"/></a></td> <td width="14" valign="bottom"><a href="?action=ups&fid=<%= fid %>&id=<%= rs("id") %>"><img src="../../images/admin/20050703091537508.gif" alt="编辑信息" width="14" height="15" border="0" align="absbottom" /></a></td> <td width="17" valign="bottom"> <% If rs("show")=0 Then %> <a href="?action=jy&fid=<%= fid %>&id=<%= rs("id") %>"><img src="../../images/admin/20050703091539318.gif" alt="锁定" width="13" height="13" border="0" align="absbottom" /></a> <% Else %> <a href="?action=qy&fid=<%= fid %>&id=<%= rs("id") %>"><img src="../../images/admin/20050703091613193.gif" alt="解锁" width="12" height="13" border="0" align="absbottom" /></a> <% End If %></td> <td width="37" valign="bottom"><% If rs("zd")=0 Then %> <a href="?action=zd&fid=<%= fid %>&id=<%= rs("id") %>"><img src="../../images/admin/qxzd.gif" alt="置顶" width="16" height="16" border="0" align="absbottom" /></a> <% Else %> <a href="?action=qxzd&fid=<%= fid %>&id=<%= rs("id") %>"><img src="../../images/admin/zd.gif" alt="取消置顶" width="16" height="16" border="0" align="absbottom" /></a> <% End If %></td> </tr> </table><a href="?fid=<%= rs("id") %>"></a><a href="?action=ups&fid=<%= fid %>&id=<%= rs("id") %>"></a></td> <td align="center"><input name="idstr" type="checkbox" value="<%= rs("id") %>" onclick="td_bgcolor(r<%=rs("id")%>,1);"></td> </tr> <% i=i-1 rs.movenext loop %> <tr> <td colspan="8" bgcolor="#C5E0F3"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr> <td width="6%" bgcolor="#C5E0F3"><input name="del" type="button" class="button_1" id="del" value="删除所选" onmouseup="tjqr('您确定要删除?此操作无法逆转!','?action=del')" onmouseover="this.className='button_2'" onmouseout="this.className='button_1'"/></td> <td width="94%" align="right" bgcolor="#C5E0F3"><% call fenpage(sz,rs,10) %></td> </tr> </table></td> </tr> </form> </table></td> </tr> </table></td> </tr> </table> <% call recordend(rs) call connend() call foot() end sub '添加 sub add() call chkqx(6,1) dim path '不是根目录,则继承父目录属性 if fid<>0 then path=getmc("Jw_aboutclass","id",fid,"path") end if call head() %> <table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#116BAE"> <tr> <td bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td id="tit"><%= mytit %> || <a href="?action=px&fid=<%= fid %>">文章排序</a></td> </tr> <tr> <td height="181"> <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#FFFFFF"> <form action="" name="form1" id="form1" method="post"> <tr> <td width="11%" bgcolor="#D9ECF7">所属分类:</td> <td width="89%" bgcolor="#D9ECF7"><table border="0" cellspacing="0" cellpadding="0"> <tr> <td><input name="fidstr" readonly type="text" class="inp" id="fidstr" size="50" value="<%= getlmdh("Jw_aboutclass",fid) %>" onfocus="this.className='focus'" onblur="this.className='inp'" onclick="MM_openBrWindow('../selfid.asp?tab=Jw_aboutclass&fid=<%= fid %>','','scrollbars=yes,resizable=yes,width=400,height=300')" style="cursor:hand;"/> <input name="fid" type="hidden" id="fid" value="<%= fid %>" /></td> <td width="40" align="center"><img src="../../images/admin/20061205172113303.gif" alt="浏览" width="27" height="20" onclick="MM_openBrWindow('../selfid.asp?tab=Jw_aboutclass&fid=<%= fid %>','','scrollbars=yes,resizable=yes,width=400,height=300')" style="cursor:hand;"/></td> </tr> </table></td> </tr> <tr> <td bgcolor="#D9ECF7">名 称:</td> <td bgcolor="#D9ECF7"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="45%"><input name="mc" type="text" class="inp" id="mc" size="50" onfocus="this.className='focus'" onblur="out_mc();this.className='inp'"/></td> <td width="55%"><div id="cmc"></div></td> </tr> </table></td> </tr> <tr> <td bgcolor="#D9ECF7">关 键 字:</td> <td bgcolor="#D9ECF7"><table border="0" cellspacing="0" cellpadding="0"> <tr> <td><input name="gjzstr" type="text" class="inp" id="gjzstr" size="50"onfocus="this.className='focus'" onblur="this.className='inp'"/></td> <td width="40" align="center"><img src="../../images/admin/20061205172113303.gif" alt="浏览" width="27" height="20" style="cursor:hand;" onclick="MM_openBrWindow('../selgjz.asp','','scrollbars=yes,resizable=yes,width=600,height=400')"/></td> <td align="center"><input name="gjz" type="hidden" id="gjz" /> <span class="fonth">可以填写或选择多个关键字,用","隔开</span></td> </tr> </table></td> </tr> <tr> <td bgcolor="#D9ECF7">前台路径:</td> <td bgcolor="#D9ECF7"><input name="path" type="text" class="inp" id="path" size="50" onfocus="this.className='focus'" onblur="this.className='inp'" value="<%= path %>"/></td> </tr> <tr> <td bgcolor="#D9ECF7">浏 览 率:</td> <td bgcolor="#D9ECF7"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="45%"><input name="hits" type="text" class="inp" id="hits" onfocus="this.className='focus'" onblur="this.className='inp';out_hits()" value="0" size="50" maxlength="8"/></td> <td width="55%"><div id="chits"></div></td> </tr> </table></td> </tr> <tr> <td bgcolor="#D9ECF7">属 性:</td> <td bgcolor="#D9ECF7">置顶 <input type="checkbox" name="zd" value="1" id="zd" /> 审核 <input name="show" type="checkbox" id="show" value="0" checked="checked" /></td> </tr> <tr> <td colspan="2" bgcolor="#D9ECF7"> <input name="content" type="hidden" value="" /> <input name="spic" type="hidden" id="spic"/> <iframe id="cons" src="../../edit/ewebeditor.htm?id=content&savepathfilename=spic" scrolling="no" frameborder="0" width="100%" height="350"></iframe></td> </tr> <tr> <td colspan="2" bgcolor="#D9ECF7"><div id="msg"></div></td> </tr> <tr> <td colspan="2" bgcolor="#D9ECF7"><input onclick="goo('?action=aadd&fid=<%= fid %>')" name="go" type="button" class="button_1" id="go" value="提交" onmouseover="this.className='button_2'" onmouseout="this.className='button_1'"> <input name="reset" type="reset" class="button_1" id="reset" value="重置" onmouseover="this.className='button_2'" onmouseout="this.className='button_1'"/></td> </tr> </form> </table> </td> </tr> </table> </td> </tr> </table> <SCRIPT language="javascript" event="onkeydown" for="document"> if(event.keyCode==13&&event.srcElement.type!='button'&&event.srcElement.type!='submit'&&event.srcElement.type!='reset'&&event.srcElement.type!='textarea'&&event.srcElement.type!='') goo('?action=aadd&fid=<%= fid %>'); </SCRIPT> <% call connend() call foot() end sub '执行添加//////////////////////////////////////////////////////////////////////////////// sub aadd() call chkqx(6,1) '取值--------------------------------------------------------------------------- dim mc,qz,fid1,fpath,fpath1,content,xid,spic,show,zd,hits,path,gjz,gjzstr mc=getform("mc",1,1) fid1=getform("fid",2,1) qz=scpx("Jw_aboutclass",fid1) show=getform("show",2,1) zd=getform("zd",2,1) content=getform("content",1,1) hits=getform("hits",2,1) path=getform("path",1,1) gjz=getform("gjz",1,1) gjzstr=getform("gjzstr",1,1) spic=getpic(content) if mc="" then call errs("名称不能留空") end if if mc="" then call errs("内容不能留空") end if if fid1="" then fid1=0 end if if show="" then show=0 end if if zd="" then zd=0 end if if fid1="" then fid1=0 end if if show="" then show=0 end if if zd="" then zd=0 end if if hits="" then hits=0 end if if fid1=0 then fpath1="0," else fpath1=getmc("Jw_aboutclass","id",fid1,"fpath") end if gjz=clgjz(gjzstr) '处理编辑器图片------------------------------------------------------------------ if spic<>"" then dim str,i str=split(spic,"|") if tjsy=0 then if sylx=0 then '图片水印 for i=0 to ubound(str)-1 if str(i)<>"" then call picsy(str(i)) call addpic(str(i)) end if next else '文字水印 for i=0 to ubound(str)-1 if str(i)<>"" then call textsy(str(i)) call addpic(str(i)) end if next end if end if end if '处理图片END--------------------------------------------------------------------- '更新数据----------------------------------------------------------------------- call record(rs,"select top 1 * from Jw_aboutclass where 1=1",3) rs.addnew() rs("fid")=int(fid1) rs("fpath")=fpath1 rs("mc")=mc rs("spic")=spic rs("ctim")=now() rs("qz")=qz rs("content")=content rs("zd")=zd rs("show")=show rs("spic")=spic rs("creater")=creater rs("hits")=hits rs("path")=path rs("gjz")=gjz rs("lastm")=now() rs.update() xid=rs("id") call recordend(rs) fpath=fpath1&xid&"," conn.execute("update Jw_aboutclass set fpath='"&fpath&"' where id="&xid) if err.number>0 then call errs("有错误发生") end if call errs(0) end sub '添加END///////////////////////////////////////////////////////////////////////// '修改 sub ups() call chkqx(6,2) set rs=conn.execute("select * from Jw_aboutclass where id="&id) if rs.eof then call cc("记录不存在!") end if dim gjz,str,i,gjzstr gjz=rs("gjz") if gjz<>"" then str=split(gjz,",") for i=0 to ubound(str) gjzstr=gjzstr&getmc("Jw_newskey","id",str(i),"mc")&"," next gjzstr=left(gjzstr,len(gjzstr)-1) end if call head() %> <table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#116BAE"> <tr> <td bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td id="tit"> <%= mytit %> || <a href="?action=add&fid=<%= fid %>">写文章 </a>|| <a href="?action=px&fid=<%= fid %>">文章排序</a></td> </tr> <tr> <td> <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#FFFFFF"> <form action="" name="form1" id="form1" method="post"> <tr> <td width="14%" bgcolor="#D9ECF7">所属分类:</td> <td width="86%" bgcolor="#D9ECF7"><table border="0" cellspacing="0" cellpadding="0"> <tr> <td><input name="fidstr" readonly type="text" class="inp" id="fidstr" size="50" value="<%= getlmdh("Jw_aboutclass",rs("fid")) %>" onfocus="this.className='focus'" onblur="this.className='inp'" onclick="MM_openBrWindow('../selfid.asp?tab=Jw_aboutclass&fid=<%= fid %>','','scrollbars=yes,resizable=yes,width=400,height=300')" style="cursor:hand;"/> <input name="fid" type="hidden" id="fid" value="<%= rs("fid") %>" /></td> <td width="40" align="center"><img src="../../images/admin/20061205172113303.gif" alt="浏览" width="27" height="20" onclick="MM_openBrWindow('../selfid.asp?tab=Jw_aboutclass&fid=<%= fid %>','','scrollbars=yes,resizable=yes,width=400,height=300')" style="cursor:hand;"/></td> </tr> </table></td> </tr> <tr> <td bgcolor="#D9ECF7">名 称:</td> <td bgcolor="#D9ECF7"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="47%"><input name="mc" type="text" class="inp" id="mc" size="50" value="<%= rs("mc") %>" onfocus="this.className='focus'" onblur="out_mc();this.className='inp'"/></td> <td width="53%"><div id="cmc"></div></td> </tr> </table></td> </tr> <tr> <td bgcolor="#D9ECF7">关 键 字:</td> <td bgcolor="#D9ECF7"><table border="0" cellspacing="0" cellpadding="0"> <tr> <td><input name="gjzstr" type="text" class="inp" id="gjzstr" size="50"onfocus="this.className='focus'" onblur="this.className='inp'" value="<%= gjzstr %>"/></td> <td width="40" align="center"><img src="../../images/admin/20061205172113303.gif" alt="浏览" width="27" height="20" style="cursor:hand;" onclick="MM_openBrWindow('../selgjz.asp','','scrollbars=yes,resizable=yes,width=600,height=400')"/></td> <td align="center"><input name="gjz" type="hidden" id="gjz" value="<%= gjz %>"/> <span class="fonth">可以填写或选择多个关键字,用","隔开</span></td> </tr> </table></td> </tr> <tr> <td bgcolor="#D9ECF7">前台路径:</td> <td bgcolor="#D9ECF7"><input name="path" type="text" class="inp" id="path" size="50" onfocus="this.className='focus'" onblur="this.className='inp'" value="<%= rs("path") %>"/></td> </tr> <tr> <td bgcolor="#D9ECF7">浏 览 率:</td> <td bgcolor="#D9ECF7"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="45%"><input name="hits" type="text" class="inp" id="hits" onfocus="this.className='focus'" onblur="this.className='inp';out_hits()" size="50" maxlength="8" value="<%= rs("hits") %>"/></td> <td width="55%"><div id="chits"></div></td> </tr> </table></td> </tr> <tr> <td bgcolor="#D9ECF7">属 性:</td> <td bgcolor="#D9ECF7">置顶 <input type="checkbox" name="zd" value="1" id="zd" <% If rs("zd")=1 Then Response.Write("checked") end if%>/> 审核 <input type="checkbox" name="show" value="0" id="show" <% If rs("show")=0 Then Response.Write("checked") end if%> /></td> </tr> <tr> <td bgcolor="#D9ECF7">最后更新:</td> <td bgcolor="#D9ECF7"><input name="lastm" type="text" class="inp" id="lastm" size="50" disabled="disabled" value="<%= rs("lastm") %>" onfocus="this.className='focus'" onblur="this.className='inp'"/></td> </tr> <tr> <td colspan="2" bgcolor="#D9ECF7"> <input name="content" type="hidden" value="<%= server.HTMLEncode(rs("content")) %>" /> <input name="spic" type="hidden" id="spic" value="<%= rs("spic") %>" /> <iframe id="cons" src="../../edit/ewebeditor.htm?id=content&savepathfilename=spic" scrolling="no" frameborder="0" width="100%" height="350"></iframe></td> </tr> <tr> <td colspan="2" bgcolor="#D9ECF7"><div id="msg"></div></td> </tr> <tr> <td colspan="2" bgcolor="#D9ECF7"><input onclick="goo('?action=doup&id=<%= rs("id") %>&fid=<%= fid %>')" name="go" type="button" class="button_1" id="go" value="提交" onmouseover="this.className='button_2'" onmouseout="this.className='button_1'"> <input name="reset" type="reset" class="button_1" id="reset" value="重置" onmouseover="this.className='button_2'" onmouseout="this.className='button_1'" /></td> </tr> </form> </table> </td> </tr> </table> </td> </tr> </table> <SCRIPT language="javascript" event="onkeydown" for="document"> if(event.keyCode==13&&event.srcElement.type!='button'&&event.srcElement.type!='submit'&&event.srcElement.type!='reset'&&event.srcElement.type!='textarea'&&event.srcElement.type!='') goo('?action=doup&id=<%= rs("id") %>&fid=<%= fid %>'); </SCRIPT> <% call connend() call foot() end sub '执行修改 sub doup() call chkqx(6,2) dim mc,fid1,fpath,fpath1,content,spic,spicy,show,zd,hits,path,gjz,gjzstr mc=getform("mc",1,1) fid1=getform("fid",2,1) show=getform("show",2,1) zd=getform("zd",2,1) content=getform("content",1,1) hits=getform("hits",2,1) path=getform("path",1,1) gjz=getform("gjz",1,1) gjzstr=getform("gjzstr",1,1) if spic="" then spic=getpic(content) end if if mc="" then call errs("名称不能留空") end if if mc="" then call errs("内容不能留空") end if if fid1="" then fid1=0 end if if show="" then show=0 end if if zd="" then zd=0 end if if fid1="" then fid1=0 end if if show="" then show=0 end if if zd="" then zd=0 end if if hits="" then hits=0 end if if fid1=0 then fpath1="0,"&id&"," else fpath1=getmc("Jw_aboutclass","id",fid1,"fpath")&id&"," end if spicy=getmc("Jw_aboutclass","id",id,"spic") '删除没用到的图片//////////////////////////////////////////////////////////////////////// dim picstr,i,spicstr if spic<>spicy then if spicy<>"" then picstr=split(spicy,"|") for i=0 to ubound(picstr)-1 if instr(spic,picstr(i))=0 then call delfile(picstr(i)) end if next end if end if spicstr=split(spic,"|") for i=0 to ubound(spicstr)-1 if spicstr(i)<>"" then if instr(spicy,spicstr(i))=0 then '插入文件表,加水印 if tjsy=0 then if sylx=0 then '图片水印 call picsy(spicstr(i)) call addpic(spicstr(i)) else '文字水印 call textsy(spicstr(i)) call addpic(spicstr(i)) end if end if end if end if next dim fidy,fpathy fidy=getmc("Jw_aboutclass","id",id,"fid") fpathy=getmc("Jw_aboutclass","id",id,"fpath") '判断所属分类是否改变 if int(fidy)<>int(fid1) then if fidy=0 then call errs("一级栏目不能移动!") end if if instr(fpathy,fpath1)>0 then call errs("不能将信息转移到该栏目的子栏目下!") end if end if gjz=clgjz(gjzstr) '更新记录 call record(rs,"select * from Jw_aboutclass where id="&id,3) rs("fid")=fid1 rs("fpath")=fpath1 rs("mc")=mc rs("spic")=spic rs("content")=content rs("show")=show rs("zd")=zd rs("hits")=hits rs("path")=path rs("gjz")=gjz rs.update call recordend(rs) '更新子目录 if fidy<>fid1 then '更新子目录 call record(rs,"select * from Jw_aboutclass where instr(fpath,'"&fpathy&"')>0",3) if not rs.eof then rs("fpath")=replace(rs("fpath"),fpathy,fpath1) rs.update end if call recordend(rs) end if call zhgx("Jw_aboutclass",id) '结束///////////////////////////////////////////////////////////////////////////////////// if err.number>0 then call errs("有错误发生") end if call errs(0) end sub '删除 sub del() call chkqx(6,3) '删除单条记录 if id<>"" then dim fpath,dpic,j fpath=getmc("Jw_aboutclass","id",id,"fpath") '删除内容 set rs=conn.execute("select * from Jw_aboutclass where id="&id) do while not rs.eof '删除编辑器中的图片 if not rs("spic")="" then dpic=split(rs("spic"),"|") for j=0 to ubound(dpic)-1 call delfile(dpic(j)) next set j=nothing end if rs.movenext loop call recordend(rs) '删除子信息 conn.execute("delete * from Jw_aboutclass where instr(fpath,'"&fpath&"')>0") '删除记录 conn.execute("delete * from Jw_aboutclass where id="&id) end if '批量删除 dim idstr,iid,i idstr=replace(Trim(Request.Form("idstr"))," ","") iid=split(idstr,",") for i=0 to ubound(iid) fpath=getmc("Jw_aboutclass","id",iid(i),"fpath") set rs=conn.execute("select * from Jw_aboutclass where id="&iid(i)) do while not rs.eof '删除编辑器中的图片 if not rs("spic")="" then dpic=split(rs("spic"),"|") for j=0 to ubound(dpic) call delfile(dpic(j)) next set j=nothing end if rs.movenext loop call recordend(rs) '删除子信息 conn.execute("delete * from Jw_aboutclass where instr(fpath,'"&fpath&"')>0") '删除记录 conn.execute("delete * from Jw_aboutclass where id="&iid(i)) next call connend() response.Redirect(request.ServerVariables("HTTP_REFERER")) end sub '信息排序 sub cdpx() call chkqx(6,2) sql="select * from Jw_aboutclass where fid="&fid&" order by zd desc,qz asc" set rs=conn.execute(sql) call head() %> <table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#116BAE"> <tr> <td bgcolor="#FFFFFF"><table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td id="tit"><%= mytit %> || <a href="?action=add&fid=<%= fid %>">写文章</a></td> </tr> <tr> <td> <table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td width="3%" align="center" bgcolor="#D9ECF7"><strong>ID</strong></td> <td width="60%" bgcolor="#D9ECF7"><strong>名称</strong></td> <td width="37%" align="center" bgcolor="#D9ECF7"><strong>权重</strong></td> </tr> <% dim i i=0 dim bgc do while not rs.eof if i mod 2=0 then bgc="#D2E9FF" else bgc="#D2E1EE" end if %> <form action="?action=qqzz&fid=<%= fid %>&id=<%= rs("id") %>" name="form" id="form" method="post"> <tr id="r<%=rs("id")%>" bgcolor=<%= bgc %> onMouseOver="museing(r<%=rs("id")%>,0,'<%= bgc %>')" onMouseOut="museing(r<%=rs("id")%>,1,'<%= bgc %>')"> <td align="center"><%= rs("id") %></td> <td><%= rs("mc") %> <% call tssx(rs("zd"),rs("show")) %></td> <td align="center"><input name="qz" type="text" class="btn" id="qz" size="8" value="<%= rs("qz") %>"> <input name="Submit" type="submit" class="btn2" value="更新"></td> </tr> </form> <% i=i+1 rs.movenext loop %> <tr> <td colspan="3" bgcolor="#EAF4FB"> </td> </tr> </table></td> </tr> </table></td> </tr> </table> <% call recordend(rs) call connend() call foot() end sub sub qqzz() call chkqx(6,2) if fid="" then fid=getmc("Jw_aboutclass","id",id,"fid") end if call dopx("Jw_aboutclass",fid,id,Trim(Request.Form("qz"))) call zhgx("Jw_aboutclass",id) call connend() response.Redirect(request.ServerVariables("HTTP_REFERER")) end sub '置顶////////////////////////////////////////////////////////////////////////////////////// sub zd() call chkqx(6,2) dim val val=1 if id<>"" then call uptab("Jw_aboutclass","zd",val,"id",id) call zhgx("Jw_aboutclass",id) end if call connend() response.Redirect(request.ServerVariables("HTTP_REFERER")) end sub '取消置顶////////////////////////////////////////////////////////////////////////////////////// sub qxzd() call chkqx(6,2) dim val val=0 if id<>"" then call uptab("Jw_aboutclass","zd",val,"id",id) call zhgx("Jw_aboutclass",id) end if call connend() response.Redirect(request.ServerVariables("HTTP_REFERER")) end sub '停用////////////////////////////////////////////////////////////////////////////////////// sub jy() call chkqx(6,2) dim val val=1 if id<>"" then call uptab("Jw_aboutclass","show",val,"id",id) call zhgx("Jw_aboutclass",id) end if call connend() response.Redirect(request.ServerVariables("HTTP_REFERER")) end sub '起用////////////////////////////////////////////////////////////////////////////////////// sub qy() call chkqx(6,2) dim val val=0 if id<>"" then call uptab("Jw_aboutclass","show",val,"id",id) call zhgx("Jw_aboutclass",id) end if call connend() response.Redirect(request.ServerVariables("HTTP_REFERER")) end sub %> <script language="javascript" src="/<%= hturl %>/inc/chk.js"></script> <script language="javascript"> function goo(act) { var chk=true; if (!out_mc()){chk=false;} if (!out_content()){chk=false;} if (!out_hits()){chk=false;} if (chk==true){ GE("go").disabled="disabled"; GE("reset").disabled="disabled"; var fid=escape(GE("fid").value); var mc=escape(GE("mc").value); var content=escape(cons.getHTML()); var hits=GE("hits").value; var path=escape(GE("path").value); var gjz=escape(GE("gjz").value); var gjzstr=escape(GE("gjzstr").value); var spic=escape(GE("spic").value); var zd; var show; if (GE("zd").checked) {zd=1;} else {zd=0;} if (GE("show").checked) {show=0;} else {show=1;} var Ajax = new oAjax(act,backs); var arrKey = new Array("fid","mc","show","zd","content","hits","path","gjz","gjzstr","spic"); var arrValue =new Array(fid,mc,show,zd,content,hits,path,gjz,gjzstr,spic); Ajax.Post(arrKey,arrValue); GE("msg").innerHTML=loading; function backs(str) { if(str=="0") { GE("msg").innerHTML=ok+" 操作成功"; window.location.href="?fid=<%= fid %>" } else {GE("msg").className="d_err"; GE("msg").innerHTML=err+" "+unescape(str); GE("go").disabled=""; GE("reset").disabled=""; }}}} </script>