<?php
require 'sessao.php';
level2();
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>TS3 GAMES - Alterar Senha</title>
    <link href="https://fonts.googleapis.com/css?family=Lato:300,400,700" rel="stylesheet">
	<link rel="icon" href="assets/images/favicon.ico">
    <link rel="stylesheet" href="plugins/css/bootstrap.min.css">
    <link rel="stylesheet" href="plugins/css/font-awesome.min.css">
    <link rel="stylesheet" href="plugins/css/animate.css">
    <link rel="stylesheet" href="plugins/css/ripples.min.css">
    <link rel="stylesheet" href="plugins/css/jquery-jvectormap-2.0.2.css">
    <link rel="stylesheet" href="css/outlay.css">
    
    <link rel="stylesheet" href="css/colors/color.css">
    <!-- Skin switcher -->
    <!-- Manually link your desire skin -->
    <style type="text/css">
    .skins {
        position: fixed;
        top: 190px;
        left: -120px;
        transition: .3s ease-in-out;
        z-index: 1000;
    }
    
    .skins:hover {
        left: 0;
    }
    
    .skin-colors {
        list-style: none;
        padding: 20px;
        margin: 0;
        background-color: #fff;
        width: 120px;
        border: 1px solid #e7e7e7;
    }
    
    .skin-colors li {
        position: relative;
        display: inline-block;
        width: 32px;
        height: 32px;
        cursor: pointer;
        margin: -3px;
        line-height: 0;
        transition: .3s ease-in-out;
    }
    
    .skin-colors li:hover {
        opacity: .7;
    }
    
    .skin-colors li.active::before {
        content: "\f00c";
        font-family: FontAwesome;
        font-size: 20px;
        width: 32px;
        line-height: 32px;
        text-align: center;
        position: absolute;
        color: #fff;
    }
    
    .skin-toggler {
        position: absolute;
        display: inline-block;
        width: 50px;
        height: 50px;
        right: -49px;
        top: 0;
        background-color: #fff;
        font-size: 30px;
        text-align: center;
        line-height: 50px;
        color: #888;
        border: 1px solid #e7e7e7;
        border-left: 0;
    }
    

    </style>
</head>

<body class="hold-transition sidebar-mini">
    <!-- Preloader -->
    <div id="preloader">
        <div class="spinner"></div>
    </div>
    <div class="wrapper">
<?php require 'menu2.php'; ?> 
                
                            </div>
                        </div>
                    </form>
                </div>
            </nav>
        </header>
        <!-- Left side column. contains the logo and sidebar -->
        <aside class="main-sidebar sidebar-light">
            <!-- sidebar -->
            <div class="sidebar">
                <!-- Sidebar user panel (optional) -->
                <div class="user-panel">
                    <div class="image waves-effect">
                        <img src="img/avatars/avatar3.png" class="img-circle img-responsive " alt="User Image">
                    </div>
                    <div class="text-center info"><?php
require_once 'sql.php'; 
$nome = $_SESSION['nome'];
echo'
                        <strong>'.$nome.'</strong> ';
?>
                        <i><?php echo $id_user; ?></i>
                    </div>
                </div>
                  <?php
                  require_once 'menu.php';
                  require_once 'menu_admin.php';
                  ?>
                <!-- /.sidebar-menu -->
            </div>
            <!-- /.sidebar -->
        </aside>
        <!-- Content Wrapper. Contains page content -->
        <div class="content-wrapper">
            <!-- Content Header (Page header) -->
            <section class="content-header">
                <h1>
                   Alterar Senha
                    <small>TSDNS</small>
                </h1></br>
                <ol class="breadcrumb">
                    <li><a href="index.php"><i class="fa fa-home"></i>Home</a></li>
                    <li class="active">Alterar Senha</li>
                </ol>
            </section>
           <div class="main">

