<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
	<!-- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	| 房佳（专业的新房分销ERP管理系统）
	+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	| Copyright (c) 2008-2019 http://fj.ytsofts.cn/ All rights reserved.
	+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	| 本系统由淮南市银泰软件科技有限公司提供技术支持
	+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	| QQ号：984784483
	+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
		<meta name="renderer" content="webkit|ie-comp|ie-stand">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
		<meta http-equiv="Cache-Control" content="no-siteapp"/>
		<link rel="Bookmark" href="/Public/favicon.ico">
		<link rel="Shortcut Icon" href="/Public/favicon.ico"/>
		<link rel="stylesheet" type="text/css" href="/Public/static/h-ui/css/H-ui.min.css" />
		<link rel="stylesheet" type="text/css" href="/Public/static/h-ui.admin/css/H-ui.admin.css"/>
		<link rel="stylesheet" type="text/css" href="/Public/lib/Hui-iconfont/1.0.8/iconfont.css"/>
		<link rel="stylesheet" type="text/css" href="/Public/static/h-ui.admin/css/style.css"/>
		
	<link rel="stylesheet" href="/Public/lib/layui/css/layui.css" media="all">
	<link href="/Public/lib/lightbox2/2.8.1/css/lightbox.css" rel="stylesheet" type="text/css">
	<link rel="stylesheet" type="text/css" href="/Public/lib/webuploader/0.1.5/webuploader.css"/>
	<style type="text/css">
		.tupianleixing{
			position: absolute;
			left: 0;
			bottom: 0;
			height: 30px;
			width: 70px;
			z-index: 200;
			line-height: 30px;
			font-family: 微软雅黑;
			font-weight: bold;
			font-size: 14px;
			text-align: center;
			color: red;
			background: url(/Public/images/leixing.png) no-repeat left top;
			opacity:0.70;
			filter:alpha(opacity=70);
		}
	</style>

	</head>
	<body>
		
	<div style="position:fixed;top:0;width: 100%; border-top-style: solid;border-top-width: 2px;border-top-color: #009688;z-index: 999;"></div>
	<div style="margin: 20px 5%;">
		<div style="width: 100%;height: 30px;">
			<div style="float: right;">
				<?php if(_rbac_node_show(842)): ?><input id="check-all" class="check-all" type="checkbox"/>全选
					<a class="layui-btn layui-btn-danger layui-btn-small" href="javascript:void(0);" onclick="hftp_pic_downloads()" style="text-decoration:none;background: palevioletred;">
						<i class="Hui-iconfont">&#xe641;</i> 打包下载
					</a><?php endif; ?>
			</div>
		</div>
		<div style="width: 100%;padding: 10px;">
			<?php if(is_array($photo)): $i = 0; $__LIST__ = $photo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$tp): $mod = ($i % 2 );++$i;?><div style="width: 45%;margin-left: 1%;display: inline-block;margin-top: 10px;border: 1px silver solid;padding: 5px;" class="thumbnail">
					<div style="position: relative;overflow: hidden;width: 100%;height: 0;padding-bottom: 54.545454%;">
						<a href="<?php echo ($tp['img_path']); ?>" data-lightbox="gallery" data-title="">
							<img style="position: absolute;width: 100%;height: 100%;" src="<?php echo ($tp['img_path']); ?>"/>
						</a>
						<span class="tupianleixing">
							<?php echo ($tp['data_type']); ?>
						</span>
					</div>
					<div style="width: 100%;height: 30px;line-height: 30px;margin-top: 5px;">
						<?php if(_rbac_node_show(842)): ?><div style="float: left;">
								<input type="checkbox" class="hfids" name="hfid[]" value="<?php echo ($tp['id']); ?>"/>
							</div><?php endif; ?>
						<div style="float: right;">
							<a download="<?php echo ($tp['img_path']); ?>" href="<?php echo ($tp['img_path']); ?>" class="layui-btn layui-btn-danger layui-btn-mini" role="button" style="text-decoration:none;background: palevioletred;">
								<i class="Hui-iconfont">&#xe641;</i> 下载
							</a>
						</div>
					</div>
					<h5 style="width: 100%;height: 30px;line-height: 30px;margin-top: 5px;">
						上传人：<?php echo ($tp['ygmingcheng']); ?>
						<small style="float: right;">
							<span style="padding: 10px;">
								<?php echo date('Y-m-d',$tp['addtime']);?>
							</span>
						</small>
					</h5>
				</div><?php endforeach; endif; else: echo "" ;endif; ?>
		</div>
	</div>
	<div style="line-height:50px;">&nbsp;</div>
	<div class="layui-form-item" style="width:100%;height:45px;margin:0 auto;background:#fff;position:fixed;bottom:0;text-align:center;border-top-style: solid;border-top-width: 1px;border-top-color: #009688;padding-top: 5px;" id="submit">
		<div class="layui-input-block" style="margin-left: 15px;">
			<button type="button" class="layui-btn layui-btn-radius layui-btn-primary" onClick="parent.layer.close(parent.layer.getFrameIndex(window.name));">
				<i class="Hui-iconfont">&#xe706;</i> 关闭
			</button>
		</div>
	</div>

		<script type="text/javascript" src="/Public/lib/jquery/1.9.1/jquery.min.js"></script> 
		<script type="text/javascript" src="/Public/lib/layer/2.4/layer.js"></script>
		<script type="text/javascript" src="/Public/static/h-ui/js/H-ui.min.js"></script>
		<script type="text/javascript" src="/Public/static/h-ui.admin/js/H-ui.admin.js"></script>
		<script>
			$(document).ready(function(){
				$(document).bind("contextmenu",function(e){
					return false;
				});
			});
		</script>
		
	<script src="/Public/lib/layui1/layui.js" charset="utf-8"></script>
	<script type="text/javascript" src="/Public/lib/lightbox2/2.8.1/js/lightbox.min.js"></script>
	<script>
		/*图片上传*/
		//全选的实现
		$(".check-all").click(function(){
			$(".hfids").prop("checked", this.checked);
		});
		/*回访图片-批量下载*/
		function hftp_pic_downloads(){
			//图片未选择时判断
			$ids = $("input:checkbox[class=hfids]:checked");
			if ($ids.length<=0) {layer.msg("未选择图片",{icon:5,time:1000});return;};
			//异步下载图片
			layer.confirm('确认要下载吗？',function(index){
				var hftp_pic_ids = new Array();
				$ids.each(function(){
					hftp_pic_ids.push($(this).val());
				});
				$.ajax({
					type: 'POST',
					url: '<?php echo U('Kyneirong/hftp_pic_downloads');?>',
					data: {'hftp_pic_ids' : hftp_pic_ids},
					dataType: 'json',
					success: function(data){
						if(data.status){
							window.location.replace(window.location.protocol+'//'+data.info);
						}else{
							layer.msg(data.info,{icon:5,time:1000});
						}
					},
					error:function(data) {
						console.log(data.msg);
					},
				});
			});
		}
		$(function(){
			$("#downloadallpic").click(function() {
				var downloadUrl = new Array();
				$('.downpic').each(function(){
					downloadUrl.push($(this).attr('href'));
				});
				$(downloadUrl).multiDownload({"source":"local"});
			});
		});
		function DownLoadReportIMG(obj){
			var downloadUrl = new Array();
			downloadUrl.push($(obj).attr('d'));
			$(downloadUrl).multiDownload({"source":"local"});
		}
	</script>

	</body>
</html>