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


		<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>
		<script type="text/javascript" src="<?php echo (THEME_PATH_ABS); ?>/js/jquery.passwordStrength.js"></script>
		<link rel="stylesheet" type="text/css" href="<?php echo (THEME_PATH_ABS); ?>/css/password_strength.css" />
	<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(($data["PageFun"]) == "myfiles"): ?><li class="active"> <?php else: ?> <li><?php endif; ?><a href="/wublog/index.php/Admin/Index/myfiles/filter/all"><i class="icon icon-pencil"></i> <span>我的上传</span></a></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>


<script type="text/javascript">
	$(document).ready(function(){
	var $pwd = $('input[name="newpwd"]');					   
	$pwd.passwordStrength();});
</script>
<div class="container-fluid">


<div class="row-fluid">
					<div class="span12">
						<div class="widget-box">
							<div class="widget-title">
								<span class="icon">
									<i class="icon-align-justify"></i>									
								</span>
								<h5>blog信息</h5>
							</div>
							<div class="widget-content nopadding">
								<form action="/wublog/index.php/Admin/Settings/updataSettings/" method="post" id="form1" name="form1" class="form-horizontal" />
									<div class="control-group">
										<label class="control-label">站点标题：</label>
										<div class="controls">
											<input name="blogname" type="text" value="<?php echo ($data["settings"]["blogname"]); ?>" />
										</div>
									</div>
									<div class="control-group">
										<label class="control-label">副标题：</label>
										<div class="controls">
											<input name="blogdescription" type="text" value="<?php echo ($data["settings"]["blogdescription"]); ?>" /><span class="help-block">用简洁的文字描述本站点。</span>
										</div>
									</div>
									<div class="control-group">
										<label class="control-label">昵称：</label>
										<div class="controls">
										<input name="nickname" type="text" value="<?php echo ($data["settings"]["nickname"]); ?>" /><span class="help-block">暂时没用预留设置。</span>
										</div>
									</div>
									<div class="control-group">
										<label class="control-label">url：</label>
										<div class="controls">
											<input name="userurl" type="text" value="<?php echo ($data["settings"]["userurl"]); ?>" /><span class="help-block">使用url作为标示，访问网页如,HTTP://41.house.net/[你的别名]。方便记忆，与用户名作区分。</span>
											
										</div>
									</div>
									<div class="control-group">
										<label class="control-label">Email：</label>
										<div class="controls">
											<input name="email" type="text" value="<?php echo ($data["settings"]["email"]); ?>" /><span class="help-block">博主回复评论时加载头像用，使用<a href="http://en.gravatar.com/">Gravatar</a></span>
										</div>
									</div>
									<script type="text/javascript">
									function previewTheme()
									{
										var str="/wublog/Application/Home/View/"+jQuery("#themes  option:selected").val()+"/preview.png";
										//document.write(str);
										$("#previewImage").attr("src",str);
										//alert(str);
									}
									</script>
									<div class="control-group">
										<label class="control-label">主题：</label>
										<div class="controls">
											<select id="themes" name="themes" onclick="previewTheme()">
											<?php if(is_array($data["listthemes"])): $i = 0; $__LIST__ = $data["listthemes"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i; if(($vo) == $data["settings"]["theme"]): ?><option value='<?php echo ($vo); ?>' selected /><?php echo ($vo); ?>
													<?php else: ?>
														<option value='<?php echo ($vo); ?>' /><?php echo ($vo); endif; endforeach; endif; else: echo "" ;endif; ?>
											</select>	<span class="help-block">主题选择临时方案</span>
											<p>
											<a href="#" class="thumbnail span3" >
											<img id='previewImage' src="/wublog/Application/Home/View/<?php echo ($data["settings"]["theme"]); ?>/preview.png" alt="" />
											</a>		</p>						
												</div>
									</div>
									<div class="form-actions">
										<button type="submit" class="btn btn-primary" onclick="#">更新信息</button>
									</div>
								</form>
							</div>
						</div>


<div class="widget-box">
							<div class="widget-title">
								<span class="icon">
									<i class="icon-align-justify"></i>									
								</span>
								<h5>blog信息</h5>
							</div>
							<div class="widget-content nopadding">
								<form action="/wublog/index.php/Admin/Settings/setpassword/" method="post" id="form2" name="form1" class="form-horizontal" />
									<div class="control-group">
										<label class="control-label">旧密码：</label>
										<div class="controls">
											<input name="oldpwd" type="password" value="" />
										</div>
									</div>
									<div class="control-group">
										<label class="control-label">新密码：</label>
										<div class="controls">
											<input id="newpwd" name="newpwd" type="password" value="" />										<p>
											<div id="passwordStrengthDiv" class="is0"></div>  
										</p>
										</div>

									</div>

									<div class="control-group">
										<label class="control-label">重复新密码：</label>
										<div class="controls">
										<input id="repwd" name="repwd" type="password" value="" />
										<p>
											<div id="passwordCheck"></div>  
										</p>
										</div>

									</div>
									
									<div  class="form-actions">
										<button id='submitPwd' type="button" class="btn btn-primary" >更新信息</button>
									</div>
								</form>
							</div>
						</div>


<script type="text/javascript">
$("#repwd").keyup(function(){
var newpwd=$("#newpwd").val();
var repwd=$("#repwd").val();

if(newpwd.length==0)
{
	$("#passwordCheck").html("<span style='color:red'>密码不能为空</span>");
	return 0;
	}
else
	{$("#passwordCheck").html("");}
if(newpwd.length<8)
{
	$("#passwordCheck").html("<span style='color:red'>密码必须大于8位</span>");
	return 0;
	}
else
	{$("#passwordCheck").html("");}
if(newpwd!=repwd)
{
	$("#passwordCheck").html("<span style='color:red'>两次输入不一致</span>");
	return 0;
	}
else
	{$("#passwordCheck").html("");}
  });

$("#submitPwd").click(function(){
var newpwd=$("#newpwd").val();
var repwd=$("#repwd").val();

	if((newpwd==repwd)&&(newpwd.length>8))
	{$("#form2").submit();}

	
  });


</script>


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