Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if (isset($_POST['addUser']))
- {
- //Da completare
- }
- if (isset($_POST['removeUser']))
- {
- if (isset($_POST['lstUtenti']))
- {
- $que = ('delete from "Utenti" where email=\''.$_POST['lstUtenti'].'\'');
- echo $que;
- $res = pg_query ($que);
- if (!$res){
- echo "query no!";
- break;
- }
- header("location:index.php?pag=big_admin_user_frame");
- }
- }
- if (isset($_POST['modifyUser']))
- {
- //Da completare
- }
- ?>
- <form name="formLogin_Password" method="post" action="index.php?pag=big_admin_user_frame" class="form_null">
- <table class="tablecont">
- <tr>
- <td class="topbox">
- AMMINISTRAZIONE UTENTI
- </td>
- </tr>
- <tr>
- <td class="centerbox" valign="top">
- <table class="tablecont2" align="center">
- <tr>
- <td class="centerboxback_middle" align="center" colspan="3">
- <br>
- <?php
- $conn = pg_connect("host=127.0.0.1 dbname=Sito user=tia password=mattiaroot19872009");
- if (!$conn) {
- echo ('Connessione fallita! <br />');
- break;
- }
- $que = 'select * from "Utenti" order by cognome';
- $utenti = pg_query ($que);
- $row = pg_num_rows($utenti);
- $ind = 0;
- echo ('<select name="lstUtenti" size="15">');
- while ($ind<$row)
- {
- $result = pg_fetch_assoc($utenti, $ind);
- echo ('<option value="'.$result['email'].'">'.$result['cognome'].' '.$result['nome'].' '.$result['email'].'</option>');
- $ind = $ind + 1;
- }
- echo ('</select>')
- ?>
- </td>
- </tr>
- <tr>
- <td align="right">
- <input type="submit" value="Aggiungi Utente" name="addUser">
- </td>
- <td align="center">
- <input type="submit" value="Rimuovi Utente" name="removeUser">
- </td>
- <td align="left">
- <input type="submit" value="Modifica Utente" name="modifyUser">
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td class="bottombox">
- </td>
- <td>
- </td>
- </tr>
- </table>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement