<?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'];
$uf = $_GET['uf'];


$sql = mysql_query("SELECT * FROM l_cidades 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['cidade']; ?> </li>
        </ul>

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

           <div class="control-group">
            <label class="control-label"  for="depp">Cidade</label>
            <div class="controls">
             <input type="text" name="nome" value="<?php echo $lin['cidade']; ?>">
            </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="cidades.php?uf=<?php echo $uf; ?>">Voltar</a>
          </div>
        </fieldset>
      </form>



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