<?php
/**require_once (dirname(__FILE__) . "/../../../include/common.inc.php");

 *推送到根目录下后更改至下面的: 
 *///

$comurl = $_SERVER['HTTP_REFERER'];

//判断是否本站请求
if(strpos($comurl,'www.hoing.net')<0 || strpos($comurl,'www.hoing.net')=='')
{
	echo "<script>window.location.href='http://www.hoing.net'</script>";
	exit();
}



require_once (dirname(__FILE__) . "/../cms/include/common.inc.php");

require_once (DEDEROOT . "/include/datalistcp.class.php");

$type=(isset ($_GET['type']) && is_numeric($_GET['type'])) ? $_GET['type'] : 0;
$key = $_GET['key'];
$province = $_GET['province'];
$city = $_GET['city'];
$keyword = $_GET['keyword'];
if(strlen($keyword)>10)
{
	exit;
}
$wheresql = "";
if(!empty($keyword)){
	$wheresql.=" and zhiwei like '%".$keyword."%'";
}
if(!empty($key)){
	$wheresql.=" and zhiwei like '%".$key."%'";
}
if(!empty($type)){
	$wheresql.=" and type like '%".$type."%'";
}
if(!empty($province)){
	$wheresql.=" and place like '%".$province."%'";
}

$sql = "SELECT `id`,`zhiwei`,`num`,`shuoshubumen`,`place`,`fabudate` FROM `dede_zhaopin` where `xianshi`='1' $wheresql order by `fabudate` desc";
$dlist = new DataListCP();
$dlist->pageSize = 8;
$dlist->SetTemplet(dirname(__FILE__) . "/templets/index.htm");
$dlist->SetParameter('key', $key);
$dlist->SetParameter('province', $province);
$dlist->SetParameter('city', $city);
$dlist->SetSource($sql);
$dlist->display();
?>

