<!--#include file="../conn.asp"-->
<!--#include file="admin_check.asp"-->
<!--#include file="../inc/function.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>管理页面</title>
<link id="maincss" rel="stylesheet" href="images/css/admin_style_<%= AdminSkin %>.css" type="text/css" media="all" />
<script language="JavaScript" src="../js/class.js"></script>
<script language="javascript" src="../js/askA.js"></script>
<script language="javascript">
 function Cdiv()
 {
 if(classM.innerHTML!='请选择栏目,不选即是调用所有分类')
 {
 classM1.innerHTML=classM1.innerHTML+classM.innerHTML;
 classM.innerHTML='请选择栏目';
 }
 }


function OutCode()
{
//	if (document.getElementById("selectC")==null)
//	{
//		alert("请选择调用类别！");
//		return false;
//	}
}
</script>
<style type="text/css">
<!--
.ml li {
	width: 100%;
}
.OutCodeS{
	width: 100%;
}
.OutCodeS Div{
	float: left;
}
.s6 {
	width: 70px;
}
.st {
	width: 140px;
}
.s7 {
	width: 60px;
}
.s8 {
	width: 88px;
}
.s9 {
	width: 60px;
}
.s10 {
	width: 60px;
}
.s11 {
	width: 60px;
}
.s12 {
	width: 60px;
}
.s13 {
	width: 60px;
}
-->
</style>
</head>
<body leftmargin="0" bottommargin="0" rightmargin="0" topmargin="5" marginheight="0" marginwidth="0" bgcolor="#DDEEFF">
<%
Call chkFlag(3)
Dim AskD
opendb
Set AskD = Server.CreateObject("KwAsk.FunAsk")
	set AskD.myConn =conn
	AskD.myPredb =predb
	AskD.Getsetting()
	siteinfo=AskD.siteinfo
	setting=AskD.setting
	regForm=AskD.regForm
Dim Act
Act=Trim(Request.QueryString("act"))
select case act
  case "save"
    call saveM()
  case "add"
    call add()
  case "modi"
    call add()
  case "view"
    call view()
  case "del"
    call del()
  case "modisave"
    call modisave()
  case else
    call main()
end select
set AskD.myConn =Nothing
closedb
Set AskD = Nothing

sub del()
  dim id
  id=Trim(Request.QueryString("id"))
  if id<>"" then
  conn.execute("delete from "&predb&"outcode where id in("&id&")")
  
  Call SendMsg("恭喜您,删除成功！")
  end if
  Response.Write("<script>setTimeout(""location.href='?';"",2000);</script>")
end sub

Sub saveM()
	Dim classid,i,passurl,FormS,ftime
	classid=Trim(Request.Form("selectC"))
	passurl=Trim(Request.Form("passUrl"))
	ftime=Trim(Request.Form("ftime"))
	IF classid="" Then classid=0
	for i=1 to 16
	  FormS=FormS&"|"&Trim(Request.Form("set"&i))
	next
	conn.execute("insert into "&predb&"OutCode (ClassId,FormS,passUrl,ftime,AddTime) values('"&ClassId&"','"&FormS&"','"&passUrl&"',"&ftime&",'"&now()&"')")
	Call SendMsg("恭喜您,添加成功！")
	Response.Write("<script>setTimeout(""location.href='?';"",2000);</script>")
End Sub

Sub modisave()
	Dim classid,i,passurl,FormS,ftime,id
	id=Trim(Request.Form("id"))
	classid=Trim(Request.Form("selectC"))
	passurl=Trim(Request.Form("passUrl"))
	ftime=Trim(Request.Form("ftime"))
	IF classid="" Then classid=0
	for i=1 to 16
	  FormS=FormS&"|"&Trim(Request.Form("set"&i))
	next
	conn.execute("update "&predb&"OutCode set ClassId='"&ClassId&"',FormS='"&FormS&"',passUrl='"&passUrl&"',ftime="&ftime&",AddTime='"&now()&"' where id="&id)
	Call SendMsg("恭喜您,修改成功！")
	Response.Write("<script>setTimeout(""location.href='?act=modi&id="&id&"';"",2000);</script>")
End Sub

