forked from dtouzeau/artica-1.5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aveserver.settings.php
executable file
·92 lines (70 loc) · 2.59 KB
/
aveserver.settings.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
include_once('ressources/class.templates.inc');
include_once('ressources/class.ldap.inc');
include_once('ressources/class.users.menus.inc');
include_once('ressources/class.main_cf.inc');
include_once('ressources/kav4mailservers.inc');
$usersmenus=new usersMenus();
if($usersmenus->AsPostfixAdministrator==false){header('location:users.index.php');exit;}
if(isset($_GET["NotifyFromAddress"])){SaveContent();}
INDEX();
function INDEX(){
$ave=new kav4mailservers_single($_GET["ou"]);
$html="
<table style='width:100%'>
<tr>
<td width=1%><img src='img/tank.jpg'></td>
<td>
<form name='ffm1' method=get>
<input type='hidden' name='ou' value='{$_GET["ou"]}'>
<div class='caption'>{aveserver_intro_global}</div>
<table style='width:100%'>
<tr><td colspan=2><h4>{when_found_virus}</H4></td></tr>
<tr>
<td align='right' nowrap><strong>{delete_mail}:</strong></td>
<td>" . Field_numeric_checkbox_img('DeleteDetectedVirus',$ave->main_array["DeleteDetectedVirus"],'{enable_disable}') . "</td>
</tr>
<tr>
<td align='right' nowrap><strong>{ArchiveMail}:</strong></td>
<td>" . Field_numeric_checkbox_img('ArchiveMail',$ave->main_array["ArchiveMail"],'{enable_disable}') . "</td>
</tr>
<tr>
<td align='right' nowrap><strong>{NotifyFrom}:</strong></td>
<td>" . Field_numeric_checkbox_img('NotifyFrom',$ave->main_array["NotifyFrom"],'{enable_disable}') . "</td>
</tr>
<tr>
<td align='right' nowrap><strong>{NotifyTo}:</strong></td>
<td>" . Field_numeric_checkbox_img('NotifyTo',$ave->main_array["NotifyTo"],'{enable_disable}') . "</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan=2>
<table style='width:100%'>
<tr><td colspan=2><h4>{NotifyMessage}</H4></td></tr>
<tr>
<td align='right' nowrap><strong>{NotifyFromAddress}:</strong></td>
<td>" . Field_text('NotifyFromAddress',$ave->main_array["NotifyFromAddress"]) . "</td>
</tr>
<tr>
<td align='right' nowrap><strong>{NotifyMessageSubject}:</strong></td>
<td>" .Field_text('NotifyMessageSubject',$ave->main_array["NotifyMessageSubject"]) . "</td>
</tr>
<tr><td colspan=2>" . TinyMce('NotifyMessageTemplate',$ave->main_array["NotifyMessageTemplate"]) . "</td></tr>
<tr><td colspan=2 align='right'><input type='submit' value='{edit} »'></td></tr>
</table>
</td>
</tr>
</table></form>";
$tpl=new template_users('{antivirus_engine}',$html);
echo $tpl->web_page;
}
function SaveContent(){
$ave=new kav4mailservers_single($_GET["ou"]);
while (list ($key, $value) = each ($_GET) ){
$value=str_replace("\n"," ",$value);
$ave->main_array[$key]=$value;
}
$ave->SaveConf();
}