<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="YC_News_List.aspx.cs" Inherits="YCHR.Web.admin.News.YC_News_List" %>
<!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 id="Head1" runat="server">
<title>资讯管理</title>
<link rel="stylesheet" type="text/css" href="../images/style.css" />
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/function.js"></script>
<script type="text/javascript">
        $(function () {
            $(".msgtable tr:nth-child(odd)").addClass("tr_bg"); //隔行变色
            $(".msgtable tr").hover(
			    function () {
			        $(this).addClass("tr_hover_col");
			    },
			    function () {
			        $(this).removeClass("tr_hover_col");
			    }
		    );
        });
        //全选，反选
        function checkall(obj, cc) {
            $(cc).find(":checkbox").attr("checked", $(obj).attr("checked") == true);
        }
    </script>
</head>
<body style="padding: 10px;">
<form id="form1" runat="server">
  <div class="navigation"> <span class="add"></span><b>您当前的位置：首页 &gt; 资讯管理 &gt; 资讯列表</b></div>
  <div class="spClear"> </div>
  <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1">
    <tr>
      <td height="25" class="pl20"><b>管理选项： <a href="YC_NewsClass_Add.aspx">新增栏目</a>| <a href="YC_NewsClass_List.aspx"> 栏目管理</a>| <a href="YC_News_Add.aspx">添加资讯</a> | <a href="YC_News_List.aspx">资讯管理</a> |[<a href="javascript:location.reload()">刷新页面</a>]</b></td>
    </tr>
    <tr>
      <td height="25" class="pl20">　　<b>搜索：
          <asp:DropDownList ID="ddlProperty" runat="server" AutoPostBack="True" CssClass="select">
          <asp:ListItem Value="1">标题 </asp:ListItem>
        </asp:DropDownList>
        </b>&nbsp;
        <asp:TextBox ID="txtKeywords" runat="server" CssClass="keyword"></asp:TextBox>
        &nbsp;
        <asp:Button ID="btnSelect" runat="server" Text="查询" CssClass="submit" OnClick="btnSelect_Click" /></td>
    </tr>
  </table>
  <div class="clear box">
  <asp:Literal ID="litpagestr0" runat="server"></asp:Literal>
  </div>
  <div class="clear"></div>
  <table width="100%" border="0" cellspacing="0" cellpadding="0" class="msgtable">
    <tr>
      <th width="5%" align="center"> <input type="checkbox" onclick="checkall(this,'.msgtable');" name="chkBoxAll" id="chkBoxAll">
      </th>
      <th width="5%" align="center"> 编号 </th>
      <th width="30%" align="center"> 标题 </th>
      <th width="10%" align="center"> 所属栏目 </th>
      <th width="10%" align="center"> 发布日期 </th>
      <th width="20%" align="center"> 属性 </th>
      <th width="10%" align="center"> 生成HTML </th>
      <th width="10%" align="center"> 操作 </th>
    </tr>
    <asp:Repeater ID="repNewsList" runat="server" OnItemCommand="repNewsList_ItemCommand">
      <ItemTemplate>
        <tr>
          <td align="center"><asp:HiddenField ID="txtid" Value='<%#Eval("id") %>' runat="server" />
            <asp:CheckBox ID="cb_id" CssClass="checkall" runat="server" /></td>
          <td align="center"><%#Eval("id") %></td>
          <td align="left"><%#Eval("title") %></td>
          <td align="center"><%#getClasslName(Eval("classid").ToString())%></td>
          <td align="center"><%#Eval("addtime") %></td>
          <td align="center"><asp:ImageButton ID="ibtnhome" CommandName="ibtnhome" runat="server" ImageUrl='<%# Convert.ToInt32(Eval("ishome")) == 1 ? "../Images/ico-1.png" : "../Images/ico-1_.png"%>'
                            ToolTip='<%# Convert.ToInt32(Eval("ishome")) == 1 ? "取消首页显示" : "设置首页显示"%>' />
            <asp:ImageButton ID="ibtncomm" CommandName="ibtncomm" runat="server" ImageUrl='<%# Convert.ToInt32(Eval("iscomm")) == 1 ? "../Images/ico-2.png" : "../Images/ico-2_.png"%>'
                            ToolTip='<%# Convert.ToInt32(Eval("iscomm")) == 1 ? "取消推荐" : "设置推荐"%>' />
            <asp:ImageButton ID="ibtnHot" CommandName="ibtnHot" runat="server" ImageUrl='<%# Convert.ToInt32(Eval("ishot")) == 1 ? "../Images/ico-3.png" : "../Images/ico-3_.png"%>'
                            ToolTip='<%# Convert.ToInt32(Eval("ishot")) == 1 ? "取消热门" : "设置热门"%>' />
            <asp:Button ID="ibtnlock" runat="server"  CommandName="ibtnlock"
                            Text='<%# Convert.ToInt32(Eval("Islock")) == 1 ? "审核" : "取消审核"%>' /></td>
          <td align="center"><%#Convert.ToBoolean(Eval("ishtml")) == true ? "<font color='green'>√</font>" : "<font color='red'>×</font>"%></font></td>
          <td align="center"><asp:ImageButton ID="imgedit" CommandName="imgedit" ImageUrl="../images/white_edit.png"
                            runat="server" />
            <asp:ImageButton ID="imgdel" OnClientClick="return confirm( '确定要删除吗？ ');" CommandName="imgdel"
                            ImageUrl="../images/white_delete.png" runat="server" /></td>
        </tr>
      </ItemTemplate>
    </asp:Repeater>
  </table>
  <div class="clear box">
  <div class="left">
      <asp:LinkButton ID="lbtnDel" runat="server" OnClientClick="return confirm( '确定要删除这些记录吗？ ');"   class="submit"  OnClick="lbtnDel_Click">删 除</asp:LinkButton></div>
    <!--page-->
  <asp:Literal ID="litpagestr" runat="server"></asp:Literal>
  </div>
  <div class="clear"></div>
</form>
</body>
</html>
