dev-fixes #27

Closed
lopar wants to merge 12 commits from dev-fixes into dev
Showing only changes of commit 1655ea11fc - Show all commits

View File

@ -85,7 +85,7 @@ $achievement_data = [
'quest' => 'Победы в турнирах.',
'check' => ['Побед', 25, 50, 100, 200, 500],
'prize' => ['екр.', 25, 25, 25, 25, 50],
'startlink' => null
'startlink' => 111
],
];
@ -231,6 +231,16 @@ if (isset($_GET['nagr'])) {
Db::sql('update users set money2 = money2 + ? where id = ?',
[$achievement_data['bs']['prize'][$ai['bs_n']], $u->info['id']]);
$nagrtxt .= $achievement_data['bs']['prize'][$ai['bs_n']] . $achievement_data['bs']['prize'][0];
} elseif ( //Турниры победы trn
in_array($_GET['nagr'], [111, 112, 113, 114, 115]) &&
in_array($ai['trn_n'], [0, 1, 2, 3, 4]) &&
$ai['klastrn'] > $ai['trn_n']
) {
$ai['trn_n'] += 1;
$u->rangup($u->info['id'], $ai['trn_n'], 'trn');
Db::sql('update users set money2 = money2 + ? where id = ?',
[$achievement_data['trn']['prize'][$ai['trn_n']], $u->info['id']]);
$nagrtxt .= $achievement_data['trn']['prize'][$ai['trn_n']] . $achievement_data['trn']['prize'][0];
}
Db::sql('insert into chat (new, city, room, login, `to`, `text`, `time`, type, toChat) values (?,?,?,?,?,?,?,?,?)',
@ -319,6 +329,5 @@ foreach ($achievement_data as $key => $value) {
<H3>Достижения</H3>
<?php
echo $data;
<?= $data;
unset($data);