Files
aowow/index.php
Sarjuuk 8d3698d466 initial commit
features:
- tool - Maps:
   * finally supports multi-layered zones
   * should also support icons if needed (questgiver, ect)

- tool - Item Comparison:
   * fully functional (yes, that includes heirlooms and items with random props)
   * may throw a minor js-error if using arrow-keys/esc/ret in input-fields in the LightboxPopus (but wowhead does also)
   * icons for prismatic sockets are not displayed if no other sockets are present (calculation is correct though)
   * modelviewer will still 'call home'

- tool - Talent Calculator:
   * got rid of a VERY dirty hack for the icons (they are now supplied as texture, not laoded one at a time)
   * glyphs should also be a bit more informative
   * talent data is pulled from static file, that should a) speed up load and b) prevent lockups if it cant be generated on the fly
   * you can now set the level for your build, which affects available talent points, glyphs and glyph-slots

- tool - Pet Calculator:
   * initial implementation; basically the same as the Talent Calculator

- general concept changed:
   * dropped ajax.php; json is now supplied by the appropriate page if &json is appended to the url
   * search.php and opensearch.php are being merged; again, output will depend on the appended parameter (&openserach, &json)
   * data included via data.php will be static and assembled only on installation and when the database changes (should speed up load)
   * locale strings are now in a single file instead of being split up to the template
   * still getting rid of criss-cross-includes, global variables and string-defines
2012-12-19 00:53:36 +01:00

128 lines
4.0 KiB
PHP

<?php
define('AOWOW_REVISION', 12);
if (!file_exists('config/config.php'))
{
$cwDir = /*$_SERVER['DOCUMENT_ROOT']; //*/getcwd();
include 'setup/setup.php';
exit;
}
// include all necessities, set up basics
include 'includes/kernel.php';
switch ($pageCall)
{
/* called by user */
case 'account': // account management [nyi]
case 'achievement':
case 'achievements':
// case 'arena-team':
// case 'arena-teams':
case 'class':
case 'classes':
case 'currency':
case 'currencies':
case 'compare': // tool: item comparison
case 'event':
case 'events':
case 'faction':
case 'factions':
// case 'guild':
// case 'guilds':
case 'item':
case 'items':
case 'itemset':
case 'itemsets':
case 'maps': // tool: map listing
case 'npc':
case 'npcs':
case 'object':
case 'objects':
case 'pet':
case 'pets':
case 'profile': // character profiler [nyi]
case 'profiles': // character profile listing [nyi]
case 'quest':
case 'quests':
case 'race':
case 'races':
case 'skill':
case 'skills':
case 'spell':
case 'spells':
case 'title':
case 'titles':
case 'user': // tool: user profiles [nyi]
case 'zone':
case 'zones':
if (file_exists('pages/'.$pageCall.'.php'))
include 'pages/'.$pageCall.'.php';
else
include 'pages/error.php';
break;
case 'talent': // tool: talent calculator
case 'petcalc': // tool: pet talent calculator
include 'pages/talent.php';
break;
/* called by script */
case 'contactus':
if ($pageCall == 'contactus')
{
// 0:ok; 1:captchaInvalid; 2:tooLong; 3:noReasonGiven; 7:alreadyReported; other:prints String
die("not yet implemented:\n".print_r($_POST));
}
case 'comment':
if ($pageParam == 'rating')
{
// why is this called via index...?
die('{"success":true,"error":"","up":7,"down":9}');
}
else if ($pageParam == 'rate')
{
// 0:success, 1:ratingban, 3:rated too often
die('3');
}
case 'locale': // subdomain-workaround, change the language
User::setLocale($pageParam);
User::writeCookie();
header('Location: '.(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '.'));
break;
case 'search': // tool: quick search
case 'data': // dataset-loader
include $pageCall.'.php';
break;
/* other */
case 'build':
include 'tools/dataset-assembler/'.$pageParam.'.php';
break;
case 'latest-comments':
case 'latest-screenshots':
case 'latest-videos':
case 'missing-comments':
case 'missing-screenshots':
case 'missing-videos':
case 'unrated-comments':
case 'random':
include 'pages/miscTools.php';
break;
case '': // no parameter given -> MainPage
include 'pages/main.php';
break;
case 'setup':
if (User::isInGroup(U_GROUP_EMPLOYEE))
{
include 'setup/syncronize.php';
break;
}
default: // unk parameter given -> ErrorPage
if (isset($_GET['power']))
die('$WowheadPower.register(0, '.User::$localeId.', {})');
else // in conjunction with a propper rewriteRule in .htaccess...
include 'pages/error.php';
break;
}
?>