科讯黄页行业分类支持三级分类的方法
  • 分类:经验分享
  • 发表:2012-11-26
  • 围观(4,736)
  • 评论(1)

一个项目需要黄页有三级分类,其它的CMS系统也不是很方便,没有办法,只能自己修改,方法如下:

打开/Admin/KS.EnterPriseClass.asp文件,在193行下增加:

'2012-11-26-20-35更新下级分类
set rs2=server.createobject("adodb.recordset")
rs2.open "select * from ks_enterpriseclass where parentid=" & RS("id") & " order by orderid",conn,1,1
'Response.Write "<option value='" & RS("id") & "'> OK </option>"
do while not rs2.eof
if trim(rs2("id"))=trim(parentid) then
response.write "<option value='" & RS2("id") & "' selected> └" & rs2("classname") & "</option>"
else
response.write "<option value='" & RS2("id") & "'> └" & rs2("classname") & "</option>"
end if
rs2.movenext
loop
rs2.close
'2012-11-26-20-35 结束

2、将118行修改为:

<td height="25"><img src="../images/default/arrow_r.gif" width="6" height="10">&nbsp;<a href="?action=sub&addclass=no&id=<%=rssort("id")%>" title="进入小类管理"><%=rssort("ClassName")%></a><span>〖<%if KS.G("addclass")<>"no" then%><a href="?action=add&parentid=<%=rssort("id")%>"><span>添加小类</a> | <%End if%><a href="?action=edit&id=<%=rssort("id")%>"><span>修改</span></a>│<a href="?pid=<%=ks.g("id")%>&action=del&id=<%=rssort("id")%>&flag=sub" onClick="return(confirm('你确定要删除该类吗?'))"><span>删除</span></a>〗</span></td>

这是后台修改的部分,修改到这里,后台已经完成了对“黄页行业分类三级目录的支持”,可能前台会有些不合适的地方,下一步再操作。

Top