forked from hestiacp/hestiacp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd_mail.php
More file actions
113 lines (108 loc) · 5.18 KB
/
Copy pathadd_mail.php
File metadata and controls
113 lines (108 loc) · 5.18 KB
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<!-- Begin toolbar -->
<div class="toolbar">
<div class="toolbar-inner">
<div class="toolbar-buttons">
<a class="button button-secondary" id="btn-back" href="/list/mail/"><i class="fas fa-arrow-left status-icon blue"></i><?=_('Back');?></a>
</div>
<div class="toolbar-buttons">
<a href="#" class="button" data-action="submit" data-id="vstobjects"><i class="fas fa-floppy-disk status-icon purple"></i><?=_('Save');?></a>
</div>
</div>
</div>
<!-- End toolbar -->
<div class="l-center animate__animated animate__fadeIn">
<form id="vstobjects" name="v_add_mail" method="post">
<input type="hidden" name="token" value="<?=$_SESSION['token']?>">
<input type="hidden" name="ok" value="Add">
<div class="form-container">
<h1 class="form-title"><?=_('Adding Mail Domain');?></h1>
<?php show_alert_message($_SESSION);?>
<?php if (($user_plain == 'admin') && (($_GET['accept'] !== "true"))) {?>
<div class="alert alert-danger alert-with-icon" role="alert">
<i class="fas fa-exclamation"></i>
<p><?=_('Avoid adding web domains on admin account');?></p>
</div>
<?php } ?>
<?php if (($user_plain == 'admin') && (empty($_GET['accept']))) {?>
<div class="u-side-by-side u-pt18">
<a href="/add/user/" class="button u-width-full u-mr10"><?=_('Add User');?></a>
<a href="/add/mail/?accept=true" class="button button-danger u-width-full u-ml10"><?=_('Continue');?></a>
</div>
<?php } ?>
<?php if (($user_plain == 'admin') && (($_GET['accept'] === "true")) || ($user_plain !== "admin")) {?>
<div class="u-mb20">
<label for="v_domain" class="form-label"><?=_('Domain');?></label>
<input type="text" class="form-control" name="v_domain" id="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
</div>
<?php if($_SESSION['WEBMAIL_SYSTEM']){?>
<div class="u-mb20">
<label for="v_webmail" class="form-label"><?=_('Webmail Client');?></label>
<select class="form-select" name="v_webmail" id="v_webmail" tabindex="6">
<?php foreach ($webmail_clients as $client){
echo "\t\t\t\t<option value=\"".htmlentities($client)."\"";
if (( $v_webmail == $client )) {
echo ' selected' ;
}
echo ">".htmlentities(ucfirst($client))."</option>\n";
}
?>
<option value="" <?php if (empty($v_webmail) || $v_webmail == 'disabled' ){ echo "selected";}?>><?=_('Disabled');?></option>
</select>
</div>
<?php } ?>
<?php if (!empty($_SESSION['ANTISPAM_SYSTEM'])) {?>
<div class="form-check u-mb10">
<input class="form-check-input" type="checkbox" name="v_antispam" id="v_antispam" <?php if ((empty($v_antispam)) || ($v_antispam == 'yes')) echo 'checked'; ?>>
<label for="v_antispam">
<?=_('AntiSpam Support');?>
</label>
</div>
<div class="form-check u-mb10">
<input class="form-check-input" type="checkbox" name="v_reject" id="v_reject" <?php if ((empty($v_reject)) || ($v_reject == 'yes')) echo 'checked'; ?>>
<label for="v_reject">
<?=_('Reject spam');?>
</label>
</div>
<?php } ?>
<?php if (!empty($_SESSION['ANTIVIRUS_SYSTEM'])) {?>
<div class="form-check u-mb10">
<input class="form-check-input" type="checkbox" name="v_antivirus" id="v_antivirus" <?php if ((empty($v_antivirus)) || ($v_antivirus == 'yes')) echo 'checked'; ?>>
<label for="v_antivirus">
<?=_('AntiVirus Support');?>
</label>
</div>
<?php } ?>
<div class="form-check u-mb10">
<input class="form-check-input" type="checkbox" name="v_dkim" id="v_dkim" <?php if (isset($v_dkim)&&$v_dkim == 'yes') echo 'checked'; ?>>
<label for="v_dkim">
<?=_('DKIM Support');?>
</label>
</div>
<div class="form-check u-mb10">
<input class="form-check-input" type="checkbox" name="v_smtp_relay" id="v_smtp_relay" <?php if ($v_smtp_relay == 'true') echo 'checked'; ?> onclick="javascript:elementHideShow('smtp_relay_table');">
<label for="v_smtp_relay">
<?=_('SMTP Relay');?>
</label>
</div>
<div id="smtp_relay_table" class="u-pl30" style="display:<?php if ($v_smtp_relay == 'true'){echo 'block';} else {echo 'none';}?> ;">
<div class="u-mb10">
<label for="v_smtp_relay_host" class="form-label"><?=_('Host');?></label>
<input type="text" class="form-control" name="v_smtp_relay_host" id="v_smtp_relay_host" value="<?=htmlentities(trim($v_smtp_relay_host, "'"))?>">
</div>
<div class="u-mb10">
<label for="v_smtp_relay_port" class="form-label"><?=_('Port');?></label>
<input type="text" class="form-control" name="v_smtp_relay_port" id="v_smtp_relay_port" value="<?=htmlentities(trim($v_smtp_relay_port, "'"))?>">
</div>
<div class="u-mb10">
<label for="v_smtp_relay_user" class="form-label"><?=_('Username');?></label>
<input type="text" class="form-control" name="v_smtp_relay_user" id="v_smtp_relay_user" value="<?=htmlentities(trim($v_smtp_relay_user, "'"))?>">
</div>
<div class="u-mb10">
<label for="v_smtp_relay_pass" class="form-label"><?=_('Password');?></label>
<input type="text" class="form-control" name="v_smtp_relay_pass" id="v_smtp_relay_pass">
</div>
</div>
<?php } ?>
</div>
</form>
</div>