mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-18 03:33:26 +02:00
Merge branch 'develop' into feature/settings
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
|
||||
$character_name = isset($_POST['name']) ? stripslashes(ucwords(strtolower($_POST['name']))) : null;
|
||||
$character_name = isset($_POST['name']) ? stripslashes($_POST['name']) : null;
|
||||
$character_sex = isset($_POST['sex']) ? (int)$_POST['sex'] : null;
|
||||
$character_vocation = isset($_POST['vocation']) ? (int)$_POST['vocation'] : null;
|
||||
$character_town = isset($_POST['town']) ? (int)$_POST['town'] : null;
|
||||
@@ -42,4 +42,4 @@ if(!$character_created) {
|
||||
'save' => $save,
|
||||
'errors' => $errors
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@@ -60,14 +60,15 @@ $errors = array();
|
||||
|
||||
if($action == '')
|
||||
{
|
||||
$freePremium = isset($config['lua']['freePremium']) && getBoolean($config['lua']['freePremium']);
|
||||
$freePremium = isset($config['lua']['freePremium']) && getBoolean($config['lua']['freePremium']) || $account_logged->getPremDays() == OTS_Account::GRATIS_PREMIUM_DAYS;
|
||||
$dayOrDays = $account_logged->getPremDays() == 1 ? 'day' : 'days';
|
||||
/**
|
||||
* @var OTS_Account $account_logged
|
||||
*/
|
||||
if(!$account_logged->isPremium())
|
||||
$account_status = '<b><span style="color: red">Free Account</span></b>';
|
||||
else
|
||||
$account_status = '<b><span style="color: green">Premium Account, ' . ($freePremium ? 'Unlimited' : $account_logged->getPremDays() . ' days left') . '</span></b>';
|
||||
$account_status = '<b><span style="color: green">' . ($freePremium ? 'Gratis Premium Account' : 'Premium Account, ' . $account_logged->getPremDays() . ' '.$dayOrDays.' left') . '</span></b>';
|
||||
|
||||
$recovery_key = $account_logged->getCustomField('key');
|
||||
if(empty($recovery_key))
|
||||
|
@@ -167,7 +167,7 @@ else if (isset($_REQUEST['search'])) {
|
||||
}
|
||||
|
||||
$lastDay = 0;
|
||||
if ($p_days != 0 && $p_days != PHP_INT_MAX) {
|
||||
if($p_days != 0 && $p_days != OTS_Account::GRATIS_PREMIUM_DAYS) {
|
||||
$lastDay = time();
|
||||
} else if ($lastDay != 0) {
|
||||
$lastDay = 0;
|
||||
|
@@ -16,8 +16,6 @@ if (!file_exists(BASE . 'CHANGELOG.md')) {
|
||||
return;
|
||||
}
|
||||
|
||||
require LIBS . 'Parsedown.php';
|
||||
|
||||
$changelog = file_get_contents(BASE . 'CHANGELOG.md');
|
||||
|
||||
$Parsedown = new Parsedown();
|
||||
|
@@ -54,16 +54,14 @@ if (empty($_REQUEST['creature'])) {
|
||||
$loot = json_decode($creature['loot'], true);
|
||||
usort($loot, 'sort_by_chance');
|
||||
|
||||
$loot_list = [];
|
||||
foreach ($loot as $item) {
|
||||
foreach ($loot as &$item) {
|
||||
$item['name'] = getItemNameById($item['id']);
|
||||
$item['rarity_chance'] = round($item['chance'] / 1000, 2);
|
||||
$item['rarity'] = getItemRarity($item['chance']);
|
||||
$item['tooltip'] = ucfirst($item['name']) . '<br/>Chance: ' . $item['rarity'] . (config('creatures_loot_percentage') ? ' ('. $item['rarity_chance'] .'%)' : '') . '<br/>Max count: ' . $item['count'];
|
||||
$loot_list[] = $item;
|
||||
}
|
||||
|
||||
$creature['loot'] = isset($loot_list) ? $loot_list : null;
|
||||
$creature['loot'] = isset($loot) ? $loot : null;
|
||||
$creature['voices'] = isset($voices) ? $voices : null;
|
||||
$creature['summons'] = isset($summons) ? $summons : null;
|
||||
$creature['elements'] = isset($elements) ? $elements : null;
|
||||
|
@@ -43,7 +43,15 @@ echo '<br /><br />Page: '.$links_to_pages.'<br />';
|
||||
$last_threads = $db->query("SELECT `players`.`id` as `player_id`, `players`.`name`, `" . FORUM_TABLE_PREFIX . "forum`.`post_text`, `" . FORUM_TABLE_PREFIX . "forum`.`post_topic`, `" . FORUM_TABLE_PREFIX . "forum`.`id`, `" . FORUM_TABLE_PREFIX . "forum`.`last_post`, `" . FORUM_TABLE_PREFIX . "forum`.`replies`, `" . FORUM_TABLE_PREFIX . "forum`.`views`, `" . FORUM_TABLE_PREFIX . "forum`.`post_date` FROM `players`, `" . FORUM_TABLE_PREFIX . "forum` WHERE `players`.`id` = `" . FORUM_TABLE_PREFIX . "forum`.`author_guid` AND `" . FORUM_TABLE_PREFIX . "forum`.`section` = ".(int) $section_id." AND `" . FORUM_TABLE_PREFIX . "forum`.`first_post` = `" . FORUM_TABLE_PREFIX . "forum`.`id` ORDER BY `" . FORUM_TABLE_PREFIX . "forum`.`last_post` DESC LIMIT ".$config['forum_threads_per_page']." OFFSET ".($_page * $config['forum_threads_per_page']))->fetchAll();
|
||||
if(isset($last_threads[0]))
|
||||
{
|
||||
echo '<table width="100%"><tr bgcolor="'.$config['vdarkborder'].'" align="center"><td><span style="color: white; font-size: 10px"><b>Thread</b></span></td><td><span style="color: white; font-size: 10px"><b>Thread Starter</b></span></td><td><span style="color: white; font-size: 10px"><b>Replies</b></span></td><td><span style="color: white; font-size: 10px"><b>Views</b></span></td><td><span style="color: white; font-size: 10px"><b>Last Post</b></span></td></tr>';
|
||||
echo '<table width="100%">
|
||||
<tr bgcolor="'.$config['vdarkborder'].'" align="center">
|
||||
<td class="white">
|
||||
<span style="font-size: 10px"><b>Thread</b></span></td>
|
||||
<td><span style="font-size: 10px"><b>Thread Starter</b></span></td>
|
||||
<td><span style="font-size: 10px"><b>Replies</b></span></td>
|
||||
<td><span style="font-size: 10px"><b>Views</b></span></td>
|
||||
<td><span style="font-size: 10px"><b>Last Post</b></span></td>
|
||||
</tr>';
|
||||
|
||||
$player = new OTS_Player();
|
||||
foreach($last_threads as $thread)
|
||||
@@ -83,4 +91,4 @@ if(isset($last_threads[0]))
|
||||
else
|
||||
echo '<h3>No threads in this board.</h3>';
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@@ -51,8 +51,7 @@ if(empty($errors)) {
|
||||
}
|
||||
|
||||
$twig->display('guilds.change_description.html.twig', array(
|
||||
'guild' => $guild,
|
||||
'rows' => bcsub($config['guild_description_lines_limit'],1)
|
||||
'guild' => $guild
|
||||
));
|
||||
}
|
||||
else {
|
||||
@@ -72,4 +71,4 @@ if(!empty($errors)) {
|
||||
));
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@@ -77,8 +77,12 @@ if(empty($guild_errors)) {
|
||||
$new_rank->setName('New Rank level '.$rank->getLevel());
|
||||
$new_rank->save();
|
||||
}
|
||||
|
||||
foreach($players_with_rank as $player_in_guild) {
|
||||
$player_in_guild->setRank($new_rank);
|
||||
$player = new OTS_Player();
|
||||
$player->load($player_in_guild['id']);
|
||||
if ($player->isLoaded())
|
||||
$player->setRank($new_rank);
|
||||
}
|
||||
}
|
||||
$rank->delete();
|
||||
@@ -120,4 +124,4 @@ if(!empty($guild_errors)) {
|
||||
));
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@@ -29,11 +29,13 @@ if(isset($_GET['archive']))
|
||||
// display big news by id
|
||||
if(isset($_GET['id']))
|
||||
{
|
||||
$id = (int)$_GET['id'];
|
||||
|
||||
$field_name = 'date';
|
||||
if($_REQUEST['id'] < 100000)
|
||||
if($id < 100000)
|
||||
$field_name = 'id';
|
||||
|
||||
$news = $db->query('SELECT * FROM `'.TABLE_PREFIX . 'news` WHERE `hidden` != 1 AND `' . $field_name . '` = ' . (int)$_REQUEST['id'] . '');
|
||||
$news = $db->query('SELECT * FROM `'.TABLE_PREFIX . 'news` WHERE `hidden` != 1 AND `' . $field_name . '` = ' . $id . '');
|
||||
if($news->rowCount() == 1)
|
||||
{
|
||||
$news = $news->fetch();
|
||||
@@ -227,4 +229,4 @@ if(!$news_cached)
|
||||
echo $tmp_content;
|
||||
}
|
||||
else
|
||||
echo $news_cached;
|
||||
echo $news_cached;
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* @link https://my-aac.org
|
||||
*/
|
||||
defined('MYAAC') or die('Direct access not allowed!');
|
||||
$title = 'Gamemasters List';
|
||||
$title = 'Support in game';
|
||||
|
||||
if($config['account_country'])
|
||||
require SYSTEM . 'countries.conf.php';
|
||||
|
Reference in New Issue
Block a user