2 header ("Pragma: no-cache"); // sempre carregar página (não vai ser armazenada no cache http 1,0
3 header("Cache-Control: no-cache, must-revalidate"); // idem http 1,1
5 require_once("Globals.php");
6 //verifica se o administrador está logado
8 // realiza conexão com o banco de dados
11 $sql = "SELECT login as 'apelido', nome, telefone, email, foto FROM dados, usuario WHERE dados.id = usuario.id_user AND id_user = '". $_GET['id'] ."'";
12 $rs = mysql_query($sql);
14 if(mysql_num_rows($rs)>0)
16 $usuario = mysql_fetch_array($rs);
19 <!-- Formulário de Usuá
rios (form_usu
.php
)
20 1. Exibe o formulário para alteração dos dados
do petiano
.
25 <title
>Área
do Administrador
</title
>
28 <center
><h2
>Editar Usuário
</h2
></center
>
32 <form action
='altera_usu.php' method
="post">
33 <input type
='hidden' name
='action' value
='edit'>
34 <input type
='hidden' name
='id' value
='<?php echo $_GET['id
']; ?>'>
35 <table border
=2 class='bordasimples'>
36 <tr bgcolor
="#990033" style
="color: #fff;" align
="center">
37 <th width
=200 colspan
="2">Novo usuário
</th
>
42 <td
><input type
="text" name
="user" value
="<?php echo $usuario['apelido']; ?>"></td
>
46 <td
>Nome Completo
</td
>
47 <td
><input type
="text" name
="nome" value
="<?php echo $usuario['nome']; ?>"></td
>
52 <td
><input type
="text" name
="telefone" value
="<?php echo $usuario['telefone']; ?>"></td
>
57 <td
><input type
="text" name
="email" value
="<?php echo $usuario['email']; ?>"></td
>
62 <td
><input type
="text" name
="foto" value
="<?php echo $usuario['foto']; ?>"></td
>
65 <tr
class='tbrow' align
=center
>
66 <td colspan
=2><input type
="submit" value
="Enviar"> 
; 
;<input type
="reset" value
="Restaurar Originais"></td
>
70 <td colspan
=2 style
='font-size:14px'>* deve copiar a foto para a pasta
<i
>fotos
</i
> do logador
</td
>
80 echo "O usuário solicitado não existe.";
84 <a href
="admin.php"><< Administrador
</a
><br
>
85 <a href
="index.php"><< Logador
</a
>