<?php
/**
* FILE_NAME : job.php
*
* @copyright Copyright (c) 2009 - 2010 www.dali.edu.cn
* @author DaLi University 2009 Graduation Design
* @package 人才招聘
* @subpackage
* @version Fri Oct 30 10:22:04 GMT 2009
*/

require_once './include/common.inc.php';

/*--  对一些系统变量赋值  --*/
$template->assign("css_root",$css_root);
$template->assign("web_url",$web_url);
$template->assign("siteurl",$_CFG['siteurl']);
$template->assign("sitename",$_CFG['sitename']);

/*--  查询招聘数据  --*/
$sql = $query = '';
$joblist = $cate = array();

$sql = "SELECT * FROM {$dbprefix}job";
$query = $DB->query($sql);
while ($row = $DB->fetch_array($query)) {
	$row['postdate'] = formatdate($_CFG['format_type'],$row['postdate']);
	/*--  招聘状态  --*/
	$row['jobstate'] = $row['jobstate'] ? "招聘中" : "已结束";
	$joblist[] = $row;
}

/*--  判断是否登录  --*/
$is_login = $_COOKIE['username'] ? 1 : 0;

require_once 'header.php';

$template->assign("web_url",$web_url);
$template->assign("joblist",$joblist);
$template->assign("is_login",$is_login);
$template->display("job.html");

require_once 'footer.php';
?>