<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="house.aspx.cs" Inherits="HeyuanHouse.Web.member.house" %>
<%@Register TagPrefix="Webdiyer" Namespace="Wuqi.Webdiyer" Assembly="aspnetpager"%>

<%@ Register src="membernav.ascx" tagname="membernav" tagprefix="uc1" %>
<%@ Register src="../siteheader.ascx" tagname="siteheader" tagprefix="uc2" %>
<%@ Register src="../sitefooter.ascx" tagname="sitefooter" tagprefix="uc3" %>
<!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" />
<title>河房网 - 专业的房产信息交易平台 - www.0762h.com</title>
<link href="../images/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<uc2:siteheader ID="siteheader1" runat="server" />
<div id="sitenav">您现在的位置：<a href="/">河房网</a> &gt;&gt; <a href="/member/">会员中心</a></div>
<div class="main">
<div class="boxright">
<uc1:membernav ID="membernav1" runat="server" />
</div>
  <div class="boxlefts">
  
<div class="TabTitle">
        <ul>
          <asp:PlaceHolder runat="server" ID="phHouseTabAll">
            <li class="active"><a href="house.aspx">全部</a></li>
            <li class="normal"><a href="house.aspx?t=rental">出租</a></li>
            <li class="normal"><a href="house.aspx?t=sell">二手房</a></li>
          </asp:PlaceHolder>
          <asp:PlaceHolder runat="server" ID="phHouseTabRental">
            <li class="normal"><a href="house.aspx">全部</a></li>
            <li class="active"><a href="house.aspx?t=rental">出租</a></li>
            <li class="normal"><a href="house.aspx?t=sell">二手房</a></li>
          </asp:PlaceHolder>
          <asp:PlaceHolder runat="server" ID="phHouseTabSell" Visible="false">
            <li class="normal"><a href="house.aspx">全部</a></li>
            <li class="normal"><a href="house.aspx?t=rental">出租</a></li>
            <li class="active"><a href="house.aspx?t=sell">二手房</a></li>
          </asp:PlaceHolder>
        </ul>
       </div>
<div id="myissay">
  <table width="100%" border="0" cellpadding="8" cellspacing="1"  bgcolor="#e0e0e0">  
    <tr bgcolor="#ebebeb" style="font-weight:bold;">
      <td width="20">&nbsp;</td>
      <td>标题</td>
      <td width="60">房型</td>
      <td width="80">更新时间</td>
      <td width="100">操作</td>
      </tr>
  </table>
   
<table width="100%" border="0" cellpadding="8" cellspacing="1" bgcolor="#ebebeb">
  <asp:Repeater runat="server" ID="rptHouseList" 
        onitemcreated="rptHouseList_ItemCreated">
    <ItemTemplate>
      <tr>
      <td width="20" bgcolor="#FFFFFF"><label>
        <asp:CheckBox runat="server" ID="chkSelectItem" />
        <asp:TextBox runat="server" ID="txtSelectItemValue" Text='<%# DataBinder.Eval(Container.DataItem, "hid")%>' Visible="false" />
      </label></td>
      <td bgcolor="#FFFFFF"><img src='<%# (int)DataBinder.Eval(Container.DataItem, "sourcetype") == 1 ? "/images/iconzu.gif" : "/images/iconsou.gif" %>' border="0" /> <a href="<%# DataBinder.Eval(Container.DataItem, "viewurl")%>" target="_blank">[<%# DataBinder.Eval(Container.DataItem, "houseclass")%>] <%# DataBinder.Eval(Container.DataItem, "title")%> <%# ((bool)DataBinder.Eval(Container.DataItem, "iscommend")) ? " (<font color=red>荐</font>)" : ""%></a></td>
      <td width="60" bgcolor="#FFFFFF"><%# DataBinder.Eval(Container.DataItem, "roomtypedesc")%></td>
      <td width="80" bgcolor="#FFFFFF"><%# ((DateTime)DataBinder.Eval(Container.DataItem, "dateupdated")).ToShortDateString() %></td>
      <td width="100" bgcolor="#FFFFFF">
        <a href='<%# GetEditLink((int)DataBinder.Eval(Container.DataItem, "hid"),(int)DataBinder.Eval(Container.DataItem, "sourcetype"))%>' title="点此修改房源信息">修改</a> | 
        <a href="<%# DataBinder.Eval(Container.DataItem, "viewurl")%>" target="_blank" title="点此查看房源信息">查看</a>
      </td>
      </tr>
    </ItemTemplate>
  </asp:Repeater>  
 
  </table> 
  
  <table border="0" cellpadding="5" cellspacing="1" width="100%" class="Paging">
    <tr>
      <td width="100%">
        <webdiyer:AspNetPager id="pager" runat="server" AlwaysShow="True" ShowCustomInfoSection="Left" Width="80%" OnPageChanged="pager_PageChanged" ShowSelectBox="Never"></webdiyer:AspNetPager>  
      </td>
     </tr>
   </table>
  <div class="member_right_bottom">			
    <input name="chkSelectAll" type="checkbox" runat="server" onclick="javascript:SelectAll(this);" />全选 
    <asp:Button runat="server" ID="btnReflash" Text="刷新选中房源" 
          onclick="btnReflash_Click" /> 
    <asp:Button runat="server" ID="btnDelete" Text="删除选中房源" 
          onclick="btnDelete_Click" /> 
    <asp:Button runat="server" ID="btnCommend" Visible="false" Text="设为推荐" 
          onclick="btnCommend_Click"  /> 
    <asp:Button runat="server" ID="btnCancelCommend" Visible="false" Text="取消推荐" 
          onclick="btnCancelCommend_Click"  /> 
  </div> 
</div>
    
</div>

</div>
<uc3:sitefooter ID="sitefooter1" runat="server" />
</form>
<script language="javascript" type="text/javascript">
function SelectAll(theBox)
{
    var elm=document.form1.elements;
    for(i=0;i<elm.length;i++)
    if(elm[i].type=="checkbox" && elm[i].name!=theBox.name)
    {
        elm[i].checked=theBox.checked ;
    }
}
function CheckDeleteHandle(btn)
{
    var elm=document.form1.elements;
    var flag = false ;
    for(i=0;i<elm.length;i++) 
    if(elm[i].type=="checkbox")
    {
        if (elm[i].checked)
        {
          flag = true ;
          break ;
        }
    }
    
    if (flag)
    { 
        return confirm('确认要删除选择的房源信息？') ;
    }
    else
    {
        alert("你没有选择任何房源信息，请选择！") ;
        return false ;
    }
}
</script>
</body>
</html>