Compare commits

...

6 Commits

Author SHA1 Message Date
slawkens1
1c002c63a3 * update to 0.7.1 official release 2017-12-13 19:15:44 +01:00
slawkens1
cd366b6087 * changed some notice when version check is failed 2017-12-13 19:06:50 +01:00
slawkens1
83dc5b7650 * removed duplicated "Support List" menu item 2017-12-10 00:42:27 +01:00
slawkens1
d9675b1bc6 * (internal) moved changelog to twig
* added changelog menu item to kathrine template
* (fix) if changelog type or where is set to 0 then display as unknown
2017-11-23 17:55:42 +01:00
slawkens1
036520566c * fixed some php short tag
* fixed guild change description back button
2017-11-22 00:22:31 +01:00
slawkens1
8b302749ff * update to 0.7.1-dev 2017-11-20 18:16:13 +01:00
10 changed files with 69 additions and 62 deletions

View File

@@ -26,7 +26,7 @@
session_start();
define('MYAAC', true);
define('MYAAC_VERSION', '0.7.0');
define('MYAAC_VERSION', '0.7.1');
define('DATABASE_VERSION', 18);
define('TABLE_PREFIX', 'myaac_');
define('START_TIME', microtime(true));

Binary file not shown.

After

Width:  |  Height:  |  Size: 797 B

View File

