} $querycharacter = MYSQL_QUERY("SELECT SQL_CALC_FOUND_ROWS charname, levelland, levelsea, levelsum, guild, guildid, guildgrade, jobclass, gender, server, lastupdate FROM flobase_character_data AS d, flobase_character AS c WHERE d.characterid = c.characterid {$dbwhere} {$dborderby} LIMIT {$startpage}, 70"); list($foundrows) = MYSQL_FETCH_ARRAY(MYSQL_QUERY("SELECT FOUND_ROWS()")); $pageselect = $florensia->pageselect($foundrows, array("ranking"), array("order" => $_GET['order'], "class" => $_GET['class'], "server" => $_GET['server']), 70); for ($i = $pageselect['pagestart'] + 1; $character = MYSQL_FETCH_ARRAY($querycharacter); $i++) { if ($character['gender'] == "m") { $gender = "<img src='{$florensia->layer_rel}/gender_male.gif' border='0' alt='male' style='height:12px;'>"; } else { $gender = "<img src='{$florensia->layer_rel}/gender_female.gif' border='0' alt='female' style='height:12px;'>"; } if (strlen($character['guild'])) { if ($character['guildid']) { $guild = "<a href='" . $florensia->outlink(array('guilddetails', $character['guildid'], $character['server'], $character['guild'])) . "'>" . $florensia->escape($character['guild']) . "</a>"; } else { $guild = $florensia->escape($character['guild']); } if ($character['guildgrade']) { $guild = class_character::guildgrade($character['guildgrade']) . " " . $guild; } } else { $guild = ""; } $characterlist .= $florensia->adsense(20); $characterlist .= "\n\t\t<div class='shortinfo_" . $florensia->change() . "'>\n\t\t\t<table style='width:100%'><tr>\n\t\t\t\t<td style='width:35px; text-align:right;'>{$i}.</td>\n\t\t\t\t<td style='width:50px; text-align:right;'>" . intval($character['levelsum']) . "</td>\n\t\t\t\t<td style='width:50px; text-align:right;'>" . intval($character['levelland']) . " <img src='{$florensia->layer_rel}/land.gif' style='height:11px;'></td>\n\t\t\t\t<td style='width:50px; padding-right:10px; text-align:right;'>" . intval($character['levelsea']) . " <img src='{$florensia->layer_rel}/sealv.gif' style='height:11px;'></td>\n\t\t\t\t<td>{$gender} <a href='" . $florensia->outlink(array("characterdetails", $character['charname'])) . "'>" . $florensia->escape($character['charname']) . "</a></td>\n\t\t\t\t<td style='width:150px'>" . $florensia->escape($character['jobclass']) . "</td>\n\t\t\t\t<td style='width:140px'>{$guild}</td>\n\t\t\t\t<td style='width:90px'><a href='" . $florensia->outlink(array('statistics', $character['server'])) . "'>" . $florensia->escape($character['server']) . "</a></td>\n\t\t\t\t<td style='text-align:right; padding-right:3px; width:100px'>" . $flolang->sprintf($flolang->character_lastupdate, timetamp2string(date("U") - $character['lastupdate'], "m")) . "</td>\n\t\t\t</tr></table>\n\t\t</div>\n\t"; } foreach ($florensia->validserver as $server) { $validserverlinks[] = "<a href='" . $florensia->outlink(array('statistics', $server)) . "'>{$server}</a>"; } $content = "\n<div class='subtitle'><a href='{$florensia->root}/statistics'>{$flolang->statistic_sitetitle}</a> > {$flolang->statistic_ranking_sitetitle}</div>\n<div class='subtitle small' style='font-weight:normal; margin-bottom:15px;'>" . $flolang->sprintf($flolang->statistic_notice_seealso, join(", ", $validserverlinks)) . "</div>\n\n<div class='bordered' style='font-weight:bold; margin-bottom:15px;'>\n\t" . $florensia->quick_select("ranking", array(), array($flolang->statistic_ranking_quickselect_orderby => $orderbyselect, $flolang->statistic_ranking_quickselect_filterjobclass => $classfilter, $flolang->statistic_ranking_quickselect_filterserver => $serverfilter)) . "\n</div>\n<div style='margin-bottom:8px;'>" . $pageselect['selectbar'] . "</div>\n<div class='subtitle' style='margin-bottom:7px;'>\n\t<table style='width:100%'><tr>\n\t\t<td style='width:35px; text-align:right;'>#</td>\n\t\t<td style='width:50px; text-align:right;'><img src='{$florensia->layer_rel}/land.gif' style='height:13px;'>+<img src='{$florensia->layer_rel}/sealv.gif' style='height:13px;'></td>\n\t\t<td style='width:50px; text-align:right;'><img src='{$florensia->layer_rel}/land.gif' style='height:13px;'></td>\n\t\t<td style='width:50px; padding-right:10px; text-align:right;'><img src='{$florensia->layer_rel}/sealv.gif' style='height:13px;'></td>\n\t\t<td>{$flolang->character_title_charname}</td>\n\t\t<td style='width:150px'>{$flolang->character_title_jobclass}</td>\n\t\t<td style='width:140px'>{$flolang->character_title_guild}</td>\n\t\t<td style='width:90px'>{$flolang->character_title_server}</td>\n\t\t<td style='text-align:right; padding-right:3px; width:100px'>{$flolang->character_title_lastupdate}</td>\n\t</tr></table>\n</div>\n<div class='small'>{$characterlist}</div>\n<div style='margin-top:10px;'>" . $pageselect['selectbar'] . "</div>\n"; $florensia->sitetitle("Ranking"); $florensia->output_page($content);
$gender = "<img src='{$florensia->layer_rel}/gender_male.gif' border='0' alt='male' style='height:12px;'>"; } else { $gender = "<img src='{$florensia->layer_rel}/gender_female.gif' border='0' alt='female' style='height:12px;'>"; } $server = "<a href='{$florensia->root}/statistics/" . $florensia->escape($character->data['server']) . "'>" . $florensia->escape($character->data['server']) . "</a>"; if ($character->data['guildid']) { $guild = "<a href='" . $florensia->outlink(array("guilddetails", $character->data['guildid'], $character->data['server'], $character->data['guild'])) . "'>" . $florensia->escape($character->data['guild']) . "</a>"; } elseif ($character->data['guild']) { $guild = $florensia->escape($character->data['guild']); } else { unset($guild); } if ($guild && $character->data['guildgrade']) { $guild .= " " . class_character::guildgrade($character->data['guildgrade']); } $characterlist .= "\n\t <div class='small shortinfo_" . $florensia->change() . "'>\n <table style='width:100%'><tr>\n <td style='width:50px; text-align:right;'>" . intval($character->data['levelland']) . " <img src='{$florensia->layer_rel}/land.gif' style='height:11px;' alt='Land'></td>\n <td style='width:50px; padding-right:10px; text-align:right;'>" . intval($character->data['levelsea']) . " <img src='{$florensia->layer_rel}/sealv.gif' style='height:11px;' alt='Sea'></td>\n <td style='width:20px;'>{$guildgrade}</td>\n <td>{$gender} " . $character->get_link() . "</td>\n <td style='width:160px'>" . $florensia->escape($character->data['jobclass']) . "</td>\n <td style='width:150px'>{$guild}</td>\n <td style='width:90px'>{$server}</td>\n <td style='text-align:right; padding-right:3px; width:130px'>" . $flolang->sprintf($flolang->character_lastupdate, timetamp2string(date("U") - $character->data['lastupdate'], "m")) . "</td>\n </tr></table>\n </div>"; } if (!strlen($characterlist)) { $characterlist = "<div class='small shortinfo_" . $florensia->change() . "' style='text-align:center;'>{$flolang->character_userprofile_overview_verifiedlist_empty}</div>"; } $qr = MYSQL_QUERY("SELECT charname, timestamp, accepted, moderated, comment FROM flobase_character_verification as v, flobase_character as c WHERE userid='{$userid}' AND v.characterid=c.characterid ORDER BY timestamp DESC"); unset($requestlist); while ($r = MYSQL_FETCH_ARRAY($qr)) { list($moduserid, $modtimestamp) = explode("-", $r['moderated']); unset($status, $moderated, $comment); switch (intval($r['accepted'])) { case -1: $status = $flolang->character_userprofile_overview_requestlist_pending; break; case 0: $c = "-";
require_once "./init.php"; if (!defined('is_florensia')) { die('Hacking attempt'); } if (!$flouser->get_permission("access_admincp") or !$flouser->get_permission("character", "moderate")) { $florensia->output_page($flouser->noaccess()); } if (intval($_GET['s'])) { $verify = MYSQL_FETCH_ARRAY(MYSQL_QUERY("SELECT v.id, userid, charname, levelland, levelsea, guild, forceupdate, updatepriority, lastupdate FROM flobase_character_verification as v, flobase_character as c, flobase_character_data as d WHERE v.id='" . intval($_GET['s']) . "' AND v.characterid=c.characterid AND v.characterid=d.characterid")); if (!$verify) { $florensia->notice("No such request.", "warning"); $florensia->output_page("<div class='bordered small'><a href='{$florensia->root}/admincharacterverification.php'>Back to requestlist.</a></div>"); } $flolang->load("character"); $requestuser = new class_user($verify['userid']); echo "\n\t\t<html>\n\t\t\t<head>\n\t\t\t\t<title>Characterverification - Screenshot</title>\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t\t<form action='{$florensia->root}/admincharacterverification.php' method='POST'>\n\t\t\t\t\t<img src='{$florensia->root}/pictures/characterverification/{$verify['id']}' style='border:0px;'><br />\n\t\t\t\t\t<b>Verificationcode: {$requestuser->user['flobase_characterkey']}</b><br />\n\t\t\t\t\t<b>Charactername: <a href='" . $florensia->outlink(array("characterdetails", $verify['charname'])) . "' target='_blank'>" . $florensia->escape($verify['charname']) . "</A></b><br />\n\t\t\t\t\t<b>Levels: {$verify['levelland']}/{$verify['levelsea']}</b><br />\n <b>Guild: " . $florensia->escape($verify['guild']) . "</b><br />\n <b>Lastupdate: " . $flolang->sprintf($flolang->character_lastupdate, timetamp2string(date("U") - $verify['lastupdate'])) . " (Priority: {$verify['updatepriority']}, Force: {$verify['forceupdate']})</b><br />\n\t\t\t\t\t<input type='hidden' name='requestid' value='{$verify['id']}'>\n\t\t\t\t\t<select name='reason'>\n\t\t\t\t\t\t<option value='novisiblekey'>{$flolang->character_api_verify_moderate_error_novisiblekey}</option>\n\t\t\t\t\t\t<option value='incorrectkey'>{$flolang->character_api_verify_moderate_error_incorrectkey}</option>\n\t\t\t\t\t\t<option value='wrongcharacter'>{$flolang->character_api_verify_moderate_error_wrongcharacter}</option>\n\t\t\t\t\t\t<option value='reworkedimage'>{$flolang->character_api_verify_moderate_error_reworkedimage}</option>\n\t\t\t\t\t</select> <input type='submit' name='moderate' value='---- Deny ----'> --- <input type='submit' name='moderate' value='Accept'>\n\t\t\t\t</form>\n\t\t\t</body>\n\t\t</html>\n\t"; exit; } elseif ($_POST['moderate'] && intval($_POST['requestid'])) { $verify = MYSQL_FETCH_ARRAY(MYSQL_QUERY("SELECT id, userid, v.characterid, charname FROM flobase_character_verification as v, flobase_character as c WHERE id='" . intval($_POST['requestid']) . "' AND v.characterid=c.characterid")); if (!$verify) { $florensia->notice("No such request.", "warning"); $florensia->output_page("<div class='bordered small'><a href='{$florensia->root}/admincharacterverification.php'>Back to requestlist.</a></div>"); } if ($_POST['moderate'] == "Accept") { $requestuser = new class_user($verify['userid']); if (MYSQL_QUERY("UPDATE flobase_character_data SET ownerid='{$requestuser->userid}' WHERE characterid='{$verify['characterid']}'")) { MYSQL_QUERY("UPDATE flobase_character_verification SET accepted='1', moderated='{$flouser->userid}-" . date("U") . "' WHERE id='{$verify['id']}'"); $florensia->notice("Request was successfully accepted", "successful"); $flolog->add("character:verification:accept", "{user:{$flouser->userid}} accepted {characterverification:{$verify['id']}} of {user:{$verify['userid']}} for {characterid:{$verify['characterid']}}"); } else { $florensia->notice("An error occured while accepting the request.", "successful");
$searched = "<div class='borderd small' style='margin-top:15px;'>\n {$notfoundnotice}\n {$cachedlist}\n </div>"; } else { $recentupdates = array(); $tmptime = date("U"); $queryrecent = MYSQL_QUERY("(SELECT c.charname, l.level, l.prelevel, l.timestamp, l.pretimestamp, d.guild, d.guildid, 'land' as type FROM flobase_character_log_level_land as l, flobase_character as c, flobase_character_data as d WHERE l.characterid=c.characterid AND l.characterid=d.characterid AND l.timestamp>'" . bcsub(date("U"), 60 * 60 * 24) . "' AND l.pretimestamp!='0' AND (d.priv_log_level='a' OR d.priv_log_level='') ORDER BY l.timestamp DESC LIMIT 20)\n UNION\n (SELECT c.charname, l.level, l.prelevel, l.timestamp, l.pretimestamp, d.guild, d.guildid, 'sea' as type FROM flobase_character_log_level_sea as l, flobase_character as c, flobase_character_data as d WHERE l.characterid=c.characterid AND l.characterid=d.characterid AND l.timestamp>'" . bcsub(date("U"), 60 * 60 * 24) . "' AND l.pretimestamp!='0' AND (d.priv_log_level='a' OR d.priv_log_level='') ORDER BY l.timestamp DESC LIMIT 20)"); while ($recent = MYSQL_FETCH_ARRAY($queryrecent)) { if ($recent['type'] == "land") { $levelsymbol = "<img src='{$florensia->layer_rel}/land.gif' alt='Land' style='height:11px;'>"; } else { $levelsymbol = "<img src='{$florensia->layer_rel}/sealv.gif' alt='Sea' style='height:11px;'>"; } $charname = "<a href='" . $florensia->outlink(array("characterdetails", $recent['charname'])) . "'>" . $florensia->escape($recent['charname']) . "</a>"; if ($recent['guildid']) { $charname .= " (<a href='" . $florensia->outlink(array("guilddetails", $recent['guildid'], $recent['guild'])) . "'>" . $florensia->escape($recent['guild']) . "</a>)"; } elseif ($recent['guild']) { $charname .= " (" . $florensia->escape($recent['guild']) . ")"; } $recentupdates[$recent['timestamp']][] = $flolang->sprintf($flolang->guild_recentupdates_levelup, $charname, " +" . bcsub($recent['level'], $recent['prelevel']) . " ({$recent['level']}) {$levelsymbol} " . $flolang->sprintf($flolang->guild_recentupdates_levelup_timespan, timetamp2string(bcsub($recent['timestamp'], $recent['pretimestamp']), "d"))); } krsort($recentupdates); foreach ($recentupdates as $time => $values) { $recentupdateslist .= "<tr><td style='width:110px;'>" . $flolang->sprintf($flolang->character_lastupdate, timetamp2string(date("U") - $time)) . "</td><td>" . join("<br />", $values) . "</td></tr>"; } $recentupdates = "\n <div class='small subtitle' style='margin-top:15px;'>\n {$flolang->character_overview_recentupdates}\n <table style='width:100%; font-weight:normal;'>\n {$recentupdateslist}\n </table>\n </div>"; } $content = "\n <div class='subtitle' style='margin-bottom:10px;'><a href='{$florensia->root}/characterdetails'>{$flolang->character_sitetitle}</a></div>\n <div class='subtitle' style='text-align:center;'>{$flolang->character_jumpto} " . $florensia->quicksearch() . "</div>\n {$searched}\n {$recentupdates}\n "; //$florensia->notice("<div class='warning' style='margin-bottom:10px;'>{$flolang->signature_api_failnotice}</div>"); $florensia->sitetitle("Characterdetails"); $florensia->sitetitle("Search"); $florensia->output_page($content); }
$searched = "<div class='borderd small' style='margin-top:15px;'>\n <div class='warning'>" . $flolang->sprintf($flolang->guild_error_notfound, "<a href='" . $florensia->outlink(array('charapi')) . "' target='_blank'>{$flolang->character_api_form_guild_forceupdate_url_readwhy}</a>") . "</div>\n {$cachedlist}\n </div>"; $pagetitle = "<div class='subtitle' style='margin-bottom:10px;'><a href='{$florensia->root}/guilddetails'>{$flolang->guild_sitetitle}</a></div>"; $florensia->sitetitle("Search"); } else { $tmptime = date("U"); $queryrecent = MYSQL_QUERY("SELECT c.charname, l.action, l.guildid, g.guildname, g.server, l.timestamp, g.memberamount, l.oldguildgrade, l.newguildgrade FROM flobase_character_log_guild as l, flobase_guild as g, flobase_character as c , flobase_character_data as d WHERE timestamp>" . bcsub(date("U"), 60 * 60 * 48) . " AND l.guildid=g.guildid AND c.characterid=l.characterid AND d.characterid=l.characterid AND (g.priv_activity_guild='a' OR g.priv_activity_guild='') AND (d.priv_log_guild='' OR d.priv_log_guild='a') AND (l.action='l' OR l.action='a' OR l.action='j') ORDER BY timestamp DESC LIMIT 30"); while ($recent = MYSQL_FETCH_ARRAY($queryrecent)) { if ($recent['memberamount']) { $guildlink = "<a href='" . $florensia->outlink(array("guilddetails", $recent['guildid'], $recent['server'], $recent['guildname'])) . "'>" . $florensia->escape($recent['guildname']) . "</a>"; } else { $guildlink = "<a href='" . $florensia->outlink(array("guilddetails", $recent['guildid'], $recent['server'], $recent['guildname'])) . "' class='archiv'>" . $florensia->escape($recent['guildname']) . "</a>"; } $charname = "<a href='" . $florensia->outlink(array("characterdetails", $recent['charname'])) . "'>" . $florensia->escape($recent['charname']) . "</a>"; $serverlink = "<a href='" . $florensia->outlink(array("statistics", $recent['server'])) . "'>" . $florensia->escape($recent['server']) . "</a>"; if ($tmptime > $recent['timestamp']) { $timestamp = $flolang->sprintf($flolang->character_lastupdate, timetamp2string(date("U") - $recent['timestamp'])); $tmptime = $recent['timestamp']; } else { $timestamp = ""; } $oldguildgrade = $recent['oldguildgrade'] ? class_character::guildgrade($recent['oldguildgrade']) : ""; $newguildgrade = $recent['newguildgrade'] ? class_character::guildgrade($recent['newguildgrade']) : ""; switch ($recent['action']) { case "j": $recentupdates .= "<tr><td style='width:110px;'>{$timestamp}</td><td>" . $flolang->sprintf($flolang->character_recentupdates_joinguild, $charname, $guildlink . " " . $newguildgrade) . " ({$serverlink})</td></tr>"; break; case "l": $recentupdates .= "<tr><td style='width:110px;'>{$timestamp}</td><td>" . $flolang->sprintf($flolang->character_recentupdates_leftguild, $charname, $guildlink . " " . $oldguildgrade) . " ({$serverlink})</td></tr>"; break; case "a": $recentupdates .= "<tr><td style='width:110px;'>{$timestamp}</td><td>" . $flolang->sprintf($flolang->character_recentupdates_addguild, $charname, $guildlink . " " . $newguildgrade) . " ({$serverlink})</td></tr>";