<!--#include file="../include/conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<SCRIPT language="JavaScript">
<!--
  function CatchJavaScriptErrors() {return true;}
  window.onerror = CatchJavaScriptErrors;
//-->
</SCRIPT>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8"><title>新闻公告</title>
<script language="javascript" type="text/javascript" src="../images/admin/nav.js"></script>
<% if request.cookies("houtaiskin")="green" then %>
<link rel="stylesheet" href="../images/admin/green.css" type="text/css" media="screen" id="style" />
<link rel="alternate stylesheet" href="../images/admin/default.css" type="text/css" title="默认风格" media="screen" />
<link rel="alternate stylesheet" href="../images/admin/blue.css" type="text/css" title="蓝色风格" media="screen" />
<% elseif request.cookies("houtaiskin")="blue" then %>
<link rel="stylesheet" href="../images/admin/blue.css" type="text/css" media="screen" id="style" />
<link rel="alternate stylesheet" href="../images/admin/default.css" type="text/css" title="默认风格" media="screen" />
<link rel="alternate stylesheet" href="../images/admin/green.css" type="text/css" title="绿色风格" media="screen" />
<%else%>
<link rel="stylesheet" href="../images/admin/default.css" type="text/css" media="screen" id="style" />
<link rel="alternate stylesheet" href="../images/admin/green.css" type="text/css" title="绿色风格" media="screen" />
<link rel="alternate stylesheet" href="../images/admin/blue.css" type="text/css" title="蓝色风格" media="screen" />
<%end if%>

<SCRIPT language=javascript src="../include/rest_img.js"></SCRIPT>

<script language="JavaScript" type="text/JavaScript">
function JM_wu(ob){
 ob.style.display="none";
}
function JM_you(ob){
 ob.style.display="";
}

function CheckAll(form) {
 for (var i=0;i<form.elements.length;i++) {
 var e = form.elements[i];
 if (e.name != 'chkall') e.checked = form.chkall.checked; 
 }
 }
</script>

</head>
<body>
<%
Set rs = conn.Execute("select * from bconfig") 
newstitle1=rs("newstitle1")
newstitle2=rs("newstitle2")
newstitle3=rs("newstitle3")
newstitle4=rs("newstitle4")
newstitle5=rs("newstitle5")
newstitle6=rs("newstitle6")
newstitle7=rs("newstitle7")
newstitle8=rs("newstitle8")
newstitle9=rs("newstitle9")
newstitle10=rs("newstitle10")

rs.close
set rs=nothing

action = request("action")
if action="" then
%>
<!--#include file="top.asp"-->

<div id="container">
<!--#include file="menu.asp"-->

<script language="javascript" type="text/javascript">
<!-- 

	vnow("my.5.1.1");
	
//-->
</script>


<%
if request("action")="add" or request("show")="yes" then
 response.cookies("wwwjiayi9com")("sql")=""
end if


ppage=trim(request("page"))
ShowType=trim(request("ShowType"))
llevel=trim(request("level"))

response.cookies("ShowType") = trim(request("ShowType"))
OrderBy=trim(request("OrderBy"))
response.cookies("OrderBy") = trim(request("OrderBy"))
if ppage="" then ppage="1"
if ShowType="" then ShowType="1"
if ShowType="" then response.cookies("showtype") = "1"
if OrderBy="" then OrderBy="1"
if OrderBy="" then response.cookies("OrderBy") = "1"


set cqrsprod =conn.execute("select count(*) as thislarnum from news")
thislarnum=cqrsprod("thislarnum")
set cqrsprod=nothing

set cqrsprod =conn.execute("select count(*) as thislarnum1 from news where Online='1' ")
thislarnum1=cqrsprod("thislarnum1")
set cqrsprod=nothing

set cqrsprod =conn.execute("select count(*) as thislarnum2 from news where Online='0'  ")
thislarnum2=cqrsprod("thislarnum2")
set cqrsprod=nothing

set cqrsprod =conn.execute("select count(*) as thislarnum3 from news where uup=1  ")
thislarnum3=cqrsprod("thislarnum3")
set cqrsprod=nothing

dim typeid,name,colname,totalsoft,Currentpage,totalpages,i
softperpage=30


pages = per_page_num
set rs = server.createobject("adodb.recordset")
if request.cookies("wwwjiayi9com")("sql")="" then'无搜索选项，即显示全部商品
if ShowType="1" then tiaojian=" where NewsTitle<>'' "
if ShowType="2" then tiaojian=" where Online='1' "
if ShowType="3" then tiaojian=" where Online='0' "
if ShowType="4" then tiaojian=" where uup=1 "

if llevel<>"" then 
tiaojiann=" and NewsClass='"&llevel&"' "
else
tiaojiann=" "
end if

if OrderBy="1" then orderbyy=" order by PubDate desc"
if OrderBy="2" then orderbyy=" order by PubDate"
if OrderBy="3" then orderbyy=" order by cktimes desc"
if OrderBy="4" then orderbyy=" order by cktimes"

sql = "select * from News " + tiaojian + tiaojiann + orderbyy


else'有搜索选项，显示搜索结果
if OrderBy="1" then orderbyy=" order by PubDate desc"
if OrderBy="2" then orderbyy=" order by PubDate"
if OrderBy="3" then orderbyy=" order by cktimes desc"
if OrderBy="4" then orderbyy=" order by cktimes"


