<?php if (!defined('APP_PATH')) exit;?><!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></title>
<link href="http://127.0.0.5/magic/Data/Public/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://127.0.0.5/magic/Data/Public/js/jquery.js"></script>
<script src="http://127.0.0.5/magic/Data/Public/js/main.js"></script>
</head>
<body>
<iframe name="blank" id="blank" style="display:none"></iframe>
<div class="rightinfo">
    <div class="tools">
		<ul class="toolbar">
			<li><a href="?r=archives-index-edit&param=<?php echo Q('get.param');?>"><span><img src="http://127.0.0.5/magic/Data/Public/images/t01.png" /></span>添加</a></li>
			<li onclick="submit('form1','del')"><span><img src="http://127.0.0.5/magic/Data/Public/images/t03.png" /></span>删除</li>
			<li onclick="submit('form1','sh')"><span><img src="http://127.0.0.5/magic/Data/Public/images/t06.png" /></span>审核</li>
			<li onclick="submit('form1','ws')"><span><img src="http://127.0.0.5/magic/Data/Public/images/t04.png" /></span>未审</li>
		</ul>
		<form method="get" name="form2" action="?">
		<input type="hidden" name="r" value="archives-index-arclist">
		<input type="hidden" name="param" value="<?php echo Q('get.param');?>">
		<ul class="toolbar1">
			<li>
			<select class="selectbox" name="catid" onChange='javascript:window.open("?r=archives-index-arclist&param=<?php echo Q('get.param');?>&flag=<?php echo Q('get.flag');?>&catid="+this.options[this.selectedIndex].value,"_self")'>
				<option value=""  selected >所有栏目</option>
				<?php foreach ($channeltree as $vo){?>
				<option value="<?php echo $vo['catid'];?>" <?php if($vo['catid']==Q('get.catid')){ ?>selected<?php }?> <?php if($vo['model']!=Q('get.param') && empty($_GET['act'])){ ?>disabled<?php }?>><?php echo $vo['_name'];?></option>
				<?php }?>
			</select>&nbsp;&nbsp;
			<select class="selectbox" name="catid" onChange='javascript:window.open("?r=archives-index-arclist&model=<?php echo Q('get.model');?>&catid=<?php echo Q('get.catid');?>&flag="+this.options[this.selectedIndex].value,"_self")'>
				<option value=""  selected >全部</option>
				<?php foreach ($flag as $vo){?>
				<option value="<?php echo $vo['flag'];?>" <?php if($vo['flag']==Q('get.flag')){ ?>selected<?php }?>><?php echo $vo['title'];?></option>
				<?php }?>
			</select>&nbsp;&nbsp;
			<label>关键字：</label><input name="keywords" type="text" class="scinput" />&nbsp;&nbsp;&nbsp;<input type="submit" class="scbtn1" style="width:60px;height:28px" value="搜索"/></li>
        </ul>
		</form>
    </div>  
   <div class="formtitle1"><span>产品列表</span></div>
    <form method="post" id="form1" target="blank" action="?r=archives-index-batch&param=<?php echo Q('get.param');?>&act=">   
    <table class="imgtable">
    	<thead>
    	<tr>
        <th width="40"><input type="checkbox" onclick="checkall(this,'id')"/></th>
        <th width="80">序号<i class="sort"><img src="http://127.0.0.5/magic/Data/Public/images/px.gif" /></i></th>
		<th width="120">缩略图</th>
        <th>产品标题</th>
		<th width="150">推荐位</th>
        <th width="120">所属栏目</th>
        <th width="90">状态</th>
        <th width="140">操作</th>
        </tr>
        </thead>
        <tbody>
		<?php if (empty($list)){ ?>
			<tr><td colspan="8" align="center" height="35" style="color:#f00">暂无记录!</td></tr>
		<?php }else{ ?>
		<?php foreach ($list as $k=>$vo){?>
		<tr>
			<td style="text-indent:0;text-align:center "><input name="id[]" type="checkbox" value="<?php echo $vo['id'];?>"/></td>
			<td style="text-indent:0;text-align:center "><?php echo $vo['id'];?></td>
			<td class="imgtd"><img onerror="this.src='http://127.0.0.5/magic/Data/Public/images/nopic.jpg'" src="<?php if (empty($vo['image'])){ ?>nopic<?php }else{ ?><?php echo $vo['image'];?><?php }?>" onload="if(this.width>90){this.width=90;};if(this.height>60){this.height=60;}"></td>
			<td><a href="?r=archives-index-edit&param=<?php echo $vo['value'];?>&catid=<?php echo $vo['catid'];?>&id=<?php echo $vo['id'];?>"><?php echo $vo['title'];?></a><p>发布时间：<?php echo date('Y-m-d H:i:s',$vo['pubtime']);?></p></td>
			<td style="text-indent:0;text-align:center ">
			<?php if($vo['image']!==''){ ?><img src="http://127.0.0.5/magic/Data/Public/images/ico-03.png" style="margin:0"><?php }?>
			<?php foreach ($flag as $fv){?>
				<?php if(stristr($vo['flag'],$fv['flag'])){ ?><font color="#f00"> [<?php echo $fv['title'];?>]</font><?php }?>
			<?php }?>
			<?php if(!empty($vo['linkurl'])){ ?><font color="#f00">[跳转]</font><?php }?>
			</td>
			<td ><?php echo $vo['name'];?><p>ID: <?php echo $vo['catid'];?></p></td>
			<td style="text-indent:0;text-align:center ">
			<a href="javascript:void(0)"><img src="http://127.0.0.5/magic/Data/Public/images/ico-0<?php echo $vo['status'];?>.png" width="15" height="15"></a>
			</td>
			<td style="text-indent:0;text-align:center ">
				<a href="../?r=list-content&id=<?php echo $vo['id'];?>" target="_blank">浏览</a> |
				<a href="?r=archives-index-edit&param=<?php echo $vo['value'];?>&catid=<?php echo $vo['catid'];?>&id=<?php echo $vo['id'];?>">编辑</a> |
				<a  href="javascript:"  onclick="confirms('文档删除后将无法恢复，请谨慎操作，确认删除？','?r=archives-index-del&param=<?php echo $vo['value'];?>&id=<?php echo $vo['id'];?>')">删除</a></td>
		</tr> 
		<?php }?>
		<?php }?>
        </tbody>
    </table>
    </form>
   
    <div class="pagin">
    	<div class="page"><?php echo $page;?></div>
    </div>
    </div>
<script type="text/javascript">$('.tablelist tbody tr:odd').addClass('odd');</script>
</body>
</html>
