<!-- #include file="skin.asp" -->
<!-- #include file="jk_page_cute.asp" -->
<%
dim table1,tdtemp1,tdtemp2
table1="<table width='777' border=0 align=center cellpadding=1 cellspacing=1>"
tdtemp1="<td width='14%' align=right height=25 class=bg_tds>"
tdtemp2="</td><td width='36%' height=25 class=bg_td>&nbsp;"

dim ispic,nid,sqladd
index_url="job"
tit_fir=format_menu(index_url)
m_channel=index_url
web_img_m="m_"&m_channel
web_img_h="h_"&m_channel

sub job_load(t1,t2)
  'call web_js_type(2)
  'if t1=1 then
  'response.write joekoe_cms.js_put("joekoe_job.js",5)
 ' end if
  'if t2=1 then
   ' response.write joekoe_cms.js_put("style/joekoe_pagecute.js",0)
  'end if
 ' call web_js_type(1)
end sub

sub company_search(t_title)
  response.write vbcrlf&"job_bar_top('"&t_title&"',0);" & _
		 vbcrlf&"company_search('招聘');" & _
		 vbcrlf&"job_bar_end('',0);"
end sub

sub person_search(t_title)
  response.write vbcrlf&"job_bar_top('"&t_title&"',0);" & _
		 vbcrlf&"person_search('求职');" & _
		 vbcrlf&"job_bar_end('',0);"
end sub

sub job_main(tnum,m_type,mhead)
  dim sqladd,data_name,n_tim,n_topic,n_cname,n_username,n_zpnum
  response.write vbcrlf&job_bar_top(mhead,1)
  select case m_type
  case "person"
    data_name="person"
    sqladd=",sex,edu,iname,counter"
    response.write vbcrlf&"<tr class=bg_tds align=center height=25><td width='20%'>名    称</td><td width='10%'>性    别</td><td width='15%'>学    历</td><td width='45%'>应聘岗位</td><td width='10%'>发布日期</td></tr>"
  case else
    m_type="company"
    data_name="job"
    sqladd=",cname,username,zpnum"
    response.write vbcrlf&"<tr class=bg_tds align=center height=25><td width='30%'>招聘职位</td><td width='50%'>发布公司名称</td><td width='10%'>招聘人数</td><td width='10%'>发布日期</td></tr>"
  end select
  sql="select top "&tnum&" id,tim,job"&sqladd&" from "&data_name&" where hidden=1 order by id desc"
  set rs=conn.execute(sql)
  do while not rs.eof
    n_tim=rs("tim")
    n_tim=joekoe_cms.time_type(n_tim,4)
    n_topic=rs("job")
    n_topic=joekoe_cms.code_js(n_topic,1)
	if m_type="person" then
      n_cname=rs("iname")
      n_cname=joekoe_cms.code_js(n_cname,1)
      response.write vbcrlf&person_more_type(n_cname,rs("id"),rs("sex"),rs("edu"),n_topic,n_tim)
    else
      n_cname=rs("cname")
      n_cname=joekoe_cms.code_js(n_cname,1)
      n_username=rs("username")
      n_zpnum=int(rs("zpnum"))
      response.write vbcrlf&company_more_type(n_topic,rs("id"),n_cname,n_username,n_zpnum,n_tim)
    end if
    rs.movenext
  loop
  rs.close
  response.write vbcrlf&job_bar_end("job_"&m_type&".asp",1)
end sub

sub job_left(nt,n_num,c_num,n_title)
  dim n_username,n_topic,n_tim
  response.write vbcrlf&job_bar_top(n_title,1)
  sql="select top "&n_num&" id,username,cname,job,tim,counter from job where hidden=1"
  select case nt
  case "hot"
    sql=sql&" order by counter desc,id desc"
  case "good"
    sql=sql&" and istop=1 order by id desc"
  case else
    sql=sql&" order by id desc"
  end select
  set rs=joekoe_cms.exec(sql,1)
  do while not rs.eof
  %>
<tr><td>
<%response.write img_skin(web_img_h)%>
<a href="job_view.asp?id=<%response.write rs("id")%>" alt='招聘标题：<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("job"),1,n_num),1)%><br>企业名称：<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("cname"),1,0),1)%><br>发 布 人：<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("username"),1,0),1)%><br>点击次数：<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("counter"),1,n_num),1)%>人次<br>发布时间：<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("tim"),1,n_num),1)%>' target=_blank>
<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("job"),1,n_num),1)%></a></td></tr>
<%
  rs.movenext
  loop
  rs.close
