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 } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
<td class="trbtn" colspan="4">
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -199,7 +199,7 @@ if ($mem->user["admlist"]==1) { // SHORT MODE
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td>
|
</td>
|
||||||
<td class="trbtn" colspan="5">
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -114,7 +114,7 @@ if ($r['dns_action']=='UPDATE') {?>
|
||||||
gestion des sous-domaines
|
gestion des sous-domaines
|
||||||
-->
|
-->
|
||||||
<table class="tlist">
|
<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
|
<?php
|
||||||
$col=1;
|
$col=1;
|
||||||
$dt=$dom->domains_type_lst();
|
$dt=$dom->domains_type_lst();
|
||||||
|
@ -203,7 +203,7 @@ if (!$r['noerase']) {
|
||||||
<h3><?php __("DNS & Email parameters"); ?></h3>
|
<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();">
|
<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>
|
<tr>
|
||||||
<td><?php __("Manage the DNS on the server ?"); ?></td>
|
<td><?php __("Manage the DNS on the server ?"); ?></td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -213,7 +213,7 @@ if (!$r['noerase']) {
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table class="tlist">
|
<table class="tlist2">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<?php __("Manage the Emails Addresses of this domain on the server?"); ?>
|
<?php __("Manage the Emails Addresses of this domain on the server?"); ?>
|
||||||
|
|
|
@ -57,7 +57,9 @@ else {
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<p>
|
<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");
|
$mem->show_help("hta_list2");
|
||||||
?>
|
?>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -61,20 +61,24 @@ $lac = $authip->list_affected();
|
||||||
|
|
||||||
<table class="tlist">
|
<table class="tlist">
|
||||||
<tr>
|
<tr>
|
||||||
<th><?php __("Protocol");?></th>
|
<th><?php __("Authorised IP address or network");?></th>
|
||||||
<th><?php __("Target");?></th>
|
<th><?php __("Access type");?></th>
|
||||||
<th><?php __("IP address");?></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
$col=1;
|
$col=1;
|
||||||
foreach ($lac as $ll) {
|
foreach ($lac as $ll) {
|
||||||
$col=3-$col;
|
$col=3-$col;
|
||||||
echo "<tr class='lst$col' >";
|
echo "<tr class='lst$col' >";
|
||||||
echo "<td>".$ac[$ll['protocol']]['name']."</td>";
|
echo "<td><pan title=\"{$list_ip[$ll['authorised_ip_id']]['ip_human']}\">".$list_ip[$ll['authorised_ip_id']]['infos'];
|
||||||
echo "<td>".(isset($ac[$ll['protocol']]['values'][$ll['parameters']])?$ac[$ll['protocol']]['values'][$ll['parameters']]:'')."</td>";
|
//echo "<br/>".$list_ip[$ll['authorised_ip_id']]['ip_human'];
|
||||||
echo "<td>".$list_ip[$ll['authorised_ip_id']]['infos']."<br/>".$list_ip[$ll['authorised_ip_id']]['ip_human']."</td>"; ?>
|
echo "</span></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>
|
echo "<td>".$ac[$ll['protocol']]['name'];
|
||||||
<?php
|
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>";
|
echo "</tr>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -84,15 +88,11 @@ $lac = $authip->list_affected();
|
||||||
<hr/>
|
<hr/>
|
||||||
<h3><?php __("Add a new rule"); ?></h3>
|
<h3><?php __("Add a new rule"); ?></h3>
|
||||||
<form method="post" action="ip_main.php" name="main" id="main">
|
<form method="post" action="ip_main.php" name="main" id="main">
|
||||||
<table class="tlist">
|
<table class="tlistb">
|
||||||
<thead>
|
|
||||||
<th><?php __("Target"); ?></th>
|
|
||||||
<th><?php __("IP address (or subnet)"); ?></th>
|
|
||||||
<td/>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr valign="top">
|
<tr valign="top">
|
||||||
<td>
|
<th><?php __("Access type"); ?></th>
|
||||||
|
<td class="lst2">
|
||||||
<?php foreach ($ac as $a) { ?>
|
<?php foreach ($ac as $a) { ?>
|
||||||
<p>
|
<p>
|
||||||
<input type="radio" name="s_protocol" id="s_protocol_<?php echo htmlentities($a['protocol']);?>" value="<?php echo htmlentities($a['protocol']);?>" />
|
<input type="radio" name="s_protocol" id="s_protocol_<?php echo htmlentities($a['protocol']);?>" value="<?php echo htmlentities($a['protocol']);?>" />
|
||||||
|
@ -112,33 +112,40 @@ $lac = $authip->list_affected();
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</p>
|
</p>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</td><td valign="middle">
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th><?php __("Authorized IP address or network"); ?></th>
|
||||||
|
<td valign="middle" class="lst2">
|
||||||
<p>
|
<p>
|
||||||
<select name="s_ipsub">
|
<select name="s_ipsub">
|
||||||
<?php foreach ($list_ip as $li) { ?>
|
<?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 } ?>
|
<?php } ?>
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
</td>
|
</td>
|
||||||
<td valign=middle>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th> </th>
|
||||||
|
<td valign=middle class="lst2">
|
||||||
<input type="submit" class="inb" value="<?php __("Save")?>" />
|
<input type="submit" class="inb" value="<?php __("Save")?>" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
<p><?php __("You need to have some 'Known IP and networks' defined below to define a new rule.") ?></p>
|
||||||
|
<br/>
|
||||||
<hr/>
|
<hr/>
|
||||||
<h3><?php __("Known IP and networks");?></h3>
|
<h3><?php __("Known IP and networks");?></h3>
|
||||||
<table class="tlist">
|
<table class="tlist">
|
||||||
<tr>
|
<tr><th><?php __("Name"); ?></th><th><?php __("IP or network"); ?></th><th><?php __("Type"); ?></th><th colspan=2/></th></tr>
|
||||||
<td valign=top width=40%>
|
<?php
|
||||||
<table>
|
$col=1;
|
||||||
<tr><th><?php __("Type"); ?></th><th><?php __("IP"); ?></th><th><?php __("Informations"); ?></th><th colspan=2/></tr>
|
foreach($list_ip as $i) {
|
||||||
<?php
|
|
||||||
$col=1;
|
|
||||||
foreach($list_ip as $i) {
|
|
||||||
$col=3-$col;
|
$col=3-$col;
|
||||||
if (checkip($i['ip'])) {
|
if (checkip($i['ip'])) {
|
||||||
if ($i['subnet']==32) {
|
if ($i['subnet']==32) {
|
||||||
|
@ -153,37 +160,34 @@ $lac = $authip->list_affected();
|
||||||
$txt="Subnet IPv6";
|
$txt="Subnet IPv6";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
echo "<tr class='lst$col' ><td>$txt</td><td>{$i['ip_human']}</td><td>{$i['infos']}</td>";
|
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="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>
|
<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>
|
</tr>
|
||||||
|
|
||||||
<?php } ?>
|
<?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>
|
|
||||||
</table>
|
</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">
|
<script type="text/javascript">
|
||||||
function reset_edit_ip() {
|
function reset_edit_ip() {
|
||||||
|
|
|
@ -40,7 +40,7 @@ th {
|
||||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
color: black;
|
color: black;
|
||||||
background: #F1F8FD;
|
background: #ABCDE4;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
@ -106,32 +106,42 @@ hr {
|
||||||
background-color: #BFD3E1;
|
background-color: #BFD3E1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ina:hover, .ina, .inav, .inav:hover {
|
input.ina:hover, input.ina, input.inav, input.inav:hover {
|
||||||
border: 1px solid #999;
|
border: 1px solid #999;
|
||||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
padding: 2px 4px 2px 4px;
|
padding: 2px 4px 2px 4px;
|
||||||
color: black;
|
color: black;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
/*float: right;*/
|
||||||
}
|
}
|
||||||
.ina {
|
input.ina, .ina a {
|
||||||
background-color: #F1F8FD;
|
background-color: #F1F8FD;
|
||||||
}
|
}
|
||||||
.ina:hover, .inav {
|
input.ina:hover, .ina a:hover,
|
||||||
|
input.inav, .inav a {
|
||||||
background-color: #CFE3F1;
|
background-color: #CFE3F1;
|
||||||
}
|
}
|
||||||
.inav:hover {
|
input.inav:hover, .inav a:hover, a.inav:hover {
|
||||||
background-color: #F1F8FD;
|
background-color: #F1F8FD;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ina-active {
|
.ina-active a, a.ina-active, input.ina-active {
|
||||||
background-color: #C1FFCD;
|
background-color: #C1FFCD;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ina a, .inav a {
|
.ina a, a.ina, .inav a, a.inav {
|
||||||
color: black;
|
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;
|
text-decoration: none;
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
@ -166,10 +176,11 @@ hr {
|
||||||
padding-left: 0px;
|
padding-left: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lst1 {
|
|
||||||
background-color: #F1F8FD;
|
|
||||||
}
|
|
||||||
.lst2 {
|
.lst2 {
|
||||||
|
/*background-color: #F1F8FD;*/
|
||||||
|
background-color: #E7F0F9;
|
||||||
|
}
|
||||||
|
.lst1 {
|
||||||
background-color: #CFE3F1;
|
background-color: #CFE3F1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -435,12 +446,35 @@ span#emaildom {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tlist, .tlist td, .tlist th {
|
.tlist, .tlist td, .tlist th,
|
||||||
|
.tlist2, .tlist2 td, .tlist2 th {
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
border-collapse: collapse;
|
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 {
|
input#dir, input#sub_local {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue