mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-28 18:29:21 +02:00
* fixed some typos
* changes account.management to use buttons defined in template
This commit is contained in:
parent
dece42c155
commit
792770e5e2
1
TODO
1
TODO
@ -27,6 +27,7 @@
|
|||||||
* remove tibiacom template, and include it as a plugin
|
* remove tibiacom template, and include it as a plugin
|
||||||
|
|
||||||
2.0
|
2.0
|
||||||
|
* remove gesior backward support
|
||||||
* remove compat functions
|
* remove compat functions
|
||||||
* remove $template['link_*']
|
* remove $template['link_*']
|
||||||
* folder restructure:
|
* folder restructure:
|
||||||
|
10
index.php
10
index.php
@ -423,18 +423,18 @@ else
|
|||||||
die('ERROR: Cannot load template.');
|
die('ERROR: Cannot load template.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$super = superAdmin();
|
|
||||||
echo '<!-- MyAAC ' . MYAAC_VERSION . ' :: http://www.my-aac.org/ -->' . "\n";
|
echo '<!-- MyAAC ' . MYAAC_VERSION . ' :: http://www.my-aac.org/ -->' . "\n";
|
||||||
if($super) {
|
if(superAdmin()) {
|
||||||
echo '<!-- Generated in: ' . round(microtime(true) - START_TIME, 4) . 'ms -->';
|
echo '<!-- Generated in: ' . round(microtime(true) - START_TIME, 4) . 'ms -->';
|
||||||
echo PHP_EOL . '<!-- Queries done: ' . $db->queries() . ' -->';
|
echo PHP_EOL . '<!-- Queries done: ' . $db->queries() . ' -->';
|
||||||
if(function_exists('memory_get_peak_usage')) {
|
if(function_exists('memory_get_peak_usage')) {
|
||||||
echo PHP_EOL . '<!-- Peak memory usage: ' . convert_bytes(memory_get_peak_usage(true)) . ' -->';
|
echo PHP_EOL . '<!-- Peak memory usage: ' . convert_bytes(memory_get_peak_usage(true)) . ' -->';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($config['database_log']) {
|
||||||
|
echo PHP_EOL . '<!-- Database Queries Done by MyAAC:' . PHP_EOL . $db->getLog() . '-->';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($config['database_log'] && $super) {
|
|
||||||
echo PHP_EOL . '<!-- Database Queries Done by MyAAC:' . PHP_EOL . $db->getLog() . '-->';
|
|
||||||
}
|
|
||||||
$hooks->trigger(HOOK_FINISH);
|
$hooks->trigger(HOOK_FINISH);
|
||||||
?>
|
?>
|
||||||
|
@ -490,7 +490,8 @@ class OTS_Group extends OTS_Row_DAO implements IteratorAggregate, Countable
|
|||||||
// creates filter
|
// creates filter
|
||||||
$filter = new OTS_SQLFilter();
|
$filter = new OTS_SQLFilter();
|
||||||
$filter->compareField('group_id', (int) $this->data['id']);
|
$filter->compareField('group_id', (int) $this->data['id']);
|
||||||
if($this->db->hasColumn('players', 'deletion'))
|
global $db;
|
||||||
|
if($db->hasColumn('players', 'deletion'))
|
||||||
$filter->compareField('deletion', 0);
|
$filter->compareField('deletion', 0);
|
||||||
else
|
else
|
||||||
$filter->compareField('deleted', 0);
|
$filter->compareField('deleted', 0);
|
||||||
|
@ -399,7 +399,7 @@ $account = $player->getAccount();
|
|||||||
Head:<input type="text" name="look_head" size="2" maxlength="11" value="<?php echo $player->getLookHead(); ?>" />
|
Head:<input type="text" name="look_head" size="2" maxlength="11" value="<?php echo $player->getLookHead(); ?>" />
|
||||||
Legs:<input type="text" name="look_legs" size="2" maxlength="11" value="<?php echo $player->getLookLegs(); ?>" />
|
Legs:<input type="text" name="look_legs" size="2" maxlength="11" value="<?php echo $player->getLookLegs(); ?>" />
|
||||||
Type:<input type="text" name="look_type" size="2" maxlength="11" value="<?php echo $player->getLookType(); ?>" />
|
Type:<input type="text" name="look_type" size="2" maxlength="11" value="<?php echo $player->getLookType(); ?>" />
|
||||||
<?php if($db->hasColumn('lookaddons', 'players')): ?>
|
<?php if($db->hasColumn('players', 'lookaddons')): ?>
|
||||||
Addons:<input type="text" name="look_addons" size="2" maxlength="11" value="<?php echo $player->getLookAddons(); ?>" />
|
Addons:<input type="text" name="look_addons" size="2" maxlength="11" value="<?php echo $player->getLookAddons(); ?>" />
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</td>
|
</td>
|
||||||
@ -520,7 +520,7 @@ $account = $player->getAccount();
|
|||||||
<table>
|
<table>
|
||||||
<tr style="background-color: transparent;">
|
<tr style="background-color: transparent;">
|
||||||
<td><label for="deleted">Deleted:</label></td>
|
<td><label for="deleted">Deleted:</label></td>
|
||||||
<td><input type="checkbox" name="deleted" id="deleted" value="true" <?php echo ($player->getCustomField($db->hasColumn('deletion', 'players') ? 'deletion' : 'deleted') == '1' ? ' checked' : ''); ?>/></td>
|
<td><input type="checkbox" name="deleted" id="deleted" value="true" <?php echo ($player->getCustomField($db->hasColumn('players', 'deletion') ? 'deletion' : 'deleted') == '1' ? ' checked' : ''); ?>/></td>
|
||||||
|
|
||||||
<td><label for="hidden">Hidden:</label></td>
|
<td><label for="hidden">Hidden:</label></td>
|
||||||
<td><input type="checkbox" name="hidden" id="hidden" value="true" <?php echo ($player->isHidden() ? ' checked' : ''); ?>/></td>
|
<td><input type="checkbox" name="hidden" id="hidden" value="true" <?php echo ($player->isHidden() ? ' checked' : ''); ?>/></td>
|
||||||
|
@ -38,7 +38,7 @@ if(isset($posts[0]['player_id'])) {
|
|||||||
$db->query("UPDATE `" . TABLE_PREFIX . "forum` SET `views`=`views`+1 WHERE `id` = ".(int) $thread_id);
|
$db->query("UPDATE `" . TABLE_PREFIX . "forum` SET `views`=`views`+1 WHERE `id` = ".(int) $thread_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$lookaddons = $db-hasColumn('players', 'lookaddons');
|
$lookaddons = $db->hasColumn('players', 'lookaddons');
|
||||||
$groups = new OTS_Groups_List();
|
$groups = new OTS_Groups_List();
|
||||||
foreach($posts as &$post)
|
foreach($posts as &$post)
|
||||||
{
|
{
|
||||||
|
@ -58,7 +58,8 @@
|
|||||||
<div align="center">
|
<div align="center">
|
||||||
You can register your account for increased protection. Click on "Register Account" and get your free recovery key today!<br/>
|
You can register your account for increased protection. Click on "Register Account" and get your free recovery key today!<br/>
|
||||||
<form action="{{ getLink('account/register') }}" method="post">
|
<form action="{{ getLink('account/register') }}" method="post">
|
||||||
<input type="submit" value="Register Account" />
|
{% set button_name = 'Register Account' %}
|
||||||
|
{% include('buttons.base.html.twig') %}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<br/>
|
<br/>
|
||||||
@ -69,7 +70,8 @@
|
|||||||
A request has been submitted to change the email address of this account to <b>{{ email_new }}</b>. After <b>{{ email_new_time|date("j F Y, G:i:s") }}</b> you can accept the new email address and finish the process. Please cancel the request if you do not want your email address to be changed! Also cancel the request if you have no access to the new email address!
|
A request has been submitted to change the email address of this account to <b>{{ email_new }}</b>. After <b>{{ email_new_time|date("j F Y, G:i:s") }}</b> you can accept the new email address and finish the process. Please cancel the request if you do not want your email address to be changed! Also cancel the request if you have no access to the new email address!
|
||||||
|
|
||||||
<form action="{{ getLink('account/email') }}" method="post">
|
<form action="{{ getLink('account/email') }}" method="post">
|
||||||
<input type="submit" value="Edit" />
|
{% set button_name = 'Edit' %}
|
||||||
|
{% include('buttons.base.html.twig') %}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
@ -84,7 +86,8 @@
|
|||||||
<td style="width: 90px;">Email Address:</td>
|
<td style="width: 90px;">Email Address:</td>
|
||||||
<td>{{ account_email ~ email_change }}
|
<td>{{ account_email ~ email_change }}
|
||||||
<form action="{{ getLink('account/email') }}" method="post">
|
<form action="{{ getLink('account/email') }}" method="post">
|
||||||
<input type="submit" value="Change Email" />
|
{% set button_name = 'Change Email' %}
|
||||||
|
{% include('buttons.base.html.twig') %}
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -120,7 +123,8 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<form action="{{ getLink('account/info') }}" method="post">
|
<form action="{{ getLink('account/info') }}" method="post">
|
||||||
<input type="submit" value="Change Info" />
|
{% set button_name = 'Change Info' %}
|
||||||
|
{% include('buttons.base.html.twig') %}
|
||||||
</form>
|
</form>
|
||||||
<br/>
|
<br/>
|
||||||
<h2>Action Log</h2>
|
<h2>Action Log</h2>
|
||||||
@ -159,26 +163,30 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<form action="{{ getLink('account/character/create') }}" method="post" >
|
<form action="{{ getLink('account/character/create') }}" method="post" >
|
||||||
<input type="Submit" name="Create Character" value="Create Character" />
|
{% set button_name = 'Create Character' %}
|
||||||
|
{% include('buttons.base.html.twig') %}
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
{% if config.account_change_character_name %}
|
{% if config.account_change_character_name %}
|
||||||
<td>
|
<td>
|
||||||
<form action="{{ getLink('account/character/name') }}" method="post" >
|
<form action="{{ getLink('account/character/name') }}" method="post" >
|
||||||
<input type="Submit" name="Change Name" value="Change Name" />
|
{% set button_name = 'Change Name' %}
|
||||||
|
{% include('buttons.base.html.twig') %}
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if config.account_change_character_sex %}
|
{% if config.account_change_character_sex %}
|
||||||
<td>
|
<td>
|
||||||
<form action="{{ getLink('account/character/sex') }}" method="post" >
|
<form action="{{ getLink('account/character/sex') }}" method="post" >
|
||||||
<input type="Submit" name="Change Sex" value="Change Sex" />
|
{% set button_name = 'Change Sex' %}
|
||||||
|
{% include('buttons.base.html.twig') %}
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td>
|
<td>
|
||||||
<form action="{{ getLink('account/character/delete') }}" method="post">
|
<form action="{{ getLink('account/character/delete') }}" method="post">
|
||||||
<input type="Submit" name="Delete Character" value="Delete Character" />
|
{% set button_name = 'Delete Character' %}
|
||||||
|
{% include('buttons.base.html.twig') %}
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -28,7 +28,7 @@ Page: {{ links_to_pages|raw }}<br/>
|
|||||||
<br />
|
<br />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<font size="1">
|
<font size="1">
|
||||||
{% if post.group is defined and post.group|lower != 'player' %}
|
{% if post.group is defined %}
|
||||||
Position: {{ post.group }}<br />
|
Position: {{ post.group }}<br />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ Page: {{ links_to_pages|raw }}<br/>
|
|||||||
{% if post.first_post != post.id %}
|
{% if post.first_post != post.id %}
|
||||||
<a href="?subtopic=forum&action=remove_post&id={{ post.id }}" title="Remove Post" onclick="return confirm('Are you sure you want remove post of {{ post.player.getName() }}?')"><img src="images/del.png"/></a>
|
<a href="?subtopic=forum&action=remove_post&id={{ post.id }}" title="Remove Post" onclick="return confirm('Are you sure you want remove post of {{ post.player.getName() }}?')"><img src="images/del.png"/></a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="?subtopic=forum&action=move_thread&id={{ post.id }}"><img src="images/icons/arrow_right.gif"/></a>
|
<a href="?subtopic=forum&action=move_thread&id={{ post.id }}" title="Move Thread"><img src="images/icons/arrow_right.gif"/></a>
|
||||||
<a href="?subtopic=forum&action=remove_post&id={{ post.id }}" title="Remove Thread" target="_blank" onclick="return confirm('Are you sure you want remove thread > {{ post.post_topic}} <?')"><img src="images/del.png"/></a>
|
<a href="?subtopic=forum&action=remove_post&id={{ post.id }}" title="Remove Thread" target="_blank" onclick="return confirm('Are you sure you want remove thread > {{ post.post_topic}} <?')"><img src="images/del.png"/></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if logged and (post.player.getAccount().getId() == account_logged.getId() or is_moderator) %}
|
{% if logged and (post.player.getAccount().getId() == account_logged.getId() or is_moderator) %}
|
||||||
|
@ -27,12 +27,7 @@ if(isset($_GET['title'], $_GET['body'], $_GET['player_id'], $_GET['category'], $
|
|||||||
'icon_id' => $cat['icon_id']
|
'icon_id' => $cat['icon_id']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
$template_path = $_GET['template_path'];
|
|
||||||
$twig->addGlobal('template_path', $template_path);
|
|
||||||
if($twig_loader && file_exists(BASE . $template_path))
|
|
||||||
$twig_loader->prependPath(BASE . $template_path);
|
|
||||||
*/
|
|
||||||
$twig->addGlobal('config', $config);
|
$twig->addGlobal('config', $config);
|
||||||
|
|
||||||
$player = new OTS_Player();
|
$player = new OTS_Player();
|
||||||
@ -45,7 +40,7 @@ if(isset($_GET['title'], $_GET['body'], $_GET['player_id'], $_GET['category'], $
|
|||||||
|
|
||||||
if($_GET['type'] == 3) { // ARTICLE
|
if($_GET['type'] == 3) { // ARTICLE
|
||||||
if(!isset($_GET['article_text'], $_GET['article_image'])) {
|
if(!isset($_GET['article_text'], $_GET['article_image'])) {
|
||||||
error_('Error: please fill all inputs 2.');
|
error_('Error: please fill all inputs.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$featured_article = '';
|
$featured_article = '';
|
||||||
@ -57,7 +52,7 @@ if(isset($_GET['title'], $_GET['body'], $_GET['player_id'], $_GET['category'], $
|
|||||||
'text' => $_GET['article_text'],
|
'text' => $_GET['article_text'],
|
||||||
'image' => $_GET['article_image'],
|
'image' => $_GET['article_image'],
|
||||||
'hidden' => 0,
|
'hidden' => 0,
|
||||||
'read_more'=> getLink('news/archive/') . '0'
|
'read_more'=> '#'
|
||||||
),
|
),
|
||||||
'canEdit' => false
|
'canEdit' => false
|
||||||
));
|
));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user