%>
<tr><td align=right valign=bottom><a href="job_company.asp" class=tims>more</a>&nbsp;</td></tr>
</table></td></tr></table>
<%
end sub

sub company_left(n_num,c_num,n_title)
  dim n_username,n_topic,n_tim
  response.write vbcrlf&job_bar_top(n_title,1)
  sql="select top "&n_num&" id,cname,username,tim,counter from company where hidden=1 and cname<>'""'"
  sql=sql&" order by counter desc,id desc"
  set rs=joekoe_cms.exec(sql,1)
  do while not rs.eof
  %>
<tr><td>
<%response.write img_skin(web_img_h)%>
<a href="company_view.asp?uid=<%response.write rs("username")%>" alt='企业名称：<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("cname"),1,0),1)%><br>发 布 人：<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("username"),1,0),1)%><br>点击次数：<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("counter"),1,n_num),1)%>人次<br>发布时间：<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("tim"),1,n_num),1)%>' target=_blank>
<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("cname"),1,n_num),1)%></a></td></tr>
<%
    rs.movenext
  loop
  rs.close
%>
<tr><td align=right valign=bottom><a href="job_company.asp" class=tims>more</a>&nbsp;</td></tr>
</table></td></tr></table>
<%
end sub

sub person_left(nt,n_num,c_num,n_title)
  dim n_topic,n_tim,n_job
  response.write vbcrlf&job_bar_top(n_title,1)
  sql="select top "&n_num&" id,iname,username,job,tim,counter from person where hidden=1"
  select case nt
  case "hot"
    sql=sql&" order by counter desc,id desc"
  case "good"
    sql=sql&" and istop=1 order by id desc"
  case else
    sql=sql&" order by id desc"
  end select
  set rs=joekoe_cms.exec(sql,1)
  do while not rs.eof
  %>
<tr><td>
<%response.write img_skin(web_img_h)%>
<a href="person_view.asp?id=<%response.write rs("id")%>" alt='求 职 人：<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("iname"),1,0),1)%><br>发 布 人：<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("username"),1,0),1)%><br>点击次数：<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("counter"),1,n_num),1)%>人次<br>发布时间：<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("tim"),1,n_num),1)%>' target=_blank>
<%response.write joekoe_cms.code_js(joekoe_cms.code_html(rs("job"),1,n_num),1)%></a></td></tr>
<%
    rs.movenext
  loop
  rs.close
%>
<tr><td align=right valign=bottom><a href="job_person.asp" class=tims>more</a>&nbsp;</td></tr>
</table></td></tr></table>
<%
end sub
function job_bar_top(tvar,tt)
  dim temp1
     temp1=temp1&"<table cellspacing=0 cellpadding=1 class=table>" &_
                             vbcrlf&"<tr><td class=td><font color=000000>&nbsp;"&img_skin(web_img_m)&"&nbsp;"&tvar&"</font></td></tr>" &_
                             vbcrlf&"<tr class=bg_td><td align=center>"  
  if tt=1  then temp1=temp1&vbcrlf&"<table border=0 width='100%'>"
  job_bar_top=temp1
end function 

function job_bar_end(mvar,tt)
  dim temp1
  if tt=1 then temp1=temp1&vbcrlf&"  </table>" 
                      temp1=temp1&vbcrlf&"</td></tr>" 
  if mvar<>"" and var_null(mvar)<>"" then  temp1=temp1&vbcrlf&"<tr class=bg_td height="&m_hei&"><td align=right><a href='"&mvar&"'>浏览更多…</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td></tr>" &_
                                                                                                  vbcrlf&"</table>"
    job_bar_end=temp1&ukong
end function

function person_hot_type(b_c_num,b_id,b_username,b_topic,b_tim,b_counter,b_tim_type)
dim n_url,n_jt
  var n_url="person_view.asp?id="&b_id
  var n_jt=img_skin(web_img_h)
  person_hot_type=format_job_topic_type(n_jt,b_username,b_topic,b_c_num,n_url,b_tim,b_counter,"人才名称","点击次数",b_tim_type)
