2 /* Administrar Usuários (alterar_usu.php)
3 1. Opções de criar, editar e remover usuários do logador.
5 header ("Pragma: no-cache"); // sempre carregar página (não vai ser armazenada no cache http 1,0
6 header("Cache-Control: no-cache, must-revalidate"); // idem http 1,1
8 require_once("Globals.php");
9 //verifica se o administrador está logado
11 // realiza conexão com o banco de dados
15 <!DOCTYPE HTML
PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
19 <title
>Alterar Usuários
</title
>
20 <link rel
="stylesheet" type
="text/css" href
="estilo.css">
21 <script language
="JavaScript" type
="text/javascript">
22 function confirma_exclusao(nome
)
24 if(confirm('Você confirma que "'+ nome +
'" não é mais Petiano?'))
32 <center
><h3
>Alterar Usuários
</h2
></center
>
35 <table border
=2 class='bordasimples'>
37 <th width
=100>Nome
</th
>
38 <th width
=50>Editar
</th
>
39 <th width
=50>Excluir
</th
>
44 $sql = "SELECT login, id_user FROM usuario ORDER BY login ASC";
45 $rs = mysql_query($sql);
47 while($row = mysql_fetch_array($rs))
49 echo "<tr class='tbrow'><td>";
52 echo "<td align='center'><a href='form_usu.php?id=". $row['id_user'] ."'><img src='images/page_edit.png'></a></td>";
53 echo "<td align='center'><a href='altera_usu.php?id=". $row['id_user'] ."&deleta' onclick='return confirma_exclusao(\"". $row['login'] ."\")'><img src='images/delete.png'></a></td>";
62 <center
><h3
>Cadastrar Novo
</h3
></center
>
66 <form action
='altera_usu.php' method
="post">
67 <input type
='hidden' name
='action' value
='ins'>
68 <table border
=2 class='bordasimples'>
69 <tr bgcolor
="#990033" style
="color: #fff;" align
="center">
70 <th width
=200 colspan
="2">Novo usuário
</th
>
75 <td
><input type
="text" name
="user"></td
>
79 <td
>Nome Completo
</td
>
80 <td
><input type
="text" name
="nome"></td
>
85 <td
><input type
="text" name
="telefone"></td
>
90 <td
><input type
="text" name
="email"></td
>
95 <td
><input type
="text" name
="foto"></td
>
98 <tr
class='tbrow' align
=center
>
99 <td colspan
=2><input type
="submit" value
="Enviar"> 
; 
;<input type
="reset" value
="Apagar Dados"></td
>
103 <td colspan
=2 style
='font-size:14px'>* deve copiar a foto para a pasta
<i
>fotos
</i
> do logador
</td
>
113 <a href
="admin.php"><< Administrador
</a
><br
>
114 <a href
="index.php"><< Logador
</a
><br
>