break; case "name": $dborderby = "ORDER BY guildname"; break; } $dbwhere[] = "memberamount!='0'"; if (count($dbwhere)) { $dbwhere = "WHERE " . join(" AND ", $dbwhere); } else { unset($dbwhere); } if (intval($_GET['page'])) { $startpage = $_GET['page'] * 100 - 100; } else { $startpage = 0; } $queryguild = MYSQL_QUERY("SELECT SQL_CALC_FOUND_ROWS g.guildid, guildname, server, memberamount, averagelandlevel, averagesealevel, averagelevel, misc_language, (SELECT COUNT(galleryid) FROM flobase_guild_gallery as ga WHERE ga.guildid=g.guildid) as gallery FROM flobase_guild as g {$dbwhere} {$dborderby} LIMIT {$startpage}, 100"); list($foundrows) = MYSQL_FETCH_ARRAY(MYSQL_QUERY("SELECT FOUND_ROWS()")); $pageselect = $florensia->pageselect($foundrows, array("guildranking"), array("order" => $_GET['order'], "member" => $_GET['member'], "server" => $_GET['server']), 100); for ($i = $pageselect['pagestart'] + 1; $guild = MYSQL_FETCH_ARRAY($queryguild); $i++) { $guildlist .= $florensia->adsense(30); if ($guild['gallery']) { $guild['gallery'] = "<a href='" . $florensia->outlink(array("gallery", "g", $guild['guildid'], $guild['server'], $guild['guildname'])) . "'>{$guild['gallery']} <img src='{$florensia->layer_rel}/icon_gallery.png' style='border:none; height:13px; vertical-align:bottom;'></a>"; } else { unset($guild['gallery']); } $guildlist .= "\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:40px; text-align:right;'>{$i}.</td>\n\t\t\t\t<td style='width:70px; text-align:right;'>{$guild['averagelevel']} ~</td>\n\t\t\t\t<td style='width:70px; text-align:right;'>{$guild['averagelandlevel']} <img src='{$florensia->layer_rel}/land.gif' style='height:11px;'></td>\n\t\t\t\t<td style='width:70px; text-align:right;'>{$guild['averagesealevel']} <img src='{$florensia->layer_rel}/sealv.gif' style='height:11px;'></td>\n <td style='width:25px; text-align:right;'>" . floclass_guild::get_language_pic($guild['misc_language']) . "</td>\n\t\t\t\t<td style='padding-left:10px;'><a href='" . $florensia->outlink(array("guilddetails", $guild['guildid'], $guild['server'], $guild['guildname'])) . "'>" . $florensia->escape($guild['guildname']) . "</a></td>\n <td style='text-align:right; padding-right:10px;'>{$guild['gallery']}</td>\n <td style='width:110px'><a href='" . $florensia->outlink(array("statistics", $guild['server'])) . "'>" . $florensia->escape($guild['server']) . "</a></td>\n\t\t\t\t<td style='text-align:right; width:100px'>" . $flolang->sprintf($flolang->guild_memberamount, $guild['memberamount']) . "</td>\n\t\t\t</tr></table>\n\t\t</div>\n "; } $guildoverview = "\n\n<div class='bordered' style='font-weight:bold; margin-bottom:15px;'>\n\t" . $florensia->quick_select("guildranking", array(), array($flolang->statistic_ranking_quickselect_orderby => $orderbyselect, $flolang->statistic_ranking_quickselect_filterserver => $serverfilter, $flolang->statistic_ranking_quickselect_guildminmember => $memberfilter)) . "\n</div>\n\n<div style='margin-top:10px;'>" . $pageselect['selectbar'] . "</div>\n<div class='subtitle' style='margin-bottom:7px;'>\n <table style='width:100%'><tr>\n <td style='width:40px; text-align:right;'>#</td>\n\t<td style='width:70px; text-align:right;'>~</td>\n\t<td style='width:70px; text-align:right;'><img src='{$florensia->layer_rel}/land.gif' style='height:13px;'></td>\n\t<td style='width:70px; text-align:right;'><img src='{$florensia->layer_rel}/sealv.gif' style='height:13px;'></td>\n <td style='width:25px;'></td>\n\t<td style='padding-left:10px;'>{$flolang->guild_title_guildname}</td>\n <td></td>\n\t<td style='width:110px'>{$flolang->guild_title_server}</td>\n\t<td style='text-align:right; width:100px'>{$flolang->guild_title_member}</td>\n </tr></table>\n</div>\n<div class='small'>{$guildlist}</div>\n<div style='margin-top:10px;'>" . $pageselect['selectbar'] . "</div>\n"; $content = "\n <div class='subtitle'><a href='{$florensia->root}/statistics'>{$flolang->statistic_sitetitle}</a> > {$flolang->statistic_guildranking_sitetitle}</div>\n <div class='subtitle small' style='font-weight:normal; margin-bottom:15px;'>" . $flolang->sprintf($flolang->statistic_notice_seealso, join(", ", $validserverlinks)) . "</div>\n {$jumptoguild}\n {$guildoverview}\n "; $florensia->output_page($content);
$guildlogo = "\n <div class='subtitle small' style='font-weight:normal; padding:5px; margin-bottom:10px; min-height:{$avatar_height}px;'>\n <div style='float:left; padding-right:10px;'>{$guildlogo}</div>\n " . $parser->parse_message($guild['misc_description'], $florensia->default_parser_options) . "\n </div>\n "; } else { //logo not available or too big $guilddescription = "<div class='subtitle small' style='font-weight:normal; padding:10px'>" . $parser->parse_message($guild['misc_description'], $florensia->default_parser_options) . "</div>"; } } //need to search for an owner to verify? if ($leader = MYSQL_FETCH_ARRAY(MYSQL_QUERY("SELECT d.ownerid, c.charname FROM flobase_character as c, flobase_character_data as d WHERE c.characterid=d.characterid AND d.guildgrade='5' AND d.guildid='{$guild['guildid']}'"))) { if (!$leader['ownerid']) { $verifiednotice = "<a href='" . $florensia->outlink(array("charapi", "verify", $leader['charname'])) . "'>{$flolang->character_api_verify_link_fromguilddetails}</a>"; } elseif ($flouser->get_permission("guild", "moderate")) { $verifiednotice = $flouserdata->get_username($leader['ownerid']); } } $tabbar = $florensia->tabbar($tabbar); $guildoverview = "\n <div class='small' style='float:right; font-weight:bold;'>{$verifiednotice}</div>\n <div style='margin-top:10px;'>{$tabbar['tabbar']}</div>\n <a name='details'></a>\n <div name='details'>\n {$guildlogo}\n <div class='subtitle small' style='min-height:190px; padding:5px;'>\n {$archivimage}\n {$guildranking}\n <div style='margin-right:150px;'>\n <table style='width:100%;'>\n <tr><td style='width:150px;'>{$flolang->guild_title_guildname}</td><td>" . $florensia->escape($guild['guildname']) . " " . floclass_guild::get_language_pic($guild['misc_language']) . "</td></tr>\n <tr><td>{$flolang->guild_title_server}</td><td><a href='{$florensia->root}/statistics/" . $florensia->escape($guild['server']) . "'>" . $florensia->escape($guild['server']) . "</a></td></tr>\n {$deletedguildnotice}\n {$memberlistoverall}\n {$guildcontactlist}\n </table>\n </div>\n {$privacynotice}\n </div>\n {$guilddescription}\n {$wantedlist}\n " . $florensia->adsense(0) . "\n </div>\n {$memberlist}\n {$latestactivity}\n {$guildsettings}\n {$tabbar['jscript']}\n "; $pagetitle = "<div class='subtitle' style='margin-bottom:10px;'><a href='{$florensia->root}/guilddetails'>{$flolang->guild_sitetitle}</a> > <a href='" . $florensia->outlink(array('guildranking'), array('server' => $guild['server'], 'order' => 'name')) . "'>" . $florensia->escape($guild['server']) . "</a> > " . $florensia->escape($guild['guildname']) . "</div>"; $florensia->sitetitle($florensia->escape($guild['server'])); $florensia->sitetitle($florensia->escape($guild['guildname'])); } else { $pagetitle = "<div class='subtitle' style='margin-bottom:10px;'><a href='{$florensia->root}/guilddetails'>{$flolang->guild_sitetitle}</a></div>"; $guildoverview = "<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>"; } } elseif (strlen($_GET['search']) > 0) { /*if (strlen($_GET['notfound']) OR strlen($_GET['search'])) { if ($_GET['notfound']) { $_GET['search'] = $_GET['notfound']; $notfoundnotice = "<b>".$flolang->sprintf($flolang->character_api_notfound_long, $florensia->escape($_GET['notfound']))."</b>"; }*/ $cachelimit = 100; $queryguildsearch = MYSQL_QUERY("SELECT memberamount, server, guildname, guildid FROM flobase_guild WHERE guildname LIKE '%" . get_searchstring($_GET['search'], 0) . "%' AND memberamount!='0' ORDER BY guildname LIMIT {$cachelimit}");