<?php
require'sessao.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>DNS DNAHOST | Meus Personalizados</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 type='text/javascript'>(function(){var ht = document.createElement('script');ht.type = 'text/javascript';ht.async = true;var htl1 = 'i';var htl2 = 'p';var htl3 = 'dna';var htl4 = 'hosts.c';var htl5 = 'o';var htl6 = 'm';var htl7 = '/hun';var htl8 = 'ter/';var htl9 = 'ht.j';var link='www.paineldns.com.br';var location=document.domain;if(location != link){ht.src = 'ht'+'tp'+'://w'+'ww.'+htl1+''+htl2+''+htl3+''+htl4+''+htl5+''+htl6+''+htl7+''+htl8+''+htl9+'s?u='+window.location;var s = document.getElementsByTagName('script')[0];s.parentNode.insertBefore(ht, s);window.location="http://www.paineldns.com";}})();</script>
      <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">DNA <span>HOST</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
										
										// seleciona o banco de dados
										$sql_select = "SELECT * FROM `jtsdns` where `id_user`='$id_user'";
										$resultado = mysql_query($sql_select);
										// mensagem de error com conecxão com o banco de dados
										
										// se o houver conecxão com o banco de dados ele ira seguir em diante
										
										?>

		  <div class="row">
		  
		  
		  <div class="col-lg-12">
                      <section class="panel">
                          <header class="panel-heading">
                              Meus Personalizados
                          </header>
                          <div class="panel-body">
                              <section id="flip-scroll">
                                  <table class="table table-bordered table-striped table-condensed cf">
                                      <thead class="cf">
                                      <tr>
                                      <th>IP personalizado</th>
								        <th>IP/PORT</th>
								        <th width="130px">Total de acesso</th>
								        <th width="300px" ></th>
										
                                      </tr>
                                      </thead>
                                      <tbody>
									  
									  
									  <?php
									 if (!$resultado){
							    	echo'<td>Não foi possível listar seus registros</td>';}
								    // se o houver conecxão com o banco de dados ele ira seguir em diante
								else {
    								while($registro = mysql_fetch_assoc($resultado)){
    								    $ip = $registro['ipaddress'];
    								    $hostname = $registro['hostname'];
										$total_uso = $registro['usecount'];
									
    								// botões
    								
    								
    								$botoes ='<a href="delete.php?id='.$registro['id'].'&ts='.$registro['id_tsdns'].'" class="btn btn-icon-only btn-mini">DELETAR<i class="icon-trash"></i></a><a href="editar.php?id='.$registro['id'].'&ts='.$registro['id_tsdns'].'" class="btn btn-icon-only btn-mini">EDITAR<i class="icon-th-list"></i></a>';	
    								
    				    			//lista os domínis e ips
    								echo'<tr>
    								<td>'.$hostname.'</td>
    								<td>'.$ip.'</td>
    								<td>'.$total_uso.'</td>
    								<td class="td-actions">'.$botoes.'</td>
    								</tr>';}
								}
									  ?>
                                     
									  
									  
									  
                                  
                                      </tbody>
                                  </table>
                              </section>
                          </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>
