<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
	<head>
		<title></title>
		<meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />

		<link rel="stylesheet" type="text/css" href="<?php echo (THEME_PATH_ABS); ?>/css/bootstrap.min.css" />
		<link rel="stylesheet" type="text/css" href="<?php echo (THEME_PATH_ABS); ?>/css/bootstrap-responsive.min.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo (THEME_PATH_ABS); ?>/css/colorpicker.css" />
        <link rel="stylesheet" type="text/css" href="<?php echo (THEME_PATH_ABS); ?>/css/datepicker.css" />
		<link rel="stylesheet" type="text/css" href="<?php echo (THEME_PATH_ABS); ?>/css/uniform.css" />
		<link rel="stylesheet" type="text/css" href="<?php echo (THEME_PATH_ABS); ?>/css/select2.css" />		
		<link rel="stylesheet" type="text/css" href="<?php echo (THEME_PATH_ABS); ?>/css/unicorn.main.css" />
		<link rel="stylesheet" type="text/css" href="<?php echo (THEME_PATH_ABS); ?>/css/unicorn.grey.css" />
		<link rel="stylesheet" type="text/css" href="<?php echo (THEME_PATH_ABS); ?>/css/select2.css" />
		<link rel="stylesheet" type="text/css" href="/wublog/Public/imagesel/css/style.css" />

		<script type="text/javascript" src="<?php echo (THEME_PATH_ABS); ?>/js/jquery.min.js"></script>	
		<script type="text/javascript" src="<?php echo (THEME_PATH_ABS); ?>/js/jquery.ui.custom.js"></script>
		<script type="text/javascript" src="<?php echo (THEME_PATH_ABS); ?>/js/bootstrap.min.js"></script>
		<script type="text/javascript" src="<?php echo (THEME_PATH_ABS); ?>/js/bootstrap-colorpicker.js"></script>
		<script type="text/javascript" src="<?php echo (THEME_PATH_ABS); ?>/js/bootstrap-datepicker.js"></script>
		<script type="text/javascript" src="<?php echo (THEME_PATH_ABS); ?>/js/jquery.uniform.js"></script>
		<script type="text/javascript" src="<?php echo (THEME_PATH_ABS); ?>/js/select2.min.js"></script>
		<script type="text/javascript" src="<?php echo (THEME_PATH_ABS); ?>/js/unicorn.js"></script>
		<script type="text/javascript" src="<?php echo (THEME_PATH_ABS); ?>/js/unicorn.form_common.js"></script>
		<link rel="stylesheet" href="/wublog/Public/jquery-foxibox-0.2/style/jquery-foxibox-0.2.css" type="text/css" media="screen" />
		<script src="/wublog/Public/jquery-foxibox-0.2/script/jquery-foxibox-0.2.js" type="text/javascript"></script>


	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
	<body>
		
		
		<div id="header">

			<h1><a href="./dashboard.html">Unicorn Admin</a></h1>	
		</div>
		<!--
		<div id="search">
			<input type="text" placeholder="Search here..." /><button type="submit" class="tip-right" title="Search"><i class="icon-search icon-white"></i></button>
		</div>-->
		<div id="user-nav" class="navbar navbar-inverse">
            <ul class="nav btn-group">

                <!--<li class="btn btn-inverse"><a title="" href="#"><i class="icon icon-user"></i> <span class="text">Profile</span></a></li>
                <!--
                <li class="btn btn-inverse dropdown" id="menu-messages"><a href="#" data-toggle="dropdown" data-target="#menu-messages" class="dropdown-toggle"><i class="icon icon-envelope"></i> <span class="text">Messages</span> <span class="label label-important">5</span> <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                        <li><a class="sAdd" title="" href="#">new message</a></li>
                        <li><a class="sInbox" title="" href="#">inbox</a></li>
                        <li><a class="sOutbox" title="" href="#">outbox</a></li>
                        <li><a class="sTrash" title="" href="#">trash</a></li>
                    </ul>-->
                </li>
                <li class="btn btn-inverse"><a title="" href="/wublog/index.php/index.php/Admin/Index/profile"><i class="icon icon-cog"></i> <span class="text"><?php echo ($_SESSION['username']); ?>设置</span></a></li>

                <li class="btn btn-inverse"><a title="" href="/wublog/index.php/Admin/Login/do_logout/"><i class="icon icon-share-alt"></i> <span class="text">注销</span></a></li>
            </ul>
        </div>
		<div id="sidebar">
			<a href="#" class="visible-phone"> <i class="icon icon-home"></i>
				Dashboard
			</a>
			<ul>
				<?php if(($data["PageFun"]) == "index"): ?><li class="active">
						<?php else: ?>		
						<li><?php endif; ?>
						<a href="/wublog/index.php/Admin/Index"> <i class="icon icon-home"></i>
							<span>首页</span>
						</a>
					</li>
					<?php if(in_array(($data["PageFun"]), explode(',',"archive,items,archivelists,archivelists"))): ?><li class="submenu open active">
							<?php else: ?>		
							<li class="submenu"><?php endif; ?>
							<a href="#">
								<i class="icon icon-th-list"></i>
								<span>内容管理</span>
								<span class="label"></span>
							</a>
							<ul>
								<?php if(($data["PageFun"]) == "items"): ?><li class="active">
										<?php else: ?>		
										<li><?php endif; ?>
										<a href="/wublog/index.php/Admin/Index/items">我的栏目</a>
									</li>
									<?php if(($data["PageFun"]) == "archivelists"): ?><li class="active">
											<?php else: ?>		
											<li><?php endif; ?>
											<a href="/wublog/index.php/Admin/Index/archivelists">所有文章</a>
										</li>
										<?php if(($data["PageFun"]) == "archive"): ?><li class="active">
												<?php else: ?>		
												<li><?php endif; ?>
												<a href="/wublog/index.php/Admin/Index/archive">内容发布</a>
											</li>

										</ul>
									</li>
									<?php if(($data["PageFun"]) == "mycomment"): ?><li class="active">
											<?php else: ?>		
											<li><?php endif; ?>
											<a href="/wublog/index.php/Admin/Index/mycomment">
												<i class="icon icon-pencil"></i>
												我的评论
											</a>
										</li>

										<?php if(in_array(($data["PageFun"]), explode(',',"myfiles,myimages"))): ?><li class="submenu open active">
												<?php else: ?>		
												<li class="submenu"><?php endif; ?>
												<a href="#">
													<i class="icon icon-th-list"></i>
													<span>上传管理</span>
													<span class="label"></span>
												</a>
												<ul>
													<?php if(($data["PageFun"]) == "myfiles"): ?><li class="active">
															<?php else: ?>		
															<li><?php endif; ?>
															<a href="/wublog/index.php/Admin/Index/myfiles/filter/all">我的文档</a>
														</li>
														<?php if(($data["PageFun"]) == "myimages"): ?><li class="active">
																<?php else: ?>		
																<li><?php endif; ?>
																<a href="/wublog/index.php/Admin/Index/myimages/filter/all">我的图片</a>
															</li>
														</ul>
													</li>

													<?php if(in_array(($data["PageFun"]), explode(',',"profile,link"))): ?><li class="submenu open active">
															<?php else: ?>		
															<li class="submenu"><?php endif; ?>
															<a href="#">
																<i class="icon icon-th-list"></i>
																<span>设置</span>
																<span class="label"></span>
															</a>
															<ul>
																<?php if(($data["PageFun"]) == "profile"): ?><li class="active">
																		<?php else: ?>		
																		<li><?php endif; ?>
																		<a href="/wublog/index.php/Admin/Index/profile">
																			<i class="icon icon-pencil"></i>
																			<span>常规选项</span>
																		</a>
																	</li>
																	<?php if(($data["PageFun"]) == "link"): ?><li class="active">
																			<?php else: ?>		
																			<li><?php endif; ?>
																			<a href="/wublog/index.php/Admin/Index/mylink">
																				<i class="icon icon-pencil"></i>
																				<span>友情链接</span>
																			</a>
																		</li>
																	</ul>

																</ul>

															</div>

															<div id="content">
																<div id="content-header">
																	<h1><?php echo ($data["PageName"]); ?></h1>
																</div>

																<div id="breadcrumb">
																	<a href="#" title="Go to Home" class="tip-bottom">
																		<i class="icon-home"></i>
																		Home
																	</a>
																	<a href="#" class="current"><?php echo ($data["PageName"]); ?></a>
																</div>
																<div id="style-switcher">
																	<i class="icon-arrow-left icon-white"></i>
																	<span>Style:</span>
																	<a href="#grey" style="background-color: #555555;border-color: #aaaaaa;"></a>
																	<a href="#blue" style="background-color: #2D2F57;"></a>
																	<a href="#red" style="background-color: #673232;"></a>
																</div>
