fixups required for successfull setup
@@ -8,18 +8,18 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
// contains world-data, user-data and logs
|
// contains world-data, user-data and logs
|
||||||
$AoWoWconf['aowow'] = array(
|
$AoWoWconf['aowow'] = array(
|
||||||
'host' => '127.0.0.1',
|
'host' => '127.0.0.1',
|
||||||
'user' => 'root',
|
'user' => '<user>',
|
||||||
'pass' => '',
|
'pass' => '<pass>',
|
||||||
'db' => 'aowow',
|
'db' => 'world',
|
||||||
'prefix' => ''
|
'prefix' => 'aowow_'
|
||||||
);
|
);
|
||||||
|
|
||||||
// -- World Database --
|
// -- World Database --
|
||||||
// used to generate data-tables
|
// used to generate data-tables
|
||||||
$AoWoWconf['world'] = array(
|
$AoWoWconf['world'] = array(
|
||||||
'host' => '127.0.0.1',
|
'host' => '127.0.0.1',
|
||||||
'user' => 'root',
|
'user' => '<user>',
|
||||||
'pass' => '',
|
'pass' => '<pass>',
|
||||||
'db' => 'world',
|
'db' => 'world',
|
||||||
'prefix' => ''
|
'prefix' => ''
|
||||||
);
|
);
|
||||||
@@ -28,8 +28,8 @@ $AoWoWconf['world'] = array(
|
|||||||
// used to generate user-tables
|
// used to generate user-tables
|
||||||
$AoWoWconf['auth'] = array(
|
$AoWoWconf['auth'] = array(
|
||||||
'host' => '127.0.0.1',
|
'host' => '127.0.0.1',
|
||||||
'user' => 'root',
|
'user' => '<user>',
|
||||||
'pass' => '',
|
'pass' => '<pass>',
|
||||||
'db' => 'auth',
|
'db' => 'auth',
|
||||||
'prefix' => ''
|
'prefix' => ''
|
||||||
);
|
);
|
||||||
@@ -38,8 +38,8 @@ $AoWoWconf['auth'] = array(
|
|||||||
// used to display profiles
|
// used to display profiles
|
||||||
$AoWoWconf['characters'][0] = array(
|
$AoWoWconf['characters'][0] = array(
|
||||||
'host' => '127.0.0.1',
|
'host' => '127.0.0.1',
|
||||||
'user' => 'root',
|
'user' => '<user>',
|
||||||
'pass' => '',
|
'pass' => '<pass>',
|
||||||
'db' => 'characters',
|
'db' => 'characters',
|
||||||
'prefix' => ''
|
'prefix' => ''
|
||||||
);
|
);
|
||||||
@@ -49,11 +49,12 @@ $AoWoWconf['characters'][0] = array(
|
|||||||
// -- Site Configuration --
|
// -- Site Configuration --
|
||||||
$AoWoWconf['ttl'] = 1 * MINUTE; // default: 60 - time to live for RSS
|
$AoWoWconf['ttl'] = 1 * MINUTE; // default: 60 - time to live for RSS
|
||||||
$AoWoWconf['cacheTimer'] = 1 * WEEK; // default: 60 * 60 * 7 - Time to keep cache in seconds (Default: 1 week)
|
$AoWoWconf['cacheTimer'] = 1 * WEEK; // default: 60 * 60 * 7 - Time to keep cache in seconds (Default: 1 week)
|
||||||
$AoWowConf['sessionTimeout'] = 1 * HOUR; // default: 60 * 60 - non-permanent session times out in time() + X
|
$AoWoWconf['sessionTimeout'] = 1 * HOUR; // default: 60 * 60 - non-permanent session times out in time() + X
|
||||||
// $AoWoWconf['loginFailTime'] = 15 * MINUTE; // default: 15 * 60 - how long an account is closed after exceeding above limit
|
$AoWoWconf['loginFailTime'] = 15 * MINUTE; // default: 15 * 60 - how long an account is closed after exceeding above limit
|
||||||
// $AoWoWconf['loginFailCount'] = 5; // default: 5 - how often invalid passwords are tollerated
|
$AoWoWconf['loginFailCount'] = 5; // default: 5 - how often invalid passwords are tollerated
|
||||||
$AoWoWconf['defaultLimit'] = 300; // default: 300 - Limit of some SQL queries
|
$AoWoWconf['defaultLimit'] = 300; // default: 300 - Limit of some SQL queries
|
||||||
$AoWoWconf['searchLimit'] = 500; // default: 500 - Limit of some SQL queries
|
$AoWoWconf['searchLimit'] = 500; // default: 500 - Limit of some SQL queries
|
||||||
|
$AoWoWconf['quickSearchLimit'] = 15; // default: 10 - Limit of some SQL queries
|
||||||
$AoWoWconf['debug'] = true; // default: false - Disable cache, show smarty console panel, enable sql-errors
|
$AoWoWconf['debug'] = true; // default: false - Disable cache, show smarty console panel, enable sql-errors
|
||||||
$AoWoWconf['map_grouping'] = 0; // default: 1 - Map object grouping factor. Meters = 10^param. 0:disabled; 1|2|3:enabled (1:recommended)
|
$AoWoWconf['map_grouping'] = 0; // default: 1 - Map object grouping factor. Meters = 10^param. 0:disabled; 1|2|3:enabled (1:recommended)
|
||||||
$AoWoWconf['register'] = true; // Allow account creating
|
$AoWoWconf['register'] = true; // Allow account creating
|
||||||
@@ -62,6 +63,6 @@ $AoWoWconf['boardUrl'] = "http://www.wowhead.com/forums?board="; // a
|
|||||||
$AoWoWconf['name'] = 'Aowow Database Viewer (ADV)'; // Title of the website
|
$AoWoWconf['name'] = 'Aowow Database Viewer (ADV)'; // Title of the website
|
||||||
$AoWoWconf['shortName'] = 'Aowow'; // used in Feeds
|
$AoWoWconf['shortName'] = 'Aowow'; // used in Feeds
|
||||||
$AoWoWconf['battlegroup'] = 'Pure Pwnage'; // pretend, we belong to a battlegroup to satisfy profiler-related Jscripts; region can be determined from realmlist.timezone
|
$AoWoWconf['battlegroup'] = 'Pure Pwnage'; // pretend, we belong to a battlegroup to satisfy profiler-related Jscripts; region can be determined from realmlist.timezone
|
||||||
$AoWoWconf['maintainance'] = false; // brb gnomes say hi
|
$AoWoWconf['maintenance'] = false; // brb gnomes say hi
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ $WH.g_convertRatingToPercent.RB = {
|
|||||||
32: 14,
|
32: 14,
|
||||||
33: 0,
|
33: 0,
|
||||||
34: 0,
|
34: 0,
|
||||||
35: 25,
|
35: 25 * 1.15,
|
||||||
36: 10,
|
36: 10,
|
||||||
37: 2.5,
|
37: 2.5,
|
||||||
44: 4.69512176513672 / 1.1
|
44: 4.69512176513672 / 1.1
|
||||||
|
|||||||
BIN
images/icons/quest_end_daily.gif
Normal file
|
After Width: | Height: | Size: 333 B |
BIN
images/icons/quest_start_daily.gif
Normal file
|
After Width: | Height: | Size: 315 B |
BIN
images/icons/resist-arcane.gif
Normal file
|
After Width: | Height: | Size: 371 B |
BIN
images/icons/resist-fire.gif
Normal file
|
After Width: | Height: | Size: 243 B |
BIN
images/icons/resist-frost.gif
Normal file
|
After Width: | Height: | Size: 346 B |
BIN
images/icons/resist-holy.gif
Normal file
|
After Width: | Height: | Size: 351 B |
BIN
images/icons/resist-nature.gif
Normal file
|
After Width: | Height: | Size: 361 B |
BIN
images/icons/resist-shadow.gif
Normal file
|
After Width: | Height: | Size: 346 B |
@@ -97,7 +97,7 @@ class SmartyAoWoW extends Smarty
|
|||||||
{
|
{
|
||||||
$buff = [];
|
$buff = [];
|
||||||
foreach ($this->notices as $data)
|
foreach ($this->notices as $data)
|
||||||
if (User::isInGroup($data[0]))
|
if (!$data[0] || User::isInGroup($data[0]))
|
||||||
$buff[] = Util::jsEscape($data[1]);
|
$buff[] = Util::jsEscape($data[1]);
|
||||||
|
|
||||||
if ($buff)
|
if ($buff)
|
||||||
@@ -111,7 +111,7 @@ class SmartyAoWoW extends Smarty
|
|||||||
'status' => 1,
|
'status' => 1,
|
||||||
'name' => 'internal error',
|
'name' => 'internal error',
|
||||||
'style' => 'padding-left: 40px; background-image: url(template/images/report.gif); background-size: 15px 15px; background-position: 12px center; border: dashed 2px #C03030;',
|
'style' => 'padding-left: 40px; background-image: url(template/images/report.gif); background-size: 15px 15px; background-position: 12px center; border: dashed 2px #C03030;',
|
||||||
'text' => '<span id="inputbox-error">'.implode("<br>", $buff).'</span>',
|
'text' => '[span id=inputbox-error]'.implode("\n", $buff).'[/span]',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -122,7 +122,8 @@ class SmartyAoWoW extends Smarty
|
|||||||
if (!isset($tv['announcements']))
|
if (!isset($tv['announcements']))
|
||||||
$tv['announcements'] = [];
|
$tv['announcements'] = [];
|
||||||
|
|
||||||
$ann = DB::Aowow()->Select('SELECT * FROM ?_announcements WHERE status = 1 AND (page = ? OR page = "*")', $match[0]);
|
$ann = DB::Aowow()->Select('SELECT * FROM ?_announcements WHERE status = 1 AND (page = ? OR page = "*")', $match[1]);
|
||||||
|
|
||||||
foreach ($ann as $k => $v)
|
foreach ($ann as $k => $v)
|
||||||
{
|
{
|
||||||
if ($t = Util::localizedString($v, 'text'))
|
if ($t = Util::localizedString($v, 'text'))
|
||||||
@@ -311,16 +312,20 @@ class Util
|
|||||||
'pet', 'achievement', 'title', 'event', 'class', 'race', 'skill', null, 'currency'
|
'pet', 'achievement', 'title', 'event', 'class', 'race', 'skill', null, 'currency'
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $combatRatingToItemMod = array( // zero-indexed
|
public static $combatRatingToItemMod = array( // zero-indexed idx:CR; val:Mod
|
||||||
null, 12, 13, 14, 15, 16, 17, 18, 19,
|
null, 12, 13, 14, 15, 16, 17, 18, 19,
|
||||||
20, 21, null, null, null, null, null, null, 28,
|
20, 21, null, null, null, null, null, null, 28,
|
||||||
29, 30, null, null, null, 37, 44
|
29, 30, null, null, null, 37, 44
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $gtCombatRatings = array( // 44 => 4.69512176513672 / 1.1
|
/* manual corrections
|
||||||
|
idx:35 => 25*1.15 => 28.75 strange, this was not mentioned anywhere
|
||||||
|
idx:44 => 4,69512176513672/1.1 => 4,268292513760655 see: gtOCTclasscombatRatingScalar.dbc (also reflects changes to haste (+30% for sham, drui, ect))
|
||||||
|
*/
|
||||||
|
public static $gtCombatRatings = array(
|
||||||
12 => 1.5, 13 => 12, 14 => 15, 15 => 5, 16 => 10, 17 => 10, 18 => 8, 19 => 14, 20 => 14,
|
12 => 1.5, 13 => 12, 14 => 15, 15 => 5, 16 => 10, 17 => 10, 18 => 8, 19 => 14, 20 => 14,
|
||||||
21 => 14, 22 => 10, 23 => 10, 24 => 0, 25 => 0, 26 => 0, 27 => 0, 28 => 10, 29 => 10,
|
21 => 14, 22 => 10, 23 => 10, 24 => 0, 25 => 0, 26 => 0, 27 => 0, 28 => 10, 29 => 10,
|
||||||
30 => 10, 31 => 10, 32 => 14, 33 => 0, 34 => 0, 35 => 25, 36 => 10, 37 => 2.5, 44 => 4.2682925138
|
30 => 10, 31 => 10, 32 => 14, 33 => 0, 34 => 0, 35 => 28.75, 36 => 10, 37 => 2.5, 44 => 4.268292513760655
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $lvlIndepRating = array( // rating doesn't scale with level
|
public static $lvlIndepRating = array( // rating doesn't scale with level
|
||||||
@@ -1356,9 +1361,14 @@ class Util
|
|||||||
// 6 => TYPE_TOTEM Rockbiter AmountX as Damage (ignore)
|
// 6 => TYPE_TOTEM Rockbiter AmountX as Damage (ignore)
|
||||||
// 7 => TYPE_USE_SPELL Engineering gadgets
|
// 7 => TYPE_USE_SPELL Engineering gadgets
|
||||||
// 8 => TYPE_PRISMATIC_SOCKET Extra Sockets AmountX as socketCount (ignore)
|
// 8 => TYPE_PRISMATIC_SOCKET Extra Sockets AmountX as socketCount (ignore)
|
||||||
public static function parseItemEnchantment($eId, $raw = false, &$misc = null)
|
public static function parseItemEnchantment($ench, $raw = false, &$misc = null)
|
||||||
{
|
{
|
||||||
$enchant = DB::Aowow()->selectRow('SELECT *, Id AS ARRAY_KEY FROM ?_itemenchantment WHERE Id = ?d', $eId);
|
$enchant = [];
|
||||||
|
if (is_numeric($ench))
|
||||||
|
$enchant = DB::Aowow()->selectRow('SELECT *, Id AS ARRAY_KEY FROM ?_itemenchantment WHERE Id = ?d', $ench);
|
||||||
|
else if (is_array($ench))
|
||||||
|
$enchant = $ench;
|
||||||
|
|
||||||
if (!$enchant)
|
if (!$enchant)
|
||||||
return [];
|
return [];
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,14 @@ if (!file_exists('config/config.php'))
|
|||||||
// include all necessities, set up basics
|
// include all necessities, set up basics
|
||||||
require 'includes/kernel.php';
|
require 'includes/kernel.php';
|
||||||
|
|
||||||
|
if (version_compare(PHP_VERSION, '5.4.0') <= 0)
|
||||||
|
{
|
||||||
|
if (User::isInGroup(U_GROUP_EMPLOYEE))
|
||||||
|
$smarty->internalNotice(U_GROUP_EMPLOYEE, 'PHP Version 5.4.0 or higher required! Your version is '.PHP_VERSION."\nCore functions are unavailable!");
|
||||||
|
else
|
||||||
|
$smarty->brb();
|
||||||
|
}
|
||||||
|
|
||||||
if ($AoWoWconf['maintenance'] && !User::isInGroup(U_GROUP_EMPLOYEE))
|
if ($AoWoWconf['maintenance'] && !User::isInGroup(U_GROUP_EMPLOYEE))
|
||||||
$smarty->brb();
|
$smarty->brb();
|
||||||
else if ($AoWoWconf['maintenance'] && User::isInGroup(U_GROUP_EMPLOYEE))
|
else if ($AoWoWconf['maintenance'] && User::isInGroup(U_GROUP_EMPLOYEE))
|
||||||
|
|||||||
@@ -219,12 +219,13 @@ function signup()
|
|||||||
$smarty->assign('signup_error', Lang::$account['nameInUse']);
|
$smarty->assign('signup_error', Lang::$account['nameInUse']);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$success = $rDB->Query('INSERT INTO aowow_account (username, sha_pass_hash, email, joindate, last_ip, locale, online) VALUES (?, ?, ?, NOW(), ?, ?, 1)',
|
$success = DB::Auth()->query('INSERT INTO aowow_account (user, passHash, displayName, email, joindate, lastIP, locale) VALUES (?, ?, ?, ?, NOW(), ?, ?)',
|
||||||
$_POST['username'],
|
$_POST['username'],
|
||||||
User::$createUserSendPass($_POST['username'], $_POST['password']),
|
sha1(strtoupper($_POST['username']).':'.strtoupper($_POST['password'])),
|
||||||
|
Util::ucFirst($_POST['username']),
|
||||||
(isset($_POST['email']))? $_POST['email'] : '',
|
(isset($_POST['email']))? $_POST['email'] : '',
|
||||||
(isset($_SERVER["REMOTE_ADDR"]))? $_SERVER["REMOTE_ADDR"] : '',
|
(isset($_SERVER["REMOTE_ADDR"]))? $_SERVER["REMOTE_ADDR"] : '',
|
||||||
$_SESSION['locale']
|
0
|
||||||
);
|
);
|
||||||
if ($success > 0)
|
if ($success > 0)
|
||||||
// all fine, send to login
|
// all fine, send to login
|
||||||
|
|||||||
53
setup/tools/dataset/base-info.php
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
/*
|
||||||
|
$clMasks = [];
|
||||||
|
$raMasks = [];
|
||||||
|
$tbl = DB::Aowow()->Select('SELECT * FROM dbc.CharBaseInfo');
|
||||||
|
|
||||||
|
foreach ($tbl as $data)
|
||||||
|
{
|
||||||
|
$cl = $data['class'];
|
||||||
|
$ra = $data['race'];
|
||||||
|
|
||||||
|
@$clMasks[$ra] |= (1 << ($cl - 1));
|
||||||
|
@$raMasks[$cl] |= (1 << ($ra - 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($clMasks as $ra => $msk)
|
||||||
|
DB::Aowow()->Query('UPDATE ?_races SET classmask = ?d WHERE Id = ?d', $msk, $ra);
|
||||||
|
|
||||||
|
foreach ($raMasks as $cl => $msk)
|
||||||
|
DB::Aowow()->Query('UPDATE ?_classes SET racemask = ?d WHERE Id = ?d', $msk, $cl);
|
||||||
|
|
||||||
|
DB::Aowow()->Query('UPDATE ?_races SET side = side + 1');
|
||||||
|
DB::Aowow()->Query('UPDATE ?_races SET side = 0 WHERE side = 3');
|
||||||
|
|
||||||
|
*/
|
||||||
|
// manually add infos about races
|
||||||
|
// leader, faction, startArea
|
||||||
|
$info = array(
|
||||||
|
null,
|
||||||
|
[29611, 72, 12],
|
||||||
|
[39605, 76, 14],
|
||||||
|
[2784, 47, 1],
|
||||||
|
[7999, 96, 141],
|
||||||
|
[10181, 68, 85],
|
||||||
|
[36648, 81, 215],
|
||||||
|
[7937, 54, 1],
|
||||||
|
[10540, 530, 14],
|
||||||
|
null,
|
||||||
|
[16802, 911, 3430],
|
||||||
|
[17468, 930, 3524]
|
||||||
|
);
|
||||||
|
|
||||||
|
foreach ($info as $id => $data)
|
||||||
|
if ($data)
|
||||||
|
DB::Aowow()->query(
|
||||||
|
'UPDATE ?_races SET leader = ?d, factionId = ?d, startAreaId = ?d WHERE Id = ?d',
|
||||||
|
$data[0],
|
||||||
|
$data[1],
|
||||||
|
$data[2],
|
||||||
|
$id
|
||||||
|
)
|
||||||
|
|
||||||
|
?>
|
||||||
@@ -8,6 +8,8 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
// this script requires the following dbc-files to be parsed and available
|
// this script requires the following dbc-files to be parsed and available
|
||||||
// Spells, SkillLineAbility, SpellItemEnchantment
|
// Spells, SkillLineAbility, SpellItemEnchantment
|
||||||
|
|
||||||
|
// todo (high): restructure to work more efficiently (outer loop: spells, inner loop: locales)
|
||||||
|
|
||||||
/* Examples
|
/* Examples
|
||||||
15: {
|
15: {
|
||||||
name:'Leichtes Rüstungsset',
|
name:'Leichtes Rüstungsset',
|
||||||
@@ -50,14 +52,11 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
},
|
},
|
||||||
*/
|
*/
|
||||||
|
|
||||||
set_time_limit(300);
|
|
||||||
|
|
||||||
// from g_item_slots: 13:"One-Hand", 26:"Ranged", 17:"Two-Hand",
|
// from g_item_slots: 13:"One-Hand", 26:"Ranged", 17:"Two-Hand",
|
||||||
$slotPointer = [13, 17, 26, 26, 13, 17, 17, 13, 17, null, 17, null, null, 13, null, 13, null, null, null, null, 17];
|
$slotPointer = [13, 17, 26, 26, 13, 17, 17, 13, 17, null, 17, null, null, 13, null, 13, null, null, null, null, 17];
|
||||||
$locales = [LOCALE_EN, LOCALE_FR, LOCALE_DE, LOCALE_ES, LOCALE_RU];
|
$locales = [LOCALE_EN, LOCALE_FR, LOCALE_DE, LOCALE_ES, LOCALE_RU];
|
||||||
$enchantSpells = new SpellList([['effect1Id', 53], ['name_loc0', 'QA%', '!']]); // enchantItemPermanent && !qualityAssurance
|
$enchantSpells = new SpellList([['effect1Id', 53], ['name_loc0', 'QA%', '!'], SQL_LIMIT_NONE]); // enchantItemPermanent && !qualityAssurance
|
||||||
$castItems = [];
|
$castItems = [];
|
||||||
$jsonEnchants = [];
|
|
||||||
|
|
||||||
// check directory-structure
|
// check directory-structure
|
||||||
foreach (Util::$localeStrings as $dir)
|
foreach (Util::$localeStrings as $dir)
|
||||||
@@ -68,22 +67,19 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
|
|
||||||
foreach ($locales as $lId)
|
foreach ($locales as $lId)
|
||||||
{
|
{
|
||||||
|
set_time_limit(180);
|
||||||
User::useLocale($lId);
|
User::useLocale($lId);
|
||||||
|
|
||||||
$enchantsOut = [];
|
$enchantsOut = [];
|
||||||
|
|
||||||
foreach ($enchantSpells->iterate() as $__)
|
foreach ($enchantSpells->iterate() as $__)
|
||||||
{
|
{
|
||||||
$enchant = DB::Aowow()->SelectRow('SELECT * FROM ?_itemEnchantment WHERE Id = ?d', $enchantSpells->getField('effect1MiscValue'));
|
|
||||||
if (!$enchant) // 'shouldn't' happen
|
|
||||||
continue;
|
|
||||||
|
|
||||||
// slots have to be recalculated
|
// slots have to be recalculated
|
||||||
$slot = 0;
|
$slot = 0;
|
||||||
if ($enchantSpells->getField('equippedItemClass') == 4) // armor
|
if ($enchantSpells->getField('equippedItemClass') == 4) // armor
|
||||||
{
|
{
|
||||||
if ($invType = $enchantSpells->getField('equippedItemInventoryTypeMask'))
|
if ($invType = $enchantSpells->getField('equippedItemInventoryTypeMask'))
|
||||||
$slot = $enchantSpells->getField('equippedItemInventoryTypeMask') >> 1;
|
$slot = $invType >> 1;
|
||||||
else /* if (equippedItemSubClassMask == 64) */ // shields have it their own way <_<
|
else /* if (equippedItemSubClassMask == 64) */ // shields have it their own way <_<
|
||||||
$slot = (1 << (14 - 1));
|
$slot = (1 << (14 - 1));
|
||||||
}
|
}
|
||||||
@@ -104,9 +100,8 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// costy and locale-independant -> cache
|
$eId = $enchantSpells->getField('effect1MiscValue');
|
||||||
if (!isset($jsonEnchants[$enchant['id']]))
|
$jsonequip = Util::parseItemEnchantment($eId, false, $misc);
|
||||||
$jsonEnchants[$enchant['id']] = Util::parseItemEnchantment($enchant);
|
|
||||||
|
|
||||||
// defaults
|
// defaults
|
||||||
$ench = array(
|
$ench = array(
|
||||||
@@ -115,21 +110,21 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
'icon' => strToLower($enchantSpells->getField('iconString')), // item over spell
|
'icon' => strToLower($enchantSpells->getField('iconString')), // item over spell
|
||||||
'source' => [], // <0: item; >0:spell
|
'source' => [], // <0: item; >0:spell
|
||||||
'skill' => -1, // modified if skill
|
'skill' => -1, // modified if skill
|
||||||
'slots' => [], // determied per spell but set per item
|
'slots' => [], // determined per spell but set per item
|
||||||
'enchantment' => Util::jsEscape(Util::localizedString($enchant, 'text')),
|
'enchantment' => $misc['name'],
|
||||||
'jsonequip' => $jsonEnchants[$enchant['id']],
|
'jsonequip' => $jsonequip,
|
||||||
'temp' => 0, // always 0
|
'temp' => 0, // always 0
|
||||||
'classes' => 0, // modified by item
|
'classes' => 0, // modified by item
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($enchant['skillLine'] > 0)
|
if (isset($misc['reqskill']))
|
||||||
$ench['jsonequip']['reqskill'] = $enchant['skillLine'];
|
$ench['jsonequip']['reqskill'] = $misc['reqskill'];
|
||||||
|
|
||||||
if ($enchant['skillLevel'] > 0)
|
if (isset($misc['reqskillrank']))
|
||||||
$ench['jsonequip']['reqskillrank'] = $enchant['skillLevel'];
|
$ench['jsonequip']['reqskill'] = $misc['reqskillrank'];
|
||||||
|
|
||||||
if ($enchant['requiredLevel'] > 0)
|
if (isset($misc['requiredLevel']))
|
||||||
$ench['jsonequip']['reqlevel'] = $enchant['requiredLevel'];
|
$ench['jsonequip']['requiredLevel'] = $misc['requiredLevel'];
|
||||||
|
|
||||||
// check if the spell has an entry in skill_line_ability -> Source:Profession
|
// check if the spell has an entry in skill_line_ability -> Source:Profession
|
||||||
if ($skill = DB::Aowow()->SelectCell('SELECT skillLineId FROM dbc.skillLineAbility WHERE spellId = ?d', $enchantSpells->id))
|
if ($skill = DB::Aowow()->SelectCell('SELECT skillLineId FROM dbc.skillLineAbility WHERE spellId = ?d', $enchantSpells->id))
|
||||||
@@ -140,9 +135,9 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
$ench['slots'][] = $slot;
|
$ench['slots'][] = $slot;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if this item can be cast via item -> Source:Item
|
// check if this spell can be cast via item -> Source:Item
|
||||||
if (!isset($castItems[$enchantSpells->id]))
|
if (!isset($castItems[$enchantSpells->id]))
|
||||||
$castItems[$enchantSpells->id] = new ItemList([['spellId1', $enchantSpells->id], ['name', 'Scroll of Enchant%', '!']]); // do not reuse enchantment scrolls
|
$castItems[$enchantSpells->id] = new ItemList([['spellId1', $enchantSpells->id], ['name_loc0', 'Scroll of Enchant%', '!']]); // do not reuse enchantment scrolls
|
||||||
|
|
||||||
$cI = &$castItems[$enchantSpells->id]; // this construct is a bit .. unwieldy
|
$cI = &$castItems[$enchantSpells->id]; // this construct is a bit .. unwieldy
|
||||||
foreach ($cI->iterate() as $__)
|
foreach ($cI->iterate() as $__)
|
||||||
@@ -171,33 +166,33 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// everything gathered
|
// everything gathered
|
||||||
if (isset($enchantsOut[$enchant['id']])) // already found, append data
|
if (isset($enchantsOut[$eId])) // already found, append data
|
||||||
{
|
{
|
||||||
foreach ($enchantsOut[$enchant['id']] as $k => $v)
|
foreach ($enchantsOut[$eId] as $k => $v)
|
||||||
{
|
{
|
||||||
if (is_array($v))
|
if (is_array($v))
|
||||||
{
|
{
|
||||||
while ($pop = array_pop($ench[$k]))
|
while ($pop = array_pop($ench[$k]))
|
||||||
$enchantsOut[$enchant['id']][$k][] = $pop;
|
$enchantsOut[$eId][$k][] = $pop;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($k == 'quality') // quality:-1 if spells and items are mixed
|
if ($k == 'quality') // quality:-1 if spells and items are mixed
|
||||||
{
|
{
|
||||||
if ($enchantsOut[$enchant['id']]['source'][0] > 0 && $ench['source'][0] < 0)
|
if ($enchantsOut[$eId]['source'][0] > 0 && $ench['source'][0] < 0)
|
||||||
$enchantsOut[$enchant['id']][$k] = -1;
|
$enchantsOut[$eId][$k] = -1;
|
||||||
else if ($enchantsOut[$enchant['id']]['source'][0] < 0 && $ench['source'][0] > 0)
|
else if ($enchantsOut[$eId]['source'][0] < 0 && $ench['source'][0] > 0)
|
||||||
$enchantsOut[$enchant['id']][$k] = -1;
|
$enchantsOut[$eId][$k] = -1;
|
||||||
else
|
else
|
||||||
$enchantsOut[$enchant['id']][$k] = $ench[$k];
|
$enchantsOut[$eId][$k] = $ench[$k];
|
||||||
}
|
}
|
||||||
else if ($enchantsOut[$enchant['id']][$k] <= 0)
|
else if ($enchantsOut[$eId][$k] <= 0)
|
||||||
$enchantsOut[$enchant['id']][$k] = $ench[$k];
|
$enchantsOut[$eId][$k] = $ench[$k];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // nothing yet, create new
|
else // nothing yet, create new
|
||||||
$enchantsOut[$enchant['id']] = $ench;
|
$enchantsOut[$eId] = $ench;
|
||||||
}
|
}
|
||||||
|
|
||||||
// walk over each entry and strip single-item arrays
|
// walk over each entry and strip single-item arrays
|
||||||
@@ -26,26 +26,26 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
|
|
||||||
$gemQuery = "
|
$gemQuery = "
|
||||||
SELECT
|
SELECT
|
||||||
it.entry,
|
it.entry as itemId,
|
||||||
it.name,
|
it.name,
|
||||||
li.*,
|
li.*,
|
||||||
IF (it.entry < 36000 OR it.ItemLevel < 70, 1 , 2) AS expansion,
|
IF (it.entry < 36000 OR it.ItemLevel < 70, 1 , 2) AS expansion,
|
||||||
(it.Quality) AS quality,
|
(it.Quality) AS quality,
|
||||||
i.iconname as icon,
|
i.inventoryicon1 as icon,
|
||||||
ie.*,
|
ie.*,
|
||||||
gp.colorMask as colors
|
gp.colorMask as colors
|
||||||
FROM
|
FROM
|
||||||
item_template it,
|
item_template it
|
||||||
locales_item li,
|
LEFT JOIN
|
||||||
dbc.gemProperties gp,
|
locales_item li ON li.entry = it.entry
|
||||||
?_icons i,
|
JOIN
|
||||||
?_itemEnchantment ie
|
dbc.gemProperties gp ON gp.Id = it.GemProperties
|
||||||
|
JOIN
|
||||||
|
?_itemEnchantment ie ON gp.spellItemEnchantmentId = ie.Id
|
||||||
|
JOIN
|
||||||
|
dbc.itemdisplayinfo i ON i.Id = it.displayid
|
||||||
WHERE
|
WHERE
|
||||||
it.GemProperties <> 0 AND
|
it.GemProperties <> 0
|
||||||
li.entry = it.entry AND
|
|
||||||
gp.Id = it.GemProperties AND
|
|
||||||
i.Id = it.displayid AND
|
|
||||||
gp.spellItemEnchantmentId = ie.Id
|
|
||||||
ORDER BY
|
ORDER BY
|
||||||
it.entry DESC
|
it.entry DESC
|
||||||
;
|
;
|
||||||
@@ -70,15 +70,15 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
foreach ($gems as $pop)
|
foreach ($gems as $pop)
|
||||||
{
|
{
|
||||||
// costy and locale-independant -> cache
|
// costy and locale-independant -> cache
|
||||||
if (!isset($jsonGems[$pop['entry']]))
|
if (!isset($jsonGems[$pop['itemId']]))
|
||||||
$jsonGems[$pop['entry']] = Util::parseItemEnchantment($pop);
|
$jsonGems[$pop['itemId']] = Util::parseItemEnchantment($pop);
|
||||||
|
|
||||||
$gemsOut[$pop['entry']] = array(
|
$gemsOut[$pop['itemId']] = array(
|
||||||
'name' => Util::jsEscape(Util::localizedString($pop, 'name')),
|
'name' => Util::localizedString($pop, 'name'),
|
||||||
'quality' => $pop['quality'],
|
'quality' => $pop['quality'],
|
||||||
'icon' => strToLower($pop['icon']),
|
'icon' => strToLower($pop['icon']),
|
||||||
'enchantment' => Util::jsEscape(Util::localizedString($pop, 'text')),
|
'enchantment' => Util::localizedString($pop, 'text'),
|
||||||
'jsonequip' => $jsonGems[$pop['entry']],
|
'jsonequip' => $jsonGems[$pop['itemId']],
|
||||||
'colors' => $pop['colors'],
|
'colors' => $pop['colors'],
|
||||||
'expansion' => $pop['expansion']
|
'expansion' => $pop['expansion']
|
||||||
);
|
);
|
||||||
@@ -75,7 +75,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
foreach ($setList as $set)
|
foreach ($setList as $set)
|
||||||
{
|
{
|
||||||
$setOut = array(
|
$setOut = array(
|
||||||
'id' => $set['itemsetID'],
|
'id' => $set['id'],
|
||||||
'name' => (7 - $set['quality']).Util::jsEscape(Util::localizedString($set, 'name')),
|
'name' => (7 - $set['quality']).Util::jsEscape(Util::localizedString($set, 'name')),
|
||||||
'pieces' => [],
|
'pieces' => [],
|
||||||
'heroic' => DB::Aowow()->SelectCell('SELECT IF (Flags & 0x8, "true", "false") FROM item_template WHERE entry = ?d', $set['item1']),
|
'heroic' => DB::Aowow()->SelectCell('SELECT IF (Flags & 0x8, "true", "false") FROM item_template WHERE entry = ?d', $set['item1']),
|
||||||
@@ -98,7 +98,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
if ($set['contentGroup'])
|
if ($set['contentGroup'])
|
||||||
$setOut['note'] = $set['contentGroup'];
|
$setOut['note'] = $set['contentGroup'];
|
||||||
|
|
||||||
if ($set['itemsetID'] < 0)
|
if ($set['id'] < 0)
|
||||||
$setOut['idbak'] = $set['refSetId'];
|
$setOut['idbak'] = $set['refSetId'];
|
||||||
|
|
||||||
for ($i = 1; $i < 11; $i++)
|
for ($i = 1; $i < 11; $i++)
|
||||||
@@ -114,7 +114,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
if (!isset($jsonBonus[$set['spell'.$i]]))
|
if (!isset($jsonBonus[$set['spell'.$i]]))
|
||||||
{
|
{
|
||||||
$bSpell = new SpellList(array(['s.id', $set['spell'.$i]]));
|
$bSpell = new SpellList(array(['s.id', $set['spell'.$i]]));
|
||||||
$jsonBonus[$set['spell'.$i]] = $bSpell->getStatGain();
|
$jsonBonus[$set['spell'.$i]] = $bSpell->getStatGain()[$set['spell'.$i]];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($setOut['setbonus'][$set['bonus'.$i]]))
|
if (isset($setOut['setbonus'][$set['bonus'.$i]]))
|
||||||
@@ -43,7 +43,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
ct.family,
|
ct.family,
|
||||||
ct.modelId1 as displayId,
|
ct.modelId1 as displayId,
|
||||||
cdi.skin1 as skin,
|
cdi.skin1 as skin,
|
||||||
cf.iconString as icon,
|
SUBSTRING_INDEX(cf.iconFile, "\\\\", -1) as icon,
|
||||||
cf.petTalentType as type
|
cf.petTalentType as type
|
||||||
FROM
|
FROM
|
||||||
world.creature_template ct
|
world.creature_template ct
|
||||||
@@ -51,9 +51,9 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
?_factionTemplate ft ON
|
?_factionTemplate ft ON
|
||||||
ft.Id = ct.faction_A -- no beast has different faction set for Horde
|
ft.Id = ct.faction_A -- no beast has different faction set for Horde
|
||||||
JOIN
|
JOIN
|
||||||
?_creatureFamily cf ON
|
dbc.creatureFamily cf ON
|
||||||
cf.Id = ct.family
|
cf.Id = ct.family
|
||||||
JOIN
|
LEFT JOIN
|
||||||
world.locales_creature lc ON
|
world.locales_creature lc ON
|
||||||
lc.entry = ct.entry
|
lc.entry = ct.entry
|
||||||
JOIN
|
JOIN
|
||||||
@@ -73,10 +73,10 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
world.creature c
|
world.creature c
|
||||||
JOIN
|
JOIN
|
||||||
?_zones z ON
|
?_zones z ON
|
||||||
z.x_min < c.position_x AND
|
z.xMin < c.position_x AND
|
||||||
z.x_max > c.position_x AND
|
z.xMax > c.position_x AND
|
||||||
z.y_min < c.position_y AND
|
z.yMin < c.position_y AND
|
||||||
z.y_max > c.position_y AND
|
z.yMax > c.position_y AND
|
||||||
z.mapId = c.map
|
z.mapId = c.map
|
||||||
WHERE
|
WHERE
|
||||||
c.id = ?d;
|
c.id = ?d;
|
||||||
@@ -15,16 +15,16 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
FROM
|
FROM
|
||||||
?_spell s
|
?_spell s
|
||||||
JOIN
|
JOIN
|
||||||
?_talent t On
|
dbc.talent t On
|
||||||
t.rank1 = s.Id
|
t.rank1 = s.Id
|
||||||
JOIN
|
JOIN
|
||||||
?_talenttab tt ON
|
dbc.talenttab tt ON
|
||||||
tt.Id = t.tab
|
tt.Id = t.tabId
|
||||||
WHERE
|
WHERE
|
||||||
tt.?# = ?d AND
|
tt.?# = ?d AND
|
||||||
tt.order = ?d
|
tt.tabNumber = ?d
|
||||||
ORDER BY
|
ORDER BY
|
||||||
t.row, t.col, t.petmask ASC ;
|
t.row, t.column, t.petCategory1 ASC ;
|
||||||
';
|
';
|
||||||
|
|
||||||
$dims = 36; //v-pets
|
$dims = 36; //v-pets
|
||||||
@@ -43,7 +43,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
|
|
||||||
for ($tree = 0; $tree < 3; $tree++)
|
for ($tree = 0; $tree < 3; $tree++)
|
||||||
{
|
{
|
||||||
$what = $k ? 'classes' : 'pets';
|
$what = $k ? 'classMask' : 'creatureFamilyMask';
|
||||||
$set = $k ? 1 << ($k - 1) : 1 << $tree;
|
$set = $k ? 1 << ($k - 1) : 1 << $tree;
|
||||||
$subset = $k ? $tree : 0;
|
$subset = $k ? $tree : 0;
|
||||||
$path = $k ? 'classes\\icons' : 'pets';
|
$path = $k ? 'classes\\icons' : 'pets';
|
||||||
@@ -19,6 +19,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
// r - array:int on what the talent depends on: "r:[u, v]", u - nth talent in tree, v - required rank of u
|
// r - array:int on what the talent depends on: "r:[u, v]", u - nth talent in tree, v - required rank of u
|
||||||
// f - array:int [pets only] creatureFamilies, that use this spell
|
// f - array:int [pets only] creatureFamilies, that use this spell
|
||||||
// t - array:str if the talent teaches a spell, this is the upper tooltip-table containing castTime, cost, cooldown
|
// t - array:str if the talent teaches a spell, this is the upper tooltip-table containing castTime, cost, cooldown
|
||||||
|
// j - array of modifier-arrays per rank for the Profiler [nyi]
|
||||||
// tabs
|
// tabs
|
||||||
// n - name of the tab
|
// n - name of the tab
|
||||||
// t - array of talent-objects
|
// t - array of talent-objects
|
||||||
@@ -36,11 +37,11 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
SELECT
|
SELECT
|
||||||
*
|
*
|
||||||
FROM
|
FROM
|
||||||
?_talenttab
|
dbc.talenttab
|
||||||
WHERE
|
WHERE
|
||||||
classes = ?d
|
classMask = ?d
|
||||||
ORDER BY
|
ORDER BY
|
||||||
`order`, `pets`',
|
`tabNumber`, `creatureFamilyMask`',
|
||||||
$mask
|
$mask
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -54,14 +55,14 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
t.*,
|
t.*,
|
||||||
s.*
|
s.*
|
||||||
FROM
|
FROM
|
||||||
?_talent t,
|
dbc.talent t,
|
||||||
?_spell s
|
?_spell s
|
||||||
WHERE
|
WHERE
|
||||||
t.`tab`= ?d AND
|
t.`tabId`= ?d AND
|
||||||
s.`Id` = t.`rank1`
|
s.`Id` = t.`rank1`
|
||||||
ORDER by t.`row`, t.`col`
|
ORDER by t.`row`, t.`column`
|
||||||
',
|
',
|
||||||
$tabs[$l]['id']
|
$tabs[$l]['Id']
|
||||||
);
|
);
|
||||||
|
|
||||||
$result[$l] = array(
|
$result[$l] = array(
|
||||||
@@ -71,7 +72,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
|
|
||||||
if (!$class)
|
if (!$class)
|
||||||
{
|
{
|
||||||
$petFamId = log($tabs[$l]['pets'], 2);
|
$petFamId = log($tabs[$l]['creatureFamilyMask'], 2);
|
||||||
$result[$l]['icon'] = $petFamIcons[$petFamId];
|
$result[$l]['icon'] = $petFamIcons[$petFamId];
|
||||||
$petCategories = DB::Aowow()->SelectCol('SELECT Id AS ARRAY_KEY, category FROM ?_pet WHERE type = ?d', $petFamId);
|
$petCategories = DB::Aowow()->SelectCol('SELECT Id AS ARRAY_KEY, category FROM ?_pet WHERE type = ?d', $petFamId);
|
||||||
$result[$l]['f'] = array_keys($petCategories);
|
$result[$l]['f'] = array_keys($petCategories);
|
||||||
@@ -89,7 +90,7 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
$s = [];
|
$s = [];
|
||||||
$i = $talents[$j]['tId'];
|
$i = $talents[$j]['tId'];
|
||||||
$n = Util::localizedString($talents[$j], 'name');
|
$n = Util::localizedString($talents[$j], 'name');
|
||||||
$x = $talents[$j]['col'];
|
$x = $talents[$j]['column'];
|
||||||
$y = $talents[$j]['row'];
|
$y = $talents[$j]['row'];
|
||||||
$r = null;
|
$r = null;
|
||||||
$t = [];
|
$t = [];
|
||||||
@@ -107,9 +108,9 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
foreach ($petCategories as $k => $v)
|
foreach ($petCategories as $k => $v)
|
||||||
{
|
{
|
||||||
// cant handle 64bit integer .. split
|
// cant handle 64bit integer .. split
|
||||||
if ($v >= 32 && ((1 << ($v - 32)) & $talents[$j]['petmask2']))
|
if ($v >= 32 && ((1 << ($v - 32)) & $talents[$j]['petCategory2']))
|
||||||
$f[] = $k;
|
$f[] = $k;
|
||||||
else if ($v < 32 && ((1 << $v) & $talents[$j]['petmask']))
|
else if ($v < 32 && ((1 << $v) & $talents[$j]['petCategory1']))
|
||||||
$f[] = $k;
|
$f[] = $k;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,17 +120,17 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
$d[] = $tSpell->parseText()[0];
|
$d[] = $tSpell->parseText()[0];
|
||||||
$s[] = $talents[$j]['rank'.($k + 1)];
|
$s[] = $talents[$j]['rank'.($k + 1)];
|
||||||
|
|
||||||
if ($talents[$j]['isSpell'])
|
if ($talents[$j]['talentSpell'])
|
||||||
$t[] = $tSpell->getTalentHeadForCurrent();
|
$t[] = $tSpell->getTalentHeadForCurrent();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($talents[$j]['dependsOn'])
|
if ($talents[$j]['reqTalent'])
|
||||||
{
|
{
|
||||||
// we didn't encounter the required talent yet => create reference
|
// we didn't encounter the required talent yet => create reference
|
||||||
if (!isset($tNums[$talents[$j]['dependsOn']]))
|
if (!isset($tNums[$talents[$j]['reqTalent']]))
|
||||||
$depLinks[$talents[$j]['dependsOn']] = $j;
|
$depLinks[$talents[$j]['reqTalent']] = $j;
|
||||||
|
|
||||||
$r = [$tNums[$talents[$j]['dependsOn']], $talents[$j]['dependsOnRank'] + 1];
|
$r = [$tNums[$talents[$j]['reqTalent']], $talents[$j]['reqRank'] + 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
$result[$l]['t'][$j] = array(
|
$result[$l]['t'][$j] = array(
|
||||||
@@ -190,6 +191,8 @@ if (!defined('AOWOW_REVISION'))
|
|||||||
// TalentCalc
|
// TalentCalc
|
||||||
foreach ($classes as $cMask)
|
foreach ($classes as $cMask)
|
||||||
{
|
{
|
||||||
|
set_time_limit(20);
|
||||||
|
|
||||||
$cId = log($cMask, 2) + 1;
|
$cId = log($cMask, 2) + 1;
|
||||||
$file = 'datasets\\'.User::$localeString.'\\talents-'.$cId;
|
$file = 'datasets\\'.User::$localeString.'\\talents-'.$cId;
|
||||||
$toFile = '$WowheadTalentCalculator.registerClass('.$cId.', '.json_encode(buildTree($cId), JSON_PRETTY_PRINT | JSON_NUMERIC_CHECK).')';
|
$toFile = '$WowheadTalentCalculator.registerClass('.$cId.', '.json_encode(buildTree($cId), JSON_PRETTY_PRINT | JSON_NUMERIC_CHECK).')';
|
||||||
BIN
template/images/dede/character.gif
Normal file
|
After Width: | Height: | Size: 329 B |
BIN
template/images/enus/character.gif
Normal file
|
After Width: | Height: | Size: 329 B |
BIN
template/images/eses/character.gif
Normal file
|
After Width: | Height: | Size: 329 B |
BIN
template/images/frfr/character.gif
Normal file
|
After Width: | Height: | Size: 329 B |
BIN
template/images/ruru/character.gif
Normal file
|
After Width: | Height: | Size: 329 B |
BIN
template/images/ui/redbullet.jpg
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
template/images/ui/redbullet.png
Normal file
|
After Width: | Height: | Size: 938 B |
63
template/signin.tpl
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
{include file='header.tpl'}
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
<div id="main-precontents"></div>
|
||||||
|
<div id="main-contents" class="main-contents">
|
||||||
|
<div class="pad3"></div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function inputBoxValidate(f)
|
||||||
|
{ldelim}
|
||||||
|
var _ = f.elements[0];
|
||||||
|
if(_.value.length == 0)
|
||||||
|
{ldelim}
|
||||||
|
$WH.ge('inputbox-error').innerHTML = LANG.message_enterusername;
|
||||||
|
_.focus();
|
||||||
|
return false;
|
||||||
|
{rdelim}
|
||||||
|
|
||||||
|
_ = f.elements[1];
|
||||||
|
if(_.value.length == 0)
|
||||||
|
{ldelim}
|
||||||
|
$WH.ge('inputbox-error').innerHTML = LANG.message_enterpassword;
|
||||||
|
_.focus();
|
||||||
|
return false;
|
||||||
|
{rdelim}
|
||||||
|
{rdelim}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<form action="?account=signin_do&next={$next}" method="post" onsubmit="return inputBoxValidate(this)">
|
||||||
|
<div class="inputbox" style="position: relative">
|
||||||
|
<h1>{$lang.doSignIn}</h1>
|
||||||
|
<div id="inputbox-error">{if isset($signinError)}{$signinError}{/if}</div>
|
||||||
|
|
||||||
|
<table align="center">
|
||||||
|
<tr>
|
||||||
|
<td align="right">{$lang.user}{$lang.colon}</td>
|
||||||
|
<td><input type="text" name="username" value="" maxlength="16" id="username-generic" style="width: 10em" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right">{$lang.pass}{$lang.colon}</td>
|
||||||
|
<td><input type="password" name="password" style="width: 10em" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right" valign="top"><input type="checkbox" name="remember_me" id="remember_me" value="yes" checked="checked" /></td>
|
||||||
|
<td>
|
||||||
|
<label for="remember_me">{$lang.rememberMe}</label>
|
||||||
|
<div class="pad2"></div>
|
||||||
|
<input type="submit" value="{$lang.signIn}" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<div style="position: absolute; right: 5px; bottom: 5px;">{$lang.forgot}{$lang.colon}<a href="?account=forgotusername">{$lang.user}</a> | <a href="?account=forgotpassword">{$lang.pass}</a></div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div class="pad3"></div>
|
||||||
|
{if $register}<div style="text-align: center; line-height: 1.5em; font-size: 125%">{$lang.accNoneYet}? <a href="?account=signup">{$lang.accCreateNow}!</a></div>{/if}
|
||||||
|
<script type="text/javascript">$WH.ge('username-generic').focus()</script>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{include file='footer.tpl'}
|
||||||
75
template/signup.tpl
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
{include file='header.tpl'}
|
||||||
|
|
||||||
|
<div id="main">
|
||||||
|
<div id="main-precontents"></div>
|
||||||
|
<div id="main-contents" class="main-contents">
|
||||||
|
<div class="pad3"></div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function inputBoxValidate(f)
|
||||||
|
{ldelim}
|
||||||
|
var _ = f.elements[0];
|
||||||
|
if(_.value.length == 0)
|
||||||
|
{ldelim}
|
||||||
|
$WH.ge('inputbox-error').innerHTML = LANG.message_enterusername;
|
||||||
|
_.focus();
|
||||||
|
return false;
|
||||||
|
{rdelim}
|
||||||
|
|
||||||
|
_ = f.elements[1];
|
||||||
|
if(_.value.length == 0)
|
||||||
|
{ldelim}
|
||||||
|
$WH.ge('inputbox-error').innerHTML = LANG.message_enterpassword;
|
||||||
|
_.focus();
|
||||||
|
return false;
|
||||||
|
{rdelim}
|
||||||
|
|
||||||
|
_ = f.elements[2];
|
||||||
|
if(_.value.length == 0)
|
||||||
|
{ldelim}
|
||||||
|
$WH.ge('inputbox-error').innerHTML = message_passwordsdonotmatch;
|
||||||
|
_.focus();
|
||||||
|
return false;
|
||||||
|
{rdelim}
|
||||||
|
{rdelim}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<form action="?account=signup_do&next={$next}" method="post" onsubmit="return inputBoxValidate(this)">
|
||||||
|
<div class="inputbox" style="position: relative">
|
||||||
|
<h1>{$lang.accCreate}</h1>
|
||||||
|
<div id="inputbox-error">{if isset($signupError)}{$signupError}{/if}</div>
|
||||||
|
<table align="center">
|
||||||
|
<tr>
|
||||||
|
<td align="right">{$lang.user}{$lang.colon}</td>
|
||||||
|
<td><input type="text" name="username" value="" maxlength="16" id="username-generic" style="width: 10em" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right">{$lang.pass}{$lang.colon}</td>
|
||||||
|
<td><input type="password" name="password" style="width: 10em" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right">{$lang.passConfirm}{$lang.colon}</td>
|
||||||
|
<td><input type="password" name="c_password" style="width: 10em" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right">{$lang.email}{$lang.colon}</td>
|
||||||
|
<td><input type="text" name="email" style="width: 10em" /></td>
|
||||||
|
</tr>
|
||||||
|
<td align="right" valign="top"><input type="checkbox" name="remember_me" id="remember_me" value="yes" /></td>
|
||||||
|
<td>
|
||||||
|
<label for="remember_me">{$lang.rememberMe}</label>
|
||||||
|
<div class="pad2"></div>
|
||||||
|
<input type="submit" name="signup" value="{$lang.signup}" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<script type="text/javascript">$WH.ge('username-generic').focus()</script>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{include file='footer.tpl'}
|
||||||