<!--#include file="../../inc/config.asp"-->
<!--#include file="../../inc/conn.asp"-->
<!-- #include file="../inc/Session.asp" -->
<HTML>
<HEAD>
<TITLE>插入标签</TITLE>
<link href="../../css.css" rel="stylesheet">
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<%
dim first,classid,noclass
classid=0
dim i
if not isempty(request("classid")) then
	classid=Cint(request("classid"))
else
	classid=0
end if
%>
<META content="MSHTML 5.00.2920.0" name=GENERATOR>
<link href="cs.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
	margin-left: 10px;
}
-->
</style></HEAD>
<BODY>
<fieldset style="text-align:center; ">
<legend>插入标签</legend>
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="5">  
  <%
  	
  	set rs=server.CreateObject("adodb.recordset")
	sql="select labelname,demons from label where classid="&classid&" order by id desc"
	rs.open sql,conn,3,1
	if not rs.eof then
		labelArr=rs.GetRows()
	else
		response.write("没有记录")
		response.end()
	end if
	rs.close
	set rs=nothing
	for ii=0 to ubound(labelArr,2)
		response.write("<tr>"&Chr(10))
		response.write("<td>&nbsp;</td>"&Chr(10))
		response.write("<td>"&Chr(10))
		response.write("<span style=""cursor:hand;"" class=""TempletItem"" title="""&labelArr(1,ii)&""" label="""&labelArr(0,ii)&""" onClick=""SelectFile(this);"">"&(ii+1)&":"&labelArr(0,ii)&Chr(10))
		response.write("</span></td>"&Chr(10))
		response.write("</tr>"&Chr(10))
	next
  %>  
</table>
</BODY>
</HTML>
<script language="JavaScript">
var LabelName='';
function SelectFile(Obj)
{
	for (var i=0;i<document.all.length;i++)
	{
		if (document.all(i).className=='TempletSelectItem') document.all(i).className='TempletItem';
	}
	Obj.className='TempletSelectItem';
	LabelName=Obj.label;	
	parent.dialogArguments.insertHTML(LabelName);
	window.returnValue =LabelName;
	window.close();
}
</script>
<%
call connclose()
%>