<div class="container-fluid">
<div class="row-fluid">
					<div class="span12">
					<div id='alert'></div>
						<div class="widget-box">
							<div class="widget-title">
								<span class="icon">
									<i class="icon-picture"></i>
								</span>
								<h5>上传图片列表 </h5>

								<div class="buttons">
									<a title="Icon Title" class="btn btn-mini" href="/wublog/index.php/Admin/Index/myimages/filter/no"><i class="icon-filter"></i> 筛选未被引用文件</a>									
								</div>
								<div class="buttons">
								<span style="float:right"><i>图片总数：<i id="imgcount"><?php echo ($data["DirInfo"]["imagecount"]); ?></i>,占用空间：<?php echo ($data["DirInfo"]["size"]); ?></i></span>
								</div>
							</div>
							<div class="widget-content">
								<ul class="thumbnails">
								<?php if(is_array($data["Images"])): $k = 0; $__LIST__ = $data["Images"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><li id='li-<?php echo ($k); ?>' class="span2">
										<a href="#" class="thumbnail picker">
											<img  style="height:140px" src="/wublog<?php echo ($vo["thufileroot"]); ?>" alt="" />
										</a>
										<div class="actions">
											<a href="/wublog<?php echo ($vo["fileroot"]); ?>" rel="foxibox" title="<?php echo ($vo["info"]); ?>" ><i class="icon-zoom-in icon-white"></i></a>
											<a href="#" onclick="delAlert('/wublog<?php echo ($vo["fileroot"]); ?>','<?php echo ($vo["info"]); ?>','<?php echo ($vo["filename"]); ?>','<?php echo ($k); ?>')" data-toggle="modal"><i class="icon-remove icon-white"></i></a>
										</div>
									</li><?php endforeach; endif; else: echo "" ;endif; ?>
							</ul>
							</div>
						</div>



														<div class="pagination alternate">
									<ul>
										<?php if(($data["Pages"]["current"]) == "1"): ?><li class="disabled">
										<?php else: ?>
										<li><?php endif; ?>
										<a href="/wublog/index.php/Admin/Index/myimages/page/<?php echo ($data['Pages']['current']-1); ?>">Prev</a>
										</li>
										<!--<li class="active">
										<a href="#">1</a>
										</li>-->
										<?php $__FOR_START_26108__=0;$__FOR_END_26108__=$data["Pages"]["pages"];for($i=$__FOR_START_26108__;$i < $__FOR_END_26108__;$i+=1){ if(($i+1) == $data["Pages"]["current"]): ?><li class="active">
											<a href="#"><?php echo ($i+1); ?></a>
											</li>
											<?php else: ?>
											<li><a href="/wublog/index.php/Admin/Index/myimages/filter/all/page/<?php echo ($i+1); ?>"><?php echo ($i+1); ?></a></li><?php endif; } ?>
										</volist>

										<?php if(($data["Pages"]["current"]) == $data["Pages"]["pages"]): ?><li class="disabled">
										<?php else: ?>
										<li><?php endif; ?>
										<a href="/wublog/index.php/Admin/Index/myimages/filter/all/page/<?php echo ($data['Pages']['current']+1); ?>">Next</a>
										</li>
									</ul>
								</div>
					</div>
				</div>
<script type="text/javascript">
$(document).ready(function(){
  $('a[rel]').foxibox();
});
function delAlert(filepath,info,filename,li)
{
$('#alertinfo').html(info);
$("#alertpath").attr("src",filepath);
$('#postVal').val(filename);
$('#liIdVal').val('li-'+li);
$("#myAlert").modal(); 
}
function delAjaxPost()
{
	var filename=$('#postVal').val();
	var liid=$('#liIdVal').val();
	$.ajax({
		type:'post',
		url:'/wublog/index.php/Admin/File/delFiles?file='+filename,
		datatype:'json',
		data:{},
		success:function(data)
		{
			$('#'+liid).remove();
			var count=$('#imgcount').html();
			$('#imgcount').html(count--);
			var obj = eval('(' + data + ')'); 
			var html="<div class='alert alert-success'><button class='close' data-dismiss='alert'>×</button><strong>成功的编辑了!</strong> 《"+obj.msg+"》</div>";
			$("#alert").html($("#alert").html()+html).delay(5000).slideUp(500);
		},
	});
}
//var $jq = jQuery.noConflict(); 
//$('.picker').click(function () {
//$(this).toggleClass('selected');
//});/wublog/index.php/Admin/File/delFiles?file=<?php echo ($vo["filename"]); ?>
</script>
									<div id="myAlert" class="modal hide">
										<div class="modal-header">
											<button data-dismiss="modal" class="close" type="button">×</button>
											<h3>确认删除</h3>
										</div>
										<div class="modal-body">
											<img id='alertpath' src="#"/>
											<p id='alertinfo'></p>
											<input id='postVal' type='hidden' value='' />
											<input id='liIdVal' type='hidden' value='' />
										</div>
										<div class="modal-footer">
											<a data-dismiss="modal" onclick="delAjaxPost()" class="btn  btn-primary" href="#">Confirm</a>
											<a data-dismiss="modal" class="btn" href="#">Cancel</a>
										</div>
									</div>

			</div>
			
            <script type="text/javascript">
$('#style-switcher a').click(function()
      {
            var pub="/wublog/Public";
            var style = $(this).attr('href').replace('#','');
            $('.skin-color').attr('href',pub+'/css/unicorn.'+style+'.css');
            $(this).siblings('a').css({'border-color':'transparent'});
            $(this).css({'border-color':'#aaaaaa'});
      });
            </script>
	</body>
</html>