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

View File

@ -0,0 +1,4 @@
<Limit GET POST PUT>
Order Allow,Deny
Deny from All
</Limit>

View File

@ -0,0 +1,4 @@
<Limit GET POST PUT>
Order Allow,Deny
Deny from All
</Limit>

4
.cache/world/.htaccess Normal file
View File

@ -0,0 +1,4 @@
<Limit GET POST PUT>
Order Allow,Deny
Deny from All
</Limit>

8
.gitignore vendored
View File

@ -1 +1,9 @@
# List of files and directories not to include in the repository.
# Application configuration
configs/config.php
# Cache
.cache/world/*.aww
.cache/templates/wowhead/%%*.php
/.cache/

31
LICENSE.mdown Normal file
View File

@ -0,0 +1,31 @@
LEGAL NOTICE
------------
**mangos-zero-database** is released under the GPL v3.
The terms and conditions of this license are described below:
Copyright (C) 2011 mangos foundation <foundation@getmangos.com>
mangos-zero-database is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
This file (`LICENSE.mdown`) **must** be apart of any redistributable packages
made from this software. No licenses should be removed from this software if
you are making redistributable copies.
CONTENT COPYRIGHT
-----------------
Game content is Copyright © 2004-2011 Blizzard Entertainment. Other works in
this repository is of authorship © 2005-2011 *mangos foundation*.

108
account.php Normal file
View File

@ -0,0 +1,108 @@
<?php
/*
* UDWBase: WOWDB Web Interface
*
* © UDW 2009-2011
*
* Released under the terms and conditions of the
* GNU General Public License (http://gnu.org).
*
*/
// Загружаем файл перевода для smarty
$smarty->config_load($conf_file, 'account');
// Создание аккаунта
if (($_REQUEST['account'] == 'signup') and (isset($_POST['username'])) and (isset($_POST['password'])) and (isset($_POST['c_password'])) and ($UDWBaseconf['register'] == true)) {
// Совпадают ли введенные пароли?
if ($_POST['password'] != $_POST['c_password']) {
$smarty->assign('signup_error', $smarty->get_config_vars('Different_passwords'));
} else {
// Существует ли уже такой пользователь?
if ($rDB->selectCell('SELECT Count(id) FROM ?_account WHERE username=? LIMIT 1', $_POST['username']) == 1) {
$smarty->assign('signup_error', $smarty->get_config_vars('Such_user_exists'));
} else {
// Вроде все нормально, создаем аккаунт
$success = $rDB->selectCell('INSERT INTO ?_account(`username`, `sha_pass_hash`, `email`, `joindate`, `expansion`, `last_ip`)
VALUES (?, ?, ?, NOW(), ?, ?)', $_POST['username'], create_usersend_pass($_POST['username'], $_POST['password']), (isset($_POST['email'])) ? $_POST['email'] : '', $UDWBaseconf['expansion'], (isset($_SERVER["REMOTE_ADDR"])) ? $_SERVER["REMOTE_ADDR"] : ''
);
if ($success > 0) {
// Все отлично, авторизуем
$_REQUEST['account'] = 'signin';
} else {
// Неизвестная ошибка
$smarty->assign('signup_error', $smarty->get_config_vars('Unknow_error_on_account_create'));
}
}
}
}
if (($_REQUEST['account'] == 'signin') and (isset($_POST['username'])) and (isset($_POST['password']))) {
//$usersend_pass = create_usersend_pass($_POST['username'], $_POST['password']);
$shapass = $_POST['password'];
$user = CheckPwd($_POST['username'], $shapass);
if ($user == -1) {
del_user_cookie();
if (isset($_SESSION['username']))
UnSet($_SESSION['username']);
$smarty->assign('signin_error', $smarty->get_config_vars('Such_user_doesnt_exists'));
} elseif ($user == 0) {
del_user_cookie();
if (isset($_SESSION['username']))
UnSet($_SESSION['username']);
$smarty->assign('signin_error', $smarty->get_config_vars('Wrong_password'));
} else {
// Имя пользователя и пароль совпадают
$_SESSION['username'] = $user['name'];
$_SESSION['shapass'] = $shapass;
$_REQUEST['account'] = 'signin_true';
$_POST['remember_me'] = (IsSet($_POST['remember_me'])) ? $_POST['remember_me'] : 'no';
if ($_POST['remember_me'] == 'yes') {
// Запоминаем пользователя
$remember_time = time() + 3000000;
SetCookie('remember_me', $_POST['username'] . $shapass, $remember_time);
} else {
del_user_cookie();
}
}
}
switch ($_REQUEST['account']):
case '':
// TODO: Настройки аккаунта (Account Settings)
break;
case 'signin_false':
case 'signin':
// Вход в систему
$smarty->assign('register', $UDWBaseconf['register']);
$smarty->display('signin.tpl');
break;
case 'signup_false':
case 'signup':
// You can change to your realm page
//header( 'Location: http://your_realm_regpage' );
$smarty->display('signup.tpl');
break;
break;
case 'signout':
// Выход из пользователя
UnSet($user);
session_unset();
session_destroy();
$_SESSION = array();
del_user_cookie();
case 'signin_true':
default:
// На предыдущую страницу
// Срабатывает при:
// 1. $_REQUEST['account'] = 'signout' (выход)
// 2. $_REQUEST['account'] = 'signok' (успешная авторизация)
// 3. Неизвестное значение $_REQUEST['account']
$_REQUEST['next'] = (IsSet($_REQUEST['next'])) ? $_REQUEST['next'] : '';
if (($_REQUEST['next'] == '?account=signin') or ($_REQUEST['next'] == '?account=signup'))
$_REQUEST['next'] = '';
header('Location: ?' . $_REQUEST['next']);
break;
endswitch;

