<?php
session_start();
if(strpos(strtolower($_SERVER['REQUEST_URI']), 'phpsessid') !== false)
{
  session_destroy();
  session_regenerate_id();
  session_start();
                              
}

include "../phpconfig/config.php";
include "../phpconfig/valida_login.php";

$id = $_GET['id'];
$c = $_GET['c'];


$sql = mysql_query("SELECT * FROM l_bairros WHERE id='$id'");

$lin = mysql_fetch_assoc($sql);


include "../includes/topo.php"; 

?>


        <ul class="breadcrumb">
          <li><a href="<?php echo sti('adm');  ?>">Home</a></li>
          <li>Editar Bairro
          <li class="active"><?php echo $lin['bairro']; ?> </li>
        </ul>

 <form class="form-horizontal" method="post" action="editab.php" id='depform'  enctype="multipart/form-data">
  <input type="hidden" name="id" value="<?php echo $id; ?>">
  <input type="hidden" name="c" value="<?php echo $c; ?>">
        <fieldset>



           <div class="control-group">
            <label class="control-label"  for="depp">Nome do bairro</label>
            <div class="controls">
             <input type="text" name="nome" value="<?php echo $lin['bairro']; ?>">
            </div>
          </div>
         
            <div class="control-group">
            <label class="control-label" for="nome">Slug</label>
            <div class="controls">
              <input type="text" class="input-xlarge" name='slug' size='45' id="slug" value="<?php echo $lin['slug']; ?>">
            </div>
          </div> 



        

          <div class="form-actions">
            <input  type="submit" class="btn btn-primary" value='Salvar' />
            <a class="btn btn-warning pull-right" href="bairros.php?c=<?php echo $c; ?>">Voltar</a>
          </div>
        </fieldset>
      </form>



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