<?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" href="<?php echo (THEME_PATH_ABS); ?>/css/unicorn.grey.css" class="skin-color" />	


		<script type="text/javascript" src="<?php echo (THEME_PATH_ABS); ?>/umeditor/umeditor.config.js"></script>
		<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>


	<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="span6">


					<div class="widget-box">
							<div class="widget-title">
								<span class="icon">
									<i class="icon-align-justify"></i>								
								</span>
								<h5>创建新的分类</h5>
							</div>
							<div class="widget-content nopadding">
								<form action="/wublog/index.php/Admin/Cate/addCategory" method="post" class="form-horizontal" />
									<div class="control-group">
										<label class="control-label">新分类</label>
										<div class="controls">
											<input name="new_category" type="text" />
										</div>
									</div>


									<div class="control-group">
										<label class="control-label">别名</label>
										<div class="controls">
											<input name="category_alias" type="text" /><span class="help-block">“别名”是在URL中使用的别称，它可以令URL更美观。通常使用小写，只能包含字母，数字和连字符（-）。</span>
										</div>
									</div>
									

									<div class="control-group">
										<label class="control-label">描述信息</label>
										<div class="controls">
											<textarea name="category_text"></textarea>
										</div>
									</div>



									<div class="control-group">
										<label class="control-label">父项</label>
										<div class="controls">
											<select name="parentid">
											<option value='-1' />----无----
											<?php if(is_array($data["category"])): $i = 0; $__LIST__ = $data["category"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value='<?php echo ($vo["id"]); ?>' /><?php echo ($vo["catename"]); endforeach; endif; else: echo "" ;endif; ?>
											</select><span class="help-block">分类目录和标签不同，它可以有层级关系。您可以有一个“音乐”分类目录，在这个目录下可以有叫做“流行”和“古典”的子目录。</span>
										</div>
									</div>

									<div class="form-actions">
										<button type="submit" class="btn btn-primary">保存</button>
									</div>



								</form>
							</div>
						</div>


						<div class="widget-box">
							<div class="widget-title">
								<span class="icon">
									<i class="icon-align-justify"></i>								
								</span>
								<h5>创建新的tag</h5>
							</div>
							<div class="widget-content nopadding">
								<form action="/wublog/index.php/Admin/Cate/addTag" method="post" class="form-horizontal" />
									<div class="control-group">
										<label class="control-label">新tag</label>
										<div class="controls">
											<input name="new_tag" type="text" />
										</div>
									</div>


									<div class="control-group">
										<label class="control-label">别名</label>
										<div class="controls">
											<input name="tag_alias" type="text" /><span class="help-block">“别名”是在URL中使用的别称，它可以令URL更美观。通常使用小写，只能包含字母，数字和连字符（-）。</span>
										</div>
									</div>
																		<div class="form-actions">
										<button type="submit" class="btn btn-primary">保存</button>
									</div>
								</form>
							</div>
						</div>						
						

					</div>




					<div class="span6">
					<div class="widget-box">
							<div class="widget-title">
								<span class="icon">
									<i class="icon-th"></i>
								</span>
								<h5>分类列表</h5>
							</div>
							<div class="widget-content nopadding">
								<table class="table table-bordered table-striped">
									<thead>
										<tr>
											<th>分类</th>
											<th>描述</th>
											<th>别名</th>
											<th>文章</th>
											<th>操作</th>
										</tr>
									</thead>
									<tbody>
										<?php if(is_array($data["category"])): $i = 0; $__LIST__ = $data["category"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
											<td><?php echo ($vo["catename"]); ?></td>
											<td><?php echo ($vo["catetext"]); ?></td>
											<td><?php echo ($vo["catealias"]); ?></td>
											<td><a href="/wublog/index.php/Admin/Index/archivelists/type/cate/id/<?php echo ($vo["id"]); ?>">
											<?php echo ($vo["archives_sum"]); ?></a>
											</td>
											<td><a href="/wublog/index.php/Admin/Index/edititem/type/category/id/<?php echo ($vo["id"]); ?>" class="btn btn-primary btn-mini">编辑</a> <a href="/wublog/index.php/Admin/Cate/delCategory/id/<?php echo ($vo["id"]); ?>" class="btn btn-danger btn-mini">删除</a></td>
										</tr><?php endforeach; endif; else: echo "" ;endif; ?>
									</tbody>
								</table>							
							</div>
						</div>


					<div class="widget-box">
							<div class="widget-title">
								<span class="icon">
									<i class="icon-th"></i>
								</span>
								<h5>tag列表</h5>
							</div>
							<div class="widget-content nopadding">
								<table class="table table-bordered table-striped">
									<thead>
										<tr>
											<th>分类</th>
											<th>别名</th>
											<th>文章数量</th>
											<th>操作</th>
										</tr>
									</thead>
									
									<tbody>
										<?php if(is_array($data["tag"])): $i = 0; $__LIST__ = $data["tag"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
											<td><?php echo ($vo["tag"]); ?></td>
											<td><?php echo ($vo["tagalias"]); ?></td>
											<td><a href="/wublog/index.php/Admin/Index/archivelists/type/tag/id/<?php echo ($vo["id"]); ?>"><?php echo ($vo["archives_sum"]); ?></a></td>
											<td><a href="/wublog/index.php/Admin/Index/edititem/type/tag/id/<?php echo ($vo["id"]); ?>" class="btn btn-primary btn-mini">编辑</a> <a href="/wublog/index.php/Admin/Cate/deltag/id/<?php echo ($vo["id"]); ?>" class="btn btn-danger btn-mini">删除</a></td>
										</tr><?php endforeach; endif; else: echo "" ;endif; ?>
									</tbody>
									</volist>
								</table>							
							</div>
						</div>


						</div>
					</div>




</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>