"Normal","E"=>"Editor","I"=>"Image artist","i"=>"Island checker","J"=>"Artist & Island checker","D"=>"Dungeon checker","d"=>"Island & Dungeon checker","P"=>"Newspaper editor","p"=>"Newspaper editor & island checker","M"=>"PH Moderator","a"=>"Semi-admin","U"=>"Dungeon checker & Artist");
include "objects_util.php"; // Utilities to handle objects / inventory
include "misc_util.php"; // Misc utilities
include "db_conn.php";
include "titles.php";
header("Expires: now");
$playerid=0;
if($HTTP_COOKIE_VARS["RPG"] != "")
{
$p=explode("/",$HTTP_COOKIE_VARS["RPG"]);
$id=$p[0]+0;
$username=urldecode($p[1]);
$password=urldecode($p[2]);
//$r=$db->Execute("SELECT * FROM PLAYER WHERE USERNAME='$username' AND PASSWORD = '$password' AND AUTHORIZED='Y'");
$playervals=read_db_entry($db,"SELECT * FROM PLAYER WHERE ID = $id");
// Match ?
//echo "-".strtoupper($playervals["USERNAME"])."- -".strtoupper($username)."- -".strtoupper($playervals["PASSWORD"])."- -".strtoupper($password)."-";
if(count($playervals) > 0 && strtoupper($playervals["USERNAME"]) == strtoupper($username) && strtoupper($playervals["PASSWORD"]) == strtoupper($password))
$playerid=$playervals["ID"];
}
echo "\n";
echo "\n";
echo "Player info\n";
echo "\n";
echo "\n";
echo "\n";
$uservals=read_db_entry($db,"SELECT * FROM PLAYER WHERE ID = ".($_GET["ID"]+0)." AND AUTHORIZED = 'Y'");
if($playerid != 0 && $playervals["HELPER"] == "Y" && $_GET["CMD"] == "BAN")
{
if($uservals["HELPER"] == "Y" && $playervals["ROLE"] != "M" && $playervals["ROLE"] != "A")
echo "Cannot chat ban another PH \n";
else
{
$dt=strftime("%Y-%m-%d",time()+(2*24*3600));
$db->Execute("UPDATE PLAYER SET CHATBAN = '$dt' WHERE ID = ".($_GET["ID"]+0)." AND HELPER = 'N'");
send_message($_GET["ID"]+0,"Chat banned","Due to violating either profanity, racism, or spamming rules, you have been chat banned for 2 days.",false,true,0,0);
}
}
if($playervals["HELPER"] == "Y" && $_GET["CMD"] == "RECALL")
{
$db->Execute("UPDATE PLAYER SET LOCATION=12,MONSTERCOMBAT=0,MONSTERHP=0,GUIBLOCKED='N' WHERE ID = ".($_GET["ID"]+0));
$db->Execute("DELETE FROM PLAYER_COMBAT WHERE USERID = ".($_GET["ID"]+0));
echo "
\n";
else if($uservals["ROLE"] != "N" && isset($roles[$uservals["ROLE"]]))
echo "
".$roles[$uservals["ROLE"]]."
\n";
else if($uservals["HELPER"] == 'Y')
echo "
Player helper
\n";
else
echo "
Player
\n";
// List of medals
$hasmedals=false;
$sql="SELECT PLAYER_MEDALS.MEDALID, MEDALS.NAME, TABLE_ACTIONS.NB,
MEDALS.MINNB,ACTION_TYPES.NAME
FROM PLAYER_MEDALS,MEDALS,TABLE_ACTIONS, ACTION_TYPES
WHERE PLAYER_MEDALS.USERID = ".($_GET["ID"]+0)."
AND TABLE_ACTIONS.USERID = ".($_GET["ID"]+0)."
AND TABLE_ACTIONS.ACTIONID = MEDALS.ACTIONID
AND PLAYER_MEDALS.MEDALID = MEDALS.ID
AND ACTION_TYPES.ID = MEDALS.ACTIONID
ORDER BY PLAYER_MEDALS.MEDALID";
$r=$db->Execute($sql);
if(!$r->EOF) while(!$r->EOF)
{
if($hasmedals == false)
{
echo "
\n";
$r=$db->Execute("SELECT COUNT(QUESTID) FROM AVAILABLE_QUESTS WHERE NBFINISHED > 10 AND UNIX_TIMESTAMP(FINISHEDON) > UNIX_TIMESTAMP(CURRENT_TIMESTAMP)-3600*24*60");
$nbtot=$r->fields[0]+0;
$r->Close();
$r=$db->Execute("SELECT COUNT(USERID) FROM FINISHEDQUESTS,AVAILABLE_QUESTS WHERE AVAILABLE_QUESTS.QUESTID=FINISHEDQUESTS.QUESTID AND NBFINISHED > 10 AND USERID = ".($_GET["ID"]+0));
echo "
\n";
$class=array("F"=>"Fire Mage","I"=>"Ice Mage","E"=>"Earth Mage","A"=>"Air Mage","V"=>"Vampire Mage","B"=>"Vandale Warrior","C"=>"Cavaliar Warrior","M"=>"Marauder Warrior","R"=>"Rogue Warrior",""=>"Adventurer");
$r=$db->Execute("SELECT SCHOOL FROM PLAYER WHERE PLAYER.ID=".($_GET['ID']+0)." ");
if(!$r->EOF)
echo "
Class:
".$class[$r->fields[0]]."
\n";
$r->Close();
$r=$db->Execute("SELECT STARS FROM PLAYER_DONGEON WHERE USERID = ".($_GET["ID"]+0));
if(!$r->EOF)
echo "
Dungeon stars:
fields[0].".gif>
\n";
$r->Close();
$r=$db->Execute("SELECT COUNT(ID) FROM PLAYER WHERE ARENAPOINTS > ".$uservals["ARENAPOINTS"]);
$rank=$r->fields[0]+1;
$r->Close;
echo "
Arena rank:
#$rank (".$uservals["ARENAPOINTS"]." pts)
\n";
$r=$db->Execute("SELECT LOCATIONS.NAME FROM LOCATIONS,ISLAND_STATUS WHERE ISLAND_STATUS.STATUS='C' AND ISLAND_STATUS.LOCATION=LOCATIONS.ID AND ISLAND_STATUS.USERID=".($_GET["ID"]+0));
if(!$r->EOF)
echo "
Island manager:
".remove_tags($r->fields[0])."
\n";
$r->Close();
$r=$db->Execute("SELECT NAME FROM CLANS,CLAN_MEMBERS WHERE CLAN_MEMBERS.USERID = ".($_GET["ID"]+0)." AND ROLE >= 0 AND CLAN_MEMBERS.CLANID = CLANS.CLANID LIMIT 0,1");
if(!$r->EOF)
echo "
Clan member:
".remove_tags($r->fields[0])."
\n";
$r->Close();
$r=$db->Execute("SELECT NAME FROM PLAYER_SHOP WHERE SHOPID = ".($_GET["ID"]+0));
if(!$r->EOF)
echo "
Market shop:
".remove_tags($r->fields[0])."
\n";
$r->Close();
/*$sql="SELECT PLAYER_MEDALS.MEDALID, MEDALS.NAME FROM PLAYER_MEDALS,MEDALS
WHERE PLAYER_MEDALS.USERID = ".$_GET["ID"]."
AND PLAYER_MEDALS.MEDALID = MEDALS.ID ORDER BY PLAYER_MEDALS.MEDALID";
$r=$db->Execute($sql);
if(!$r->EOF)
{
echo "