<?php
	include_once("admin/include/config.php");
	define("THIS_PAGE","job");
	if(!$hm_arr = get_seo(1)){
		$hm_title = $hm_key = $hm_des = hmcss_default_config(1);
	}
	else{
		$hm_title = $hm_arr[0][2];
		$hm_key = $hm_arr[0][3];
		$hm_des = $hm_arr[0][4];
	}
	$page = trim($_GET["page"]);
	$page = $page ? $page : 1;
	$max_per_page = 20;
	$filter_arr = "";
	if(!$hm_arr = get_job($filter_arr))
		show_err("系统中暂无招聘信息");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $hm_title; ?></title>
<meta name="description" content="<?php echo $hm_des; ?>" />
<meta name="keywords" content="<?php echo $hm_key; ?>" />
<link rel="stylesheet" type="text/css" href="style.css" />
<style type="text/css">
#out{width:1000px; overflow:hidden; min-height:600px; height:auto; background-image:url(pics/bg/left_bg.gif); background-repeat:repeat-y;}
#right{width:800px; height:auto!important; height:auto; float:left; text-indent:2em; padding:10px 0px; line-height:20px;}
.hrm_job{margin:10px auto; width:780px; border-top:1px #CCC solid; border-left:1px #CCC solid; overflow:hidden;}
	.hrm_job ul{list-style:none; margin:0px; padding:0px;}
	.hrm_job li{list-style:none; float:left; text-indent:1em; color:#666; border-bottom:1px #CCC solid; border-right:1px #CCC solid; height:30px; line-height:30px; overflow:hidden;}
	.hrm_job li a{color:#666; text-decoration:none;}
	.hrm_job li a:hover{color:#F30; text-decoration:underline;}
</style>
</head>

<body>
<?php require_once("top.php"); ?>
<div class="now_position"><span class="position_str">当前位置：<a href="index.php">首页</a>-><a href="hrm_job_list.php">工作机会</a>->职位列表</span><span class="im_notice">
<marquee direction="left" scrolldelay="100" onmouseout="this.start()" onmouseover="this.stop()" style="width:400px;">
<?php hmcss_notice(); ?>
</marquee></span></div>
<div id="out">
<div id="left">
	<div class="left_menu">
    	<span class="left_arr_over"></span><span class="left_menu_con"><a href="hrm_job.php">企业招聘</a></span>
    </div>
    <div class="left_menu">
    	<span class="left_arr_normal"></span><span class="left_menu_con"><a href="hrm_get.php">福利待遇</a></span>
    </div>
</div>
<div id="right">
	<div class="hrm_job">
    	<ul>
        <?php
			//计算总页数
			$all_page = ceil(count($hm_arr)/$max_per_page);
			if($page > $all_page)
				$page = $all_page;
			$start = $page ? (($page - 1) * $max_per_page) : 0;
			$filter_arr[] = array("1","$start,$max_per_page",false);
			$hm_arr = get_job($filter_arr);
			foreach($hm_arr as $key => $val){
				echo "<li style=\"width:100px;\">岗位名称：</li>\n";
				echo "<li style=\"width:170px; font-weight:bold;\"><a href=\"hrm_job.php?job_id=$val[0]\">$val[1]</a></li>\n";
				echo "<li style=\"width:100px;\">工作地点：</li>\n";
				echo "<li style=\"width:203px;\">$val[2]</li>\n";
				echo "<li style=\"width:100px;\">发布日期：</li>\n";
				$time_arr = explode(" ",$val[9]);
				$day_str = is_array($time_arr) ? $time_arr[0] : "";
				echo "<li style=\"width:100px; font-size:12px;\">$day_str</li>";
				unset($time_arr,$day_str);
			}
			
	  ?>
        </ul>
    </div>
    <div id="page" style="width:778px;">
<?php
	for($i = 1;$i <= $all_page;$i++)
		echo $i - $page == 0 ? "<a class=\"now_page\">$i</a>" : "<a class=\"page_span\" href=\"hrm_job_list.php?page=$i\">$i</a>";
?>
</div>
</div>
</div>
<div id="foot"><?php unset($hm_arr,$filter,$hm_arr_news,$config_arr); hmcss_foot(); ?></div>
</body>
</html>