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:
+78
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* UDWBase: WOWDB Web Interface
|
||||
*
|
||||
* © UDW 2009-2011
|
||||
*
|
||||
* Released under the terms and conditions of the
|
||||
* GNU General Public License (http://gnu.org).
|
||||
*
|
||||
*/
|
||||
|
||||
$smarty->config_load($conf_file, 'objects');
|
||||
|
||||
$type = $podrazdel;
|
||||
|
||||
if (!$data = load_cache(4, intval($type))) {
|
||||
unset($data);
|
||||
|
||||
// Подключаемся к ДБ:
|
||||
global $DB;
|
||||
global $UDWBaseconf;
|
||||
|
||||
// Получаем данные по этому типу объектов
|
||||
$rows = $DB->select('
|
||||
SELECT g.* {, a.requiredskill1 as ?#} {, a.requiredskill2 as ?#}
|
||||
{, l.name_loc?d AS `name_loc`}
|
||||
FROM {?_gameobject_questrelation ?#, } {?_aowow_lock ?#, } ?_gameobject_template g
|
||||
{LEFT JOIN (?_locales_gameobject l) ON l.entry=g.entry AND ?d}
|
||||
WHERE
|
||||
name != ""
|
||||
{ AND g.type = ? }
|
||||
{ AND g.data0=a.lockID AND g.type=3 AND a.type1=2 AND 1=?}
|
||||
{ AND g.data0=a.lockID AND g.type=3 AND a.type2=2 AND 1=?}
|
||||
{ AND a.lockproperties1=2 AND 1=?}
|
||||
{ AND a.lockproperties1=3 AND 1=?}
|
||||
{ AND a.lockproperties2=1 AND 1=?}
|
||||
{ AND g.entry = q.?#}
|
||||
ORDER by name
|
||||
{LIMIT ?d}
|
||||
', (($type == -3) or ($type == -4)) ? 'skill' : DBSIMPLE_SKIP, ($type == -5) ? 'skill' : DBSIMPLE_SKIP, ($_SESSION['locale'] > 0) ? $_SESSION['locale'] : DBSIMPLE_SKIP, ($type == -2) ? 'q' : DBSIMPLE_SKIP, (($type == -3) or ($type == -4) or ($type == -5)) ? 'a' : DBSIMPLE_SKIP, ($_SESSION['locale'] > 0) ? 1 : DBSIMPLE_SKIP, ($type > 0) ? $type : DBSIMPLE_SKIP, (($type == -3) or ($type == -4)) ? 1 : DBSIMPLE_SKIP, ($type == -5) ? 1 : DBSIMPLE_SKIP, ($type == -3) ? 1 : DBSIMPLE_SKIP, ($type == -4) ? 1 : DBSIMPLE_SKIP, ($type == -5) ? 1 : DBSIMPLE_SKIP, ($type == -2) ? 'id' : DBSIMPLE_SKIP, ($UDWBaseconf['limit'] != 0) ? $UDWBaseconf['limit'] : DBSIMPLE_SKIP
|
||||
);
|
||||
|
||||
|
||||
$i = 0;
|
||||
$data = array();
|
||||
foreach ($rows as $numRow => $row) {
|
||||
$data[$i] = array();
|
||||
$data[$i]['entry'] = $row['entry'];
|
||||
if (IsSet($row['skill']))
|
||||
$data[$i]['skill'] = $row['skill'];
|
||||
$data[$i]['name'] = $row['name_loc'] ? $row['name_loc'] : $row['name'];
|
||||
// TODO: Расположение
|
||||
$data[$i]['location'] = "[-1]";
|
||||
// Тип объекта
|
||||
$data[$i]['type'] = (isset($type)) ? $type : $row['type'];
|
||||
$i++;
|
||||
}
|
||||
save_cache(4, intval($type), $data);
|
||||
}
|
||||
global $page;
|
||||
$page = array(
|
||||
'Mapper' => false,
|
||||
'Book' => false,
|
||||
'Title' => $smarty->get_config_vars('Objects'),
|
||||
'tab' => 0,
|
||||
'type' => 0,
|
||||
'typeid' => 0,
|
||||
'path' => '[0, 5,' . $podrazdel . ']'
|
||||
);
|
||||
$smarty->assign('page', $page);
|
||||
|
||||
// Передаем массив данных шаблонизатору
|
||||
$smarty->assign('data', $data);
|
||||
// Статистика выполнения mysql запросов
|
||||
$smarty->assign('mysql', $DB->getStatistics());
|
||||
|
||||
$smarty->display('objects.tpl');
|
||||
Reference in New Issue
Block a user