Location: PHPKode > projects > Audio-Portal > usr_del.php
<?php
require_once('functions/func.php');
adminonly();

$page="Add User";

$usrid=(isset($_POST['usr']))?$_POST['usr']:'';
$act=(isset($_POST['act']))?$_POST['act']:'';

// pagina opbouw
eval(tpl('header'));
echo "
<table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"> 
 <tr> 
  <td valign=\"top\" align=\"center\" width=\"16%\">";

eval(tpl('menu'));

echo "
  </td>
  <td width=\"1%\"></td>
  <td valign=\"top\" align=\"center\" width=\"83%\">";

if ($act=='send') {

  $save=query("DELETE FROM users WHERE id=".$usrid);
  if ($save) {
    $mess="User was successfully deleted";
    write_log("user was deleted by ".$_SESSION['usrname'].".");
    }
  else { $mess="An error occured while deleting user"; };

  eval(tpl('usr_del_mess'));

  }
else { eval(tpl('usr_del')); };

echo "
  </td>
 </tr>
</table>";
eval(tpl('footer'));
?>
Return current item: Audio-Portal