<div class="main">

    <div class="container">

      <div class="row">

      	<div class="col-md-6">	
      		
      		
      		<div class="widget stacked">
					
				<div class="widget-header">
					<i class="icon-align-justify"></i>
				</div> <!-- /widget-header -->
				
				<div class="widget-content">
					<?php
					// mensagem de error
			if (isset($_GET['erros'])){
			echo '<div class="alert alert-danger alert-dismissable">
                                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
								OPS! Você esqueceu de preencher algum campo.
								</div>';}
			
			// mensagem de sucesso
			if (isset($_GET['sucessos'])){
			echo'
				<div class="alert alert-success alert-dismissable">
                                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                                Seus dados foram alterados com sucesso!
                            </div>';}
           	if (isset($_GET['error'])){
			echo'
				<div class="alert alert-danger alert-dismissable">
				Insira a senha!
				</div>';}
			if (isset($_GET['erro'])){
			echo'
				<div class="alert alert-danger alert-dismissable">
				Insira seu nome/sobrenome!
				</div>';}
			if (isset($_GET['errorsenha'])){
			echo'
				<div class="alert alert-danger alert-dismissable">
				As senhas não correspondem!
				</div>';}
			if (isset($_GET['banco'])){
			echo'
				<div class="alert alert-danger alert-dismissable">
				Error ao conectar ao banco de dados!
				</div>';}
			if (isset($_GET['gravar'])){
			echo'
				<div class="alert alert-danger alert-dismissable">
				Error ao armazenar seus dados, tente novamente mais tarde!
				</div>';}
			if (isset($_GET['errors'])){
			echo'
				<div class="alert alert-danger alert-dismissable">
				Senha invalida!
				</div>';}
            ?>

					<div class="shortcuts">
<fieldset>
                            
                        <form action="update.php?id=sim" method="post" id="form1" name="form1">	
                          <div class="form-group">
						      <label for="name" class="col-lg-4">Senha atual:</label >
                                
								<div class="col-lg-8">
						        	<input type="password" class="form-control" name="password" id="password" value="" required>
						 
								</div>
						    </div>
						
                                                 &nbsp;
                            <div class="form-group">
						      <label for="name" class="col-lg-4">Nova senha:</label >
                                
								<div class="col-lg-8">
						        	<input type="password" class="form-control" name="newpassword" id="newpassword" value="" required>
						 
								</div>
						    </div>
                                                 &nbsp;
						    <div class="form-group">
						      <label for="email" class="col-lg-4">Repetir a senha:</label>
						      <div class="col-lg-8">
						        <input type="password"  class="form-control" name="newpassword1" id="newpassword1" value="" required>
						        </div>
						    </div>
						    <br>
						    <div class="form-group">
						    	<div class="col-lg-4"></div>
						    	<div class="col-lg-8">
						      <button type="editar_.php" class="btn btn-success"><i class="icon-white icon-ok"></i> Atualizar</button>&nbsp;&nbsp;
						     
						  </div>
						    </div>
                          </form>
						    
						  </fieldset>
						
										
					</div> <!-- /shortcuts -->	
				
				</div> <!-- /widget-content -->
				
			</div> <!-- /widget -->
      		
      		
					
					
		</div></div>
					
					
					
					
								
	      </div> <!-- /span6 -->
	  

	</div> <!-- /container -->

</div> <!-- /extra -->
			</div>
        <!-- /.content-wrapper -->
        <!-- Main Footer -->
        <footer class="main-footer">
            <!-- To the right -->
            <div class="pull-right hidden-xs">
               
            </div>
            <!-- Default to the left -->
            <strong>Copyright &copy; 2017 - <a href="#">TS3GAMES</a> -</strong>  Todos os direitos reservados.
        </footer>
    </div>
    <!-- ./wrapper -->
    <!-- REQUIRED JS SCRIPTS -->
    <!-- jQuery 2.1.4 -->
    <script src="plugins/js/jquery-3.1.1.min.js"></script>
    <script src="plugins/js/bootstrap.js"></script>
    <script src="plugins/js/jquery.sparkline.min.js"></script>
    <script src="plugins/js/countUp.min.js"></script>
    <script src="plugins/js/raphael.min.js"></script>
    <script src="plugins/js/morris.min.js"></script>
    <script src="plugins/js/jquery-jvectormap-2.0.2.min.js"></script>
    <script src="plugins/js/jquery-jvectormap-world-mill-en.js"></script>
    <script src="plugins/js/material.min.js"></script>
    <script src="plugins/js/ripples.min.js"></script>
    <script src="plugins/rendro-easy-pie-chart/dist/jquery.easypiechart.min.js"></script>
    <script src="plugins/js/Chart.bundle.min.js"></script>
    <script src="plugins/js/jquery.slimscroll.min.js"></script>
    <script src="js/dashboard.js"></script>
    <script src="js/widgets.js"></script>
    <script src="js/app.js"></script>

</body>
</html>