end function
function job_topic_type(b_c_num,b_id,b_username,b_topic,b_tim,b_counter,b_tim_type,b_type)
dim n_url,n_name,n_jt,temp1
  n_url="person_view.asp?id="&b_id
  n_name="求 职 人"
  n_jt=img_skin(web_img_h)
  if b_type=1 then 
  	n_url="job_view.asp?id="&b_id
  	n_name="招聘标题"
  else
   	n_url="job_company.asp?action=list&uid="&b_username
  	n_name="企业名称"
  end if
  job_topic_type=format_job_topic_type(n_jt,b_username,b_topic,b_c_num,n_url,b_tim,b_counter,n_name,"点击次数",b_tim_type) 
end function
function format_job_topic_type(b_jt,b_username,b_topic,b_c_num,b_url,b_tim,b_counter,b_tit,b_count,b_tim_type)
 dim tim_type, n_c_num,temp1
  n_c_num=b_c_num
  if (b_tim_type>0) then
          if b_tim_type=2 then tim_type=tim_type&vbcrlf&"</td><td align=right>"
          tim_type=tim_type&"&nbsp;<font class=tims>"&b_tim.substring(3,10)&"</font>"
    end if
    temp1=temp1&vbcrlf&"<tr><td>"&b_jt&"<a href='"&b_url&"' alt='"&b_tit&"："&joekoe_cms.code_html(b_topic,1,0)&"<br>发 布 人："&b_username&"<br>"&b_count&"："&b_counter&" 人次<br>整理时间："&b_tim&"'>"&joekoe_cms.code_html(b_topic,1,n_c_num)+"</a>"+tim_type&"</td></tr>"
end function
function company_more_type(b_job,b_jid,b_cname,b_username,b_zpnum,b_tim)
  dim temp1,username
  temp1=temp1&vbcrlf&"<tr align=center class=bg>" &_
 vbcrlf&"<td><a href='job_view.asp?id="&b_jid&"' alt='"&b_job&"'>"&joekoe_cms.code_html(b_job,1,0)&"</a></td>"&_
  vbcrlf&"<td><a href='company_view.asp?uid="&server.urlencode(rs("username"))&"' alt='"&b_cname&"'>"&joekoe_cms.code_html(b_cname,1,0)&"</a></td>"&_
  vbcrlf&"<td class=blue>"&b_zpnum&"</td>" &_
  vbcrlf&"<td>"&mid(b_tim,6,5)&"</td>" &_
  vbcrlf&"</tr>"
  company_more_type=temp1
end function

function person_more_type(b_iname,b_iid,b_sex,b_edu,b_job,b_tim)
 dim sexs,temp1
  sexs="女"
  if (b_sex="true" or b_sex="True")  then sexs="男"
  temp1=temp1&vbcrlf&"<tr align=center class=bg>" &_
  vbcrlf&"<td><a href='person_view.asp?id="&b_iid&"' alt='"&b_iname&"'>"&joekoe_cms.code_html(b_iname,1,0)&"</a></td>"&_
  vbcrlf&"<td>"&sexs&"</td>"&_
  vbcrlf&"<td>"&b_edu&"</td>"&_
  vbcrlf&"<td class=blue>"&joekoe_cms.code_html(b_job,1,0)&"</td>"&_
  vbcrlf&"<td>"&mid(b_tim,6,5)&"</td>"&_
  vbcrlf&"</tr>"
  person_more_type=temp1
end function


function job_list_pagecute(p_nummer,p_rssum,p_viewpage,p_thepages,p_pageurl,p_type)
  dim p_name,temp1
  p_name="求职"
  if p_type=1 then p_name="招聘"
  temp1=temp1&vbcrlf&"<table border=0 width='98%' cellspacing=0 cellpadding=2>"&_
  vbcrlf&"<tr>"&_
  vbcrlf&"<td height=25>"&_
  vbcrlf&"&nbsp;本栏共有 <font class=red>"&p_rssum&"</font> 篇"&p_name&"&nbsp;"&_
  vbcrlf&"页次：<font class=red>"&p_viewpage&"</font>/<font class=red>"&p_thepages&"</font>&nbsp;"&_
  vbcrlf&"&nbsp;分页："&jk_pagecute(p_nummer,p_thepages,p_viewpage,p_pageurl,5,"#ff0000") & _
  vbcrlf&"</td>"&_
  vbcrlf&"</table>"&ukong
  job_list_pagecute=temp1
