<%if mfb="" or instr(mfb,"www.huayuweb.cn")=0  then oa.msgshow("你使用是免费版，不能删除技术支持！")
dim width,height,class_cell,class_title,class_time
Sub NewsList(cid)
dim ors,irs,RecCount,i,istrue,sqlstr,bgrs,mxrs,MaxRow
'if not isobject(conn) then connectiondatabase


set rs=oa.execute("select top 1 classid,class_show,child,parentpath,class_row,parentid,width,height ,class_cell,class_title,class_time,rootid from classlist where classid ="&cid&" order by orderid")
if not rs.eof then
   if rs(2)>0 then  'rs（2）是判断存在子栏目
     sqlstr=" and classid in (select  classid from classlist where parentpath like '"&rs(3)&","&Cid&"%' and rootid="&rs("rootid")&" order by rootid,orderid)"  '当存在子栏目的时候就要用子查询
	 
	 else
	 sqlstr=" and classid="&Cid
	 
   end if
if mfb="" or instr(mfb,"www.huayuweb.cn")=0  then oa.msgshow("你使用是免费版，不能删除技术支持！")  

istrue=rs(1)
MaxRow=rs(4)
if isnull(MaxRow) or not isnumeric(MaxRow) then MaxRow=20
width=rs(6)
if isnull(width) or not isnumeric(width) then width=130
height=rs(7)
if isnull(height) or not isnumeric(height) then height=130
class_cell=rs(8)
if isnull(class_cell) or not isnumeric(class_cell) then class_cell=4
class_title=rs(9)
if isnull(class_title) or not isnumeric(class_title) then class_title=0
class_time=rs(10)
if isnull(class_time) or not isnumeric(class_time) then class_time=0

if istrue="" then
istrue=oa.execute("select class_show from classlist where classid="&rs(5))(0)
end if
if istrue="" then
istrue="列表形式"
end if

end if
rs.close

set ors=new cls_showopage
with ors
     if istrue="文章形式" then	
	 MaxRow=1  
	 end if
	.pagesize=MaxRow	
	if cid=0 then
	.sql="id,classid,title,text1,text2,text3,text4,zy,content,defaultpicurl,Updatetime,link$ from c_article where ( classid in(select classid from classlist where sfcp=1 and yysb='cn')) $orderid,tj,id desc$ID"
	else 
	.sql="id,classid,title,text1,text2,text3,text4,zy,content,defaultpicurl,Updatetime,link$ from c_article where 1=1 "&sqlstr&"$orderid,tj,id desc$ID"	 
	end if 
end with
reccount=ors.reccount
iRs=ors.ResultSet()	
           if reccount<1 then
%>
 <style type="text/css">
<!--
.STYLE1 {font-weight: bold}
-->
 </style>
  
<table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
		<td align="center" style="padding-top:6px">该栏目暂无信息</td>	
		</tr>
</table>
<%
 Else
   select case istrue
          case "文章形式"
		  call Pager(iRS)
		  case "列表形式"
		  call ShowList(iRS)
		  case "图片形式"
		  call ImgList(iRS)
		  case "图文列表"
		  Call ImgPagerList11(iRS)
		  case else
		  call ShowList(iRS)
    End select
	if reccount>maxrow then
    call ors.ShowPage("a2",1)
   end if
   
End If

End Sub

Sub Pager(iRS)
dim i
For i=0 To Ubound(iRs,2)
%>
 

		<div class="danye wow fadeIn"><%=iRS(8,i)%></div>	
<%
Next
End Sub

Sub ShowList(iRS)
dim i
%>
<div id="contain-2"  class="ycxc">
<ul >
		<%
For i=0 To Ubound(iRs,2)
%>
<%if cid<>0 then%>
<li class="wow fadeInUp" data-wow-delay="<%=0.1*i%>s">  <% if class_time=0 then%>
<SPAN class="date">[<%=year(iRS(10,i))%>-<%if month(iRS(10,i))<10 then%>0<%=month(iRS(10,i))%><%else%><%=month(iRS(10,i))%><%end if%>-<%if day(iRS(10,i))<10 then%>0<%=day(iRS(10,i))%><%else%><%=day(iRS(10,i))%><%end if%>]</span>
		    <%end if%><a href="<%  if isnull(irs(11,i)) or irs(11,i)="" then
