foreach (explode(" ", $_GET['search']) as $keyword) { $searchstring[] = "name_{$stringtable->language} LIKE '%" . get_searchstring($keyword, 0) . "%'"; } #ignore cashshoptables $querystring = "SELECT itemid FROM server_item_idtable WHERE tableid!='cloakitem' AND tableid!='hatitem' AND tableid!='upgradehelpitem' AND tableid!='sealhelpbreakitem' AND " . join(" AND ", $searchstring) . " ORDER BY name_{$stringtable->language}"; $formlink = $florensia->outlink(array("npcdetails", $_GET['npcid'], $stringtable->get_string($_GET['npcid'])), array(), array("anchor" => "droplist")); $dropentryaddtolist = "\n\t\t\t<input type='hidden' value='" . $florensia->escape($_GET['npcid']) . "' name='npcid'>\n\t\t\t<input type='submit' value='{$flolang->droplist_search_item}'>\n\t\t"; } $querystringlist = MYSQL_QUERY($querystring); for ($i = 1; $entrylist = MYSQL_FETCH_ARRAY($querystringlist); $i++) { if ($_GET['itemid']) { list($amount) = MYSQL_FETCH_ARRAY(MYSQL_QUERY("SELECT COUNT(d.dropid) FROM flobase_droplist as d, flobase_droplist_ratings as r WHERE d.dropid=r.dropid AND d.npcid='" . $entrylist[$florensia->get_columnname("npcid", "npc")] . "' AND d.itemid='" . mysql_real_escape_string($_GET['itemid']) . "' AND r.userid='{$flouser->userid}'")); if ($amount) { continue; } $npc = new floclass_npc($entrylist[$florensia->get_columnname("npcid", "npc")]); $entryshortinfo = $npc->shortinfo(); $checkbox = "droplist_thumpsup_" . $florensia->escape($_GET['itemid']) . "_" . $entrylist[$florensia->get_columnname("npcid", "npc")] . "_x"; } else { list($amount) = MYSQL_FETCH_ARRAY(MYSQL_QUERY("SELECT COUNT(d.dropid) FROM flobase_droplist as d, flobase_droplist_ratings as r WHERE d.dropid=r.dropid AND d.npcid='" . mysql_real_escape_string($_GET['npcid']) . "' AND d.itemid='" . $entrylist['itemid'] . "' AND r.userid='{$flouser->userid}'")); if ($amount) { continue; } $item = new floclass_item($entrylist['itemid']); $entryshortinfo = $item->shortinfo(); $checkbox = "droplist_thumpsup_" . $entrylist['itemid'] . "_" . $florensia->escape($_GET['npcid']) . "_x"; } $content .= $florensia->adsense(10); $colorchange = $florensia->change(); $content .= "\n\t\t\t\t\t<div style='margin-bottom:5px;'>\n\t\t\t\t\t\t<table style='width:100%' class='small'>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td class='shortinfo_{$colorchange}' style='text-align:center; vertical-align:middle; width:50px;'>\n\t\t\t\t\t\t\t\t\t<input type='checkbox' value='1' name='{$checkbox}'>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td style='width:10px;'></td>\n\t\t\t\t\t\t\t\t<td class='shortinfo_{$colorchange}' style='vertical-align:top;'>\n\t\t\t\t\t\t\t\t\t{$entryshortinfo}\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</div>\n\t\t\t"; if ($i > 30) {
while ($notes = MYSQL_FETCH_ARRAY($querynotes)) { $noteslistcontent .= $classusernote->get_entry($notes['id']); } $noteslistcontent = "\n <a name='usernotes'></a>\n <div name='usernotes' class='small'>\n <div style='margin-top:10px;'>" . $pageselect['selectbar'] . "</div>\n {$noteslistcontent}\n <div style='margin-top:10px;'>" . $pageselect['selectbar'] . "</div>\n </div>\n "; } if ($userid == $flouser->userid or $flouser->get_permission("watch_log")) { $querystring = "SELECT class, classid FROM flobase_addition WHERE entrystatus LIKE '%,{$userid},%'"; $flagsquery = MYSQL_QUERY($querystring); $amountflags = MYSQL_NUM_ROWS($flagsquery); $tabbar['flags']['desc'] = $flolang->sprintf($flolang->contributed_tabbar_desc_flags, $amountflags); $pageselect = $florensia->pageselect($amountflags, array("contributed", $userid, $username), array('anchor' => 'flags'), 20); $flagsquery = MYSQL_QUERY($querystring . " ORDER BY class LIMIT " . $pageselect['pagestart'] . ",20"); while ($flags = MYSQL_FETCH_ARRAY($flagsquery)) { switch ($flags['class']) { case "npc": $npc = new floclass_npc($flags['classid']); $flagscontent .= "<div class='shortinfo_" . $florensia->change() . "'>" . $npc->shortinfo() . "</div>"; break; case "item": $item = new floclass_item($flags['classid']); $flagscontent .= "<div class='shortinfo_" . $florensia->change() . "'>" . $item->shortinfo() . "</div>"; break; case "quest": $flagscontent .= "<div class='shortinfo_" . $florensia->change() . "'>" . $classquest->get_shortinfo($flags['classid']) . "</div>"; break; } } $flagscontent = "\n <a name='flags'></a>\n <div name='flags'>\n <div style='margin-top:10px;'>" . $pageselect['selectbar'] . "</div>\n {$flagscontent}\n <div style='margin-top:10px;'>" . $pageselect['selectbar'] . "</div>\n </div>\n "; } $tabbar = $florensia->tabbar($tabbar); $content = "\n <div style='margin-bottom:5px;' class='subtitle'>" . $flouserdata->get_username($contributeduser->userid) . " > {$flolang->contributed_pagetitle}</div>\n {$tabbar['tabbar']}\n {$maplistcontent}\n {$droplistcontent}\n {$noteslistcontent}\n {$flagscontent}\n {$tabbar['jscript']}\n";
<?php require_once "./init.php"; if (!defined('is_florensia')) { die('Hacking attempt'); } $flolang->load("hundredfloor"); $pageselect = $florensia->pageselect(100, array("100floor"), array(), 10); $count = $pageselect['pagestart'] + 1; $queryfloor = MYSQL_QUERY("SELECT * FROM server_100floor LIMIT " . $pageselect['pagestart'] . ",10"); while ($floor = MYSQL_FETCH_ARRAY($queryfloor)) { $floorcontent .= $florensia->adsense(5); $floorcontent .= "<div class='subtitle' style='margin-top:20px;'>" . $flolang->sprintf($flolang->tower_floortitle, $count) . "</div>"; for ($i = 1; $i <= 10; $i++) { if ($floor[$florensia->get_columnname("server_100floor_npcid{$i}", "misc")] == "#") { continue; } $npc = new floclass_npc($floor[$florensia->get_columnname("server_100floor_npcid{$i}", "misc")]); $floorcontent .= "<div class='shortinfo_" . $florensia->change() . "'>" . $npc->shortinfo(array(), array($flolang->tower_shortview_amount => $floor[$florensia->get_columnname("server_100floor_npcamount{$i}", "misc")])) . "</div>"; } $count++; } $content = "\n\t\t<div style='text-align:center; margin-bottom:5px;'>" . $florensia->quick_select('100floor', array('page' => $_GET['page']), array(), array('namesselect' => 1)) . "</div>\n\t\t<div style='margin-bottom:5px;' class='subtitle'><a href='{$florensia->root}/misc.php'>{$flolang->mainmenu_misc}</a> > 100 Floor Tower</div>\n\t\t<div style='margin-bottom:10px;'>" . $pageselect['selectbar'] . "</div>\n\t\t{$floorcontent}\n\t\t<div style='margin-bottom:10px;'>" . $pageselect['selectbar'] . "</div>\n\t"; $florensia->sitetitle("100 Floor Tower"); $florensia->output_page($content);
switch ($tool) { case "npcflags": $florensia->sitetitle("NPC Flags"); $pagebar[] = "NPC Flags"; $pageselectlinkoptions = array(); if (!in_array($_GET['show'], array("notimplemented", "event", "removed"))) { $dbwhere[] = "(flobase_addition.entrystatus='0' OR flobase_addition.entrystatus is NULL)"; } else { $pageselectlinkoptions['show'] = $_GET['show']; $dbwhere[] = "flobase_addition.entrystatus LIKE '{$_GET['show']},%'"; } if ($dbwhere) { $dbwhere = "WHERE " . join(" AND ", $dbwhere); } $querynpcstring = "FROM server_npc LEFT JOIN flobase_addition ON flobase_addition.classid=server_npc." . $florensia->get_columnname("npcid", "npc") . " AND class='npc' {$dbwhere} ORDER BY name_{$stringtable->language}"; list($amount) = MYSQL_FETCH_ARRAY(MYSQL_QUERY("SELECT COUNT(*) " . $querynpcstring)); $pageselect = $florensia->pageselect($amount, array("admintools", "npcflags"), $pageselectlinkoptions); $querynpc = MYSQL_QUERY("SELECT * {$querynpcstring} LIMIT " . $pageselect['pagestart'] . "," . $florensia->pageentrylimit); while ($npc = MYSQL_FETCH_ARRAY($querynpc)) { $npc = new floclass_npc($npc); $npclist .= "\n\t\t\t\t<div class='shortinfo_" . $florensia->change() . "'>\n\t\t\t\t\t" . $npc->shortinfo() . "\n\t\t\t\t</div>\n\t\t\t"; } $preselect[$_GET['show']] = "selected='selected'"; $npcselect = "\n\t\t\t<select name='show'>\n\t\t\t\t<option value='0'>Normal</option>\n\t\t\t\t<option value='event' {$preselect['event']}>Event</option>\n\t\t\t\t<option value='notimplemented' {$preselect['notimplemented']}>Not Implemented</option>\n\t\t\t\t<option value='removed' {$preselect['removed']}>Removed</option>\n\t\t\t</select>\t\t\t\n\t\t"; $content = "\n\t\t\t<div class='subtitle'>" . $florensia->quick_select("admintools", array("tool" => "npcflags"), array("Show" => $npcselect)) . "</div>\n\t\t\t<div style='margin-top:10px;'>" . $pageselect['selectbar'] . "</div>\n\t\t\t{$npclist}\n\t\t\t<div style='margin-top:10px;'>" . $pageselect['selectbar'] . "</div>\n\t\t"; break; default: $content = "\n\t\t<div>\n\t\t\t<a href='" . $florensia->outlink(array("admintools", "npcflags")) . "'>NPC-Flags</a>\n\t\t</div>\n\t\t"; } $content = "\n\t<div class='subtitle' style='margin-bottom:10px;'>" . join(" > ", $pagebar) . "</div>\n\t{$content}\n"; $florensia->output_page($content);
function get_droplist($dbid, $act = "item") { global $flolang, $florensia, $stringtable, $flouser, $flouserdata, $classquest, $classvote; //db-work foreach ($_POST as $postkey => $postvalue) { if (preg_match('/^droplist_(thumpsup|thumpsdown|withdraw|selected)_([a-z0-9]+)_([a-z0-9]+)_x$/', $postkey, $dbkey)) { if ($dbkey[1] == "selected") { if (!$_POST['do_selected'] or !($_POST['action_selected'] == "thumpsdown" or $_POST['action_selected'] == "thumpsup" or $_POST['action_selected'] == "withdraw" or $flouser->get_permission("mod_droplist", "delete") && $_POST['action_selected'] == "delete" or $flouser->get_permission("mod_droplist", "verify") && ($_POST['action_selected'] == "verified" or $_POST['action_selected'] == "unverified"))) { next; } $dbkey[1] = $_POST['action_selected']; } $florensia->notice($this->updateentry($dbkey[2], $dbkey[3], $dbkey[1])); } } if ($act == "item") { $querystring = "SELECT d.dropid, itemid, npcid, thumpsup, thumpsdown, COUNT(v.userid) as vusers, COUNT(q.questid) as quests FROM flobase_droplist as d LEFT JOIN flobase_droplist_verified as v ON (v.dropid=d.dropid) LEFT JOIN flobase_droplist_quest as q ON (q.dropid=d.dropid) WHERE itemid='" . mysql_real_escape_string($dbid) . "' GROUP BY d.dropid ORDER BY thumpsup DESC, thumpsdown"; $droplisttitle = $flolang->sprintf($flolang->droplist_title_npc, $stringtable->get_string($dbid, array('protectionsmall' => 1))); $dropentryaddtolist = "\n\t\t\t\t\t<input type='hidden' value='" . $florensia->escape($dbid) . "' name='itemid'>\n\t\t\t\t\t<input type='submit' value='{$flolang->droplist_search_npc}'>\n\t\t\t\t"; } else { $querystring = "SELECT d.dropid, itemid, npcid, thumpsup, thumpsdown, COUNT(v.userid) as vusers, COUNT(q.questid) as quests FROM flobase_droplist as d LEFT JOIN flobase_droplist_verified as v ON (v.dropid=d.dropid) LEFT JOIN flobase_droplist_quest as q ON (q.dropid=d.dropid) WHERE npcid='" . mysql_real_escape_string($dbid) . "' GROUP BY d.dropid ORDER BY thumpsup DESC, thumpsdown"; $droplisttitle = $flolang->sprintf($flolang->droplist_title_item, $stringtable->get_string($dbid, array('protectionsmall' => 1))); $dropentryaddtolist = "\n\t\t\t\t\t<input type='hidden' value='" . $florensia->escape($dbid) . "' name='npcid'>\n\t\t\t\t\t<input type='submit' value='{$flolang->droplist_search_item}'>\n\t\t\t\t"; } $querydroplist = MYSQL_QUERY($querystring); while ($droplist = MYSQL_FETCH_ARRAY($querydroplist)) { if ($act == "item") { $npc = new floclass_npc($droplist['npcid']); $dropentrydetails = $npc->shortinfo(); $adminlogfileid = "{npc:{$droplist['npcid']}}/{item:{$dbid}}"; } else { $item = new floclass_item($droplist['itemid']); $dropentrydetails = $item->shortinfo(array('marketlist' => true)); $adminlogfileid = "{npc:{$dbid}}/{item:{$droplist['itemid']}}"; } $colorchange = 1; unset($smallentrynotice, $adminverifiedlist); $droplistlevel = "normal"; if ($droplist['quests']) { $questquery = MYSQL_QUERY("SELECT questid, droprate FROM flobase_droplist_quest WHERE dropid='{$droplist['dropid']}'"); while ($questdrop = MYSQL_FETCH_ARRAY($questquery)) { $smallentrynotice = "<br />" . $flolang->sprintf($flolang->droplist_list_notice_questentry, bcdiv(intval($questdrop['droprate']), 10) . "%") . " [<a href='" . $florensia->outlink(array("questdetails", $questdrop['questid'], $classquest->get_title($questdrop['questid']))) . "'>Q</a>]"; } $colorchange = "droplist_questentry"; $droplistlevel = "questentry"; } if ($droplist['vusers']) { $smallentrynotice .= "<br />{$flolang->droplist_list_notice_verifiedentry}"; $colorchange = "droplist_verified"; $droplistlevel = "verified"; } if ($smallentrynotice) { $smallentrynotice = "<span style='font-size:90%;'>{$smallentrynotice}</span>"; } $droplist['thumpsdown'] = 0 - $droplist['thumpsdown']; if ($flouser->userid) { $vote = MYSQL_FETCH_ARRAY(MYSQL_QUERY("SELECT rating, timestamp FROM flobase_droplist_ratings WHERE dropid='{$droplist['dropid']}' AND userid='{$flouser->userid}'")); if ($vote) { if ($vote['rating'] > 0) { $droplist['thumpsup'] = "<span style='text-decoration:underline;''>{$droplist['thumpsup']}</span>"; } else { $droplist['thumpsdown'] = "<span style='text-decoration:underline;'>{$droplist['thumpsdown']}</span>"; } $verifydetails = "\n\t\t\t\t\t\t\t\t" . $flolang->sprintf($flolang->droplist_quick_verify_alreadyverified_notice, date("m.d.Y", $vote['timestamp'])) . "<br />\n\t\t\t\t\t\t\t\t<span style='font-weight:bold; font-size:150%;'>{$droplist['thumpsup']}/{$droplist['thumpsdown']}</span>\n\t\t\t\t\t\t\t\t<input type='image' name='droplist_withdraw_{$droplist['itemid']}_{$droplist['npcid']}' src='{$florensia->layer_rel}/withdraw.gif' style='background-color:transparent; border:0px; height:18px;'>\n\t\t\t\t\t\t\t"; } else { $verifydetails = "\n\t\t\t\t\t\t\t\t\t<input type='image' name='droplist_thumpsup_{$droplist['itemid']}_{$droplist['npcid']}' src='{$florensia->layer_rel}/thumpsup.gif' style='background-color:transparent; border:0px; width:15px; height:18px;'>\n\t\t\t\t\t\t\t\t\t<span style='font-weight:bold; font-size:150%; margin-left:4px; margin-right:4px;'>{$droplist['thumpsup']}/{$droplist['thumpsdown']}</span>\n\t\t\t\t\t\t\t\t\t<input type='image' name='droplist_thumpsdown_{$droplist['itemid']}_{$droplist['npcid']}' src='{$florensia->layer_rel}/thumpsdown.gif' style='background-color:transparent; border:0px; width:15px; height:18px;'>\n\t\t\t\t\t\t\t"; } } else { $verifydetails = "<span style='font-weight:bold; font-size:150%; margin-left:4px; margin-right:4px;'>{$droplist['thumpsup']}/{$droplist['thumpsdown']}</span><br />{$flolang->droplist_quick_notloggedin}"; } if ($flouser->get_permission("add_droplist")) { $quickselect = "<input type='checkbox' name='droplist_selected_{$droplist['itemid']}_{$droplist['npcid']}_x' value='1'>"; } else { unset($quickselect); } if ($flouser->get_permission("mod_droplist", "contributed")) { $rating = array("up" => array(), "down" => array()); $userquery = MYSQL_QUERY("SELECT r.timestamp, r.userid, r.rating, v.userid as verified FROM flobase_droplist_ratings as r LEFT JOIN flobase_droplist_verified as v ON (v.dropid=r.dropid AND v.userid=r.userid) WHERE r.dropid='{$droplist['dropid']}' ORDER BY r.timestamp"); while ($user = MYSQL_FETCH_ARRAY($userquery)) { $cat = $user['rating'] > 0 ? "up" : "down"; if ($user['verified']) { $rating[$cat][] = date("m.d.y", $user['timestamp']) . ": <span style='text-decoration:underline;'>" . $flouserdata->get_username($user['userid']) . "</span>"; } else { $rating[$cat][] = date("m.d.y", $user['timestamp']) . ": " . $flouserdata->get_username($user['userid']); } } $contributed = "\n\t\t\t\t\t\t\t<table class='small' style='width:100%'>\n\t\t\t\t\t\t\t\t<tr><td style='text-align:center; width:50%;'><img src='{$florensia->layer_rel}/thumpsup.gif' alt='ThumpsUp' style='width:10px; height:13px;'></td><td style='text-align:center;'><img src='{$florensia->layer_rel}/thumpsdown.gif' alt='ThumpsDown' style='width:10px; height:13px;'></td></tr>\n\t\t\t\t\t\t\t\t<tr><td>" . join("<br>", $rating['up']) . "</td><td>" . join("<br>", $rating['down']) . "</td></tr>\n\t\t\t\t\t\t\t</table>"; $adminuserlist = "\n\t\t\t\t\t\t\t\t\t<td style='width:5px;'></td>\n\t\t\t\t\t\t\t\t\t<td class='shortinfo_{$colorchange}' style='width:10px; vertical-align:top;'>\n\t\t\t\t\t\t\t\t\t\t<span " . popup("<div class='shortinfo_{$colorchange}' style='width:450px'>{$contributed}</div>", "LEFT, MOUSEOFF, STICKY") . ">C</span>\n\t\t\t\t\t\t\t\t\t\t<a href='{$florensia->root}/adminlog?section=droplist&logvalue=" . urlencode($adminlogfileid) . "' target='_blank'>L</a>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t"; } else { unset($adminuserlist); } $droplistcontent[$droplistlevel] .= $florensia->adsense(8) . "\n\t\t\t\t\t\t<div style='margin-bottom:5px;'>\n\t\t\t\t\t\t\t<table style='width:100%' class='small'>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class='shortinfo_{$colorchange}' style='vertical-align:top; width:650px;'>\n\t\t\t\t\t\t\t\t\t\t{$dropentrydetails}\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td style='width:15px;'>{$quickselect}</td>\n\t\t\t\t\t\t\t\t\t<td class='shortinfo_{$colorchange}' style='text-align:center; vertical-align:middle;'>\n\t\t\t\t\t\t\t\t\t\t{$verifydetails}\n\t\t\t\t\t\t\t\t\t\t{$smallentrynotice}\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t{$adminuserlist}\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t"; } unset($quickselect); if (!$droplistcontent) { $droplistcontent = "<div class='small bordered' style='text-align:center;'>{$flolang->droplist_list_noentry}</div>"; } else { $droplistcontent = $droplistcontent['verified'] . $droplistcontent['questentry'] . $droplistcontent['normal']; if ($flouser->get_permission("add_droplist") or $flouser->get_permission("mod_droplist", "verify") or $flouser->get_permission("mod_droplist", "delete")) { $quickselect = "\n\t\t\t\t\t\t<div class='small subtitle' style='padding:2px; text-align:right;'>\n\t\t\t\t\t\t\t<select name='action_selected'>\n\t\t\t\t\t\t\t\t<option value='thumpsup'>{$flolang->droplist_quick_thumpsup}</option>\n\t\t\t\t\t\t\t\t<option value='thumpsdown'>{$flolang->droplist_quick_thumpsdown}</option>\n\t\t\t\t\t\t\t\t<option value='withdraw'>{$flolang->droplist_quick_withdraw}</option>"; if ($flouser->get_permission("mod_droplist", "delete")) { $quickselect .= "<option value='delete'>{$flolang->droplist_quick_delete}</option>"; } if ($flouser->get_permission("mod_droplist", "verify")) { $quickselect .= "\n\t\t\t\t\t\t\t\t\t\t<option value='verified'>{$flolang->droplist_quick_verify}</option>\n\t\t\t\t\t\t\t\t\t\t<option value='unverified'>{$flolang->droplist_quick_unverify}</option>\n\t\t\t\t\t\t\t\t\t"; } $quickselect .= "</select>\n\t\t\t\t\t\t\t<input type='submit' name='do_selected' value='{$flolang->droplist_quick_submit}'>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t"; } } $whatsthat = "<div style='width:300px;'>\n\t\t\t\t<div class='small shortinfo_" . $florensia->change() . "'>" . $flolang->droplist_whatsthis_title . "</div>\n\t\t\t\t<div class='small'>" . $flolang->droplist_whatsthis_text . "</div>\n\t\t\t</div>\n\t\t\t"; return "\n\t\t\t\t<div class='subtitle small' style='text-align:center'>{$droplisttitle} (<span class='small' style='font-weight:normal;' " . popup($whatsthat) . ">{$flolang->droplist_whatsthis_title}</span>)</div>\n\t\t\t\t<div>\n\t\t\t\t\t<form action='" . $florensia->escape($florensia->request_uri(array(), 'droplist')) . "' method='post'>\n\t\t\t\t\t{$droplistcontent}\n\t\t\t\t\t{$quickselect}\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t\t<div class='subtitle small' style='padding:2px; text-align:right'>\n\t\t\t\t\t<form action='{$florensia->root}/droplist.php' method='get'>\n\t\t\t\t\t\t{$flolang->droplist_list_addentry}\n\t\t\t\t\t\t<input type='text' name='search'>\n\t\t\t\t\t\t<input type='hidden' value='{$stringtable->language}' name='names'>\n\t\t\t\t\t\t{$dropentryaddtolist}\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t"; }
$maplist = $misc->get_maplist(); if (!$_POST['mapid']) { $_POST['mapid'] = $maplist[0]['mapid']; } foreach ($maplist as $key => $map) { if ($map['maplink'] == FALSE) { continue; } if ($map['mapid'] == $_POST['mapid']) { $selected = "selected='selected'"; } else { unset($selected); } $selectmap .= "<option value='{$map['mapid']}' style='padding-left:" . bcmul($map['submap'], 20) . "px;' {$selected}>{$map['mapname']}</option>"; } $npc = new floclass_npc($_GET['npcid']); $content_select = "\n<div class='shortinfo_" . $florensia->change() . "'>" . $npc->shortinfo() . "</div>\n<div style='margin-top:20px;' class='bordered small'>{$flolang->mapcoordinates_add_description}</div>\n\n<div style='margin-top:20px; margin-bottom:20px;'>\n\t<form action='" . $florensia->escape($_SERVER['REQUEST_URI']) . "' method='post' style='text-align:center'>\n\t\t<select name='mapid'>{$selectmap}</select> <input class='quicksubmit' type='submit' value=''>\n\t</form>\n</div>\n"; $querymap = MYSQL_QUERY("SELECT LTWH FROM server_map WHERE mapid='" . mysql_real_escape_string($_POST['mapid']) . "'"); if ($map = MYSQL_FETCH_ARRAY($querymap)) { $LTWH = explode(",", $map['LTWH']); $javascript['crosshair'] = ' <script type="text/javascript"> var MapInfoHeight = ' . $LTWH[3] . '; var MapInfoLeft = ' . $LTWH[0] . '; var MapInfoWidth = ' . $LTWH[2] . '; var MapInfoTop = ' . $LTWH[1] . '; var inputline = new Array() function setCross(cx,cy) { rxy = Math.round((x/512)*MapInfoWidth+MapInfoLeft) +"," + Math.round(((y/512)*MapInfoHeight-MapInfoTop)*(-1));
$inpc = " OR flobase_npc_coordinates.mapid is NULL"; } $dbwhere[] = "(flobase_npc_coordinates.mapid='" . mysql_real_escape_string($querymap) . "'{$inpc})"; } elseif (!$_GET['inpc']) { $dbwhere[] = "flobase_npc_coordinates.mapid is NOT NULL"; if ($_GET['mapid'] == "alligntower") { $dbwhere[] = "flobase_npc_coordinates.mapid!='AT001_000'"; } } else { unset($mapjoin); } $dbwhere = "WHERE " . join(" AND ", $dbwhere); $querystringnpc = "SELECT * FROM server_npc {$mapjoin} {$dbwhere} ORDER BY " . $florensia->get_columnname("exp", "npc") . " DESC, name_{$stringtable->language} LIMIT 30"; $querynpc = MYSQL_QUERY($querystringnpc); while ($npc = MYSQL_FETCH_ARRAY($querynpc)) { $npcclass = new floclass_npc($npc); if (intval($npc[$florensia->get_columnname("fielddividing", "npc")])) { $expclass = "sea"; } else { $expclass = "land"; } //get the difference between npc and user $expdifference = $userlevel - $npc[$florensia->get_columnname("level", "npc")]; if ($expdifference >= 20) { $expprocent = "<span style='color:#ff0000;'>0%</span>"; } else { /* # levelexp-arrays, thanks to LittleTom/tomg86 -x bis -20: 0% -19 bis -15: 50% -14 bis -13: 80%
break; case "15": $mission = $flolang->questworktype_15; break; case "16": $mission = $flolang->questworktype_16; break; default: $mission = $flolang->sprintf($flolang->questworktype_notset, $questxml->Mission->Work[$i]->attributes()->WorkType); } //WorkValue, only if not looting (if loot mob is already displayed) if (isset($questxml->Mission->Work[$i]->attributes()->WorkValue) && $questxml->Mission->Work[$i]->attributes()->WorkType != "3") { $workvalue = $questxml->Mission->Work[$i]->attributes()->WorkValue; if (MYSQL_NUM_ROWS(MYSQL_QUERY("SELECT " . $florensia->get_columnname("npcid", "npc") . " FROM server_npc WHERE " . $florensia->get_columnname("npcid", "npc") . "='{$workvalue}'")) > 0) { $workvalue = "<a href='" . $florensia->outlink(array("npcdetails", $workvalue, $stringtable->get_string($workvalue))) . "'>" . $stringtable->get_string($workvalue, array('protectionlink' => 1)) . "</a>"; $maploc = floclass_npc::get_maplist($questxml->Mission->Work[$i]->attributes()->WorkValue); $workvalue .= count($maploc['ids']) ? " (" . join(", ", $maploc['list']) . ")" : ""; } elseif (MYSQL_NUM_ROWS(MYSQL_QUERY("SELECT itemid FROM server_item_idtable WHERE itemid='{$workvalue}'")) > 0) { $workvalue = "<a href='" . $florensia->outlink(array("itemdetails", $workvalue, $stringtable->get_string($workvalue))) . "'>" . $stringtable->get_string($workvalue, array('protectionlink' => 1)) . "</a>"; } else { $workvalue = $stringtable->get_string($workvalue, array('protection' => 1)); } $workvalue = "\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>{$flolang->questvalue}</td>\n\t\t\t\t\t\t\t<td>{$workvalue}</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t"; } else { unset($workvalue); } $table_missions .= "\n\t\t\t\t\t<table class='subtitle small' style='width:100%; font-weight:normal;'>\n\t\t\t\t\t\t<tr><td colspan='2' style='border-bottom:1px solid; font-weight:bold;'>" . $flolang->sprintf($flolang->questmission, bcadd($i, 1)) . " ({$mission})</td></tr>\n\t\t\t\t\t\t{$loottable}\n\t\t\t\t\t\t{$workvalue}\n\t\t\t\t\t\t{$additionalrow}\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td style='width:120px;'>{$flolang->questamount}</td>\n\t\t\t\t\t\t\t<td>" . $questxml->Mission->Work[$i]->attributes()->Count . "</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t"; /* <tr> <td>{$flolang->questpriority}</td> <td>".$questxml->Mission->Work[$i]->attributes()->Priority."</td>
function create_diff_overview($dbtable, $subdiff) { global $florensia, $stringtable, $classquest, $flolang; if (preg_match('/^server_item_(.+)$/', $dbtable, $itemcat)) { $this->difflist['items']['title'] = $flolang->diff_subtitle_items; foreach (get_object_vars($subdiff->new) as $newkey => $newvalue) { $item = new floclass_item($newkey); $this->difflist['items']['new'] .= "\n \t\t\t\t\t\t\t\t<div><a href='" . $florensia->outlink(array("itemdetails", $newvalue, $stringtable->get_string($newvalue)), array("escape" => FALSE)) . "' target='_blank' " . popup("<div class='shortinfo_" . $florensia->change() . "' style='width:600px;'>" . $item->shortinfo() . "</div>") . ">" . $stringtable->get_string($newvalue, array("protectionsmall" => 1, "protectionlink" => 1)) . "</a></div>\n \t\t\t\t\t\t\t"; } foreach (get_object_vars($subdiff->diff) as $newkey => $newvalue) { unset($changes); foreach ($newvalue as $changekey => $change) { $changekey_lang = $florensia->get_columnname_backwards($changekey, 'item'); if (preg_match("/{$changekey_lang}/", $changekey) && !preg_match("/^name_/", $changekey_lang)) { continue; } $changes .= "<tr><td style='width:24%; border-right:1px #88a9d4 solid;'>{$changekey_lang}:</td><td style='width:38%; border-right:1px #88a9d4 solid;'>{$change->oldversion}</td><td>{$change->newversion}</td></tr>"; } if (!$changes) { continue; } $this->difflist['items']['diff'] .= "\n \t\t\t\t\t\t\t\t<div><a href='" . $florensia->outlink(array("itemdetails", $newkey, $stringtable->get_string($newkey)), array("escape" => FALSE)) . "' target='_blank' " . popup("<div class='shortinfo_" . $florensia->change() . "' style='width:600px;'><table style='width:100%;'>{$changes}</table></div>") . ">" . $stringtable->get_string($newkey, array("protectionsmall" => 1, "protectionlink" => 1)) . "</a></div>\n \t\t\t\t\t\t\t"; } } elseif ($dbtable == "server_npc") { $this->difflist['npcs']['title'] = $flolang->diff_subtitle_npcs; foreach (get_object_vars($subdiff->new) as $newkey => $newvalue) { $npc = new floclass_npc($newkey); $this->difflist['npcs']['new'] .= "\n \t\t\t\t\t\t\t\t<div><a href='" . $florensia->outlink(array("npcdetails", $newvalue, $stringtable->get_string($newvalue)), array("escape" => FALSE)) . "' target='_blank' " . popup("<div class='shortinfo_" . $florensia->change() . "' style='width:600px;'>" . $npc->shortinfo() . "</div>") . ">" . $stringtable->get_string($newvalue, array("protectionsmall" => 1, "protectionlink" => 1)) . "</a></div>\n \t\t\t\t\t\t\t"; } foreach (get_object_vars($subdiff->diff) as $newkey => $newvalue) { unset($changes); foreach ($newvalue as $changekey => $change) { $changekey_lang = $florensia->get_columnname_backwards($changekey, 'npc'); if (preg_match("/{$changekey_lang}/", $changekey) && !preg_match("/^name_/", $changekey_lang)) { continue; } $changes .= "<tr><td style='width:150px; border-right:1px #88a9d4 solid;'>{$changekey_lang}:</td><td style='width:225px; border-right:1px #88a9d4 solid;'>{$change->oldversion}</td><td>{$change->newversion}</td></tr>"; } if (!$changes) { continue; } $this->difflist['npcs']['diff'] .= "\n \t\t\t\t\t\t\t\t<div><a href='" . $florensia->outlink(array("npcdetails", $newkey, $stringtable->get_string($newkey)), array("escape" => FALSE)) . "' target='_blank' " . popup("<div class='shortinfo_" . $florensia->change() . "' style='width:600px;'><table style='width:100%;'>{$changes}</table></div>") . ">" . $stringtable->get_string($newkey, array("protectionsmall" => 1, "protectionlink" => 1)) . "</a></div>\n \t\t\t\t\t\t\t"; } } elseif ($dbtable == "server_map") { $this->difflist['maps']['title'] = $flolang->diff_subtitle_maps; foreach (get_object_vars($subdiff->new) as $newkey => $newvalue) { $this->difflist['maps']['new'] .= "\n \t\t\t\t\t\t\t\t<div><a href='" . $florensia->outlink(array("mapdetails", $newvalue, $stringtable->get_string($newvalue)), array("escape" => FALSE)) . "' target='_blank' " . popup("<div class='shortinfo_" . $florensia->change() . "' style='text-align:center; width:300px;'>" . $florensia->mapprotection($newvalue, $stringtable->get_string($newvalue), "", array('maxwidth' => 300)) . "</div>") . ">" . $stringtable->get_string($newvalue, array("protectionsmall" => 1, "protectionlink" => 1)) . "</a></div>\n \t\t\t\t\t\t\t"; } foreach (get_object_vars($subdiff->diff) as $newkey => $newvalue) { $this->difflist['maps']['diff'] .= "\n \t\t\t\t\t\t\t\t<div><a href='" . $florensia->outlink(array("mapdetails", $newkey, $stringtable->get_string($newkey)), array("escape" => FALSE)) . "' target='_blank' " . popup("<div class='shortinfo_" . $florensia->change() . "' style='text-align:center; width:300px;'>" . $florensia->mapprotection($newkey, $stringtable->get_string($newkey), "", array('maxwidth' => 300)) . "</div>") . ">" . $stringtable->get_string($newkey, array("protectionsmall" => 1, "protectionlink" => 1)) . "</a></div>\n \t\t\t\t\t\t\t"; } } elseif ($dbtable == "server_questlist") { $this->difflist['quests']['title'] = $flolang->diff_subtitle_quests; foreach (get_object_vars($subdiff->new) as $newkey => $newvalue) { $this->difflist['quests']['new'] .= "\n \t\t\t\t\t\t\t\t<div><a href='" . $florensia->outlink(array("questdetails", $newvalue, $classquest->get_title($newvalue)), array("escape" => FALSE)) . "' target='_blank' " . popup("<div class='shortinfo_" . $florensia->change() . "' style='width:650px;'>" . $classquest->get_shortinfo($newvalue) . "</div>") . ">" . $classquest->get_title($newkey) . "</a></div>\n \t\t\t\t\t\t\t"; } foreach (get_object_vars($subdiff->diff) as $newkey => $newvalue) { $this->difflist['quests']['diff'] .= "\n \t\t\t\t\t\t\t\t<div><a href='" . $florensia->outlink(array("questdetails", $newkey, $classquest->get_title($newkey)), array("escape" => FALSE)) . "' target='_blank' " . popup("<div class='shortinfo_" . $florensia->change() . "' style='width:650px;'>" . $classquest->get_shortinfo($newkey) . "</div>") . ">" . $classquest->get_title($newkey) . "</a></div>\n \t\t\t\t\t\t\t"; } } elseif ($dbtable == "server_skill") { $this->difflist['skill']['title'] = "Skills"; foreach (get_object_vars($subdiff->new) as $newkey => $newvalue) { $this->difflist['skill']['new'] .= "\n \t\t\t\t\t\t\t\t<div><span " . popup("<div class='shortinfo_" . $florensia->change() . "' style='width:600px;'><div style='min-height:55px;'>" . $florensia->detailsprotection(substr($newkey, 0, -2) . substr($newkey, -2), "skill") . "</div></div>") . ">Lvl:" . substr($newkey, -2) . " " . $stringtable->get_string($newkey, array("protectionsmall" => 1)) . "</span></div>\n \t\t\t\t\t\t\t"; } foreach (get_object_vars($subdiff->diff) as $newkey => $newvalue) { $this->difflist['skill']['diff'] .= "\n \t\t\t\t\t\t\t\t<div><span " . popup("<div class='shortinfo_" . $florensia->change() . "' style='width:600px;'><div style='min-height:55px;'>" . $florensia->detailsprotection(substr($newkey, 0, -2) . substr($newkey, -2), "skill") . "</div></div>") . ">Lvl:" . substr($newkey, -2) . " " . $stringtable->get_string($newkey, array("protectionsmall" => 1)) . "</span></div>\n \t\t\t\t\t\t\t"; } } elseif ($dbtable == "server_spell") { $this->difflist['spell']['title'] = "Spells"; foreach (get_object_vars($subdiff->new) as $newkey => $newvalue) { $this->difflist['spell']['new'] .= "\n \t\t\t\t\t\t\t\t<div><span " . popup("<div class='shortinfo_" . $florensia->change() . "' style='width:600px;'><div style='min-height:55px;'>" . $florensia->detailsprotection(substr($newkey, 0, -2) . substr($newkey, -2), "spell") . "</div></div>") . ">Lvl:" . substr($newkey, -2) . " " . $stringtable->get_string($newkey, array("protectionsmall" => 1)) . "</span></div>\n \t\t\t\t\t\t\t"; } foreach (get_object_vars($subdiff->diff) as $newkey => $newvalue) { $this->difflist['spell']['diff'] .= "\n \t\t\t\t\t\t\t\t<div><span " . popup("<div class='shortinfo_" . $florensia->change() . "' style='width:600px;'><div style='min-height:55px;'>" . $florensia->detailsprotection(substr($newkey, 0, -2) . substr($newkey, -2), "spell") . "</div></div>") . ">Lvl:" . substr($newkey, -2) . " " . $stringtable->get_string($newkey, array("protectionsmall" => 1)) . "</span></div>\n \t\t\t\t\t\t\t"; } } }