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.
 
 
 
 

20 lines
703 B

<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
$GID = intval($_POST['SITE']);
$QS = "SELECT * FROM nodes WHERE site_id={$GID}";
$Result = $DATABASE->Query( $QS, false );
$Data = "{ xtype: 'panel', frame: false, bodyStyle:'padding:5px 5px 0', items: [";
$DL = array();
foreach( $Result as $CD ){
$cid = intval($CD['id']);
$ct = intval($CD['type']);
if( in_array( $ct, array( 1, 2, 3, 5, 6, 10, 11, 12, 13 ) ) ){
$DL[] = "{ xtype: 'button', text: '{$CD['name']}', width: '100%', handler: function(){ locationSelectedNode={$cid}; loadNodeLocationProps({$cid}); } }";
};
};
echo $Data . implode(',',$DL) ."] }";
} else {
echo "{}";
};
?>