<!--#include file="../conn.asp"-->
<!--#include file="inc/admin_config.asp"-->
<!--#include file="make_htm/function.asp"-->
<!--#include file="make_htm/get_news_class.asp"-->
<!--#include file="inc/pinyin_conn.asp"-->
<!--#include file="inc/pinyin_class.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
 <%
 If Cint(AdminGroup(4))=1   or Cint(Request.Cookies("IsSuper"))=1 then
else
Response.Redirect("Default.asp")
Response.End()
End If


 Response.CacheControl = "no-cache" 
'On Error Resume Next
set rs=server.createobject("adodb.recordset")
dim wt_aSortIdA,wt_bSortIdA,wt_cSortIdA,wt_sortId,wt_idb
'set srst=conn.execute("select   * from products  order by wt_Id asc,wt_id desc   ")
sql="select * from wd_news  order by wt_id desc"
rs.open sql,conn,1,3
if not rs.eof or not rs.bof then
pageno=20
rscount=rs.recordcount
call showsql(pageno)
rs.move(rsno)
response.write "<p>共有<font color=red> <b>"&rscount&"</b></font> 个信息需要更新分类，每页更新<font color=red> <b> "&pageno&"</b></font> 个，共需要<font color=red> <b>"&pagemax&" </b></font>页，目前生成第 <font color=red> <b>"&page&" </b></font>页。</p>"
for i=1 to loopno
		dim wt_filename,wt_id
		'if rs("wt_title") ="" then
		wt_filename=rs("wt_title")
		wt_id=rs("wt_id")
		'else
		'wt_filename=rs("wt_filename")
		'end if
		'wt_filename= Pinyin(wt_filename) 
		'wt_filename=left(wt_filename,50)
		wt_filename=wt_id
        conn.execute("update wd_news set  wt_filename='"&wt_filename&"' where wt_id="&rs("wt_Id")&"  ")
		response.write "<li>成功更新第&nbsp;<font color=red> <b>"&i+rsno&"</b></font>&nbsp;个信息。&nbsp;&nbsp;&nbsp;ID："&rs("wt_id")&"&nbsp;&nbsp;&nbsp;<a  target=_blank  href='/news_show.asp?id="&rs("wt_id")&" '>名称："&rs("wt_title")&"</a>&nbsp;&nbsp;&nbsp;文件名："&wt_filename&""
        response.write "</li> "
	rs.movenext
    next
	end if
rs.close
set rs=nothing
if page=pagemax then
response.write "<p align='center' style='color:red'>信息分类更新完毕！</p>"
else
response.write "<meta http-equiv=""refresh"" content=""3;url=news_filename.asp?page="&page+1&""">"
response.write "<p style='color:#f00'>每页更新"&pageno&" 个信息，正在更新信息，请勿刷新！</p>"
end if
%>
<%Closeconn%></body>
</html>
