<?php
session_start();
///Construtoras listar
include "../phpconfig/config.php";
include "../phpconfig/valida_login.php";
include "../phpconfig/funcoes.php";
include "../includes/topo.php"; 

$sql = mysql_query("SELECT * FROM empresas ORDER BY id DESC");
$num = mysql_num_rows($sql);


$sql2 = mysql_query("SELECT * FROM empresas where id between 5200001 and 5250000");



$n22 = "<loc>";



</script>

        <ul class="breadcrumb">
          <li><a href="<?php echo sti('adm');  ?>">Home</a></li>
          <li class="active">TODAS de <?php echo $num;    ?> empresas</li>
        </ul>


        <table class="table table-bordered">

        <thead>

        <?php  

          while($lin = mysql_fetch_assoc($sql2)){  ?>
          <tr id="listItem_<?php echo $lin['id']; ?>">

            <?php

            $cidade = retorna($lin['id_cidade'], 'l_cidades');
            $estado = retorna($lin['id_uf'], 'l_estados');
            $bairro = retorna($lin['id_bairro'], 'l_bairros');

            ?>
     <?php echo sti('urlbase');  ?><?php echo $estado['uf'].'/'. $lin['slug'].'-'.$lin['id'];  ?></br>
     
           
           
              
          <?php  } if($num==0){echo "<tr><td  colspan='16'>Não há cadastro de empresas</td></tr>";} ?>


        </tbody>
      </table>

<?php include "../includes/rodape.php"; ?>