94
ajax.php Normal file
View File

@ -0,0 +1,94 @@
<?php
/*
* UDWBase: WOWDB Web Interface
*
* © UDW 2009-2011
*
* Released under the terms and conditions of the
* GNU General Public License (http://gnu.org).
*
*/
header('Content-type: application/x-javascript');
error_reporting(E_ALL | E_STRICT);
ini_set('serialize_precision', 4);
session_start();
if (isset($_GET['admin-loader']) && $_SESSION['roles'] == 2) {
include 'templates/wowhead/js/admin.js';
exit;
}
// Настройки
require_once 'configs/config.php';
// Для Ajax отключаем debug
$UDWBaseconf['debug'] = false;
// Для Ajax ненужен реалм
$UDWBaseconf['realmd'] = false;
// Настройка БД
global $DB;
require_once('includes/db.php');
function str_normalize($string) {
return strtr($string, array('\\' => '\\\\', "'" => "\\'", '"' => '\\"', "\r" => '\\r', "\n" => '\\n', '</' => '<\/'));
}
// Параметры передаваемые скрипту
@list($what, $id) = explode("=", $_SERVER['QUERY_STRING']);
$id = intval($id);
$x = '';
switch ($what) {
case 'item':
if (!$item = load_cache(6, $id)) {
require_once('includes/allitems.php');
$item = allitemsinfo($id, 1);
save_cache(6, $id, $item);
}
$x .= '$WowheadPower.registerItem(' . $id . ', 0, {';
if ($item['name'])
$x .= 'name: \'' . str_normalize($item['name']) . '\',';
if ($item['quality'])
$x .= 'quality: ' . $item['quality'] . ',';
if ($item['icon'])
$x .= 'icon: \'' . str_normalize($item['icon']) . '\',';
if ($item['info'])
$x .= 'tooltip: \'' . str_normalize($item['info']) . '\'';
$x .= '});';
break;
case 'spell':
if (!$spell = load_cache(14, $id)) {
require_once('includes/allspells.php');
$spell = allspellsinfo($id, 1);
save_cache(14, $id, $spell);
}
$x .= '$WowheadPower.registerSpell(' . $id . ', 0,{';
if ($spell['name'])
$x .= 'name: \'' . str_normalize($spell['name']) . '\',';
if ($spell['icon'])
$x .= 'icon: \'' . str_normalize($spell['icon']) . '\',';
if ($spell['info'])
$x .= 'tooltip: \'' . str_normalize($spell['info']) . '\'';
$x .= '});';
break;
case 'quest':
if (!$quest = load_cache(11, $id)) {
require_once('includes/allquests.php');
$quest = GetDBQuestInfo($id, QUEST_DATAFLAG_AJAXTOOLTIP);
$quest['tooltip'] = GetQuestTooltip($quest);
save_cache(11, $id, $quest);
}
$x .= '$WowheadPower.registerQuest(' . $id . ', 0,{';
if ($quest['name'])
$x .= 'name: \'' . str_normalize($quest['name']) . '\',';
if ($quest['tooltip'])
$x .= 'tooltip: \'' . str_normalize($quest['tooltip']) . '\'';
$x .= '});';
break;
default:
break;
}
echo $x;

