mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-16 10:44:55 +02:00
Admin Panel Updates
- Updated Admin Panel to Bootstrap 4. - Code cleanup - Rewrote menu generation code - Added top 10 coins, top 10 premium points, last 10 logins to modules page. - Added full account list to Account editor - Added load outfits from XML to player editor and lists all enabled outfits in editor (will default to textbox if array of outfits do not exist) - Added tabs to account editor - account, characters,store history, bans(this is based off the bans.php page so will not work on TFS 0.2/1.0) - Updated datepickers to display the actual date rather than unix time. - Added last 10 posts to player editor
This commit is contained in:
@@ -1,102 +1,27 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="box box-warning">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Maintenance</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<div class="col-12 col-md-6">
|
||||
<div class="card card-warning card-outline">
|
||||
<form action="?p=dashboard&maintenance" method="post" class="form-horizontal">
|
||||
<div class="card-header">
|
||||
<h5 class="m-0">Website Status<span class="float-right">
|
||||
<div class="custom-control custom-switch custom-switch-off-danger custom-switch-on-success">
|
||||
<input type="checkbox" class="custom-control-input" name="status" id="status" value="true" {% if not is_closed %} checked{% endif %}>
|
||||
<label class="custom-control-label" for="status"> {% if is_closed %}Closed{% else %}Open{% endif %}</label>
|
||||
</div></span>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="card-body p-2">
|
||||
<div class="col-sm-12">
|
||||
<label for="message" class="col-form-label">Maintenance Message</label>
|
||||
<textarea name="message" class="form-control" cols="40" rows="3" maxlength="255" placeholder="Enter ...">{{ closed_message }}</textarea>
|
||||
<small>(only visible if closed)</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form action="?p=dashboard&maintenance" method="post" class="form-horizontal">
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="status" class="col-sm-2 control-label">Website:</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control" id="status" name="status">
|
||||
<option value="0"{% if not is_closed %} selected{% endif %}>Open</option>
|
||||
<option value="1"{% if is_closed %} selected{% endif %}>Closed</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="message" class="col-sm-2 control-label">Message:<br>
|
||||
<small>(only if closed)</small>
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea name="message" cols="40" class="form-control" rows="5" maxlength="255"
|
||||
placeholder="Enter ...">{{ closed_message }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<a href="?p=dashboard&clear_cache" onclick="return confirm('Are you sure?');"><span
|
||||
class="btn btn-danger">Clear cache</span></a>
|
||||
<div class="pull-right">
|
||||
<input type="submit" class="btn btn-primary" value="Update"/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="card-footer">
|
||||
<button type="submit" class="btn btn-info"><i class="far fa-update"></i> Update</button>
|
||||
<a href="?p=dashboard&clear_cache" onclick="return confirm('Are you sure?');" class="float-right">
|
||||
<span class="btn btn-danger"><i class="fas fa-clear"></i>Clear cache</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% if points is iterable %}
|
||||
<div class="col-md-3">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Top 10 - Most premium points</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-condensed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Account {{ account_type }}</th>
|
||||
<th>Premium points</th>
|
||||
</tr>
|
||||
{% set i = 0 %}
|
||||
{% for result in points %}
|
||||
{% set i = i + 1 %}
|
||||
<tr>
|
||||
<td>{{ i }}</td>
|
||||
<td>{{ result.name }}</td>
|
||||
<td>{{ result.premium_points }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if coins is iterable %}
|
||||
<div class="col-md-3">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Top 10 - Most coins</h3>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-condensed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Account {{ account_type }}</th>
|
||||
<th>Tibia coins</th>
|
||||
</tr>
|
||||
{% set i = 0 %}
|
||||
{% for result in coins %}
|
||||
{% set i = i + 1 %}
|
||||
<tr>
|
||||
<td>{{ i }}</td>
|
||||
<td>{{ result.name }}</td>
|
||||
<td>{{ result.coins }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<form method="post" action="{{ constant('ADMIN_URL') }}?p=items">
|
||||
<input type="hidden" name="reload" value="1"/>
|
||||
<input type="submit" value="Reload items and weapons (it may take some time to finish)"/>
|
||||
</form>
|
||||
<button type="submit" class="btn btn-info"><i class="fas fa-update"></i> Reload items and weapons</button><br/><small> (it may take some time to finish)</small>
|
||||
</form>
|
||||
|
@@ -1,38 +1,47 @@
|
||||
<div class="login-box">
|
||||
{% if logout %}
|
||||
<div class="alert alert-success alert-dismissible">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-check"></i> Status</h4>
|
||||
{{ logout }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form method="post">
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Please login.</h3>
|
||||
<div class="login-page">
|
||||
<div class="login-box">
|
||||
<div class="login-logo"><b>My</b>AAC</div>
|
||||
{% if logout %}
|
||||
<div class="toast bg-success fade show">
|
||||
<div class="toast-header"><strong class="mr-auto">Status</strong></div>
|
||||
<div class="toast-body">{{ logout }}</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<div class="form-group input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-lock"></i></span>
|
||||
{% endif %}
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<p class="login-box-msg">Please login.</p>
|
||||
|
||||
<form method="post">
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-lock"></i></span>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="account-name-input" name="account_login"
|
||||
placeholder="Account {{ account }}" required autofocus>
|
||||
</div>
|
||||
<div class="form-group input-group">
|
||||
<span class="input-group-addon"><i class="fa fa-key"></i></span>
|
||||
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-key"></i></span>
|
||||
</div>
|
||||
<input type="password" class="form-control" placeholder="Password" name="password_login"
|
||||
placeholder="Password" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<label>
|
||||
<input type="checkbox" id="remember_me" name="remember_me" value="true"> Remember me
|
||||
</label>
|
||||
<input type="hidden" name="admin" value="1"/>
|
||||
<button type="submit" class="btn btn-info pull-right">Sign in</button>
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="icheck-primary">
|
||||
<input type="checkbox" id="remember_me" name="remember_me" value="true">
|
||||
<label for="remember">Remember Me</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<input type="hidden" name="admin" value="1"/>
|
||||
<button type="submit" class="btn btn-info btn-block">Sign In</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -1,41 +1,30 @@
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Logs:</h3>
|
||||
<div class="card card-info card-outline">
|
||||
<div class="card-header">
|
||||
<h5 class="m-0">Logs</h5>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<table id="tb_logs">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Log name</th>
|
||||
<th>Last updated</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for file in files %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ constant('ADMIN_URL') }}?p=logs&file={{ file.name }}">{{ file.name }}</a>
|
||||
</td>
|
||||
<td>{{ file.mtime|date('Y-m-d H:i:s') }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>Log name</th>
|
||||
<th>Last updated</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered" id="tb_logs">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Log name</th>
|
||||
<th>Last updated</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for file in files %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ constant('ADMIN_URL') }}?p=logs&file={{ file.name }}">{{ file.name }}</a>
|
||||
</td>
|
||||
<td>{{ file.mtime|date('Y-m-d H:i:s') }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$('#tb_logs').DataTable()
|
||||
})
|
||||
</script>
|
||||
</script>
|
||||
|
@@ -1,8 +1,10 @@
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><b>{{ file }}</b></h3>
|
||||
<div class="card card-info card-outline">
|
||||
<div class="card-header">
|
||||
<h5 class="m-0">{{ file }}</h5>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
{{ content|raw }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body pr-0">
|
||||
<div style="max-height: 410px; overflow-y: auto;">
|
||||
{{ content|raw }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -11,37 +11,28 @@
|
||||
document_base_url: "{{ constant('BASE_URL') }}"
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="box box-danger">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Mailer</h3>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="box-body">
|
||||
<div align="center" class="row"><p class="note note-image" style="width: 80%;">Sending mails may
|
||||
take some time if there are many users in db.</p></div>
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 ">
|
||||
<label for="mail_subject" class="control-label">Subject:</label>
|
||||
<input class="form-control" type="text" id="mail_subject" name="mail_subject"
|
||||
value="{{ mail_subject }}" size="30" maxlength="30"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<label for="mail_content" class="control-label">Content:</label>
|
||||
<textarea id="mail_content" name="mail_content" style="width: 100%"
|
||||
class="tinymce">{{ mail_content }}</textarea>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<input type="checkbox" name="preview" id="preview" value="1"/><label for="preview">Just send test
|
||||
email to me (preview)</label>{% if preview_done %} - <b>Done.</b>{% endif %}<br/>
|
||||
<button type="submit" name="submit" value="Send" class="btn btn-primary">Send</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="card-body">
|
||||
<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 }}" size="30" maxlength="30"/>
|
||||
</div>
|
||||
<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>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<input type="checkbox" name="preview" id="preview" value="1"/><label for="category">Just send test email to me (preview)</label>{% if preview_done %} - <b>Done.</b>{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<button type="submit" class="btn btn-info"><i class="fas fa-share"></i> Send</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
@@ -1,28 +1,22 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Templates</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form method="post" action="?p=menus">
|
||||
<p>Please choose template in which you want to edit menu items.</p>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group input-group-sm">
|
||||
<select id="template" name="template" class="form-control">
|
||||
{% for template in templates %}
|
||||
<option value="{{ template.template }}">{{ template.template }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" type="button" class="btn btn-primary btn-flat">Edit</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card card-info card-outline">
|
||||
<div class="card-header">
|
||||
<h5 class="m-0">Templates</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="post" action="?p=menus">
|
||||
<p>Please choose template in which you want to edit menu items.</p>
|
||||
<div class="col-md-6">
|
||||
<div class="input-group input-group-sm">
|
||||
<select id="template" name="template" class="form-control">
|
||||
{% for template in templates %}
|
||||
<option value="{{ template.template }}">{{ template.template }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<span class="input-group-append">
|
||||
<button type="submit" class="btn btn-info btn-flat">Edit!</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -1,149 +1,119 @@
|
||||
{% if action %}
|
||||
<div class="row">
|
||||
<form method="post" action="{{ news_link_form }}" id="news-edit-form">
|
||||
{% if action == 'edit' %}
|
||||
<input type="hidden" name="id" value="{{ news_id }}"/>
|
||||
{% endif %}
|
||||
<div class="col-md-8" id="page-edit-table">
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{% if action == 'edit' %}Edit{% else %}Add{% endif %} news</h3>
|
||||
</div>
|
||||
<div class="card card-info card-outline">
|
||||
<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">
|
||||
<div class="card-body " id="page-edit-table">
|
||||
{% if action == 'edit' %}
|
||||
<input type="hidden" name="id" value="{{ news_id }}"/>
|
||||
{% endif %}
|
||||
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="title" class="col-sm-2 control-label">Title</label>
|
||||
<div class="form-group row">
|
||||
<label for="title">Title</label>
|
||||
<input type="text" id="title" name="title" class="form-control" autocomplete="off" style="cursor: auto;" value="{{ title }}">
|
||||
</div>
|
||||
|
||||
<div class="col-sm-10">
|
||||
<input type="text" id="title" name="title" class="form-control" autocomplete="off" style="cursor: auto;" value="{{ title }}">
|
||||
</div>
|
||||
</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>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="body" class="col-sm-2 control-label">Content</label>
|
||||
<div class="form-group row">
|
||||
<label for="select-type">Type</label>
|
||||
<select class="form-control" name="type" id="select-type">
|
||||
<option value="{{ constant('NEWS') }}" {% if type is defined and type == constant('NEWS') %}selected="yes"{% endif %}{% if action == 'edit' and type != constant('NEWS') %} disabled{% endif %}>News</option>
|
||||
<option value="{{ constant('TICKER') }}" {% if type is defined and type == constant('TICKER') %}selected="yes"{% endif %}{% if action == 'edit' and type != constant('TICKER') %} disabled{% endif %}>Ticket</option>
|
||||
<option value="{{ constant('ARTICLE') }}" {% if type is defined and type == constant('ARTICLE') %}selected="yes"{% endif %}{% if action == 'edit' and type != constant('ARTICLE') %} disabled{% endif %}>Article</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-10" id="body-parent">
|
||||
<textarea class="form-control" id="body" name="body" maxlength="65000" cols="50" rows="5">{{ body|raw }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div id="article-text" class="form-group row"{% if type is not defined or type != constant('ARTICLE') %} style="display: none;"{% endif %}>
|
||||
<label for="article_text">Article short text</label>
|
||||
<textarea class="form-control" name="article_text" id="article_text" cols="50" rows="5">{% if article_text is not empty %}{{ article_text }}{% endif %}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="select-type" class="col-sm-2 control-label">Type</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control" name="type" id="select-type">
|
||||
<option value="{{ constant('NEWS') }}" {% if type is defined and type == constant('NEWS') %}selected="yes"{% endif %}{% if action == 'edit' and type != constant('NEWS') %} disabled{% endif %}>News</option>
|
||||
<option value="{{ constant('TICKER') }}" {% if type is defined and type == constant('TICKER') %}selected="yes"{% endif %}{% if action == 'edit' and type != constant('TICKER') %} disabled{% endif %}>Ticket</option>
|
||||
<option value="{{ constant('ARTICLE') }}" {% if type is defined and type == constant('ARTICLE') %}selected="yes"{% endif %}{% if action == 'edit' and type != constant('ARTICLE') %} disabled{% endif %}>Article</option>
|
||||
<div id="article-image" class="form-group row"{% if type is not defined or type != constant('ARTICLE') %} style="display: none;"{% endif %}>
|
||||
<label for="article_image">Article image</label>
|
||||
<input class="form-control" type="text" name="article_image" id="article_image" value="{% if article_image is not empty %}{{ article_image }}{% else %}images/news/announcement.jpg{% endif %}"/>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
{% if action == 'edit' %}
|
||||
{% if player is defined %}
|
||||
<div class="col-sm-6 pl-0">
|
||||
<label for="author">Author</label>
|
||||
<select class="form-control" id="author" name="original_id" disabled="disabled">
|
||||
<option value="{{ player.getId() }}">{{ player.getName() }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="article-text" class="form-group"{% if type is not defined or type != constant('ARTICLE') %} style="display: none;"{% endif %}>
|
||||
<label for="article_text" class="col-sm-2 control-label">Article short text</label>
|
||||
|
||||
<div class="col-sm-10" id="body-parent">
|
||||
<textarea class="form-control" name="article_text" id="article_text" cols="50" rows="5">{% if article_text is not empty %}{{ article_text }}{% endif %}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="article-image" class="form-group"{% if type is not defined or type != constant('ARTICLE') %} style="display: none;"{% endif %}>
|
||||
<label for="article_image" class="col-sm-2 control-label">Article image</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
<input class="form-control" type="text" name="article_image" id="article_image" value="{% if article_image is not empty %}{{ article_image }}{% else %}images/news/announcement.jpg{% endif %}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if action == 'edit' %}
|
||||
{% if player is defined %}
|
||||
<div class="form-group">
|
||||
<label for="author" class="col-sm-2 control-label">Author</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control" id="author" name="original_id" disabled="disabled">
|
||||
<option value="{{ player.getId() }}">{{ player.getName() }}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div class="form-group">
|
||||
<label for="player_id" class="col-sm-2 control-label">{% if action == 'edit' %}Modified by{% else %}Author{% endif %}</label>
|
||||
<div class="col-sm-{{ (action == 'edit') ? '6' : '12' }} px-0">
|
||||
<label for="player_id">{% if action == 'edit' %}Modified by{% else %}Author{% endif %}</label>
|
||||
<select class="form-control" name="player_id" id="player_id">
|
||||
{% for player in account_players %}
|
||||
<option value="{{ player.getId() }}"{% if player_id is defined and player.getId() == player_id %} selected="selected"{% endif %}>{{ player.getName() }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control" name="player_id" id="player_id">
|
||||
{% for player in account_players %}
|
||||
<option value="{{ player.getId() }}"{% if player_id is defined and player.getId() == player_id %} selected="selected"{% endif %}>{{ player.getName() }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if action != 'edit' %}
|
||||
<div class="form-group">
|
||||
<label for="forum_section" class="col-sm-2 control-label">Create forum thread in section:</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control" name="forum_section" id="forum_section">
|
||||
<option value="-1">None</option>
|
||||
{% for section in forum_boards %}
|
||||
{% if action != 'edit' %}
|
||||
<div class="form-group row">
|
||||
<label for="forum_section">Create forum thread in section:</label>
|
||||
<select class="form-control" name="forum_section" id="forum_section">
|
||||
<option value="-1">None</option>
|
||||
{% for section in forum_boards %}
|
||||
<option value="{{ section.id }}" {% if forum_section is defined and forum_section == section.id %}checked="yes"{% endif %}>{{ section.name }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
{% elseif comments is not null %}
|
||||
<input type="hidden" name="forum_section" id="forum_section" value="{{ comments }}" />
|
||||
{% endif %}
|
||||
|
||||
<div class="form-group">
|
||||
<label for="category" class="col-sm-2 control-label">Category</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
{% for id, cat in categories %}
|
||||
<input type="radio" name="category" id="category" value="{{ id }}" {% if (category == 0 and id == 1) or (category == id) %}checked="yes"{% endif %}/>
|
||||
<img src="{{ constant('BASE_URL') }}/images/news/icon_{{ cat.icon_id }}_small.gif" />
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
{% elseif comments is not null %}
|
||||
<input type="hidden" name="forum_section" id="forum_section" value="{{ comments }}"/>
|
||||
{% endif %}
|
||||
|
||||
<div class="box-footer">
|
||||
<td align="right"><input type="submit" class="btn btn-info pull-right" value="Save"/></td>
|
||||
<td align="left">
|
||||
<input type="button" onclick="window.location = '{{ constant('ADMIN_URL') }}?p=news';" class="btn btn-default" value="Cancel"/>
|
||||
</td>
|
||||
<div class="form-group row">
|
||||
<label for="category">Category</label>
|
||||
<div class="col-sm-12">
|
||||
{% for id, cat in categories %}
|
||||
<input type="radio" name="category" value="{{ id }}" {% if (category == 0 and id == 1) or (category == id) %}checked="yes"{% endif %}/>
|
||||
<img src="{{ constant('BASE_URL') }}/images/news/icon_{{ cat.icon_id }}_small.gif"/>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</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=news';" class="btn btn-danger float-right"><i class="fas fa-cancel"></i> Cancel</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
{% if action != 'edit' %}
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#news-edit").hide();
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
$("#news-edit").hide();
|
||||
|
||||
$("#news-button").click(function() {
|
||||
$("#news-edit").toggle();
|
||||
return false;
|
||||
});
|
||||
$("#news-button").click(function () {
|
||||
$("#news-edit").toggle();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#select-type').change(function() {
|
||||
var value = $('#select-type').val();
|
||||
if(value == {{ constant('ARTICLE') }}) {
|
||||
$('#article-text').show();
|
||||
$('#article-image').show();
|
||||
}
|
||||
else {
|
||||
$('#article-text').hide();
|
||||
$('#article-image').hide();
|
||||
}
|
||||
$('#select-type').change(function () {
|
||||
var value = $('#select-type').val();
|
||||
if (value == {{ constant('ARTICLE') }}) {
|
||||
$('#article-text').show();
|
||||
$('#article-image').show();
|
||||
} else {
|
||||
$('#article-text').hide();
|
||||
$('#article-image').hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
{% endif %}
|
||||
|
||||
<script type="text/javascript" src="{{ constant('BASE_URL') }}tools/tinymce/tinymce.min.js"></script>
|
||||
@@ -152,38 +122,38 @@
|
||||
var lastContent = '';
|
||||
|
||||
tinymce.init({
|
||||
selector : "#body",
|
||||
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',
|
||||
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) {
|
||||
setup: function (ed) {
|
||||
ed.on('NodeChange', function (e) {
|
||||
if (ed.getContent() != lastContent) {
|
||||
unsaved = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$(":input").change(function(){ //trigers change in all input fields including text type
|
||||
$(document).ready(function () {
|
||||
$(":input").change(function () { //triggers change in all input fields including text type
|
||||
unsaved = true;
|
||||
});
|
||||
|
||||
$("#news-edit-form").submit(function( event ) {
|
||||
|
||||
$("#news-edit-form").submit(function (event) {
|
||||
unsaved = false;
|
||||
});
|
||||
|
||||
lastContent = $("#body").val();
|
||||
});
|
||||
|
||||
function unloadPage(){
|
||||
if(unsaved){
|
||||
|
||||
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>
|
||||
{% endif %}
|
||||
window.onbeforeunload = unloadPage;
|
||||
</script>
|
||||
{% endif %}
|
||||
|
@@ -1,188 +1,141 @@
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">News:</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a href="?p=news&action=new&type=1"><span class="btn btn-success">New</span></a>
|
||||
</div>
|
||||
<div class="card card-info card-outline">
|
||||
<div class="card-header">
|
||||
<h5 class="m-0">News:
|
||||
<a href="?p=news&action=new&type=1" class="float-right"><span class="btn btn-sm btn-success">New</span></a>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<table class="tb_datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%">ID</th>
|
||||
<th>Title</th>
|
||||
<th>Date</th>
|
||||
<th>Player</th>
|
||||
<th style="width: 150px;">Options</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for news in newses[constant('NEWS')] %}
|
||||
<tr>
|
||||
<td>{{ news.id|raw }}</td>
|
||||
<td><i><a href="?p=news&action=edit&id={{ news.id }}">{{ news.title }}</a></i></td>
|
||||
<td>{{ news.date|date(config.news_date_format) }}</td>
|
||||
<td><a target="_blank" rel="noopener noreferrer" href="{{ news.player_link }}">{{ news.player_name }}</a></td>
|
||||
<td>
|
||||
<a href="?p=news&action=edit&id={{ news.id }}" class="ico" title="Edit">
|
||||
<span class="btn btn-success btn-sm edit btn-flat">
|
||||
<i class="fa fa-edit"></i>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<a href="?p=news&action=delete&id={{ news.id }}" class="ico" onclick="return confirm('Are you sure?');" title="Delete">
|
||||
<span class="btn btn-danger btn-sm delete btn-flat">
|
||||
<i class="fa fa-trash"></i>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<a href="?p=news&action=hide&id={{ news.id }}" class="ico" title="{% if news.hidden != 1 %}Hide{% else %}Show{% endif %}">
|
||||
{% if news.hidden != 1 %}
|
||||
<span class="btn btn-primary btn-sm btn-flat">
|
||||
<i class="fa fa-eye"></i>
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="btn btn-default btn-sm btn-flat">
|
||||
<i class="fa fa-eye-slash"></i>
|
||||
</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="tb_datatable table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%">ID</th>
|
||||
<th>Title</th>
|
||||
<th>Date</th>
|
||||
<th>Player</th>
|
||||
<th style="width: 150px;">Options</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for news in newses[constant('NEWS')] %}
|
||||
<tr>
|
||||
<td>{{ news.id|raw }}</td>
|
||||
<td><i><a href="?p=news&action=edit&id={{ news.id }}">{{ news.title }}</a></i></td>
|
||||
<td>{{ news.date|date(config.news_date_format) }}</td>
|
||||
<td><a target="_blank" rel="noopener noreferrer" href="{{ news.player_link }}">{{ news.player_name }}</a></td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<a href="?p=news&action=edit&id={{ news.id }}" class="btn btn-success btn-sm" title="Edit">
|
||||
<i class="fas fa-pencil-alt"></i>
|
||||
</a>
|
||||
<a href="?p=news&action=delete&id={{ news.id }}" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure?');" title="Delete">
|
||||
<i class="fas fa-trash"></i>
|
||||
</a>
|
||||
<a href="?p=news&action=hide&id={{ news.id }}" class="btn btn-{{ (news.hidden != 1) ? 'info' : 'default' }} btn-sm" title="{% if news.hidden != 1 %}Hide{% else %}Show{% endif %}">
|
||||
<i class="fas fa-eye{{ (news.hidden != 1) ? '' : '-slash' }}"></i>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Tickers:</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a href="?p=news&action=new&type=2"><span class="btn btn-success">New</span></a>
|
||||
</div>
|
||||
<div class="card card-info card-outline">
|
||||
<div class="card-header">
|
||||
<h5 class="m-0">Tickers:
|
||||
<a href="?p=news&action=new&type=2" class="float-right"><span class="btn btn-sm btn-success">New</span></a>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<table class="tb_datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%">ID</th>
|
||||
<th>Title</th>
|
||||
<th>Date</th>
|
||||
<th>Player</th>
|
||||
<th style="width: 150px;">Options</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for ticker in newses[constant('TICKER')] %}
|
||||
<tr>
|
||||
<td>{{ ticker.id|raw }}</td>
|
||||
<td><i><a href="?p=news&action=edit&id={{ ticker.id }}">{{ ticker.title }}</a></i></td>
|
||||
<td>{{ ticker.date|date(config.news_date_format) }}</td>
|
||||
<td><a target="_blank" rel="noopener noreferrer" href="{{ ticker.player_link }}">{{ ticker.player_name }}</a></td>
|
||||
<td>
|
||||
<a href="?p=news&action=edit&id={{ ticker.id }}" class="ico" title="Edit">
|
||||
<span class="btn btn-success btn-sm edit btn-flat">
|
||||
<i class="fa fa-edit"></i>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<a href="?p=news&action=delete&id={{ ticker.id }}" class="ico" onclick="return confirm('Are you sure?');" title="Delete">
|
||||
<span class="btn btn-danger btn-sm delete btn-flat">
|
||||
<i class="fa fa-trash"></i>
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<a href="?p=news&action=hide&id={{ ticker.id }}" class="ico" title="{% if news.hidden != 1 %}Hide{% else %}Show{% endif %}">
|
||||
{% if ticker.hidden != 1 %}
|
||||
<span class="btn btn-primary btn-sm btn-flat">
|
||||
<i class="fa fa-eye"></i>
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="btn btn-default btn-sm btn-flat">
|
||||
<i class="fa fa-eye-slash"></i>
|
||||
</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="tb_datatable table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%">ID</th>
|
||||
<th>Title</th>
|
||||
<th>Date</th>
|
||||
<th>Player</th>
|
||||
<th style="width: 150px;">Options</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for ticker in newses[constant('TICKER')] %}
|
||||
<tr>
|
||||
<td>{{ ticker.id|raw }}</td>
|
||||
<td><i><a href="?p=news&action=edit&id={{ ticker.id }}">{{ ticker.title }}</a></i></td>
|
||||
<td>{{ ticker.date|date(config.news_date_format) }}</td>
|
||||
<td><a target="_blank" rel="noopener noreferrer" href="{{ ticker.player_link }}">{{ ticker.player_name }}</a></td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<a href="?p=news&action=edit&id={{ ticker.id }}" class="btn btn-success btn-sm" title="Edit">
|
||||
<i class="fas fa-pencil-alt"></i>
|
||||
</a>
|
||||
<a href="?p=news&action=delete&id={{ ticker.id }}" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure?');" title="Delete">
|
||||
<i class="fas fa-trash"></i>
|
||||
</a>
|
||||
<a href="?p=news&action=hide&id={{ ticker.id }}" class="btn btn-{{ (ticker.hidden != 1) ? 'info' : 'default' }} btn-sm" title="{% if ticker.hidden != 1 %}Hide{% else %}Show{% endif %}">
|
||||
<i class="fas fa-eye{{ (ticker.hidden != 1) ? '' : '-slash' }}"></i>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Articles:</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a href="?p=news&action=new&type=3"><span class="btn btn-success">New</span></a>
|
||||
</div>
|
||||
<div class="card card-info card-outline">
|
||||
<div class="card-header">
|
||||
<h5 class="m-0">Articles: <a href="?p=news&action=new&type=3" class="float-right"><span class="btn btn-sm btn-success">New</span></a>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<table class="tb_datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%">ID</th>
|
||||
<th>Title</th>
|
||||
<th>Date</th>
|
||||
<th>Player</th>
|
||||
<th style="width: 150px;">Options</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for article in newses[constant('ARTICLE')] %}
|
||||
<tr>
|
||||
<td>{{ article.id|raw }}</td>
|
||||
<td><i><a href="?p=news&action=edit&id={{ article.id }}">{{ article.title }}</a></i></td>
|
||||
<td>{{ article.date|date(config.news_date_format) }}</td>
|
||||
<td><a target="_blank" rel="noopener noreferrer" href="{{ article.player_link }}">{{ article.player_name }}</a></td>
|
||||
<td>
|
||||
<a href="?p=news&action=edit&id={{ article.id }}" class="ico" title="Edit">
|
||||
<span class="btn btn-success btn-sm edit btn-flat">
|
||||
<i class="fa fa-edit"></i>
|
||||
</span>
|
||||
</a>
|
||||
<a href="?p=news&action=delete&id={{ article.id }}" class="ico" onclick="return confirm('Are you sure?');" title="Delete">
|
||||
<span class="btn btn-danger btn-sm delete btn-flat">
|
||||
<i class="fa fa-trash"></i>
|
||||
</span>
|
||||
</a>
|
||||
<a href="?p=news&action=hide&id={{ article.id }}" class="ico" title="{% if news.hidden != 1 %}Hide{% else %}Show{% endif %}">
|
||||
{% if article.hidden != 1 %}
|
||||
<span class="btn btn-primary btn-sm btn-flat">
|
||||
<i class="fa fa-eye"></i>
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="btn btn-default btn-sm btn-flat">
|
||||
<i class="fa fa-eye-slash"></i>
|
||||
</span>
|
||||
{% endif %}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<table class="tb_datatable table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%">ID</th>
|
||||
<th>Title</th>
|
||||
<th>Date</th>
|
||||
<th>Player</th>
|
||||
<th style="width: 150px;">Options</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for article in newses[constant('ARTICLE')] %}
|
||||
<tr>
|
||||
<td>{{ article.id|raw }}</td>
|
||||
<td><i><a href="?p=news&action=edit&id={{ article.id }}">{{ article.title }}</a></i></td>
|
||||
<td>{{ article.date|date(config.news_date_format) }}</td>
|
||||
<td><a target="_blank" rel="noopener noreferrer" href="{{ article.player_link }}">{{ article.player_name }}</a></td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<a href="?p=news&action=edit&id={{ article.id }}" class="btn btn-success btn-sm" title="Edit">
|
||||
<i class="fas fa-pencil-alt"></i>
|
||||
</a>
|
||||
<a href="?p=news&action=delete&id={{ article.id }}" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure?');" title="Delete">
|
||||
<i class="fas fa-trash"></i>
|
||||
</a>
|
||||
<a href="?p=news&action=hide&id={{ article.id }}" class="btn btn-{{ (article.hidden != 1) ? 'info' : 'default' }} btn-sm" title="{% if article.hidden != 1 %}Hide{% else %}Show{% endif %}">
|
||||
<i class="fas fa-eye{{ (article.hidden != 1) ? '' : '-slash' }}"></i>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$('.tb_datatable').DataTable({
|
||||
"order": [[ 0, "desc" ]]
|
||||
});
|
||||
$('.tb_datatable').DataTable({
|
||||
"order": [[0, "desc"]]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
|
@@ -1,24 +1,19 @@
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="box box-danger">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Notepad</h3>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label>This is your personal notepad. Be sure to save it each time you modify something.</label>
|
||||
<textarea class="form-control" style="text-align: left;" name="content" cols="50" rows="15"
|
||||
onchange="notepad_onchange(this);">{% if content is not null %}{{ content }}{% endif %}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<button name="submit" onclick="notepad_save(this);" value="Save" class="btn btn-primary">Save
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="card card-info card-outline">
|
||||
<div class="card-header">
|
||||
<h5 class="m-0">Notepad</h5>
|
||||
</div>
|
||||
<form method="post">
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label>This is your personal notepad. Be sure to save it each time you modify something.</label>
|
||||
<textarea class="form-control" name="content" cols="50" rows="15"
|
||||
onchange="notepad_onchange(this);">{% if content is not null %}{{ content }}{% endif %}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<button name="submit" onclick="notepad_save(this);" value="Save" class="btn btn-info">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{# <?php echo isset($_content) ? htmlentities($_content, ENT_COMPAT, 'UTF-8') : ''; ?> #}
|
||||
@@ -53,4 +48,4 @@
|
||||
};
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
@@ -1,83 +1,65 @@
|
||||
{% if action %}
|
||||
<div class="row">
|
||||
{% if (action == 'edit' or action == 'new') %}
|
||||
<div class="card card-info card-outline">
|
||||
<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 %}">
|
||||
{% if action == 'edit' %}
|
||||
<input type="hidden" name="id" value="{{ id }}"/>
|
||||
{% endif %}
|
||||
<div class="col-md-8" id="page-edit-table">
|
||||
<div class="box box-info">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{% if action == 'edit' %}Edit{% else %}Add{% endif %} page</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">Link/name</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" id="name" name="name" class="form-control" autocomplete="off"
|
||||
maxlength="29"
|
||||
style="cursor: auto;" value="{{ name }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="title" class="col-sm-2 control-label">Title</label>
|
||||
|
||||
<div class="col-sm-10">
|
||||
<input type="text" id="title" name="title" class="form-control" autocomplete="off"
|
||||
maxlength="29"
|
||||
style="cursor: auto;" value="{{ title }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="php" class="col-sm-2 control-label">PHP</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="checkbox" id="php" name="php"
|
||||
title="Check if page should be executed as PHP"
|
||||
value="1"{% if php %} checked{% endif %}{% if action == 'edit' %} disabled{% endif %}/>
|
||||
{% if action == 'edit' %}
|
||||
<input type="hidden" name="php" value="{% if php %}1{% else %}0{% endif %}"/>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% if not php %}
|
||||
<div class="form-group">
|
||||
<label for="enable_tinymce" class="col-sm-2 control-label">Enable TinyMCE</label>
|
||||
<div class="col-sm-10">
|
||||
<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 %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="form-group">
|
||||
<label for="body" class="col-sm-2 control-label">Content</label>
|
||||
<div class="col-sm-10" id="body-parent">
|
||||
<textarea class="form-control" id="body" name="body" maxlength="65000" cols="50"
|
||||
rows="5">{{ body|raw }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="access" class="col-sm-2 control-label">Access</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control" id="access" name="access">
|
||||
{% for id, group in groups %}
|
||||
<option value="{{ group.getId() }}"{% if access == group.getId() %} selected{% endif %}>{{ group.getName() }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<td align="right"><input type="submit" class="btn btn-info pull-right" value="Save"/></td>
|
||||
<td align="left">
|
||||
<input type="button" onclick="window.location = '{{ constant('ADMIN_URL') }}?p=pages';"
|
||||
class="btn btn-default" value="Cancel"/>
|
||||
</td>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label for="title">Page Title</label>
|
||||
<input type="text" id="title" name="title" class="form-control" autocomplete="off"
|
||||
maxlength="29"
|
||||
style="cursor: auto;" value="{{ title }}">
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="name">Link/name</label>
|
||||
<input type="text" id="name" name="name" class="form-control" autocomplete="off"
|
||||
maxlength="29"
|
||||
style="cursor: auto;" value="{{ name }}">
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="access">Access</label>
|
||||
<select class="form-control" id="access" name="access">
|
||||
{% for id, group in groups %}
|
||||
<option value="{{ group.getId() }}"{% if access == group.getId() %} selected{% endif %}>{{ group.getName() }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="php">PHP
|
||||
<input type="checkbox" id="php" name="php"
|
||||
title="Check if page should be executed as PHP"
|
||||
value="1"{% if php %} checked{% endif %}{% if action == 'edit' %} disabled{% endif %}/>
|
||||
{% if action == 'edit' %}
|
||||
<input type="hidden" name="php" value="{% if php %}1{% else %}0{% endif %}"/>
|
||||
{% endif %}</label>
|
||||
</div>
|
||||
{% 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 %}/>
|
||||
{% if action == 'edit' %}
|
||||
<input type="hidden" name="enable_tinymce" value="{% if enable_tinymce %}1{% else %}0{% endif %}"/>
|
||||
{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
<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>
|
||||
</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>
|
||||
@@ -91,8 +73,7 @@
|
||||
} else {
|
||||
if (tinymce.editors.length > 0) {
|
||||
tinymce.activeEditor.show();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
init_tinymce();
|
||||
}
|
||||
}
|
||||
|
@@ -1,53 +1,41 @@
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Pages:</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a href="?p=pages&action=new"><span class="btn btn-success">New</span></a>
|
||||
</div>
|
||||
<div class="card card-info card-outline">
|
||||
<div class="card-header">
|
||||
<h5 class="m-0">Pages
|
||||
<a href="?p=pages&action=new" class="float-right"><span class="btn btn-sm btn-success">New</span></a></h5>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<table id="tb_pages">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Title</th>
|
||||
<th>PHP</th>
|
||||
<th style="width: 150px;">Options</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for page in pages %}
|
||||
<tr>
|
||||
<td>{{ page.link|raw }}</td>
|
||||
<td><i>{{ page.title }}</i></td>
|
||||
<td>{% if page.php %}Yes{% else %}No{% endif %}</td>
|
||||
<td>
|
||||
<a href="?p=pages&action=edit&id={{ page.id }}" class="ico" title="Edit"><span
|
||||
class="btn btn-success btn-sm edit btn-flat"><i
|
||||
class="fa fa-edit"></i></span></a>
|
||||
<a href="?p=pages&action=delete&id={{ page.id }}" class="ico"
|
||||
onclick="return confirm('Are you sure?');" title="Delete"><span
|
||||
class="btn btn-danger btn-sm delete btn-flat"><i
|
||||
class="fa fa-trash"></i></span></a>
|
||||
<a href="?p=pages&action=hide&id={{ page.id }}" class="ico"
|
||||
title="{% if page.hidden != 1 %}Hide{% else %}Show{% endif %}">
|
||||
{% if page.hidden != 1 %}
|
||||
<span class="btn btn-primary btn-sm btn-flat"><i
|
||||
class="fa fa-eye"></i></span>
|
||||
{% else %}
|
||||
<span class="btn btn-default btn-sm btn-flat"><i
|
||||
class="fa fa-eye-slash"></i></span>
|
||||
{% endif %}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered" id="tb_pages">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Title</th>
|
||||
<th>PHP</th>
|
||||
<th style="width: 150px;">Options</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for page in pages %}
|
||||
<tr>
|
||||
<td>{{ page.link|raw }}</td>
|
||||
<td><i>{{ page.title }}</i></td>
|
||||
<td>{% if page.php %}Yes{% else %}No{% endif %}</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<a href="?p=pages&action=edit&id={{ page.id }}" class="btn btn-success btn-sm" title="Edit">
|
||||
<i class="fas fa-pencil-alt"></i>
|
||||
</a>
|
||||
<a href="?p=pages&action=delete&id={{ page.id }}" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure?');" title="Delete">
|
||||
<i class="fas fa-trash"></i>
|
||||
</a>
|
||||
<a href="?p=pages&action=hide&id={{ page.id }}" class="btn btn-{{ (page.hidden != 1) ? 'info' : 'default' }} btn-sm" title="{% if page.hidden != 1 %}Hide{% else %}Show{% endif %}">
|
||||
<i class="fas fa-eye{{ (page.hidden != 1) ? '' : '-slash' }}"></i>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
@@ -1,27 +1,20 @@
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Install plugin:</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
|
||||
</button>
|
||||
<div class="collapse" id="install_plugin">
|
||||
<div class="card card-info card-outline">
|
||||
<div class="card-header">
|
||||
<h5 class="m-0">Install plugin</h5>
|
||||
</div>
|
||||
<form enctype="multipart/form-data" method="post" action="{{ constant('ADMIN_URL') }}?p=plugins">
|
||||
<div class="card-body">
|
||||
<input type="hidden" name="upload_plugin"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label>File input</label>
|
||||
<input type="file" name="plugin">
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form enctype="multipart/form-data" method="post" action="{{ constant('ADMIN_URL') }}?p=plugins">
|
||||
<input type="hidden" name="upload_plugin"/>
|
||||
<div class="box-body">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputFile">File input</label>
|
||||
<input type="file" name="plugin">
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<button type="submit" class="btn btn-primary">Upload</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="card-footer">
|
||||
<button type="submit" class="btn btn-info">Upload</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -1,50 +1,42 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Installed plugins:</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<table id="tb_plugins">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th>Author</th>
|
||||
<th>Filename</th>
|
||||
<th style="width: 55px;">Options</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for plugin in plugins %}
|
||||
<tr>
|
||||
<td><b>{{ plugin.name }}</b><br>
|
||||
<small>{{ plugin.description|raw }}</small>
|
||||
</td>
|
||||
<td>{{ plugin.version }}</td>
|
||||
<td><b>{{ plugin.author }}</b><br>
|
||||
<small>{{ plugin.contact }}</small>
|
||||
</td>
|
||||
<td>{{ plugin.file }}.json</td>
|
||||
<td>
|
||||
{% if plugin.uninstall %}
|
||||
<a href="?p=plugins&uninstall={{ plugin.file }}" title="Uninstall"
|
||||
onclick="return confirm('Are you sure?');"><span
|
||||
class="btn btn-danger btn-sm delete btn-flat"><i
|
||||
class="fa fa-trash"></i></span></a>
|
||||
{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card card-info card-outline">
|
||||
<div class="card-header">
|
||||
<h5 class="m-0">Installed plugins<span class="float-right"><a class="" data-toggle="collapse" href="#install_plugin">Install Plugin</a></span></h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered" id="tb_plugins">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th>Author</th>
|
||||
<th>Filename</th>
|
||||
<th style="width: 55px;">Options</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for plugin in plugins %}
|
||||
<tr>
|
||||
<td><b>{{ plugin.name }}</b><br>
|
||||
<small>{{ plugin.description|raw }}</small>
|
||||
</td>
|
||||
<td>{{ plugin.version }}</td>
|
||||
<td><b>{{ plugin.author }}</b><br>
|
||||
<small>{{ plugin.contact }}</small>
|
||||
</td>
|
||||
<td>{{ plugin.file }}.json</td>
|
||||
<td>
|
||||
{% if plugin.uninstall %}
|
||||
<a href="?p=plugins&uninstall={{ plugin.file }}" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure?');" title="Uninstall">
|
||||
<i class="fas fa-trash"></i>
|
||||
</a>
|
||||
{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function () {
|
||||
$('#tb_plugins').DataTable()
|
||||
|
@@ -1,41 +1,30 @@
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Reports:</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<table id="tb_reports">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Report name</th>
|
||||
<th>Last updated</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for file in files %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ constant('ADMIN_URL') }}?p=reports&file={{ file.name }}">{{ file.name }}</a>
|
||||
</td>
|
||||
<td>{{ file.mtime|date('Y-m-d H:i:s') }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>Report name</th>
|
||||
<th>Last updated</th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card card-info card-outline">
|
||||
<div class="card-header">
|
||||
<h5 class="m-0">Reports</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="table table-striped table-bordered" id="tb_reports">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Report name</th>
|
||||
<th>Last updated</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for file in files %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ constant('ADMIN_URL') }}?p=reports&file={{ file.name }}">{{ file.name }}</a>
|
||||
</td>
|
||||
<td>{{ file.mtime|date('Y-m-d H:i:s') }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('#tb_reports').DataTable();
|
||||
|
||||
});
|
||||
</script>
|
||||
$(document).ready(function () {
|
||||
$('#tb_reports').DataTable();
|
||||
});
|
||||
</script>
|
||||
|
@@ -1,39 +1,38 @@
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="col-12 col-sm-6 col-md-3">
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-aqua"><i class="ion ion-person-add"></i></span>
|
||||
<span class="info-box-icon bg-info elevation-1"><i class="fas fa-user-plus"></i></span>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">Total accounts:</span>
|
||||
<span class="info-box-number">{{ total_accounts }}</span>
|
||||
<span class="info-box-number">{{ count.total_accounts }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="col-12 col-sm-6 col-md-3">
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-red"><i class="fa fa-male"></i></span>
|
||||
<span class="info-box-icon bg-red elevation-1"><i class="fas fa-user-plus"></i></span>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">Total players:</span>
|
||||
<span class="info-box-number">{{ total_players }}</span>
|
||||
<span class="info-box-number">{{ count.total_players }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearfix visible-sm-block"></div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="col-12 col-sm-6 col-md-3">
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-green"><i class="ion ion-pie-graph"></i></span>
|
||||
<span class="info-box-icon bg-green elevation-1"><i class="fas fa-chart-pie"></i></span>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">Total guilds:</span>
|
||||
<span class="info-box-number">{{ total_guilds }}</span>
|
||||
<span class="info-box-number">{{ count.total_guilds }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
<div class="col-12 col-sm-6 col-md-3">
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-yellow"><i class="fa fa-home"></i></span>
|
||||
<span class="info-box-icon bg-yellow elevation-1"><i class="fas fa-home"></i></span>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">Total houses:</span>
|
||||
<span class="info-box-number">{{ total_houses }}</span>
|
||||
<span class="info-box-number">{{ count.total_houses }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -1,38 +1,30 @@
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Users active within last {{ config_visitors_counter_ttl }} minutes.</h3>
|
||||
<div class="card card-info card-outline">
|
||||
<div class="card-header">
|
||||
<h5 class="m-0">Users active within last {{ config_visitors_counter_ttl }} minutes.</h5>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<table id="tb_visitors">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>IP</th>
|
||||
<th>Last visit</th>
|
||||
<th>Page</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% set i = 0 %}
|
||||
{% for visitor in visitors %}
|
||||
{% set i = i + 1 %}
|
||||
<tr role="row" class="odd">
|
||||
<td>{{ visitor.ip }}</td>
|
||||
<td>{{ visitor.lastvisit|date("H:i:s") }}</td>
|
||||
<td>
|
||||
<a href="{{ visitor.page }}">{{ visitor.page|slice(0, 50) }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table id="tb_visitors" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>IP</th>
|
||||
<th>Last visit</th>
|
||||
<th>Page</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for visitor in visitors %}
|
||||
<tr>
|
||||
<td>{{ visitor.ip }}</td>
|
||||
<td>{{ visitor.lastvisit|date("H:i:s") }}</td>
|
||||
<td><a href="{{ visitor.page }}">{{ visitor.page|slice(0, 50) }}</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function () {
|
||||
$('#tb_visitors').DataTable()
|
||||
})
|
||||
</script>
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user