Ejemplo n.º 1
0
function zoneSortSelect()
{
    global $lang, $config, $dDB, $wDB;
    $cacheFilename = 'quest_zone_sort_' . $config['lang'] . '.html';
    if (checkUseCacheHtml($cacheFilename, 24 * 60 * 60)) {
        $zone_sort = $dDB->selectCol("SELECT `ZoneOrSort` FROM `quest_template` GROUP BY `ZoneOrSort`");
        $areas = $wDB->select("SELECT `id` AS ARRAY_KEY, `map_id`, `zone_id`, `name` FROM `wowd_zones` WHERE `id` IN (?a)", $zone_sort);
        $q_zones = array();
        $q_sort = array();
        foreach ($zone_sort as $z) {
            if ($z > 0) {
                $area = @$areas[$z];
                $map = $area['map_id'];
                if (!isset($q_zones[$map])) {
                    $q_zones[$map]['name'] = getMapName($map);
                    $q_zones[$map]['areas'] = array();
                }
                $q_zones[$map]['areas'][$z] = $area['name'];
            } else {
                if ($z < 0) {
                    $q_sort[-$z] = getQuestSort(-$z);
                }
            }
        }
        // Sort it
        uasort($q_zones, 'cmpZones');
        uasort($q_sort, 'strcmp');
        echo '<select name="ZoneID" style="width: 49%">';
        echo '<option value=0>' . $lang['anything'] . '</option>' . "\n";
        foreach ($q_zones as $map => $z) {
            if (count($z['areas']) > 1) {
                uasort($z['areas'], 'strcmp');
                echo '<optgroup label="' . $z['name'] . '">';
                foreach ($z['areas'] as $id => $name) {
                    echo '<option value=' . $id . '>' . $name . '</option>' . "\n";
                }
                echo '</optgroup>';
            } else {
                foreach ($z['areas'] as $id => $name) {
                    echo '<option value=' . $id . '>' . $name . '</option>' . "\n";
                }
            }
        }
        echo "</select>\n";
        echo '<select name="SortID" style="width: 49%">';
        echo '<option value=0>' . $lang['anything'] . '</option>' . "\n";
        foreach ($q_sort as $id => $name) {
            echo '<option value=' . $id . '>' . $name . '</option>' . "\n";
        }
        echo "</select>";
        flushHtmlCache($cacheFilename);
    }
}
Ejemplo n.º 2
0
    echo "<table class=stat cellSpacing=0 cellPadding=0><tbody><tr class=stat_top>";
    foreach ($list as $r) {
        $pct = $total ? $data[$r] / $total * 100 : 0;
        $height = $pct * 4;
        $pct = sprintf("%0.2f%%", $pct);
        echo "<td class=st_data>{$pct}<br><img src=\"{$module_path}/img/column.gif\" width=\"79\" height=\"{$height}\" alt=\"{$pct}\"/></td>";
    }
    echo "</tr><tr class=stat_bot>";
    foreach ($list as $r) {
        echo "<td class=st_data><img src=" . getRaceImage($r, rand() % 2) . " width=32px><br>" . $data[$r] . "</td>";
    }
    echo "</tr>";
    echo "</tbody></table>";
}
$cacheFilename = 'statistic_' . $config['lang'] . '.html';
if (checkUseCacheHtml($cacheFilename, 60 * 60 * 24)) {
    //******************************************************************************
    // Основные настройки статистики
    //******************************************************************************
    $alliance_race = array(1, 3, 4, 7, 11);
    // Список рас альянса
    $horde_race = array(2, 5, 6, 8, 10);
    // Список рас орды
    $class = array(11, 5, 4, 1, 8, 9, 2, 3, 7, 6);
    // Классы по которым собираем статистику
    // Статистика аккаунтов
    $accs = $rDB->selectcell("SELECT count(`id`) FROM `account`;");
    // Статистика онлайн
    $onlineal = $cDB->selectcell("SELECT count(`guid`) FROM `characters` WHERE (`online` > '0' AND `race` IN (?a))", $alliance_race);
    $onlinehr = $cDB->selectcell("SELECT count(`guid`) FROM `characters` WHERE (`online` > '0' AND `race` IN (?a))", $horde_race);
    $onlinePl = $onlineal + $onlinehr;
Ejemplo n.º 3
0
<?php

include_once "include/map_data.php";
$inst_list = array(array(13, 20, 389, 1637, "Horde Only"), array(16, 24, 36, 40, "Mainly Alliance"), array(16, 24, 43, 17, "Mainly Horde"), array(17, 25, 33, 130, ""), array(20, 28, 48, 331, ""), array(21, 29, 34, 1519, "Alliance Only"), array(23, 31, 47, 17, ""), array(24, 32, 90, 1, ""), array(28, 44, 189, 85, ""), array(33, 41, 129, 17, ""), array(36, 44, 70, 3, ""), array(40, 52, 349, 405, ""), array(42, 50, 209, 440, ""), array(45, 54, 109, 8, ""), array(48, 60, 230, 46, "Located in Blackrock Mountain"), array(53, 61, 229, 46, "Located in Blackrock Mountain"), array(54, 61, 429, 357, ""), array(56, 61, 289, 28, ""), array(56, 61, 329, 28, ""), array(56, 70, 309, 33, "20 person raid"), array(60, 70, 509, 1377, "20 person raid"), array(60, 70, 531, 1377, "40 person raid"), array(60, 70, 469, 1583, "40 person raid Located in Blackrock Mountain"), array(60, 70, 409, 1584, "40 person raid Located in Blackrock Mountain"), array(60, 67, 543, 3483, ""), array(60, 68, 542, 3483, ""), array(69, 77, 540, 3483, ""), array(70, 77, 544, 3483, "25 man raid"), array(61, 69, 547, 3521, ""), array(62, 70, 546, 3521, ""), array(69, 77, 545, 3521, ""), array(70, 77, 548, 3521, "25 man raid"), array(63, 71, 557, 3519, ""), array(64, 72, 558, 3519, ""), array(66, 74, 556, 3519, ""), array(69, 77, 555, 3519, ""), array(66, 73, 560, 2300, ""), array(68, 77, 269, 2300, ""), array(70, 77, 534, 2300, "25 man raid"), array(68, 77, 554, 3523, ""), array(69, 77, 552, 3523, ""), array(69, 77, 553, 3523, ""), array(70, 77, 550, 3523, "25 man raid"), array(70, 77, 532, 41, "10 man Riad"), array(70, 77, 564, 3520, "25 man raid"), array(70, 77, 565, 3522, "25 man raid"), array(70, 77, 568, 3433, ""), array(70, 77, 580, 4080, ""), array(70, 77, 585, 4080, ""), array(72, 74, 601, 65, ""), array(73, 75, 619, 65, ""), array(75, 77, 608, 4395, ""), array(76, 78, 604, 66, ""), array(78, 80, 650, 210, ""), array(74, 76, 600, 66, ""), array(79, 80, 575, 495, ""), array(69, 72, 574, 495, ""), array(71, 73, 576, 3537, ""), array(79, 80, 578, 3537, ""), array(79, 79, 595, 440, ""), array(77, 78, 599, 67, ""), array(79, 80, 602, 67, ""), array(80, 80, 668, 210, ""), array(80, 80, 632, 210, ""), array(80, 80, 658, 210, ""), array(60, 70, 533, 139, "Most difficult 40 person Raid"), array(60, 70, 249, 15, "40 person raid"), array(80, 80, 649, 210, ""), array(80, 80, 616, 3537, ""), array(80, 80, 624, 4197, ""), array(80, 80, 603, 67, ""), array(80, 80, 615, 65, ""), array(80, 80, 724, 65, ""), array(80, 80, 631, 210, ""));
function outInstRow($id, $level, $zone, $comment)
{
    echo "<tr>";
    echo "<td align=center><img src=" . getMapIcon($id) . "></td>";
    echo "<td class=lvl>{$level}</td>";
    echo "<td>&nbsp;<a href=?instance=" . $id . ">" . getMapName($id) . "</a></td>";
    echo "<td>" . getAreaName($zone) . "</td>";
    //    echo "<td>$comment</td>";
    echo "</tr>";
}
$cacheFilename = 'inst_list_' . $config['lang'] . '.html';
if (checkUseCacheHtml($cacheFilename, 24 * 60 * 60)) {
    global $lang;
    echo "<table class=report width=100%>";
    echo "<td class=head colspan=4>{$lang['instance']}</td>";
    echo "<tr><th width=1px></th><th>{$lang['level']}</th><th>{$lang['instances']}</th><th>{$lang['in_zone']}</th></tr>";
    foreach ($inst_list as $inst) {
        $level = $inst[0] == $inst[1] ? $inst[0] : $inst[0] . "-" . $inst[1];
        outInstRow($inst[2], $level, $inst[3], $inst[4]);
    }
    echo "</table>";
    flushHtmlCache($cacheFilename);
}