sql = request.cookies("wwwjiayi9com")("sql") + orderbyy

end if

rs.open sql,conn,1,3 

%>








  <DIV id=colnums-2-ab-b>
<DIV id=sub_content>
<IFRAME border=0 name=new_date11 marginWidth=0 marginHeight=0 src="" frameBorder=0 noResize width=1 scrolling=no height=1 spacing=0  vspale=0></IFRAME>

<!-- 分页需要 -->
<TABLE class=pagetitle cellSpacing=0 cellPadding=0 border=0>
  <TBODY>
  <TR>
    <TH>新闻公告</TH>
            <TD>
</td>
</TR></TBODY></TABLE><!-- 操作结果反馈  -->
    
    <table cellpadding="0" cellspacing="0" border="0" class="tishi3">
	<tr>
		<td class="th_001">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<tr>
				<th>提 示：</th>
				<td align="right">
				<div id="_mmtnotice" name="posterNotice" <% if request.cookies("houtaiclose")="2" then %>class="bi"<%else%>class="sm"<%end if%> onClick="javascript:bism('noticecontent',this)"><% if request.cookies("houtaiclose")="2" then %>展开<%else%>隐藏<%end if%></div>
				</td>
			</tr>
		</table>
		</td>
	</tr>
    

	<tr id="noticecontent" <% if request.cookies("houtaiclose")="2" then %> style="display:none"<%end if%>>
		<td class="tdcon">
        ·前台先显示固顶新闻，再显示非固顶新闻，按添加时间从新到旧顺序显示。
		<br />
        ·点击新闻分类链接则显示该分类下的所有新闻。 
        		<br />

        ·提升新闻可将新闻添加时间设置为当前时间。
        </td>
	</tr>
    
    
    
    	<script language="javascript" type="text/javascript" src="../images/admin/closeico.js"></script>

</table>

<TABLE class=topal cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD><IMG hspace=1 src="../images/admin/001_r2_c2.gif" align=top> 您已成功发布 <SPAN 
      class=txt_red><%=thislarnum%></SPAN> 条 新闻公告 。</TD>
    <TD align=right><INPUT class=i_button2 onClick="javascript:window.location='add_news.asp'" type=button value=发布新闻公告 name="" style="cursor:hand"></TD></TR></TBODY></TABLE>
<DIV class=ptag>
<TABLE cellSpacing=0 cellPadding=0 border=0>
  <TBODY>
  <TR>
<% if llevel<>"" then %>

			  <TD class=now width=120><SPAN><%if llevel="1" then %><%=newstitle1%><%elseif llevel="2" then %><%=newstitle2%><%elseif llevel="3" then %><%=newstitle3%><%elseif llevel="4" then %><%=newstitle4%><%elseif llevel="5" then %><%=newstitle5%><%elseif llevel="6" then %><%=newstitle6%><%elseif llevel="7" then %><%=newstitle7%><%elseif llevel="8" then %><%=newstitle8%><%elseif llevel="9" then %><%=newstitle9%><%elseif llevel="10" then %><%=newstitle10%><%end if%>(<%=rs.recordcount%>)</SPAN></TD>
              <td>&nbsp;</td>
    <TD class=tag02 width=120><SPAN style="CURSOR: hand" 
      onclick="window.location='news.asp?show=yes&ShowType=1&OrderBy=<%=OrderBy%>'">全部新闻(<%=thislarnum%>)</SPAN></TD>
    <TD>&nbsp;</TD>
    <TD class=tag02 width=120><SPAN style="CURSOR: hand" 
      onclick="window.location='news.asp?show=yes&ShowType=2&OrderBy=<%=OrderBy%>'">显示中(<%=thislarnum1%>)</SPAN></TD>
    <TD>&nbsp;</TD>
    <TD class=tag02 width=120><SPAN style="CURSOR: hand" 
      onclick="window.location='news.asp?show=yes&ShowType=3&OrderBy=<%=OrderBy%>'">隐藏中(<%=thislarnum2%>)</SPAN></TD>
          <TD>&nbsp;</TD>
    <TD class=tag02 width=120><SPAN style="CURSOR: hand" 
      onclick="window.location='news.asp?show=yes&ShowType=4&OrderBy=<%=OrderBy%>'">固定新闻(<%=thislarnum3%>)</SPAN></TD>
              <%else%>   