@@ -93,6 +93,7 @@ else {
'/^account\/character\/comment\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'change_comment'),
'/^account\/confirm_email\/[A-Za-z0-9-_]+\/?$/' => array('subtopic' => 'accountmanagement', 'action' => 'confirm_email', 'v' => '$2'),
'/^characters\/[A-Za-z0-9-_%+\']+$/' => array('subtopic' => 'characters', 'name' => '$1'),
'/^changelog\/[0-9]+\/?$/' => array('subtopic' => 'changelog', 'page' => '$1'),
'/^commands\/add\/?$/' => array('subtopic' => 'commands', 'action' => 'add'),
'/^commands\/edit\/?$/' => array('subtopic' => 'commands', 'action' => 'edit'),
'/^faq\/add\/?$/' => array('subtopic' => 'faq', 'action' => 'add'),

View File

@@ -155,6 +155,7 @@ CREATE TABLE `myaac_menu`
/* MENU_CATEGORY_NEWS kathrine */
INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('kathrine', 'Latest News', 'news', 1, 0);
INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('kathrine', 'News Archive', 'news/archive', 1, 1);
INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('kathrine', 'Changelog', 'changelog', 1, 2);
/* MENU_CATEGORY_ACCOUNT kathrine */
INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('kathrine', 'Account Management', 'account/manage', 2, 0);
INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('kathrine', 'Create Account', 'account/create', 2, 1);
@@ -215,7 +216,6 @@ INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VA
INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('tibiacom', 'Gallery', 'gallery', 5, 4);
INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('tibiacom', 'Server Info', 'serverInfo', 5, 5);
INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('tibiacom', 'Experience Table', 'experienceTable', 5, 6);
INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('tibiacom', 'Support List', 'team', 5, 7);
/* MENU_CATEGORY_SHOP tibiacom */
INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('tibiacom', 'Buy Points', 'points', 6, 0);
INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('tibiacom', 'Shop Offer', 'gifts', 6, 1);

View File

@@ -18,6 +18,7 @@ CREATE TABLE `myaac_menu`
/* MENU_CATEGORY_NEWS kathrine */
INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('kathrine', 'Latest News', 'news', 1, 0);
INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('kathrine', 'News Archive', 'news/archive', 1, 1);
INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('kathrine', 'Changelog', 'changelog', 1, 2);
/* MENU_CATEGORY_ACCOUNT kathrine */
INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('kathrine', 'Account Management', 'account/manage', 2, 0);
INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('kathrine', 'Create Account', 'account/create', 2, 1);
@@ -78,7 +79,6 @@ INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VA
INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('tibiacom', 'Gallery', 'gallery', 5, 4);
INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('tibiacom', 'Server Info', 'serverInfo', 5, 5);
INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('tibiacom', 'Experience Table', 'experienceTable', 5, 6);
INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('tibiacom', 'Support List', 'team', 5, 7);
/* MENU_CATEGORY_SHOP tibiacom */
INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('tibiacom', 'Buy Points', 'points', 6, 0);
INSERT INTO `myaac_menu` (`template`, `name`, `link`, `category`, `ordering`) VALUES ('tibiacom', 'Shop Offer', 'gifts', 6, 1);

View File

@@ -15,7 +15,8 @@ $title = 'Version check';
//$myaac_version = fgets($file);
$myaac_version = @file_get_contents('http://my-aac.org/VERSION');
if(!$myaac_version) {
warning('Error while fetching version info from http://my-aac.org. Site might be offline.');
warning('Error while fetching version info from http://my-aac.org<br/>
Please try again later.');
return;
}

View File

@@ -15,66 +15,32 @@ $id = isset($_GET['id']) ? $_GET['id'] : 0;
$limit = 30;
$offset = $_page * $limit;
$next_page = false;
?>
<br/>
<table border="0" cellspacing="1" cellpadding="4" width="100%">
<tr bgcolor="<?php echo $config['vdarkborder']; ?>">
<td width="22"><font class="white"><b>Type</b></font></td>
<td width="22"><font class="white"><b>Where</b></font></td>
<td width="50"><font class="white"><b>Date</b></font></td>
<td><font class="white"><b>Description</b></font></td>
</tr>
<?php
$changelogs = $db->query('SELECT * FROM `' . TABLE_PREFIX . 'changelog' . '` WHERE `hidden` = 0 ORDER BY `id` DESC LIMIT ' . ($limit + 1) . ' OFFSET ' . $offset)->fetchAll();
$changelogs = $db->query('SELECT * FROM ' . $db->tableName(TABLE_PREFIX . 'changelog') . ' ORDER BY ' . $db->fieldName('id') . ' DESC LIMIT ' . $limit . ' OFFSET ' . $offset);
if(!$changelogs->rowCount())
$i = 0;
foreach($changelogs as $key => &$log)
{
?>
<tr>
<td bgcolor="<?php echo $config['lightborder']; ?>">There are no change logs for the moment.</td>
</tr>
<?php
return;
}
else
{
$i = 0;
foreach($changelogs as $log)
{
$type = getChangelogType($log['type']);
$where = getChangelogWhere($log['where']);
?>
<tr bgcolor="<?php echo getStyle($i++); ?>">
<td align="center">
<img src="images/changelog/<?php echo $type; ?>.png" title="<?php echo ucfirst($type); ?>"/>
</td>
<td align="center">
<img src="images/changelog/<?php echo $where; ?>.png" title="<?php echo ucfirst($where); ?>"/>
</td>
<td><?php echo date("j.m.Y", $log['date']); ?></td>
<td><?php echo $log['body']; ?></td>
</tr>
<?php
if ($i >= $limit)
$next_page = true;
if($i < $limit) {
$log['type'] = getChangelogType($log['type']);
$log['where'] = getChangelogWhere($log['where']);
}
else {
unset($changelogs[$key]);
}
?>
<table border="0" cellspacing="1" cellpadding="4" width="100%">
<?
if($_page > 0)
echo '<tr><td width="100%" align="right" valign="bottom"><a href="?subtopic=changelog&page=' . ($_page - 1) . '" class="size_xxs">Previous Page</a></td></tr>';
if($next_page)
echo '<tr><td width="100%" align="right" valign="bottom"><a href="?subtopic=changelog&page=' . ($_page + 1) . '" class="size_xxs">Next Page</a></td></tr>';
?>
</table>
<?php
if ($i >= $limit)
$next_page = true;
$i++;
}
?>
</table>
<?php
echo $twig->render('changelog.html.twig', array(
'changelogs' => $changelogs,
'page' => $_page,
'next_page' => $next_page,
));
function getChangelogType($v)
{
switch($v) {
@@ -88,7 +54,7 @@ function getChangelogType($v)
return 'fixed';
}
return 'Unknown type';
return 'unknown';
}
function getChangelogWhere($v)
@@ -100,6 +66,6 @@ function getChangelogWhere($v)
return 'website';
}
return 'Unknown where';
return 'unknown';
}
?>

View File

@@ -61,6 +61,9 @@ if(empty($errors))
}
}
}
if(!$guild_vice)
$errors[] = 'You are not a leader or vice leader of guild <b>' . $guild_name . '</b>.';
}
if(empty($errors))
{
@@ -69,8 +72,6 @@ if(empty($errors))
if(!$player->isLoaded())
$errors[] = 'Player with name <b>' . $name . '</b> doesn\'t exist.';
}
if(!$guild_vice)
$errors[] = 'You are not a leader or vice leader of guild <b>' . $guild_name . '</b>.';
if(empty($errors))
{

View File

@@ -0,0 +1,38 @@
<br/>
<table border="0" cellspacing="1" cellpadding="4" width="100%">
<tr bgcolor="{{ config.vdarkborder }}">
<td width="22"><font class="white"><b>Type</b></font></td>
<td width="22"><font class="white"><b>Where</b></font></td>
<td width="50"><font class="white"><b>Date</b></font></td>
<td><font class="white"><b>Description</b></font></td>
</tr>
{% if changelogs|length > 0%}
{% set i = 0 %}
{% for log in changelogs %}
<tr bgcolor="{{ getStyle(i) }}">
<td align="center">
<img src="images/changelog/{{ log.type }}.png" title="{{ log.type|capitalize }}"/>
</td>
<td align="center">
<img src="images/changelog/{{ log.where }}.png" title="{{ log.where|capitalize }}"/>
</td>
<td>{{ log.date|date("j.m.Y") }}</td>
<td>{{ log.body|raw }}</td>
</tr>
{% set i = i + 1 %}
{% endfor %}
{% else %}
<tr>
<td bgcolor="{{ config.lightborder }}">There are no change logs for the moment.</td>
</tr>
{% endif %}
<table border="0" cellspacing="1" cellpadding="4" width="100%">
{% if page > 0 %}
<tr><td width="100%" align="right" valign="bottom"><a href="{{ getLink('changelog/' ~ (page - 1)) }}" class="size_xxs">Previous Page</a></td></tr>
{% endif %}
{% if next_page %}
<tr><td width="100%" align="right" valign="bottom"><a href="{{ getLink('changelog/' ~ (page + 1)) }}" class="size_xxs">Next Page</a></td></tr>
{% endif %}
</table>
</table>

View File

@@ -6,7 +6,7 @@ Here you can change description of your guild.<br/>
(max. {{ config.guild_description_lines_limit }} lines, max. {{ config.guild_description_chars_limit }} chars) <input type="submit" value="Save description"/></form><br/>
<br/>
<center>
<form action="?subtopic=guilds&guild='.$guild->getName().'&action=manager" method="post">
<form action="?subtopic=guilds&guild={{ guild.getName() }}&action=manager" method="post">
{{ include('buttons.back.html.twig') }}
</form>
</center>