end function

function company_search(stit)
dim keyvar,temp1
  keyvar="请输入关键字"
  temp1=temp1&vbcrlf&"<table border=0 align=center>"&_
  vbcrlf&"<form name=com_sea_frm action='job_company.asp' method=get onsubmit=""javascript:frm_submitonce(this);"">" & _
  vbcrlf&"<input type=hidden name=action value='search'>"&_
  vbcrlf&"<tr height=30>"&_
  vbcrlf&"<td>"&img_skin("new")&"</td>" & _
  vbcrlf&"<td wdith=15></td>"&_
  vbcrlf&"<td><select name=sea_type sizs=1><option value='cname'>招聘公司</option><option value='job'>招聘职位</option><option value='gzdd'>工作地点</option><option value='username'>发&nbsp;&nbsp;布&nbsp;&nbsp;人</option></select></td>"&_
  vbcrlf&"<td wdith=15></td>"&_
  vbcrlf&"<td><input type=text name=keyword value='"&keyvar&"' onfocus=""if (value =='请输入关键字'){value =''}"" onblur=""if (value ==''){value='请输入关键字'}"" size=20 maxlength=20 title='多个关键字请用 空格 格开'></td>" & _
  vbcrlf&"<td wdith=15></td>"&_
  vbcrlf&"  <td><input type=submit value='搜索'></td>"&_
  vbcrlf&"  </tr></form></table>"&_
  vbcrlf&"<script language=javascript>" & _
  vbcrlf&"function news_sea(stit)" & _
  vbcrlf&"{" & _
  vbcrlf&"  if (document.com_sea_frm.keyword.value==""请输入关键字"")" & _
  vbcrlf&"  {" & _
  vbcrlf&"    alert('请在搜索"&stit&"前先输入要查询的 关键字 ！');" & _
  vbcrlf&"    document.news_sea_frm.keyword.focus();" & _
  vbcrlf&"    return false;" & _
  vbcrlf&"  }" & _
  vbcrlf&"}" & _
  vbcrlf&"</script>"
  company_search=temp1
end function


function person_search(stit)
dim keyvar,temp1
  keyvar="请输入关键字"
  temp1=temp1&vbcrlf&"<table border=0 align=center>"&_
  vbcrlf&"<form name=per_sea_frm action='job_person.asp' method=get onsubmit=""javascript:frm_submitonce(this);"">" & _
  vbcrlf&"<input type=hidden name=action value='search'>"&_
  vbcrlf&"<tr height=30>"&_
  vbcrlf&"<td>"&img_skin("new")&"</td>" & _
  vbcrlf&"<td wdith=15></td>"&_
  vbcrlf&"<td><select name=sea_type sizs=1><option value='iname'>真实姓名</option><option value='job'>求职意向</option><option value='gzdd'>工作地点</option><option value='edu'>学&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;历</option><option value='zye'>所学专业</option><option value='username'>发&nbsp;&nbsp;布&nbsp;&nbsp;人</option></seelct></td>"&_
  vbcrlf&"<td wdith=15></td>"&_
  vbcrlf&"<td><input type=text name=keyword value='"&keyvar&"' onfocus=""if (value =='请输入关键字'){value =''}"" onblur=""if (value ==''){value='请输入关键字'}"" size=20 maxlength=20 title='多个关键字请用 空格 格开'></td>" & _
  vbcrlf&"<td wdith=15></td>"&_
  vbcrlf&"  <td><input type=submit value='搜索'></td>"&_
  vbcrlf&"  </tr></form></table>"&_
  vbcrlf&"<script language=javascript>" & _
  vbcrlf&"function news_sea(stit)" & _
  vbcrlf&"{" & _
  vbcrlf&"  if (document.com_sea_frm.keyword.value==""请输入关键字"")" & _
  vbcrlf&"  {" & _
  vbcrlf&"    alert('请在搜索"&stit&"前先输入要查询的 关键字 ！');" & _
  vbcrlf&"    document.news_sea_frm.keyword.focus();" & _
  vbcrlf&"    return false;" & _
  vbcrlf&"  }" & _
  vbcrlf&"}" & _
  vbcrlf&"</script>"
 person_search=temp1
end function
%>