sub view()
dim id
id=Trim(Request.QueryString("id"))
%>
<table class="tableBorder" cellspacing="1" cellpadding="2" width="96%" align="center" border="0">
  <tr>
	<th height="25" align="left">问题调用预览</th>
  </tr>
  <tr>
    <td class="TableRow1"><font color="#008800"><strong>调用代码：</strong>&nbsp; &lt;script language="javascript" src="<%=siteInfo(0)&siteInfo(1)%>showCode.asp?id=<%= id %>" charset="utf-8">&lt;/script&gt;</font></td>
  </tr>
  <tr>
    <td class="TableRow2">
<div class="ml">
<% 
Dim rs,rs1,ClassId,FormS,passUrl,Ftime,TopNum,ClassTitle,AskTitle,sqla,Targert,DateTime,xshang,classn,classstr,p
   set rs=conn.execute("select * from "&predb&"outcode where id="&id)
   if rs.bof and rs.eof then
   Response.Write("暂无该调用")
   else
   ClassId=rs("ClassId")
   FormS=rs("FormS")
   passUrl=rs("passUrl")
   Ftime=rs("Ftime")
   end if
   set rs=nothing
   FormS=split(FormS,"|")
   
	select case FormS(1)
	  case "1"
		 sqla=" and state=0"
	  case "2"
		 sqla=" and xShang>=50"
	  case "3"
		 sqla=" and state=4"
	  case "4"
		 sqla=" and ansNum=0"
	  case "5"
		 sqla=" and(state=1 or state=5  or state=6  or state=7)"
	  case "6"
		 sqla=" and isStrong=1"
	end select
   
   IF FormS(5)>0 Then TopNum=" Top "&FormS(5)&" "
   
   IF ClassId="0" Then
      set rs=conn.execute("select "&TopNum&"* from "&predb&"ask a inner join "&predb&"class b on a.sclass=b.ClassId Where ispass=1"&sqla&" order by askid desc")
   Else  
      IF instr(ClassId,",")>0 Then
	     Classn=Split(ClassID,", ")
		 For p=0 To ubound(Classn)
		   ClassStr=ClassStr&" or ','+b.ParentStr+',' like '%,"&Classn(p)&",%' "
		 Next
	  Else
	       ClassStr=ClassStr&" or ','+b.ParentStr+',' like '%,"&ClassID&",%' "
	  End IF
      set rs=conn.execute("select "&TopNum&"* from "&predb&"ask a inner join "&predb&"class b on a.sclass=b.ClassId where ispass=1 and (b.classid in("&ClassId&")"&ClassStr&")"&sqla&" order by askid desc")
   End IF
   if rs.bof and rs.eof then
   Response.Write("分类下暂无问答")
   else
%>
       <div class="OutCodeS">
          <% If FormS(6)="1" Then %><div class="s6">分类</div><% End If %>
          <div class="st">标题</div>
          <% If FormS(7)="1" Then %><div class="s7">提问者</div><% End If %>
          <% If FormS(8)="1" Then %><div class="s8">时间</div><% End If %>
          <% If FormS(9)="1" Then %><div class="s9">浏览数</div><% End If %>
          <% If FormS(10)="1" Then %><div class="s10">状态</div><% End If %>
          <% If FormS(11)="1" Then %><div class="s11">评论数</div><% End If %>
          <% If FormS(12)="1" Then %><div class="s12">回答数</div><% End If %>
          <% If FormS(13)="1" Then %><div class="s13">悬赏分</div><% End If %>
       </div>
