Skip to content

Commit

Permalink
Update espcounter.class.php
Browse files Browse the repository at this point in the history
  • Loading branch information
directman66 committed Feb 28, 2019
1 parent 1acb338 commit c5f7fd3
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions modules/espcounter/espcounter.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,17 +310,16 @@ function searchdevices(&$out) {
else
{SQLexec("update espcounter_devices set ONLINE='0', LASTPING=".time()." where IPADDR='$ip'");}
*/

$cmd='
$online=ping(processTitle('.$ip.'));
$online=ping(processTitle("'.$ip.'"));
if ($online)
{SQLexec("update espcounter_devices set ONLINE="1", LASTPING=".time()." where IP='.$ip.'");}
{SQLexec("update espcounter_devices set ONLINE=1, LASTPING='.time().' where IP=\''.$ip.'\'");}
else
{SQLexec("update espcounter_devices set ONLINE="0", LASTPING=".time()." where IP='.$ip.'");}
}
';
SetTimeOut('espcounter_ping',$cmd, '10');

{SQLexec("update espcounter_devices set ONLINE=0, LASTPING='.time().' where IP=\''.$ip.'\'");}
';
SetTimeOut('espcounter_ping',$cmd, '1');



Expand Down

0 comments on commit c5f7fd3

Please sign in to comment.