Imported AoWoW.

This version of AoWoW is based on https://github.com/udw/udwbase and is
not yet usable.

An initial amount of testing has been finished, and you can import the
aowow.sql database into your world database, and create a local copy of
config.php.in as config.php to test this version.

FirePHP (http://firephp.org/) has been added for testing purposes.

Signed-off-by: TheLuda <theluda@getmangos.com>
This commit is contained in:
TheLuda
2011-09-25 20:57:24 +02:00
parent 0fab20e9d4
commit 947f95fb20
12244 changed files with 102011 additions and 0 deletions
+92
View File
@@ -0,0 +1,92 @@
<?php
/*
* UDWBase: WOWDB Web Interface
*
* © UDW 2009-2011
*
* Released under the terms and conditions of the
* GNU General Public License (http://gnu.org).
*
*/
require_once('includes/game.php');
require_once('includes/allcomments.php');
$smarty->config_load($conf_file, 'itemset');
// БД
global $DB;
$id = $podrazdel;
if (!$itemset = load_cache(8, intval($id))) {
unset($itemset);
$row = $DB->selectRow("SELECT * FROM ?_aowow_itemset WHERE itemsetID=? LIMIT 1", $id);
if ($row) {
$itemset = array();
$itemset['entry'] = $row['itemsetID'];
$itemset['name'] = $row['name_loc' . $_SESSION['locale']];
$itemset['minlevel'] = 255;
$itemset['maxlevel'] = 0;
$itemset['count'] = 0;
$x = 0;
$itemset['pieces'] = array();
for ($j = 1; $j <= 10; $j++) {
if ($row['item' . $j]) {
$itemset['pieces'][$itemset['count']] = array();
$itemset['pieces'][$itemset['count']] = iteminfo($row['item' . $j]);
if ($itemset['pieces'][$itemset['count']]['level'] < $itemset['minlevel'])
$itemset['minlevel'] = $itemset['pieces'][$itemset['count']]['level'];
if ($itemset['pieces'][$itemset['count']]['level'] > $itemset['maxlevel'])
$itemset['maxlevel'] = $itemset['pieces'][$itemset['count']]['level'];
$itemset['count']++;
}
}
$itemset['spells'] = array();
for ($j = 1; $j <= 8; $j++)
if ($row['spell' . $j]) {
$itemset['spells'][$x] = array();
$itemset['spells'][$x]['entry'] = $row['spell' . $j];
$itemset['spells'][$x]['tooltip'] = spell_desc($row['spell' . $j]);
$itemset['spells'][$x]['bonus'] = $row['bonus' . $j];
$x++;
}
for ($i = 0; $i <= $x - 1; $i++)
for ($j = $i; $j <= $x - 1; $j++)
if ($itemset['spells'][$j]['bonus'] < $itemset['spells'][$i]['bonus']) {
UnSet($tmp);
$tmp = $itemset['spells'][$i];
$itemset['spells'][$i] = $itemset['spells'][$j];
$itemset['spells'][$j] = $tmp;
}
}
save_cache(8, $id, $itemset);
}
$smarty->assign('itemset', $itemset);
global $page;
$page = array(
'Mapper' => false,
'Book' => false,
'Title' => $itemset['name'] . ' - ' . $smarty->get_config_vars('Item_Sets'),
'tab' => 0,
'type' => 4,
'typeid' => $itemset['entry'],
'path' => '[0, 2]'
);
$smarty->assign('page', $page);
// Комментарии
$smarty->assign('comments', getcomments($page['type'], $page['typeid']));
// --Передаем данные шаблонизатору--
// Количество MySQL запросов
$smarty->assign('mysql', $DB->getStatistics());
// Если хоть одна информация о вещи найдена - передаём массив с информацией о вещях шаблонизатору
if (isset($allitems))
$smarty->assign('allitems', $allitems);
if (isset($allitems))
$smarty->assign('allspells', $allspells);
// Запускаем шаблонизатор
$smarty->display('itemset.tpl');