<%
   do while not rs.eof
   
   IF FormS(3)>0 Then ClassTitle=AskD.LeftStr(rs("classname"),FormS(3))
   IF FormS(4)>0 Then AskTitle=AskD.LeftStr(rs("Title"),FormS(4)) 
   IF FormS(14)="1" Then Targert=" target=""_blank"" "
   %>
       <div class="OutCodeS">
          <% If FormS(6)="1" Then %><div class="s6">[<a href="<%= siteInfo(0)&siteInfo(1) %>list.asp?classid=<%=rs("sclass") %>"<%= Targert %>><%= ClassTitle %></a>]</div><% End If %>
          <div class="st"><a href="<%= siteInfo(0)&siteInfo(1) %>ask.asp?id=<%= rs("askid") %>"<%= Targert %>><%= AskTitle %></a></div>
          <% If FormS(7)="1" Then %><div class="s7">
		  <%
		  set rs1=conn.execute("select userid from "&predb&"user where id="&rs("askuser"))
		      %>
			  <a href="<%= siteInfo(0)&siteInfo(1) %>user/userinfo.asp?id=<%= rs("askuser") %>"<%= Targert %>><%= rs1("userid") %></a>
			  <%
		  set rs1=nothing
		  %>
          </div><% End If %>
          <%
		   If FormS(8)="1" Then
			   Select Case FormS(15)
				  Case "1"
					 DateTime=FormatDateTime(rs("asktime"),vbshortdate)
				  Case "2"
				     DateTime=Right("0"&month(rs("asktime")),2)&"/"&Right("0"&day(rs("asktime")),2)
				  Case "3"
				     DateTime=year(rs("asktime"))&"年"&month(rs("asktime"))&"月"&day(rs("asktime"))&"日"
				  Case "4"
				     DateTime=month(rs("asktime"))&"月"&day(rs("asktime"))&"日"
			   End Select
		  %>
          <div class="s8"><%= DateTime %></div>
		  <% End If %>
          <% If FormS(9)="1" Then %><div class="s9"><%= rs("viewNum") %></div><% End If %>
          <% If FormS(10)="1" Then %><div class="s10"><%= rs("state") %></div><% End If %>
          <% If FormS(11)="1" Then %><div class="s11"><%= rs("comNum") %></div><% End If %>
          <% If FormS(12)="1" Then %><div class="s12"><%= rs("ansNum") %></div><% End If %>
          <% 
		  If FormS(13)="1" Then
		  IF FormS(16)="0" Then xshang=rs("xShang") Else xshang="<img src="""&siteInfo(0)&siteInfo(1)&"Template/"&siteInfo(11)&"/images/money.gif"" alt=""""> "&rs("xShang")
		  %>
          <div class="s13"><%= xshang %></div>
		  <% End If %>
       </div>
   <%
   rs.movenext
   loop
   end if
   set rs=nothing  
%>
</div>    </td>
  </tr>
  <tr>
    <td class="TableRow1"><input name="ss1" type="button" id="ss1" onClick="history.go(-1)" value="返回修改"></td>
  </tr>
</table>
<%
end sub

Sub main()
dim rs,i,c,d
set rs=conn.execute("select * from "&predb&"outcode order by id desc")
%>
<table class="tableBorder" cellspacing="1" cellpadding="2" width="96%" align="center" border="0">
  <tr>
	<th height="25" colspan="6" align="left">问答调用列表</th>
  </tr>
  <form action="?" name="frm" method="get" onSubmit="return confirm('请确认您的操作？');">
  <input name="act" type="hidden" value="del">
  <tr>
    <td width="5%" align="center" class="TableRow1"><strong>选择</strong></td>
    <td width="4%" align="center" class="TableRow1"><strong>ID</strong></td>
    <td width="16%" align="center" class="TableRow1"><strong>添加时间</strong></td>
    <td width="8%" align="center" class="TableRow1"><strong>刷新时间</strong></td>
    <td align="center" class="TableRow1"><strong>允许的URl</strong></td>
    <td width="15%" align="center" class="TableRow1"><strong>操作</strong></td>
    </tr>
	<%
	do while not rs.eof
	i=i+1
	if i mod 2=0 then
	c=1
	else
	c=2
	end if
	%>
  <tr title="调用分类：<%= rs("classid") %>">
    <td align="center" class="TableRow<%= c %>"><input type="checkbox" name="id" value="<%= rs("id") %>"></td>
    <td align="center" class="TableRow<%= c %>"><%= rs("id") %></td>
    <td align="center" class="TableRow<%= c %>"><%= rs("addtime") %></td>
    <td align="center" class="TableRow<%= c %>"><%= rs("ftime") %></td>
    <td align="center" class="TableRow<%= c %>">
    <% If rs("passurl")="" Then Response.Write("ALL") Else Response.Write(replace(rs("passurl"),vbcrlf,"|"))%>    </td>
    <td align="center" class="TableRow<%= c %>"><a href="?act=del&id=<%= rs("id") %>" onClick="return confirm('请确认您的操作？');">删除</a>&nbsp; <a href="?act=modi&id=<%= rs("id") %>">修改</a>&nbsp; <a href="?act=view&id=<%= rs("id") %>">预览</a></td>
    </tr>
    <%
	rs.movenext
	loop
	set rs=nothing
	if c=1 then
	d=2
	else
	d=1
	end if
	%>
  <tr>
    <td colspan="6" class="TableRow<%= d %>"><input type="button" name="button" id="button" onClick="location.href='?act=add'" value="添加新调用"> 
     &nbsp;  <input type="submit" name="button2" id="button2" value="删除所选"></td>
    </tr>
  </form>
</table>
<% End Sub

Sub add()
Dim classid,passurl,FormS,ftime,id,rs,i
id=Trim(Request.QueryString("id"))
if id<>"" then
   set rs=conn.execute("select * from "&predb&"outcode where id="&id)
   classid=rs("classid")
   FormS=rs("FormS")
   passurl=rs("passurl")
   ftime=rs("ftime")
   set rs=nothing
else
   FormS="|||||||||||||||||||||||||||||||||||||||||||||"
end if
FormS=split(FormS,"|")
%>
<table class="tableBorder" cellspacing="1" cellpadding="2" width="96%" align="center" border="0">
  <tr>
	<th height="25" colspan="2" align="left">问答调用参数设置</th>
  </tr>
  <form action="?act=<% If id="" Then %>save<% Else %>modisave<% End If %>" name="frm" method="post" onSubmit="return OutCode();"><input name="id" type="hidden" value="<%= id %>">
  <tr>
    <td width="14%" align="right" class="TableRow1"><strong>调用类别：</strong></td>
    <td width="86%" class="TableRow1">
    <div id="classM1">
    <%
	if instr(classid,",")>0 then
		classid=split(classid,",")
		for i=0 to ubound(classid)
		%>
		<br><input name="selectC" checked type="checkbox" value="<%= Trim(classid(i)) %>"> <%= ZclassList(Trim(classid(i))) %>
 <%
	    next
	Elseif classid>0 then
	%>
			<br><input name="selectC" checked type="checkbox" value="<%= Trim(classid) %>"> <%= ZclassList(Trim(classid)) %>
	<%
    End If
	%>
    </div>
    <div id="classM">请选择栏目,不选即是调用所有分类</div>
    <div onClick="Cdiv()" style="cursor:pointer"><img src="Images/c-d.gif"> <font color="#000099">增加</font></div>
    <select name="select1" size="6" id="select1" style="width:88px" onChange="searchlist2(this.form);classM.innerHTML='<br><input name=selectC checked type=checkbox value='+this.value+'> <a target=_blank href=../list.asp??classid='+this.value+'>'+this.options[this.selectedIndex].text+'</a>'">
    </select>  
		<script language="JavaScript">
			searchinit1("", 0);
		</script>
      <select name="select2" size="6" id="select2" style="width:88px" onChange="searchlist3(this.form);classM.innerHTML='<br><input name=selectC checked type=checkbox value='+this.value+'> <a target=_blank href=../list.asp??classid='+frm.select1.value+'>'+frm.select1.options[frm.select1.selectedIndex].text+'</a> &raquo; <a target=_blank href=../list.asp??classid='+this.value+'>'+this.options[this.selectedIndex].text+'</a>'">
      </select>
	    <script language="JavaScript">
			searchinit2("", 0);
		</script>
      <select name="select3" size="6" id="select3" style="width:88px" onChange="searchlist4(this.form);classM.innerHTML='<br><input name=selectC checked type=checkbox value='+this.value+'> <a target=_blank href=../list.asp??classid='+frm.select1.value+'>'+frm.select1.options[frm.select1.selectedIndex].text+'</a> &raquo; <a target=_blank href=../list.asp??classid='+frm.select2.value+'>'+frm.select2.options[frm.select2.selectedIndex].text+'</a> &raquo; <a target=_blank href=../list.asp??classid='+this.value+'>'+this.options[this.selectedIndex].text+'</a>'">
      </select>
	    <script language="JavaScript">
			searchinit3("", 0);
		</script>
      <select name="select4" size="6" id="select4" style="width:88px" onChange="classM.innerHTML='<br><input name=selectC checked type=checkbox value='+this.value+'> <a target=_blank href=../list.asp??classid='+frm.select1.value+'>'+frm.select1.options[frm.select1.selectedIndex].text+'</a> &raquo; <a target=_blank href=../list.asp??classid='+frm.select2.value+'>'+frm.select2.options[frm.select2.selectedIndex].text+'</a> &raquo; <a target=_blank href=../list.asp??classid='+frm.select3.value+'>'+frm.select3.options[frm.select3.selectedIndex].text+'</a> &raquo; <a target=_blank href=../list.asp??classid='+this.value+'>'+this.options[this.selectedIndex].text+'</a>'">
      </select>
		<script language="JavaScript">
			searchinit4("", 0);
		</script>    </td>
  </tr>
  <tr>
    <td align="right" class="TableRow2"><strong>问题类型：</strong></td>
    <td class="TableRow2">
    <select name="set1" id="set1">
      <option value="1"<% If FormS(1)="1" Then %> selected<% End If %>>待解决问题</option>
      <option value="2"<% If FormS(1)="2" Then %> selected<% End If %>>高悬赏问题</option>
      <option value="3"<% If FormS(1)="3" Then %> selected<% End If %>>投票中问题</option>
      <option value="4"<% If FormS(1)="4" Then %> selected<% End If %>>零回答问题</option>
      <option value="5"<% If FormS(1)="5" Then %> selected<% End If %>>已解决问题</option>
      <option value="6"<% If FormS(1)="6" Then %> selected<% End If %>>推荐问题</option>
    </select>    </td>
  </tr>
  <tbody style="display:none">
  <tr>
    <td align="right" class="TableRow1"><strong>显示样式：</strong></td>
    <td class="TableRow1">
    <select name="set2" id="set2">
      <option value="1"<% If FormS(2)="1" Then %> selected<% End If %>>表格式</option>
      <option value="2"<% If FormS(2)="2" Then %> selected<% End If %>>列表式</option>
    </select>
    </td>
  </tr>
  </tbody>
  <tr>
    <td align="right" class="TableRow1"><strong>分类字数：</strong></td>
    <td class="TableRow1"><input name="set3" type="text" id="set3" <% If id<>"" Then %>value="<%= FormS(3) %>"<% Else %>value="8"<% End If %> size="3" maxlength="2">
      <span class="xing">*</span> 分类所显示的字符数。汉字为2字符。</td>
  </tr>
  <tr>
    <td align="right" class="TableRow2"><strong>标题字数：</strong></td>
    <td class="TableRow2"><input name="set4" type="text" id="set4" <% If id<>"" Then %>value="<%= FormS(4) %>"<% Else %>value="20"<% End If %> size="3" maxlength="2">
    <span class="xing">*</span> 每个问题所显示的字符数。汉字为2字符。    </td>
  </tr>
  <tr>
    <td align="right" class="TableRow1"><strong>调 用 数：</strong></td>
    <td class="TableRow1"><input name="set5" type="text" id="set5" <% If id<>"" Then %>value="<%= FormS(5) %>"<% Else %>value="10"<% End If %> size="3" maxlength="2"></td>
  </tr>
  <tr>
    <td align="right" class="TableRow2"><strong>显示内容：</strong></td>
    <td class="TableRow2">
<table width="98%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><input name="set6" type="checkbox" id="set6" value="1" <% If FormS(6)="1" Then %>checked<% End If %>>      
    &nbsp;&nbsp;显示分类</td>
    <td><input name="set7" type="checkbox" id="set7" value="1" <% If FormS(7)="1" Then %>checked<% End If %>>
    &nbsp;&nbsp;显示提问者</td>
    <td><input name="set8" type="checkbox" id="set8" value="1" <% If FormS(8)="1" Then %>checked<% End If %>>
    &nbsp;&nbsp;提问时间</td>
    <td><input name="set9" type="checkbox" id="set9" value="1" <% If FormS(9)="1" Then %>checked<% End If %>>
    &nbsp;&nbsp;点击次数</td>
  </tr>
  <tr>
    <td><input name="set10" type="checkbox" id="set10" value="1" <% If FormS(10)="1" Then %>checked<% End If %>>
    &nbsp;&nbsp;显示状态</td>
    <td><input name="set11" type="checkbox" id="set11" value="1" <% If FormS(11)="1" Then %>checked<% End If %>>
    &nbsp;&nbsp;显示评论数</td>
    <td><input name="set12" type="checkbox" id="set12" value="1" <% If FormS(12)="1" Then %>checked<% End If %>>
    &nbsp;&nbsp;显示回答数</td>
    <td><input name="set13" type="checkbox" id="set13" value="1" <% If FormS(13)="1" Then %>checked<% End If %>>
    &nbsp;&nbsp;显示悬赏分</td>
  </tr>
</table>    </td>
  </tr>
  <tr>
    <td align="right" class="TableRow1"><strong>打开方式：</strong></td>
    <td class="TableRow1"><select name="set14" id="set14">
      <option value="0" <% If FormS(14)="0" Then %>selected<% End If %>>原窗口</option>
      <option value="1" <% If FormS(14)="1" Then %>selected<% End If %>>新窗口</option>
    </select></td>
  </tr>
  <tr>
    <td align="right" class="TableRow2"><strong>时间格式</strong>：</td>
    <td class="TableRow2">
      <select name="set15" id="set15">
        <option value="1" <% If FormS(15)="1" Then %>selected<% End If %>>2008-8-6</option>
        <option value="2" <% If FormS(15)="2" Then %>selected<% End If %>>08/06</option>
        <option value="3" <% If FormS(15)="3" Then %>selected<% End If %>>2008年8月6日</option>
        <option value="4" <% If FormS(15)="4" Then %>selected<% End If %>>8月6日</option>
      </select>
    </td>
  </tr>
  <tr>
    <td align="right" class="TableRow1"><strong>悬赏分格式：</strong></td>
    <td class="TableRow1">
      <select name="set16" id="set16">
        <option value="0" <% If FormS(16)="0" Then %>selected<% End If %>>纯数字</option>
        <option value="1" <% If FormS(16)="1" Then %>selected<% End If %>>含图片</option>
      </select>
    </td>
  </tr>
  <tr>
    <td align="right" class="TableRow2"><strong>刷新时间：</strong></td>
    <td class="TableRow2"><input name="ftime" type="text" id="ftime" <% If id="" Then %>value="600"<% Else %>value="<%= ftime %>"<% End If %> size="6" maxlength="6">
      秒</td>
  </tr>
  <tr>
    <td align="right" class="TableRow1"><strong>允许 URL：</strong></td>
    <td class="TableRow1"><textarea name="passUrl" cols="38" rows="4" id="passUrl"><%= passurl %></textarea>
      *每行填写一个允许的地址，不填意味允许所有。</td>
  </tr>
  <tr>
    <td align="right" class="TableRow2"><strong>调用代码：</strong></td>
    <td class="TableRow2"><textarea name="code" cols="68" rows="4" id="code"><% If id<>"" Then %><script language="javascript" src="<%=siteInfo(0)&siteInfo(1)%>showCode.asp?id=<%= id %>" charset="utf-8"></script><% End If %></textarea></td>
  </tr>
  <tr>
    <td colspan="2" align="center" class="TableRow1"><input name="submit" type="submit" id="submit" value="<% If id="" Then %>生成调用代码<% Else %>修改调用代码<% End If %>"> &nbsp; <input name="ss2" type="button" id="ss1" onClick="location.href='?'" value="返回管理"><% If id<>"" Then %> &nbsp; <input name="ss1" type="button" id="ss1" onClick="location.href='?act=view&id=<%= id %>'" value=" 预 览 "><% End If %></td>
    </tr>
  </form>
</table>
<%
End Sub

Function ZclassList(num)
IF isobject(application("myClassxml"))=false Then call AskD.DoClassXml

if num<>0 then

Dim PostListStr,PStr
dim Rexml,Node,Topic,fstr,nx,ParentStr,classname,xs
set Rexml=application("myClassxml")
set Node=Rexml.documentElement.selectSingleNode("row[@classid="&num&"]")
    ParentStr=Node.selectSingleNode("@parentstr").Text
	classname=Node.selectSingleNode("@classname").Text
set node=nothing
    ParentStr=ParentStr&","
	ParentStr=split(ParentStr,",")

	  
   for each PStr in ParentStr
   if PStr="" then PStr=0
   if clng(PStr)>0 then
   set xs=Rexml.documentElement.selectSingleNode("row[@classid="&pstr&"]")
       PostListStr=PostListStr&" &raquo; <a href=""list.asp?classid="&PStr&""">"&xs.selectSingleNode("@classname").Text&"</a>"
   set xs=nothing
   end if
   next
	   PostListStr=PostListStr&" &raquo; <a href=""list.asp?classid="&num&""">"&ClassName&"</a>"&vbcrlf
set Rexml=nothing

end if

   ZclassList=PostListStr
End Function
%>
<br>
</body>
</html>
