Forgot Password / Register
Site Statistics
Total Members: 520
Total Tutorials: 242
Newsest User: 8884244477
Todays Unique Hits: 80
0 Users 1 Guests Online

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] == && $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.
cyruswu
Author:
Views:
3517
Rating:
Posted on Friday 8th August 2008 at 01:32 AM
UrbanTwitch
UrbanTwitch
Parse error: syntax error, unexpected ')', expecting ']' in /home/jsfdan/public_html/admincp.php on line 22
Posted on Friday 1st August 2008 at 06:34 PM
ShadowMage
ShadowMage
Quite frankly, I think MOD-Dans was on here before this.
Posted on Friday 1st August 2008 at 04:27 PM
UrbanTwitch
UrbanTwitch
Right here: http://rmb-scripting.com/tutorials.php?tutorial&tid=60

Mod-Dans. Compare.
Posted on Friday 1st August 2008 at 03:42 PM
DanielXP
DanielXP
What looks a lot like his admin panel?
Posted on Friday 1st August 2008 at 03:11 PM
UrbanTwitch
UrbanTwitch
DanielXP: I didn't call you an idiot.

Also it looks a lot like cyruswu's admin panel.
Posted on Friday 1st August 2008 at 12:19 PM
jambomb
jambomb
Rofl exactly.
Posted on Friday 1st August 2008 at 10:51 AM
DanielXP
DanielXP
UrbanTwit: My tutorial "User System" you need to edit it, Putting in your database info. Am I a idiot?
Posted on Friday 1st August 2008 at 10:21 AM
jambomb
jambomb
how is he a idiot ?? bit harsh
Posted on Friday 18th July 2008 at 01:01 AM
UrbanTwitch
UrbanTwitch
Why would you post a tutorial that we need to edit... -_-

idiot
Posted on Saturday 12th April 2008 at 01:57 PM
cyruswu
cyruswu
It's completely ripped from my usersystem and a little edited

I designed it a little differently. Checking a row like news to say YES and it will view the news system page.

That's why it's like that.