<% if request.cookies("wwwjiayi9com")("sql")<>"" then %>
			  <TD class=now width=120><SPAN>搜索结果(<%=rs.recordcount%>)</SPAN></TD>
              <td>&nbsp;</td>
    <TD class=tag02 width=120><SPAN style="CURSOR: hand" 
      onclick="window.location='news.asp?show=yes&ShowType=1&OrderBy=<%=OrderBy%>'">全部新闻(<%=thislarnum%>)</SPAN></TD>
    <TD>&nbsp;</TD>
    <TD class=tag02 width=120><SPAN style="CURSOR: hand" 
      onclick="window.location='news.asp?show=yes&ShowType=2&OrderBy=<%=OrderBy%>'">显示中(<%=thislarnum1%>)</SPAN></TD>
    <TD>&nbsp;</TD>
    <TD class=tag02 width=120><SPAN style="CURSOR: hand" 
      onclick="window.location='news.asp?show=yes&ShowType=3&OrderBy=<%=OrderBy%>'">隐藏中(<%=thislarnum2%>)</SPAN></TD>
          <TD>&nbsp;</TD>
    <TD class=tag02 width=120><SPAN style="CURSOR: hand" 
      onclick="window.location='news.asp?show=yes&ShowType=4&OrderBy=<%=OrderBy%>'">固定新闻(<%=thislarnum3%>)</SPAN></TD>
              <%else%>   

  
    <TD <% if ShowType="1" then %>class=now<%else%>class=tag02<%end if%> width=120><SPAN style="CURSOR: hand" 
      onclick="window.location='news.asp?show=yes&ShowType=1&OrderBy=<%=OrderBy%>'">全部新闻(<%=thislarnum%>)</SPAN></TD>
    
    <TD>&nbsp;</TD>
    <TD <% if ShowType="2" then %>class=now<%else%>class=tag02<%end if%> width=120><SPAN style="CURSOR: hand" 
      onclick="window.location='news.asp?show=yes&ShowType=2&OrderBy=<%=OrderBy%>'">显示中(<%=thislarnum1%>)</SPAN></TD>
    <TD>&nbsp;</TD>
    <TD <% if ShowType="3" then %>class=now<%else%>class=tag02<%end if%> width=120><SPAN style="CURSOR: hand" 
      onclick="window.location='news.asp?show=yes&ShowType=3&OrderBy=<%=OrderBy%>'">隐藏中(<%=thislarnum2%>)</SPAN></TD>
          <TD>&nbsp;</TD>
    <TD <% if ShowType="4" then %>class=now<%else%>class=tag02<%end if%> width=120><SPAN style="CURSOR: hand" 
      onclick="window.location='news.asp?show=yes&ShowType=4&OrderBy=<%=OrderBy%>'">固定新闻(<%=thislarnum3%>)</SPAN></TD>
      <%
      end if
      %>
       <%
      end if
      %>
      
     
      </TR></TBODY></TABLE></DIV>
      

<form name=search action=news_search.asp method=post>
<TABLE style="MARGIN: 5px 0px" cellSpacing=0 cellPadding=0 width="100%" 
align=center border=0>
  <TBODY>
  <TR>
    <TD><INPUT class=i_text 
      onfocus='if(this.value=="请输入新闻关键词"){this.value="";}' value=请输入新闻关键词 
      name=name_key size="30" maxLength="30"> <SELECT name=ShowType> <OPTION value="1" 
        selected>类型</OPTION> <OPTION value="2">显示</OPTION> <OPTION 
        value="3">隐藏</OPTION> <OPTION value="4">固顶</OPTION></SELECT> <INPUT 
      type=hidden value=1 name=selChecked> <INPUT name="action" TYPE="hidden" value="ok"><INPUT class=i_button  type=submit value=查询 name=Submit  style="cursor:hand"> 
    </TD>
    <TD align=right>
      <DIV style="TEXT-ALIGN: right">
<select name="oneKeyRepeatedMode" onChange="javascript:window.location.href=this.options[this.selectedIndex].value" >
                   <option value="news.asp?ShowType=<%=ShowType%>&OrderBy=1" <% if OrderBy="1" then response.write " selected" %>>按添加时间从新到旧</option>
                   <option value="news.asp?ShowType=<%=ShowType%>&OrderBy=2" <% if OrderBy="2" then response.write " selected" %>>按添加时间从旧到新</option>
                   <option value="news.asp?ShowType=<%=ShowType%>&OrderBy=3" <% if OrderBy="3" then response.write " selected" %>>按访问次数从高到低</option>
                   <option value="news.asp?ShowType=<%=ShowType%>&OrderBy=4" <% if OrderBy="4" then response.write " selected" %>>按访问次数从低到高</option>

                 </select>         
</DIV></TD></TR></TBODY></TABLE>
</form>


<form action="news.asp?ShowType=<%=ShowType%>&OrderBy=<%=OrderBy%><% if llevel<>"" then %>&level=<%=llevel%><%end if%>&page=<%=ppage%>" method=post name="newslist">

<%
'显示商品列表

if rs.eof and rs.bof then
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border:1px #ccc solid;">
        <tr>
          <td><h1 class="st">暂时没有相关的新闻信息！</h1></td>
        </tr>
    </table>

<%
else

rs.movefirst
rs.pagesize=softperpage
if trim(request("page"))<>"" then
   currentpage=clng(request("page"))
   response.cookies("prodpage") = clng(request("page"))
   if currentpage>rs.pagecount then
      currentpage=rs.pagecount
   response.cookies("prodpage") =rs.pagecount
   end if
else
   currentpage=1
   response.cookies("prodpage") =1
end if
totpage=rs.pagecount
   totalsoft=rs.recordcount
   if currentpage<>1 then
       if (currentpage-1)*softperpage<totalsoft then
	       rs.move(currentpage-1)*softperpage
		   dim bookmark
		   bookmark=rs.bookmark
	   end if
   end if
   if (totalsoft mod softperpage)=0 then
      totalpages=totalsoft\softperpage
   else
      totalpages=totalsoft\softperpage+1
   end if

 

