<?php
require 'sessao.php';
if($max_ip_perso < 3){
    header('Location: index.php');
}

?>
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <link rel="shortcut icon" href="img/favicon.png">

    <title>Painel DNS | Adicionar DomÃ­nios</title>

    <!-- Bootstrap core CSS -->
    <link href="inc/css/bootstrap.min.css" rel="stylesheet">
    <link href="inc/css/bootstrap-reset.css" rel="stylesheet">
    <!--external css-->
    <link href="inc/assets/font-awesome/css/font-awesome.css" rel="stylesheet" />
    <link href="inc/assets/jquery-easy-pie-chart/jquery.easy-pie-chart.css" rel="stylesheet" type="text/css" media="screen"/>
    <link rel="stylesheet" href="inc/cinc/ss/owl.carousel.css" type="text/css">
    <!-- Custom styles for this template -->
    <link href="inc/css/style.css" rel="stylesheet">
    <link href="inc/css/style-responsive.css" rel="stylesheet" />

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 tooltipss and media queries -->
    <!--[if lt IE 9]>
      <script src="js/html5shiv.js"></script>
      <script src="js/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>

  <section id="container" >
      <!--header start-->
      <header class="header white-bg">
            <div class="sidebar-toggle-box">
                <div data-original-title="Toggle Navigation" data-placement="right" class="icon-reorder tooltips"></div>
            </div>
            <!--logo start-->
            <a href="index.php" class="logo">Painel<span>DNS</span></a>
            <!--logo end-->
            <div class="nav notify-row" id="top_menu">
                <!--  notification start -->
                <ul class="nav top-menu">
                </ul>
            </div>
            <div class="top-nav ">
                <ul class="nav pull-right top-menu">
                    <?php require'menu2.php'; ?>
                </ul>
            </div>
        </header>
      <!--header end-->
      <!--sidebar start-->
      <aside>
          <div id="sidebar"  class="nav-collapse ">
              <!-- sidebar menu start-->
              <?php require'menu.php'; ?>
              <!-- sidebar menu end-->
          </div>
      </aside>
      <!--sidebar end-->
      <!--main content start-->
      <section id="main-content">
	  
          <section class="wrapper">
<?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>
								'.$_GET['erros'].'
								</div>';}
			
			// mensagem de sucesso
			if (isset($_GET['sucesso'])){
			echo'
				<div class="alert alert-success alert-dismissable">
                                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">Ã—</button>
                                Cadastrado com sucesso! Insira uma entrada tipo SRV em seu dominio. <br/>
                                Serviço: _tsdns // Protocolo: _tcp // Nome completo: @ // 
                                Alvo: proxy.paineldns.com // Prioridade: 0 // Peso: 5 // Porta: 41144
                            </div>';}
            ?>

		  <div class="row">
		  <div class="col-lg-6">
                      <section class="panel">
                          <header class="panel-heading">
                              Adicionar novo DomÃ­nio
                          </header>
                          <div class="panel-body">
                              <form action="adicionardominios_.php" method="post" id="form1" name="form1">
                                  <div class="form-group">
                                      <label for="exampleInputEmail1">DomÃ­nio</label>
                                      <input type="text" name="domain" id="domain" class="form-control" placeholder="Exemplo: meudominio.net" required="required">
                                  </div>
                                 
								  
                            
						  
						  <button type="enviar.php" class="btn btn-success"><i class="icon-white icon-ok"></i> Criar</button>
								 
                                  <button type="reset" class="btn btn-default">Limpar</button>
                              </form>

                          </div>
                      </section>
                  </div>
		  
		  </div>
		  
		  
		  
		  
		  
		  
              <!--state overview end-->
              </section>

            </section>
</section>




     
      <!--main content end-->
      <!--footer start-->






      <footer class="site-footer">
          <div class="text-center">
              <?php require'config.php'; echo rodape(); ?>
              <a href="#" class="go-top">
                  <i class="icon-angle-up"></i>
              </a>
          </div>
      </footer>


      <!--footer end-->

    <!-- js placed at the end of the document so the pages load faster -->
    <script src="inc/js/jquery.js"></script>
    <script src="inc/js/jquery-1.8.3.min.js"></script>
    <script src="inc/js/bootstrap.min.js"></script>
    <script class="include" type="text/javascript" src="inc/js/jquery.dcjqaccordion.2.7.js"></script>
    <script src="inc/js/jquery.scrollTo.min.js"></script>
    <script src="inc/js/jquery.nicescroll.js" type="text/javascript"></script>
    <script src="inc/js/jquery.sparkline.js" type="text/javascript"></script>
    <script src="inc/assets/jquery-easy-pie-chart/jquery.easy-pie-chart.js"></script>
    <script src="inc/js/owl.carousel.js" ></script>
    <script src="inc/js/jquery.customSelect.min.js" ></script>
    <script src="inc/js/respond.min.js" ></script>

    <script class="include" type="text/javascript" src="inc/js/jquery.dcjqaccordion.2.7.js"></script>

    <!--common script for all pages-->
    <script src="inc/js/common-scripts.js"></script>

    <!--script for this page-->
    <script src="inc/js/sparkline-chart.js"></script>
    <script src="inc/js/easy-pie-chart.js"></script>

  <script>

      //owl carousel

      $(document).ready(function() {
          $("#owl-demo").owlCarousel({
              navigation : true,
              slideSpeed : 300,
              paginationSpeed : 400,
              singleItem : true,
			  autoPlay:true

          });
      });

      //custom select box

      $(function(){
          $('select.styled').customSelect();
      });

  </script>

  </body>
</html>
