Commit 9bde82f2 authored by Marius Cramer's avatar Marius Cramer
Browse files

Merge branch 'master' into 'master'

Master

See merge request !155
parents b82b9939 02872aad
<?php
require_once '../../lib/config.inc.php';
require_once '../../lib/app.inc.php';
$list_def_file = 'list/backup_stats.list.php';
/******************************************
* End Form configuration
******************************************/
//* Check permissions for module
$app->auth->check_module_permissions('sites');
$app->load('listform_actions','functions');
class list_action extends listform_actions {
public function prepareDataRow($rec)
{
global $app;
$rec = parent::prepareDataRow($rec);
$rec['active'] = "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>";
if ($rec['backup_interval'] === 'none') {
$rec['active'] = "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>";
$rec['backup_copies'] = 0;
}
$recBackup = $app->db->queryOneRecord('SELECT COUNT(backup_id) AS backup_count FROM mail_backup WHERE mailuser_id = ?', $rec['mailuser_id']);
$rec['backup_copies_exists'] = $recBackup['backup_count'];
return $rec;
}
}
$list = new list_action;
$list->SQLExtWhere = "";
$list->onLoad();
<?php
$wb["list_head_txt"] = 'Backup Statistiken';
$wb["database_name_txt"] = '';
$wb['active_txt'] = 'Aktiv';
$wb['domain_txt'] = 'Email';
$wb['backup_count_txt'] = 'Anz. Backups';
$wb['backup_server_txt'] = 'Server';
$wb['backup_interval_txt'] = 'Intervall / Anz.';
?>
<?php
$wb["list_head_txt"] = 'Backup Stats';
$wb["database_name_txt"] = '';
$wb['active_txt'] = 'Active';
$wb['domain_txt'] = 'Email';
$wb['backup_count_txt'] = 'Backup count';
$wb['backup_server_txt'] = 'Server';
$wb['backup_interval_txt'] = 'Interval / cnt.';
?>
......@@ -164,7 +164,11 @@ $items[] = array( 'title' => 'Mailbox traffic',
'target' => 'content',
'link' => 'mail/mail_user_stats.php',
'html_id' => 'mail_user_stats');
$items[] = array (
'title' => 'Backup Stats',
'target' => 'content',
'link' => 'mail/backup_stats.php',
'html_id' => 'backup_stats');
$module['nav'][] = array( 'title' => 'Statistics',
......
<?php
// Name of the list
$liste["name"] = "backup_stats";
// Database table
//$liste["table"] = "mail_domain";
$liste["table"] = "mail_user";
// Index index field of the database table
//$liste["table_idx"] = "domain_id";
$liste["table_idx"] = "mailuser_id";
// Search Field Prefix
$liste["search_prefix"] = "search_";
// Records per page
$liste["records_per_page"] = "15";
// Script File of the list
$liste["file"] = "backup_stats.php";
// Script file of the edit form
$liste["edit_file"] = "backup_stats_edit.php";
// Paging Template
$liste["paging_tpl"] = "templates/paging.tpl.htm";
// Enable auth
$liste["auth"] = "yes";
// mark columns for php sorting (no real mySQL columns)
$liste["phpsort"] = array('used_sort', 'files');
/*****************************************************
* Suchfelder
*****************************************************/
$liste['item'][] = array (
'field' => 'server_id',
'datatype' => 'INTEGER',
'formtype' => 'SELECT',
'op' => '=',
'prefix' => '',
'width' => '',
'value' => '',
'suffix' => '',
'datasource' => array (
'type' => 'SQL',
'querystring' => 'SELECT a.server_id, a.server_name FROM server a, mail_domain b WHERE (a.server_id = b.server_id) ORDER BY a.server_name',
'keyfield' => 'server_id',
'valuefield' => 'server_name'
)
);
<div class='page-header'>
<h1><tmpl_var name="list_head_txt"></h1>
</div>
<p><tmpl_var name="list_desc_txt"></p>
<p class="fieldset-legend"><tmpl_var name="list_head_txt"></p>
<div class="table-wrapper marginTop15">
<table class="table">
<thead class="dark form-group-sm">
<tr>
<th class="tiny-col" data-column="active"><tmpl_var name="active_txt"></th>
<th data-column="domain"><tmpl_var name="domain_txt"></th>
<th data-column="backup_server"><tmpl_var name="backup_server_txt"></th>
<th data-column="backup_interval"><tmpl_var name="backup_interval_txt"></th>
<th data-column="backup_count"><tmpl_var name="backup_count_txt"></th>
</tr>
</thead>
<tbody>
<tmpl_loop name="records">
<tr class="tbl_row_{tmpl_if name='__EVEN__'}even{tmpl_else}uneven{/tmpl_if}">
<td> <a href="#" data-load-content="mail/mail_user_edit.php?id={tmpl_var name='id'}">{tmpl_var name="active"}</a> </td>
<td> <a href="#" data-load-content="mail/mail_user_edit.php?id={tmpl_var name='id'}">{tmpl_var name="domain"}</a> </td>
<td> <a href="#" data-load-content="mail/mail_user_edit.php?id={tmpl_var name='id'}">{tmpl_var name="server_id"}</a> </td>
<td> <a href="#" data-load-content="mail/mail_user_edit.php?id={tmpl_var name='id'}">{tmpl_var name="backup_interval"}</a> / <a href="#" data-load-content="mail/mail_user_edit.php?id={tmpl_var name='id'}">{tmpl_var name="backup_copies"}</a> </td>
<td> <a href="#" data-load-content="mail/mail_user_edit.php?id={tmpl_var name='id'}">{tmpl_var name="backup_copies_exists"}</a> </td>
</tr>
</tmpl_loop>
</tbody>
<tfoot>
<tr>
<td colspan="5">
<tmpl_var name="paging">
</td>
</tr>
</tfoot>
</table>
</div>
</div>
<?php
$wb['head_txt'] = 'Outil de Resynchronisation';
$wb['legend_txt'] = 'Resynchroniser';
$wb['Resynchroniser_sites_txt'] = 'Resynchroniser Sites web';
$wb['Resynchroniser_ftp_txt'] = 'Resynchroniser utilisateurs FTP';
$wb['Resynchroniser_shell_txt'] = 'Resynchroniser utilisateurs shell';
$wb['Resynchroniser_cron_txt'] = 'Resynchroniser cronjobs';
$wb['Resynchroniser_db_txt'] = 'Resynchroniser configuration clientdb';
$wb['Resynchroniser_mailbox_txt'] = 'Resynchroniser Boites aux lettres';
$wb['Resynchroniser_dkim_txt'] = 'Resynchroniser DKIM-Keys';
$wb['Resynchroniser_dns_txt'] = 'Resynchroniser enregistrements DNS';
$wb['resync_sites_txt'] = 'Resynchroniser Sites web';
$wb['resync_ftp_txt'] = 'Resynchroniser utilisateurs FTP';
$wb['resync_shell_txt'] = 'Resynchroniser utilisateurs shell';
$wb['resync_cron_txt'] = 'Resynchroniser cronjobs';
$wb['resync_db_txt'] = 'Resynchroniser configuration clientdb';
$wb['resync_mailbox_txt'] = 'Resynchroniser Boites aux lettres';
$wb['resync_dkim_txt'] = 'Resynchroniser DKIM-Keys';
$wb['resync_dns_txt'] = 'Resynchroniser enregistrements DNS';
$wb['btn_start_txt'] = 'Dérrer';
$wb['btn_cancel_txt'] = 'Annuler';
$wb['Resynchroniser_client_txt'] = 'Resynchroniser Enregisitrements Client';
$wb['resync_webdav_txt'] = 'Resync WebDAV-Users';
$wb['resync_mail_txt'] = 'Resync Maildomains';
$wb['resync_vserver_txt'] = 'Resync vServer';
$wb['resync_firewall_txt'] = 'Resync Firewall';
$wb['resync_no_server_txt'] = 'No active server found';
$wb['resync_client_txt'] = 'Resynchroniser Enregisitrements Client';
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment