mirror of
https://git.code.sf.net/p/quake/website
synced 2024-11-27 14:32:31 +00:00
Re-commit my "delete user" changes.
This commit is contained in:
parent
36080291df
commit
0343169cb1
1 changed files with 61 additions and 56 deletions
|
@ -1,56 +1,61 @@
|
||||||
<? // Preamble
|
<? // Preamble
|
||||||
$pageName = "Admin - Delete User";
|
$pageName = "Admin - Delete User";
|
||||||
$focused = "home"; // Dock icon name to gets a border
|
$focused = "home"; // Dock icon name to get a border
|
||||||
$need = 'auth';
|
$need = 'auth';
|
||||||
require("../parts/preamble.php"); // Load most of document
|
require '../parts/preamble.php'; // Load most of document
|
||||||
?>
|
?>
|
||||||
<?
|
<?
|
||||||
if ($u_username) {
|
if ($userInfo[u_admin] == 'Y' && $u_username) {
|
||||||
need('sql');
|
need ('sql');
|
||||||
|
|
||||||
$u_username = AddSlashes($u_username);
|
$u_username = AddSlashes ($u_username);
|
||||||
|
|
||||||
$conn = mysql_connect (sqlHost, sqlUser, sqlPass);
|
$conn = mysql_connect (sqlHost, sqlUser, sqlPass);
|
||||||
if ($conn) {
|
if ($conn) {
|
||||||
$query1 = "DELETE FROM members WHERE u_username = '$u_username'";
|
$query = "DELETE FROM members WHERE u_username = '$u_username'";
|
||||||
|
|
||||||
$result = mysql_db_query (sqlDB, $query1, $conn);
|
$result = mysql_db_query (sqlDB, $query, $conn);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$numRows = mysql_affected_rows ($conn);
|
$numRows = mysql_affected_rows ($conn);
|
||||||
if ($numRows) {
|
if ($numRows) {
|
||||||
echo '<P>User removed from members dbase successfully.';
|
echo '<P>User removed from members dbase successfully.';
|
||||||
} else {
|
} else {
|
||||||
echo '<P>There was an error in your input. The error was ' . mysql_error ($conn);
|
echo '<P>User was not found in members database.';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
echo '<P>There was an error in your input. The error was ' . mysql_error ($conn);
|
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'";
|
|
||||||
$result2 = mysql_db_query (sqlDB, $query2, $conn);
|
$query = "DELETE FROM devel_plans WHERE p_user = '$p_username'";
|
||||||
if ($result2) {
|
$result = mysql_db_query (sqlDB, $query, $conn);
|
||||||
$numRows2 = mysql_affected_rows ($conn);
|
if ($result) {
|
||||||
if ($numRows2) {
|
$numRows = mysql_affected_rows ($conn);
|
||||||
echo '<P>User removed from plan dbase successfully.';
|
if ($numRows) {
|
||||||
echo '<P>This webpage will self-destruct in 30 seconds.';
|
echo '<P>User removed from plan dbase successfully.';
|
||||||
} else {
|
echo '<P>This webpage will self-destruct in 30 seconds.';
|
||||||
echo '<P>There was an error in your input. The error was ' . mysql_error ($conn);
|
} else {
|
||||||
}
|
echo '<P>User was not found in plan database.';
|
||||||
} 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 {
|
mysql_close ($conn);
|
||||||
echo 'You suck, butthead.';
|
} else {
|
||||||
}
|
echo '<P>You suck, butthead.';
|
||||||
} else {
|
}
|
||||||
?>
|
} else {
|
||||||
<FORM action="deluser.php" method="post">
|
if ($userInfo[u_admin] == 'Y') {
|
||||||
<P>Good morning Mr. Phipps, who will we be deleting today?
|
?>
|
||||||
<P>Username: <INPUT type="text" name="u_username" size="12"></INPUT>
|
<FORM action="deluser.php" method="post">
|
||||||
</FORM>
|
<P>Good morning Mr. Phelps, who will we be eliminating today?
|
||||||
<?
|
<P>Username: <INPUT type="text" name="u_username" size="12"></INPUT>
|
||||||
}
|
</FORM>
|
||||||
?>
|
<?
|
||||||
<?
|
} else {
|
||||||
require (siteHome ."/parts/postamble.php"); // Finish this sucker up
|
echo 'You are not authorized to view this page. Now go away or I shall taunt you a second time!';
|
||||||
?>
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<?
|
||||||
|
require siteHome . '/parts/postamble.php'; // Finish this sucker up
|
||||||
|
?>
|
||||||
|
|
Loading…
Reference in a new issue