<!--#include file="conn.asp"-->
<!--#include file="inc/cook2.asp"-->
<!--#include file="inc/dimflag.asp"-->
<!--#include file="inc/page.asp"-->
<%
word=trim(request("word"))
canshu3="word="&word&""
canshu2="page="&page&"&"&canshu3&""

select case action 
case "del" 
id=replace(request("id")," ","")
id=split(id,",")
for i=0 to UBound(id)
conn.execute("delete from com_qq where id="&id(i))
next
response.Write "<script>location='qqT_manage.asp?'</script>"
case "order" 
pi=REQUEST("pi")
pi=REPLACE(pi,", ",",")
SQL5="SELECT * from com_qq where id IN ("&pi&")"
SET RS5=SERVER.CREATEOBJECT("ADODB.RECORDSET")
rs5.open sql5,conn,1,3
while not rs5.eof 
RS5("pid")=REQUEST("pid"&RS5("id"))
RS5.UPDATE
RS5.MOVENEXT
wend
response.Write "<script>location='qqT_manage.asp'</script>"
end select
%>

<!--#include file="top.asp"-->
<!--#include file="inc/htmlconfig.asp"-->
<div id="container">
<div class="top_but">
 <li class="left">&nbsp;</li>
 <li><a href="qqT_add.asp"><img src="images/but_1.gif" alt="添加" ></a></li>
 <li><img src="images/but_2.gif" alt="排序"  onclick="form1.action='?action=order&<%=canshu2%>';form1.submit();"></li>
 <li><img src="images/but_3.gif" alt="删除"  onclick="form1.action='?action=del&<%=canshu2%>'; ConfirmDel() "></li>
<!-- <li><a href="?action=html"><img src="images/but_10.gif" alt="生成页面" ></a></li>-->
 <li><a href="?tid=<%=tid%>"><img src="images/but_7.gif" alt="全部" ></a></li>
 <li><img src="images/but_8.gif" alt="刷新" onClick="window.location.reload(true);"></li>
 <li><img src="images/but_9.gif" alt="打印" onClick="window.print() "/></li>
<form name="form_search" method="post" action="?">
<li class="right">
<input name="word" type="text" id="word" class="s_b"><input type="image" name="Submit22" src="images/ss_b.gif" class="s_c" value="搜索" align="absmiddle">
</li>
</form>
</div>
<%
if word<>"" then
sql= "select * from com_qq where type=1 and titlecn like'%"&word&"%' order by pid asc,id desc"
else
sql= "select * from com_qq where  type=1 order by pid asc,id desc"
end if
set rs=server.createobject("adodb.recordset")                     
rs.open sql,conn,1,1                     
if rs.eof and rs.bof then                     
response.write conn_eof
else 
page1("20")
i=1	
%>
<%if word<>"" then%><div class="tablesearch">您搜索的关键字是：<font color=#ff6600><%=word%></font>，共搜索到 <%=rs.recordcount%> 条信息。 </div><%end if%>
<form name="form1" id="form1" method="post" action="?<%=canshu2%>">
<div class="tableAll titlebgcolor">
 <li style="width:30px"><input name="chkall" type="checkbox" id="chkall" value="select" onClick="CheckAll(this.form);" ></li>
 <li style="width:50px;">操作</li>
 <li style="width:150px;">名称（点击修改）</li>
 <li style="width:150px;">客服号</li>
 <li style="width:50px;">排序</li>
</div>
<%
set id=rs("id")
set pid=rs("pid")
while not rs.eof and i<=rs.pagesize
titlecn=replace(rs("titlecn"),word,"<font color=#ff6600>"&word&"</font>")
%>
<div class="tableAll trbgcolor">
 <li style="width:30px"><input type="checkbox" name="ID"  value="<%=rs("id")%>"></li>
 <li style="width:50px;"><a href="qqT_modify.asp?id=<%=rs("id")%>">编辑</a></li>
 <li style="width:150px;"><%=titlecn%></li>
 <li style="width:150px;"><%=rs("textcn")%></li>

 <li style="width:150px;"><input name="pid<%=id%>" type="text" id="pid<%=id%>" value="<%=pid%>" size="3"><input name="pi" type="hidden" id="pi" value="<%=id%>"></li>
</div>
<%
i=i+1
rs.movenext
wend
%>
</form>
<div id="divStayTop" class="bottom titlebgcolor">
<%call page2(5,""&canshu3&"&")%>
</div>

<%
select case action 
case "html" 
%>

<div class="html titlebgcolor">
<%
call Htmlcall()
%>
</div>
<%
call htmll(""&HTMLname1_cn&"",""&HTMLname2_cn&"",""&HTMLname3_cn&"jqqonline.js","jqqonline.asp","","","","","","")
Response.Write "<script>bar_img.width="&Fix(200)&";bar_txt1.innerHTML=""成功生成即时在线。完成比例" & formatnumber(100) & """;</script>"
Response.Flush
%>
<%
end select
%>
<%
end if
rs.close
set rs=nothing
%>	
</div>
<!--#include file="footer.asp"-->