%>
<TABLE class=tabls id=tabls cellSpacing=0 cellPadding=0 border=0>
  <TBODY>
  <TR class=tabls_head>
    <TD width=40>选项</TD>
    <TD>标题</TD>
    <TD width=80>商品分类</TD>
    <TD width=50>访问数</TD>
    <TD width=140>发布时间</TD>
    <TD width=120>操作</TD>
  </TR>
    
<%
     i=0
do while not rs.eof and i<softperpage
%>
    
    
  <TR class=tabls_tr_2>
    <TD align=middle><input type="checkbox" value="<%=rs("NewsID")%>" name=id></TD>
    <TD><A 
      href="../news.asp?NewsId=<%=rs("NewsId")%>" 
      target=_blank><%=rs("NewsTitle")%></A> <% if rs("Online")="1" then response.write "<font color=#009966>【</font>显示<font color=#009966>】</font> " else response.write "<font color=#009966>【</font><font color=red>隐藏</font><font color=#009966>】</font>" end if%><% if rs("uup")=1 then response.write " <font color=#009966>【</font>固顶<font color=#009966>】</font>" end if%> </TD>
      
      
          <TD align=middle><A 
      href="news.asp?ShowType=<%=ShowType%>&OrderBy=<%=OrderBy%>&level=<%=rs("NewsClass")%>"><%if rs("NewsClass")="1" then %><%=newstitle1%><%elseif rs("NewsClass")="2" then %><%=newstitle2%><%elseif rs("NewsClass")="3" then %><%=newstitle3%><%elseif rs("NewsClass")="4" then %><%=newstitle4%><%elseif rs("NewsClass")="5" then %><%=newstitle5%><%elseif rs("NewsClass")="6" then %><%=newstitle6%><%elseif rs("NewsClass")="7" then %><%=newstitle7%><%elseif rs("NewsClass")="8" then %><%=newstitle8%><%elseif rs("NewsClass")="9" then %><%=newstitle9%><%elseif rs("NewsClass")="10" then %><%=newstitle10%><%end if%></A>&nbsp;</TD>


          <TD align=middle><%=rs("cktimes")%>&nbsp;</TD>

    <TD width=140><%=rs("PubDate")%>&nbsp;</TD>
    <TD width=120 align="center"><A 
      href="mod_news.asp?ShowType=<%=ShowType%>&OrderBy=<%=OrderBy%><% if llevel<>"" then %>&level=<%=llevel%><%end if%>&page=<%=ppage%>&id=<%=rs("NewsID")%>">修改</A> / <A 
      href="news.asp?action=tisheng&ShowType=<%=ShowType%>&OrderBy=<%=OrderBy%><% if llevel<>"" then %>&level=<%=llevel%><%end if%>&page=<%=ppage%>&id=<%=rs("NewsID")%>">提升</A>
      / <A 
      href="news.asp?action=shanchu&ShowType=<%=ShowType%>&OrderBy=<%=OrderBy%><% if llevel<>"" then %>&level=<%=llevel%><%end if%>&page=<%=ppage%>&id=<%=rs("NewsID")%>" onClick="{if(confirm('确定删除该信息吗?')){return true;}return false;}">删除</A>    </TD>
  </TR>
    
 <%
i=i+1
rs.movenext 
loop
%>
   
      

    
    
</TBODY></TABLE>
<DIV class=func><input type="checkbox" name=chkall onClick="CheckAll(this.form)">全选         
  <input type="submit" name="action"  class="i_button" value="显示" style="cursor:hand" />
         <input type="submit" name="action"  class="i_button" value="隐藏" style="cursor:hand">
         <input type="submit" name="action"  class="i_button" value="固顶" style="cursor:hand">
         <input type="submit" name="action"  class="i_button" value="取消固顶" style="cursor:hand">
<input type="submit" name="action"  class="i_button" value="提升" style="cursor:hand">
         <input type="submit" name="action" value="删除" class="i_button" style="cursor:hand" onClick="{if(confirm('信息删除后将无法恢复，您确定要删除选定的信息吗？')){this.document.Prodlist.submit();return true;}return false;}">
</DIV>
            <table width="90%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="15"></td>
  </tr>
</table>

         <table width="100%" border="0" align="center" cellspacing="0" cellpadding="0" align="center" height="50">
  <tr>
    <td align="center">   
            
            <%
			    query = Split(Request.ServerVariables("QUERY_STRING"), "&")
    For Each x In query
        a = Split(x, "=")
        If StrComp(a(0), "page", vbTextCompare) <> 0 Then
            temp = temp & a(0) & "=" & a(1) & "&"
        End If
    Next
%>
<table width="100%" border="0" align="center" cellspacing="0" cellpadding="0" align="center" height="20">
  <tr>
    <td align="left" width="150"><%if currentpage>1 then%><img src="../images/admin/jiantou.gif">&nbsp;&nbsp;<a href="<%=filename%>?<%= temp %>page=1" title="首页">首页</a><%end if%> 
<%
if currentpage>1 then
if request("page")="" then
page=1
else
page=request("page")-1
end if%>
<img src="../images/admin/jiantou.gif">&nbsp;&nbsp;<a href="<%=filename%>?<%= temp %>page=<%=page%>" title="上一页">上一页</a>
<%end if%>
</td>
    <td align="center">    	第
    
