<!--#include file="conn.asp"-->
<%
if request("id")<>"" then
	set rs=server.createobject("adodb.recordset")
	sqltext="select * from hotelb where id="&request("id")&"" 
	rs.open sqltext,conn,1,1
elseif request("userid")<>"" then
	set rs=server.createobject("adodb.recordset")
	sqltext="select * from hotelb where userid='"&request("userid")&"'" 
	rs.open sqltext,conn,1,1
end if
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="images/site.css" type=text/css rel=stylesheet>
<script language="JavaScript">
<!--
var imageObject;
function ResizeImage(obj, MaxW, MaxH)
{
    if (obj != null) imageObject = obj;
    var state=imageObject.readyState;
    var oldImage = new Image();
    oldImage.src = imageObject.src;
    var dW=oldImage.width; var dH=oldImage.height;
    if(dW>MaxW || dH>MaxH) {
        a=dW/MaxW; b=dH/MaxH;
        if(b>a) a=b;
        dW=dW/a; dH=dH/a;
    }
    if(dW > 0 && dH > 0)
        imageObject.width=dW;imageObject.height=dH;
    if(state!='complete' || imageObject.width>MaxW || imageObject.height>MaxH) {
        setTimeout("ResizeImage(null,"+MaxW+","+MaxH+")",40);
    }
}
//-->
</script>
<title>上饶折扣网---折扣消费大舞台!</title>
</head>

<body background="img/right-bg.jpg" topmargin="0" leftmargin="0">

<table border="0" width="900" cellspacing="0" cellpadding="0" id="table1">
	<tr>
		<td colspan="4">
		<img border="0" src="img/1.jpg" width="841" height="198"></td>
	</tr>
	<tr>
		<td width="150" background="left-bg.jpg" valign="top"><img border="0" src="img/left.jpg"></td>
		<td width="591" bgcolor="#FFFFFF" valign="top">
		<table border="0" width="100%" id="table2">
			<tr>
				<td bgcolor="#DEDEDE" height="26" style="font-size:14px"> &nbsp;您的位置：<a href="hoteldetail.asp?userid=<%=rs("userid")%>" style="font-size:14px"><%=rs("name")%></a> &gt; 商家招聘</td>
			</tr>
			<tr>
				<td>　</td>
			</tr>
			<tr>
				<td>
<%
set rszp=server.createobject("adodb.recordset")
sqltext="select * from hotelzpb where userid='"&rs("userid")&"' order by id desc" 
rszp.open sqltext,conn,1,1

dim MaxPerPage
MaxPerPage=20

'假如没有数据时
If rszp.eof and rszp.bof then 
   call emptylist 
   call showpages
  
   response.end
End if

'取得页数,并判断用户输入的是否数字类型的数据，如不是将以第一页显示
dim text,checkpage
text="0123456789"
 rszp.PageSize=MaxPerPage
for i=1 to len(request("page"))
   checkpage=instr(1,text,mid(request("page"),i,1))
   if checkpage=0 then
      exit for 
   end if
next

If checkpage<>0 then
      If NOT IsEmpty(request("page")) Then
        CurrentPage=Cint(request("page"))
        If CurrentPage < 1 Then CurrentPage = 1
        If CurrentPage > rszp.PageCount Then CurrentPage = rszp.PageCount
      Else
        CurrentPage= 1
      End If
      If not rszp.eof Then rszp.AbsolutePage = CurrentPage end if
Else
   CurrentPage=1
End if
call list
call showpages


If rszp.recordcount > MaxPerPage then
   call showpages
end if

'显示帖子的子程序
Sub list()%>
				<table border="0" width="584" id="table38" cellspacing="1" cellpadding="0" height="62">
					<tr style="font-size:14px">
						<td bgcolor="#FFCA0A" height="28" align="center" width="206">
						<font color="#000000">招聘职位</font></td>
						<td bgcolor="#FFCA0A" height="28" align="center" width="53">
						<font color="#000000">人数</font></td>
						<td bgcolor="#FFCA0A" height="28" align="center" width="107">
						<font color="#000000">工作地点</font></td>
						<td bgcolor="#FFCA0A" height="28" align="center" width="107">
						<font color="#000000">有效期</font></td>
						<td bgcolor="#FFCA0A" height="28" align="center" width="108">
						<font color="#000000">发布日期</font></td>
					</tr>
<%                                 
if not rszp.eof then                                 
  i=0                                 
  do while not rszp.eof                                  
%> 
					<tr <%if i mod 2=0 then response.write " bgcolor=#F7F7F7"%>>
						<td width="206" height=28>·<a href="hotelzpdetail.asp?id=<%=rszp("id")%>&userid=<%=rszp("userid")%>" style="font-size:14px"><%=rszp("zpzw")%></a></td>
						<td align="center" width="53"><%=rszp("zprs")%></td>
						<td align="center" width="107"><%=rszp("gzdd")%></td>
						<td align="center" width="107"><%=rszp("endtime")%></td>
						<td align="center" width="108"><%=formatdatetime(rszp("dateandtime"),2)%></td>
					</tr>
