<?php
/**
 * 芋头CMS
 * ============================================================================
 * 版权所有 2016-2028 沅陵县乌托邦网络服务有限公司，并保留所有权利。
 * 网站地址: http://www.yutoucms.cn
 * ----------------------------------------------------------------------------
 * 如果商业用途务必到官方购买正版授权, 以免引起不必要的法律纠纷。
 * ============================================================================
 * Author: 芋头 <mxgsf@qq.com>
 * Date: 2026-6-1
 */
$recruits = $db->fetchAll("SELECT * FROM {$db->table('recruit')} WHERE status = 1 ORDER BY create_time DESC LIMIT 20");
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>人才招聘 - <?php echo htmlspecialchars($site['site_name']); ?></title>
<link rel="stylesheet" href="<?php echo $site['template_dir']; ?>css/style.css">
</head>
<body>
<?php include __DIR__ . '/_header.php'; ?>

<div class="channel-banner channel-banner-recruit">
<div class="container">
<h1>人才招聘</h1>
<p>加入我们，共创未来</p>
</div>
</div>

<div class="recruit-page">
<div class="container">
<div class="recruit-list">
<?php foreach($recruits as $r): ?>
<div class="recruit-item">
<h3><?php echo htmlspecialchars($r['title']); ?></h3>
<div class="recruit-meta">
<?php if(!empty($r['department'])): ?><span>部门：<?php echo htmlspecialchars($r['department']); ?></span><?php endif; ?>
<?php if(!empty($r['region'])): ?><span>工作地点：<?php echo htmlspecialchars($r['region']); ?></span><?php endif; ?>
<?php if(!empty($r['salary'])): ?><span>薪资：<?php echo htmlspecialchars($r['salary']); ?></span><?php endif; ?>
<?php if(!empty($r['work_type'])): ?><span>工作类型：<?php echo htmlspecialchars($r['work_type']); ?></span><?php endif; ?>
</div>
<div><?php echo nl2br(htmlspecialchars($r['content'] ?? '')); ?></div>
</div>
<?php endforeach; ?>
<?php if(empty($recruits)): ?>
<p style="text-align:center;color:#999;padding:60px 0;">暂无招聘职位</p>
<?php endif; ?>
</div>
</div>
</div>

<?php include __DIR__ . '/_footer.php'; ?>
</body>
</html>