Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
smradius
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
shail
smradius
Commits
10cf5cdb
Commit
10cf5cdb
authored
16 years ago
by
Robert Anderson
Browse files
Options
Downloads
Patches
Plain Diff
improved readability of code
parent
ab3b0039
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
webui/user-delete.php
+48
-17
48 additions, 17 deletions
webui/user-delete.php
with
48 additions
and
17 deletions
webui/user-delete.php
+
48
−
17
View file @
10cf5cdb
...
@@ -40,7 +40,9 @@ printHeader(array(
...
@@ -40,7 +40,9 @@ printHeader(array(
if
(
$_POST
[
'frmaction'
]
==
"delete"
)
{
if
(
$_POST
[
'frmaction'
]
==
"delete"
)
{
# Check a user was selected
# Check a user was selected
if
(
isset
(
$_POST
[
'user_id'
]))
{
if
(
isset
(
$_POST
[
'user_id'
]))
{
?>
?>
<p
class=
"pageheader"
>
Delete User
</p>
<p
class=
"pageheader"
>
Delete User
</p>
<form
action=
"user-delete.php"
method=
"post"
>
<form
action=
"user-delete.php"
method=
"post"
>
...
@@ -54,50 +56,79 @@ if ($_POST['frmaction'] == "delete") {
...
@@ -54,50 +56,79 @@ if ($_POST['frmaction'] == "delete") {
<input
type=
"submit"
name=
"confirm"
value=
"no"
/>
<input
type=
"submit"
name=
"confirm"
value=
"no"
/>
</div>
</div>
</form>
</form>
<?php
<?php
}
else
{
}
else
{
?>
?>
<div
class=
"warning"
>
No user selected
</div>
<div
class=
"warning"
>
No user selected
</div>
<?php
<?php
}
}
# SQL Updates
# SQL Updates
}
elseif
(
$_POST
[
'frmaction'
]
==
"delete2"
)
{
}
elseif
(
$_POST
[
'frmaction'
]
==
"delete2"
)
{
?>
?>
<p
class=
"pageheader"
>
User Delete Results
</p>
<p
class=
"pageheader"
>
User Delete Results
</p>
<?php
<?php
if
(
isset
(
$_POST
[
'user_id'
]))
{
if
(
isset
(
$_POST
[
'user_id'
]))
{
# Check to see if user's attributes are empty
# Check to see if user's attributes are empty
$temp
=
$_POST
[
'user_id'
];
$userID
=
$_POST
[
'user_id'
];
$sql
=
"SELECT * FROM ${DB_TABLE_PREFIX}user_attributes WHERE UserID =
$temp
"
;
$sql
=
"SELECT * FROM ${DB_TABLE_PREFIX}user_attributes WHERE UserID =
$userID
"
;
$check
=
$db
->
query
(
$sql
);
$res
=
$db
->
query
(
$sql
);
if
(
$check
->
num_rows
==
0
)
{
if
(
$_POST
[
'confirm'
]
==
"yes"
)
{
if
(
$_POST
[
'confirm'
]
==
"yes"
)
{
$res
=
$db
->
exec
(
"DELETE FROM ${DB_TABLE_PREFIX}users WHERE ID = "
.
$_POST
[
'user_id'
]);
$res
=
$db
->
exec
(
"DELETE FROM ${DB_TABLE_PREFIX}users WHERE ID = "
.
$_POST
[
'user_id'
]);
if
(
$res
!==
FALSE
)
{
if
(
$res
!==
FALSE
)
{
?>
<div
class=
"notice"
>
User with ID:
<?php
print_r
(
$_POST
[
'user_id'
]);
?>
deleted
</div>
<?php
}
else
{
?>
?>
<div
class=
"warning"
>
Error deleting user
</div>
<div
class=
"warning"
>
<?php
print_r
(
$db
->
errorInfo
())
?>
</div>
<div
class=
"notice"
>
User with ID:
<?php
print_r
(
$_POST
[
'user_id'
]);
?>
deleted
</div>
<?php
<?php
}
}
else
{
}
else
{
?>
?>
<div
class=
"warning"
>
Delete user aborted
</div>
<div
class=
"warning"
>
Error deleting user
</div>
<div
class=
"warning"
>
<?php
print_r
(
$db
->
errorInfo
())
?>
</div>
<?php
<?php
}
}
}
else
{
}
else
{
?>
?>
<div
class=
"warning"
>
Attribute list is not empty!
</div>
<div
class=
"warning"
>
Delete user aborted
</div>
<?php
<?php
}
}
}
else
{
}
else
{
?>
?>
<div
class=
"warning"
>
Attribute list is not empty!
</div>
<?php
}
}
else
{
?>
<div
class=
"warning"
>
Invocation error, no user ID selected
</div>
<div
class=
"warning"
>
Invocation error, no user ID selected
</div>
<?php
<?php
}
}
}
}
printFooter
();
printFooter
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment