mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-17 19:23:27 +02:00
Merge branch 'develop' into feature/new-router
# Conflicts: # composer.json # system/login.php
This commit is contained in:
@@ -1,34 +1,28 @@
|
||||
<script type="text/javascript" src="{{ constant('BASE_URL') }}tools/tinymce/tinymce.min.js"></script>
|
||||
{{ include('tinymce.html.twig') }}
|
||||
<script type="text/javascript">
|
||||
tinymce.init({
|
||||
selector: "textarea",
|
||||
theme: "modern",
|
||||
plugins: 'print preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists textcolor wordcount spellchecker imagetools contextmenu colorpicker textpattern help code emoticons',
|
||||
toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | emoticons link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat code',
|
||||
image_advtab: true,
|
||||
relative_urls: false,
|
||||
remove_script_host: false,
|
||||
document_base_url: "{{ constant('BASE_URL') }}"
|
||||
});
|
||||
tinymceInit();
|
||||
</script>
|
||||
|
||||
<div align="center" class="text-center"><p class="note">Sending mails may take some time if there are many users in db.</p></div>
|
||||
<div class="card card-info card-outline">
|
||||
<div class="card-header">
|
||||
<h5 class="m-0">Mailer</h5>
|
||||
</div>
|
||||
<form method="post">
|
||||
<form id="form" method="post">
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label for="mail_to">To: (enter email, or leave empty to all)</label>
|
||||
<input class="form-control" type="text" id="mail_to" name="mail_to" value="{{ mail_to }}"/>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="mail_subject">Subject:</label>
|
||||
<input class="form-control" type="text" id="mail_subject" name="mail_subject" value="{{ mail_subject }}" maxlength="30"/>
|
||||
</div>
|
||||
|
||||
<label for="editor" class="control-label">Content:</label>
|
||||
<div class="form-group row">
|
||||
<label for="mail_content" class="control-label">Content:</label>
|
||||
<textarea id="mail_content" name="mail_content" style="width: 100%" class="tinymce">{{ mail_content }}</textarea>
|
||||
<textarea id="editor" name="mail_content" style="width: 100%" class="tinymce">{{ mail_content }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
|
@@ -3,7 +3,7 @@
|
||||
<div class="card-header">
|
||||
<h5 class="m-0">{% if action == 'edit' %}Edit{% else %}Add{% endif %} news</h5>
|
||||
</div>
|
||||
<form role="form" method="post" action="{{ news_link_form }}" id="news-edit-form">
|
||||
<form id="form" role="form" method="post" action="{{ news_link_form }}">
|
||||
<div class="card-body " id="page-edit-table">
|
||||
{% if action == 'edit' %}
|
||||
<input type="hidden" name="id" value="{{ news_id }}"/>
|
||||
@@ -14,9 +14,9 @@
|
||||
<input type="text" id="title" name="title" class="form-control" autocomplete="off" style="cursor: auto;" value="{{ title }}">
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="body">Content</label>
|
||||
<textarea class="form-control" id="body" name="body" maxlength="65000" cols="50" rows="5">{{ body|raw }}</textarea>
|
||||
<label for="editor">Content</label>
|
||||
<div class="form-group">
|
||||
<textarea class="form-control" id="editor" name="body" maxlength="65000" cols="50" rows="5">{{ body|raw }}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
@@ -116,44 +116,8 @@
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
<script type="text/javascript" src="{{ constant('BASE_URL') }}tools/tinymce/tinymce.min.js"></script>
|
||||
{{ include('tinymce.html.twig') }}
|
||||
<script type="text/javascript">
|
||||
let unsaved = false;
|
||||
let lastContent = '';
|
||||
|
||||
tinymce.init({
|
||||
selector: "#body",
|
||||
theme: "modern",
|
||||
plugins: 'preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists textcolor wordcount spellchecker imagetools contextmenu colorpicker textpattern help code emoticons',
|
||||
toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | emoticons link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat code',
|
||||
image_advtab: true,
|
||||
setup: function (ed) {
|
||||
ed.on('NodeChange', function (e) {
|
||||
if (ed.getContent() !== lastContent) {
|
||||
unsaved = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
$(":input").change(function () { //triggers change in all input fields including text type
|
||||
unsaved = true;
|
||||
});
|
||||
|
||||
$("#news-edit-form").submit(function (event) {
|
||||
unsaved = false;
|
||||
});
|
||||
|
||||
lastContent = $("#body").val();
|
||||
});
|
||||
|
||||
function unloadPage() {
|
||||
if (unsaved) {
|
||||
return "You have unsaved changes on this page. Do you want to leave this page and discard your changes or stay on this page?";
|
||||
}
|
||||
}
|
||||
|
||||
window.onbeforeunload = unloadPage;
|
||||
tinymceInit();
|
||||
</script>
|
||||
{% endif %}
|
||||
|
@@ -3,8 +3,7 @@
|
||||
<div class="card-header">
|
||||
<h5 class="m-0">{% if action == 'edit' %}Edit{% else %}Add{% endif %} page</h5>
|
||||
</div>
|
||||
<form class="form-horizontal" method="post"
|
||||
action="?p=pages&action={% if action == 'edit' %}edit{% else %}add{% endif %}">
|
||||
<form id="form" class="form-horizontal" method="post" action="?p=pages&action={% if action == 'edit' %}edit{% else %}add{% endif %}">
|
||||
{% if action == 'edit' %}
|
||||
<input type="hidden" name="id" value="{{ id }}"/>
|
||||
{% endif %}
|
||||
@@ -41,65 +40,51 @@
|
||||
{% if not php %}
|
||||
<div class="form-group row">
|
||||
<label for="enable_tinymce">Enable TinyMCE
|
||||
<input type="checkbox" id="enable_tinymce" name="enable_tinymce"
|
||||
title="Check if you want to use TinyMCE Editor"
|
||||
value="1"{% if enable_tinymce %} checked{% endif %}{% if action == 'edit' %} disabled{% endif %}/>
|
||||
<input type="checkbox" id="enable_tinymce" name="enable_tinymce" title="Check if you want to use TinyMCE Editor" value="1"{% if enable_tinymce %} checked{% endif %}{% if action == 'edit' %} disabled{% endif %}/>
|
||||
{% if action == 'edit' %}
|
||||
<input type="hidden" name="enable_tinymce" value="{% if enable_tinymce %}1{% else %}0{% endif %}"/>
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<label for="editor">Content</label>
|
||||
<div class="form-group row">
|
||||
<label for="body">Content</label>
|
||||
<textarea class="form-control" id="body" name="body" maxlength="65000" cols="50"
|
||||
rows="10">{{ body|raw }}</textarea>
|
||||
<textarea class="form-control" id="editor" name="body" maxlength="65000" cols="50" rows="10">{{ body|raw }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<button type="submit" class="btn btn-info"><i class="fas fa-update"></i> Update</button>
|
||||
<button type="button" onclick="window.location = '{{ constant('ADMIN_URL') }}?p=pages';" class="btn btn-danger float-right"><i class="fas fa-cancel"></i> Cancel</button>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="{{ constant('BASE_URL') }}tools/tinymce/tinymce.min.js"></script>
|
||||
{{ include('tinymce.html.twig') }}
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#enable_tinymce').on('change', function (e) {
|
||||
if (!this.checked) {
|
||||
tinymce.remove('#body');
|
||||
tinymce.remove('#editor');
|
||||
} else {
|
||||
if (tinymce.editors.length > 0) {
|
||||
if (tinymce.get('#editor')!== null){
|
||||
tinymce.activeEditor.show();
|
||||
} else {
|
||||
init_tinymce();
|
||||
tinymceInit();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
{% if not php and enable_tinymce %}
|
||||
init_tinymce();
|
||||
tinymceInit();
|
||||
{% endif %}
|
||||
|
||||
function init_tinymce() {
|
||||
tinymce.init({
|
||||
selector: "#body",
|
||||
theme: "modern",
|
||||
plugins: 'code print preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists textcolor wordcount spellchecker imagetools contextmenu colorpicker textpattern help emoticons',
|
||||
toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | emoticons link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat code',
|
||||
image_advtab: true,
|
||||
relative_urls: false,
|
||||
remove_script_host: false,
|
||||
document_base_url: "{{ constant('BASE_URL') }}"
|
||||
});
|
||||
}
|
||||
|
||||
function decodeHtml(html) {
|
||||
var txt = document.createElement("textarea");
|
||||
txt.innerHTML = html;
|
||||
return txt.value;
|
||||
}
|
||||
});
|
||||
</script> {% endif %}
|
||||
</script>
|
||||
{% endif %}
|
||||
|
67
system/templates/admin.tools.account.html.twig
Normal file
67
system/templates/admin.tools.account.html.twig
Normal file
@@ -0,0 +1,67 @@
|
||||
<div class="row">
|
||||
{% if hasPointsColumn %}
|
||||
<div class="col-md-4">
|
||||
<div class="card card-info card-outline">
|
||||
<div class="card-header">
|
||||
<h5 class="m-0">Give Premium Points</h5>
|
||||
</div>
|
||||
<form method="post" action="{{ constant('ADMIN_URL') }}?p=tools&tool=account">
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label>Premium Points</label>
|
||||
<input type="number" name="value" value="" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<input type="hidden" name="action" value="give-points">
|
||||
<button type="submit" class="btn btn-info">Add Points</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if hasCoinsColumn %}
|
||||
<div class="col-md-4">
|
||||
<div class="card card-info card-outline">
|
||||
<div class="card-header">
|
||||
<h5 class="m-0">Give Coins</h5>
|
||||
</div>
|
||||
<form method="post" action="{{ constant('ADMIN_URL') }}?p=tools&tool=account">
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label>Coins</label>
|
||||
<input type="number" name="value" value="" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<input type="hidden" name="action" value="give-coins">
|
||||
<button type="submit" class="btn btn-info">Add Coins</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if not freePremium %}
|
||||
<div class="col-md-4">
|
||||
<div class="card card-info card-outline">
|
||||
<div class="card-header">
|
||||
<h5 class="m-0">Give Premium Days</h5>
|
||||
</div>
|
||||
<form method="post" action="{{ constant('ADMIN_URL') }}?p=tools&tool=account">
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label>Premium Days</label>
|
||||
<input type="number" name="value" value="" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<input type="hidden" name="action" value="give-premdays">
|
||||
<button type="submit" class="btn btn-info">Add Days</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
80
system/templates/admin.tools.teleport.html.twig
Normal file
80
system/templates/admin.tools.teleport.html.twig
Normal file
@@ -0,0 +1,80 @@
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="card card-info card-outline">
|
||||
<div class="card-header">
|
||||
<h5 class="m-0">Set Town</h5>
|
||||
</div>
|
||||
<form method="post" action="{{ constant('ADMIN_URL') }}?p=tools&tool=teleport">
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label>Town</label>
|
||||
<select name="value" class="form-control">
|
||||
{% if config.towns|length > 0 %}
|
||||
{% for town_id, town_name in config.towns %}
|
||||
<option value="{{ town_id }}">{{ town_name }}</option>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<option disabled>No towns</option>
|
||||
{% endif %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<input type="hidden" name="action" value="set-town">
|
||||
<button type="submit" class="btn btn-info">Set Town</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card card-info card-outline">
|
||||
<div class="card-header">
|
||||
<h5 class="m-0">Set Position</h5>
|
||||
</div>
|
||||
<form method="post" action="{{ constant('ADMIN_URL') }}?p=tools&tool=teleport">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label>Position X</label>
|
||||
<input type="number" name="posx" value="" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label>Position Y</label>
|
||||
<input type="number" name="posy" value="" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label>Position Z</label>
|
||||
<input type="number" name="posz" value="" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<input type="hidden" name="action" value="set-position">
|
||||
<button type="submit" class="btn btn-info">Set Position</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="card card-info card-outline">
|
||||
<div class="card-header">
|
||||
<h5 class="m-0">Teleport to Temple</h5>
|
||||
</div>
|
||||
<form method="post" action="{{ constant('ADMIN_URL') }}?p=tools&tool=teleport">
|
||||
<div class="card-footer">
|
||||
<input type="hidden" name="action" value="set-position">
|
||||
<input type="hidden" name="posx" value="0">
|
||||
<input type="hidden" name="posy" value="0">
|
||||
<input type="hidden" name="posz" value="0">
|
||||
<button type="submit" class="btn btn-info">Teleport to Temple</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@@ -1,5 +1,5 @@
|
||||
<div style="text-align:center"><h2>Change guild logo</h2></div>
|
||||
Here you can change logo of your guild.<br/>Actuall logo: <img src="images/guilds/{{ guild_logo }}" height="64" width="64"><br/><br/>
|
||||
Here you can change logo of your guild.<br/>Actuall logo: <img src="{{ constant('GUILD_IMAGES_DIR') }}{{ guild_logo }}" height="64" width="64"><br/><br/>
|
||||
<form enctype="multipart/form-data" action="?subtopic=guilds&guild={{ guild.getName() }}&action=change_logo" method="post" id="upload_form">
|
||||
<input type="hidden" name="todo" value="save" />
|
||||
<input type="hidden" name="MAX_FILE_SIZE" value="{{ max_image_size_b }}" />
|
||||
|
@@ -41,7 +41,7 @@
|
||||
{% set i = i + 1 %}
|
||||
<tr bgcolor="{{ getStyle(i) }}">
|
||||
<td>
|
||||
<img src="images/guilds/{{ guild.logo }}" width="64" height="64">
|
||||
<img src="{{ constant('GUILD_IMAGES_DIR') }}{{ guild.logo }}" width="64" height="64">
|
||||
</td>
|
||||
|
||||
<td>
|
||||
|
@@ -5,13 +5,13 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td width="64">
|
||||
<img src="images/guilds/{{ logo }}" width="64" height="64">
|
||||
<img src="{{ constant('GUILD_IMAGES_DIR') }}{{ logo }}" width="64" height="64">
|
||||
</td>
|
||||
|
||||
<td align="center" width="100%"><h1>{{ guild_name }}</h1></td>
|
||||
|
||||
<td width="64">
|
||||
<img src="images/guilds/{{ logo }}" width="64" height="64">
|
||||
<img src="{{ constant('GUILD_IMAGES_DIR') }}{{ logo }}" width="64" height="64">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@@ -17,5 +17,5 @@
|
||||
</div>
|
||||
</noscript>
|
||||
{% if config.recaptcha_enabled %}
|
||||
<script src="https://www.google.com/recaptcha/api.js{% if config('recaptcha_type') == 'v2-checkbox' %}?render={{ config.recaptcha_site_key }}{% endif %}"></script>
|
||||
<script src="https://www.google.com/recaptcha/api.js{% if config('recaptcha_type') == 'v3' %}?render={{ config.recaptcha_site_key }}{% endif %}"></script>
|
||||
{% endif %}
|
||||
|
48
system/templates/tinymce.html.twig
Normal file
48
system/templates/tinymce.html.twig
Normal file
@@ -0,0 +1,48 @@
|
||||
<script type="text/javascript" src="{{ constant('BASE_URL') }}tools/js/tinymce/tinymce.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
let unsaved = false;
|
||||
let lastContent = '';
|
||||
|
||||
function tinymceInit() {
|
||||
tinymce.init({
|
||||
selector: "#editor",
|
||||
theme: "silver",
|
||||
plugins: 'preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount help code emoticons',
|
||||
toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | emoticons link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat code',
|
||||
image_advtab: true,
|
||||
images_upload_url: '{{ constant('BASE_URL') }}admin/tools/upload_image.php',
|
||||
images_upload_credentials: true,
|
||||
// not really sure - do we need those 3 options below?
|
||||
//relative_urls: false,
|
||||
//remove_script_host: false,
|
||||
//document_base_url: "{{ constant('BASE_URL') }}"
|
||||
setup: function (ed) {
|
||||
ed.on('NodeChange', function (e) {
|
||||
if (ed.getContent() !== lastContent) {
|
||||
unsaved = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
$(":input").change(function () { //triggers change in all input fields including text type
|
||||
unsaved = true;
|
||||
});
|
||||
|
||||
$("#form").submit(function (event) {
|
||||
unsaved = false;
|
||||
});
|
||||
|
||||
lastContent = $("#editor").val();
|
||||
});
|
||||
|
||||
function unloadPage() {
|
||||
if (unsaved) {
|
||||
return "You have unsaved changes on this page. Do you want to leave this page and discard your changes or stay on this page?";
|
||||
}
|
||||
}
|
||||
|
||||
window.onbeforeunload = unloadPage;
|
||||
</script>
|
Reference in New Issue
Block a user