<%@ LANGUAGE="VBScript" %>
<!--#include file="conn.asp"-->
<!--#include file="Inc/articlechar.inc"-->
<!-- #include file="Inc/Head.asp" -->
<script language=javascript>
function ConfirmDel()
{
   if(confirm("确定要删除此记录吗？"))
     return true;
   else
     return false;
}
</script>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td align="center" valign="top"> <br> 
      <table width="560" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" >
        <tr> 
          <td height="37" bgcolor="#ECF5FF" > 
            <div align="center"><strong>在线装修管理 <br>
          </strong></div></td>
        </tr>
        <tr> 
          <td height="35" bgcolor="#ECF5FF"> 
<div align="center"> 
<% 
const MaxPerPage=5 '分页显示的纪录个数 
dim sql 
dim rs 
dim totalPut 
dim CurrentPage 
dim TotalPages 
dim i,j 
 
 
if not isempty(request("page")) then 
  currentPage=cint(request("page")) 
else 
  currentPage=1 
end if 
set rs=server.createobject("adodb.recordset") 
sql="select * from Feedback order by id desc" 
rs.open sql,conn,1,1 
 
if rs.eof and rs.bof then 
  response.write "<p align='center'>还没有内容!</p>" 
else 
  totalPut=rs.recordcount  
if currentpage<1 then 
  currentpage=1 
end if 
if (currentpage-1)*MaxPerPage>totalput then 
  if (totalPut mod MaxPerPage)=0 then 
   currentpage= totalPut \ MaxPerPage 
  else 
   currentpage= totalPut \ MaxPerPage + 1 
  end if 
end if 
if currentPage=1 then 
  showpages 
  showContent 
  showpages 
else 
 if (currentPage-1)*MaxPerPage<totalPut then 
  rs.move (currentPage-1)*MaxPerPage 
  dim bookmark 
  bookmark=rs.bookmark 
  showpages 
  showContent 
  showpages 
 else 
  currentPage=1 
  showContent 
 end if 
end if 
rs.close 
end if 
set rs=nothing 
conn.close 
set conn=nothing 


sub showContent 
dim i 
i=0 
do while not (rs.eof or err) %>
              <table  width="560" border="0" cellpadding="5" cellspacing="1" bgcolor="#999999" >
                <tr bgcolor="#A4B6D7"> 
                  <td width="24%" height="40" align="right" bgcolor="#ECF5FF">
                      <%if rs("Username")="管理员"then%>
                      [管理员公告] 
                      <%else%>
                      操作选项：
                  <%end if%>                 </td>
                  <td width="76%" bgcolor="#ECF5FF">&nbsp;&nbsp; &nbsp; <a href="Admin_FeedbackDel.asp?id=<%=rs("ID")%>" onClick="return ConfirmDel();">删除</a>&nbsp;&nbsp;&nbsp;&nbsp; 
                    <a href="Admin_FeedbackRe.asp?id=<%=rs("id")%>"> 
                    <%if rs("Username")<>"管理员" then%>
                  </a> <%end if%> </td>
                </tr>
                <%if rs("email")<>"" then%>
                <%end if%>
                <tr bgcolor="#ECF5FF">
                  <td height="35" align="right">系统ID：</td>
                  <td height="25" class="t4"><B><%=rs("ID")%></B></td>
                </tr>
                <tr bgcolor="#ECF5FF">
                  <td height="35" align="right">姓名：</td>
                  <td height="25"><%=rs("Receiver")%></td>
                </tr>
                <tr bgcolor="#ECF5FF">
                  <td height="35" align="right">性别：</td>
                  <td height="25"><%=rs("xb")%></td>
                </tr>
                <tr bgcolor="#ECF5FF">
                  <td height="35" align="right">职业：</td>
                  <td height="25"><%=rs("zy")%></td>
                </tr>
                <tr bgcolor="#ECF5FF">
                  <td height="35" align="right">倾向的家居色调：</td>
                  <td height="25"><%=rs("jjsd")%></td>
                </tr>
                <tr bgcolor="#ECF5FF">
                  <td height="35" align="right">所在的城市：</td>
                  <td height="25"><%=rs("Add")%></td>
                </tr>
                <tr bgcolor="#ECF5FF">
                  <td height="35" align="right">E-MAIL：</td>
                  <td height="25"><%=rs("Email")%></td>
                </tr>
                <tr bgcolor="#ECF5FF">
                  <td height="35" align="right">联系电话：</td>
                  <td height="25"><%=rs("Phone")%></td>
                </tr>
                <tr bgcolor="#ECF5FF">
                  <td height="35" align="right">房屋楼层情况：</td>
                  <td height="25"><%=rs("fwlc")%></td>
                </tr>
                <tr bgcolor="#ECF5FF">
                  <td height="35" align="right">房屋结构：</td>
                  <td height="25"><%=rs("fwjg1")%>室 <%=rs("fwjg2")%>厅 <%=rs("fwjg3")%> 卫</td>
                </tr>
                <tr bgcolor="#ECF5FF">
                  <td height="35" align="right">房屋面积：</td>
                  <td height="25"><%=rs("CompanyName")%></td>
                </tr>
                <tr bgcolor="#ECF5FF">
                  <td height="35" align="right">楼盘位置：</td>
                  <td height="25"><%=rs("Postcode")%></td>
                </tr>
                <tr bgcolor="#ECF5FF">
                  <td height="35" align="right">对装修材料的要求：</td>
                  <td height="25"><%=rs("zxcl")%></td>
                </tr>
                <tr bgcolor="#ECF5FF">
                  <td height="35" align="right">装修种类：</td>
                  <td height="25"><%=rs("zxzl")%></td>
                </tr>
                <tr bgcolor="#ECF5FF">
                  <td height="35" align="right">要求装修时间：</td>
                  <td height="25"><%=rs("zxsj1")%>个月完成 <%=rs("zxsj2")%>年 <%=rs("zxsj3")%>起开工</td>
                </tr>
                <tr bgcolor="#ECF5FF">
                  <td height="35" align="right">装修要求：</td>
                  <td height="25"><%=rs("Content")%></td>
                </tr>
                <tr bgcolor="#ECF5FF">
                  <td height="35" align="right">第几次置业者：</td>
                  <td height="25"><%=rs("zyxz")%></td>
                </tr>
                <tr bgcolor="#ECF5FF">
                  <td height="35" align="right">总体预算投资：</td>
                  <td height="25"><%=rs("Title")%></td>
                </tr>
                <%if rs("ReFeedback")<>""then%>
                
                <%end if%>
              </table>
            </div></td>
        </tr>
      </table>
      <br> <table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td><div align="center">
              <% i=i+1 
 if i>=MaxPerPage then exit do 
 rs.movenext 
loop 
end sub 
sub showpages() 
 dim n 
 if (totalPut mod MaxPerPage)=0 then 
   n= totalPut \ MaxPerPage 
 else 
   n= totalPut \ MaxPerPage + 1 
 end if 
 if n=1 then 
  exit sub 
 end if 
 dim k 
 response.write "<p align='left'>&gt;&gt; 内容分页 " 
 for k=1 to n 
 if k=currentPage then 
   response.write "[<b>"+Cstr(k)+"</b>] " 
 else 
   response.write "[<b>"+"<a href='Admin_Feedback.asp?page="+cstr(k)+"'>"+Cstr(k)+"</a></b>] " 
 end if 
 next 
end sub 
%>
            </div></td>
        </tr>
      </table>
      <br> <br> </td>
  </tr>
</table>
<!-- #include file="Inc/Foot.asp" -->