mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-24 19:00:11 +01:00
fixed apache example config
This commit is contained in:
parent
3d007d2dae
commit
6dcf5fdad7
@ -1,9 +1,9 @@
|
||||
<VirtualHost *:80>
|
||||
ServerName HOSTNAME
|
||||
|
||||
DocumentRoot "/var/www/piler"
|
||||
DocumentRoot "/var/piler/www"
|
||||
|
||||
<Directory /var/www/piler>
|
||||
<Directory /var/piler/www>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
|
||||
|
@ -18,14 +18,11 @@
|
||||
|
||||
|
||||
int store_index_data(struct session_data *sdata, struct _state *state, struct __data *data, uint64 id, struct __config *cfg){
|
||||
int rc=ERR, folder_id=0;
|
||||
int rc=ERR;
|
||||
char *subj;
|
||||
|
||||
if(data->folder > 0){
|
||||
folder_id = data->folder;
|
||||
}
|
||||
else {
|
||||
folder_id = get_folder_id_by_rule(data, state, sdata->tot_len, sdata->spam_message, cfg);
|
||||
if(data->folder == 0){
|
||||
data->folder = get_folder_id_by_rule(data, state, sdata->tot_len, sdata->spam_message, cfg);
|
||||
}
|
||||
|
||||
subj = state->b_subject;
|
||||
@ -54,7 +51,7 @@ int store_index_data(struct session_data *sdata, struct _state *state, struct __
|
||||
data->sql[data->pos] = (char *)&sdata->sent; data->type[data->pos] = TYPE_LONG; data->pos++;
|
||||
data->sql[data->pos] = (char *)&sdata->tot_len; data->type[data->pos] = TYPE_LONG; data->pos++;
|
||||
data->sql[data->pos] = (char *)&sdata->direction; data->type[data->pos] = TYPE_LONG; data->pos++;
|
||||
data->sql[data->pos] = (char *)&folder_id; data->type[data->pos] = TYPE_LONG; data->pos++;
|
||||
data->sql[data->pos] = (char *)&data->folder; data->type[data->pos] = TYPE_LONG; data->pos++;
|
||||
data->sql[data->pos] = (char *)&state->n_attachments; data->type[data->pos] = TYPE_LONG; data->pos++;
|
||||
data->sql[data->pos] = sdata->attachments; data->type[data->pos] = TYPE_STRING; data->pos++;
|
||||
|
||||
|
@ -155,6 +155,8 @@ int handle_smtp_session(int new_sd, struct __data *data, struct __config *cfg){
|
||||
|
||||
gettimeofday(&tv1, &tz);
|
||||
|
||||
data->folder = 0;
|
||||
|
||||
sstate = parse_message(&sdata, 1, data, cfg);
|
||||
post_parse(&sdata, &sstate, cfg);
|
||||
|
||||
@ -281,7 +283,7 @@ int handle_smtp_session(int new_sd, struct __data *data, struct __config *cfg){
|
||||
(sdata.__acquire+sdata.__parsed+sdata.__av+sdata.__compress+sdata.__encrypt+sdata.__store)/1000000.0,
|
||||
sdata.__acquire/1000000.0, sdata.__parsed/1000000.0, sdata.__av/1000000.0, sdata.__compress/1000000.0, sdata.__encrypt/1000000.0, sdata.__store/1000000.0);
|
||||
|
||||
syslog(LOG_PRIORITY, "%s: from=%s, size=%d/%d, attachments=%d, reference=%s, message-id=%s, retention=%d, folder=%d, %s, status=%s", sdata.ttmpfile, sdata.fromemail, sdata.tot_len, sdata.stored_len, sstate.n_attachments, sstate.reference, sstate.message_id, sstate.retention, sdata.folder_id, delay, status);
|
||||
syslog(LOG_PRIORITY, "%s: from=%s, size=%d/%d, attachments=%d, reference=%s, message-id=%s, retention=%d, folder=%d, %s, status=%s", sdata.ttmpfile, sdata.fromemail, sdata.tot_len, sdata.stored_len, sstate.n_attachments, sstate.reference, sstate.message_id, sstate.retention, data->folder, delay, status);
|
||||
|
||||
|
||||
|
||||
|
@ -359,6 +359,7 @@ define('TABLE_COUNTER_MSG', 'counter_messages');
|
||||
define('TABLE_STAT_COUNTER', 'counter_stats');
|
||||
define('TABLE_AUDIT', 'audit');
|
||||
define('TABLE_ARCHIVING_RULE', 'archiving_rule');
|
||||
define('TABLE_FOLDER_RULE', 'folder_rule');
|
||||
define('TABLE_RETENTION_RULE', 'retention_rule');
|
||||
define('TABLE_OPTION', 'option');
|
||||
define('TABLE_LDAP', 'ldap');
|
||||
|
67
webui/controller/policy/folder.php
Normal file
67
webui/controller/policy/folder.php
Normal file
@ -0,0 +1,67 @@
|
||||
<?php
|
||||
|
||||
|
||||
class ControllerPolicyFolder extends Controller {
|
||||
private $error = array();
|
||||
|
||||
public function index(){
|
||||
|
||||
$this->id = "content";
|
||||
$this->template = "policy/folder.tpl";
|
||||
$this->layout = "common/layout";
|
||||
|
||||
|
||||
$request = Registry::get('request');
|
||||
|
||||
$db = Registry::get('db');
|
||||
$lang = Registry::get('language');
|
||||
|
||||
$this->load->model('policy/folder');
|
||||
$this->load->model('folder/folder');
|
||||
|
||||
$this->document->title = $this->data['text_folder_rules'];
|
||||
|
||||
$this->data['rules'] = array();
|
||||
|
||||
$this->data['error'] = '';
|
||||
|
||||
$this->data['search'] = '';
|
||||
|
||||
if(isset($this->request->post['search'])) { $this->data['search'] = $this->request->post['search']; }
|
||||
else if(isset($this->request->get['search'])) { $this->data['search'] = $this->request->get['search']; }
|
||||
|
||||
if(Registry::get('admin_user') == 0) {
|
||||
die("go away");
|
||||
}
|
||||
|
||||
if($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||
if($this->validate() == true) {
|
||||
$rc = $this->model_policy_folder->add_new_rule($this->request->post);
|
||||
} else {
|
||||
$this->data['error'] = $lang->data['text_invalid_data'];
|
||||
}
|
||||
}
|
||||
|
||||
$this->data['rules'] = $this->model_policy_folder->get_rules($this->data['search']);
|
||||
|
||||
$this->data['folders'] = $this->model_folder_folder->get_top_level_folders();
|
||||
|
||||
$this->render();
|
||||
}
|
||||
|
||||
|
||||
private function validate() {
|
||||
if($this->request->post['from'] == '' && $this->request->post['to'] == '' &&
|
||||
$this->request->post['subject'] == '' && $this->request->post['body'] == '' && $this->request->post['size'] == '' &&
|
||||
$this->request->post['attachment_name'] == '' && $this->request->post['attachment_type'] == '' && $this->request->post['attachment_size'] == '' &&
|
||||
$this->request->post['spam'] == -1
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
76
webui/controller/policy/removefolder.php
Normal file
76
webui/controller/policy/removefolder.php
Normal file
@ -0,0 +1,76 @@
|
||||
<?php
|
||||
|
||||
|
||||
class ControllerPolicyRemovefolder extends Controller {
|
||||
private $error = array();
|
||||
|
||||
|
||||
public function index(){
|
||||
|
||||
$this->id = "content";
|
||||
$this->template = "policy/removefolder.tpl";
|
||||
$this->layout = "common/layout";
|
||||
|
||||
|
||||
$request = Registry::get('request');
|
||||
$db = Registry::get('db');
|
||||
|
||||
$this->load->model('policy/folder');
|
||||
|
||||
$this->document->title = $this->data['text_folder_rules'];
|
||||
|
||||
|
||||
$this->data['username'] = Registry::get('username');
|
||||
|
||||
$this->data['id'] = @$this->request->get['id'];
|
||||
$this->data['confirmed'] = (int)@$this->request->get['confirmed'];
|
||||
|
||||
|
||||
$this->data['rule'] = $this->model_policy_folder->get_rule($this->data['id']);
|
||||
|
||||
if($this->validate() == true) {
|
||||
|
||||
if($this->data['confirmed'] == 1) {
|
||||
$ret = $this->model_policy_folder->remove_rule($this->data['id']);
|
||||
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['id']) || $this->request->get['id'] < 1 ) {
|
||||
$this->error['rule'] = $this->data['text_invalid_data'];
|
||||
}
|
||||
|
||||
|
||||
if (!$this->error) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
@ -484,5 +484,6 @@ $_['text_storage'] = "Storage";
|
||||
$_['text_legal_hold'] = "Legal hold";
|
||||
|
||||
$_['text_compliance_warning'] = 'The delete feature is enabled, therefore the archive is NOT compliant!';
|
||||
$_['text_folder_rules'] = "Folder rules";
|
||||
|
||||
?>
|
||||
|
@ -144,6 +144,7 @@ $_['text_failed_to_restore'] = "Failed to restore";
|
||||
$_['text_failed_to_update'] = "Failed to update";
|
||||
$_['text_first'] = "First";
|
||||
$_['text_folder'] = "Folder";
|
||||
$_['text_folder_rules'] = "Folder rules";
|
||||
$_['text_folders'] = "Folders";
|
||||
$_['text_forward_selected_emails_to'] = "Forward selected emails to";
|
||||
$_['text_from'] = "From";
|
||||
|
@ -483,5 +483,6 @@ $_['text_storage'] = "Storage";
|
||||
$_['text_legal_hold'] = "Legal hold";
|
||||
|
||||
$_['text_compliance_warning'] = 'The delete feature is enabled, therefore the archive is NOT compliant!';
|
||||
$_['text_folder_rules'] = "Folder rules";
|
||||
|
||||
?>
|
||||
|
@ -480,5 +480,6 @@ $_['text_storage'] = "Stockage";
|
||||
$_['text_legal_hold'] = "Legal hold";
|
||||
|
||||
$_['text_compliance_warning'] = 'The delete feature is enabled, therefore the archive is NOT compliant!';
|
||||
$_['text_folder_rules'] = "Folder rules";
|
||||
|
||||
?>
|
||||
|
@ -145,6 +145,7 @@ $_['text_failed_to_restore'] = "Hiba a vissza
|
||||
$_['text_failed_to_update'] = "Nem sikerült módosítani";
|
||||
$_['text_first'] = "Elsõ";
|
||||
$_['text_folder'] = "Mappa";
|
||||
$_['text_folder_rules'] = "Mappa szabályok";
|
||||
$_['text_folders'] = "Mappák";
|
||||
$_['text_forward_selected_emails_to'] = "Kijelölt levelek továbbítása";
|
||||
$_['text_from'] = "Feladó";
|
||||
|
@ -145,6 +145,7 @@ $_['text_failed_to_restore'] = "Hiba a visszaállítás során";
|
||||
$_['text_failed_to_update'] = "Nem sikerült módosítani";
|
||||
$_['text_first'] = "Első";
|
||||
$_['text_folder'] = "Mappa";
|
||||
$_['text_folder_rules'] = "Mappa szabályok";
|
||||
$_['text_folders'] = "Mappák";
|
||||
$_['text_forward_selected_emails_to'] = "Kijelölt levelek továbbítása";
|
||||
$_['text_from'] = "Feladó";
|
||||
|
@ -479,4 +479,7 @@ $_['text_ldap_delete_confirm_message'] = 'Czy chcesz usunąć wpis LDAP';
|
||||
$_['text_customer_delete_confirm_message'] = 'Czy chcesz usunąć klienta';
|
||||
$_['text_with_selected'] = 'wraz z zaznaczonymi';
|
||||
|
||||
$_['text_compliance_warning'] = 'The delete feature is enabled, therefore the archive is NOT compliant!';
|
||||
$_['text_folder_rules'] = "Folder rules";
|
||||
|
||||
?>
|
||||
|
@ -473,5 +473,6 @@ $_['text_storage'] = "Storage";
|
||||
$_['text_legal_hold'] = "Legal hold";
|
||||
|
||||
$_['text_compliance_warning'] = 'The delete feature is enabled, therefore the archive is NOT compliant!';
|
||||
$_['text_folder_rules'] = "Folder rules";
|
||||
|
||||
?>
|
||||
|
@ -481,5 +481,6 @@ $_['text_storage'] = "Storage";
|
||||
$_['text_legal_hold'] = "Legal hold";
|
||||
|
||||
$_['text_compliance_warning'] = 'The delete feature is enabled, therefore the archive is NOT compliant!';
|
||||
$_['text_folder_rules'] = "Folder rules";
|
||||
|
||||
?>
|
||||
|
@ -481,5 +481,6 @@ $_['text_storage'] = "Storage";
|
||||
$_['text_legal_hold'] = "Legal hold";
|
||||
|
||||
$_['text_compliance_warning'] = 'The delete feature is enabled, therefore the archive is NOT compliant!';
|
||||
$_['text_folder_rules'] = "Folder rules";
|
||||
|
||||
?>
|
||||
|
@ -42,6 +42,19 @@ class ModelFolderFolder extends Model {
|
||||
}
|
||||
|
||||
|
||||
public function get_top_level_folders() {
|
||||
$folders = array();
|
||||
|
||||
$query = $this->db->query("SELECT `id`, `name` FROM `" . TABLE_FOLDER . "` WHERE parent_id=0");
|
||||
|
||||
foreach ($query->rows as $q) {
|
||||
$folders[$q['id']] = $q['name'];
|
||||
}
|
||||
|
||||
return $folders;
|
||||
}
|
||||
|
||||
|
||||
public function get_folders_for_user() {
|
||||
$session = Registry::get('session');
|
||||
|
||||
|
48
webui/model/policy/folder.php
Normal file
48
webui/model/policy/folder.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
|
||||
class ModelPolicyFolder extends Model {
|
||||
|
||||
public function get_rules($s = '') {
|
||||
if($s) {
|
||||
$query = $this->db->query("SELECT * FROM " . TABLE_FOLDER_RULE . " WHERE domain LIKE ? OR `from` LIKE ? OR `subject` LIKE ? OR `body` LIKE ? ORDER BY domain, id", array('%' . $s . '%', '%' . $s . '%', '%' . $s . '%', '%' . $s . '%'));
|
||||
} else {
|
||||
$query = $this->db->query("SELECT * FROM " . TABLE_FOLDER_RULE . " ORDER BY domain, id");
|
||||
}
|
||||
|
||||
if(isset($query->rows)) { return $query->rows; }
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
|
||||
public function get_rule($id = 0) {
|
||||
$query = $this->db->query("SELECT * FROM " . TABLE_FOLDER_RULE . " WHERE id=?", array($id));
|
||||
|
||||
if(isset($query->row)) { return $query->row; }
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
|
||||
public function add_new_rule($data = array()) {
|
||||
$domain = '';
|
||||
|
||||
if(isset($data['domain'])) { $domain = $data['domain']; }
|
||||
|
||||
$query = $this->db->query("INSERT INTO " . TABLE_FOLDER_RULE . " (`domain`,`from`,`to`,`subject`,`body`,`_size`,`size`,`attachment_name`,`attachment_type`,`_attachment_size`,`attachment_size`,`spam`,`folder_id`) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)", array($domain, $data['from'], $data['to'], $data['subject'], $data['body'], $data['_size'], $data['size'], $data['attachment_name'], $data['attachment_type'], $data['_attachment_size'], $data['attachment_size'], $data['spam'], $data['folder_id']) );
|
||||
|
||||
return $this->db->countAffected();
|
||||
}
|
||||
|
||||
|
||||
public function remove_rule($id = 0) {
|
||||
$query = $this->db->query("DELETE FROM " . TABLE_FOLDER_RULE . " WHERE id=?", array($id));
|
||||
|
||||
return $this->db->countAffected();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
@ -39,8 +39,9 @@
|
||||
<li><a href="index.php?route=customer/list"><i class="icon-wrench"></i> <?php print $text_customers; ?></a></li>
|
||||
<li><a href="index.php?route=import/list"><i class="icon-lightbulb"></i> <?php print $text_import; ?></a></li>
|
||||
<?php } ?>
|
||||
<li><a href="index.php?route=policy/archiving"><i class="icon-folder-open"></i> <?php print $text_archiving_rules; ?></a></li>
|
||||
<li><a href="index.php?route=policy/archiving"><i class="icon-stop"></i> <?php print $text_archiving_rules; ?></a></li>
|
||||
<li><a href="index.php?route=policy/retention"><i class="icon-time"></i> <?php print $text_retention_rules; ?></a></li>
|
||||
<li><a href="index.php?route=policy/folder"><i class="icon-folder-open"></i> <?php print $text_folder_rules; ?></a></li>
|
||||
<li><a href="index.php?route=policy/legalhold"><i class="icon-legal"></i> <?php print $text_legal_hold; ?></a></li>
|
||||
<li><a href="index.php?route=search/autosearch"><i class="icon-search"></i> <?php print $text_automated_search; ?></a></li>
|
||||
</ul>
|
||||
|
160
webui/view/theme/default/templates/policy/folder.tpl
Normal file
160
webui/view/theme/default/templates/policy/folder.tpl
Normal file
@ -0,0 +1,160 @@
|
||||
<form method="get" name="search1" action="folder.php" class="form-inline pull-right">
|
||||
<div class="input-append">
|
||||
<input type="text" name="search" class="input-medium" value="<?php print $search; ?>" />
|
||||
<input type="submit" class="btn" value="<?php print $text_search; ?>" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<h4><?php print $text_add_new_rule; ?></h4>
|
||||
|
||||
<form method="post" id="add1" name="add1" action="index.php?route=policy/folder" class="form-horizontal">
|
||||
|
||||
<?php if(ENABLE_SAAS == 1) { ?>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="domain"><?php print $text_domain; ?>:</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="text" name="domain" />
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="from"><?php print $text_from; ?>:</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="text" name="from" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="to"><?php print $text_to; ?>:</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="text" name="to" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="subject"><?php print $text_subject; ?>:</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="text" name="subject" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="body"><?php print $text_body; ?>:</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="text" name="body" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="size"><?php print $text_size; ?>:</label>
|
||||
<div class="controls">
|
||||
<select class="ruleselect" name="_size">
|
||||
<option value=">">></option>
|
||||
<option value="=">=</option>
|
||||
<option value="<"><</option>
|
||||
</select>
|
||||
<input type="text" class="ruletext" name="size" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="attachment_name"><?php print $text_attachment_name; ?>:</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="text" name="attachment_name" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="attachment_type"><?php print $text_attachment_type; ?>:</label>
|
||||
<div class="controls">
|
||||
<input type="text" class="text" name="attachment_type" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="attachment_size"><?php print $text_attachment_size; ?>:</label>
|
||||
<div class="controls">
|
||||
<select class="ruleselect" name="_attachment_size">
|
||||
<option value=">">></option>
|
||||
<option value="=">=</option>
|
||||
<option value="<"><</option>
|
||||
</select>
|
||||
<input type="text" class="ruletext" name="attachment_size" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="spam"><?php print $text_spam; ?>:</label>
|
||||
<div class="controls">
|
||||
<select class="ruleselect" name="spam">
|
||||
<option value="-1">-</option>
|
||||
<option value="0"><?php print $text_not_spam; ?></option>
|
||||
<option value="1"><?php print $text_spam2; ?></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label" for="days"><?php print $text_folder; ?>:</label>
|
||||
<div class="controls">
|
||||
<select class="ruleselect" name="folder_id">
|
||||
<option value="0">-</option>
|
||||
<?php while(list($k,$v) = each($folders)) { ?>
|
||||
<option value="<?php print $k; ?>"><?php print $v; ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<input type="submit" class="btn btn-primary" value="<?php print $text_add; ?>" /><input type="reset" class="btn" value="<?php print $text_cancel; ?>" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<h4><?php print $text_existing_rules; ?></h4>
|
||||
|
||||
<?php if(isset($rules)){ ?>
|
||||
|
||||
<table id="ss1" class="table table-striped table-condensed">
|
||||
<tr class="domainrow">
|
||||
<?php if(ENABLE_SAAS == 1) { ?>
|
||||
<th><?php print $text_domain; ?></th>
|
||||
<?php } ?>
|
||||
<th><?php print $text_from; ?></th>
|
||||
<th><?php print $text_to; ?></th>
|
||||
<th><?php print $text_subject; ?></th>
|
||||
<th><?php print $text_body; ?></th>
|
||||
<th><?php print $text_spam; ?></th>
|
||||
<th><?php print $text_size; ?></th>
|
||||
<th><?php print $text_attachment_name; ?></th>
|
||||
<th><?php print $text_attachment_type; ?></th>
|
||||
<th><?php print $text_attachment_size; ?></th>
|
||||
<th><?php print $text_folder; ?></th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
|
||||
<?php foreach($rules as $rule) { ?>
|
||||
<tr class="domainrow">
|
||||
<?php if(ENABLE_SAAS == 1) { ?>
|
||||
<td><?php print $rule['domain']; ?></td>
|
||||
<?php } ?>
|
||||
<td><?php print $rule['from']; ?></td>
|
||||
<td><?php print $rule['to']; ?></td>
|
||||
<td><?php print $rule['subject']; ?></td>
|
||||
<td><?php print $rule['body']; ?></td>
|
||||
<td><?php if($rule['spam'] == -1) { print "-"; } else if($rule['spam'] == 0) { print $text_not_spam; } else { print $text_spam; } ?></td>
|
||||
<td><?php if($rule['size'] > 0) { print $rule['_size']; ?> <?php print $rule['size']; } ?></td>
|
||||
<td><?php print $rule['attachment_name']; ?></td>
|
||||
<td><?php print $rule['attachment_type']; ?></td>
|
||||
<td><?php if($rule['attachment_size'] > 0) { print $rule['_attachment_size']; ?> <?php print $rule['attachment_size']; } ?></td>
|
||||
<td><?php print $folders[$rule['folder_id']]; ?></td>
|
||||
<td><a href="index.php?route=policy/removefolder&id=<?php print $rule['id']; ?>"><?php print $text_remove; ?></a></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
</table>
|
||||
|
||||
<?php } else { ?>
|
||||
<div class="alert alert-error lead">
|
||||
<?php print $text_not_found; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
|
||||
<div>
|
||||
<input type="button" class="btn btn-danger" onclick="Piler.reload_piler();" value="<?php print $text_apply_changes; ?>" /> <span id="applyChangesOutput"></span>
|
||||
</div>
|
||||
|
31
webui/view/theme/default/templates/policy/removefolder.tpl
Normal file
31
webui/view/theme/default/templates/policy/removefolder.tpl
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
<div>
|
||||
|
||||
<?php if($confirmed){ ?>
|
||||
|
||||
<p><?php print $x; ?>.</p>
|
||||
<p><a href="index.php?route=policy/folder"><?php print $text_back; ?></a></p>
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<p><a href="index.php?route=policy/removefolder&id=<?php print $id; ?>&confirmed=1"><?php print $text_remove_rule; ?></a>:</p>
|
||||
<p>
|
||||
<?php
|
||||
if($rule['domain']) { print $text_domain . ': ' . $rule['domain'] . ', '; }
|
||||
if($rule['from']) { print $text_from . ': ' . $rule['from'] . ', '; }
|
||||
if($rule['to']) { print $text_to . ': ' . $rule['to'] . ', '; }
|
||||
if($rule['subject']) { print $text_subject . ': ' . $rule['subject'] . ', '; }
|
||||
if($rule['body']) { print $text_body . ': ' . $rule['body'] . ', '; }
|
||||
if($rule['size'] > 0) { print $text_size . ': ' . $rule['_size'] . ' ' . $rule['size'] . ', '; }
|
||||
if($rule['attachment_name']) { print $text_attachment_name . ': ' . $rule['attachment_name'] . ', '; }
|
||||
if($rule['attachment_type']) { print $text_attachment_type . ': ' . $rule['attachment_type'] . ', '; }
|
||||
if($rule['attachment_size'] > 0) { print $text_attachment_size . ': ' . $rule['_attachment_size'] . ' ' . $rule['attachment_size'] . ' '; }
|
||||
?>
|
||||
</p>
|
||||
|
||||
<p><a href="index.php?route=policy/folder"><?php print $text_back; ?></a></p>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
@ -37,6 +37,7 @@
|
||||
<?php } ?>
|
||||
<li><a href="index.php?route=policy/archiving"><?php print $text_archiving_rules; ?></a></li>
|
||||
<li><a href="index.php?route=policy/retention"><?php print $text_retention_rules; ?></a></li>
|
||||
<li><a href="index.php?route=policy/folder"><?php print $text_folder_rules; ?></a></li>
|
||||
<li><a href="index.php?route=policy/legalhold"><?php print $text_legal_hold; ?></a></li>
|
||||
<li><a href="index.php?route=search/autosearch"><?php print $text_automated_search; ?></a></li>
|
||||
</ul>
|
||||
|
141
webui/view/theme/mobile/templates/policy/folder.tpl
Normal file
141
webui/view/theme/mobile/templates/policy/folder.tpl
Normal file
@ -0,0 +1,141 @@
|
||||
<form method="get" name="search1" action="folder.php" class="form-inline pull-right">
|
||||
<div class="input-append">
|
||||
<input type="text" name="search" class="input-medium" value="<?php print $search; ?>" />
|
||||
<input type="submit" class="btn" value="<?php print $text_search; ?>" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<h4><?php print $text_add_new_rule; ?></h4>
|
||||
|
||||
<form method="post" name="add1" action="index.php?route=policy/folder" class="formbottom form-search">
|
||||
|
||||
<div id="ss1">
|
||||
|
||||
<div class="row">
|
||||
<div class="domaincell"><?php print $text_from; ?>:</div>
|
||||
<div class="domaincell"><input type="text" name="from" class="input-medium span5" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="domaincell"><?php print $text_to; ?>:</div>
|
||||
<div class="domaincell"><input type="text" name="to" class="input-medium span5" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="domaincell"><?php print $text_subject; ?>:</div>
|
||||
<div class="domaincell"><input type="text" name="subject" class="input-medium span5" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="domaincell"><?php print $text_body; ?>:</div>
|
||||
<div class="domaincell"><input type="text" name="body" class="input-medium span5" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="domaincell"><?php print $text_size; ?>:</div>
|
||||
<div class="domaincell">
|
||||
<select name="_size" class="span1">
|
||||
<option value=">">></option>
|
||||
<option value="=">=</option>
|
||||
<option value="<"><</option>
|
||||
</select>
|
||||
<input type="text" name="size" class="input-medium span4" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="domaincell"><?php print $text_attachment_name; ?>:</div>
|
||||
<div class="domaincell"><input type="text" name="attachment_name" class="input-medium span5" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="domaincell"><?php print $text_attachment_type; ?>:</div>
|
||||
<div class="domaincell"><input type="text" name="attachment_type" class="input-medium span5" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="domaincell"><?php print $text_attachment_size; ?>:</div>
|
||||
<div class="domaincell">
|
||||
<select name="_attachment_size" class="span1">
|
||||
<option value=">">></option>
|
||||
<option value="=">=</option>
|
||||
<option value="<"><</option>
|
||||
</select>
|
||||
<input type="text" name="attachment_size" class="input-medium span4" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="domaincell"><?php print $text_spam; ?>:</div>
|
||||
<div class="domaincell">
|
||||
<select name="spam" class="span1">
|
||||
<option value="-1">-</option>
|
||||
<option value="0"><?php print $text_not_spam; ?></option>
|
||||
<option value="1"><?php print $text_spam2; ?></option>
|
||||
</select>
|
||||
<input type="text" name="attachment_size" class="input-medium span4" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="domaincell"><?php print $text_folder; ?>:</div>
|
||||
<div class="domaincell">
|
||||
<select name="folder_id" class="span1">
|
||||
<option value="0">-</option>
|
||||
<?php while(list($k,$v) = each($folders)) { ?>
|
||||
<option value="<?php print $k; ?>"><?php print $v; ?></option>
|
||||
<?php } ?>
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="domaincell"> </div>
|
||||
<div class="domaincell"><input type="submit" class="btn btn-primary" value="<?php print $text_add; ?>" /> <input type="reset" class="btn" value="<?php print $text_cancel; ?>" /></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<?php if($error) { ?><p class="text-error bold"><?php print $text_error; ?>: <?php print $error; ?></p><?php } ?>
|
||||
|
||||
|
||||
<h4><?php print $text_existing_rules; ?></h4>
|
||||
|
||||
<?php if(isset($rules)){ ?>
|
||||
|
||||
<div id="ss1">
|
||||
<div class="domainrow">
|
||||
<div class="domaincell"><?php print $text_from; ?></div>
|
||||
<div class="domaincell"><?php print $text_to; ?></div>
|
||||
<div class="domaincell"><?php print $text_subject; ?></div>
|
||||
<div class="domaincell"><?php print $text_body; ?></div>
|
||||
<div class="domaincell"><?php print $text_spam; ?></div>
|
||||
<div class="domaincell"><?php print $text_size; ?></div>
|
||||
<div class="domaincell"><?php print $text_attachment_name; ?></div>
|
||||
<div class="domaincell"><?php print $text_attachment_type; ?></div>
|
||||
<div class="domaincell"><?php print $text_attachment_size; ?></div>
|
||||
<div class="domaincell"><?php print $text_folder; ?></div>
|
||||
<div class="domaincell"> </div>
|
||||
</div>
|
||||
|
||||
<?php foreach($rules as $rule) { ?>
|
||||
<div class="domainrow">
|
||||
<div class="domaincell"><?php print $rule['from']; ?></div>
|
||||
<div class="domaincell"><?php print $rule['to']; ?></div>
|
||||
<div class="domaincell"><?php print $rule['subject']; ?></div>
|
||||
<div class="domaincell"><?php print $rule['body']; ?></div>
|
||||
<div class="domaincell"><?php if($rule['spam'] == -1) { print "-"; } else if($rule['spam'] == 0) { print $text_not_spam; } else { print $text_spam; } ?></div>
|
||||
<div class="domaincell"><?php if($rule['size'] > 0) { print $rule['_size']; ?> <?php print $rule['size']; } ?></div>
|
||||
<div class="domaincell"><?php print $rule['attachment_name']; ?></div>
|
||||
<div class="domaincell"><?php print $rule['attachment_type']; ?></div>
|
||||
<div class="domaincell"><?php if($rule['attachment_size'] > 0) { print $rule['_attachment_size']; ?> <?php print $rule['attachment_size']; } ?></div>
|
||||
<div class="domaincell"><?php print $folders[$rule['folder_id']]; ?></div>
|
||||
<div class="domaincell"><a href="index.php?route=policy/removefolder&confirmed=1&id=<?php print $rule['id']; ?>" onclick="if(confirm('<?php print $text_remove_rule; ?>: ' + '#<?php print $rule['id']; ?>')) return true; return false;"><?php print $text_remove; ?></a></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php } else { ?>
|
||||
<?php print $text_not_found; ?>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<div class="top20px">
|
||||
<input type="button" class="btn btn-danger" onclick="Piler.reload_piler();" value="<?php print $text_apply_changes; ?>" /> <span id="applyChangesOutput"></span>
|
||||
</div>
|
||||
|
25
webui/view/theme/mobile/templates/policy/removefolder.tpl
Normal file
25
webui/view/theme/mobile/templates/policy/removefolder.tpl
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
<p>
|
||||
|
||||
<?php if($confirmed){ ?>
|
||||
|
||||
<?php print $x; ?>. <a href="index.php?route=policy/folder"><?php print $text_back; ?></a>
|
||||
|
||||
<?php } else { ?>
|
||||
<a href="index.php?route=policy/removefolder&id=<?php print $id; ?>&confirmed=1"><?php print $text_remove_rule; ?></a>: <?php
|
||||
|
||||
if($rule['domain']) { print $text_domain . ': ' . $rule['domain'] . ', '; }
|
||||
if($rule['from']) { print $text_from . ': ' . $rule['from'] . ', '; }
|
||||
if($rule['to']) { print $text_to . ': ' . $rule['to'] . ', '; }
|
||||
if($rule['subject']) { print $text_subject . ': ' . $rule['subject'] . ', '; }
|
||||
if($rule['body']) { print $text_body . ': ' . $rule['body'] . ', '; }
|
||||
if($rule['size'] > 0) { print $text_size . ': ' . $rule['_size'] . ' ' . $rule['size'] . ', '; }
|
||||
if($rule['attachment_name']) { print $text_attachment_name . ': ' . $rule['attachment_name'] . ', '; }
|
||||
if($rule['attachment_type']) { print $text_attachment_type . ': ' . $rule['attachment_type'] . ', '; }
|
||||
if($rule['attachment_size'] > 0) { print $text_attachment_size . ': ' . $rule['_attachment_size'] . ' ' . $rule['attachment_size'] . ' '; }
|
||||
?> <a href="index.php?route=policy/folder"><?php print $text_back; ?></a>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
</p>
|
||||
|
Loading…
Reference in New Issue
Block a user