Admin CP
Hey Everybody!
Here i go again.. I was going to sell this but i decided not to.
PHP Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?
session_start();
include("config.php");
if($logged[username] && $logged[userlevel] ==6) // allows level 5 to view this page
{
if($_GET[user])
{
if (!$_POST[update]) // if the submit button is pressed
{
$getuser2 = mysql_query("SELECT * from members where username = '$_GET[user]'");
$user = mysql_fetch_array($getuser2);
//gets the user info
echo("
Here you can now edit the user's infomation and etc.
<hr>
<form method='POST'>
Username: $user[username]
<hr>
");//End the echo
if($logged[userlevel] == 6 && $logged[id]){
echo ("Password:
sha1(md5(md5(sha1(md5(sha1(sha1(md5($user[password))))))))]
<hr>
");//echo the password holy shit. lol.
}else{//if they aren't an admin then echo nothing below
echo('');
//echo nothing
} //End else if
echo ("
<br>Email:<input name='email' value='$user[email]'>
<hr>
<br>MSN:<input name='msn' value='$user[msn]'>
<hr>
<br>AIM:<input name='aim' value='$user[aim]'>
<hr>
<br>Location:<input name='location' value='$user[location]'>
<hr>
Current Level: $user[level]
User Level:
<select size='1' name='userlevel'>
<option value=\"5\">Admin</option>
<option value=\"4\">Staff</option>
<option value=\"3\">VIP Gold</option>
<option value=\"2\">VIP Silver</option>
<option value=\"1\">Members</option>
</select>
<hr>
News Reporter:
<select size='1' name='news'>
<option value=\"NO\">No</option>
<option value=\"YES\">Yes</option>
</select>
<hr>
<br>
Support Staff:
<select size='1' name='support'>
<option value=\"NO\">No</option>
<option value=\"YES\">Yes</option>
</select>
<hr>
<br>
Modertor:
<select size='1' name='mod'>
<option value=\"NO\">No</option>
<option value=\"YES\">Yes</option>
</select>
<hr>
<input type='submit' name='update' value='Update'></td>
</form>
");// ends the echo and shows the content on top
}
else
{
$email = htmlspecialchars($_POST[email]);
$msn = htmlspecialchars($_POST[msn]);
$aim = htmlspecialchars($_POST[aim]);
$location = htmlspecialchars($_POST[location]);
$news = htmlspecialchars($_POST[news]);
$support = htmlspecialchars($_POST[support]);
$mod = htmlspecialchars($_POST[mod]);
$level = htmlspecialchars($_POST[userlevel]);
echo ("$_GET[user] has been updated."); // display's message
$update = mysql_query("Update users set msn = '$msn',
email = '$email', aim = '$aim', location = '$location', news = '$news', support = '$support', level = '$level', mod = '$mod' where username = '$_GET[user]'"); // updates the database
}
}
else
{
$getusers = mysql_query("Select * from members order by username asc"); // gets the users
while($users = mysql_fetch_array($getusers))
{
echo("<a href=\"admincp.php?user=$users[username]\">$users[username]</a>"); // display's all users
}
}
}
else // if your not admin
{
echo("Sorry, but your not allowed to view this page."); // display's message if your not admin or not logged in
}
?>
.
I put ramdom things so you really have to remove it or use it and whatever, lol.
Need help our nice staff will help and users.