Web Interface For Lite Argus Control modules
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
725 B

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