response.Write(""&webdir&"content/?"&cid&"-"&irs(1,i)&"-"&iRS(0,i))&".html"
else
response.Write(irs(11,i))
end if%>" target="_blank"><h1><%=iRS(2,i)%></h1></a></li><li class="zyjs wow fadeInUp" data-wow-delay="<%=0.1*n%>s"><%if irs(9,i)<>"" then%> <a href="<%  if isnull(irs(11,i)) or irs(11,i)="" then
response.Write(""&webdir&"content/?"&cid&"-"&irs(1,i)&"-"&iRS(0,i))&".html"
else
response.Write(irs(11,i))
end if%>" target="_blank"><img src="<%=webdir&irs(9,i)%>" width="<%=width%>" height="<%=height%>" border="0"  alt="<%=irs(2,i)%>"  ></a><%end if%><%=left(RemoveHTML(iRS(8,i)),120)%>......</li>
<%else%><table width="100%" border="0" cellpadding="6" cellspacing="1" bgcolor="#CCCCCC" style="margin-top:12px;">
  <tr>
    <td height="30" bgcolor="#FFFFFF"><strong>招聘职位：</strong><%=iRS(2,i)%>      <div align="center"><a href="../job/?pid=<%=iRS(0,i)%>" target="_blank"></a></div></td>
    <td width="45%" height="30" bgcolor="#FFFFFF"><strong>发布时间：</strong><%=year(iRS(10,i))%>-<%if month(iRS(10,i))<10 then%>0<%=month(iRS(10,i))%><%else%><%=month(iRS(10,i))%><%end if%>-<%if day(iRS(10,i))<10 then%>0<%=day(iRS(10,i))%><%else%><%=day(iRS(10,i))%><%end if%></td>
  </tr>
  <tr>
    <td height="30" bgcolor="#FFFFFF"><strong>学历要求：</strong><%=irs(5,i)%></td>
    <td height="30" bgcolor="#FFFFFF"><strong>性别要求：</strong><%=irs(4,i)%></td>
  </tr>
  <tr>
    <td height="30" bgcolor="#FFFFFF"><strong>年龄要求：</strong><%=irs(3,i)%></td>
    <td height="30" bgcolor="#FFFFFF"><strong>招聘人数：</strong><%=irs(6,i)%></td>
  </tr>
  <tr>
    <td height="30" colspan="2" bgcolor="#FFFFFF" style="line-height:25px;"><strong>职位描述：</strong><br /><%=iRS(8,i)%></td>
    </tr>
</table><%end if%>
<%Next%>
</ul></div>
  <%
End Sub

Sub ImgList(iRS)
dim i
response.Write("<table width='100%' border='0' cellspacing='0' cellpadding='0 style='padding-top:13px''><tbody><tr >")
For i=0 To Ubound(iRs,2)
%>
<td height="150" valign="top">
<table align="center" border="0" cellspacing="0" cellpadding="0"  class="wow zoomIn" data-wow-delay="<%=0.1*i%>s">
                <tbody>
                  <tr>
                    <td width="210" height="170" align="center" valign="middle" bgcolor="#FFFFFF"    style="TEXT-DECORATION: underline; padding:2px;"  class="f1" onmouseover="this.className='f2'" onmouseout="this.className='f1'"><a href="<%  if isnull(irs(11,i)) or irs(11,i)="" then
response.Write(""&webdir&"content/?"&cid&"-"&irs(1,i)&"-"&iRS(0,i)&".html")
else
response.Write(irs(11,i))
end if%>" target="_blank">
                     <%if irs(9,i)<>"" then%><img src="<%=webdir&irs(9,i)%>" width="<%=width%>" height="<%=height%>" border="0"  alt="<%=irs(2,i)%>"  onload="javascript:DrawImage(this);" ><%else%><img src="../images/nopic.jpg" border="0"  onload="javascript:DrawImage(this);"  width="<%=width%>" height="<%=height%>"/>
                    <%end if%></a></td>
                  </tr>
				  <% if class_title=0 then%>
                  <tr>
                    <td width="210" align="center"  style="line-height:35px; height:35px; overflow:hidden; font-size:12px;" ><a href="<%  if isnull(irs(11,i)) or irs(11,i)="" then
