Web UI for ARGUS server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

38 lines
939 B

<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
$SiteID = intval( $_POST['SITE'] );
$QS = "SELECT * FROM nodes WHERE site_id = {$SiteID}";
$result = $DATABASE->Query( $QS, false );
$Data = file_get_contents( 'dash/tpl.js' );
if( count( $result ) > 0 ){
$index = 0;
$TPL = array();
foreach( $result as $R ){
$TPL[$index] = file_get_contents( 'dash/node_' . $R['type'] . '.js' );
$TPL[$index] = str_replace('%%%NODEID%%%', ''.$R['id'] , $TPL[$index] );
switch( $R['type'] ){
case ARGUS_SERVER:{
break;
};
case ARGUS_3D_SENSOR:{
break;
};
case ARGUS_IP_PTZ_CAMERA:{
break;
};
};
$index++;
};
$ITEMS = implode( ',', $TPL );
$Data = str_replace('%%%ITEMS%%%', ''.$ITEMS , $Data );
};
if( $Data != '' ) {
echo $Data;
} else {
echo '{}';
};
exit();
};
echo "{}";
?>