mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
removing smarty - part XII
- readded quest/quests, zones - delayed filter-evaluation, also linked filterObj to page to be applied to cacheKey - added check for modulo calculation with floats (fixes "0 years" - duarions) Quests: * added category-locales * creating objectives shouldn't be quite as intensive anymore
This commit is contained in:
@@ -31,6 +31,8 @@ trait ListPage
|
||||
protected $typeId = 0;
|
||||
protected $filter = [];
|
||||
|
||||
private $filterObj = null;
|
||||
|
||||
protected function generateCacheKey()
|
||||
{
|
||||
// mode, type, typeId, employee-flag, localeId,
|
||||
@@ -40,7 +42,7 @@ trait ListPage
|
||||
$key[] = $this->category ? implode('.', $this->category) : '-1';
|
||||
|
||||
// filter
|
||||
$key[] = $this->filter ? md5(serialize($this->filter)) : '-1';
|
||||
$key[] = $this->filterObj ? md5(serialize($this->filterObj)) : '-1';
|
||||
|
||||
return implode('_', $key);
|
||||
}
|
||||
|
||||
@@ -668,11 +668,15 @@ abstract class Filter
|
||||
$this->error = true;
|
||||
}
|
||||
}
|
||||
|
||||
$this->evaluateFilter();
|
||||
}
|
||||
}
|
||||
|
||||
// use to generate cacheKey for filterable pages
|
||||
public function __sleep()
|
||||
{
|
||||
return ['formData'];
|
||||
}
|
||||
|
||||
public function urlize(array $override = [], array $addCr = [])
|
||||
{
|
||||
$_ = [];
|
||||
@@ -741,6 +745,9 @@ abstract class Filter
|
||||
|
||||
public function getConditions()
|
||||
{
|
||||
if (!$this->cndSet)
|
||||
$this->evaluateFilter();
|
||||
|
||||
return $this->cndSet;
|
||||
}
|
||||
|
||||
@@ -790,7 +797,7 @@ abstract class Filter
|
||||
|
||||
// single cnd?
|
||||
if (!$qry)
|
||||
$this->error = 1;
|
||||
$this->error = true;
|
||||
else if (count($qry) > 1)
|
||||
array_unshift($qry, 'OR');
|
||||
else
|
||||
|
||||
@@ -832,11 +832,11 @@ class Util
|
||||
else
|
||||
{
|
||||
$_ = $s['d'] + $s['h'] / 24;
|
||||
if ($_ && !($_ % 364)) // whole years
|
||||
if ($_ > 1 && !($_ % 364)) // whole years
|
||||
return round(($s['d'] + $s['h'] / 24) / 364, 2)." ".Lang::$timeUnits[$s['d'] / 364 == 1 && !$s['h'] ? 'sg' : 'pl'][0];
|
||||
if ($_ && !($_ % 30)) // whole month
|
||||
if ($_ > 1 && !($_ % 30)) // whole month
|
||||
return round(($s['d'] + $s['h'] / 24) / 30, 2)." ".Lang::$timeUnits[$s['d'] / 30 == 1 && !$s['h'] ? 'sg' : 'pl'][1];
|
||||
if ($_ && !($_ % 7)) // whole weeks
|
||||
if ($_ > 1 && !($_ % 7)) // whole weeks
|
||||
return round(($s['d'] + $s['h'] / 24) / 7, 2)." ".Lang::$timeUnits[$s['d'] / 7 == 1 && !$s['h'] ? 'sg' : 'pl'][2];
|
||||
if ($s['d'])
|
||||
return round($s['d'] + $s['h'] / 24, 2)." ".Lang::$timeUnits[$s['d'] == 1 && !$s['h'] ? 'sg' : 'pl'][3];
|
||||
|
||||
@@ -426,7 +426,74 @@ $lang = array(
|
||||
83 => "Legendär", 84 => "Eskorte", 85 => "Heroisch", 88 => "Schlachtzug (10)", 89 => "Schlachtzug (25)"
|
||||
),
|
||||
'cat' => array(
|
||||
// todo: after zones
|
||||
0 => array( "Östliche Königreiche",
|
||||
36 => "Alteracgebirge", 45 => "Arathihochland", 46 => "Brennende Steppe", 279 => "Dalarankrater", 25 => "Der Schwarzfels",
|
||||
2257 => "Die Tiefenbahn", 1 => "Dun Morogh", 10 => "Dämmerwald", 1537 => "Eisenschmiede", 41 => "Gebirgspass der Totenwinde",
|
||||
3433 => "Geisterlande", 47 => "Hinterland", 3430 => "Immersangwald", 4080 => "Insel von Quel'Danas", 38 => "Loch Modan",
|
||||
4298 => "Pestländer: Die Scharlachrote Enklave", 44 => "Rotkammgebirge", 33 => "Schlingendorntal", 51 => "Sengende Schlucht", 3487 => "Silbermond",
|
||||
130 => "Silberwald", 1519 => "Sturmwind", 11 => "Sumpfland", 8 => "Sümpfe des Elends", 85 => "Tirisfal",
|
||||
1497 => "Unterstadt", 4 => "Verwüstete Lande", 267 => "Vorgebirge des Hügellands", 12 => "Wald von Elwynn", 40 => "Westfall",
|
||||
28 => "Westliche Pestländer", 3 => "Ödland", 139 => "Östliche Pestländer"
|
||||
),
|
||||
1 => array( "Kalimdor",
|
||||
16 => "Azshara", 3524 => "Azurmythosinsel", 3525 => "Blutmythosinsel", 17 => "Brachland", 1657 => "Darnassus",
|
||||
405 => "Desolace", 3557 => "Die Exodar", 1638 => "Donnerfels", 148 => "Dunkelküste", 14 => "Durotar",
|
||||
15 => "Düstermarschen", 331 => "Eschental", 357 => "Feralas", 1216 => "Holzschlundfeste", 490 => "Krater von Un'Goro",
|
||||
493 => "Mondlichtung", 215 => "Mulgore", 1637 => "Orgrimmar", 1377 => "Silithus", 406 => "Steinkrallengebirge",
|
||||
440 => "Tanaris", 400 => "Tausend Nadeln", 141 => "Teldrassil", 361 => "Teufelswald", 618 => "Winterquell"
|
||||
),
|
||||
8 => array( "Scherbenwelt",
|
||||
3483 => "Höllenfeuerhalbinsel", 3518 => "Nagrand", 3523 => "Nethersturm", 3520 => "Schattenmondtal", 3522 => "Schergrat",
|
||||
3703 => "Shattrath", 3679 => "Skettis", 3519 => "Wälder von Terokkar", 3521 => "Zangarmarschen"
|
||||
),
|
||||
10 => array( "Nordend",
|
||||
3537 => "Boreanische Tundra", 4395 => "Dalaran", 495 => "Der heulende Fjord", 4742 => "Hrothgar's Landeplatz", 67 => "Die Sturmgipfel",
|
||||
65 => "Drachenöde", 210 => "Eiskrone", 394 => "Grizzlyhügel", 4024 => "Kaltarra", 3711 => "Sholazarbecken",
|
||||
4197 => "Tausendwintersee", 66 => "Zul'Drak"
|
||||
),
|
||||
2 => array( "Dungeons",
|
||||
4494 => "Ahn'kahet: Das Alte Königreich", 3790 => "Auchenaikrypta", 4277 => "Azjol-Nerub", 209 => "Burg Schattenfang", 206 => "Burg Utgarde",
|
||||
4100 => "Das Ausmerzen von Stratholme", 4228 => "Das Oculus", 796 => "Das Scharlachrote Kloster", 717 => "Das Verlies", 3713 => "Der Blutkessel",
|
||||
3905 => "Der Echsenkessel", 2437 => "Der Flammenschlund", 4120 => "Der Nexus", 3716 => "Der Tiefensumpf", 2366 => "Der schwarze Morast",
|
||||
3848 => "Die Arkatraz", 3847 => "Die Botanika", 3715 => "Die Dampfkammer", 4272 => "Die Hallen der Blitze", 4264 => "Die Hallen des Steins",
|
||||
718 => "Die Höhlen des Wehklagens", 3849 => "Die Mechanar", 4809 => "Die Seelenschmiede", 3717 => "Die Sklavenunterkünfte", 1581 => "Die Todesminen",
|
||||
4415 => "Die Violette Festung", 3714 => "Die zerschmetterten Hallen", 2557 => "Düsterbruch", 4196 => "Feste Drak'Tharon", 3845 => "Festung der Stürme",
|
||||
721 => "Gnomeregan", 4813 => "Grube von Saron", 4416 => "Gundrak", 4820 => "Hallen der Reflexion", 1941 => "Höhlen der Zeit",
|
||||
3562 => "Höllenfeuerbollwerk", 3535 => "Höllenfeuerzitadelle", 722 => "Hügel der Klingenhauer", 491 => "Kral der Klingenhauer", 3792 => "Managruft",
|
||||
2100 => "Maraudon", 4723 => "Prüfung des Champions", 3789 => "Schattenlabyrinth", 2057 => "Scholomance", 1583 => "Schwarzfelsspitze",
|
||||
1584 => "Schwarzfelstiefen", 3791 => "Sethekkhallen", 2017 => "Stratholme", 4131 => "Terrasse der Magister", 719 => "Tiefschwarze Grotte",
|
||||
1196 => "Turm Utgarde", 1337 => "Uldaman", 1477 => "Versunkener Tempel", 2367 => "Vorgebirge des Alten Hügellands", 1176 => "Zul'Farrak"
|
||||
),
|
||||
3 => array( "Schlachtzüge",
|
||||
4603 => "Archavon's Kammer", 3842 => "Das Auge", 4500 => "Das Auge der Ewigkeit", 4493 => "Das Obsidiansanktum", 3959 => "Der Schwarze Tempel",
|
||||
4812 => "Eiskronenzitadelle", 2717 => "Geschmolzener Kern", 3923 => "Gruul's Unterschlupf", 3607 => "Höhle des Schlangenschreins", 3606 => "Hyjalgipfel",
|
||||
3457 => "Karazhan", 3836 => "Magtheridons Kammer", 3456 => "Naxxramas", 2159 => "Onyxias Hort", 2677 => "Pechschwingenhort",
|
||||
4722 => "Prüfung des Kreuzfahrers", 3429 => "Ruinen von Ahn'Qiraj", 4075 => "Sonnenbrunnenplateau", 3428 => "Tempel von Ahn'Qiraj", 4273 => "Ulduar",
|
||||
3805 => "Zul'Aman", 1977 => "Zul'Gurub"
|
||||
),
|
||||
4 => array( "Klassen",
|
||||
-263 => "Druide", -61 => "Hexenmeister", -261 => "Jäger", -81 => "Krieger", -161 => "Magier",
|
||||
-141 => "Paladin", -262 => "Priester", -82 => "Schamane", -162 => "Schurke", -372 => "Todesritter"
|
||||
),
|
||||
5 => array( "Berufe",
|
||||
-181 => "Alchemie", -101 => "Angeln", -324 => "Erste Hilfe", -201 => "Ingenieurskunst", -371 => "Inschriftenkunde",
|
||||
-373 => "Juwelenschleifen", -304 => "Kochkunst", -24 => "Kräuterkunde", -182 => "Lederverarbeitung", -121 => "Schmiedekunst",
|
||||
-264 => "Schneiderei"
|
||||
),
|
||||
6 => array( "Schlachtfelder",
|
||||
2597 => "Alteractal", 3358 => "Arathibecken", 3820 => "Auge des Sturms", 4710 => "Insel der Eroberung", 3277 => "Kriegshymnenschlucht",
|
||||
-25 => "Schlachtfelder", 4384 => "Strand der Uralten"
|
||||
),
|
||||
9 => array( "Weltereignisse",
|
||||
-370 => "Braufest", -1002 => "Kinderwoche", -364 => "Dunkelmond-Jahrmarkt", -41 => "Tag der Toten", -1003 => "Schlotternächte",
|
||||
-1005 => "Erntedankfest", -376 => "Liebe liegt in der Luft", -366 => "Mondfest", -369 => "Sonnenwende", -1006 => "Neujahr",
|
||||
-375 => "Die Pilgerfreuden", -374 => "Nobelgarten", -1001 => "Winterhauch"
|
||||
),
|
||||
7 => array( "Verschiedenes",
|
||||
-365 => "Krieg von Ahn'Qiraj", -1010 => "Dungeonfinder", -1 => "Episch", -344 => "Legendär", -367 => "Ruf",
|
||||
-368 => "Invasion der Geißel", -241 => "Turnier"
|
||||
),
|
||||
-2 => "Nicht kategorisiert"
|
||||
)
|
||||
),
|
||||
'title' => array(
|
||||
|
||||
@@ -413,7 +413,74 @@ $lang = array(
|
||||
83 => "Legendary", 84 => "Escort", 85 => "Heroic", 88 => "Raid (10)", 89 => "Raid (25)"
|
||||
),
|
||||
'cat' => array(
|
||||
// todo: after zones
|
||||
0 => array( "Eastern Kingdoms",
|
||||
36 => "Alterac Mountains", 45 => "Arathi Highlands", 3 => "Badlands", 25 => "Blackrock Mountain", 4 => "Blasted Lands",
|
||||
46 => "Burning Steppes", 279 => "Dalaran Crater", 41 => "Deadwind Pass", 2257 => "Deeprun Tram", 1 => "Dun Morogh",
|
||||
10 => "Duskwood", 139 => "Eastern Plaguelands", 12 => "Elwynn Forest", 3430 => "Eversong Woods", 3433 => "Ghostlands",
|
||||
267 => "Hillsbrad Foothills", 1537 => "Ironforge", 4080 => "Isle of Quel'Danas", 38 => "Loch Modan", 44 => "Redridge Mountains",
|
||||
51 => "Searing Gorge", 3487 => "Silvermoon City", 130 => "Silverpine Forest", 1519 => "Stormwind City", 33 => "Stranglethorn Vale",
|
||||
8 => "Swamp of Sorrows", 47 => "The Hinterlands", 4298 => "The Scarlet Enclave", 85 => "Tirisfal Glades", 1497 => "Undercity",
|
||||
28 => "Western Plaguelands", 40 => "Westfall", 11 => "Wetlands"
|
||||
),
|
||||
1 => array( "Kalimdor",
|
||||
331 => "Ashenvale", 16 => "Azshara", 3524 => "Azuremyst Isle", 3525 => "Bloodmyst Isle", 148 => "Darkshore",
|
||||
1657 => "Darnassus", 405 => "Desolace", 14 => "Durotar", 15 => "Dustwallow Marsh", 361 => "Felwood",
|
||||
357 => "Feralas", 493 => "Moonglade", 215 => "Mulgore", 1637 => "Orgrimmar", 1377 => "Silithus",
|
||||
406 => "Stonetalon Mountains", 440 => "Tanaris", 141 => "Teldrassil", 17 => "The Barrens", 3557 => "The Exodar",
|
||||
457 => "The Veiled Sea", 400 => "Thousand Needles", 1638 => "Thunder Bluff", 490 => "Un'Goro Crater", 618 => "Winterspring"
|
||||
),
|
||||
8 => array( "Outland",
|
||||
3522 => "Blade's Edge Mountains", 3483 => "Hellfire Peninsula", 3518 => "Nagrand", 3523 => "Netherstorm", 3520 => "Shadowmoon Valley",
|
||||
703 => "Shattrath City", 3679 => "Skettis", 3519 => "Terokkar Forest", 3521 => "Zangarmarsh"
|
||||
),
|
||||
10 => array( "Northrend",
|
||||
3537 => "Borean Tundra", 2817 => "Crystalsong Forest", 4395 => "Dalaran", 65 => "Dragonblight", 394 => "Grizzly Hills",
|
||||
495 => "Howling Fjord", 4742 => "Hrothgar's Landing", 210 => "Icecrown", 3711 => "Sholazar Basin", 67 => "The Storm Peaks",
|
||||
4197 => "Wintergrasp", 66 => "Zul'Drak"
|
||||
),
|
||||
2 => array( "Dungeons",
|
||||
4494 => "Ahn'kahet: The Old Kingdom", 3790 => "Auchenai Crypts", 4277 => "Azjol-Nerub", 719 => "Blackfathom Deeps", 1584 => "Blackrock Depths",
|
||||
1583 => "Blackrock Spire", 1941 => "Caverns of Time", 3905 => "Coilfang Reservoir", 2557 => "Dire Maul", 4196 => "Drak'Tharon Keep",
|
||||
721 => "Gnomeregan", 4416 => "Gundrak", 4272 => "Halls of Lightning", 4820 => "Halls of Reflection", 4264 => "Halls of Stone",
|
||||
3562 => "Hellfire Ramparts", 3535 => "Hellfire Citadel", 4131 => "Magisters' Terrace", 3792 => "Mana-Tombs", 2100 => "Maraudon",
|
||||
2367 => "Old Hillsbrad Foothills", 4813 => "Pit of Saron", 2437 => "Ragefire Chasm", 722 => "Razorfen Downs", 491 => "Razorfen Kraul",
|
||||
796 => "Scarlet Monastery", 2057 => "Scholomance", 3791 => "Sethekk Halls", 3789 => "Shadow Labyrinth", 209 => "Shadowfang Keep",
|
||||
2017 => "Stratholme", 1477 => "Sunken Temple", 3845 => "Tempest Keep", 3848 => "The Arcatraz", 2366 => "The Black Morass",
|
||||
3713 => "The Blood Furnace", 3847 => "The Botanica", 4100 => "The Culling of Stratholme", 1581 => "The Deadmines", 4809 => "The Forge of Souls",
|
||||
3849 => "The Mechanar", 4120 => "The Nexus", 4228 => "The Oculus", 3714 => "The Shattered Halls", 3717 => "The Slave Pens",
|
||||
3715 => "The Steamvault", 717 => "The Stockade", 3716 => "The Underbog", 4415 => "The Violet Hold", 4723 => "Trial of the Champion",
|
||||
1337 => "Uldaman", 206 => "Utgarde Keep", 1196 => "Utgarde Pinnacle", 718 => "Wailing Caverns", 1176 => "Zul'Farrak"
|
||||
),
|
||||
3 => array( "Raids",
|
||||
3959 => "Black Temple", 2677 => "Blackwing Lair", 3923 => "Gruul's Lair", 3606 => "Hyjal Summit", 4812 => "Icecrown Citadel",
|
||||
3457 => "Karazhan", 3836 => "Magtheridon's Lair", 2717 => "Molten Core", 3456 => "Naxxramas", 2159 => "Onyxia's Lair",
|
||||
3429 => "Ruins of Ahn'Qiraj", 3607 => "Serpentshrine Cavern", 4075 => "Sunwell Plateau", 3428 => "Temple of Ahn'Qiraj", 3842 => "The Eye",
|
||||
4500 => "The Eye of Eternity", 4493 => "The Obsidian Sanctum", 4722 => "Trial of the Crusader", 4273 => "Ulduar", 4603 => "Vault of Archavon",
|
||||
3805 => "Zul'Aman", 1977 => "Zul'Gurub"
|
||||
),
|
||||
4 => array( "Classes",
|
||||
-372 => "Death Knight", -263 => "Druid", -261 => "Hunter", -161 => "Mage", -141 => "Paladin",
|
||||
-262 => "Priest", -162 => "Rogue", -82 => "Shaman", -61 => "Warlock", -81 => "Warrior"
|
||||
),
|
||||
5 => array( "Professions",
|
||||
-181 => "Alchemy", -121 => "Blacksmithing", -304 => "Cooking", -201 => "Engineering", -324 => "First Aid",
|
||||
-101 => "Fishing", -24 => "Herbalism", -371 => "Inscription", -373 => "Jewelcrafting", -182 => "Leatherworking",
|
||||
-264 => "Tailoring"
|
||||
),
|
||||
6 => array( "Battlegrounds",
|
||||
-25 => "All", 2597 => "Alterac Valley", 3358 => "Arathi Basin", 3820 => "Eye of the Storm", 4710 => "Isle of Conquest",
|
||||
4384 => "Strand of the Ancients", 3277 => "Warsong Gulch"
|
||||
),
|
||||
9 => array( "Seasonal",
|
||||
-370 => "Brewfest", -1002 => "Children's Week", -364 => "Darkmoon Faire", -41 => "Day of the Dead", -1003 => "Hallow's End",
|
||||
-1005 => "Harvest Festival", -376 => "Love is in the Air", -366 => "Lunar Festival", -369 => "Midsummer", -1006 => "New Year's Eve",
|
||||
-375 => "Pilgrim's Bounty", -374 => "Noblegarden", -1001 => "Winter Veil"
|
||||
),
|
||||
7 => array( "Miscellaneous",
|
||||
-365 => "Ahn'Qiraj War Effort", -241 => "Argent Tournament", -1010 => "Dungeon Finder", -1 => "Epic", -344 => "Legendary",
|
||||
-367 => "Reputation", -368 => "Scourge Invasion"
|
||||
),
|
||||
-2 => "Uncategorized"
|
||||
)
|
||||
),
|
||||
'title' => array(
|
||||
|
||||
@@ -381,7 +381,74 @@ $lang = array(
|
||||
83 => "Legendaria", 84 => "Escolta", 85 => "Heroica", 88 => "Banda (10)", 89 => "Banda (25)"
|
||||
),
|
||||
'cat' => array(
|
||||
// todo: after zones
|
||||
0 => array( "Reinos del Este",
|
||||
3430 => "Bosque Canción Eterna", 130 => "Bosque de Argénteos", 12 => "Bosque de Elwynn", 10 => "Bosque del Ocaso", 3487 => "Ciudad de Lunargenta",
|
||||
1519 => "Ciudad de Ventormenta", 85 => "Claros de Tirisfal", 279 => "Cráter de Dalaran", 1 => "Dun Morogh", 1497 => "Entrañas",
|
||||
1537 => "Forjaz", 4080 => "Isla de Quel'Danas", 51 => "La Garganta de Fuego", 267 => "Laderas de Trabalomas", 46 => "Las Estepas Ardientes",
|
||||
4 => "Las Tierras Devastadas", 38 => "Loch Modan", 11 => "Los Humedales", 25 => "Montaña Roca Negra", 44 => "Montañas Crestagrana",
|
||||
36 => "Montañas de Alterac", 8 => "Pantano de las Penas", 41 => "Paso de la Muerte", 40 => "Páramos de Poniente", 45 => "Tierras Altas de Arathi",
|
||||
3433 => "Tierras Fantasma", 3 => "Tierras Inhóspitas", 139 => "Tierras de la Peste del Este", 28 => "Tierras de la Peste del Oeste",4298 => "Tierras de la Peste: El Enclave Escarlata",
|
||||
47 => "Tierras del Interior", 2257 => "Tranvía Subterráneo", 33 => "Vega de Tuercespina"
|
||||
),
|
||||
1 => array( "Kalimdor",
|
||||
16 => "Azshara", 1216 => "Bastión Fauces de Madera", 1638 => "Cima del Trueno", 493 => "Claro de la Luna", 148 => "Costa Oscura",
|
||||
490 => "Cráter de Un'Goro", 618 => "Cuna del Invierno", 1657 => "Darnassus", 405 => "Desolace", 14 => "Durotar",
|
||||
3557 => "El Exodar", 357 => "Feralas", 361 => "Frondavil", 3524 => "Isla Bruma Azur", 3525 => "Isla Bruma de Sangre",
|
||||
400 => "Las Mil Agujas", 17 => "Los Baldíos", 15 => "Marjal Revolcafango", 215 => "Mulgore", 1637 => "Orgrimmar",
|
||||
406 => "Sierra Espolón", 1377 => "Silithus", 440 => "Tanaris", 141 => "Teldrassil", 331 => "Vallefresno"
|
||||
),
|
||||
8 => array( "Terrallende",
|
||||
3519 => "Bosque de Terokkar", 3703 => "Ciudad de Shattrath", 3521 => "Marisma de Zangar", 3522 => "Montañas Filospada", 3518 => "Nagrand",
|
||||
3483 => "Península del Fuego Infernal", 3679 => "Skettis", 3523 => "Tormenta Abisal", 3520 => "Valle Sombraluna"
|
||||
),
|
||||
10 => array( "Rasganorte",
|
||||
65 => "Cementerio de Dragones", 394 => "Colinas Pardas", 4197 => "Conquista del Invierno", 210 => "Corona de Hielo", 3711 => "Cuenca de Sholazar",
|
||||
4395 => "Dalaran", 4742 => "Desembarco de Hrothgar", 495 => "Fiordo Aquilonal", 4024 => "Gelidar", 67 => "Las Cumbres Tormentosas",
|
||||
3537 => "Tundra Boreal", 66 => "Zul'Drak"
|
||||
),
|
||||
6 => array( "Campos de batalla",
|
||||
-25 => "Campos de batalla", 3358 => "Cuenca de Arathi", 3277 => "Garganta Grito de Guerra", 4710 => "Isla de la Conquista", 3820 => "Ojo de la Tormenta",
|
||||
4384 => "Playa de los Ancestros", 2597 => "Valle de Alterac"
|
||||
),
|
||||
4 => array( "Clases",
|
||||
-61 => "Brujo", -372 => "Caballero de la Muerte", -261 => "Cazador", -82 => "Chamán", -263 => "Druida",
|
||||
-81 => "Guerrero", -161 => "Mago", -141 => "Paladín", -162 => "Pícaro", -262 => "Sacerdote"
|
||||
),
|
||||
2 => array( "Mazmorras",
|
||||
4494 => "Ahn'kahet: El Antiguo Reino", 2367 => "Antiguas Laderas de Trabalomas", 4277 => "Azjol-Nerub", 4131 => "Bancal del Magister", 209 => "Castillo de Colmillo Oscuro",
|
||||
719 => "Cavernas de Brazanegra", 1941 => "Cavernas del Tiempo", 3535 => "Ciudadela del Fuego Infernal", 3790 => "Criptas Auchenai", 718 => "Cuevas de los Lamentos",
|
||||
1583 => "Cumbre de Roca Negra", 4264 => "Cámaras de Piedra", 4820 => "Cámaras de Reflexión", 4272 => "Cámaras de Relámpagos", 3848 => "El Arcatraz",
|
||||
4415 => "El Bastión Violeta", 3845 => "El Castillo de la Tempestad", 3713 => "El Horno de Sangre", 3847 => "El Invernáculo", 3849 => "El Mechanar",
|
||||
4120 => "El Nexo", 4228 => "El Oculus", 4196 => "Fortaleza de Drak'Tharon", 206 => "Fortaleza de Utgarde", 4813 => "Foso de Saron",
|
||||
721 => "Gnomeregan", 4416 => "Gundrak", 491 => "Horado Rajacieno", 2366 => "La Ciénaga Negra", 3715 => "La Cámara de Vapor",
|
||||
4809 => "La Forja de Almas", 2557 => "La Masacre", 4100 => "La Matanza de Stratholme", 3716 => "La Sotiénaga", 3789 => "Laberinto de las Sombras",
|
||||
717 => "Las Mazmorras", 1581 => "Las Minas de la Muerte", 3714 => "Las Salas Arrasadas", 2100 => "Maraudon", 796 => "Monasterio Escarlata",
|
||||
3562 => "Murallas del Fuego Infernal", 1196 => "Pináculo de Utgarde", 1584 => "Profundidades de Roca Negra", 4723 => "Prueba del Campeón", 3717 => "Recinto de los Esclavos",
|
||||
3905 => "Reserva Colmillo Torcido", 3791 => "Salas Sethekk", 2057 => "Scholomance", 2437 => "Sima Ígnea", 2017 => "Stratholme",
|
||||
1477 => "Templo Sumergido", 3792 => "Tumbas de Maná", 1337 => "Uldaman", 722 => "Zahúrda Rajacieno", 1176 => "Zul'Farrak"
|
||||
),
|
||||
5 => array( "Profesiones",
|
||||
-181 => "Alquimia", -304 => "Cocina", -24 => "Herboristería", -121 => "Herrería", -201 => "Ingeniería",
|
||||
-371 => "Inscripción", -373 => "Joyería", -182 => "Peletería", -101 => "Pesca", -324 => "Primeros auxilios",
|
||||
-264 => "Sastrería"
|
||||
),
|
||||
3 => array( "Bandas",
|
||||
3428 => "Ahn'Qiraj", 3607 => "Caverna Santuario Serpiente", 4812 => "Ciudadela de la Corona de Hielo", 3842 => "El Castillo de la Tempestad", 4500 => "El Ojo de la Eternidad",
|
||||
4493 => "El Sagrario Obsidiana", 3959 => "El Templo Oscuro", 2677 => "Guarida de Alanegra", 3923 => "Guarida de Gruul", 3836 => "Guarida de Magtheridon",
|
||||
2159 => "Guarida de Onyxia", 3457 => "Karazhan", 4603 => "La Cámara de Archavon", 3606 => "La Cima Hyjal", 4075 => "Meseta de La Fuente del Sol",
|
||||
3456 => "Naxxramas", 2717 => "Núcleo de Magma", 4722 => "Prueba del Cruzado", 3429 => "Ruinas de Ahn'Qiraj", 4273 => "Ulduar",
|
||||
805 => "Zul'Aman", 1977 => "Zul'Gurub"
|
||||
),
|
||||
9 => array( "Eventos del mundo",
|
||||
-370 => "Fiesta de la cerveza", -1002 => "Los Niños", -364 => "Feria de la Luna Negra", -41 => "Día de los Muertos", -1003 => "Halloween",
|
||||
-1005 => "Festival de la cosecha", -376 => "Amor en el aire", -366 => "Festival Lunar", -369 => "Solsticio", -1006 => "Año nuevo",
|
||||
-375 => "Generosidad", -374 => "Jardín Noble", -1001 => "Festival de Invierno"
|
||||
),
|
||||
7 => array( "Miscelánea",
|
||||
-365 => "Guerra de Ahn'Qiraj", -1010 => "Buscador de Mazmorras", -1 => "Épica", -344 => "Legendaria", -367 => "Reputación",
|
||||
-368 => "Invasión", -241 => "Torneo"
|
||||
),
|
||||
-2 => "Sin categoría"
|
||||
)
|
||||
),
|
||||
'title' => array(
|
||||
|
||||
@@ -381,7 +381,73 @@ $lang = array(
|
||||
83 => "Légendaire", 84 => "Escorte", 85 => "Héroïque", 88 => "Raid (10)", 89 => "Raid (25)"
|
||||
),
|
||||
'cat' => array(
|
||||
// todo: after zones
|
||||
0 => array( "Royaumes de l'est",
|
||||
10 => "Bois de la Pénombre", 3430 => "Bois des Chants éternels", 85 => "Clairières de Tirisfal", 267 => "Contreforts de Hautebrande", 279 => "Cratère de Dalaran",
|
||||
1 => "Dun Morogh", 41 => "Défilé de Deuillevent", 1537 => "Forgefer", 12 => "Forêt d'Elwynn", 130 => "Forêt des Pins argentés",
|
||||
1497 => "Fossoyeuse", 51 => "Gorge des Vents brûlants", 45 => "Hautes-terres d'Arathi", 1519 => "Hurlevent", 44 => "Les Carmines",
|
||||
47 => "Les Hinterlands", 11 => "Les Paluns", 3433 => "Les Terres fantômes", 38 => "Loch Modan", 3487 => "Lune-d'argent",
|
||||
139 => "Maleterres de l'est", 28 => "Maleterres de l'ouest", 4298 => "Maleterres : l'enclave Écarlate", 8 => "Marais des Chagrins", 40 => "Marche de l'Ouest",
|
||||
25 => "Mont Rochenoire", 36 => "Montagnes d'Alterac", 46 => "Steppes ardentes", 4 => "Terres foudroyées", 3 => "Terres ingrates",
|
||||
2257 => "Tram des profondeurs", 33 => "Vallée de Strangleronce", 4080 => "Île de Quel'Danas"
|
||||
),
|
||||
1 => array( "Kalimdor",
|
||||
16 => "Azshara", 618 => "Berceau-de-l'Hiver", 490 => "Cratère d'Un'Goro", 1657 => "Darnassus", 14 => "Durotar",
|
||||
405 => "Désolace", 357 => "Féralas", 361 => "Gangrebois", 3557 => "L'Exodar", 1638 => "Les Pitons du Tonnerre",
|
||||
406 => "Les Serres-Rocheuses", 17 => "Les Tarides", 15 => "Marécage d'Âprefange", 400 => "Mille pointes", 215 => "Mulgore",
|
||||
1637 => "Orgrimmar", 331 => "Orneval", 493 => "Reflet-de-Lune", 1216 => "Repaire des Grumegueules", 1377 => "Silithus",
|
||||
148 => "Sombrivage", 440 => "Tanaris", 141 => "Teldrassil", 3524 => "Île de Brume-azur", 3525 => "Île de Brume-sang"
|
||||
),
|
||||
8 => array( "Outreterre",
|
||||
3519 => "Forêt de Terokkar", 3522 => "Les Tranchantes", 3521 => "Marécage de Zangar", 3518 => "Nagrand", 3483 => "Péninsule des Flammes infernales",
|
||||
3523 => "Raz-de-Néant", 3703 => "Shattrath", 3679 => "Skettis", 3520 => "Vallée d'Ombrelune"
|
||||
),
|
||||
10 => array( "Norfendre",
|
||||
4742 => "Accostage de Hrothgar", 3711 => "Bassin de Sholazar", 4395 => "Dalaran", 65 => "Désolation des dragons", 495 => "Fjord Hurlant",
|
||||
4024 => "Frimarra", 4197 => "Joug-d'hiver", 210 => "La Couronne de glace", 394 => "Les Grisonnes", 67 => "Les pics Foudroyés",
|
||||
3537 => "Toundra Boréenne", 66 => "Zul'Drak"
|
||||
),
|
||||
6 => array( "Champs de bataille",
|
||||
3358 => "Bassin d'Arathi", -25 => "Champs de bataille", 3277 => "Goulet des Chanteguerres", 3820 => "L'Œil du cyclone", 4384 => "Rivage des Anciens",
|
||||
2597 => "Vallée d'Alterac", 4710 => "Île des Conquérants"
|
||||
),
|
||||
4 => array( "Classes",
|
||||
-82 => "Chaman", -261 => "Chasseur", -372 => "Chevalier de la mort", -263 => "Druide", -61 => "Démoniste",
|
||||
-81 => "Guerrier", -161 => "Mage", -141 => "Paladin", -262 => "Prêtre", -162 => "Voleur"
|
||||
),
|
||||
2 => array( "Donjons",
|
||||
4494 => "Ahn'kahet : l'Ancien royaume", 4277 => "Azjol-Nérub", 718 => "Cavernes des lamentations", 1196 => "Cime d'Utgarde", 2367 => "Contreforts de Hautebrande d'antan",
|
||||
3790 => "Cryptes Auchenaï", 209 => "Donjon d'Ombrecroc", 206 => "Donjon d'Utgarde", 4196 => "Donjon de Drak'Tharon", 3845 => "Donjon de la Tempête",
|
||||
4813 => "Fosse de Saron", 721 => "Gnomeregan", 2437 => "Gouffre de Ragefeu", 1941 => "Grottes du temps", 4416 => "Gundrak",
|
||||
2557 => "Hache-tripes", 491 => "Kraal de Tranchebauge", 3848 => "L'Arcatraz", 4228 => "L'Oculus", 4100 => "L'Épuration de Stratholme",
|
||||
4723 => "L'épreuve du champion", 3716 => "La Basse-tourbière", 3847 => "La Botanica", 4809 => "La Forge des âmes", 3713 => "La Fournaise du sang",
|
||||
717 => "La Prison", 3789 => "Labyrinthe des ombres", 3715 => "Le Caveau de la vapeur", 3849 => "Le Méchanar", 4120 => "Le Nexus",
|
||||
2366 => "Le Noir Marécage", 4415 => "Le fort Pourpre", 1581 => "Les Mortemines", 3714 => "Les Salles brisées", 3717 => "Les enclos aux esclaves",
|
||||
4272 => "Les salles de Foudre", 4264 => "Les salles de Pierre", 3791 => "Les salles des Sethekk", 2100 => "Maraudon", 796 => "Monastère écarlate",
|
||||
1583 => "Pic Rochenoire", 719 => "Profondeurs de Brassenoire", 1584 => "Profondeurs de Rochenoire", 3562 => "Remparts des Flammes infernales", 3905 => "Réservoir de Glissecroc",
|
||||
4820 => "Salles des Reflets", 2057 => "Scholomance", 722 => "Souilles de Tranchebauge", 2017 => "Stratholme", 1477 => "Temple englouti",
|
||||
4131 => "Terrasse des Magistères", 3792 => "Tombes-mana", 1337 => "Uldaman", 1176 => "Zul'Farrak"
|
||||
),
|
||||
5 => array( "Métiers",
|
||||
-181 => "Alchimiste", -371 => "Calligraphie", -304 => "Cuisinier", -121 => "Forgeron", -24 => "Herboristerie",
|
||||
-201 => "Ingénieur", -373 => "Joaillerie", -101 => "Pêcheur", -324 => "Secourisme", -264 => "Tailleur",
|
||||
-182 => "Travailleur du cuir"
|
||||
),
|
||||
3 => array( "Raids",
|
||||
3428 => "Ahn'Qiraj", 4603 => "Caveau d'Archavon", 4812 => "Citadelle de la Couronne de glace", 2717 => "Cœur du Magma", 3845 => "Donjon de la Tempête",
|
||||
3457 => "Karazhan", 4722 => "L'épreuve du croisé", 4500 => "L'Œil de l'éternité", 3836 => "Le repaire de Magtheridon", 4493 => "Le sanctum Obsidien",
|
||||
4987 => "Le sanctum Rubis", 3456 => "Naxxramas", 4075 => "Plateau du Puits de soleil", 3923 => "Repaire de Gruul", 2159 => "Repaire d'Onyxia",
|
||||
2677 => "Repaire de l'Aile noire", 3429 => "Ruines d'Ahn'Qiraj", 3606 => "Sommet d'Hyjal", 3959 => "Temple noir", 4273 => "Ulduar",
|
||||
3805 => "Zul'Aman", 1977 => "Zul'Gurub"
|
||||
),
|
||||
9 => array( "Évènements mondiaux",
|
||||
-370 => "Fête des Brasseurs", -1002 => "Semaine des enfants", -364 => "Foire de Sombrelune", -41 => "Jour des Morts", -1003 => "Sanssaint",
|
||||
-1005 => "Fête des moissons", -376 => "De l'amour dans l'air", -366 => "Fête lunaire", -369 => "Solstice d'été", -1006 => "Nouvel an",
|
||||
-375 => "Bienfaits du pèlerin", -374 => "Jardin des nobles", -1001 => "Voile d'hiver"
|
||||
),
|
||||
7 => array( "Divers",
|
||||
-365 => "Guerre d'Ahn'Qiraj", -1010 => "Chercheur de donjons", -1 => "Épique", -344 => "Légendaire", -367 => "Réputation",
|
||||
-368 => "Invasion du fléau", -241 => "Tournoi"),
|
||||
-2 => "Non classés"
|
||||
)
|
||||
),
|
||||
'title' => array(
|
||||
|
||||
@@ -381,7 +381,74 @@ $lang = array(
|
||||
83 => "Легенда", 84 => "Сопровождение", 85 => "Героическое", 88 => "Рейд (10)", 89 => "Рейд (25)"
|
||||
),
|
||||
'cat' => array(
|
||||
// todo: after zones
|
||||
0 => array( "Восточные королевства",
|
||||
36 => "Альтеракские горы", 3 => "Бесплодные земли", 11 => "Болотина", 8 => "Болото Печали", 47 => "Внутренние земли",
|
||||
139 => "Восточные Чумные земли", 4 => "Выжженные земли", 279 => "Даларанский кратер", 1 => "Дун Морог", 28 => "Западные Чумные земли",
|
||||
40 => "Западный Край", 44 => "Красногорье", 3430 => "Леса Вечной Песни", 38 => "Лок Модан", 3487 => "Луносвет",
|
||||
45 => "Нагорье Арати", 4080 => "Остров Кель'Данас", 41 => "Перевал Мертвого Ветра", 1497 => "Подгород", 2257 => "Подземный поезд",
|
||||
267 => "Предгорья Хилсбрада", 3433 => "Призрачные земли", 46 => "Пылающие степи", 130 => "Серебряный бор", 1537 => "Стальгорн",
|
||||
10 => "Сумеречный лес", 33 => "Тернистая долина", 85 => "Тирисфальские леса", 51 => "Тлеющее ущелье", 25 => "Черная гора",
|
||||
4298 => "Чумные земли: Анклав Алого ордена",1519 => "Штормград", 12 => "Элвиннский лес"
|
||||
),
|
||||
1 => array( "Калимдор",
|
||||
16 => "Азшара", 1638 => "Громовой Утес", 1657 => "Дарнас", 14 => "Дуротар", 618 => "Зимние Ключи",
|
||||
406 => "Когтистые горы", 490 => "Кратер Ун'Горо", 1216 => "Крепость Древобрюхов", 493 => "Лунная поляна", 215 => "Мулгор",
|
||||
1637 => "Оргриммар", 361 => "Оскверненный лес", 3525 => "Остров Кровавой Дымки", 3524 => "Остров Лазурной Дымки", 405 => "Пустоши",
|
||||
15 => "Пылевые топи", 1377 => "Силитус", 17 => "Степи", 440 => "Танарис", 141 => "Тельдрассил",
|
||||
148 => "Темные берега", 400 => "Тысяча Игл", 357 => "Фералас", 3557 => "Экзодар", 331 => "Ясеневый лес"
|
||||
),
|
||||
8 => array( "Запределье",
|
||||
3520 => "Долина Призрачной Луны", 3521 => "Зангартопь", 3519 => "Лес Тероккар", 3518 => "Награнд", 3522 => "Острогорье",
|
||||
3483 => "Полуостров Адского Пламени", 3523 => "Пустоверть", 3679 => "Скеттис", 3703 => "Шаттрат"
|
||||
),
|
||||
10 => array( "Нордскол",
|
||||
3537 => "Борейская тундра", 67 => "Грозовая Гряда", 4742 => "Лагерь Хротгара", 4395 => "Даларан", 65 => "Драконий Погост",
|
||||
66 => "Зул'Драк", 210 => "Ледяная Корона", 3711 => "Низина Шолазар", 4197 => "Озеро Ледяных Оков", 495 => "Ревущий фьорд",
|
||||
394 => "Седые холмы", 4024 => "Хладарра"
|
||||
),
|
||||
6 => array( "Поля боя",
|
||||
2597 => "Альтеракская долина", 4384 => "Берег Древних", 3358 => "Низина Арати", 3820 => "Око Бури", 4710 => "Остров Завоеваний",
|
||||
-25 => "Поля сражений", 3277 => "Ущелье Песни Войны"
|
||||
),
|
||||
4 => array( "Классы",
|
||||
-81 => "Воин", -263 => "Друид", -262 => "Жрец", -161 => "Маг", -261 => "Охотник",
|
||||
-141 => "Паладин", -162 => "Разбойник", -372 => "Рыцарь смерти", -61 => "Чернокнижник", -82 => "Шаман"
|
||||
),
|
||||
2 => array( "Подземелья",
|
||||
4277 => "Азжол-Неруб", 4415 => "Аметистовая крепость", 4494 => "Ан'кахет: Старое Королевство", 3848 => "Аркатрац", 3790 => "Аукенайские гробницы",
|
||||
3562 => "Бастионы Адского Пламени", 3847 => "Ботаника", 1196 => "Вершина Утгард", 1584 => "Глубины Черной горы", 721 => "Гномреган",
|
||||
3792 => "Гробницы Маны", 4416 => "Гундрак", 2557 => "Забытый Город", 4820 => "Залы Отражений", 1477 => "Затонувший храм",
|
||||
1176 => "Зул'Фаррак", 4723 => "Испытание чемпиона", 3845 => "Крепость Бурь", 4196 => "Крепость Драк'Тарон", 209 => "Крепость Темного Клыка",
|
||||
206 => "Крепость Утгард", 4809 => "Кузня Душ", 3713 => "Кузня Крови", 722 => "Курганы Иглошкурых", 491 => "Лабиринты Иглошкурых",
|
||||
2100 => "Мародон", 1581 => "Мертвые копи", 3849 => "Механар", 796 => "Монастырь Алого ордена", 2057 => "Некроситет",
|
||||
4120 => "Нексус", 719 => "Непроглядная Пучина", 3716 => "Нижетопь", 2437 => "Огненная пропасть", 4228 => "Окулус",
|
||||
4100 => "Очищение Стратхольма", 3715 => "Паровое подземелье", 1941 => "Пещеры Времени", 718 => "Пещеры Стенаний", 1583 => "Пик Черной горы",
|
||||
3714 => "Разрушенные залы", 3905 => "Резервуар Кривого Клыка", 3791 => "Сетеккские залы", 2367 => "Старые предгорья Хилсбрада", 2017 => "Стратхольм",
|
||||
3789 => "Темный лабиринт", 4131 => "Терраса Магистров", 717 => "Тюрьма", 3717 => "Узилище", 1337 => "Ульдаман",
|
||||
2366 => "Черные топи", 4264 => "Чертоги Камня", 4272 => "Чертоги Молний", 4813 => "Яма Сарона"
|
||||
),
|
||||
5 => array( "Профессии",
|
||||
-181 => "Алхимия", -201 => "Инженерное дело", -182 => "Кожевничество", -121 => "Кузнечное дело", -304 => "Кулинария",
|
||||
-371 => "Начертание", -324 => "Первая помощь", -264 => "Портняжное дело", -101 => "Рыбная ловля", -24 => "Травничество",
|
||||
-373 => "Ювелирное дело"
|
||||
),
|
||||
3 => array( "Рейды",
|
||||
3923 => "Логово Груула", 3428 => "Ан'Кираж", 3606 => "Вершина Хиджала", 3805 => "Зул'Аман", 1977 => "Зул'Гуруб",
|
||||
4722 => "Испытание крестоносца", 3457 => "Каражан", 3845 => "Крепость Бурь", 2677 => "Логово Крыла Тьмы", 3836 => "Логово Магтеридона",
|
||||
2159 => "Логово Ониксии", 3456 => "Наксрамас", 4493 => "Обсидиановое святилище", 2717 => "Огненные Недра", 4500 => "Око Вечности",
|
||||
4075 => "Плато Солнечного Колодца", 4987 => "Рубиновое святилище", 3429 => "Руины Ан'Киража", 4603 => "Склеп Аркавона", 4273 => "Ульдуар",
|
||||
4812 => "Цитадель Ледяной Короны", 3959 => "Черный храм"
|
||||
),
|
||||
9 => array( "Игровые события",
|
||||
-370 => "Хмельной фестиваль", -1002 => "Детская неделя", -364 => "Ярмарка Новолуния", -41 => "День Мертвых", -1003 => "Тыквовин",
|
||||
-1005 => "Фестиваль урожая", -376 => "Любовная лихорадка", -366 => "Лунный фестиваль", -369 => "Огненный солнцеворот", -1006 => "Новый Год",
|
||||
-375 => "Пиршество странников", -374 => "Сад чудес", -1001 => "Зимний Покров"
|
||||
),
|
||||
7 => array( "Разное",
|
||||
-365 => "Ан'киражская война", -1010 => "Поиск подземелий", -1 => "Эпический", -344 => "Легендарный", -367 => "Репутация",
|
||||
-368 => "Вторжение", -241 => "Турнир"
|
||||
),
|
||||
-2 => "Разное"
|
||||
)
|
||||
),
|
||||
'title' => array(
|
||||
|
||||
@@ -42,6 +42,7 @@ class AchievementsPage extends GenericPage
|
||||
|
||||
public function __construct($pageCall, $pageParam)
|
||||
{
|
||||
$this->filterObj = new AchievementListFilter();
|
||||
$this->getCategoryFromUrl($pageParam);
|
||||
|
||||
parent::__construct();
|
||||
@@ -58,14 +59,12 @@ class AchievementsPage extends GenericPage
|
||||
if ($this->category)
|
||||
$conditions[] = ['category', (int)end($this->category)];
|
||||
|
||||
$acvFilter = new AchievementListFilter();
|
||||
|
||||
// recreate form selection
|
||||
$this->filter = $acvFilter->getForm('form');
|
||||
$this->filter = $this->filterObj->getForm('form');
|
||||
$this->filter['query'] = isset($_GET['filter']) ? $_GET['filter'] : null;
|
||||
$this->filter['fi'] = $acvFilter->getForm();
|
||||
$this->filter['fi'] = $this->filterObj->getForm();
|
||||
|
||||
if ($fiCnd = $acvFilter->getConditions())
|
||||
if ($fiCnd = $this->filterObj->getConditions())
|
||||
$conditions[] = $fiCnd;
|
||||
|
||||
$acvList = new AchievementList($conditions);
|
||||
@@ -108,7 +107,7 @@ class AchievementsPage extends GenericPage
|
||||
$params['_truncated'] = 1;
|
||||
}
|
||||
|
||||
if ($acvFilter->error)
|
||||
if ($this->filterObj->error)
|
||||
$params['_errors'] = '$1';
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,8 @@ class ItemsPage extends GenericPage
|
||||
|
||||
public function __construct($pageCall, $pageParam)
|
||||
{
|
||||
$this->getCategoryFromUrl($pageParam);;
|
||||
$this->filterObj = new ItemListFilter();
|
||||
$this->getCategoryFromUrl($pageParam);
|
||||
|
||||
parent::__construct();
|
||||
|
||||
@@ -100,12 +101,10 @@ class ItemsPage extends GenericPage
|
||||
/* evaluate filter */
|
||||
/*******************/
|
||||
|
||||
$itemFilter = new ItemListFilter();
|
||||
|
||||
// recreate form selection
|
||||
$this->filter = array_merge($itemFilter->getForm('form'), $this->filter);
|
||||
$this->filter = array_merge($this->filterObj->getForm('form'), $this->filter);
|
||||
$this->filter['query'] = @$_GET['filter'] ?: NULL;
|
||||
$this->filter['fi'] = $itemFilter->getForm();
|
||||
$this->filter['fi'] = $this->filterObj->getForm();
|
||||
|
||||
$menu = $this->createExtraMenus();
|
||||
|
||||
@@ -120,21 +119,21 @@ class ItemsPage extends GenericPage
|
||||
if (isset($this->filter['slot'][INVTYPE_SHIELD])) // "Off Hand" => "Shield"
|
||||
$this->filter['slot'][INVTYPE_SHIELD] = Lang::$item['armorSubClass'][6];
|
||||
|
||||
$xCols = $itemFilter->getForm('extraCols', true);
|
||||
$xCols = $this->filterObj->getForm('extraCols', true);
|
||||
|
||||
$infoMask = ITEMINFO_JSON;
|
||||
if (array_intersect([63, 64, 125], $xCols)) // 63:buyPrice; 64:sellPrice; 125:reqarenartng
|
||||
$infoMask |= ITEMINFO_VENDOR;
|
||||
|
||||
if ($itemFilter->error)
|
||||
$this->sharedLV['_errors'] = '$1';
|
||||
|
||||
if (!empty($this->filter['fi']['extraCols']))
|
||||
$this->sharedLV['extraCols'] = '$fi_getExtraCols(fi_extraCols, '.($this->filter['gm'] ?: 0).', '.(array_intersect([63], $xCols) ? 1 : 0).')';
|
||||
|
||||
if ($_ = $itemFilter->getConditions())
|
||||
if ($_ = $this->filterObj->getConditions())
|
||||
$conditions[] = $_;
|
||||
|
||||
if ($this->filterObj->error)
|
||||
$this->sharedLV['_errors'] = '$1';
|
||||
|
||||
/******************/
|
||||
/* set conditions */
|
||||
/******************/
|
||||
@@ -150,7 +149,7 @@ class ItemsPage extends GenericPage
|
||||
/* handle auto-gemming */
|
||||
/***********************/
|
||||
|
||||
$this->gemScores = $this->createGemScores($itemFilter);
|
||||
$this->gemScores = $this->createGemScores();
|
||||
|
||||
/*************************/
|
||||
/* handle upgrade search */
|
||||
@@ -159,7 +158,7 @@ class ItemsPage extends GenericPage
|
||||
$upgItemData = [];
|
||||
if (!empty($this->filter['upg']) && !empty($this->filter['fi']['setWeights']))
|
||||
{
|
||||
$upgItems = new ItemList(array(['id', array_keys($this->filter['upg'])]), ['extraOpts' => $itemFilter->extraOpts]);
|
||||
$upgItems = new ItemList(array(['id', array_keys($this->filter['upg'])]), ['extraOpts' => $this->filterObj->extraOpts]);
|
||||
if (!$upgItems->error)
|
||||
{
|
||||
$this->extendGlobalData($upgItems->getJSGlobals());
|
||||
@@ -245,7 +244,7 @@ class ItemsPage extends GenericPage
|
||||
break;
|
||||
case 2: // itemlevel: first, try to find 10 level steps within range (if given) as tabs
|
||||
// ohkayy, maybe i need to rethink $this
|
||||
$this->filterOpts = $itemFilter->extraOpts;
|
||||
$this->filterOpts = $this->filterObj->extraOpts;
|
||||
$this->filterOpts['is']['o'] = [null]; // remove 'order by' from itemStats
|
||||
$extraOpts = array_merge($this->filterOpts, ['i' => ['g' => ['itemlevel'], 'o' => ['itemlevel DESC']]]);
|
||||
|
||||
@@ -293,7 +292,7 @@ class ItemsPage extends GenericPage
|
||||
{
|
||||
$finalCnd = $gbField ? array_merge($conditions, [[$gbField, abs($group), $group > 0 ? null : '<'], $maxResults]) : $conditions;
|
||||
|
||||
$items = new ItemList($finalCnd, ['extraOpts' => array_merge($extraOpts, $itemFilter->extraOpts)]);
|
||||
$items = new ItemList($finalCnd, ['extraOpts' => array_merge($extraOpts, $this->filterObj->extraOpts)]);
|
||||
|
||||
if ($items->error)
|
||||
continue;
|
||||
@@ -373,7 +372,7 @@ class ItemsPage extends GenericPage
|
||||
$override['upg'] = implode(':', $upg);
|
||||
|
||||
$cls = isset($this->category[0]) ? '='.$this->category[0] : '';
|
||||
$this->filterUrl = $itemFilter->urlize($override, $addCr);
|
||||
$this->filterUrl = $this->filterObj->urlize($override, $addCr);
|
||||
|
||||
if ($note)
|
||||
$tab['params']['note'] = '$$WH.sprintf(LANG.'.$note.', \''.$cls.'\', \''.$this->filterUrl.'\')';
|
||||
@@ -436,13 +435,13 @@ class ItemsPage extends GenericPage
|
||||
$this->path[] = $c;
|
||||
|
||||
// if slot-dropdown is available && Armor && $path points to Armor-Class
|
||||
$form = (new ItemListFilter())->getForm('form');
|
||||
$form = $this->filterObj->getForm('form');
|
||||
if (count($this->path) == 4 && $this->category[0] == 4 && isset($form['sl']) && !is_array($form['sl']))
|
||||
$this->path[] = $form['sl'];
|
||||
}
|
||||
|
||||
// fetch best possible gems for chosen weights
|
||||
private function createGemScores($itemFilter)
|
||||
private function createGemScores()
|
||||
{
|
||||
$gemScores = [];
|
||||
|
||||
@@ -459,10 +458,10 @@ class ItemsPage extends GenericPage
|
||||
if (!isset($this->filter['jc']))
|
||||
$cnd[] = ['itemLimitCategory', 0]; // Jeweler's Gems
|
||||
|
||||
If ($itemFilter->wtCnd)
|
||||
$cnd[] = $itemFilter->wtCnd;
|
||||
If ($this->filterObj->wtCnd)
|
||||
$cnd[] = $this->filterObj->wtCnd;
|
||||
|
||||
$anyColor = new ItemList($cnd, ['extraOpts' => $itemFilter->extraOpts]);
|
||||
$anyColor = new ItemList($cnd, ['extraOpts' => $this->filterObj->extraOpts]);
|
||||
if (!$anyColor->error)
|
||||
{
|
||||
$this->extendGlobalData($anyColor->getJSGlobals());
|
||||
@@ -473,7 +472,7 @@ class ItemsPage extends GenericPage
|
||||
{
|
||||
$mask = 1 << $i;
|
||||
$q = !$i ? 3 : intVal($this->filter['gm']); // meta gems are always included.. ($q is backReferenced)
|
||||
$byColor = new ItemList($cnd, ['extraOpts' => $itemFilter->extraOpts]);
|
||||
$byColor = new ItemList($cnd, ['extraOpts' => $this->filterObj->extraOpts]);
|
||||
if (!$byColor->error)
|
||||
{
|
||||
$this->extendGlobalData($byColor->getJSGlobals());
|
||||
|
||||
@@ -19,7 +19,8 @@ class ItemsetsPage extends GenericPage
|
||||
|
||||
public function __construct($pageCall, $pageParam)
|
||||
{
|
||||
$this->getCategoryFromUrl($pageParam);;
|
||||
$this->filterObj = new ItemsetListFilter();
|
||||
$this->getCategoryFromUrl($pageParam);
|
||||
|
||||
parent::__construct();
|
||||
|
||||
@@ -28,15 +29,13 @@ class ItemsetsPage extends GenericPage
|
||||
|
||||
protected function generateContent()
|
||||
{
|
||||
$itemsetFilter = new ItemsetListFilter();
|
||||
|
||||
$itemsets = new ItemsetList($itemsetFilter->getConditions());
|
||||
$itemsets = new ItemsetList($this->filterObj->getConditions());
|
||||
$this->extendGlobalData($itemsets->getJSGlobals());
|
||||
|
||||
// recreate form selection
|
||||
$this->filter = array_merge($itemsetFilter->getForm('form'), $this->filter);
|
||||
$this->filter = array_merge($this->filterObj->getForm('form'), $this->filter);
|
||||
$this->filter['query'] = isset($_GET['filter']) ? $_GET['filter'] : NULL;
|
||||
$this->filter['fi'] = $itemsetFilter->getForm();
|
||||
$this->filter['fi'] = $this->filterObj->getForm();
|
||||
|
||||
$this->addJS('?data=weight-presets&locale='.User::$localeId.'&t='.$_SESSION['dataKey']);
|
||||
|
||||
@@ -56,7 +55,7 @@ class ItemsetsPage extends GenericPage
|
||||
$lv['params']['_truncated'] = 1;
|
||||
}
|
||||
|
||||
if ($itemsetFilter->error)
|
||||
if ($this->filterObj->error)
|
||||
$lv['params']['_errors'] = '$1';
|
||||
|
||||
$this->lvData = $lv;
|
||||
@@ -70,14 +69,14 @@ class ItemsetsPage extends GenericPage
|
||||
{
|
||||
array_unshift($this->title, $this->name);
|
||||
|
||||
$form = (new ItemsetListFilter())->getForm('form');
|
||||
$form = $this->filterObj->getForm('form');
|
||||
if (isset($form['cl']))
|
||||
array_unshift($this->title, Lang::$game['cl'][$form['cl']]);
|
||||
}
|
||||
|
||||
protected function generatePath()
|
||||
{
|
||||
$form = (new ItemsetListFilter())->getForm('form');
|
||||
$form = $this->filterObj->getForm('form');
|
||||
if (isset($form['cl']))
|
||||
$this->path[] = $form['cl'];
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ class NpcsPage extends GenericPage
|
||||
|
||||
public function __construct($pageCall, $pageParam)
|
||||
{
|
||||
$this->filterObj = new CreatureListFilter();
|
||||
$this->getCategoryFromUrl($pageParam);;
|
||||
|
||||
parent::__construct();
|
||||
@@ -40,17 +41,16 @@ class NpcsPage extends GenericPage
|
||||
else
|
||||
$this->petFamPanel = false;
|
||||
|
||||
$npcFilter = new CreatureListFilter();
|
||||
if ($_ = $npcFilter->getConditions())
|
||||
if ($_ = $this->filterObj->getConditions())
|
||||
$conditions[] = $_;
|
||||
|
||||
// beast subtypes are selected via filter
|
||||
$npcs = new CreatureList($conditions, ['extraOpts' => $npcFilter->extraOpts]);
|
||||
$npcs = new CreatureList($conditions, ['extraOpts' => $this->filterObj->extraOpts]);
|
||||
|
||||
// recreate form selection
|
||||
$this->filter = array_merge($npcFilter->getForm('form'), $this->filter);
|
||||
$this->filter = array_merge($this->filterObj->getForm('form'), $this->filter);
|
||||
$this->filter['query'] = isset($_GET['filter']) ? $_GET['filter'] : NULL;
|
||||
$this->filter['fi'] = $npcFilter->getForm();
|
||||
$this->filter['fi'] = $this->filterObj->getForm();
|
||||
|
||||
$lv = array(
|
||||
'file' => 'creature',
|
||||
@@ -68,7 +68,7 @@ class NpcsPage extends GenericPage
|
||||
$lv['params']['_truncated'] = 1;
|
||||
}
|
||||
|
||||
if ($npcFilter->error)
|
||||
if ($this->filterObj->error)
|
||||
$lv['params']['_errors'] = '$1';
|
||||
|
||||
$this->lvData = $lv;
|
||||
@@ -89,7 +89,7 @@ class NpcsPage extends GenericPage
|
||||
if ($this->category)
|
||||
$this->path[] = $this->category[0];
|
||||
|
||||
$form = (new CreatureListFilter())->getForm('form');
|
||||
$form = $this->filterObj->getForm('form');
|
||||
if (isset($form['fa']) && !is_array($form['fa']))
|
||||
$this->path[] = $form['fa'];
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ class ObjectsPage extends GenericPage
|
||||
|
||||
public function __construct($pageCall, $pageParam)
|
||||
{
|
||||
$this->filterObj = new GameObjectListFilter();
|
||||
$this->getCategoryFromUrl($pageParam);;
|
||||
|
||||
parent::__construct();
|
||||
@@ -35,18 +36,16 @@ class ObjectsPage extends GenericPage
|
||||
if ($this->category)
|
||||
$conditions[] = ['typeCat', (int)$this->category[0]];
|
||||
|
||||
$objectFilter = new GameObjectListFilter();
|
||||
|
||||
// recreate form selection
|
||||
$this->filter = $objectFilter->getForm('form');
|
||||
$this->filter = $this->filterObj->getForm('form');
|
||||
$this->filter['query'] = isset($_GET['filter']) ? $_GET['filter'] : null;
|
||||
$this->filter['fi'] = $objectFilter->getForm();
|
||||
$this->filter['fi'] = $this->filterObj->getForm();
|
||||
|
||||
if ($_ = $objectFilter->getConditions())
|
||||
if ($_ = $this->filterObj->getConditions())
|
||||
$conditions[] = $_;
|
||||
|
||||
$params = $data = [];
|
||||
$objects = new GameObjectList($conditions, ['extraOpts' => $objectFilter->extraOpts]);
|
||||
$objects = new GameObjectList($conditions, ['extraOpts' => $this->filterObj->extraOpts]);
|
||||
if (!$objects->error)
|
||||
{
|
||||
$data = $objects->getListviewData();
|
||||
@@ -61,9 +60,8 @@ class ObjectsPage extends GenericPage
|
||||
$params['_truncated'] = 1;
|
||||
}
|
||||
|
||||
if ($objectFilter->error)
|
||||
if ($this->filterObj->error)
|
||||
$params['_errors'] = '$1';
|
||||
|
||||
}
|
||||
|
||||
$this->lvData = array(
|
||||
|
||||
887
pages/quest.php
887
pages/quest.php
File diff suppressed because it is too large
Load Diff
115
pages/quests.php
115
pages/quests.php
@@ -3,48 +3,54 @@
|
||||
if (!defined('AOWOW_REVISION'))
|
||||
die('illegal access');
|
||||
|
||||
$filter = [];
|
||||
$cat = Util::extractURLParams($pageParam); // 0: type; 1:zoneOrSort
|
||||
$path = [0, 3];
|
||||
$title = [Util::ucFirst(Lang::$game['quests'])];
|
||||
$cacheKey = implode('_', [CACHETYPE_PAGE, TYPE_QUEST, -1, $cat ? implode('.', $cat) : -1, User::$localeId]);
|
||||
$validCats = Util::$questClasses; // to be reviewed
|
||||
// menuId 3: Quest g_initPath()
|
||||
// tabId 0: Database g_initHeader()
|
||||
class QuestsPage extends GenericPage
|
||||
{
|
||||
use ListPage;
|
||||
|
||||
if (!Util::isValidPage($validCats, $cat))
|
||||
$smarty->error();
|
||||
protected $type = TYPE_QUEST;
|
||||
protected $tpl = 'quests';
|
||||
protected $path = [0, 3];
|
||||
protected $tabId = 0;
|
||||
protected $mode = CACHETYPE_PAGE;
|
||||
protected $validCats = [];
|
||||
protected $js = ['filters.js'];
|
||||
|
||||
if (!$smarty->loadCache($cacheKey, $pageData, $filter))
|
||||
public function __construct($pageCall, $pageParam)
|
||||
{
|
||||
$this->validCats = Util::$questClasses; // needs reviewing (not allowed to set this as default)
|
||||
|
||||
$this->filterObj = new QuestListFilter();
|
||||
$this->getCategoryFromUrl($pageParam);;
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->name = Util::ucFirst(Lang::$game['quests']);
|
||||
$this->subCat = $pageParam ? '='.$pageParam : '';
|
||||
}
|
||||
|
||||
protected function generateContent()
|
||||
{
|
||||
$conditions = [];
|
||||
|
||||
if ($cat)
|
||||
{
|
||||
// path
|
||||
for ($i = 0; $i < count($cat); $i++)
|
||||
$path[] = $cat[$i];
|
||||
|
||||
// title
|
||||
|
||||
// cnd
|
||||
if (isset($cat[1]))
|
||||
$conditions[] = ['zoneOrSort', $cat[1]];
|
||||
else if (isset($cat[0]))
|
||||
$conditions[] = ['zoneOrSort', $validCats[$cat[0]]];
|
||||
}
|
||||
if (isset($this->category[1]))
|
||||
$conditions[] = ['zoneOrSort', $this->category[1]];
|
||||
else if (isset($this->category[0]))
|
||||
$conditions[] = ['zoneOrSort', $this->validCats[$this->category[0]]];
|
||||
|
||||
$questFilter = new QuestListFilter();
|
||||
|
||||
if ($_ = $questFilter->getConditions())
|
||||
if ($_ = $this->filterObj->getConditions())
|
||||
$conditions[] = $_;
|
||||
|
||||
$quests = new QuestList($conditions, ['extraOpts' => $questFilter->extraOpts]);
|
||||
$quests = new QuestList($conditions, ['extraOpts' => $this->filterObj->extraOpts]);
|
||||
|
||||
$quests->addGlobalsToJscript();
|
||||
$this->extendGlobalData($quests->getJSGlobals());
|
||||
|
||||
// recreate form selection
|
||||
$filter = array_merge($questFilter->getForm('form'), $filter);
|
||||
$filter['query'] = isset($_GET['filter']) ? $_GET['filter'] : NULL;
|
||||
$filter['fi'] = $questFilter->getForm();
|
||||
$this->filter = array_merge($this->filterObj->getForm('form'), $this->filter);
|
||||
$this->filter['query'] = isset($_GET['filter']) ? $_GET['filter'] : NULL;
|
||||
$this->filter['fi'] = $this->filterObj->getForm();
|
||||
|
||||
$lv = array(
|
||||
'file' => 'quest',
|
||||
@@ -52,7 +58,7 @@ if (!$smarty->loadCache($cacheKey, $pageData, $filter))
|
||||
'params' => []
|
||||
);
|
||||
|
||||
if (!empty($filter['fi']['extraCols']))
|
||||
if (!empty($this->filter['fi']['extraCols']))
|
||||
$lv['params']['extraCols'] = '$fi_getExtraCols(fi_extraCols, 0, 0)';
|
||||
|
||||
// create note if search limit was exceeded
|
||||
@@ -61,38 +67,33 @@ if (!$smarty->loadCache($cacheKey, $pageData, $filter))
|
||||
$lv['params']['note'] = sprintf(Util::$tryFilteringString, 'LANG.lvnote_questsfound', $quests->getMatches(), CFG_SQL_LIMIT_DEFAULT);
|
||||
$lv['params']['_truncated'] = 1;
|
||||
}
|
||||
else if (isset($cat[1]) && $cat[1] > 0)
|
||||
$lv['params']['note'] = '$$WH.sprintf(LANG.lvnote_questgivers, '.$cat[1].', g_zones['.$cat[1].'], '.$cat[1].')';
|
||||
else if (isset($this->category[1]) && $this->category[1] > 0)
|
||||
$lv['params']['note'] = '$$WH.sprintf(LANG.lvnote_questgivers, '.$this->category[1].', g_zones['.$this->category[1].'], '.$this->category[1].')';
|
||||
|
||||
if ($questFilter->error)
|
||||
if ($this->filterObj->error)
|
||||
$lv['params']['_errors'] = '$1';
|
||||
|
||||
|
||||
// menuId 3: Quest g_initPath()
|
||||
// tabId 0: Database g_initHeader()
|
||||
$pageData = array(
|
||||
'page' => array(
|
||||
'title' => implode(' - ', $title),
|
||||
'path' => json_encode($path, JSON_NUMERIC_CHECK),
|
||||
'tab' => 0,
|
||||
'subCat' => $pageParam ? '='.$pageParam : '',
|
||||
'reqJS' => array(
|
||||
STATIC_URL.'/js/filters.js'
|
||||
)
|
||||
),
|
||||
'lv' => $lv
|
||||
);
|
||||
|
||||
$smarty->saveCache($cacheKey, $pageData, $filter);
|
||||
$this->lvData = $lv;
|
||||
}
|
||||
|
||||
protected function generateTitle()
|
||||
{
|
||||
array_unshift($this->title, $this->name);
|
||||
|
||||
$smarty->updatePageVars($pageData['page']);
|
||||
$smarty->assign('filter', $filter);
|
||||
$smarty->assign('lang', array_merge(Lang::$main, Lang::$game, Lang::$quest, ['colon' => Lang::$colon]));
|
||||
$smarty->assign('lvData', $pageData['lv']);
|
||||
if (isset($this->category[1]))
|
||||
array_unshift($this->title, Lang::$quest['cat'][$this->category[0]][$this->category[1]]);
|
||||
else if (isset($this->category[0]))
|
||||
{
|
||||
$c0 = Lang::$quest['cat'][$this->category[0]];
|
||||
array_unshift($this->title, is_array($c0) ? $c0[0] : $c0);
|
||||
}
|
||||
}
|
||||
|
||||
// load the page
|
||||
$smarty->display('quests.tpl');
|
||||
protected function generatePath()
|
||||
{
|
||||
foreach ($this->category as $c)
|
||||
$this->path[] = $c;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -29,7 +29,7 @@ class SkillsPage extends GenericPage
|
||||
protected function generateContent()
|
||||
{
|
||||
$conditions = [];
|
||||
if (User::isInGroup(U_GROUP_EMPLOYEE))
|
||||
if (!User::isInGroup(U_GROUP_EMPLOYEE))
|
||||
$conditions[] = ['categoryId', 12, '!']; // GENERIC (DND)
|
||||
|
||||
if ($this->category)
|
||||
|
||||
@@ -85,6 +85,7 @@ class SpellsPage extends GenericPage
|
||||
|
||||
public function __construct($pageCall, $pageParam)
|
||||
{
|
||||
$this->filterObj = new SpellListFilter();
|
||||
$this->getCategoryFromUrl($pageParam);;
|
||||
|
||||
parent::__construct();
|
||||
@@ -355,8 +356,7 @@ class SpellsPage extends GenericPage
|
||||
}
|
||||
}
|
||||
|
||||
$spellFilter = new SpellListFilter();
|
||||
if ($_ = $spellFilter->getConditions())
|
||||
if ($_ = $this->filterObj->getConditions())
|
||||
$conditions[] = $_;
|
||||
|
||||
$spells = new SpellList($conditions);
|
||||
@@ -365,9 +365,9 @@ class SpellsPage extends GenericPage
|
||||
$this->lvData['data'] = $spells->getListviewData();
|
||||
|
||||
// recreate form selection
|
||||
$this->filter = array_merge($spellFilter->getForm('form'), $this->filter);
|
||||
$this->filter = array_merge($this->filterObj->getForm('form'), $this->filter);
|
||||
$this->filter['query'] = isset($_GET['filter']) ? $_GET['filter'] : NULL;
|
||||
$this->filter['fi'] = $spellFilter->getForm();
|
||||
$this->filter['fi'] = $this->filterObj->getForm();
|
||||
|
||||
if (!empty($this->filter['fi']['extraCols']))
|
||||
$this->lvData['params']['extraCols'] = '$fi_getExtraCols(fi_extraCols, 0, 0)';
|
||||
@@ -379,7 +379,7 @@ class SpellsPage extends GenericPage
|
||||
$this->lvData['params']['_truncated'] = 1;
|
||||
}
|
||||
|
||||
if ($spellFilter->error)
|
||||
if ($this->filterObj->error)
|
||||
$this->lvData['params']['_errors'] = '$1';
|
||||
|
||||
$mask = $spells->hasSetFields(['reagent1', 'skillLines', 'trainingCost']);
|
||||
@@ -433,7 +433,7 @@ class SpellsPage extends GenericPage
|
||||
foreach ($this->category as $c)
|
||||
$this->path[] = $c;
|
||||
|
||||
$form = (new SpellListFilter())->getForm('form');
|
||||
$form = $this->filterObj->getForm('form');
|
||||
if (count($this->path) == 4 && $this->category[0] == -13 && isset($form['gl']) && !is_array($form['gl']))
|
||||
$this->path[] = $form['gl'];
|
||||
}
|
||||
|
||||
127
pages/zones.php
127
pages/zones.php
@@ -4,26 +4,37 @@ if (!defined('AOWOW_REVISION'))
|
||||
die('illegal access');
|
||||
|
||||
|
||||
$cats = Util::extractURLParams($pageParam);
|
||||
$path = [0, 6];
|
||||
$title = [Util::ucFirst(Lang::$game['zones'])];
|
||||
$cacheKey = implode('_', [CACHETYPE_PAGE, TYPE_ZONE, -1, $cats ? implode('.', $cats) : -1, User::$localeId]);
|
||||
$validCats = array(
|
||||
0 => true,
|
||||
1 => true,
|
||||
2 => [0, 1, 2],
|
||||
3 => [0, 1, 2],
|
||||
4 => true,
|
||||
6 => true,
|
||||
8 => true,
|
||||
9 => true,
|
||||
10 => true
|
||||
// menuId 6: Zone g_initPath()
|
||||
// tabId 0: Database g_initHeader()
|
||||
class ZonesPage extends GenericPage
|
||||
{
|
||||
use ListPage;
|
||||
|
||||
protected $type = TYPE_ZONE;
|
||||
protected $tpl = 'list-page-generic';
|
||||
protected $path = [0, 6];
|
||||
protected $tabId = 0;
|
||||
protected $mode = CACHETYPE_PAGE;
|
||||
protected $validCats = [true, true, [0, 1, 2], [0, 1, 2], true, true, true, true, true];
|
||||
protected $css = array(
|
||||
['path' => 'Mapper.css'],
|
||||
['path' => 'Mapper_ie6.css', 'ieCond' => 'lte IE 6']
|
||||
);
|
||||
protected $js = array(
|
||||
'Mapper.js',
|
||||
'ShowOnMap.js'
|
||||
);
|
||||
|
||||
if (!Util::isValidPage($validCats, $cats))
|
||||
$smarty->error();
|
||||
public function __construct($pageCall, $pageParam)
|
||||
{
|
||||
$this->getCategoryFromUrl($pageParam);;
|
||||
|
||||
if (!$smarty->loadCache($cacheKey, $pageData))
|
||||
parent::__construct();
|
||||
|
||||
$this->name = Util::ucFirst(Lang::$game['zones']);
|
||||
}
|
||||
|
||||
protected function generateContent()
|
||||
{
|
||||
$conditions = [];
|
||||
$visibleCols = [];
|
||||
@@ -31,18 +42,19 @@ if (!$smarty->loadCache($cacheKey, $pageData))
|
||||
$mapFile = 0;
|
||||
$spawnMap = -1;
|
||||
|
||||
if ($cats)
|
||||
{
|
||||
$conditions[] = ['z.category', $cats[0]];
|
||||
if (!User::isInGroup(U_GROUP_EMPLOYEE)) // sub-areas and unused zones
|
||||
$conditions[] = [['cuFlags', CUSTOM_EXCLUDE_FOR_LISTVIEW, '&'], 0];
|
||||
|
||||
if (isset($cats[1]) && in_array($cats[0], [2, 3]))
|
||||
$conditions[] = ['z.expansion', $cats[1]];
|
||||
|
||||
if (isset($cats[1]))
|
||||
array_unshift($title, Lang::$game['expansions'][$cats[1]]);
|
||||
else
|
||||
if ($this->category)
|
||||
{
|
||||
switch ($cats[0])
|
||||
$conditions[] = ['z.category', $this->category[0]];
|
||||
|
||||
if (isset($this->category[1]) && in_array($this->category[0], [2, 3]))
|
||||
$conditions[] = ['z.expansion', $this->category[1]];
|
||||
|
||||
if (empty($this->category[1]))
|
||||
{
|
||||
switch ($this->category[0])
|
||||
{
|
||||
case 0: $mapFile = -3; $spawnMap = 0; break;
|
||||
case 1: $mapFile = -6; $spawnMap = 1; break;
|
||||
@@ -50,39 +62,18 @@ if (!$smarty->loadCache($cacheKey, $pageData))
|
||||
case 10: $mapFile = -5; $spawnMap = 571; break;
|
||||
}
|
||||
}
|
||||
|
||||
$path = array_merge($path, $cats);
|
||||
array_unshift($title, Lang::$zone['cat'][$cats[0]]);
|
||||
}
|
||||
|
||||
$zones = new ZoneList($conditions);
|
||||
|
||||
// menuId 6: Zone g_initPath()
|
||||
// tabId 0: Database g_initHeader()
|
||||
$pageData = array(
|
||||
'page' => array(
|
||||
'title' => implode(' - ', $title),
|
||||
'path' => json_encode($path, JSON_NUMERIC_CHECK),
|
||||
'tab' => 0,
|
||||
'map' => null,
|
||||
'reqCSS' => array(
|
||||
['path' => STATIC_URL.'/css/Mapper.css'],
|
||||
['path' => STATIC_URL.'/css/Mapper_ie6.css', 'ieCond' => 'lte IE 6']
|
||||
),
|
||||
'reqJS' => array(
|
||||
STATIC_URL.'/js/Mapper.js',
|
||||
STATIC_URL.'/js/ShowOnMap.js'
|
||||
)
|
||||
),
|
||||
'lv' => array(
|
||||
array(
|
||||
$this->map = null;
|
||||
$this->lvData[] = array(
|
||||
'file' => 'zone',
|
||||
'data' => $zones->getListviewData(),
|
||||
'params' => []
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
// create flight map
|
||||
if ($mapFile)
|
||||
{
|
||||
$somData = ['flightmaster' => []];
|
||||
@@ -127,26 +118,36 @@ if (!$smarty->loadCache($cacheKey, $pageData))
|
||||
$somData['flightmaster'][] = $data;
|
||||
}
|
||||
|
||||
$pageData['page']['map'] = array(
|
||||
$this->map = array(
|
||||
'data' => array(
|
||||
'zone' => $mapFile,
|
||||
'zoom' => 1,
|
||||
'overlay' => 'true',
|
||||
'zoomable' => 'false'
|
||||
'overlay' => true,
|
||||
'zoomable' => false,
|
||||
'parent' => 'mapper-generic'
|
||||
),
|
||||
'som' => json_encode($somData, JSON_NUMERIC_CHECK)
|
||||
'som' => $somData
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$smarty->saveCache($cacheKey, $pageData);
|
||||
protected function generateTitle()
|
||||
{
|
||||
if ($this->category)
|
||||
{
|
||||
if (isset($this->category[1]))
|
||||
array_unshift($this->title, Lang::$game['expansions'][$this->category[1]]);
|
||||
|
||||
array_unshift($this->title, Lang::$zone['cat'][$this->category[0]]);
|
||||
}
|
||||
}
|
||||
|
||||
protected function generatePath()
|
||||
{
|
||||
foreach ($this->category as $c)
|
||||
$this->path[] = $c;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$smarty->updatePageVars($pageData['page']);
|
||||
$smarty->assign('lang', Lang::$main);
|
||||
$smarty->assign('lvData', $pageData['lv']);
|
||||
|
||||
// load the page
|
||||
$smarty->display('list-page-generic.tpl');
|
||||
|
||||
?>
|
||||
|
||||
@@ -31,9 +31,9 @@ if (!empty($this->map['data'])):
|
||||
<?php else: ?>
|
||||
var g_mapperData = {<?php echo $this->map['data']['zone']; ?>: {}};
|
||||
<?php endif; ?>
|
||||
var myMapper = new Mapper({<?php json_encode($this->map['data'], JSON_NUMERIC_CHECK); /* parent: 'mapper-generic' should come here? */ ?>, parent: 'mapper-generic'});
|
||||
var myMapper = new Mapper(<?php echo json_encode($this->map['data'], JSON_NUMERIC_CHECK); /* dont forget to set "'parent' => 'mapper-generic'" */ ?>);
|
||||
<?php if (!empty($this->map['som'])): ?>
|
||||
new ShowOnMap(<?php echo $this->map['som']; ?>);
|
||||
new ShowOnMap(<?php echo json_encode($this->map['som'], JSON_NUMERIC_CHECK); ?>);
|
||||
<?php endif; ?>
|
||||
//]]></script>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -3,21 +3,22 @@
|
||||
if (!isset($offset)) // in case we have multiple icons on the page (prominently quest-rewards)
|
||||
$offset = 0;
|
||||
|
||||
if ($rewards['title']):
|
||||
echo $rewards['title'].Lang::$main['colon'].(isset($rewards['extra']) ? $rewards['extra'] : null);
|
||||
if ($rewTitle):
|
||||
echo $rewTitle.Lang::$main['colon'].(isset($extra) ? $extra : null);
|
||||
endif;
|
||||
if ($rewards['data']):
|
||||
|
||||
if ($rewards):
|
||||
?>
|
||||
<div class="pad"></div>
|
||||
<table class="icontab icontab-box">
|
||||
<tr>
|
||||
<?php
|
||||
foreach ($rewards['data'] as $k => $i):
|
||||
foreach ($rewards as $k => $i):
|
||||
echo '<th id="icontab-icon'.($k + 1 + $offset).'"></th><td><span class="q'.(isset($i['quality']) ? $i['quality'] : null).'"><a href="?'.$i['typeStr'].'='.$i['id'].'">'.$i['name']."</a></span></td>\n";
|
||||
echo $k % 2 ? '</tr><tr>' : null;
|
||||
endforeach;
|
||||
|
||||
if (count($rewards['data']) % 2):
|
||||
if (count($rewards) % 2):
|
||||
echo '<th style="display: none"></th><td style="display: none"></td>';
|
||||
endif;
|
||||
?>
|
||||
@@ -26,7 +27,7 @@ if ($rewards['data']):
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
<?php
|
||||
foreach ($rewards['data'] as $k => $i):
|
||||
foreach ($rewards as $k => $i):
|
||||
echo ' $WH.ge(\'icontab-icon'.($k + 1 + $offset).'\').appendChild('.$i['globalStr'].'.createIcon('.$i['id'].', 1, '.(@$i['qty'] ?: 0)."));\n";
|
||||
endforeach;
|
||||
?>
|
||||
|
||||
@@ -1,189 +0,0 @@
|
||||
{include file='header.tpl'}
|
||||
|
||||
<div class="main" id="main">
|
||||
<div class="main-precontents" id="main-precontents"></div>
|
||||
<div class="main-contents" id="main-contents">
|
||||
|
||||
{if !empty($announcements)}
|
||||
{foreach from=$announcements item=item}
|
||||
{include file='bricks/announcement.tpl' an=$item}
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
{include file='bricks/community.tpl'}
|
||||
var g_pageInfo = {ldelim}type: {$type}, typeId: {$typeId}, name: '{$name|escape:"quotes"}'{rdelim};
|
||||
g_initPath({$path});
|
||||
//]]></script>
|
||||
|
||||
{include file='bricks/infobox.tpl'}
|
||||
|
||||
<div class="text">
|
||||
{include file='bricks/redButtons.tpl'}
|
||||
|
||||
<h1>{$name}</h1>
|
||||
{if isset($unavailable)}
|
||||
<div class="pad"></div>
|
||||
<b style="color: red">{$lang.unavailable}</b>
|
||||
{/if}
|
||||
|
||||
{if isset($reqMinRep) || isset($reqMaxRep)}
|
||||
<h3>{$lang.additionalReq}{$lang.colon}</h3>
|
||||
<ul style="border-bottom:solid 1px #505050;">
|
||||
{if isset($reqMinRep)}<li><div>{$reqMinRep}</div></li>{/if}
|
||||
{if isset($reqMaxRep)}<li><div>{$reqMaxRep}</div></li>{/if}
|
||||
<br /> {*shudder*}
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
{if $objectives}
|
||||
{$objectives}
|
||||
{elseif $requestItems}
|
||||
<h3>{$lang.progress}</h3>
|
||||
{$requestItems}
|
||||
{elseif $offerReward}
|
||||
<h3>{$lang.completion}</h3>
|
||||
{$offerReward}
|
||||
{/if}
|
||||
|
||||
{if $end}
|
||||
<table class="iconlist">
|
||||
<tr><th><p style="height: 26px; width: 30px;"> </p></th><td>{$end}</td></tr>
|
||||
{if $suggestedPl}
|
||||
<tr><th><p style="height: 26px; width: 30px;"> </p></th><td>{$lang.suggestedPl}{$lang.colon}{$suggestedPl}</td></tr>
|
||||
{/if}
|
||||
</table>
|
||||
<div class="pad"></div>
|
||||
{/if}
|
||||
|
||||
{if $objectiveList}
|
||||
{if $end}
|
||||
{$lang.providedItem}{$lang.colon}
|
||||
{/if}
|
||||
<table class="iconlist">
|
||||
{foreach from=$objectiveList item=i key=k}
|
||||
{if isset($i.typeStr) && ($i.typeStr == 'item' || $i.typeStr == 'spell')}
|
||||
<tr><th align="right" id="iconlist-icon-{$k}"></th><td><span class="q{$i.quality}"><a href="?{$i.typeStr}={$i.id}">{$i.name}</a></span>{if !$end}{$i.extraText}{/if}{if $i.qty > 1} ({$i.qty}){/if}</td></tr>
|
||||
{elseif !empty($i.typeStr)}
|
||||
<tr><th><ul><li><var> </var></li></ul></th><td><span class="q"><a href="?{$i.typeStr}={$i.id}">{$i.name}</a></span>{if !$end}{$i.extraText}{/if}{if $i.qty > 1} ({$i.qty}){/if}</td></tr>
|
||||
{* todo: research, when we want plain text as unordered list element *}
|
||||
{else}
|
||||
<tr><th><p style="height: 26px; width: 30px;"> </p></th><td>{$i.text}</td></tr>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{if $suggestedPl && !$end}
|
||||
<tr><th><p style="height: 26px; width: 30px;"> </p></th><td>{$lang.suggestedPl}{$lang.colon}{$suggestedPl}</td></tr>
|
||||
{/if}
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
{foreach from=$objectiveList item=i key=k}
|
||||
{if isset($i.typeStr) && ($i.typeStr == 'item' || $i.typeStr == 'spell')}
|
||||
$WH.ge('iconlist-icon-{$k}').appendChild(g_{$i.typeStr}s.createIcon({$i.id}, 0, {$i.qty}));
|
||||
{/if}
|
||||
{/foreach}
|
||||
//]]></script>
|
||||
{/if}
|
||||
|
||||
{include file='bricks/mapper.tpl'}
|
||||
|
||||
{* Description *}
|
||||
{if $details}
|
||||
<h3>{$lang.description}</h3>
|
||||
{$details}
|
||||
{/if}
|
||||
|
||||
{* Progress (disclosed) *}
|
||||
{if $requestItems && $objectives}
|
||||
<h3><a href="javascript:;" class="disclosure-off" onclick="return g_disclose($WH.ge('disclosure-progress'), this)">{$lang.progress}</a></h3>
|
||||
<div id="disclosure-progress" style="display: none">{$requestItems}</div>
|
||||
{/if}
|
||||
|
||||
{* Completion (disclosed) *}
|
||||
{if $offerReward && ($requestItems || $objectives)}
|
||||
<h3><a href="javascript:;" class="disclosure-off" onclick="return g_disclose($WH.ge('disclosure-completion'), this)">{$lang.completion}</a></h3>
|
||||
<div id="disclosure-completion" style="display: none">{$offerReward}</div>
|
||||
{/if}
|
||||
|
||||
{* Rewards *}
|
||||
{if !empty($rewards.items) || !empty($rewards.money) || !empty($rewards.spells) || !empty($rewards.choice)}
|
||||
{assign var='offset' value=0}
|
||||
<h3>{$lang.rewards}</h3>
|
||||
|
||||
{if isset($rewards.choice)}
|
||||
{include file='bricks/rewards.tpl' rewTitle=$lang.chooseItems rewData=$rewards.choice offset=$offset}
|
||||
{math assign='offset' equation="x + y" x=$offset y=$rewards.choice|@count}
|
||||
{/if}
|
||||
|
||||
{if isset($rewards.spells)}
|
||||
{if isset($rewards.choice)}
|
||||
<div class="pad"></div>
|
||||
{/if}
|
||||
|
||||
{if isset($rewards.spells.learn)}
|
||||
{include file='bricks/rewards.tpl' rewTitle=$lang.spellLearn rewData=$rewards.spells.learn offset=$offset extra=$rewards.spells.extra}
|
||||
{math assign='offset' equation="x + y" x=$offset y=$rewards.spells.learn|@count}
|
||||
{else}
|
||||
{include file='bricks/rewards.tpl' rewTitle=$lang.spellCast rewData=$rewards.spells.cast offset=$offset extra=$rewards.spells.extra}
|
||||
{math assign='offset' equation="x + y" x=$offset y=$rewards.spells.cast|@count}
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{if !empty($rewards.items) || !empty($rewards.money)}
|
||||
{if isset($rewards.choice) || isset($rewards.spells)}
|
||||
<div class="pad"></div>
|
||||
{/if}
|
||||
|
||||
{if isset($rewards.choice)} {* bullshit!! *}
|
||||
{include file='bricks/rewards.tpl' rewTitle=$lang.receiveAlso rewData=$rewards.items offset=$offset extra=$rewards.money}
|
||||
{else}
|
||||
{include file='bricks/rewards.tpl' rewTitle=$lang.receiveItems rewData=$rewards.items offset=$offset extra=$rewards.money}
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{* Gains *}
|
||||
{if $gains}
|
||||
<h3>{$lang.gains}</h3>
|
||||
{$lang.gainsDesc}{$lang.colon}
|
||||
<ul>{strip}
|
||||
{if isset($gains.xp)}
|
||||
<li><div>{$gains.xp|number_format} {$lang.experience}</div></li>
|
||||
{/if}
|
||||
|
||||
{if !empty($gains.rep)}
|
||||
{foreach from=$gains.rep item=i}
|
||||
<li><div>{if $i.qty < 0}<b class="q10">{$i.qty}</b>{else}{$i.qty}{/if} {$lang.repWith} <a href="?faction={$i.id}">{$i.name}</a></div></li>
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
{if isset($gains.title)}
|
||||
<li><div>{$gains.title}</div></li>
|
||||
{/if}
|
||||
|
||||
{if isset($gains.tp)}
|
||||
<li><div>{$gains.tp} {$lang.bonusTalents}</div></li>
|
||||
{/if}
|
||||
</ul>{/strip}
|
||||
{/if}
|
||||
|
||||
{if $mail}
|
||||
<h3>{$lang.mailDelivery|sprintf:$mail.delay}</h3>
|
||||
{if $mail.subject}
|
||||
<div class="book"><div class="page">{$mail.subject}</div></div>
|
||||
{/if}
|
||||
{if $mail.text}
|
||||
<div class="book"><div class="page">{$mail.text}</div></div>
|
||||
{/if}
|
||||
{/if}
|
||||
<h2 class="clear">{$lang.related}</h2>
|
||||
</div>
|
||||
|
||||
{include file='bricks/tabsRelated.tpl' tabs=$lvData}
|
||||
|
||||
{include file='bricks/contribute.tpl'}
|
||||
|
||||
</div><!-- main-contents -->
|
||||
</div><!-- main -->
|
||||
|
||||
{include file='footer.tpl'}
|
||||
236
template/pages/quest.tpl.php
Normal file
236
template/pages/quest.tpl.php
Normal file
@@ -0,0 +1,236 @@
|
||||
<?php $this->brick('header'); ?>
|
||||
|
||||
<div class="main" id="main">
|
||||
<div class="main-precontents" id="main-precontents"></div>
|
||||
<div class="main-contents" id="main-contents">
|
||||
|
||||
<?php $this->brick('announcement'); ?>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
<?php
|
||||
$this->brick('community');
|
||||
echo " var g_pageInfo = ".json_encode($this->gPageInfo, JSON_NUMERIC_CHECK).";\n" .
|
||||
" g_initPath(".json_encode($this->path, JSON_NUMERIC_CHECK).");\n";
|
||||
?>
|
||||
//]]></script>
|
||||
|
||||
<?php $this->brick('infobox'); ?>
|
||||
|
||||
<div class="text">
|
||||
<?php $this->brick('redButtons'); ?>
|
||||
|
||||
<h1><?php echo $this->name; ?></h1>
|
||||
<?php if ($this->unavailable): ?>
|
||||
<div class="pad"></div>
|
||||
<b style="color: red"><?php echo Lang::$quest['unavailable']; ?></b>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
if (isset($this->reqMinRep) || isset($this->reqMaxRep)):
|
||||
?>
|
||||
<h3><?php echo Lang::$quest['additionalReq'].Lang::$main['colon']; ?></h3>
|
||||
<ul style="border-bottom:solid 1px #505050;">
|
||||
<?php
|
||||
if (isset($this->reqMinRep)):
|
||||
echo ' <li><div>'.$this->reqMinRep."</div></li>\n";
|
||||
endif;
|
||||
if (isset($this->reqMaxRep)):
|
||||
echo ' <li><div>'.$this->reqMaxRep."</div></li>\n";
|
||||
endif;
|
||||
?>
|
||||
<br />
|
||||
</ul>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
if ($this->objectives):
|
||||
echo $this->objectives."\n";
|
||||
elseif ($this->requestItems):
|
||||
echo ' <h3>'.Lang::$quest['progress']."</h3>\n";
|
||||
echo $this->requestItems."\n";
|
||||
elseif ($this->offerReward):
|
||||
echo ' <h3>'.Lang::$quest['completion']."</h3>\n";
|
||||
echo $this->offerReward."\n";
|
||||
endif;
|
||||
|
||||
if ($e = $this->end):
|
||||
?>
|
||||
<table class="iconlist">
|
||||
<tr><th><p style="height: 26px; width: 30px;"> </p></th><td><?php echo $e; ?></td></tr>
|
||||
<?php if ($s = $this->suggestedPl): ?>
|
||||
<tr><th><p style="height: 26px; width: 30px;"> </p></th><td><?php echo Lang::$quest['suggestedPl'].lang::$main['colon'].$s; ?></td></tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="pad"></div>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
if ($o = $this->objectiveList):
|
||||
if ($e = $this->end):
|
||||
echo ' '.Lang::$quest['providedItem'].Lang::$main['colon']."\n";
|
||||
endif;
|
||||
?>
|
||||
<table class="iconlist">
|
||||
<?php
|
||||
foreach ($o as $i => $ol):
|
||||
|
||||
if (isset($ol['text'])):
|
||||
echo ' <tr><th><p style="height: 26px; width: 30px;"> </p></th><td>'.$ol['text']."</td></tr>\n";
|
||||
elseif (!empty($ol['proxy'])): // this implies creatures
|
||||
echo ' <tr><th><p style="height: 26px"> </p></th><td><a href="javascript:;" onclick="g_disclose($WH.ge(\'npcgroup-'.$ol['id'].'\'), this)" class="disclosure-off">'.$ol['name'].$ol['extraText'].'</a>'.($ol['qty'] > 1 ? ' ('.$ol['qty'].')' : null).'<div id="npcgroup-'.$ol['id']."\" style=\"display: none\">\n";
|
||||
|
||||
$block1 = array_slice($ol['proxy'], 0, ceil(count($ol['proxy']) / 2), true);
|
||||
$block2 = array_slice($ol['proxy'], ceil(count($ol['proxy']) / 2), null, true);
|
||||
|
||||
echo " <div style=\"float: left\"><table class=\"iconlist\">\n";
|
||||
foreach ($block1 as $pId => $name):
|
||||
echo ' <tr><th><ul><li><var> </var></li></ul></th><td><a href="?npc='.$pId.'">'.$name."</a></td></tr>\n";
|
||||
endforeach;
|
||||
echo " </table></div>\n";
|
||||
|
||||
if ($block2): // may be empty
|
||||
echo " <div style=\"float: left\"><table class=\"iconlist\">\n";
|
||||
foreach ($block2 as $pId => $name):
|
||||
echo ' <tr><th><ul><li><var> </var></li></ul></th><td><a href="?npc='.$pId.'">'.$name."</a></td></tr>\n";
|
||||
endforeach;
|
||||
echo " </table></div>\n";
|
||||
endif;
|
||||
|
||||
echo " </div></td></tr>\n";
|
||||
elseif (isset($ol['typeStr'])):
|
||||
if (in_array($ol['typeStr'], ['item', 'spell'])):
|
||||
echo ' <tr><th align="right" id="iconlist-icon-'.$i.'"></th>';
|
||||
else /* if (in_array($ol['typeStr'], ['npc', 'object', 'faction'])) */:
|
||||
echo ' <tr><th><ul><li><var> </var></li></ul></th>';
|
||||
endif;
|
||||
|
||||
echo '<td><span class="q'.(isset($ol['quality']) ? $ol['quality'] : null).'"><a href="?'.$ol['typeStr'].'='.$ol['id'].'">'.$ol['name'].'</a></span>'.(!$this->end ? $ol['extraText'] : null).(!empty($ol['qty']) ? ' ('.$ol['qty'].')' : null)."</td></tr>\n";
|
||||
endif;
|
||||
endforeach;
|
||||
|
||||
if ($this->suggestedPl && !$this->end):
|
||||
echo ' <tr><th><p style="height: 26px; width: 30px;"> </p></th><td>'.Lang::$quest['suggestedPl'].lang::$main['colon'].$this->suggestedPl."</td></tr>\n";
|
||||
endif;
|
||||
?>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
<?php
|
||||
foreach ($this->objectiveList as $k => $i):
|
||||
if (isset($i['typeStr']) && ($i['typeStr'] == 'item' || $i['typeStr'] == 'spell')):
|
||||
echo " \$WH.ge('iconlist-icon-".$k."').appendChild(g_".$i['typeStr']."s.createIcon(".$i['id'].", 0, ".$i['qty']."));\n";
|
||||
endif;
|
||||
endforeach;
|
||||
?>
|
||||
//]]></script>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
$this->brick('mapper');
|
||||
|
||||
if ($this->details):
|
||||
echo ' <h3>'.Lang::$quest['description']."</h3>\n" . $this->details."\n";
|
||||
endif;
|
||||
|
||||
if ($this->requestItems && $this->objectives):
|
||||
?>
|
||||
<h3><a href="javascript:;" class="disclosure-off" onclick="return g_disclose($WH.ge('disclosure-progress'), this)"><?php echo Lang::$quest['progress']; ?></a></h3>
|
||||
<div id="disclosure-progress" style="display: none"><?php echo $this->requestItems; ?></div>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
if ($this->offerReward && ($this->requestItems || $this->objectives)):
|
||||
?>
|
||||
<h3><a href="javascript:;" class="disclosure-off" onclick="return g_disclose($WH.ge('disclosure-completion'), this)"><?php echo Lang::$quest['completion']; ?></a></h3>
|
||||
<div id="disclosure-completion" style="display: none"><?php echo $this->offerReward; ?></div>
|
||||
<?php
|
||||
endif;
|
||||
|
||||
if ($r = $this->rewards):
|
||||
$offset = 0;
|
||||
|
||||
echo ' <h3>'.Lang::$main['rewards']."</h3>\n";
|
||||
|
||||
if (!empty($r['choice'])):
|
||||
$this->brick('rewards', ['rewTitle' => Lang::$quest['chooseItems'], 'rewards' => $r['choice'], 'offset' => $offset]);
|
||||
$offset += count($r['choice']);
|
||||
endif;
|
||||
|
||||
if (!empty($r['spells'])):
|
||||
if (!empty($r['choice'])):
|
||||
echo " <div class=\"pad\"></div>\n";
|
||||
endif;
|
||||
|
||||
if (!empty($r['spells']['learn'])):
|
||||
$this->brick('rewards', ['rewTitle' => Lang::$quest['spellLearn'], 'rewards' => $r['spells']['learn'], 'offset' => $offset, 'extra' => $r['spells']['extra']]);
|
||||
$offset += count($r['spells']['learn']);
|
||||
elseif (!empty($r['spells']['cast'])):
|
||||
$this->brick('rewards', ['rewTitle' => Lang::$quest['spellCast'], 'rewards' => $r['spells']['cast'], 'offset' => $offset, 'extra' => $r['spells']['extra']]);
|
||||
$offset += count($r['spells']['cast']);
|
||||
endif;
|
||||
endif;
|
||||
|
||||
if (!empty($r['items']) || !empty($r['money'])):
|
||||
if (!empty($r['choice']) || !empty($r['spells'])):
|
||||
echo " <div class=\"pad\"></div>\n";
|
||||
endif;
|
||||
|
||||
$addData = ['rewards' => @$r['items'], 'offset' => $offset, 'extra' => @$r['money']];
|
||||
$addData['rewTitle'] = empty($r['choice']) ? Lang::$quest['receiveItems'] : Lang::$quest['receiveAlso'];
|
||||
|
||||
$this->brick('rewards', $addData);
|
||||
endif;
|
||||
|
||||
endif;
|
||||
|
||||
if ($g = $this->gains):
|
||||
echo ' <h3>'.Lang::$main['gains']."</h3>\n";
|
||||
echo ' '.Lang::$quest['gainsDesc'].Lang::$main['colon']."\n";
|
||||
echo " <ul>\n";
|
||||
|
||||
if (!empty($g['xp'])):
|
||||
echo ' <li><div>'.number_format($g['xp']).' '.Lang::$quest['experience']."</div></li>\n";
|
||||
endif;
|
||||
|
||||
if (!empty($g['rep'])):
|
||||
foreach ($g['rep'] as $r):
|
||||
echo ' <li><div>'.($r['qty'] < 0 ? '<b class="q10">'.$r['qty'].'</b>' : $r['qty']).' '.Lang::$npc['repWith'].' <a href="?faction='.$r['id'].'">'.$r['name']."</a></div></li>\n";
|
||||
endforeach;
|
||||
endif;
|
||||
|
||||
if (!empty($g['title'])):
|
||||
echo ' <li><div>'.sprintf(Lang::$quest['theTitle'], $g['title'])."</div></li>\n";
|
||||
endif;
|
||||
|
||||
if (!empty($g['tp'])):
|
||||
echo ' <li><div>'.$g['tp'].' '.Lang::$quest['bonusTalents']."</div></li>\n";
|
||||
endif;
|
||||
|
||||
echo " </ul>\n";
|
||||
endif;
|
||||
|
||||
if ($m = $this->mail):
|
||||
echo ' <h3>'.sprintf(Lang::$quest['mailDelivery'], $m['delay'])."</h3>\n";
|
||||
|
||||
if ($m['subject']):
|
||||
echo ' <div class="book"><div class="page">'.$m['subject']."</div></div>\n";
|
||||
endif;
|
||||
|
||||
if ($m['text']):
|
||||
echo ' <div class="book"><div class="page">'.$m['text']."</div></div>\n";
|
||||
endif;
|
||||
endif;
|
||||
?>
|
||||
<h2 class="clear"><?php echo Lang::$main['related']; ?></h2>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$this->brick('tabsRelated');
|
||||
|
||||
$this->brick('contribute');
|
||||
?>
|
||||
|
||||
</div><!-- main-contents -->
|
||||
</div><!-- main -->
|
||||
|
||||
<?php $this->brick('footer'); ?>
|
||||
@@ -1,98 +0,0 @@
|
||||
{include file='header.tpl'}
|
||||
|
||||
<div class="main" id="main">
|
||||
<div class="main-precontents" id="main-precontents"></div>
|
||||
<div class="main-contents" id="main-contents">
|
||||
|
||||
{if !empty($announcements)}
|
||||
{foreach from=$announcements item=item}
|
||||
{include file='bricks/announcement.tpl' an=$item}
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
<script type="text/javascript">
|
||||
g_initPath({$path}, {if empty($filter.query)} 0 {else} 1 {/if});
|
||||
{if !empty($filter.query)}
|
||||
Menu.modifyUrl(Menu.findItem(mn_database, [3]), {ldelim} filter: '+={$filter.query|escape:'quotes'}' {rdelim}, {ldelim} onAppendCollision: fi_mergeFilterParams, onAppendEmpty: fi_setFilterParams, menuUrl: Menu.getItemUrl(Menu.findItem(mn_database, [3])) {rdelim});
|
||||
{/if}
|
||||
</script>
|
||||
|
||||
<div id="fi" style="display: {if empty($filter.query)}none{else}block{/if};">
|
||||
<form action="?quests{$subCat}&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
|
||||
<div class="rightpanel">
|
||||
<div style="float: left">{$lang.type}{$lang.colon}</div><small><a href="javascript:;" onclick="document.forms['fi'].elements['ty[]'].selectedIndex = -1; return false" onmousedown="return false">{$lang.clear}</a></small>
|
||||
<div class="clear"></div>
|
||||
<select name="ty[]" size="6" multiple="multiple" class="rightselect">
|
||||
{foreach from=$lang.questInfo key=k item=str}
|
||||
<option value="{$k}"{if isset($filter.ty) && in_array($k, (array)$filter.ty)} selected{/if}>{$str}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>{$lang.name|ucFirst}{$lang.colon}</td>
|
||||
<td colspan="3">
|
||||
<table><tr>
|
||||
<td> <input type="text" name="na" size="30" {if isset($filter.na)}value="{$filter.na}" {/if}/></td>
|
||||
<td> <input type="checkbox" name="ex" value="on" id="quest-ex" {if isset($filter.ex)}checked {/if}/></td>
|
||||
<td><label for="quest-ex"><span class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, LANG.tooltip_extendedquestsearch, 0, 0, 'q')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()">{$lang.extSearch}</span></label></td>
|
||||
</tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="padded">{$lang.level}{$lang.colon}</td>
|
||||
<td class="padded"> <input type="text" name="minle" maxlength="2" class="smalltextbox" {if isset($filter.minle)}value="{$filter.minle}" {/if}/> - <input type="text" name="maxle" maxlength="2" class="smalltextbox" {if isset($filter.maxle)}value="{$filter.maxle}" {/if}/></td>
|
||||
<td class="padded" width="100%">
|
||||
<table><tr>
|
||||
<td> {$lang._reqLevel}{$lang.colon}</td>
|
||||
<td> <input type="text" name="minrl" maxlength="2" class="smalltextbox" {if isset($filter.minrl)}value="{$filter.minrl}" {/if}/> - <input type="text" name="maxrl" maxlength="2" class="smalltextbox" {if isset($filter.maxrl)}value="{$filter.maxrl}" {/if}/></td>
|
||||
</tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="padded">{$lang.side}{$lang.colon}</td>
|
||||
<td class="padded" colspan="3"> <select name="si">
|
||||
<option></option>
|
||||
{foreach from=$lang.si key=k item=str}
|
||||
<option value="{$k}"{if isset($filter.si) && $k == $filter.si} selected{/if}>{$str}</option>
|
||||
{/foreach}
|
||||
</select></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="fi_criteria" class="padded criteria"><div></div></div>
|
||||
<div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false">{$lang.addFilter}</a></div>
|
||||
|
||||
<div class="padded2 clear">
|
||||
<div style="float: right">{$lang.refineSearch}</div>
|
||||
{$lang.match}{$lang.colon}<input type="radio" name="ma" value="" id="ma-0" {if !isset($filter.ma)}checked="checked" {/if}/><label for="ma-0">{$lang.allFilter}</label><input type="radio" name="ma" value="1" id="ma-1" {if isset($filter.ma)}checked="checked"{/if} /><label for="ma-1">{$lang.oneFilter}</label>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<div class="padded">
|
||||
<input type="submit" value="{$lang.applyFilter}" />
|
||||
<input type="reset" value="{$lang.resetForm}" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<div class="pad"></div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
fi_init('quests');
|
||||
{foreach from=$filter.fi item=str}
|
||||
{$str}
|
||||
{/foreach}
|
||||
//]]></script>
|
||||
|
||||
<div id="lv-generic" class="listview"></div>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
{include file='listviews/quest.tpl' data=$lvData.data params=$lvData.params}
|
||||
//]]></script>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div><!-- main-contents -->
|
||||
</div><!-- main -->
|
||||
|
||||
{include file='footer.tpl'}
|
||||
105
template/pages/quests.tpl.php
Normal file
105
template/pages/quests.tpl.php
Normal file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
$this->brick('header');
|
||||
$f = $this->filter; // shorthand
|
||||
?>
|
||||
|
||||
<div class="main" id="main">
|
||||
<div class="main-precontents" id="main-precontents"></div>
|
||||
<div class="main-contents" id="main-contents">
|
||||
|
||||
<?php $this->brick('announcement'); ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
g_initPath(<?php echo json_encode($this->path, JSON_NUMERIC_CHECK).', '.(empty($f['query']) ? 0 : 1) ?>);
|
||||
<?php
|
||||
if (!empty($f['query'])):
|
||||
// todo: update menu-class Menu.modifyUrl(Menu.findItem(mn_database, [3]), { filter: '+={$filter.query|escape:'quotes'}' }, { onAppendCollision: fi_mergeFilterParams, onAppendEmpty: fi_setFilterParams, menuUrl: Menu.getItemUrl(Menu.findItem(mn_database, [3])) });
|
||||
endif;
|
||||
?>
|
||||
</script>
|
||||
|
||||
<div id="fi" style="display: <?php echo empty($f['query']) ? 'none' : 'block' ?>;">
|
||||
<form action="?quests<?php echo $this->subCat; ?>&filter" method="post" name="fi" onsubmit="return fi_submit(this)" onreset="return fi_reset(this)">
|
||||
<div class="rightpanel">
|
||||
<div style="float: left"><?php echo Lang::$game['type'].Lang::$main['colon']; ?></div><small><a href="javascript:;" onclick="document.forms['fi'].elements['ty[]'].selectedIndex = -1; return false" onmousedown="return false"><?php echo Lang::$main['clear']; ?></a></small>
|
||||
<div class="clear"></div>
|
||||
<select name="ty[]" size="6" multiple="multiple" class="rightselect">
|
||||
<?php
|
||||
foreach (Lang::$quest['questInfo'] as $i => $str):
|
||||
echo ' <option value="'.$i.'"'.(isset($f['ty']) && in_array($i, (array)$f['ty']) ? ' selected' : null).'>'.$str."</option>\n";
|
||||
endforeach;
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><?php echo Util::ucFirst(Lang::$main['name']).Lang::$main['colon']; ?></td>
|
||||
<td colspan="3">
|
||||
<table><tr>
|
||||
<td> <input type="text" name="na" size="30" <?php echo isset($f['na']) ? 'value="'.Util::htmlEscape($f['na']).'" ' : null; ?>/></td>
|
||||
<td> <input type="checkbox" name="ex" value="on" id="quest-ex" <?php echo isset($f['ex']) ? 'checked ' : null; ?>/></td>
|
||||
<td><label for="quest-ex"><span class="tip" onmouseover="$WH.Tooltip.showAtCursor(event, LANG.tooltip_extendedquestsearch, 0, 0, 'q')" onmousemove="$WH.Tooltip.cursorUpdate(event)" onmouseout="$WH.Tooltip.hide()"><?php echo Lang::$main['extSearch']; ?></span></label></td>
|
||||
</tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="padded"><?php echo Lang::$game['level'].Lang::$main['colon']; ?></td>
|
||||
<td class="padded"> <input type="text" name="minle" maxlength="2" class="smalltextbox" <?php echo isset($f['minle']) ? 'value="'.$f['minle'].'" ' : null; ?>/> - <input type="text" name="maxle" maxlength="2" class="smalltextbox" <?php echo isset($f['maxle']) ? 'value="'.$f['maxle'].'" ' : null; ?>/></td>
|
||||
<td class="padded" width="100%">
|
||||
<table><tr>
|
||||
<td> <?php echo Lang::$main['_reqLevel'].Lang::$main['colon']; ?></td>
|
||||
<td> <input type="text" name="minrl" maxlength="2" class="smalltextbox" <?php echo isset($f['minrl']) ? 'value="'.$f['minrl'].'" ' : null; ?>/> - <input type="text" name="maxrl" maxlength="2" class="smalltextbox" <?php echo isset($f['maxrl']) ? 'value="'.$f['maxrl'].'" ' : null; ?>/></td>
|
||||
</tr></table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="padded"><?php echo Lang::$main['side'].Lang::$main['colon']; ?></td>
|
||||
<td class="padded" colspan="3"> <select name="si">
|
||||
<option></option>
|
||||
<?php
|
||||
foreach (Lang::$game['si'] as $i => $str):
|
||||
echo ' <option value="'.$i.'"'.(isset($f['si']) && $i == $f['si'] ? ' selected' : null).'>'.$str."</option>\n";
|
||||
endforeach;
|
||||
?>
|
||||
</select></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="fi_criteria" class="padded criteria"><div></div></div>
|
||||
<div><a href="javascript:;" id="fi_addcriteria" onclick="fi_addCriterion(this); return false"><?php echo Lang::$main['addFilter']; ?></a></div>
|
||||
|
||||
<div class="padded2 clear">
|
||||
<div style="float: right"><?php echo Lang::$main['refineSearch']; ?></div>
|
||||
<?php echo Lang::$main['match'].Lang::$main['colon']; ?><input type="radio" name="ma" value="" id="ma-0" <?php echo !isset($f['ma']) ? 'checked="checked" ' : null ?>/><label for="ma-0"><?php echo Lang::$main['allFilter']; ?></label><input type="radio" name="ma" value="1" id="ma-1" <?php echo isset($f['ma']) ? 'checked="checked" ' : null ?> /><label for="ma-1"><?php echo Lang::$main['oneFilter']; ?></label>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<div class="padded">
|
||||
<input type="submit" value="<?php echo Lang::$main['applyFilter']; ?>" />
|
||||
<input type="reset" value="<?php echo Lang::$main['resetForm']; ?>" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<div class="pad"></div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
fi_init('quests');
|
||||
<?php
|
||||
foreach ($f['fi'] as $str):
|
||||
echo ' '.$str."\n";
|
||||
endforeach;
|
||||
?>
|
||||
//]]></script>
|
||||
|
||||
<div id="lv-generic" class="listview"></div>
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
<?php $this->lvBrick($this->lvData['file'], ['data' => $this->lvData['data'], 'params' => $this->lvData['params']]); ?>
|
||||
//]]></script>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div><!-- main-contents -->
|
||||
</div><!-- main -->
|
||||
|
||||
<?php $this->brick('footer'); ?>
|
||||
Reference in New Issue
Block a user