response.Write(""&webdir&"content/?"&cid&"-"&irs(1,i)&"-"&iRS(0,i)&".html")
else
response.Write(irs(11,i))
end if%>" target="_blank"><%=irs(2,i)%></a></td>
                  </tr>
				  <% end if%>
                </tbody>
  </table>
</td>
<% if (i+1) mod clng(class_cell)=0 then response.Write("</tr><tr>")
 next
response.Write("</tr></tbody></table>")
End Sub

Sub ImgPagerList(iRS)
dim i
For i=0 To Ubound(iRs,2)
%>

<%
Next
End Sub

Sub ImgPagerList11(iRS)
dim i
For i=0 To Ubound(iRs,2)
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="twlb wow fadeInUp"   data-wow-delay="<%=0.1*i%>s">
                <tr >
                  <td width="25%"  style=" padding:6px"><table width="210" height="170"  border="0" align="left" cellpadding="0" cellspacing="0">
                            <tr>
                              <td  width="210" height="170">
                              <div align="center"><a href="<%  if isnull(irs(11,i)) or irs(11,i)="" then
response.Write(""&webdir&"content/?"&cid&"-"&irs(1,i)&"-"&iRS(0,i))&".html"
else
response.Write(irs(11,i))
end if%>" target="_blank"><img src="<%if irs(9,i)<>"" then%><%=webdir&irs(9,i)%><%else%>../images/nopic.jpg<%end if%>" width="<%=width%>" height="<%=height%>" border="0"   onload="javascript:DrawImage(this);"  ></a></div></td>
                            </tr>
                            
                  </table></td>
                  <td width="75%" valign="top"  style="padding:10px;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td height="40" style="border-bottom:#555555 1px dotted;"> <div align="left"><a href="<%  if isnull(irs(11,i)) or irs(11,i)="" then
response.Write(""&webdir&"content/?"&cid&"-"&irs(1,i)&"-"&iRS(0,i))&".html"
else
response.Write(irs(11,i))
end if%>" target="_blank"><span class="f18"><%=iRS(2,i)%></span></a></div></td>
                </tr><tr>
                  <td height="22" style="padding-top:10px; line-height:26px; font-size:14px;"><div align="left"><%=left(RemoveHTML(iRS(8,i)),100)%>...</div></td>
                  </tr>
              
              <tr>
                <td height="50" align="left"><a href="<%  if isnull(irs(11,i)) or irs(11,i)="" then
response.Write(""&webdir&"content/?"&cid&"-"&irs(1,i)&"-"&iRS(0,i))&".html"
else
response.Write(irs(11,i))
end if%>" target="_blank"><img src="../images/ljxq.png" border="0" /></a></td>
                </tr>
            </table></td></tr>
</table><!--1=编号(ClassID) 2=名称(Title) 3=text1 4=text2  5=text3 6=text4 7=zy 8=说明(Content) 9=图片(DefaultPicUrl)-->
<%
Next
End Sub
%>
<%Function RemoveHTML(strHTML)
StrHtml = Replace(StrHtml,vbCrLf,"") 
StrHtml = Replace(StrHtml,Chr(13)&Chr(10),"") 
StrHtml = Replace(StrHtml,Chr(13),"") 
StrHtml = Replace(StrHtml,Chr(10),"") 
StrHtml = Replace(StrHtml," ","") 
StrHtml = Replace(StrHtml,"    ","")
StrHtml = Replace(StrHtml,"&nbsp;","")
Dim objRegExp, Match, Matches 
Set objRegExp = New Regexp 

objRegExp.IgnoreCase = True 
objRegExp.Global = True


objRegExp.Pattern = "<style(.+?)/style>" 

Set Matches = objRegExp.Execute(strHTML) 

For Each Match in Matches 
strHtml=Replace(strHTML,Match.Value,"") 
Next


objRegExp.Pattern = "<script(.+?)/script>" 

Set Matches = objRegExp.Execute(strHTML) 
For Each Match in Matches 
strHtml=Replace(strHTML,Match.Value,"") 
Next

objRegExp.Pattern = "<.+?>" 
Set Matches = objRegExp.Execute(strHTML) 
For Each Match in Matches 
strHtml=Replace(strHTML,Match.Value,"") 
Next

RemoveHTML=strHTML 
Set objRegExp = Nothing 
End Function%>