<%
i=1
showye=totalpages
if showye>10 then
showye=12
end if

if request("page")="" then
dqpage=1
else

if csng(request("page"))>totalpages then
dqpage=totalpages
else
dqpage=request("page")
end if

end if
if dqpage>10 then
tianlu=dqpage-7
hangtian=dqpage+4

if hangtian>totalpages then
for i=tianlu to totalpages

if i=currentpage then
%><strong><font color="#FF0000"><%=i%></font></strong>   <%if i<>totpage and i<>totalpages then%>
︱<%end if%><%else%><a href="<%=filename%>?<%= temp %>page=<%=i%>"><%=i%></a><%if i<>totpage and i<>totalpages then%>︱<%end if%><%end if
next


else
for i=tianlu to hangtian
if i=currentpage then
%><strong><font color="#FF0000"><%=i%></font></strong>   <%if i<>totpage and i<>hangtian then%>
︱<%end if%><%else%><a href="<%=filename%>?<%= temp %>page=<%=i%>"><%=i%></a><%if i<>totpage and i<>hangtian then%>︱<%end if%><%end if
next


end if


else
for i=1 to showye
if i=currentpage then
%><strong><font color="#FF0000"><%=i%></font></strong>   <%if i<>totpage and i<>12 then%>
︱<%end if%><%else%><a href="<%=filename%>?<%= temp %>page=<%=i%>"><%=i%></a><%if i<>totpage and i<>12 then%>︱<%end if%><%end if
next
end if

%>
		  页
</td>
    <td align="right" width="150"><%
if totalpages>currentpage then
if request("page")="" then
pageee=2
else
pageee=request("page")+1
end if%>
<img src="../images/admin/jiantou1.gif">&nbsp;&nbsp;<a href="<%=filename%>?<%= temp %>page=<%=pageee%>" title="下一页">下一页</a> 
<%end if%>

            
<%if totalpages>currentpage then%><img src="../images/admin/jiantou1.gif">&nbsp;&nbsp;<a href="<%=filename%>?<%= temp %>page=<%=totalpages%>" title="末页">末页</a><%end if%></td>
  </tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="5"></td>
  </tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0" height="20">
  <tr>
    <td align="left"><img src="../images/admin/dot3.gif">&nbsp;&nbsp;<%=currentpage%>/<%=totalpages%>页&nbsp;&nbsp;共有信息：<%=totalsoft%> 个 当前为：第 <%if dqpage="" then%>1 <%else%><%=(dqpage-1)*softperpage+1%><%end if%> 到 <%if dqpage="" then%><%=softperpage%> <%else%><%if csng(dqpage)=totpage then%><%=totalsoft%><%else%><%=dqpage*softperpage%><%end if%><%end if%> 个&nbsp;&nbsp;&nbsp;&nbsp;</td><td align="right" width="150"><%
response.write"<select name=""select"" size=""1"" style=""font-size: 12px"" onchange=""javascript:window.location.href=this.options[this.selectedIndex].value"">"
   for i=1 to totalpages
      selected=""
      if cint(currentpage)=i then
          selected=" selected"
      end if
