2000-06-16 16:01:07 +00:00
|
|
|
<? // Preamble
|
|
|
|
$pageName = "Admin - Delete User";
|
|
|
|
$focused = "home"; // Dock icon name to gets a border
|
|
|
|
$need = 'auth';
|
|
|
|
require("../parts/preamble.php"); // Load most of document
|
|
|
|
?>
|
|
|
|
<?
|
|
|
|
if ($u_username) {
|
|
|
|
need('sql');
|
|
|
|
|
|
|
|
$u_username = AddSlashes($u_username);
|
|
|
|
|
|
|
|
$conn = mysql_connect (sqlHost, sqlUser, sqlPass);
|
|
|
|
if ($conn) {
|
2000-06-16 19:37:21 +00:00
|
|
|
$query1 = "DELETE FROM members WHERE u_username = '$u_username'";
|
2000-06-16 16:01:07 +00:00
|
|
|
|
|
|
|
$result = mysql_db_query (sqlDB, $query1, $conn);
|
|
|
|
if ($result) {
|
|
|
|
$numRows = mysql_affected_rows ($conn);
|
|
|
|
if ($numRows) {
|
|
|
|
echo '<P>User removed from members dbase successfully.';
|
|
|
|
} else {
|
|
|
|
echo '<P>There was an error in your input. The error was ' . mysql_error ($conn);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
echo '<P>There was an error in your input. The error was ' . mysql_error ($conn);
|
|
|
|
}
|
|
|
|
$query2 = "DELETE FROM devel_plans WHERE p_user = '$p_username'";
|
|
|
|
$result = mysql_db_query (sqlDB, $query2, $conn);
|
|
|
|
if ($result) {
|
|
|
|
$numRows = mysql_affected_rows ($conn);
|
|
|
|
if ($numRows) {
|
|
|
|
echo '<P>User removed from plan dbase successfully.';
|
|
|
|
echo '<P>This webpage will self-destruct in 30 seconds.';
|
|
|
|
} else {
|
|
|
|
echo '<P>There was an error in your input. The error was ' . mysql_error ($conn);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
echo '<P>There was an error in your input. The error was ' . mysql_error ($conn);
|
|
|
|
}
|
|
|
|
mysql_close ($conn);
|
|
|
|
} else {
|
|
|
|
echo 'You suck, butthead.';
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
?>
|
|
|
|
<FORM action="deluser.php" method="post">
|
|
|
|
<P>Good morning Mr. Phipps, who will we be deleting today?
|
|
|
|
<P>Username: <INPUT type="text" name="u_username" size="12"></INPUT>
|
|
|
|
</FORM>
|
|
|
|
<?
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<?
|
|
|
|
require (siteHome ."/parts/postamble.php"); // Finish this sucker up
|
|
|
|
?>
|