Compare commits
No commits in common. "master" and "develop" have entirely different histories.
@ -26,11 +26,11 @@ switch ($_REQUEST["comment"]):
|
||||
// $_POST['replyto'] - номер поста, на который отвечает
|
||||
// $_SESSION['userid'] - номер пользователя
|
||||
$newid = $DB->query('INSERT
|
||||
INTO '.$UDWBaseconf['aowow']['db'].'.?_aowow_comments(`type`, `typeid`, `userid`, `commentbody`, `post_date`{, ?#})
|
||||
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 '.$UDWBaseconf['aowow']['db'].'.?_aowow_comments SET `replyto`=?d WHERE `id`=?d LIMIT 1', $newid, $newid);
|
||||
$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;}';
|
||||
@ -40,7 +40,7 @@ switch ($_REQUEST["comment"]):
|
||||
// Удаление комментарий (Ajax)
|
||||
// Номер комментария: $_GET['id']
|
||||
// Имя пользователя, удаляющего комментарий: $_GET['username']
|
||||
$DB->query('DELETE FROM '.$UDWBaseconf['aowow']['db'].'.?_aowow_comments WHERE `id`=?d {AND `userid`=?d} LIMIT 1', $_GET['id'], ($_SESSION['roles'] > 1) ? DBSIMPLE_SKIP : $_SESSION['userid']
|
||||
$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':
|
||||
@ -49,7 +49,7 @@ switch ($_REQUEST["comment"]):
|
||||
// Новое содержание комментария: $_POST['body']
|
||||
// Номер пользователя: $_SESSION['userid']
|
||||
if (IsSet($_POST['body']))
|
||||
$DB->query('UPDATE '.$UDWBaseconf['aowow']['db'].'.?_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']
|
||||
$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;
|
||||
@ -61,8 +61,8 @@ switch ($_REQUEST["comment"]):
|
||||
* Номер пользователя: $_SESSION['userid']
|
||||
*/
|
||||
// Проверка на хоть какое то значение рейтинга, и на то, что пользователь за этот коммент не голосовал
|
||||
if (IsSet($_GET['rating']) and !($DB->selectCell('SELECT `commentid` FROM '.$UDWBaseconf['aowow']['db'].'.?_aowow_comments_rates WHERE `userid`=?d AND `commentid`=?d LIMIT 1', $_SESSION['userid'], $_GET['id'])))
|
||||
$DB->query('INSERT INTO '.$UDWBaseconf['aowow']['db'].'.?_aowow_comments_rates(`commentid`, `userid`, `rate`) VALUES (?d, ?d, ?d)', $_GET['id'], $_SESSION['userid'], $_GET['rating']);
|
||||
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':
|
||||
// Восстановление комментария
|
||||
14
faction.php
@ -31,8 +31,8 @@ if (!$faction = load_cache(18, intval($id))) {
|
||||
global $DB;
|
||||
|
||||
$row = $DB->selectRow('
|
||||
SELECT factionID, name' . ', description1' . ', description2' . ', team, side
|
||||
FROM '.$UDWBaseconf['aowow']['db'].'.?_aowow_factions
|
||||
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
|
||||
@ -42,14 +42,14 @@ if (!$faction = load_cache(18, intval($id))) {
|
||||
// Номер фракции
|
||||
$faction['entry'] = $row['factionID'];
|
||||
// Название фракции
|
||||
$faction['name'] = $row['name'];
|
||||
$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' . ' FROM '.$UDWBaseconf['aowow']['db'].'.?_aowow_factions WHERE factionID=?d LIMIT 1', $row['team']);
|
||||
$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'];
|
||||
@ -57,7 +57,7 @@ if (!$faction = load_cache(18, intval($id))) {
|
||||
// Итемы с requiredreputationfaction
|
||||
$item_rows = $DB->select('
|
||||
SELECT ?#, entry
|
||||
FROM ?_item_template i, '.$UDWBaseconf['aowow']['db'].'.?_aowow_icons a
|
||||
FROM ?_item_template i, ?_aowow_icons a
|
||||
WHERE
|
||||
i.RequiredReputationFaction=?d
|
||||
AND a.id=i.displayid
|
||||
@ -73,9 +73,9 @@ if (!$faction = load_cache(18, intval($id))) {
|
||||
// Персонажи, состоящие во фракции
|
||||
$creature_rows = $DB->select('
|
||||
SELECT ?#, entry
|
||||
FROM ?_creature_template, '.$UDWBaseconf['aowow']['db'].'.?_aowow_factiontemplate
|
||||
FROM ?_creature_template, ?_aowow_factiontemplate
|
||||
WHERE
|
||||
FactionAlliance IN (SELECT factiontemplateID FROM '.$UDWBaseconf['aowow']['db'].'.?_aowow_factiontemplate WHERE factionID=?d)
|
||||
FactionAlliance IN (SELECT factiontemplateID FROM ?_aowow_factiontemplate WHERE factionID=?d)
|
||||
AND factiontemplateID=FactionAlliance
|
||||
', $npc_cols[0], $id
|
||||
);
|
||||
|
||||
@ -15,8 +15,8 @@ $smarty->config_load($conf_file, 'factions');
|
||||
global $DB;
|
||||
|
||||
$rows = $DB->select('
|
||||
SELECT factionID, team, name' . ' as name, side
|
||||
FROM '.$UDWBaseconf['aowow']['db'].'.?_aowow_factions
|
||||
SELECT factionID, team, name_loc' . $_SESSION['locale'] . ' as name, side
|
||||
FROM ?_aowow_factions
|
||||
WHERE
|
||||
reputationListID!=-1
|
||||
'
|
||||
@ -29,7 +29,7 @@ if (!$factions = load_cache(19, 'x')) {
|
||||
$factions[$numRow] = array();
|
||||
$factions[$numRow]['entry'] = $row['factionID'];
|
||||
if ($row['team'] != 0)
|
||||
$factions[$numRow]['group'] = $DB->selectCell('SELECT name' . ' FROM '.$UDWBaseconf['aowow']['db'].'.?_aowow_factions WHERE factionID=? LIMIT 1', $row['team']);
|
||||
$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'];
|
||||
|
||||
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 0 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 983 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 982 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1004 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1010 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1023 B |
|
Before Width: | Height: | Size: 1020 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 996 B |
|
Before Width: | Height: | Size: 1015 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 956 B |
|
Before Width: | Height: | Size: 928 B |
|
Before Width: | Height: | Size: 977 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1000 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1009 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1021 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1001 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 922 B |
|
Before Width: | Height: | Size: 1023 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 932 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1000 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 958 B |
|
Before Width: | Height: | Size: 1005 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |