<!DOCTYPE html>
<html>
	<head>
		<meta charset="<?php echo $cfg_soft_lang; ?>">
		<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
		<title>文档管理-会员中心-<?php echo $cfg_webname; ?></title>
		<script src="<?php echo $cfg_cmsurl; ?>/static/web/js/jquery.min.js"></script>
		<link rel="stylesheet" href="<?php echo $cfg_cmsurl; ?>/static/web/css/bootstrap.min.css">
		<link rel="stylesheet" href="<?php echo $cfg_cmsurl; ?>/static/web/font/css/font-awesome.min.css">
		<link rel="stylesheet" href="<?php echo $cfg_cmsurl; ?>/static/web/css/style.css">
		<link rel="stylesheet" href="<?php echo $cfg_cmsurl; ?>/static/web/css/member.css">
		<script>
			function viewArc(aid) {
				window.open("{dede:global.cfg_phpurl /}/view.php?aid=" + aid);
			}
			function editArc(aid, channelid) {
				location = "archives_do.php?dopost=edit&channelid=" + channelid + "&aid=" + aid;
			}
			function delArc(aid) {
				if (window.confirm('您确定要删除这篇文档吗')) location = "archives_do.php?aid=" + aid + "&dopost=delArc";
			}
		</script>
	</head>
	<body>
		<?php include(DEDEMEMBER."/templets/top_login.htm"); ?>
		<main class="member">
			<div class="pannel">
				<div class="container">
					<div class="row">
						<?php
						$_menu_conex = true;
						?>
						<?php include(DEDEMEMBER."/templets/menu.htm"); ?>
						<div class="pannel-main col-md-9 mt-3 mb-3">
							<div class="pannel-main-container">
								<nav class="navbar navbar-expand-lg pr-0 pl-0">
									<ul class="navbar-nav mr-auto mt-2">
										<li class="nav-item">
											<a class="nav-link<?php echo ($arcrank=='')? ' active' : '';?>" href="content_list.php?channelid=<?php echo $channelid;?>">全部</a>
										</li>
										<li class="nav-item">
											<a class="nav-link<?php echo ($arcrank=='1')? ' active' : '';?>" href="content_list.php?channelid=<?php echo $channelid;?>&arcrank=1">已审核</a>
										</li>
										<li class="nav-item">
											<a class="nav-link<?php echo ($arcrank=='-1')? ' active' : '';?>" href="content_list.php?channelid=<?php echo $channelid;?>&arcrank=-1">未审核</a>
										</li>
										<li class="nav-item">
											<a class="nav-link<?php echo ($arcrank=='-2')? ' active' : '';?>" href="content_list.php?channelid=<?php echo $channelid;?>&arcrank=-2">审核失败</a>
										</li>
									</ul>
									<span class="navbar-text">
										<a class="btn btn-success btn-sm" href="archives_do.php?dopost=addArc&channelid=<?php echo $channelid;?>">发布</a>
									</span>
								</nav>
								<div class="table-responsive">
									<table width="100%" cellpadding="0" cellspacing="0" class="table">
										<thead>
											<tr>
												<th width="30%">文章标题</th>
												<th width="12%">类目</th>
												<th width="10%">状态</th>
												<th width="10%">点击</th>
												<th width="12%">时间</th>
												<th align="center">操作</th>
											</tr>
										</thead>
										<tbody>
											{dede:datalist}
											<tr>
												<td class="tabTitle"><a href="<?php echo $cfg_phpurl; ?>/view.php?aid=<?php echo $fields['id']; ?>" target="_blank"><?php echo $fields['title']; ?><?php echo IsPicArchives($fields['litpic']); ?></a></td>
												<td><?php echo $fields['typename']; ?></td>
												<td>
													<?php
													if($fields['arcrank']>=0) echo "已审核";
													else if($fields['arcrank']==-2) echo "<span style='color:#007bff'>审核失败</span>";
													else echo "<span class='text-danger'>未审核</span>";
													?>
												</td>
												<td><?php echo $fields['click']; ?></td>
												<td><?php echo GetDateMk($fields['senddate']); ?></td>
												<td align="center" class="doPost">
													<?php
													if($fields['arcrank']<0 || $dtime - $fields['senddate'] < $maxtime)
													{
													?>
													<a href="javascript:editArc(<?php echo $fields['id']?>,<?php echo $fields['channel']?>);" class="btn btn-success btn-sm">修改</a>
													<a href="javascript:delArc(<?php echo $fields['id']?>);" class="btn btn-success btn-sm">删除</a>
													<?php
													} else {
														echo "<span class='btn btn-sm'>无操作</span>";
													}
													?>
													<a href="javascript:viewArc(<?php echo $fields['id']; ?>);" class="btn btn-success btn-sm">预览</a>
												</td>
											</tr>
											{/dede:datalist}
										</tbody>
									</table>
								</div>
								<nav>{dede:pagelist listsize='6'/}</nav>
							</div>
						</div>
					</div>
				</div>
			</div>
		</main>
		<?php include(DEDEMEMBER."/templets/footer.htm"); ?>
	</body>
</html>