response.write"<option value="""&filename&"?"&temp&"page="&i&""" "&selected&">第"&i&"页</option>"
   next
response.write"</select>"
%>       </td>
  </tr>
</table>

</td>
  </tr>
</table>
<table width="95%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="5"></td>
  </tr>
</table>


   
 
<DIV class=clear>&nbsp;</DIV>
<TABLE cellSpacing=0 cellPadding=0 width="98%" align=center border=0>
  <TBODY>
  <TR>
    <TD><INPUT type=hidden value=1 name=tmp> <INPUT type=hidden name=curID> 
  </TD></TR></TBODY></TABLE></FORM>
  
<%
end if

rs.close
set rs=nothing

%>

  
  
  
  </DIV></DIV>
  
  
  
  
  
  
  
  
  
  
  <div class="clear">&nbsp;</div>
</div>

<!--#include file="down.asp"-->

<%else%>
<%
if action="tisheng" then
id=request("id")

ppage=trim(request("page"))
ShowType=trim(request("ShowType"))
OrderBy=trim(request("OrderBy"))
llevel=trim(request("level"))

call tisheng()
end if

if action="tuijian" then
id=request("id")
ppage=trim(request("page"))
ShowType=trim(request("ShowType"))
OrderBy=trim(request("OrderBy"))
llevel=trim(request("level"))

call tuijian()
end if

if action="shangxia" then
id=request("id")
ppage=trim(request("page"))
ShowType=trim(request("ShowType"))
OrderBy=trim(request("OrderBy"))
llevel=trim(request("level"))

call shangxia()
end if

if action="shanchu" then
id=request("id")
ppage=trim(request("page"))
ShowType=trim(request("ShowType"))
OrderBy=trim(request("OrderBy"))
llevel=trim(request("level"))

call shanchu()
end if

if action="tejia" then
id=request("id")
ppage=trim(request("page"))
ShowType=trim(request("ShowType"))
OrderBy=trim(request("OrderBy"))
llevel=trim(request("level"))

call tejia()
end if

if action="推荐" then 
ProdNum=replace(request("id")," ","")
ppage=trim(request("page"))
ShowType=trim(request("ShowType"))
OrderBy=trim(request("OrderBy"))
llevel=trim(request("level"))

call prodtuijian()
end if

if action="特价" then 
ProdNum=replace(request("id")," ","")
ppage=trim(request("page"))
ShowType=trim(request("ShowType"))
OrderBy=trim(request("OrderBy"))
llevel=trim(request("level"))

call prodtejia()
end if

if action="固顶" then 
ProdNum=replace(request("id")," ","")
ppage=trim(request("page"))
ShowType=trim(request("ShowType"))
OrderBy=trim(request("OrderBy"))
llevel=trim(request("level"))

call quxiaotuijian()
end if

if action="取消固顶" then 
ProdNum=replace(request("id")," ","")
ppage=trim(request("page"))
ShowType=trim(request("ShowType"))
OrderBy=trim(request("OrderBy"))
llevel=trim(request("level"))

call quxiaotejia()
end if

if action="提升" then 
ProdNum=replace(request("id")," ","")
ppage=trim(request("page"))
ShowType=trim(request("ShowType"))
OrderBy=trim(request("OrderBy"))
llevel=trim(request("level"))

call zxtisheng()
end if

if action="删除" then
delid=replace(request("id"),"'","")
ppage=trim(request("page"))
ShowType=trim(request("ShowType"))
OrderBy=trim(request("OrderBy"))
llevel=trim(request("level"))

call proddel()
end if

if action="隐藏" then 
ProdNum=replace(request("id")," ","")
ppage=trim(request("page"))
ShowType=trim(request("ShowType"))
OrderBy=trim(request("OrderBy"))
llevel=trim(request("level"))

call prodclose()
end if

if action="显示" then
ProdNum=replace(request("id")," ","")
ppage=trim(request("page"))
ShowType=trim(request("ShowType"))
OrderBy=trim(request("OrderBy"))
llevel=trim(request("level"))

call prodopen()
end if
%>

<%end if%>

</body>
</html>




<%

sub tisheng()
set rs=server.createobject("adodb.recordset")
sql = "select * from news where NewsId="&id&""
rs.open sql,conn,1,3
rs("PubDate")=now()
tjian="所选信息已提升，单击“确定”返回新闻列表。"
rs.update
rs.close
response.write "<script language='javascript'>"
response.write "alert('"&tjian&"');"

		if request.cookies("wwwjiayi9com")("sql")="" then'无搜索选项，即显示全部商品

        response.write "location.href='news.asp?ShowType="&ShowType&"&OrderBy="&OrderBy&""
		if llevel<>"" then 
		response.write "&level="&llevel&""
		end if
		response.write "&page="&ppage&"';"
		else
        response.write "location.href='news.asp'"
		end if

response.write "</script>"
end sub


sub zxtisheng()
if ProdNum="" or isnull(ProdNum) then
response.write "<script language='javascript'>"
response.write "alert('您什么也没有选择，单击“确定”返回上一页！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
else
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from news where NewsId in ("&ProdNum&")"
rs.open sql,conn,1,3
if rs.eof and rs.bof then
response.write "<script language='javascript'>"
response.write "alert('该信息并不存在，单击“确定”返回上一页！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
else
Do while not rs.eof
rs("PubDate")=now()
rs.update
rs.movenext
loop
end if 
response.write "<script language='javascript'>"
response.write "alert('所选信息发布日期已经提升！');"
		if request.cookies("wwwjiayi9com")("sql")="" then'无搜索选项，即显示全部商品

        response.write "location.href='news.asp?ShowType="&ShowType&"&OrderBy="&OrderBy&""
		if llevel<>"" then 
		response.write "&level="&llevel&""
		end if
		response.write "&page="&ppage&"';"
		else
        response.write "location.href='news.asp'"
		end if
response.write "</script>"

rs.close
conn.close
set rs=nothing
set conn=nothing
end if
end sub

sub prodtuijian()
if ProdNum="" or isnull(ProdNum) then
response.write "<script language='javascript'>"
response.write "alert('您什么也没有选择，单击“确定”返回上一页！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
else
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from bproduc where ProdNum in ("&ProdNum&")"
rs.open sql,conn,1,3
if rs.eof and rs.bof then
response.write "<script language='javascript'>"
response.write "alert('该商品并不存在，单击“确定”返回上一页！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
else
Do while not rs.eof
rs("remark")="1"
rs.update
rs.movenext
loop
end if 
response.write "<script language='javascript'>"
response.write "alert('所选商品已经设为推荐商品！');"
		if request.cookies("wwwjiayi9com")("sql")="" then'无搜索选项，即显示全部商品

        response.write "location.href='news.asp?ShowType="&ShowType&"&OrderBy="&OrderBy&""
		if llevel<>"" then 
		response.write "&level="&llevel&""
		end if
		response.write "&page="&ppage&"';"
		else
        response.write "location.href='news.asp'"
		end if
response.write "</script>"

rs.close
conn.close
set rs=nothing
set conn=nothing
end if
end sub

sub quxiaotuijian()
if ProdNum="" or isnull(ProdNum) then
response.write "<script language='javascript'>"
response.write "alert('您什么也没有选择，单击“确定”返回上一页！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
else
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from News where NewsId in ("&ProdNum&")"
rs.open sql,conn,1,3
if rs.eof and rs.bof then
response.write "<script language='javascript'>"
response.write "alert('该信息并不存在，单击“确定”返回上一页！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
else
Do while not rs.eof
rs("uup")=1
rs.update
rs.movenext
loop
end if 
response.write "<script language='javascript'>"
response.write "alert('所选信息已经固顶！');"
		if request.cookies("wwwjiayi9com")("sql")="" then'无搜索选项，即显示全部商品

        response.write "location.href='news.asp?ShowType="&ShowType&"&OrderBy="&OrderBy&""
		if llevel<>"" then 
		response.write "&level="&llevel&""
		end if
		response.write "&page="&ppage&"';"
		else
        response.write "location.href='news.asp'"
		end if
response.write "</script>"

rs.close
conn.close
set rs=nothing
set conn=nothing
end if
end sub

sub prodtejia()
if ProdNum="" or isnull(ProdNum) then
response.write "<script language='javascript'>"
response.write "alert('您什么也没有选择，单击“确定”返回上一页！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
else
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from bproduc where ProdNum in ("&ProdNum&")"
rs.open sql,conn,1,3
if rs.eof and rs.bof then
response.write "<script language='javascript'>"
response.write "alert('该商品并不存在，单击“确定”返回上一页！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
else
Do while not rs.eof
rs("tejia")="1"
rs.update
rs.movenext
loop
end if 
response.write "<script language='javascript'>"
response.write "alert('所选商品已经设为特价商品！');"
		if request.cookies("wwwjiayi9com")("sql")="" then'无搜索选项，即显示全部商品

        response.write "location.href='news.asp?ShowType="&ShowType&"&OrderBy="&OrderBy&""
		if llevel<>"" then 
		response.write "&level="&llevel&""
		end if
		response.write "&page="&ppage&"';"
		else
        response.write "location.href='news.asp'"
		end if
response.write "</script>"

rs.close
conn.close
set rs=nothing
set conn=nothing
end if
end sub

sub quxiaotejia()
if ProdNum="" or isnull(ProdNum) then
response.write "<script language='javascript'>"
response.write "alert('您什么也没有选择，单击“确定”返回上一页！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
else
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from News where NewsId in ("&ProdNum&")"
rs.open sql,conn,1,3
if rs.eof and rs.bof then
response.write "<script language='javascript'>"
response.write "alert('该信息并不存在，单击“确定”返回上一页！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
else
Do while not rs.eof
rs("uup")=0
rs.update
rs.movenext
loop
end if 
response.write "<script language='javascript'>"
response.write "alert('所选信息已经取消固顶！');"
		if request.cookies("wwwjiayi9com")("sql")="" then'无搜索选项，即显示全部商品

        response.write "location.href='news.asp?ShowType="&ShowType&"&OrderBy="&OrderBy&""
		if llevel<>"" then 
		response.write "&level="&llevel&""
		end if
		response.write "&page="&ppage&"';"
		else
        response.write "location.href='news.asp'"
		end if
response.write "</script>"

rs.close
conn.close
set rs=nothing
set conn=nothing
end if
end sub

sub prodclose()
if ProdNum="" or isnull(ProdNum) then
response.write "<script language='javascript'>"
response.write "alert('您什么也没有选择，单击“确定”返回上一页！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
else
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from News where NewsId in ("&ProdNum&")"
rs.open sql,conn,1,3
if rs.eof and rs.bof then
response.write "<script language='javascript'>"
response.write "alert('该信息并不存在，单击“确定”返回上一页！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
else
Do while not rs.eof
rs("online")="0"
rs.update
rs.movenext
loop
end if 
response.write "<script language='javascript'>"
response.write "alert('所选信息已经隐藏！');"
		if request.cookies("wwwjiayi9com")("sql")="" then'无搜索选项，即显示全部商品

        response.write "location.href='news.asp?ShowType="&ShowType&"&OrderBy="&OrderBy&""
		if llevel<>"" then 
		response.write "&level="&llevel&""
		end if
		response.write "&page="&ppage&"';"
		else
        response.write "location.href='news.asp'"
		end if
response.write "</script>"

rs.close
conn.close
set rs=nothing
set conn=nothing
end if
end sub

sub prodopen()
if ProdNum="" or isnull(ProdNum) then
response.write "<script language='javascript'>"
response.write "alert('您什么也没有选择，单击“确定”返回上一页！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
else
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select * from News where NewsId in ("&ProdNum&")"
rs.open sql,conn,1,3
if rs.eof and rs.bof then
response.write "<script language='javascript'>"
response.write "alert('该信息并不存在，单击“确定”返回上一页！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
else
Do while not rs.eof
rs("online")="1"
rs.update
rs.movenext
loop
end if 
response.write "<script language='javascript'>"
response.write "alert('所选信息已经显示！');"
		if request.cookies("wwwjiayi9com")("sql")="" then'无搜索选项，即显示全部商品

        response.write "location.href='news.asp?ShowType="&ShowType&"&OrderBy="&OrderBy&""
		if llevel<>"" then 
		response.write "&level="&llevel&""
		end if
		response.write "&page="&ppage&"';"
		else
        response.write "location.href='news.asp'"
		end if
response.write "</script>"

rs.close
conn.close
set rs=nothing
set conn=nothing
end if
end sub

sub shanchu()
set rs = server.createobject("adodb.recordset")
sql = "select * from news where NewsID="&id&""
rs.open sql,conn,1,3
rs.delete
rs.update
rs.close
set rs=nothing

response.write "<script language='javascript'>"
response.write "alert('操作成功，所选信息已被删除！');"
		if request.cookies("wwwjiayi9com")("sql")="" then'无搜索选项，即显示全部商品

        response.write "location.href='news.asp?ShowType="&ShowType&"&OrderBy="&OrderBy&""
		if llevel<>"" then 
		response.write "&level="&llevel&""
		end if
		response.write "&page="&ppage&"';"
		else
        response.write "location.href='news.asp'"
		end if
response.write "</script>"
end sub

sub shangxia()
set rs=server.createobject("adodb.recordset")
sql = "select * from bproduc where ProdId='"&id&"'"
rs.open sql,conn,1,3
if not (rs.eof and rs.bof) then
if rs("Quantity")="1" then 
rs("Quantity")="0"
tjian="所选商品已下架，单击“确定”返回商品列表。"
else
rs("Quantity")="1"
tjian="所选商品已上架，单击“确定”返回商品列表。"
end if
rs.update
rs.close
end if
response.write "<script language='javascript'>"
response.write "alert('"&tjian&"');"
'response.write "location.href='javascript:history.go(-1)';"
		if request.cookies("wwwjiayi9com")("sql")="" then'无搜索选项，即显示全部商品

        response.write "location.href='news.asp?ShowType="&ShowType&"&OrderBy="&OrderBy&""
		if llevel<>"" then 
		response.write "&level="&llevel&""
		end if
		response.write "&page="&ppage&"';"
		else
        response.write "location.href='news.asp'"
		end if
response.write "</script>"
end sub

sub tejia()
set rs=server.createobject("adodb.recordset")
sql = "select * from bproduc where ProdId='"&id&"'"
rs.open sql,conn,1,3
if not (rs.eof and rs.bof) then
if rs("tejia")="1" then 
rs("tejia")="0"
tjia="所选商品已列为非特价商品，单击“确定”返回商品列表。"
else
rs("tejia")="1"
tjia="所选商品已列为特价商品，单击“确定”返回商品列表。"
end if
rs.update
rs.close
end if
response.write "<script language='javascript'>"
response.write "alert('"&tjia&"');"
		if request.cookies("wwwjiayi9com")("sql")="" then'无搜索选项，即显示全部商品

        response.write "location.href='news.asp?ShowType="&ShowType&"&OrderBy="&OrderBy&""
		if llevel<>"" then 
		response.write "&level="&llevel&""
		end if
		response.write "&page="&ppage&"';"
		else
        response.write "location.href='news.asp'"
		end if
response.write "</script>"
end sub

sub tuijian()
set rs=server.createobject("adodb.recordset")
sql = "select * from bproduc where ProdId='"&id&"'"
rs.open sql,conn,1,3
if not (rs.eof and rs.bof) then
if rs("remark")="1" then 
rs("remark")="0"
rs("tjdate")=rs("adddate")
tjian="所选商品已取消推荐，单击“确定”返回商品列表。"
else
rs("remark")="1"
rs("tjdate")=now()
tjian="所选商品已列为推荐商品，单击“确定”返回商品列表。"
end if
rs.update
rs.close
end if
response.write "<script language='javascript'>"
response.write "alert('"&tjian&"');"
'response.write "location.href='javascript:history.go(-1)';"
		if request.cookies("wwwjiayi9com")("sql")="" then'无搜索选项，即显示全部商品

        response.write "location.href='news.asp?ShowType="&ShowType&"&OrderBy="&OrderBy&""
		if llevel<>"" then 
		response.write "&level="&llevel&""
		end if
		response.write "&page="&ppage&"';"
		else
        response.write "location.href='news.asp'"
		end if
response.write "</script>"
end sub

sub proddel()
if delid="" or isnull(delid) then
response.write "<script language='javascript'>"
response.write "alert('您什么也没有选择，单击“确定”返回上一页！');"
response.write "location.href='javascript:history.go(-1)';"
response.write "</script>"
response.end
else


set rs = server.createobject("adodb.recordset")
sql="select * from News where NewsId in ("&delid&")"
rs.open sql,conn,1,3
do while not rs.eof
rs.delete
rs.update
rs.movenext
if rs.eof then exit do
loop
rs.close
set rs=nothing

response.write "<script language='javascript'>"
response.write "alert('操作成功，所选信息已被删除！');"
		if request.cookies("wwwjiayi9com")("sql")="" then'无搜索选项，即显示全部商品

        response.write "location.href='news.asp?ShowType="&ShowType&"&OrderBy="&OrderBy&""
		if llevel<>"" then 
		response.write "&level="&llevel&""
		end if
		response.write "&page="&ppage&"';"
		else
        response.write "location.href='news.asp'"
		end if
response.write "</script>"
response.end
conn.close
set conn=nothing
end if
end sub

%>
