Page 1 of 1

Console Button to Active External Alarm

Posted: Sun Jun 15, 2008 12:41 pm
by dimiz
Hi to all!! Im not so good developer in HTML/PHP i need to create a button on console view page to active an external alarm.
i have add a line like this:
---
<input class="form" onClick="javascript: (<?php AlarmOn)?>) "type="submit" value="AlarmOn"/>
---
in zm_html_view_console.php

and a function call AlarmOn in zm_funcs.php
----
function AlarmOn()
{
$status=shell_exec( '/var/www/cgi-bin/relay.pl 1' );
$status="On";
return($status);
}
----

in this mode if i saw some strange allarm from my office a can start my external alarm.

Only problem this code work only when i load the page but not i push the button...
Please help many thanks