saas enhancements

This commit is contained in:
SJ 2013-07-23 22:44:34 +02:00
parent 90eef6b43d
commit 920f4208ba
31 changed files with 970 additions and 463 deletions

View File

@ -354,11 +354,13 @@ create table if not exists `ldap` (
`ldap_host` varchar(255) not null, `ldap_host` varchar(255) not null,
`ldap_base_dn` varchar(255) not null, `ldap_base_dn` varchar(255) not null,
`ldap_bind_dn` varchar(255) not null, `ldap_bind_dn` varchar(255) not null,
`ldap_bind_pw` varchar(255) not null `ldap_bind_pw` varchar(255) not null,
`ldap_auditor_member_dn` varchar(255) default null
) Engine=InnoDB; ) Engine=InnoDB;
create table if not exists `customer_settings` ( create table if not exists `customer_settings` (
`id` int not null auto_increment primary key,
`domain` varchar(255) not null unique, `domain` varchar(255) not null unique,
`branding_text` varchar(255) default null, `branding_text` varchar(255) default null,
`branding_url` varchar(255) default null, `branding_url` varchar(255) default null,

View File

@ -11,10 +11,12 @@ create table if not exists `ldap` (
`ldap_host` varchar(255) not null, `ldap_host` varchar(255) not null,
`ldap_base_dn` varchar(255) not null, `ldap_base_dn` varchar(255) not null,
`ldap_bind_dn` varchar(255) not null, `ldap_bind_dn` varchar(255) not null,
`ldap_bind_pw` varchar(255) not null `ldap_bind_pw` varchar(255) not null,
`ldap_auditor_member_dn` varchar(255) default null
) Engine=InnoDB; ) Engine=InnoDB;
create table if not exists `customer_settings` ( create table if not exists `customer_settings` (
`id` int not null auto_increment primary key,
`domain` varchar(255) not null unique, `domain` varchar(255) not null unique,
`branding_text` varchar(255) default null, `branding_text` varchar(255) default null,
`branding_url` varchar(255) default null, `branding_url` varchar(255) default null,

View File

@ -341,6 +341,7 @@ define('ACTION_REMOVE_MESSAGE', 13);
define('ACTION_UNAUTHORIZED_REMOVE_MESSAGE', 14); define('ACTION_UNAUTHORIZED_REMOVE_MESSAGE', 14);
define('ACTION_DOWNLOAD_ATTACHMENT', 15); define('ACTION_DOWNLOAD_ATTACHMENT', 15);
define('ACTION_UNAUTHORIZED_DOWNLOAD_ATTACHMENT', 16); define('ACTION_UNAUTHORIZED_DOWNLOAD_ATTACHMENT', 16);
define('ACTION_VIEW_JOURNAL', 17);
$actions = array( $actions = array(
'unknown' => 1, 'unknown' => 1,
@ -353,7 +354,8 @@ $actions = array(
'download' => 9, 'download' => 9,
'search' => 10, 'search' => 10,
'save_search' => 11, 'save_search' => 11,
'download_attachment' => 15 'download_attachment' => 15,
'journal' => 17
); );

View File

@ -63,6 +63,7 @@ class ControllerAuditHelper extends Controller {
$this->data['actions'][ACTION_UNAUTHORIZED_REMOVE_MESSAGE] = $this->data['text_unauthorized_remove_message']; $this->data['actions'][ACTION_UNAUTHORIZED_REMOVE_MESSAGE] = $this->data['text_unauthorized_remove_message'];
$this->data['actions'][ACTION_DOWNLOAD_ATTACHMENT] = $this->data['text_download_attachment2']; $this->data['actions'][ACTION_DOWNLOAD_ATTACHMENT] = $this->data['text_download_attachment2'];
$this->data['actions'][ACTION_UNAUTHORIZED_DOWNLOAD_ATTACHMENT] = $this->data['text_unauthorized_download_attachment']; $this->data['actions'][ACTION_UNAUTHORIZED_DOWNLOAD_ATTACHMENT] = $this->data['text_unauthorized_download_attachment'];
$this->data['actions'][ACTION_VIEW_JOURNAL] = $this->data['text_view_journal'];
@ -98,7 +99,7 @@ class ControllerAuditHelper extends Controller {
while(list($k, $v) = each($b)) { while(list($k, $v) = each($b)) {
if($v == '') { continue; } if($v == '') { continue; }
if(preg_match("/(login|loginfailed|logout|view|download|search|restore)$/", $v) && isset($actions[$v])) { $this->a['action'] .= '*' . $actions[$v]; } if(preg_match("/(login|loginfailed|logout|view|download|search|restore|journal)$/", $v) && isset($actions[$v])) { $this->a['action'] .= '*' . $actions[$v]; }
if(preg_match("/\@/", $v)) { $this->a['user'] .= '*' . $v; } if(preg_match("/\@/", $v)) { $this->a['user'] .= '*' . $v; }
if(preg_match("/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/", $v)) { $this->a['ipaddr'] .= '*' . $v; } if(preg_match("/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/", $v)) { $this->a['ipaddr'] .= '*' . $v; }
if(preg_match("/^\d{1,}$/", $v)) { $this->a['ref'] .= '*' . $v; } if(preg_match("/^\d{1,}$/", $v)) { $this->a['ref'] .= '*' . $v; }

View File

@ -0,0 +1,109 @@
<?php
class ControllerCustomerList extends Controller {
private $error = array();
public function index(){
$this->id = "content";
$this->template = "customer/list.tpl";
$this->layout = "common/layout";
$request = Registry::get('request');
$db = Registry::get('db');
$this->load->model('saas/customer');
$this->load->model('domain/domain');
$this->document->title = $this->data['text_customers'];
$this->data['username'] = Registry::get('username');
$this->data['page'] = 0;
$this->data['page_len'] = get_page_length();
$this->data['total'] = 0;
$this->data['entries'] = array();
$this->data['id'] = -1;
if(isset($this->request->get['id'])) { $this->data['id'] = $this->request->get['id']; }
/* check if we are admin */
if(Registry::get('admin_user') == 1) {
if($this->request->server['REQUEST_METHOD'] == 'POST') {
if($this->validate() == true) {
if(isset($this->request->post['id'])) {
if($this->model_saas_customer->update($this->request->post) == 1) {
$this->data['x'] = $this->data['text_successfully_modified'];
} else {
$this->template = "common/error.tpl";
$this->data['errorstring'] = $this->data['text_failed_to_modify'];
}
}
else {
if($this->model_saas_customer->add($this->request->post) == 1) {
$this->data['x'] = $this->data['text_successfully_added'];
} else {
$this->template = "common/error.tpl";
$this->data['errorstring'] = $this->data['text_failed_to_add'];
}
}
}
else {
$this->template = "common/error.tpl";
$this->data['errorstring'] = array_pop($this->error);
}
}
$this->data['domains'] = $this->model_domain_domain->get_mapped_domains();
if(isset($this->request->get['id'])) {
$this->data['a'] = $this->model_saas_customer->get($this->request->get['id']);
}
else {
$this->data['entries'] = $this->model_saas_customer->get();
}
}
else {
$this->template = "common/error.tpl";
$this->data['errorstring'] = $this->data['text_you_are_not_admin'];
}
$this->render();
}
private function validate() {
if(!isset($this->request->post['domain']) || strlen($this->request->post['domain']) < 1) {
$this->error['domain'] = $this->data['text_invalid_data'];
}
if(!isset($this->request->post['branding_text']) || strlen($this->request->post['branding_text']) < 1) {
$this->error['branding_text'] = $this->data['text_invalid_data'];
}
if (!$this->error) {
return true;
} else {
return false;
}
}
}
?>

View File

@ -0,0 +1,79 @@
<?php
class ControllerCustomerRemove extends Controller {
private $error = array();
private $domains = array();
private $d = array();
public function index(){
$this->id = "content";
$this->template = "customer/remove.tpl";
$this->layout = "common/layout";
$request = Registry::get('request');
$db = Registry::get('db');
$this->load->model('saas/customer');
$this->document->title = $this->data['text_customers'];
$this->data['username'] = Registry::get('username');
$this->data['id'] = $this->request->get['id'];
$this->data['domain'] = $this->request->get['domain'];
$this->data['confirmed'] = (int)$this->request->get['confirmed'];
if($this->validate() == true) {
if($this->data['confirmed'] == 1) {
$ret = $this->model_saas_customer->delete($this->data['id'], $this->data['domain']);
if($ret == 1){
$this->data['x'] = $this->data['text_successfully_removed'];
}
else {
$this->data['x'] = $this->data['text_failed_to_remove'];
}
}
}
else {
$this->template = "common/error.tpl";
$this->data['errorstring'] = array_pop($this->error);
}
$this->render();
}
private function validate() {
if(Registry::get('admin_user') == 0) {
$this->error['admin'] = $this->data['text_you_are_not_admin'];
}
if(!isset($this->request->get['domain']) || strlen($this->request->get['domain']) < 1) {
$this->error['domain'] = $this->data['text_invalid_data'];
}
if(!isset($this->request->get['id']) || !is_numeric($this->request->get['id'])) {
$this->error['id'] = $this->data['text_invalid_data'];
}
if (!$this->error) {
return true;
} else {
return false;
}
}
}
?>

View File

@ -29,6 +29,11 @@ class ControllerLdapList extends Controller {
$this->data['entries'] = array(); $this->data['entries'] = array();
$this->data['id'] = -1;
$this->data['ldap_types'] = Registry::get('ldap_types');
if(isset($this->request->get['id'])) { $this->data['id'] = $this->request->get['id']; }
/* check if we are admin */ /* check if we are admin */
@ -37,6 +42,15 @@ class ControllerLdapList extends Controller {
if($this->request->server['REQUEST_METHOD'] == 'POST') { if($this->request->server['REQUEST_METHOD'] == 'POST') {
if($this->validate() == true) { if($this->validate() == true) {
if(isset($this->request->post['id'])) {
if($this->model_saas_ldap->update($this->request->post) == 1) {
$this->data['x'] = $this->data['text_successfully_modified'];
} else {
$this->template = "common/error.tpl";
$this->data['errorstring'] = $this->data['text_failed_to_modify'];
}
}
else {
if($this->model_saas_ldap->add($this->request->post) == 1) { if($this->model_saas_ldap->add($this->request->post) == 1) {
$this->data['x'] = $this->data['text_successfully_added']; $this->data['x'] = $this->data['text_successfully_added'];
} else { } else {
@ -44,13 +58,19 @@ class ControllerLdapList extends Controller {
$this->data['errorstring'] = $this->data['text_failed_to_add']; $this->data['errorstring'] = $this->data['text_failed_to_add'];
} }
} }
}
else { else {
$this->template = "common/error.tpl"; $this->template = "common/error.tpl";
$this->data['errorstring'] = array_pop($this->error); $this->data['errorstring'] = array_pop($this->error);
} }
} }
if(isset($this->request->get['id'])) {
$this->data['a'] = $this->model_saas_ldap->get($this->request->get['id']);
}
else {
$this->data['entries'] = $this->model_saas_ldap->get(); $this->data['entries'] = $this->model_saas_ldap->get();
}
} }
else { else {

View File

@ -31,7 +31,7 @@ class ControllerMessageJournal extends Controller {
die("no permission for " . $this->data['id']); die("no permission for " . $this->data['id']);
} }
AUDIT(ACTION_VIEW_HEADER, '', '', $this->data['id'], ''); AUDIT(ACTION_VIEW_JOURNAL, '', '', $this->data['id'], '');
if(Registry::get('auditor_user') == 1) { $this->data['rcpt'] = $this->model_search_search->get_message_addresses_in_my_domain($this->data['id']); } if(Registry::get('auditor_user') == 1) { $this->data['rcpt'] = $this->model_search_search->get_message_addresses_in_my_domain($this->data['id']); }

0
webui/images/.nofile Normal file
View File

View File

@ -60,7 +60,7 @@ Registry::set('counters', $counters);
Registry::set('langs', $langs); Registry::set('langs', $langs);
Registry::set('themes', $themes); Registry::set('themes', $themes);
Registry::set('letters', $letters); Registry::set('letters', $letters);
Registry::set('ldap_types', array("AD", "iredmail", "lotus", "zimbra"));
Registry::set('health_smtp_servers', $health_smtp_servers); Registry::set('health_smtp_servers', $health_smtp_servers);
Registry::set('partitions_to_monitor', $partitions_to_monitor); Registry::set('partitions_to_monitor', $partitions_to_monitor);

View File

@ -30,6 +30,9 @@ $_['text_audit'] = "Revision";
$_['text_back'] = "Zurück"; $_['text_back'] = "Zurück";
$_['text_body'] = "Nachricht"; $_['text_body'] = "Nachricht";
$_['text_branding_logo'] = "Branding logo";
$_['text_branding_text'] = "Branding text";
$_['text_branding_url'] = "Branding URL";
$_['text_bulk_edit_selected_uids'] = "Ausgewählte Benutzerkennungen bearbeiten"; $_['text_bulk_edit_selected_uids'] = "Ausgewählte Benutzerkennungen bearbeiten";
$_['text_bulk_restore_selected_emails'] = "Ausgewählte Nachrichten wiederherstellen"; $_['text_bulk_restore_selected_emails'] = "Ausgewählte Nachrichten wiederherstellen";
$_['text_bulk_update_selected_uids'] = "Ausgewählte Benutzerkennungen aktualisieren"; $_['text_bulk_update_selected_uids'] = "Ausgewählte Benutzerkennungen aktualisieren";
@ -38,6 +41,7 @@ $_['text_cancel'] = "Abbrechen";
$_['text_change_user_settings'] = "Benutzereinstellungen ändern"; $_['text_change_user_settings'] = "Benutzereinstellungen ändern";
$_['text_clienthost'] = "Clientrechner"; $_['text_clienthost'] = "Clientrechner";
$_['text_close'] = "Schließen"; $_['text_close'] = "Schließen";
$_['text_colour'] = "Colour";
$_['text_compressed'] = "komprimiert"; $_['text_compressed'] = "komprimiert";
$_['text_confirm_to_reset_counters'] = "Zurücksetzen des Zählers bestätigen"; $_['text_confirm_to_reset_counters'] = "Zurücksetzen des Zählers bestätigen";
$_['text_connection_failed'] = "Connection failed"; $_['text_connection_failed'] = "Connection failed";
@ -49,6 +53,7 @@ $_['text_copied'] = "Kopiert";
$_['text_counters'] = "Zähler"; $_['text_counters'] = "Zähler";
$_['text_cpu_load'] = "Prozessorlast"; $_['text_cpu_load'] = "Prozessorlast";
$_['text_cpu_usage'] = "Prozessorlast"; $_['text_cpu_usage'] = "Prozessorlast";
$_['text_customers'] = "Customers";
$_['text_daily_quarantine_report'] = "Täglicher Quarantänereport"; $_['text_daily_quarantine_report'] = "Täglicher Quarantänereport";
$_['text_daily_quarantine_report_status'] = "Status Täglicher Quarantänereport"; $_['text_daily_quarantine_report_status'] = "Status Täglicher Quarantänereport";
@ -84,6 +89,7 @@ $_['text_download_message'] = "Nachricht herunterladen (EML)";
$_['text_download_message2'] = "Nachricht herunterladen"; $_['text_download_message2'] = "Nachricht herunterladen";
$_['text_edit'] = "Bearbeiten"; $_['text_edit'] = "Bearbeiten";
$_['text_edit_entry'] = "Entry bearbeiten";
$_['text_edit_group'] = "Gruppe bearbeiten"; $_['text_edit_group'] = "Gruppe bearbeiten";
$_['text_edit_user'] = "Benutzer bearbeiten"; $_['text_edit_user'] = "Benutzer bearbeiten";
$_['text_edit_or_view'] = "Bearbeiten/anzeigen"; $_['text_edit_or_view'] = "Bearbeiten/anzeigen";
@ -163,6 +169,7 @@ $_['text_last'] = "Letzte";
$_['text_last_update'] = "Letzte Aktualisierung"; $_['text_last_update'] = "Letzte Aktualisierung";
$_['text_latest_emails'] = "Letzte Nachrichten"; $_['text_latest_emails'] = "Letzte Nachrichten";
$_['text_ldap'] = "LDAP"; $_['text_ldap'] = "LDAP";
$_['text_ldap_auditor_member_dn'] = "LDAP auditor member DN";
$_['text_ldap_base_dn'] = "LDAP-Basis-DN"; $_['text_ldap_base_dn'] = "LDAP-Basis-DN";
$_['text_ldap_bind_dn'] = "LDAP-Anmelde-DN"; $_['text_ldap_bind_dn'] = "LDAP-Anmelde-DN";
$_['text_ldap_bind_pw'] = "LDAP-Anmelde-Passwort"; $_['text_ldap_bind_pw'] = "LDAP-Anmelde-Passwort";
@ -304,6 +311,7 @@ $_['text_successfully_modified'] = "Erfolgreich geändert";
$_['text_successfully_removed'] = "Erfolgreich entfernt"; $_['text_successfully_removed'] = "Erfolgreich entfernt";
$_['text_successfully_trained'] = "Erfolgreich trainiert"; $_['text_successfully_trained'] = "Erfolgreich trainiert";
$_['text_successfully_updated'] = "Erfolgreich geändert"; $_['text_successfully_updated'] = "Erfolgreich geändert";
$_['text_support_link'] = "Support link";
$_['text_swap_usage'] = "Auslagerungsspeicher"; $_['text_swap_usage'] = "Auslagerungsspeicher";
$_['text_tag_selected_messages'] = "Ausgewählte Nachrichten kategorisieren"; $_['text_tag_selected_messages'] = "Ausgewählte Nachrichten kategorisieren";
@ -346,6 +354,7 @@ $_['text_users_quarantine'] = "Quarantäne des Benutzers";
$_['text_view_formatted_email'] = "Nachricht formatiert ansehen"; $_['text_view_formatted_email'] = "Nachricht formatiert ansehen";
$_['text_view_header'] = "Kopfzeilen anzeigen"; $_['text_view_header'] = "Kopfzeilen anzeigen";
$_['text_view_headers'] = "Kopfzeilen anzeigen"; $_['text_view_headers'] = "Kopfzeilen anzeigen";
$_['text_view_journal'] = "Envelope";
$_['text_view_journal_envelope'] = "Envelope anzeigen"; $_['text_view_journal_envelope'] = "Envelope anzeigen";
$_['text_view_message'] = "Nachrichtentext anzeigen"; $_['text_view_message'] = "Nachrichtentext anzeigen";
$_['text_view_message2'] = "Nachricht anzeigen"; $_['text_view_message2'] = "Nachricht anzeigen";

View File

@ -30,6 +30,9 @@ $_['text_audit'] = "Audit";
$_['text_back'] = "Back"; $_['text_back'] = "Back";
$_['text_body'] = "Body"; $_['text_body'] = "Body";
$_['text_branding_logo'] = "Branding logo";
$_['text_branding_text'] = "Branding text";
$_['text_branding_url'] = "Branding URL";
$_['text_bulk_edit_selected_uids'] = "Bulk edit selected uids"; $_['text_bulk_edit_selected_uids'] = "Bulk edit selected uids";
$_['text_bulk_restore_selected_emails'] = "Bulk restore selected emails"; $_['text_bulk_restore_selected_emails'] = "Bulk restore selected emails";
$_['text_bulk_update_selected_uids'] = "Bulk update selected uids"; $_['text_bulk_update_selected_uids'] = "Bulk update selected uids";
@ -38,6 +41,7 @@ $_['text_cancel'] = "Cancel";
$_['text_change_user_settings'] = "change user settings"; $_['text_change_user_settings'] = "change user settings";
$_['text_clienthost'] = "Client host"; $_['text_clienthost'] = "Client host";
$_['text_close'] = "Close"; $_['text_close'] = "Close";
$_['text_colour'] = "Colour";
$_['text_compressed'] = "compressed"; $_['text_compressed'] = "compressed";
$_['text_confirm_to_reset_counters'] = "Confirm to reset counters"; $_['text_confirm_to_reset_counters'] = "Confirm to reset counters";
$_['text_connection_failed'] = "Connection failed"; $_['text_connection_failed'] = "Connection failed";
@ -49,6 +53,7 @@ $_['text_copied'] = "Copied";
$_['text_counters'] = "Counters"; $_['text_counters'] = "Counters";
$_['text_cpu_load'] = "CPU load"; $_['text_cpu_load'] = "CPU load";
$_['text_cpu_usage'] = "CPU usage"; $_['text_cpu_usage'] = "CPU usage";
$_['text_customers'] = "Customers";
$_['text_daily_quarantine_report'] = "Daily quarantine report"; $_['text_daily_quarantine_report'] = "Daily quarantine report";
$_['text_daily_quarantine_report_status'] = "Daily quarantine report status"; $_['text_daily_quarantine_report_status'] = "Daily quarantine report status";
@ -84,6 +89,7 @@ $_['text_download_message'] = "Download message (EML)";
$_['text_download_message2'] = "download message"; $_['text_download_message2'] = "download message";
$_['text_edit'] = "Edit"; $_['text_edit'] = "Edit";
$_['text_edit_entry'] = "Edit entry";
$_['text_edit_group'] = "Edit group"; $_['text_edit_group'] = "Edit group";
$_['text_edit_user'] = "Edit user"; $_['text_edit_user'] = "Edit user";
$_['text_edit_or_view'] = "Edit/view"; $_['text_edit_or_view'] = "Edit/view";
@ -163,6 +169,7 @@ $_['text_last'] = "Last";
$_['text_last_update'] = "Last update"; $_['text_last_update'] = "Last update";
$_['text_latest_emails'] = "Latest emails"; $_['text_latest_emails'] = "Latest emails";
$_['text_ldap'] = "LDAP"; $_['text_ldap'] = "LDAP";
$_['text_ldap_auditor_member_dn'] = "Auditor member DN";
$_['text_ldap_base_dn'] = "LDAP base DN"; $_['text_ldap_base_dn'] = "LDAP base DN";
$_['text_ldap_bind_dn'] = "LDAP bind DN"; $_['text_ldap_bind_dn'] = "LDAP bind DN";
$_['text_ldap_bind_pw'] = "LDAP bind password"; $_['text_ldap_bind_pw'] = "LDAP bind password";
@ -304,6 +311,7 @@ $_['text_successfully_modified'] = "Successfully modified";
$_['text_successfully_removed'] = "Successfully removed"; $_['text_successfully_removed'] = "Successfully removed";
$_['text_successfully_trained'] = "Successfully trained"; $_['text_successfully_trained'] = "Successfully trained";
$_['text_successfully_updated'] = "Successfully modified"; $_['text_successfully_updated'] = "Successfully modified";
$_['text_support_link'] = "Support link";
$_['text_swap_usage'] = "Swap usage"; $_['text_swap_usage'] = "Swap usage";
$_['text_tag_selected_messages'] = "Tag selected messages"; $_['text_tag_selected_messages'] = "Tag selected messages";
@ -346,6 +354,7 @@ $_['text_users_quarantine'] = "User's quarantine";
$_['text_view_formatted_email'] = "View formatted email"; $_['text_view_formatted_email'] = "View formatted email";
$_['text_view_header'] = "view header"; $_['text_view_header'] = "view header";
$_['text_view_headers'] = "View headers"; $_['text_view_headers'] = "View headers";
$_['text_view_journal'] = "journal";
$_['text_view_journal_envelope'] = "View envelope"; $_['text_view_journal_envelope'] = "View envelope";
$_['text_view_message'] = "View message"; $_['text_view_message'] = "View message";
$_['text_view_message2'] = "view message"; $_['text_view_message2'] = "view message";

View File

@ -29,6 +29,9 @@ $_['text_attachment_type'] = "Mell
$_['text_audit'] = "Audit"; $_['text_audit'] = "Audit";
$_['text_back'] = "Vissza"; $_['text_back'] = "Vissza";
$_['text_branding_logo'] = "Brand logo";
$_['text_branding_text'] = "Brand szöveg";
$_['text_branding_url'] = "Brand URL";
$_['text_body'] = "Szöveg"; $_['text_body'] = "Szöveg";
$_['text_bulk_edit_selected_uids'] = "Kiválasztott azonosítók szerkesztése"; $_['text_bulk_edit_selected_uids'] = "Kiválasztott azonosítók szerkesztése";
$_['text_bulk_restore_selected_emails'] = "Kiválasztott levelek visszaállítása"; $_['text_bulk_restore_selected_emails'] = "Kiválasztott levelek visszaállítása";
@ -38,6 +41,7 @@ $_['text_cancel'] = "M
$_['text_change_user_settings'] = "beállítások mentése"; $_['text_change_user_settings'] = "beállítások mentése";
$_['text_clienthost'] = "Kliens gép"; $_['text_clienthost'] = "Kliens gép";
$_['text_close'] = "Bezár"; $_['text_close'] = "Bezár";
$_['text_colour'] = "Szín";
$_['text_compressed'] = "tömörített"; $_['text_compressed'] = "tömörített";
$_['text_confirm_to_reset_counters'] = "Számlálók nullázásának megerősítése"; $_['text_confirm_to_reset_counters'] = "Számlálók nullázásának megerősítése";
$_['text_connection_failed'] = "Sikertelen kapcsolat"; $_['text_connection_failed'] = "Sikertelen kapcsolat";
@ -49,6 +53,7 @@ $_['text_copied'] = "
$_['text_counters'] = "Számlálók"; $_['text_counters'] = "Számlálók";
$_['text_cpu_load'] = "CPU terhelés"; $_['text_cpu_load'] = "CPU terhelés";
$_['text_cpu_usage'] = "CPU használat"; $_['text_cpu_usage'] = "CPU használat";
$_['text_customers'] = "Ügyfelek";
$_['text_daily_quarantine_report'] = "Napi karantén riport"; $_['text_daily_quarantine_report'] = "Napi karantén riport";
$_['text_daily_quarantine_report_status'] = "Napi karantén értesítés"; $_['text_daily_quarantine_report_status'] = "Napi karantén értesítés";
@ -84,6 +89,7 @@ $_['text_download_message'] = "Lev
$_['text_download_message2'] = "levél letöltése"; $_['text_download_message2'] = "levél letöltése";
$_['text_edit'] = "Szerkeszt"; $_['text_edit'] = "Szerkeszt";
$_['text_edit_entry'] = "Bejegyzés szerkesztése";
$_['text_edit_group'] = "Csoport szerkesztése"; $_['text_edit_group'] = "Csoport szerkesztése";
$_['text_edit_user'] = "Felhasználó szerkesztése"; $_['text_edit_user'] = "Felhasználó szerkesztése";
$_['text_edit_or_view'] = "Szerkeszt/Megnéz"; $_['text_edit_or_view'] = "Szerkeszt/Megnéz";
@ -164,6 +170,7 @@ $_['text_last'] = "Utols
$_['text_latest_emails'] = "Legfrissebb emailek"; $_['text_latest_emails'] = "Legfrissebb emailek";
$_['text_last_update'] = "Utolsó frissítés"; $_['text_last_update'] = "Utolsó frissítés";
$_['text_ldap'] = "LDAP"; $_['text_ldap'] = "LDAP";
$_['text_ldap_auditor_member_dn'] = "Auditor DN";
$_['text_ldap_base_dn'] = "LDAP alapértelmezett DN"; $_['text_ldap_base_dn'] = "LDAP alapértelmezett DN";
$_['text_ldap_bind_dn'] = "LDAP csatlakozási DN"; $_['text_ldap_bind_dn'] = "LDAP csatlakozási DN";
$_['text_ldap_bind_pw'] = "LDAP csatlakozási jelszó"; $_['text_ldap_bind_pw'] = "LDAP csatlakozási jelszó";
@ -305,6 +312,7 @@ $_['text_successfully_modified'] = "Sikeresen m
$_['text_successfully_removed'] = "Sikeresen eltávolítva"; $_['text_successfully_removed'] = "Sikeresen eltávolítva";
$_['text_successfully_trained'] = "Sikeresen tanítva"; $_['text_successfully_trained'] = "Sikeresen tanítva";
$_['text_successfully_updated'] = "Sikeresen módosítva"; $_['text_successfully_updated'] = "Sikeresen módosítva";
$_['text_support_link'] = "Támogatás link";
$_['text_swap_usage'] = "Swap használat"; $_['text_swap_usage'] = "Swap használat";
$_['text_tag_selected_messages'] = "Kijelölt üzenetek címkézése"; $_['text_tag_selected_messages'] = "Kijelölt üzenetek címkézése";
@ -347,6 +355,7 @@ $_['text_users_quarantine'] = "Felhaszn
$_['text_view_formatted_email'] = "Formázott levél megtekintése"; $_['text_view_formatted_email'] = "Formázott levél megtekintése";
$_['text_view_header'] = "fejléc megtekintése"; $_['text_view_header'] = "fejléc megtekintése";
$_['text_view_headers'] = "Levél fejléce"; $_['text_view_headers'] = "Levél fejléce";
$_['text_view_journal'] = "journal";
$_['text_view_journal_envelope'] = "Journal envelope"; $_['text_view_journal_envelope'] = "Journal envelope";
$_['text_view_message'] = "Levél megtekintése"; $_['text_view_message'] = "Levél megtekintése";
$_['text_view_message2'] = "levél megtekintése"; $_['text_view_message2'] = "levél megtekintése";

View File

@ -29,6 +29,9 @@ $_['text_attachment_type'] = "Melléklet típus";
$_['text_audit'] = "Audit"; $_['text_audit'] = "Audit";
$_['text_back'] = "Vissza"; $_['text_back'] = "Vissza";
$_['text_branding_logo'] = "Brand logo";
$_['text_branding_text'] = "Brand szöveg";
$_['text_branding_url'] = "Brand URL";
$_['text_body'] = "Szöveg"; $_['text_body'] = "Szöveg";
$_['text_bulk_edit_selected_uids'] = "Kiválasztott azonosítók szerkesztése"; $_['text_bulk_edit_selected_uids'] = "Kiválasztott azonosítók szerkesztése";
$_['text_bulk_restore_selected_emails'] = "Kiválasztott levelek visszaállítása"; $_['text_bulk_restore_selected_emails'] = "Kiválasztott levelek visszaállítása";
@ -38,6 +41,7 @@ $_['text_cancel'] = "Mégse";
$_['text_change_user_settings'] = "beállítások mentése"; $_['text_change_user_settings'] = "beállítások mentése";
$_['text_clienthost'] = "Kliens gép"; $_['text_clienthost'] = "Kliens gép";
$_['text_close'] = "Bezár"; $_['text_close'] = "Bezár";
$_['text_colour'] = "Szín";
$_['text_compressed'] = "tömörített"; $_['text_compressed'] = "tömörített";
$_['text_confirm_to_reset_counters'] = "Számlálók nullázásának megerősítése"; $_['text_confirm_to_reset_counters'] = "Számlálók nullázásának megerősítése";
$_['text_connection_failed'] = "Sikertelen kapcsolat"; $_['text_connection_failed'] = "Sikertelen kapcsolat";
@ -49,6 +53,7 @@ $_['text_copied'] = "Átmásolva";
$_['text_counters'] = "Számlálók"; $_['text_counters'] = "Számlálók";
$_['text_cpu_load'] = "CPU terhelés"; $_['text_cpu_load'] = "CPU terhelés";
$_['text_cpu_usage'] = "CPU használat"; $_['text_cpu_usage'] = "CPU használat";
$_['text_customers'] = "Ügyfelek";
$_['text_daily_quarantine_report'] = "Napi karantén riport"; $_['text_daily_quarantine_report'] = "Napi karantén riport";
$_['text_daily_quarantine_report_status'] = "Napi karantén értesítés"; $_['text_daily_quarantine_report_status'] = "Napi karantén értesítés";
@ -84,6 +89,7 @@ $_['text_download_message'] = "Levél letöltése (EML)";
$_['text_download_message2'] = "levél letöltése"; $_['text_download_message2'] = "levél letöltése";
$_['text_edit'] = "Szerkeszt"; $_['text_edit'] = "Szerkeszt";
$_['text_edit_entry'] = "Bejegyzés szerkesztése";
$_['text_edit_group'] = "Csoport szerkesztése"; $_['text_edit_group'] = "Csoport szerkesztése";
$_['text_edit_user'] = "Felhasználó szerkesztése"; $_['text_edit_user'] = "Felhasználó szerkesztése";
$_['text_edit_or_view'] = "Szerkeszt/Megnéz"; $_['text_edit_or_view'] = "Szerkeszt/Megnéz";
@ -164,6 +170,7 @@ $_['text_last'] = "Utolsó";
$_['text_latest_emails'] = "Legfrissebb emailek"; $_['text_latest_emails'] = "Legfrissebb emailek";
$_['text_last_update'] = "Utolsó frissítés"; $_['text_last_update'] = "Utolsó frissítés";
$_['text_ldap'] = "LDAP"; $_['text_ldap'] = "LDAP";
$_['text_ldap_auditor_member_dn'] = "Auditor DN";
$_['text_ldap_base_dn'] = "LDAP alapértelmezett DN"; $_['text_ldap_base_dn'] = "LDAP alapértelmezett DN";
$_['text_ldap_bind_dn'] = "LDAP csatlakozási DN"; $_['text_ldap_bind_dn'] = "LDAP csatlakozási DN";
$_['text_ldap_bind_pw'] = "LDAP csatlakozási jelszó"; $_['text_ldap_bind_pw'] = "LDAP csatlakozási jelszó";
@ -305,6 +312,7 @@ $_['text_successfully_modified'] = "Sikeresen módosítva";
$_['text_successfully_removed'] = "Sikeresen eltávolítva"; $_['text_successfully_removed'] = "Sikeresen eltávolítva";
$_['text_successfully_trained'] = "Sikeresen tanítva"; $_['text_successfully_trained'] = "Sikeresen tanítva";
$_['text_successfully_updated'] = "Sikeresen módosítva"; $_['text_successfully_updated'] = "Sikeresen módosítva";
$_['text_support_link'] = "Támogatás link";
$_['text_swap_usage'] = "Swap használat"; $_['text_swap_usage'] = "Swap használat";
$_['text_tag_selected_messages'] = "Kijelölt üzenetek címkézése"; $_['text_tag_selected_messages'] = "Kijelölt üzenetek címkézése";
@ -347,6 +355,7 @@ $_['text_users_quarantine'] = "Felhasználók karanténja";
$_['text_view_formatted_email'] = "Formázott levél megtekintése"; $_['text_view_formatted_email'] = "Formázott levél megtekintése";
$_['text_view_header'] = "fejléc megtekintése"; $_['text_view_header'] = "fejléc megtekintése";
$_['text_view_headers'] = "Levél fejléce"; $_['text_view_headers'] = "Levél fejléce";
$_['text_view_journal'] = "journal";
$_['text_view_journal_envelope'] = "Journal envelope"; $_['text_view_journal_envelope'] = "Journal envelope";
$_['text_view_message'] = "Levél megtekintése"; $_['text_view_message'] = "Levél megtekintése";
$_['text_view_message2'] = "levél megtekintése"; $_['text_view_message2'] = "levél megtekintése";

View File

@ -28,6 +28,9 @@ $_['text_attachment_type'] = "Tipo de anexo";
$_['text_audit'] = "Auditoria"; $_['text_audit'] = "Auditoria";
$_['text_back'] = "Voltar"; $_['text_back'] = "Voltar";
$_['text_branding_logo'] = "Branding logo";
$_['text_branding_text'] = "Branding text";
$_['text_branding_url'] = "Branding URL";
$_['text_body'] = "Mensagem"; $_['text_body'] = "Mensagem";
$_['text_bulk_edit_selected_uids'] = "Seleção de UIDs"; $_['text_bulk_edit_selected_uids'] = "Seleção de UIDs";
$_['text_bulk_restore_selected_emails'] = "Reenviar emails selecionados"; $_['text_bulk_restore_selected_emails'] = "Reenviar emails selecionados";
@ -37,6 +40,7 @@ $_['text_cancel'] = "Cancelar";
$_['text_change_user_settings'] = "alterar configuração de usuário"; $_['text_change_user_settings'] = "alterar configuração de usuário";
$_['text_clienthost'] = "Client host"; $_['text_clienthost'] = "Client host";
$_['text_close'] = "Fechar"; $_['text_close'] = "Fechar";
$_['text_colour'] = "Colour";
$_['text_compressed'] = "comprimido"; $_['text_compressed'] = "comprimido";
$_['text_confirm_to_reset_counters'] = "Confirme para resetar os contadores"; $_['text_confirm_to_reset_counters'] = "Confirme para resetar os contadores";
$_['text_contact_support'] = "Contact support"; $_['text_contact_support'] = "Contact support";
@ -46,6 +50,7 @@ $_['text_copied'] = "Copiado";
$_['text_counters'] = "Contadores:"; $_['text_counters'] = "Contadores:";
$_['text_cpu_load'] = "CPU, carga de"; $_['text_cpu_load'] = "CPU, carga de";
$_['text_cpu_usage'] = "CPU, uso de"; $_['text_cpu_usage'] = "CPU, uso de";
$_['text_customers'] = "Customers";
$_['text_daily_quarantine_report'] = "Relatório diário de quarentena"; $_['text_daily_quarantine_report'] = "Relatório diário de quarentena";
$_['text_daily_quarantine_report_status'] = "Status do relatório diário de quarentena"; $_['text_daily_quarantine_report_status'] = "Status do relatório diário de quarentena";
@ -81,6 +86,7 @@ $_['text_download_message'] = "Download mensagem (EML)";
$_['text_download_message2'] = "download mensagem"; $_['text_download_message2'] = "download mensagem";
$_['text_edit'] = "Editar"; $_['text_edit'] = "Editar";
$_['text_edit_entry'] = "Editar entry";
$_['text_edit_group'] = "Editar grupo"; $_['text_edit_group'] = "Editar grupo";
$_['text_edit_user'] = "Editar usuário"; $_['text_edit_user'] = "Editar usuário";
$_['text_edit_or_view'] = "Editar / Visualizar"; $_['text_edit_or_view'] = "Editar / Visualizar";
@ -154,10 +160,12 @@ $_['text_invalid_policy_setting'] = "Configuração de política inválida";
$_['text_invalid_uid'] = "UID invalido"; $_['text_invalid_uid'] = "UID invalido";
$_['text_invalid_username'] = "Nome de usuário inválido"; $_['text_invalid_username'] = "Nome de usuário inválido";
$_['text_ipaddr'] = "Endereço IP"; $_['text_ipaddr'] = "Endereço IP";
$_['text_language'] = "Idioma"; $_['text_language'] = "Idioma";
$_['text_last'] = "Último"; $_['text_last'] = "Último";
$_['text_last_update'] = "Última atualização"; $_['text_last_update'] = "Última atualização";
$_['text_latest_emails'] = "Emails mais recentes"; $_['text_latest_emails'] = "Emails mais recentes";
$_['text_ldap_auditor_member_dn'] = "Auditor member DN";
$_['text_ldap_basedn'] = "LDAP base DN"; $_['text_ldap_basedn'] = "LDAP base DN";
$_['text_ldap_binddn'] = "LDAP bind DN"; $_['text_ldap_binddn'] = "LDAP bind DN";
$_['text_ldap_bindpw'] = "LDAP bind password"; $_['text_ldap_bindpw'] = "LDAP bind password";
@ -299,6 +307,7 @@ $_['text_successfully_modified'] = "Alterado com sucesso";
$_['text_successfully_removed'] = "Removido com sucesso"; $_['text_successfully_removed'] = "Removido com sucesso";
$_['text_successfully_trained'] = "Treinado com sucesso"; $_['text_successfully_trained'] = "Treinado com sucesso";
$_['text_successfully_updated'] = "Atualizado com sucesso"; $_['text_successfully_updated'] = "Atualizado com sucesso";
$_['text_support_link'] = "Support link";
$_['text_swap_usage'] = "Swap, uso de:"; $_['text_swap_usage'] = "Swap, uso de:";
$_['text_tag_selected_messages'] = "Marcar(Tag) resultados de pesquisa"; $_['text_tag_selected_messages'] = "Marcar(Tag) resultados de pesquisa";
@ -340,6 +349,7 @@ $_['text_users_quarantine'] = "Quarentena de usuário";
$_['text_view_formatted_email'] = "Visualizar email formatado"; $_['text_view_formatted_email'] = "Visualizar email formatado";
$_['text_view_header'] = "Visualizar cabeçalho"; $_['text_view_header'] = "Visualizar cabeçalho";
$_['text_view_headers'] = "Visualizar cabeçalho"; $_['text_view_headers'] = "Visualizar cabeçalho";
$_['text_view_journal'] = "envelope";
$_['text_view_journal_envelope'] = "Visualizar envelope"; $_['text_view_journal_envelope'] = "Visualizar envelope";
$_['text_view_message'] = "Visualizar mensagem"; $_['text_view_message'] = "Visualizar mensagem";
$_['text_view_message2'] = "visualizar mensagem"; $_['text_view_message2'] = "visualizar mensagem";

View File

@ -26,6 +26,21 @@ class ModelDomainDomain extends Model {
} }
public function get_mapped_domains() {
$data = array();
$query = $this->db->query("SELECT DISTINCT mapped FROM " . TABLE_DOMAIN . " ORDER BY mapped ASC");
if(isset($query->rows)) {
foreach($query->rows as $q) {
array_push($data, $q['mapped']);
}
}
return $data;
}
public function get_domains_by_string($s = '', $page = 0, $page_len = PAGE_LEN) { public function get_domains_by_string($s = '', $page = 0, $page_len = PAGE_LEN) {
$from = (int)$page * (int)$page_len; $from = (int)$page * (int)$page_len;

View File

@ -3,6 +3,76 @@
class ModelSaasCustomer extends Model class ModelSaasCustomer extends Model
{ {
public function get($id = -1) {
if($id > 0) {
$query = $this->db->query("SELECT * FROM " . TABLE_CUSTOMER_SETTINGS . " WHERE id=?", array($id));
if($query->num_rows > 0) { return $query->row; }
}
$query = $this->db->query("SELECT * FROM " . TABLE_CUSTOMER_SETTINGS . " ORDER BY domain ASC");
if($query->num_rows > 0) { return $query->rows; }
return array();
}
public function delete($id = 0, $description = '') {
if($id == 0) { return 0; }
$query = $this->db->query("DELETE FROM " . TABLE_CUSTOMER_SETTINGS . " WHERE id=?", array($id));
$rc = $this->db->countAffected();
LOGGER("remove ldap entry: #$id, $description (rc=$rc)");
return $rc;
}
public function add($arr = array()) {
$branding_logo = '';
if(!isset($arr['domain']) || !isset($arr['branding_text'])) { return 0; }
if(isset($_FILES['branding_logo']['name'])) {
$branding_logo = $_FILES['branding_logo']['name'];
move_uploaded_file($_FILES['branding_logo']['tmp_name'], DIR_BASE . "/images/" . $_FILES['branding_logo']['name']);
}
$query = $this->db->query("INSERT INTO " . TABLE_CUSTOMER_SETTINGS . " (domain, branding_text, branding_url, branding_logo, support_link, colour) VALUES (?,?,?,?,?,?)", array($arr['domain'], $arr['branding_text'], $arr['branding_url'], $branding_logo, $arr['support_link'], $arr['colour']));
$rc = $this->db->countAffected();
LOGGER("add ldap entry: " . $arr['domain'] . " / " . $arr['branding_text'] . " / " . $arr['branding_url'] . " / " . $arr['support_link'] . " (rc=$rc)");
if($rc == 1){ return 1; }
return 0;
}
public function update($arr = array()) {
$branding_logo = '';
if(!isset($arr['id']) || !isset($arr['domain']) || !isset($arr['branding_text'])) { return 0; }
if(isset($_FILES['branding_logo']['name'])) {
$branding_logo = $_FILES['branding_logo']['name'];
move_uploaded_file($_FILES['branding_logo']['tmp_name'], DIR_BASE . "/images/" . $_FILES['branding_logo']['name']);
$query = $this->db->query("UPDATE " . TABLE_CUSTOMER_SETTINGS . " SET domain=?, branding_text=?, branding_url=?, branding_logo=?, support_link=?, colour=? WHERE id=?", array($arr['domain'], $arr['branding_text'], $arr['branding_url'], $branding_logo, $arr['support_link'], $arr['colour'], $arr['id']));
}
else {
$query = $this->db->query("UPDATE " . TABLE_CUSTOMER_SETTINGS . " SET domain=?, branding_text=?, branding_url=?, support_link=?, colour=? WHERE id=?", array($arr['domain'], $arr['branding_text'], $arr['branding_url'], $arr['support_link'], $arr['colour'], $arr['id']));
}
return $this->db->countAffected();
}
public function get_customer_settings_by_email() { public function get_customer_settings_by_email() {
$data = array( $data = array(
'branding_text' => BRANDING_TEXT, 'branding_text' => BRANDING_TEXT,
@ -17,6 +87,13 @@ class ModelSaasCustomer extends Model
list ($user, $domain) = explode("@", $_SESSION['email']); list ($user, $domain) = explode("@", $_SESSION['email']);
if(MEMCACHED_ENABLED) {
$cache_key = sha1("customer_settings:" . $domain);
$memcache = Registry::get('memcache');
$m = $memcache->get($cache_key);
if(isset($m['data'])) { return unserialize($m['data']); }
}
$query = $this->db->query("SELECT * FROM " . TABLE_CUSTOMER_SETTINGS . " WHERE domain=(SELECT mapped FROM " . TABLE_DOMAIN . " WHERE domain=?)", array($domain)); $query = $this->db->query("SELECT * FROM " . TABLE_CUSTOMER_SETTINGS . " WHERE domain=(SELECT mapped FROM " . TABLE_DOMAIN . " WHERE domain=?)", array($domain));
if($query->num_rows > 0) { if($query->num_rows > 0) {
@ -27,6 +104,10 @@ class ModelSaasCustomer extends Model
if($query->row['colour']) { $data['colour'] = $query->row['colour']; } if($query->row['colour']) { $data['colour'] = $query->row['colour']; }
} }
if(MEMCACHED_ENABLED && $cache_key) {
$memcache->add($cache_key, array('data' => serialize($data)), 0, MEMCACHED_TTL);
}
return $data; return $data;
} }

View File

@ -3,9 +3,14 @@
class ModelSaasLdap extends Model class ModelSaasLdap extends Model
{ {
public function get() { public function get($id = -1) {
$query = $this->db->query("SELECT id, description, ldap_type, ldap_host, ldap_base_dn, ldap_bind_dn FROM " . TABLE_LDAP . " ORDER BY description ASC"); if($id >= 0) {
$query = $this->db->query("SELECT id, description, ldap_type, ldap_host, ldap_base_dn, ldap_bind_dn, ldap_bind_pw, ldap_auditor_member_dn FROM " . TABLE_LDAP . " WHERE id=?", array($id));
if($query->num_rows > 0) { return $query->row; }
}
$query = $this->db->query("SELECT id, description, ldap_type, ldap_host, ldap_base_dn, ldap_bind_dn, ldap_auditor_member_dn FROM " . TABLE_LDAP . " ORDER BY description ASC");
if($query->num_rows > 0) { return $query->rows; } if($query->num_rows > 0) { return $query->rows; }
@ -29,7 +34,7 @@ class ModelSaasLdap extends Model
public function add($arr = array()) { public function add($arr = array()) {
if(!isset($arr['description']) || !isset($arr['ldap_host'])) { return 0; } if(!isset($arr['description']) || !isset($arr['ldap_host'])) { return 0; }
$query = $this->db->query("INSERT INTO " . TABLE_LDAP . " (description, ldap_host, ldap_base_dn, ldap_bind_dn, ldap_bind_pw, ldap_type) VALUES (?,?,?,?,?,?)", array($arr['description'], $arr['ldap_host'], $arr['ldap_base_dn'], $arr['ldap_bind_dn'], $arr['ldap_bind_pw'], $arr['ldap_type'])); $query = $this->db->query("INSERT INTO " . TABLE_LDAP . " (description, ldap_host, ldap_base_dn, ldap_bind_dn, ldap_bind_pw, ldap_type, ldap_auditor_member_dn) VALUES (?,?,?,?,?,?,?)", array($arr['description'], $arr['ldap_host'], $arr['ldap_base_dn'], $arr['ldap_bind_dn'], $arr['ldap_bind_pw'], $arr['ldap_type'], $arr['ldap_auditor_member_dn']));
$rc = $this->db->countAffected(); $rc = $this->db->countAffected();
@ -41,6 +46,15 @@ class ModelSaasLdap extends Model
} }
public function update($arr = array()) {
if(!isset($arr['id']) || !isset($arr['description']) || !isset($arr['ldap_host'])) { return 0; }
$query = $this->db->query("UPDATE " . TABLE_LDAP . " SET description=?, ldap_host=?, ldap_base_dn=?, ldap_bind_dn=?, ldap_bind_pw=?, ldap_type=?, ldap_auditor_member_dn=? WHERE id=?", array($arr['description'], $arr['ldap_host'], $arr['ldap_base_dn'], $arr['ldap_bind_dn'], $arr['ldap_bind_pw'], $arr['ldap_type'], $arr['ldap_auditor_member_dn'], $arr['id']));
return $this->db->countAffected();
}
public function get_ldap_params_by_email($email = '') { public function get_ldap_params_by_email($email = '') {
$domain = ''; $domain = '';
@ -48,9 +62,9 @@ class ModelSaasLdap extends Model
list($l,$d) = explode("@", $email); list($l,$d) = explode("@", $email);
$query = $this->db->query("SELECT ldap_type, ldap_host, ldap_base_dn, ldap_bind_dn, ldap_bind_pw from " . TABLE_DOMAIN . " as d, " . TABLE_LDAP . " as l where d.ldap_id=l.id and d.domain=?", array($d)); $query = $this->db->query("SELECT ldap_type, ldap_host, ldap_base_dn, ldap_bind_dn, ldap_bind_pw, ldap_auditor_member_dn FROM " . TABLE_DOMAIN . " as d, " . TABLE_LDAP . " as l where d.ldap_id=l.id and d.domain=?", array($d));
if($query->num_rows > 0) { return array($query->row['ldap_type'], $query->row['ldap_host'], $query->row['ldap_base_dn'], $query->row['ldap_bind_dn'], $query->row['ldap_bind_pw']); } if($query->num_rows > 0) { return array($query->row['ldap_type'], $query->row['ldap_host'], $query->row['ldap_base_dn'], $query->row['ldap_bind_dn'], $query->row['ldap_bind_pw'], $query->row['ldap_auditor_member_dn']); }
return array(); return array();
} }

View File

@ -67,16 +67,18 @@ class ModelUserAuth extends Model {
$ldap_base_dn = LDAP_BASE_DN; $ldap_base_dn = LDAP_BASE_DN;
$ldap_helper_dn = LDAP_HELPER_DN; $ldap_helper_dn = LDAP_HELPER_DN;
$ldap_helper_password = LDAP_HELPER_PASSWORD; $ldap_helper_password = LDAP_HELPER_PASSWORD;
$ldap_auditor_member_dn = LDAP_AUDITOR_MEMBER_DN;
if(ENABLE_SAAS == 1) { if(ENABLE_SAAS == 1) {
$a = $this->model_saas_ldap->get_ldap_params_by_email($username); $a = $this->model_saas_ldap->get_ldap_params_by_email($username);
if(count($a) >= 5) { if(count($a) >= 6) {
$ldap_type = $a[0]; $ldap_type = $a[0];
$ldap_host = $a[1]; $ldap_host = $a[1];
$ldap_base_dn = $a[2]; $ldap_base_dn = $a[2];
$ldap_helper_dn = $a[3]; $ldap_helper_dn = $a[3];
$ldap_helper_password = $a[4]; $ldap_helper_password = $a[4];
$ldap_auditor_member_dn = $a[5];
} }
} }
@ -101,7 +103,7 @@ class ModelUserAuth extends Model {
$query = $ldap->query($ldap_base_dn, "(|(&(objectClass=$ldap_account_objectclass)($ldap_mail_attr=$username))(&(objectClass=$ldap_distributionlist_objectclass)($ldap_distributionlist_attr=$username)" . ")(&(objectClass=$ldap_distributionlist_objectclass)($ldap_distributionlist_attr=" . stripslashes($a['dn']) . ")))", array("mail", "mailalternateaddress", "proxyaddresses", "zimbraMailForwardingAddress", "member", "memberOfGroup")); $query = $ldap->query($ldap_base_dn, "(|(&(objectClass=$ldap_account_objectclass)($ldap_mail_attr=$username))(&(objectClass=$ldap_distributionlist_objectclass)($ldap_distributionlist_attr=$username)" . ")(&(objectClass=$ldap_distributionlist_objectclass)($ldap_distributionlist_attr=" . stripslashes($a['dn']) . ")))", array("mail", "mailalternateaddress", "proxyaddresses", "zimbraMailForwardingAddress", "member", "memberOfGroup"));
$is_auditor = $this->check_ldap_membership($query->rows); $is_auditor = $this->check_ldap_membership($ldap_auditor_member_dn, $query->rows);
$emails = $this->get_email_array_from_ldap_attr($query->rows); $emails = $this->get_email_array_from_ldap_attr($query->rows);
@ -124,8 +126,8 @@ class ModelUserAuth extends Model {
} }
private function check_ldap_membership($e = array()) { private function check_ldap_membership($ldap_auditor_member_dn = '', $e = array()) {
if(LDAP_AUDITOR_MEMBER_DN == '') { return 0; } if($ldap_auditor_member_dn == '') { return 0; }
foreach($e as $a) { foreach($e as $a) {
foreach (array("memberof") as $memberattr) { foreach (array("memberof") as $memberattr) {
@ -133,13 +135,13 @@ class ModelUserAuth extends Model {
if(isset($a[$memberattr]['count'])) { if(isset($a[$memberattr]['count'])) {
for($i = 0; $i < $a[$memberattr]['count']; $i++) { for($i = 0; $i < $a[$memberattr]['count']; $i++) {
if($a[$memberattr][$i] == LDAP_AUDITOR_MEMBER_DN) { if($a[$memberattr][$i] == $ldap_auditor_member_dn) {
return 1; return 1;
} }
} }
} }
else { else {
if($a[$memberattr] == LDAP_AUDITOR_MEMBER_DN) { if($a[$memberattr] == $ldap_auditor_member_dn) {
return 1; return 1;
} }
} }

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="hu" lang="hu"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="hu" lang="hu">
<head> <head>
<title><?php print $title; ?> | <?php print SITE_NAME; ?> | <?php print PROVIDED_BY; ?></title> <title><?php print $title; ?> | <?php print SITE_NAME; ?> <?php if(PROVIDED_BY) { print PROVIDED_BY; } ?></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en" /> <meta http-equiv="Content-Language" content="en" />
<meta name="keywords" content="<?php print SITE_KEYWORDS; ?>" /> <meta name="keywords" content="<?php print SITE_KEYWORDS; ?>" />

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="hu" lang="hu"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="hu" lang="hu">
<head> <head>
<title><?php print $title; ?> | <?php print SITE_NAME; ?> | <?php print PROVIDED_BY; ?></title> <title><?php print $title; ?> | <?php print SITE_NAME; ?> <?php if(PROVIDED_BY) { print PROVIDED_BY; } ?></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en" /> <meta http-equiv="Content-Language" content="en" />
<meta name="keywords" content="<?php print SITE_KEYWORDS; ?>" /> <meta name="keywords" content="<?php print SITE_KEYWORDS; ?>" />

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="hu" lang="hu"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="hu" lang="hu">
<head> <head>
<title><?php print $title; ?> | <?php print SITE_NAME; ?> | <?php print PROVIDED_BY; ?></title> <title><?php print $title; ?> | <?php print SITE_NAME; ?> <?php if(PROVIDED_BY) { print PROVIDED_BY; } ?></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en" /> <meta http-equiv="Content-Language" content="en" />
<meta name="keywords" content="<?php print SITE_KEYWORDS; ?>" /> <meta name="keywords" content="<?php print SITE_KEYWORDS; ?>" />

View File

@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="hu" lang="hu"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="hu" lang="hu">
<head> <head>
<title><?php print $title; ?> | <?php print SITE_NAME; ?> | <?php print PROVIDED_BY; ?></title> <title><?php print $title; ?> | <?php print SITE_NAME; ?> <?php if(PROVIDED_BY) { print PROVIDED_BY; } ?></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en" /> <meta http-equiv="Content-Language" content="en" />
<meta name="keywords" content="<?php print SITE_KEYWORDS; ?>" /> <meta name="keywords" content="<?php print SITE_KEYWORDS; ?>" />

View File

@ -10,7 +10,7 @@
<span class="icon-bar"></span> <span class="icon-bar"></span>
</a> --> </a> -->
<a class="brand" href="<?php print $settings['branding_url']; ?>" title="<?php print $settings['branding_text']; ?>"><img src="<?php print $settings['branding_logo']; ?>" alt="<?php print $settings['branding_text']; ?>" /></a> <a class="brand" target="_blank" href="<?php print $settings['branding_url']; ?>" title="<?php print $settings['branding_text']; ?>"><?php if($settings['branding_logo']) { ?><img src="/images/<?php print $settings['branding_logo']; ?>" alt="<?php print $settings['branding_text']; ?>" /><?php } ?></a>
<!-- <div class="nav-collapse"> --> <!-- <div class="nav-collapse"> -->
@ -37,6 +37,7 @@
<li><a href="index.php?route=domain/domain"><i class="icon-globe"></i>&nbsp;<?php print $text_domain; ?></a></li> <li><a href="index.php?route=domain/domain"><i class="icon-globe"></i>&nbsp;<?php print $text_domain; ?></a></li>
<?php if(ENABLE_SAAS == 1) { ?> <?php if(ENABLE_SAAS == 1) { ?>
<li><a href="index.php?route=ldap/list"><i class="icon-key"></i>&nbsp;<?php print $text_ldap; ?></a></li> <li><a href="index.php?route=ldap/list"><i class="icon-key"></i>&nbsp;<?php print $text_ldap; ?></a></li>
<li><a href="index.php?route=customer/list"><i class="icon-wrench"></i>&nbsp;<?php print $text_customers; ?></a></li>
<?php } ?> <?php } ?>
<li><a href="index.php?route=policy/archiving"><i class="icon-folder-open"></i>&nbsp;<?php print $text_archiving_rules; ?></a></li> <li><a href="index.php?route=policy/archiving"><i class="icon-folder-open"></i>&nbsp;<?php print $text_archiving_rules; ?></a></li>
<li><a href="index.php?route=policy/retention"><i class="icon-time"></i>&nbsp;<?php print $text_retention_rules; ?></a></li> <li><a href="index.php?route=policy/retention"><i class="icon-time"></i>&nbsp;<?php print $text_retention_rules; ?></a></li>

View File

@ -0,0 +1,104 @@
<h4><?php if(isset($a['domain'])) { print $text_edit_entry; } else { print $text_add_new_entry; } ?></h4>
<?php if(isset($x)){ ?>
<div class="alert alert-info"><?php print $x; ?></div>
<?php } ?>
<form method="post" name="add1" action="index.php?route=customer/list" class="form-horizontal" enctype="multipart/form-data">
<?php if(isset($a['domain'])) { ?>
<input type="hidden" name="id" id="id" value="<?php print $id; ?>" />
<?php } ?>
<div class="control-group">
<label class="control-label" for="domain"><?php print $text_domain; ?>:</label>
<div class="controls">
<select name="domain" id="domain">
<?php foreach ($domains as $domain) { ?>
<option value="<?php print $domain; ?>"<?php if(isset($a['domain']) && $a['domain'] == $domain) { ?> selected="selected"<?php } ?>><?php print $domain; ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="control-group">
<label class="control-label" for="branding_text"><?php print $text_branding_text; ?>:</label>
<div class="controls">
<input type="text" class="text" name="branding_text" id="branding_text" placeholder="" value="<?php if(isset($a['branding_text'])) { print $a['branding_text']; } ?>" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="branding_url"><?php print $text_branding_url; ?>:</label>
<div class="controls">
<input type="text" class="text" name="branding_url" id="branding_url" placeholder="" value="<?php if(isset($a['branding_url'])) { print $a['branding_url']; } ?>" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="branding_logo"><?php print $text_branding_logo; ?>:</label>
<div class="controls">
<input type="file" class="text" name="branding_logo" id="branding_logo" placeholder="" /> <?php if(isset($a['branding_logo'])) { ?><img src="/images/<?php print $a['branding_logo']; ?>" /><?php } ?>
</div>
</div>
<div class="control-group">
<label class="control-label" for="support_link"><?php print $text_support_link; ?>:</label>
<div class="controls">
<input type="text" class="text" name="support_link" id="support_link" placeholder="" value="<?php if(isset($a['support_link'])) { print $a['support_link']; } ?>" />
</div>
</div>
<div class="control-group">
<label class="control-label" for="colour"><?php print $text_colour; ?>:</label>
<div class="controls">
<input type="text" class="text" name="colour" id="colour" placeholder="" value="<?php if(isset($a['colour'])) { print $a['colour']; } ?>" />
</div>
</div>
<div class="form-actions">
<input type="submit" value="<?php if(isset($a['domain'])) { print $text_modify; } else { print $text_add; } ?>" class="btn btn-primary" />
<input type="reset" value="<?php print $text_clear; ?>" class="btn" onclick="Piler.clear_ldap_test();" />
</div>
</form>
<?php if($id == -1) { ?>
<h4><?php print $text_existing_entries; ?></h4>
<div class="listarea">
<?php if(isset($entries)){ ?>
<table id="ss1" class="table table-striped table-condensed">
<tr>
<th class="domaincell"><?php print $text_domain; ?></th>
<th class="domaincell"><?php print $text_branding_text; ?></th>
<th class="domaincell"><?php print $text_branding_url; ?></th>
<th class="domaincell"><?php print $text_branding_logo; ?></th>
<th class="domaincell"><?php print $text_colour; ?></th>
<th class="domaincell">&nbsp;</th>
<th class="domaincell">&nbsp;</th>
</tr>
<?php foreach($entries as $e) { ?>
<tr>
<td class="domaincell"><?php print $e['domain']; ?></td>
<td class="domaincell"><?php print $e['branding_text']; ?></td>
<td class="domaincell"><?php print $e['branding_url']; ?></td>
<td class="domaincell"><?php if($e['branding_logo']) { ?><img src="/images/<?php print $e['branding_logo']; ?>" /><?php } ?></td>
<td class="domaincell"><?php print $e['colour']; ?></td>
<td class="domaincell"><a href="index.php?route=customer/list&amp;id=<?php print $e['id']; ?>"><?php print $text_edit; ?></a></td>
<td class="domaincell"><a href="index.php?route=customer/remove&amp;id=<?php print $e['id']; ?>&amp;domain=<?php print urlencode($e['domain']); ?>&amp;confirmed=1" onclick="if(confirm('<?php print $text_remove; ?>: ' + '\'<?php print $e['domain']; ?>\'')) return true; return false;"><?php print $text_remove; ?></a></td>
</tr>
<?php } ?>
</table>
<?php } else { ?>
<div class="alert alert-error lead">
<?php print $text_not_found; ?>
</div>
<?php } ?>
<?php } ?>
</div>

View File

@ -0,0 +1,11 @@
<p>
<?php if($confirmed){ ?>
<?php print $x; ?>. <a href="index.php?route=customer/list"><?php print $text_back; ?></a>
<?php } ?>
</p>

View File

@ -1,4 +1,4 @@
<h4><?php print $text_add_new_entry; ?></h4> <h4><?php if(isset($a['description'])) { print $text_edit_entry; } else { print $text_add_new_entry; } ?></h4>
<?php if(isset($x)){ ?> <?php if(isset($x)){ ?>
<div class="alert alert-info"><?php print $x; ?></div> <div class="alert alert-info"><?php print $x; ?></div>
@ -6,55 +6,66 @@
<form method="post" name="add1" action="index.php?route=ldap/list" class="form-horizontal"> <form method="post" name="add1" action="index.php?route=ldap/list" class="form-horizontal">
<?php if(isset($a['description'])) { ?>
<input type="hidden" name="id" id="id" value="<?php print $id; ?>" />
<?php } ?>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="ldap_type"><?php print $text_ldap_type; ?>:</label> <label class="control-label" for="ldap_type"><?php print $text_ldap_type; ?>:</label>
<div class="controls"> <div class="controls">
<select name="ldap_type" id="ldap_type"> <select name="ldap_type" id="ldap_type">
<option value="AD">AD</option> <?php while(list($k, $v) = each($ldap_types)) { ?>
<option value="iredmail">iredmail</option> <option value="<?php print $v; ?>"<?php if(isset($a['ldap_type']) && $a['ldap_type'] == $v) { ?> selected="selected"<?php } ?>><?php print $v; ?></option>
<option value="lotus">lotus</option> <?php } ?>
<option value="zimbra">zimbra</option>
</select> </select>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="description"><?php print $text_description; ?>:</label> <label class="control-label" for="description"><?php print $text_description; ?>:</label>
<div class="controls"> <div class="controls">
<input type="text" class="text" name="description" id="description" placeholder="" /> <input type="text" class="text" name="description" id="description" placeholder="" value="<?php if(isset($a['description'])) { print $a['description']; } ?>" />
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="ldap_host"><?php print $text_ldap_host; ?>:</label> <label class="control-label" for="ldap_host"><?php print $text_ldap_host; ?>:</label>
<div class="controls"> <div class="controls">
<input type="text" class="text" name="ldap_host" id="ldap_host" placeholder="" /> <input type="text" class="text" name="ldap_host" id="ldap_host" placeholder="" value="<?php if(isset($a['ldap_host'])) { print $a['ldap_host']; } ?>" />
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="ldap_base_dn"><?php print $text_ldap_base_dn; ?>:</label> <label class="control-label" for="ldap_base_dn"><?php print $text_ldap_base_dn; ?>:</label>
<div class="controls"> <div class="controls">
<input type="text" class="text" name="ldap_base_dn" id="ldap_base_dn" placeholder="" /> <input type="text" class="text" name="ldap_base_dn" id="ldap_base_dn" placeholder="" value="<?php if(isset($a['ldap_base_dn'])) { print $a['ldap_base_dn']; } ?>" />
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="ldap_bind_dn"><?php print $text_ldap_bind_dn; ?>:</label> <label class="control-label" for="ldap_bind_dn"><?php print $text_ldap_bind_dn; ?>:</label>
<div class="controls"> <div class="controls">
<input type="text" class="text" name="ldap_bind_dn" id="ldap_bind_dn" placeholder="" /> <input type="text" class="text" name="ldap_bind_dn" id="ldap_bind_dn" placeholder="" value="<?php if(isset($a['ldap_bind_dn'])) { print $a['ldap_bind_dn']; } ?>" />
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label" for="ldap_bind_pw"><?php print $text_ldap_bind_pw; ?>:</label> <label class="control-label" for="ldap_bind_pw"><?php print $text_ldap_bind_pw; ?>:</label>
<div class="controls"> <div class="controls">
<input type="password" class="password" name="ldap_bind_pw" id="ldap_bind_pw" placeholder="" /> <input type="button" value="<?php print $text_test_connection; ?>" class="btn btn-danger" onclick="Piler.test_ldap_connection(); return false;" /> <span id="LDAPTEST"></span> <input type="password" class="password" name="ldap_bind_pw" id="ldap_bind_pw" placeholder="" value="<?php if(isset($a['ldap_bind_pw'])) { print $a['ldap_bind_pw']; } ?>" /> <input type="button" value="<?php print $text_test_connection; ?>" class="btn btn-danger" onclick="Piler.test_ldap_connection(); return false;" /> <span id="LDAPTEST"></span>
</div>
</div>
<div class="control-group">
<label class="control-label" for="ldap_auditor_member_dn"><?php print $text_ldap_auditor_member_dn; ?>:</label>
<div class="controls">
<input type="text" class="text" name="ldap_auditor_member_dn" id="ldap_auditor_member_dn" placeholder="" value="<?php if(isset($a['ldap_auditor_member_dn'])) { print $a['ldap_auditor_member_dn']; } ?>" />
</div> </div>
</div> </div>
<div class="form-actions"> <div class="form-actions">
<input type="submit" value="<?php print $text_add; ?>" class="btn btn-primary" /> <input type="submit" value="<?php if(isset($a['description'])) { print $text_modify; } else { print $text_add; } ?>" class="btn btn-primary" />
<input type="reset" value="<?php print $text_clear; ?>" class="btn" onclick="Piler.clear_ldap_test();" /> <input type="reset" value="<?php print $text_clear; ?>" class="btn" onclick="Piler.clear_ldap_test();" />
</div> </div>
</form> </form>
<?php if($id == -1) { ?>
<h4><?php print $text_existing_entries; ?></h4> <h4><?php print $text_existing_entries; ?></h4>
<div class="listarea"> <div class="listarea">
@ -68,6 +79,8 @@
<th class="domaincell"><?php print $text_ldap_host; ?></th> <th class="domaincell"><?php print $text_ldap_host; ?></th>
<td class="domaincell"><?php print $text_ldap_base_dn; ?></td> <td class="domaincell"><?php print $text_ldap_base_dn; ?></td>
<td class="domaincell"><?php print $text_ldap_bind_dn; ?></td> <td class="domaincell"><?php print $text_ldap_bind_dn; ?></td>
<td class="domaincell"><?php print $text_ldap_auditor_member_dn; ?></td>
<th class="domaincell">&nbsp;</th>
<th class="domaincell">&nbsp;</th> <th class="domaincell">&nbsp;</th>
</tr> </tr>
@ -78,11 +91,13 @@
<td class="domaincell"><?php print $e['ldap_host']; ?></td> <td class="domaincell"><?php print $e['ldap_host']; ?></td>
<td class="domaincell"><?php print $e['ldap_base_dn']; ?></td> <td class="domaincell"><?php print $e['ldap_base_dn']; ?></td>
<td class="domaincell"><?php print $e['ldap_bind_dn']; ?></td> <td class="domaincell"><?php print $e['ldap_bind_dn']; ?></td>
<td class="domaincell"><?php print $e['ldap_auditor_member_dn']; ?></td>
<td class="domaincell"><a href="index.php?route=ldap/list&amp;id=<?php print $e['id']; ?>"><?php print $text_edit; ?></a></td>
<td class="domaincell"><a href="index.php?route=ldap/remove&amp;id=<?php print $e['id']; ?>&amp;description=<?php print urlencode($e['description']); ?>&amp;confirmed=1" onclick="if(confirm('<?php print $text_remove; ?>: ' + '\'<?php print $e['description']; ?>\'')) return true; return false;"><?php print $text_remove; ?></a></td> <td class="domaincell"><a href="index.php?route=ldap/remove&amp;id=<?php print $e['id']; ?>&amp;description=<?php print urlencode($e['description']); ?>&amp;confirmed=1" onclick="if(confirm('<?php print $text_remove; ?>: ' + '\'<?php print $e['description']; ?>\'')) return true; return false;"><?php print $text_remove; ?></a></td>
</tr> </tr>
<?php } ?> <?php } ?>
</div> </table>
<?php } else { ?> <?php } else { ?>
<div class="alert alert-error lead"> <div class="alert alert-error lead">
@ -90,5 +105,8 @@
</div> </div>
<?php } ?> <?php } ?>
<?php } ?>
</div> </div>

View File

@ -19,7 +19,7 @@
<?php } else { ?> <?php } else { ?>
<a class="messagelink" href="#" onclick="Piler.restore_message(<?php print $id; ?>);"><i class="icon-reply"></i>&nbsp;<?php print $text_restore_to_mailbox; ?></a> | <a class="messagelink" href="#" onclick="Piler.restore_message(<?php print $id; ?>);"><i class="icon-reply"></i>&nbsp;<?php print $text_restore_to_mailbox; ?></a> |
<?php } ?> <?php } ?>
<a class="messagelink" href="#" onclick="Piler.view_message(<?php print $id; ?>);"><i class="icon-envelope"></i>&nbsp;<?php print $text_view_message; ?></a> <a class="messagelink" href="#" onclick="Piler.view_message(<?php print $id; ?>);"><i class="icon-envelope-alt"></i>&nbsp;<?php print $text_view_message; ?></a>
<?php if($message['has_journal'] == 1 && Registry::get('auditor_user') == 1 && SHOW_ENVELOPE_JOURNAL == 1) { ?> <?php if($message['has_journal'] == 1 && Registry::get('auditor_user') == 1 && SHOW_ENVELOPE_JOURNAL == 1) { ?>
| <a class="messagelink" href="#" onclick="Piler.view_journal(<?php print $id; ?>);"><i class="icon-envelope-alt"></i>&nbsp;<?php print $text_view_journal_envelope; ?></a> | <a class="messagelink" href="#" onclick="Piler.view_journal(<?php print $id; ?>);"><i class="icon-envelope-alt"></i>&nbsp;<?php print $text_view_journal_envelope; ?></a>
<?php } ?> <?php } ?>

View File

@ -19,7 +19,7 @@
<?php } else { ?> <?php } else { ?>
<a class="messagelink" href="#" onclick="Piler.restore_message(<?php print $id; ?>);"><i class="icon-reply"></i>&nbsp;<?php print $text_restore_to_mailbox; ?></a> | <a class="messagelink" href="#" onclick="Piler.restore_message(<?php print $id; ?>);"><i class="icon-reply"></i>&nbsp;<?php print $text_restore_to_mailbox; ?></a> |
<?php } ?> <?php } ?>
<a class="messagelink" href="#" onclick="Piler.view_headers(<?php print $id; ?>);"><i class="icon-envelope"></i>&nbsp;<?php print $text_view_headers; ?></a> <a class="messagelink" href="#" onclick="Piler.view_headers(<?php print $id; ?>);"><i class="icon-envelope-alt"></i>&nbsp;<?php print $text_view_headers; ?></a>
<a class="messagelink" href="#" onclick="Piler.view_message(<?php print $id; ?>);"><i class="icon-envelope-alt"></i>&nbsp;<?php print $text_view_message; ?></a> <a class="messagelink" href="#" onclick="Piler.view_message(<?php print $id; ?>);"><i class="icon-envelope-alt"></i>&nbsp;<?php print $text_view_message; ?></a>
</p> </p>

View File

@ -1,7 +1,7 @@
<div class="messageheader"> <div class="messageheader">
<p> <p>
<a class="messagelink" href="index.php?route=message/download&amp;id=<?php print $id; ?>"><i class="icon-cloud-download"></i>&nbsp;<?php print $text_download_message; ?></a> | <a class="messagelink" href="index.php?route=message/download&amp;id=<?php print $id; ?>"><i class="icon-cloud-download"></i>&nbsp;<?php print $text_download_message; ?></a> |
<a class="messagelink" href="#" onclick="Piler.view_single_message(<?php print $id; ?>);"><i class="icon-envelope"></i>&nbsp;<?php print $text_view_message; ?></a> | <a class="messagelink" href="#" onclick="Piler.view_single_message(<?php print $id; ?>);"><i class="icon-envelope-alt"></i>&nbsp;<?php print $text_view_message; ?></a> |
<a class="messagelink" href="#" onclick="Piler.view_headers(<?php print $id; ?>);"><i class="icon-envelope-alt"></i>&nbsp;<?php print $text_view_headers; ?></a> <a class="messagelink" href="#" onclick="Piler.view_headers(<?php print $id; ?>);"><i class="icon-envelope-alt"></i>&nbsp;<?php print $text_view_headers; ?></a>
</p> </p>
</div> </div>

View File

@ -21,7 +21,7 @@
<?php } ?> <?php } ?>
<a class="messagelink" href="#" onclick="Piler.view_headers(<?php print $id; ?>);"><i class="icon-envelope-alt"></i>&nbsp;<?php print $text_view_headers; ?></a> <a class="messagelink" href="#" onclick="Piler.view_headers(<?php print $id; ?>);"><i class="icon-envelope-alt"></i>&nbsp;<?php print $text_view_headers; ?></a>
<?php if($message['has_journal'] == 1 && Registry::get('auditor_user') == 1 && SHOW_ENVELOPE_JOURNAL == 1) { ?> <?php if($message['has_journal'] == 1 && Registry::get('auditor_user') == 1 && SHOW_ENVELOPE_JOURNAL == 1) { ?>
| <a class="messagelink" href="#" onclick="Piler.view_journal(<?php print $id; ?>);"><i class="icon-envelope"></i>&nbsp;<?php print $text_view_journal_envelope; ?></a> | <a class="messagelink" href="#" onclick="Piler.view_journal(<?php print $id; ?>);"><i class="icon-envelope-alt"></i>&nbsp;<?php print $text_view_journal_envelope; ?></a>
<?php } ?> <?php } ?>
</p> </p>