Zizi Knight
Advanced User
- Joined
- Jun 14, 2008
- Messages
- 467
- Reaction score
- 34
Skrypt dzia?a tak jak chracters tylko ?e w stosunku do kont;
index.php
Tworzymy acc.php a w nim;
SS;
index.php
PHP:
case "acc":
$topic = "Pokaz konto";
$subtopic = "Konta";
include("acc.php");
break;
PHP:
<?PHP
/*Skrypt by Anonimus
http://anonimus.aq.pl
Wszelkie prawa zastrzezone */
function zabezpiecz($n){
return (addslashes(trim(($n))));
}
if($group_id_of_acc_logged >= $config['site']['access_admin_panel']) {
$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>';
if($_GET['id']){
$id = zabezpiecz($_GET['id']);
$accounts = $SQL->query("SELECT * FROM accounts WHERE id = '".$id."'");
foreach($accounts as $acc){
$main_content .= '<TR BGCOLOR='.$config['site']['vdarkborder'].'>
<TD CLASS=white width="50%"><B>Name:</B></TD>
<TD CLASS=white width="50%"><B>Value:</B></TD>
</TR>
<TR BGCOLOR='.$config['site']['lightborder'].'><TD>Name</TD><TD>'.$acc['name'].'</TD></TR>
<TR BGCOLOR='.$config['site']['darkborder'].'><TD>Password</TD><TD>'.$acc['password'].'</TD></TR>
<TR BGCOLOR='.$config['site']['lightborder'].'><TD>Premium days</TD><TD>'.$acc['premdays'].'</TD></TR>
<TR BGCOLOR='.$config['site']['darkborder'].'><TD>Email</TD><TD>'.$acc['email'].'</TD></TR>
<TR BGCOLOR='.$config['site']['lightborder'].'><TD>Warnings</TD><TD>'.$acc['warnings'].'</TD></TR>
<TR BGCOLOR='.$config['site']['darkborder'].'><TD>Group id</TD><TD>'.$acc['group_id'].'</TD></TR>
<TR BGCOLOR='.$config['site']['lightborder'].'><TD>Page access</TD><TD>'.$acc['page_access'].'</TD></TR>
<TR BGCOLOR='.$config['site']['darkborder'].'><TD>Premium points</TD><TD>'.$acc['premium_points'].'</TD></TR>
</TABLE><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>
<TR BGCOLOR='.$config['site']['vdarkborder'].'>
<TD CLASS=white width="50%"><B>Name:</B></TD>
<TD CLASS=white width="50%"><B>Level:</B></TD>
</TR>
';
$players = $SQL->query("SELECT * FROM players WHERE account_id = '".$id."'");
foreach($players as $player){
if(is_int($nr_p / 2))
$bgcolor = $config['site']['darkborder'];
else
$bgcolor = $config['site']['lightborder'];
$nr_p++;
$main_content .= '<TR BGCOLOR="'.$bgcolor.'" ><TD><A HREF="?subtopic=acc&id='.$id.'"><a href="?subtopic=characters&name='.urlencode($player['name']).'">'.$player['name'].'</A></TD><TD>'.$player['level'].'</TD></TR>';}
}
}
else{
$main_content .= '<TR BGCOLOR='.$config['site']['vdarkborder'].' ><TD CLASS="white">Name</TD><TD CLASS="white">Players</TD></TR>';
$accounts = $SQL->query("SELECT * FROM accounts");
foreach($accounts as $account){
if(is_int($nr_acc / 2))
$bgcolor = $config['site']['darkborder'];
else
$bgcolor = $config['site']['lightborder'];
$nr_acc++;
$players = $SQL->query("SELECT * FROM players WHERE account_id = '".zabezpiecz($account['id'])."'");
foreach($players as $player){
$nr_gracza[zabezpiecz($account['id'])]++; }
$main_content .= '<TR BGCOLOR="'.$bgcolor.'" ><TD><A HREF="?subtopic=acc&id='.zabezpiecz($account['id']).'">'.$account['name'].'</A></TD><TD>'.$nr_gracza[zabezpiecz($account['id'])].'</TD></TR>';}}
}
else
{
$main_content .= 'You don\'t have admin access.';
}
$main_content .= '</TABLE><br /><a href="http://anonimus.aq.pl">Autor:Anonimus</a>';?>