<%                                 
   i=i+1                                 
   if i >= MaxPerpage then exit do                                 
   rszp.movenext                                 
   loop                                 
end if                                 
%> 					
				</table>
<%                                 
End sub                                 
rszp.close                                 
conn.close                                 
'显示空数据的子程序
Sub emptylist()%>
				<table border="0" width="100%" id="table38" cellspacing="1" cellpadding="0" height="84">
					<tr style="font-size:14px">
						<td bgcolor="#FFCA0A" height="28" align="center" width="47%">
						<font color="#000000">招聘职位</font></td>
						<td bgcolor="#FFCA0A" height="28" align="center" width="31%">
						<font color="#000000">有效期</font></td>
						<td bgcolor="#FFCA0A" height="28" align="center" width="21%">
						<font color="#000000">发布日期</font></td>
					</tr>

					<tr>
						<td bgcolor="#F7F7F7" colspan="3"  style="font-size:14px">
						<p align="center"><font color="#FF0000">暂无招聘职位</font></td>
					</tr>
				
				</table>
<%                                 
End sub                                                                
%> 	
<%'显示翻页的子程序
sub showpages()%><p>
<table width=100% background=images/bg1.gif border=0 border="0" cellPadding="0" cellSpacing="0">
<tr height=41><td >
<%
response.write "<form method=Post action='hotelzplist.asp' name=111>"
%>
<input type=hidden value=<%=rs("userid")%> name=userid>
<div align="center">
<table border="0" cellPadding="0" cellSpacing="0" width="100%" >
<tr>
<td>
<%
userid=request("userid")

If currentpage > 1 Then
response.write "<input type='button' class='buttonx5'  value='首页' onclick=window.location='hotelzplist.asp?page="+cstr(1)+"&userid="+userid+"'>&nbsp;"
Response.write "<input type='button' class='buttonx5'  value='上一页' onclick=window.location='hotelzplist.asp?page="+Cstr(currentpage-1)+"&userid="+userid+"'>&nbsp;"
Else
Response.write "<input type='button' class='buttonx5'  value='首页' disabled>&nbsp;"
Response.write "<input type='button' class='buttonx5'  value='上一页' disabled>&nbsp;"
End if

If currentpage < rs.PageCount Then
Response.write "<input type='button' class='buttonx5'  value='下一页' onclick=window.location='hotelzplist.asp?page="+Cstr(currentPage+1)+"&userid="+userid+"'>&nbsp;"
Response.write "<input type='button' class='buttonx5'  value='尾页' onclick=window.location='hotelzplist.asp?page="+Cstr(rs.PageCount)+"&userid="+userid+"'>&nbsp;&nbsp;"
Else
Response.write "<input type='button' class='buttonx5'  value='下一页' disabled>&nbsp;"
Response.write "<input type='button' class='buttonx5'  value='尾页' disabled>&nbsp;&nbsp;"
End if

Response.write "页次：" & Cstr(CurrentPage)&"/"&Cstr(rs.pagecount) 

response.write "</SPAN></td><td align='right'class=text3>"
response.write "转到：<input type='text' name='page' size=2 maxlength=4  value="&Currentpage&">&nbsp;"
response.write "<input type='submit'  value='Go'  name='cndok' class='buttonx5'>&nbsp;&nbsp;"
%>
</font>
</td>
</tr>
</table>
</div>
</td></tr>
</table>
</form>
<%end sub%>    
				</td>
			</tr>
<tr>
				<td>
				<div align="center">
					<table cellSpacing="0" cellPadding="0" width="547" border="0" id="table37">
						<tr>
							<td><!-- 郴何/寇何 傈版 捞固瘤 矫累 -->
							<!-- 郴何/寇何 傈版 捞固瘤 场 --></td>
						</tr>
					</table>
				</div>
				</td>
			</tr>
		</table>
		</td>
		<td width="118" valign="top">
		<map name="FPMap0">
		<area href="hoteldetail.asp?userid=<%=request("userid")%>" shape="circle" coords="35, 147, 23">
		<area href="http://www.17zk.cn" shape="circle" coords="36, 89, 22">
		</map>
		<img border="0" src="img/right1.jpg" usemap="#FPMap0"> </td>
		<td width="55">　</td>
	</tr>
	<tr>
		<td background="left-bg.jpg">　</td>
		<td bgcolor="#FFFFFF">　</td>
		<td background="img/right-bg.jpg" width="118">　</td>
		<td width="55">　</td>
	</tr>
	<tr>
		<td  colspan="2">
		<img border="0" src="img/bottom.jpg" height="45"></td>
		<td background="img/right-bg.jpg" width="118">　</td>
		<td width="55">　</td>
	</tr>
</table>

</body>

</html>