<?php
include_once('../class/class.mysql.php');
include_once('class.fotografo.php');
include_once('../include/utilitarios.php');

extract($_POST);
if($ax == 'Novo'){
	echo '<input name="btnOpcaoSalvar" id="btnOpcaoSalvar" type="hidden" value="novo" />';
}

if($ax == 'configurar'){
	$mysqlCom = new MysqlConnect();
	$class = new Fotografo();
	echo '<input name="btnOpcaoSalvar" id="btnOpcaoSalvar" type="hidden" value="configurar" />';
	$class->Select($id);
	while($row = mysqli_fetch_object($class->qry)){
	$id_fotografo		= $row->id_fotografo;
	$nome               = $row->nome;
	$telefone			= $row->telefone;
	$celular			= $row->celular;
	$email				= $row->email;
	$endereco			= $row->endereco;
	$bairro				= $row->bairro;
	$cidade				= $row->cidade;
	$cep				= $row->cep;
	$obs				= $row->obs;
	}
}


?>
<script>MaskEdit();</script>
      

<form id="formConfigurar">
<table width="700" border="0">
  <tr class="dados">
    <th width="195">Campos</th>
    <th width="495">Dados</th>
  </tr>
  <tr>
    <td class="descricao">Nome</td>
    <td class="dados"><div align="left" style="margin-left:5px">
      <input name="edtNome" type="text" id="edtNome" onblur="VerificarDupliciade($(this).val(),'spDupNome','<?php echo $nome?>', 'nome')" value="<?php echo $nome?>" size="50" class="obr" />
      <span id="spDupNome" style="color:#F00; font-size:10px;">
      <input type="hidden" class="edtDuplicidade" value="nDupli" />
      </span></div></td>
  </tr>
  <tr>
    <td class="descricao">Telefone</td>
    <td class="dados"><div align="left" style="margin-left:5px">
      <input name="edtTelefone" class="obr phone" type="text" alt="phone" id="edtTelefone" value="<?php echo $telefone?>" size="25" />
      </div></td>
  </tr>
  <tr>
    <td class="descricao">Celular</td>
    <td class="dados"><div align="left" style="margin-left:5px">
      <input name="edtCelular" type="text" class="phone" id="edtCelular" value="<?php echo $celular?>" size="25" />
    </div></td>
  </tr>
  <tr>
    <td class="descricao">E-mail</td>
    <td class="dados"><div align="left" style="margin-left:5px">
      <input name="edtEmail" type="text" id="edtEmail" value="<?php echo $email?>" size="50" />
    </div></td>
  </tr>
  <tr>
    <td class="descricao">Endereco</td>
    <td class="dados"><div align="left" style="margin-left:5px">
      <input name="edtEndereco" type="text" id="edtEndereco" value="<?php echo $endereco?>" size="50" />
    </div></td>
  </tr>
  <tr>
    <td class="descricao">Bairro</td>
    <td class="dados"><div align="left" style="margin-left:5px">
      <input name="edtBairro" type="text" id="edtBairro" value="<?php echo $bairro?>" size="50" />
    </div></td>
  </tr>
  <tr>
    <td class="descricao">Cidade</td>
    <td class="dados"><div align="left" style="margin-left:5px">
      <input name="edtCidade" type="text" id="edtCidade" value="<?php echo $cidade?>" size="50" />
    </div></td>
  </tr>
  <tr>
    <td class="descricao">CEP</td>
    <td class="dados"><div align="left" style="margin-left:5px">
      <input name="edtCEP" type="text" id="edtCEP" class="cep" value="<?php echo $cep?>" size="25" />
    </div></td>
  </tr>
  <tr>
    <td class="descricao">Obs</td>
    <td class="dados"><div align="left" style="margin-left:5px">
      <textarea name="edtObs" id="edtObs" cols="50" rows="5"><?php echo $obs?></textarea>
    </div></td>
  </tr>
</table>
</form>
<input type="hidden" name="id" id="id" value="<?php echo $id_fotografo?>" />




<!--    /*Script para mudar cor da linha de cada tabela*/-->
<script type="text/javascript" src="js/table.js"></script>
