Amélioration de l'interface de restrictions d'accés.
Quelques modifications de style toute zolie
This commit is contained in:
parent
747bd87d73
commit
98a446b9e4
|
@ -116,7 +116,7 @@ if ($mem->user["admlist"]==0) { // Normal (large) mode
|
|||
<?php } ?>
|
||||
</td>
|
||||
<td class="trbtn" colspan="4">
|
||||
<span class="inav"><a href="adm_list.php?short=1"><?php __("Minimal view"); ?></a></span>
|
||||
<span class="ina"><a href="adm_list.php?short=1"><?php __("Minimal view"); ?></a></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -199,7 +199,7 @@ if ($mem->user["admlist"]==1) { // SHORT MODE
|
|||
<?php } ?>
|
||||
</td>
|
||||
<td class="trbtn" colspan="5">
|
||||
<span class="inav"><a href="adm_list.php?short=0"><?php __("Complete view"); ?></a></span>
|
||||
<span class="ina"><a href="adm_list.php?short=0"><?php __("Complete view"); ?></a></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -114,7 +114,7 @@ if ($r['dns_action']=='UPDATE') {?>
|
|||
gestion des sous-domaines
|
||||
-->
|
||||
<table class="tlist">
|
||||
<tr><th colspan="2"> </th><th><?php __("Subdomain"); ?></th><th><?php __("Type");?></th><th><?php __("Status")?></th></tr>
|
||||
<tr><th colspan="2"> </th><th><?php __("Subdomain"); ?></th><th><?php __("Type");?></th><th><?php __("Status")?></th><th></th></tr>
|
||||
<?php
|
||||
$col=1;
|
||||
$dt=$dom->domains_type_lst();
|
||||
|
@ -203,7 +203,7 @@ if (!$r['noerase']) {
|
|||
<h3><?php __("DNS & Email parameters"); ?></h3>
|
||||
<form action="dom_editdns.php?domain=<?php echo urlencode($r["name"]) ?>" method="post" id="fdns" name="fdns" onSubmit="return destruction_alert();">
|
||||
|
||||
<table class="tlist">
|
||||
<table class="tlist2">
|
||||
<tr>
|
||||
<td><?php __("Manage the DNS on the server ?"); ?></td>
|
||||
<td>
|
||||
|
@ -213,7 +213,7 @@ if (!$r['noerase']) {
|
|||
</tr>
|
||||
</table>
|
||||
|
||||
<table class="tlist">
|
||||
<table class="tlist2">
|
||||
<tr>
|
||||
<td>
|
||||
<?php __("Manage the Emails Addresses of this domain on the server?"); ?>
|
||||
|
|
|
@ -57,7 +57,9 @@ else {
|
|||
?>
|
||||
|
||||
<p>
|
||||
<?php __("help_hta_list");
|
||||
<?php
|
||||
__("You can set passwords to protect some of your folders.<br/>This will create .htaccess and .htpassword files that restrict access to these directory and to any sub-elements.");
|
||||
// __("help_hta_list");
|
||||
$mem->show_help("hta_list2");
|
||||
?>
|
||||
</p>
|
||||
|
|
|
@ -61,20 +61,24 @@ $lac = $authip->list_affected();
|
|||
|
||||
<table class="tlist">
|
||||
<tr>
|
||||
<th><?php __("Protocol");?></th>
|
||||
<th><?php __("Target");?></th>
|
||||
<th><?php __("IP address");?></th>
|
||||
<th><?php __("Authorised IP address or network");?></th>
|
||||
<th><?php __("Access type");?></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php
|
||||
$col=1;
|
||||
foreach ($lac as $ll) {
|
||||
$col=3-$col;
|
||||
echo "<tr class='lst$col' >";
|
||||
echo "<td>".$ac[$ll['protocol']]['name']."</td>";
|
||||
echo "<td>".(isset($ac[$ll['protocol']]['values'][$ll['parameters']])?$ac[$ll['protocol']]['values'][$ll['parameters']]:'')."</td>";
|
||||
echo "<td>".$list_ip[$ll['authorised_ip_id']]['infos']."<br/>".$list_ip[$ll['authorised_ip_id']]['ip_human']."</td>"; ?>
|
||||
<td><div class="ina"><a href="ip_main.php?delete_affected_id=<?php echo urlencode($ll["id"]) ?>"><img src="images/delete.png" alt="<?php __("Delete")?>" /><?php __("Delete"); ?></a></div></td>
|
||||
<?php
|
||||
echo "<td><pan title=\"{$list_ip[$ll['authorised_ip_id']]['ip_human']}\">".$list_ip[$ll['authorised_ip_id']]['infos'];
|
||||
//echo "<br/>".$list_ip[$ll['authorised_ip_id']]['ip_human'];
|
||||
echo "</span></td>";
|
||||
echo "<td>".$ac[$ll['protocol']]['name'];
|
||||
if (isset($ac[$ll['protocol']]['values'][$ll['parameters']]) && $ac[$ll['protocol']]['values'][$ll['parameters']]) {
|
||||
echo " "._("for")." ".$ac[$ll['protocol']]['values'][$ll['parameters']];
|
||||
}
|
||||
echo "</td>";
|
||||
echo '<td><div class="ina"><a href="ip_main.php?delete_affected_id='.urlencode($ll["id"]).'"><img src="images/delete.png" alt="'._("Delete").'" />'._("Delete").'</a></div></td>';
|
||||
echo "</tr>";
|
||||
}
|
||||
?>
|
||||
|
@ -84,15 +88,11 @@ $lac = $authip->list_affected();
|
|||
<hr/>
|
||||
<h3><?php __("Add a new rule"); ?></h3>
|
||||
<form method="post" action="ip_main.php" name="main" id="main">
|
||||
<table class="tlist">
|
||||
<thead>
|
||||
<th><?php __("Target"); ?></th>
|
||||
<th><?php __("IP address (or subnet)"); ?></th>
|
||||
<td/>
|
||||
</thead>
|
||||
<table class="tlistb">
|
||||
<tbody>
|
||||
<tr valign="top">
|
||||
<td>
|
||||
<th><?php __("Access type"); ?></th>
|
||||
<td class="lst2">
|
||||
<?php foreach ($ac as $a) { ?>
|
||||
<p>
|
||||
<input type="radio" name="s_protocol" id="s_protocol_<?php echo htmlentities($a['protocol']);?>" value="<?php echo htmlentities($a['protocol']);?>" />
|
||||
|
@ -112,78 +112,82 @@ $lac = $authip->list_affected();
|
|||
<?php } ?>
|
||||
</p>
|
||||
<?php } ?>
|
||||
</td><td valign="middle">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php __("Authorized IP address or network"); ?></th>
|
||||
<td valign="middle" class="lst2">
|
||||
<p>
|
||||
<select name="s_ipsub">
|
||||
<?php foreach ($list_ip as $li) { ?>
|
||||
<option value="<?php echo $li['id']; ?>"><?php echo htmlentities($li['infos']); echo " - ".$li['ip'] ; if (!($li['subnet']==32 || $li['subnet'] == 128)) echo "/".$li['subnet'];?></option>
|
||||
<option value="<?php echo $li['id']; ?>"><?php echo htmlentities($li['infos']);
|
||||
//echo " - ".$li['ip'] ; if (!($li['subnet']==32 || $li['subnet'] == 128)) echo "/".$li['subnet'];
|
||||
?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</p>
|
||||
</td>
|
||||
<td valign=middle>
|
||||
</tr>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<td valign=middle class="lst2">
|
||||
<input type="submit" class="inb" value="<?php __("Save")?>" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<p><?php __("You need to have some 'Known IP and networks' defined below to define a new rule.") ?></p>
|
||||
<br/>
|
||||
<hr/>
|
||||
<h3><?php __("Known IP and networks");?></h3>
|
||||
<table class="tlist">
|
||||
<tr>
|
||||
<td valign=top width=40%>
|
||||
<table>
|
||||
<tr><th><?php __("Type"); ?></th><th><?php __("IP"); ?></th><th><?php __("Informations"); ?></th><th colspan=2/></tr>
|
||||
<?php
|
||||
$col=1;
|
||||
foreach($list_ip as $i) {
|
||||
$col=3-$col;
|
||||
if (checkip($i['ip'])) {
|
||||
if ($i['subnet']==32) {
|
||||
$txt="Address IPv4";
|
||||
} else {
|
||||
$txt="Subnet IPv4";
|
||||
}
|
||||
} elseif (checkipv6($i['ip'])) {
|
||||
if ($i['subnet']==128) {
|
||||
$txt="Address IPv6";
|
||||
} else {
|
||||
$txt="Subnet IPv6";
|
||||
}
|
||||
}
|
||||
echo "<tr class='lst$col' ><td>$txt</td><td>{$i['ip_human']}</td><td>{$i['infos']}</td>";
|
||||
?>
|
||||
<td><div class="ina"><a href="javascript:edit_ip(<?php echo "'".htmlentities($i['id'])."','".htmlentities($i['ip_human'])."','".htmlentities($i['infos'])."'"; ?>);"><img src="images/edit.png" alt="<?php __("Edit"); ?>" /><?php __("Edit"); ?></a></div></td>
|
||||
<td><div class="ina"><a href="ip_main.php?delete_id=<?php echo urlencode($i["id"]) ?>"><img src="images/delete.png" alt="<?php __("Delete"); ?>" /><?php __("Delete"); ?></a></div></td>
|
||||
</tr>
|
||||
|
||||
<?php } ?>
|
||||
</table>
|
||||
</td>
|
||||
<td valign=top width=40%>
|
||||
<fieldset>
|
||||
<legend><?php __("Add an IP");?> - <a href="javascript:edit_ip('','<?php echo htmlentities(get_remote_ip())."','Home IP'";?>);" ><?php echo __("Add my current IP"); ?></a></legend>
|
||||
<span id="form_add_ip">
|
||||
<form method="post" action="ip_main.php" name="main" id="main">
|
||||
<p id="reset_edit_ip" style="display:none;"><a href="javascript:reset_edit_ip();"><?php __("Cancel edit")?></a></p>
|
||||
<input type="hidden" name="id" value="" id="edit_id" >
|
||||
<p>
|
||||
<?php __("Enter here the IP address you want. <br/> <i>IPv4, IPv6 and subnet allowed</i>"); ?> <br/>
|
||||
<input type="text" size=20 maxlength=39 name="ipsub" id="edit_ip" />
|
||||
</p>
|
||||
<p>
|
||||
<?php __("Add a comment");?><br/>
|
||||
<input type="text" size=25 maxlength=200 name="infos" id="edit_infos" />
|
||||
</p>
|
||||
<input type="submit" class="inb" value="<?php __("Save")?>" />
|
||||
</form>
|
||||
</span>
|
||||
</fieldset>
|
||||
</td>
|
||||
<tr><th><?php __("Name"); ?></th><th><?php __("IP or network"); ?></th><th><?php __("Type"); ?></th><th colspan=2/></th></tr>
|
||||
<?php
|
||||
$col=1;
|
||||
foreach($list_ip as $i) {
|
||||
$col=3-$col;
|
||||
if (checkip($i['ip'])) {
|
||||
if ($i['subnet']==32) {
|
||||
$txt="Address IPv4";
|
||||
} else {
|
||||
$txt="Subnet IPv4";
|
||||
}
|
||||
} elseif (checkipv6($i['ip'])) {
|
||||
if ($i['subnet']==128) {
|
||||
$txt="Address IPv6";
|
||||
} else {
|
||||
$txt="Subnet IPv6";
|
||||
}
|
||||
}
|
||||
echo "<tr class='lst$col' ><td>{$i['infos']}</td><td>{$i['ip_human']}</td><td>$txt</td>";
|
||||
?>
|
||||
<td><div class="ina"><a href="javascript:edit_ip(<?php echo "'".htmlentities($i['id'])."','".htmlentities($i['ip_human'])."','".htmlentities($i['infos'])."'"; ?>);"><img src="images/edit.png" alt="<?php __("Edit"); ?>" /><?php __("Edit"); ?></a></div></td>
|
||||
<td><div class="ina"><a href="ip_main.php?delete_id=<?php echo urlencode($i["id"]) ?>"><img src="images/delete.png" alt="<?php __("Delete"); ?>" /><?php __("Delete"); ?></a></div></td>
|
||||
</tr>
|
||||
|
||||
<?php } ?>
|
||||
</table>
|
||||
<br/>
|
||||
<hr/>
|
||||
<h3><?php __("Add an IP or a networks");?></h3>
|
||||
|
||||
<p><a href="javascript:edit_ip('','<?php echo htmlentities(get_remote_ip())."','Home IP'";?>);" ><?php echo __("Add my current IP"); ?></a></p>
|
||||
<span id="form_add_ip">
|
||||
<form method="post" action="ip_main.php" name="main" id="main">
|
||||
<p id="reset_edit_ip" style="display:none;"><a href="javascript:reset_edit_ip();"><?php __("Cancel edit")?></a></p>
|
||||
|
||||
<input type="hidden" name="id" value="" id="edit_id" >
|
||||
<table class="tlistb">
|
||||
<tr><th><?php __("Name"); ?></th><th><?php __("IP or network. <i>IPv4, IPv6 and subnet allowed</i>"); ?></th><th></th></tr>
|
||||
|
||||
<tr class="lst2">
|
||||
<td><input type="text" size=20 maxlength=39 name="ipsub" id="edit_ip" /></td>
|
||||
<td><input type="text" size=25 maxlength=200 name="infos" id="edit_infos" /></td>
|
||||
<td><input type="submit" class="inb" value="<?php __("Save")?>" /></td>
|
||||
</tr>
|
||||
</form>
|
||||
</span>
|
||||
|
||||
<script type="text/javascript">
|
||||
function reset_edit_ip() {
|
||||
|
|
|
@ -40,7 +40,7 @@ th {
|
|||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 11px;
|
||||
color: black;
|
||||
background: #F1F8FD;
|
||||
background: #ABCDE4;
|
||||
font-weight: normal;
|
||||
text-align: left;
|
||||
}
|
||||
|
@ -106,32 +106,42 @@ hr {
|
|||
background-color: #BFD3E1;
|
||||
}
|
||||
|
||||
.ina:hover, .ina, .inav, .inav:hover {
|
||||
input.ina:hover, input.ina, input.inav, input.inav:hover {
|
||||
border: 1px solid #999;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
padding: 2px 4px 2px 4px;
|
||||
color: black;
|
||||
cursor: pointer;
|
||||
/*float: right;*/
|
||||
}
|
||||
.ina {
|
||||
input.ina, .ina a {
|
||||
background-color: #F1F8FD;
|
||||
}
|
||||
.ina:hover, .inav {
|
||||
input.ina:hover, .ina a:hover,
|
||||
input.inav, .inav a {
|
||||
background-color: #CFE3F1;
|
||||
}
|
||||
.inav:hover {
|
||||
input.inav:hover, .inav a:hover, a.inav:hover {
|
||||
background-color: #F1F8FD;
|
||||
}
|
||||
|
||||
.ina-active {
|
||||
.ina-active a, a.ina-active, input.ina-active {
|
||||
background-color: #C1FFCD;
|
||||
}
|
||||
|
||||
.ina a, .inav a {
|
||||
color: black;
|
||||
.ina a, a.ina, .inav a, a.inav {
|
||||
color: black;
|
||||
white-space: nowrap;
|
||||
|
||||
border: 1px solid #999;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10px;
|
||||
padding: 4px;
|
||||
color: black;
|
||||
cursor: pointer;
|
||||
}
|
||||
.ina a:hover, .inav a:hover {
|
||||
.ina a:hover, a.ina:hover, .inav a:hover, a.inav:hover {
|
||||
text-decoration: none;
|
||||
color: black;
|
||||
}
|
||||
|
@ -166,10 +176,11 @@ hr {
|
|||
padding-left: 0px;
|
||||
}
|
||||
|
||||
.lst1 {
|
||||
background-color: #F1F8FD;
|
||||
}
|
||||
.lst2 {
|
||||
/*background-color: #F1F8FD;*/
|
||||
background-color: #E7F0F9;
|
||||
}
|
||||
.lst1 {
|
||||
background-color: #CFE3F1;
|
||||
}
|
||||
|
||||
|
@ -435,12 +446,35 @@ span#emaildom {
|
|||
padding: 10px;
|
||||
}
|
||||
|
||||
.tlist, .tlist td, .tlist th {
|
||||
.tlist, .tlist td, .tlist th,
|
||||
.tlist2, .tlist2 td, .tlist2 th {
|
||||
padding: 4px;
|
||||
margin: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.tlist {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.tlistb, .tlistb td, .tlistb th {
|
||||
padding: 4px;
|
||||
margin: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
table.tlistb, .tlistb tr {
|
||||
border: solid 1px #AAA;
|
||||
}
|
||||
|
||||
.tlist tr:hover, .tlist2 tr:hover {
|
||||
background-color: #F1D5CF;
|
||||
}
|
||||
|
||||
.tlist th, .tlist2 th {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
input#dir, input#sub_local {
|
||||
width: 200px;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue