$savemsg=sprintf(gettext('Sent magic packet to %s (%s).'),$mac,$description);
$result[]=sprintf(gettext('Sent magic packet to %s (%s).'),htmlspecialchars($wolent['mac']),$wolent['descr']);
}else{
}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);
$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']));
}
}
}
}
}
echojson_encode($result);
exit;
if($_POST||$_GET['mac']){
}elseif(isset($_POST['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);
$savemsg=sprintf(gettext('Sent magic packet to %s.'),$_POST['mac']);
}else{
}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);
$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']);
}
}
}
}
}
}
}
}
if($_GET['act']=="del"){
if($a_wol[$_GET['id']]){
unset($a_wol[$_GET['id']]);
write_config();
header("Location: services_wol.php");
exit;
}
}
include("head.inc");
include("head.inc");
?>
?>
<body>
<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?");?>",
<?=gettext("Or Click the MAC address to wake up an individual device:");?>
</td>
</tr>
</tfoot>
</table>
</table>
</div>
</div>
</form>
<divclass="container-fluid">
<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>
<?=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).');?>
</td>
</td>
</tr>
</tr>
<?php$i++;endforeach;?>
</tfoot>
</table>
</table>
</div>
</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).');?>