$savemsg=sprintf(gettext('Sent magic packet to %s (%s).'),$mac,$description);
}else{
$savemsg=sprintf(gettext('Please check the %ssystem log%s, the wol command for %s (%s) did not complete successfully.'),'<a href="/diag_logs.php">','</a>',$description,$mac);
}
}
}
if($_POST||$_GET['mac']){
unset($input_errors);
if($_GET['mac']){
/* normalize MAC addresses - lowercase and convert Windows-ized hyphenated MACs to colon delimited */
$savemsg=sprintf(gettext('Sent magic packet to %s.'),$mac);
}else{
$savemsg=sprintf(gettext('Please check the %ssystem log%s, the wol command for %s did not complete successfully.'),'<a href="/diag_logs.php">','</a>',$mac);
$result[]=sprintf(gettext('Sent magic packet to %s (%s).'),htmlspecialchars($wolent['mac']),$wolent['descr']);
}else{
$result[]=sprintf(gettext('Please check the %ssystem log%s, the wol command for %s (%s) did not complete successfully.'),'<a href="/diag_logs.php">','</a>',$wolent['descr'],htmlspecialchars($wolent['mac']));
$savemsg=sprintf(gettext('Sent magic packet to %s.'),$_POST['mac']);
}else{
$savemsg=sprintf(gettext('Please check the %ssystem log%s, the wol command for %s did not complete successfully.'),'<a href="/diag_logs.php">','</a>',$_POST['mac']);
}
}
}
}
include("head.inc");
?>
<body>
<script type="text/javascript">
$(document).ready(function(){
// delete host action
$(".act_delete_entry").click(function(event){
event.preventDefault();
varid=$(this).data("id");
// delete single
BootstrapDialog.show({
type:BootstrapDialog.TYPE_DANGER,
title:"<?=gettext("Wake on LAN");?>",
message:"<?=gettext("Do you really want to delete this entry?");?>",
<p><?=gettext("Wake all clients at once: ");?><ahref="services_wol.php?wakeall=true"class="btn btn-default btn-xs"><spanclass="glyphicon glyphicon-time"></span></a><?=gettext("Or Click the MAC address to wake up an individual device:");?></p>
<tdvalign="middle"><ahref="services_wol.php?act=del&id=<?=$i;?>"onclick="return confirm('<?=gettext("Do you really want to delete this entry?");?>')"class="btn btn-default btn-xs"><spanclass="fa fa-trash text-muted"></span></a></td>
</tr>
</table>
</td>
</tr>
<?php$i++;endforeach;?>
</table>
</div>
<divclass="container-fluid">
<pclass="vexpl">
<spanclass="text-danger">
<strong>
<?=gettext("Note:");?><br/>
</strong>
</span><?=gettext('This service can be used to wake up (power on) computers by sending special "Magic Packets". The NIC in the computer that is to be woken up must support Wake on LAN and has to be configured properly (WOL cable, BIOS settings).');?>
<?=gettext('This service can be used to wake up (power on) computers by sending special "Magic Packets". The NIC in the computer that is to be woken up must support Wake on LAN and has to be configured properly (WOL cable, BIOS settings).');?>