<!--#include virtual="/conn.asp"-->
<!--#include virtual="/function/fd_function.asp"-->
<!--#include virtual="/function/fd_page.asp"-->
<!--#include virtual="/function/fd_set.asp"-->
<!--#include virtual="/db.asp"-->
<%
if qx2=0 then
response.Write "<script language=javascript>alert('没有权限！');history.back();</script>"
response.end()
end if
%>
<% 
fir_class_id=T(request.QueryString("fir_class_id"))
set cn=fd_cn(cn)
'大类别表显示

sql="select * from chinammc_news order by mmc_id desc"
'sql="select *,(select mmc_title from chinammc_class where mmc_id=chinammc_product.pro_firid) as firclass,(select mmc_title from chinammc_class where mmc_id=chinammc_product.pro_secid) as secclass from chinammc_product where 1=1"

'if T(request.QueryString("fir_class_id"))<>"" then
'sql=sql&" and pro_firid="&T(request.QueryString("fir_class_id"))&" "
'end if

set rs=fd_rs(cn,sql)
rs.pagesize=18
link="fir_class_id="&fir_class_id

pro_list=""
pro_list=pro_list&""
pro_list=pro_list&"      <tr>"
pro_list=pro_list&"        <td height=22 class=tda>|mmc_id|</td>"
pro_list=pro_list&"        <td height=22 class=tdb><input type=checkbox name=pro_id value=|mmc_id| /></td>"

pro_list=pro_list&"        <td class=tda>|mmc_title|</td>"
pro_list=pro_list&"        <td class=tda>|mmc_content|</td>"
pro_list=pro_list&"        <td class=tda>&nbsp;|mmc_adduser|</td>"

pro_list=pro_list&"        <td  class=tdb><a href=news_edit.asp?pro_id=|mmc_id|>修改</a></td>"
pro_list=pro_list&"        <td class=tdc>|mmc_adddate|</td>"
pro_list=pro_list&"      </tr>"

pro=df_PageRSOmit(rs,T(request.QueryString("page")),pro_list,"mmc_content",220)
pro_page=pf_ShowPages2(rs,link,2)

fd_free(rs)

if pro="" then
pro="<tr><td class=tda  colspan=10><div style='color:red;height:30px;line-height:30px;font-weight:bold;'>此分类暂无商品！！！</div></td></tr>"
end if


fd_free(cn)

%>
<!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=gb2312" />
<link href="images/style.css" rel="stylesheet" type="text/css" />
<title>无标题文档</title>
<style type="text/css">
.tda{padding-left:6px;text-align:left;border-top:1px solid #CCCCCC;border-right:1px solid #CCCCCC;}
.tdb{text-align:center;border-top:1px solid #CCCCCC;border-right:1px solid #CCCCCC;}
.tdc{padding-right:6px;text-align:right;border-top:1px solid #CCCCCC;}
</style>
<script language="javascript" src="gethei.js" type="text/javascript"></script>
</head>

<body>
<table width="100%" align="center" cellpadding="0" cellspacing="0" style="border-top:1px solid #333333;border-bottom:1px solid #333333;">
  <tr>
  <td height="36" align="center" style="background:url(images/mrtbg.jpg) repeat-x;"><font size="3" color="#4b6888"><strong>新闻列表</strong></font></td>
  </tr>
  <tr>
  <td height="25"  style="PADDING:0PX 5PX;"><a href="pro_list.asp">所有商品</a></td>
  </tr>

  <tr>
  <td height="25" style="PADDING:0PX 5PX;">
  [<a href="#" onClick="del()"><font color="#FF0000"><strong>删除</strong></font></a>]&nbsp;
  [<a href="news_list.asp" ><font color="#cccc00">刷新</font></a>]  </td>
  </tr>

	
  <tr>
  <td>
    <table width="100%" cellpadding="0" cellspacing="0">
<form name="form_pro" id="form_pro" action="" method="post">
	  <tr>
        <td width="5%" height="24" class="tda"><strong>编号</strong></td>
        <td width="2%" class="tdb"><input name="chkall" type="checkbox" value="" onClick="CheckAll('form_pro')"></td>
        <td width="19%" class="tdb"><strong>新闻标题</strong></td>
        <td width="53%" class="tda"><strong>新闻内容</strong></td>
        <td width="8%" class="tda"><strong>添加人</strong><strong></strong></td>
        <td width="5%"  class="tdb"><strong>操作</strong></td>
        <td width="8%" class="tdc"><strong>添加时间</strong></td>
      </tr>
	  
      <%= pro %>
</form>
	  
	  <tr>
	  <td colspan="7" height="20" style=" text-align:center;border-top:1px solid #CCCCCC;"><%=pro_page%></td>
	  </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
<script language="JavaScript">
<!--
function CheckAll()
{
for (var i=0;i<form_pro.elements.length;i++)
{
var e = form_pro.elements[i];
if (e.name != 'chkall')
{
  e.checked = form_pro.chkall.checked;
}
}
}

function del()
{
if (confirm('您确认要删除选中的项目吗？')==true)
{ 
document.getElementById("form_pro").action="news_change.asp?<%=link%>&action=del";
document.getElementById("form_pro").submit();
}
}

function yes(action,yon)
{
if (confirm('您确认要修改选中的项目吗？')==true)
{ 
document.getElementById("form_pro").action="news_change.asp?<%=link%>&action="+action+"&yon="+yon;
document.getElementById("form_pro").submit();
}
}
-->
</script>