73
comment.php Normal file
View File

@ -0,0 +1,73 @@
<?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');
function urlfromtype($type, $typeid) {
global $types;
return $types[$type] . '=' . $typeid . '#comments';
}
switch ($_REQUEST["comment"]):
case 'add':
// Добавление комментария
// $_GET["type"] - тип страницы
// $_GET["typeid"] - номер страницы
// $_POST['commentbody'] - текст комментария
// $_POST['replyto'] - номер поста, на который отвечает
// $_SESSION['userid'] - номер пользователя
$newid = $DB->query('INSERT
INTO ?_aowow_comments(`type`, `typeid`, `userid`, `commentbody`, `post_date`{, ?#})
VALUES (?d, ?d, ?d, ?, NOW(){, ?d})', (empty($_POST['replyto']) ? DBSIMPLE_SKIP : 'replyto'), $_GET["type"], $_GET["typeid"], (empty($_SESSION['userid']) ? 0 : $_SESSION['userid']), stripslashes($_POST['commentbody']), (empty($_POST['replyto']) ? DBSIMPLE_SKIP : $_POST['replyto'])
);
if (empty($_POST['replyto']))
$DB->query('UPDATE ?_aowow_comments SET `replyto`=?d WHERE `id`=?d LIMIT 1', $newid, $newid);
echo '<meta http-equiv="Refresh" content="0; URL=?' . urlfromtype($_GET["type"], $_GET["typeid"]) . '">';
echo '<style type="text/css">';
echo 'body {background-color: black;}';
echo '</style>';
break;
case 'delete':
// Удаление комментарий (Ajax)
// Номер комментария: $_GET['id']
// Имя пользователя, удаляющего комментарий: $_GET['username']
$DB->query('DELETE FROM ?_aowow_comments WHERE `id`=?d {AND `userid`=?d} LIMIT 1', $_GET['id'], ($_SESSION['roles'] > 1) ? DBSIMPLE_SKIP : $_SESSION['userid']
);
break;
case 'edit':
// Редактирование комментария
// Номер комментария: $_GET['id']
// Новое содержание комментария: $_POST['body']
// Номер пользователя: $_SESSION['userid']
if (IsSet($_POST['body']))
$DB->query('UPDATE ?_aowow_comments SET `commentbody`=?, `edit_userid`=?, `edit_date`=NOW() WHERE `id`=?d {AND `userid`=?d} LIMIT 1', stripslashes($_POST['body']), $_SESSION['userid'], $_GET['id'], ($_SESSION['roles'] > 1) ? DBSIMPLE_SKIP : $_SESSION['userid']
);
echo $_POST['body'];
break;
case 'rate':
/*
* Установка собственоого рейтинга (модераторы и т.п.)
* Номер комментария: $_GET['id']
* Новое значение рейтинга: $_GET['rating']
* Номер пользователя: $_SESSION['userid']
*/
// Проверка на хоть какое то значение рейтинга, и на то, что пользователь за этот коммент не голосовал
if (IsSet($_GET['rating']) and !($DB->selectCell('SELECT `commentid` FROM ?_aowow_comments_rates WHERE `userid`=?d AND `commentid`=?d LIMIT 1', $_SESSION['userid'], $_GET['id'])))
$DB->query('INSERT INTO ?_aowow_comments_rates(`commentid`, `userid`, `rate`) VALUES (?d, ?d, ?d)', $_GET['id'], $_SESSION['userid'], $_GET['rating']);
break;
case 'undelete':
// Восстановление комментария
// Номер комментария: $_GET['id']
// Имя пользователя, удаляющего комментарий: $_GET['username']
default:
break;
endswitch;

4
configs/.htaccess Normal file
View File

@ -0,0 +1,4 @@
<Limit GET POST PUT>
Order Allow,Deny
Deny from All
</Limit>

34
configs/config.php.in Normal file
View File

@ -0,0 +1,34 @@
<?php
global $UDWBaseconf;
// -- WORLD Database --
$UDWBaseconf['world']['host'] = '127.0.0.1';
$UDWBaseconf['world']['user'] = 'zp';
$UDWBaseconf['world']['pass'] = 'zpdb';
$UDWBaseconf['world']['db'] = 'zp_world';
$UDWBaseconf['world']['table_prefix'] = ''; // optional table prefix
// -- Realmd Database --
$UDWBaseconf['realmd']['host'] = '127.0.0.1';
$UDWBaseconf['realmd']['user'] = 'zp';
$UDWBaseconf['realmd']['pass'] = 'zpdb';
$UDWBaseconf['realmd']['db'] = 'zp_realm';
$UDWBaseconf['realmd']['table_prefix'] = ''; // optional table prefix
// -- AoWoW Database --
$UDWBaseconf['aowow']['host'] = '127.0.0.1';
$UDWBaseconf['aowow']['user'] = 'zp';
$UDWBaseconf['aowow']['pass'] = 'zpdb';
$UDWBaseconf['aowow']['db'] = 'zp_aowow';
$UDWBaseconf['aowow']['table_prefix'] = ''; // optional table prefix
// Site Configuration
$UDWBaseconf['udwbase']['name'] = 'mangos-zero DB';
$UDWBaseconf['udwbase']['template'] = 'wowhead';
$UDWBaseconf['udwbase']['cache_time'] = (60*60*24*7); // Time to keep cache in seconds (Default: 1 week)
$UDWBaseconf['locale'] = 0;
$UDWBaseconf['register'] = false;
$UDWBaseconf['expansion'] = 0; // Used with register
$UDWBaseconf['limit'] = 300;
$UDWBaseconf['debug'] = true;

244
configs/enus.conf Normal file
View File

@ -0,0 +1,244 @@
# English Translate
js_err = Please make sure you have javascript enabled.
err_title = An error in UDWBase
signin = Sign in
search = Search
un_err = Enter your username
pwd_err = Enter your password
signup_msg = Create your game account
signin_msg = Enter your game account
un = Login
pwd = Password
c_pwd = Repeat password
r_me = Remember me
no_acc = Don't have account yet?
cr_acc = Create right now
create_filter = Create a filter
loading = Loading ...
soldby = Sold by
droppedby = Dropped by
containedinobject = Contained in
containedinitem = Contained in item
contain = Contains
objectiveof = Objective of
rewardof = Reward of
facts = Facts
level = Level
related = Additional information:
pickpocketingloot = Pickpocketing
prospectedfrom = Prospect from
canbeplacedin = Can be placed in
minedfromobject = Mined from
gatheredfromobject = Gathered from
items = Items
objects = Objects
quests = Quests
npcs = NPCs
drop = Drop
starts = Starts
ends = Ends
skinning = Skinning
pickpocketing = Pickpocketing
sells = Sells
reputationwith = Reputation with
experience = Experience
uponcompletionofthisquestyouwillgain = Upon completion of quests, get
reagentfor = Reagent for
skinnedfrom = Skinned from
disenchanting = Disenchanting
This_Object_cant_be_found = Object map not available, Object may be spawned via a script
itemsets = Item Sets
Spells = Spells
Quick_Facts = Quick Facts
Alliance = Alliance
Horde = Horde
Related = See also
Items = Items
Quests = Quests
Level = Level
Factions = Factions
Item_Sets = Item sets
NPCs = NPCs
Objects = Objects
Sign_in = Sign in
Contribute = Contribute
Replying_to__by = The answer to a comment from
Submit = Submit
Cancel = Cancel
Add_your_comment = Add your comment
My_account = My account
Sign_out = Sign out
Comments = Comments
Latest_Comments = Latest comments
Language = Language
Number_of_MySQL_queries = Number of MySQL queries
Time_of_MySQL_queries = Time of MySQL quries
hr = hr
min = min
sec = sec
Respawn = Respawn
Class = Class
[maps]
Link_to_this_map = Link to this map
Clear = Clear
[search]
Search = Search
Search_results_for = Search Results
No_results_for = Nothing found for
Please_try_some_different_keywords_or_check_your_spelling = Please try other keywords, or check request
[npc]
This_NPC_can_be_found_in = This NPC can be found in
This_NPC_cant_be_found = Npc Map not available, NPC may be spawned via a script
Abilities = Abilities
Teaches = Teaches
Level = Level
Classification = Class
Faction = Faction
Health = Health
Mana = Mana
Wealth = Wealth
rank0 = Normal
rank1 = Elite
rank2 = Rare-Elite
rank3 = Boss
rank4 = Rare
React = React
Waypoint = Waypoint
Damage = Damage
Armor = Armor
[spell]
thisspelldoesntexist = This spell does not exist.
spell = Spell
school = School
cost = cost
range = Range
Cast_time = Cast time
Cooldown = Cooldown
Effect = Effect
Duration = Duration
Mechanic = Mechanic
Dispel_type = Dispel type
yards = yards
manas = mana
seconds = seconds
None = None
Value = Value
Interval = Interval
Radius = Radius
Reagents = Reagents
Tools = Tools
Spell_Details = Details on spell
Object = Object
of_base = base
Used_by = Used by
See_also = See also
Taught_by = Taught by
Reward_for_quest = Reward from quest
Class_spells = Class Skills
Weapon_spells = TODO!!
Armor_spells = Armor Proficiencies
Language_spells = Languages
SecondaryProfession_spells = Secondary Skills
Profession_spells = Professions
Pet_spells = Pet Skills
Racial_spells = Racial Traits
[item]
Sells_for = Sells for
Buy_for = Buy for
Teaches = Teaches
Disenchantable = Disenchantable
Required_enchanting_skill = Required enchanting skill
Can_be_placed_in_the_keyring = Can be placed in keyring
Created_by = Created by
Fished_in = Fished in
Disenchanted_from = Disenchanted from
Contains = Contains
[faction]
Group = Group
Side = Side
Members = Members
[object]
Key = Key
Lockpickable = Lockpickable
Mining = Mining
Herb = Herb
Required_lockpicking_skill = Lockpicking skilllevel required
Required_mining_skill = Mining skilllevel required
Required_herb_skill = Herbalism skilllevel required
This_Object_can_be_found_in = This Object can be found in
[quest]
Requires_level = Requires level
Type = Type
Side = Side
Start = Start
End = End
Series = Series
slain = slain
Description = Description
Rewards = Reward
You_will_receive = You will receive
Progress = Progress
Completion = Completion
Gains = Gains
Upon_completion_of_this_quest_you_will_gain = Upon completion of quests, get
You_will_be_able_to_choose_one_of_these_rewards = You can choose one of these awards
You_will_also_receive = Also, you get
Prev_Quests = Requires
Prev_Quests_Desc = To get this quest, you must complete all that quests
Open_Quests = Open Quests
Open_Quests_Desc = Completing this quest is requires to get this quests
Closes_Quests = Closes Quests
Closes_Quests_Desc = Completing this quest, you will not able to get this quests
ReqOne_Quests = Require One of
ReqOne_Quests_Desc = To get this quest, you must complete one of the following quests
Enables_Quests = Enables
Enables_Quests_Desc = When this quest active, you able to get this quests
Enabledby_Quests = Enabled by
Enabledby_Quests_Desc = You can get this quest, only when that quests active
You_will_learn = You will learn
The_following_spell_will_be_cast_on_you = The following spell will be cast on you
Skill = Skill
Suggested_Players = Suggested Players
Timer = Timer
Sharable = Sharable
Daily = Daily
Repeatable = Repeatable
the_title = the title
Required_Money = Required Money
Additional_requirements_to_obtain_this_quest = Additional requirements to obtain this quest
Your_reputation_with = Your reputation with
must_be = must be
higher_than = higher than
lower_than = lower than
class = class
race = race
name = name
[account]
Please_enter_your_username = Enter your username (account)
Please_enter_your_password = Enter your password
Sign_in_to_your_Game_Account = Enter your game account:
Username = Username
Password = Password
Remember_me_on_this_computer = Remember on this computer
Dont_have_an_account = Don't have an account
Create_one_now = Create one now
Signup = Signup
Confirm_password = Confirm password
Please_enter_your_confirm_password = Please enter your confirm password
Create_your_account = Create your account
Email = E-mail
Different_passwords = Entered passwords does not match
Such_user_exists = Such user already exists
Unknow_error_on_account_create = Unknown error on account create
Such_user_doesnt_exists = Such user does not exists
Wrong_password = Wrong Password

142
faction.php Normal file
View File

@ -0,0 +1,142 @@
<?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/allnpcs.php');
require_once('includes/allitems.php');
require_once('includes/allquests.php');
require_once('includes/allcomments.php');
global $npc_cols;
global $item_cols;
global $quest_cols;
$smarty->config_load($conf_file, 'faction');
// Номер фракции
$id = $podrazdel;
if (!$faction = load_cache(18, intval($id))) {
unset($faction);
// Подключаемся к ДБ:
global $DB;
$row = $DB->selectRow('
SELECT factionID, name_loc' . $_SESSION['locale'] . ', description1_loc' . $_SESSION['locale'] . ', description2_loc' . $_SESSION['locale'] . ', team, side
FROM ?_aowow_factions
WHERE factionID=?d
LIMIT 1
', $id
);
if ($row) {
$faction = array();
// Номер фракции
$faction['entry'] = $row['factionID'];
// Название фракции
$faction['name'] = $row['name_loc' . $_SESSION['locale']];
// Описание фракции, из клиента:
$faction['description1'] = $row['description1_loc' . $_SESSION['locale']];
// Описание фракции, c wowwiki.com, находится в таблице factions.sql:
$faction['description2'] = $row['description2_loc' . $_SESSION['locale']];
// Команда/Группа фракции
if ($row['team'] != 0)
$faction['group'] = $DB->selectCell('SELECT name_loc' . $_SESSION['locale'] . ' FROM ?_aowow_factions WHERE factionID=?d LIMIT 1', $row['team']);
// Альянс(1)/Орда(2)
if ($row['side'] != 0)
$faction['side'] = $row['side'];
// Итемы с requiredreputationfaction
$item_rows = $DB->select('
SELECT ?#, entry
FROM ?_item_template i, ?_aowow_icons a
WHERE
i.RequiredReputationFaction=?d
AND a.id=i.displayid
', $item_cols[2], $id
);
if ($item_rows) {
$faction['items'] = array();
foreach ($item_rows as $i => $row)
$faction['items'][] = iteminfo2($row, 0);
unset($faction['items']);
}
// Персонажи, состоящие во фракции
$creature_rows = $DB->select('
SELECT ?#, entry
FROM ?_creature_template, ?_aowow_factiontemplate
WHERE
faction_A IN (SELECT factiontemplateID FROM ?_aowow_factiontemplate WHERE factionID=?d)
AND factiontemplateID=faction_A
', $npc_cols[0], $id
);
if ($creature_rows) {
$faction['creatures'] = array();
foreach ($creature_rows as $i => $row)
$faction['creatures'][] = creatureinfo2($row);
unset($creature_rows);
}
// Квесты для этой фракции
$quests_rows = $DB->select('
SELECT ?#
FROM ?_quest_template
WHERE
RewRepFaction1=?d
OR RewRepFaction2=?d
OR RewRepFaction3=?d
OR RewRepFaction4=?d
', $quest_cols[2], $id, $id, $id, $id
);
if ($quests_rows) {
$faction['quests'] = array();
foreach ($quests_rows as $i => $row)
$faction['quests'][] = GetQuestInfo($row, 0xFFFFFF);
unset($quests_rows);
}
// Faction cache
save_cache(18, $faction['entry'], $faction);
}
}
$page = array(
'Mapper' => false,
'Book' => false,
'Title' => $faction['name'] . ' - ' . $smarty->get_config_vars('Factions'),
'tab' => 0,
'type' => 8,
'typeid' => $faction['entry'],
'path' => '[0, 7, 0]'
);
$smarty->assign('page', $page);
// Комментарии
$smarty->assign('comments', getcomments($page['type'], $page['typeid']));
// Данные о квесте
$smarty->assign('faction', $faction);
// Если хоть одна информация о вещи найдена - передаём массив с информацией о вещях шаблонизатору
if (isset($allitems))
$smarty->assign('allitems', $allitems);
/*
if (isset($npcs))
$smarty->assign('npcs',$npcs);
if (isset($quests))
$smarty->assign('quests',$quests);
if (isset($items))
$smarty->assign('items',$items);
*/
// Количество MySQL запросов
$smarty->assign('mysql', $DB->getStatistics());
// Загружаем страницу
$smarty->display('faction.tpl');

56
factions.php Normal file
View File

@ -0,0 +1,56 @@
<?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, 'factions');
global $DB;
$rows = $DB->select('
SELECT factionID, team, name_loc' . $_SESSION['locale'] . ' as name, side
FROM ?_aowow_factions
WHERE
reputationListID!=-1
'
);
if (!$factions = load_cache(19, 'x')) {
unset($factions);
$factions = array();
foreach ($rows as $numRow => $row) {
$factions[$numRow] = array();
$factions[$numRow]['entry'] = $row['factionID'];
if ($row['team'] != 0)
$factions[$numRow]['group'] = $DB->selectCell('SELECT name_loc' . $_SESSION['locale'] . ' FROM ?_aowow_factions WHERE factionID=? LIMIT 1', $row['team']);
if ($row['side'])
$factions[$numRow]['side'] = $row['side'];
$factions[$numRow]['name'] = $row['name'];
}
save_cache(19, 'x', $factions);
}
global $page;
$page = array(
'Mapper' => false,
'Book' => false,
'Title' => $smarty->get_config_vars('Factions'),
'tab' => 0,
'type' => 0,
'typeid' => 0,
'path' => '[0, 7]'
);
$smarty->assign('page', $page);
// Статистика выполнения mysql запросов
$smarty->assign('mysql', $DB->getStatistics());
$smarty->assign('factions', $factions);
// Загружаем страницу
$smarty->display('factions.tpl');

41
forum.php Normal file
View File

@ -0,0 +1,41 @@
<?php
/*
* UDWBase: WOWDB Web Interface
*
* © UDW 2009-2011
*
* Released under the terms and conditions of the
* GNU General Public License (http://gnu.org).
*
*/
$board = $_REQUEST['board'];
$lang = $_SESSION['locale'];
if ($board < 0) {
switch ($lang) :
// english
case 0:
switch ($board) :
// tools
case -1:
header('Location: http://yourboardurl');
break;
endswitch;
endswitch;
}
else
switch ($lang) :
//english
case 0:
//wow general
switch ($board):
case 0:
header('Location: http://yourboardurl');
break;
endswitch;
default:
header('Location: Location: http://yourboardurl');
break;
endswitch;

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Some files were not shown because too many files have changed in this diff Show More