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.

19 lines
703 B

​
​
​
​
​
​
4 years ago
​
​
4 years ago
​
​
4 years ago
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. if( $CUser->Data['id'] > 1 ){
  4. $GID = intval($_POST['SITE']);
  5. $QS = "SELECT * FROM nodes WHERE site_id={$GID}";
  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. if( in_array( $ct, array( 1, 2, 3, 5, 6, 10, 11, 12, 13 ) ) ){
  13. $DL[] = "{ xtype: 'button', text: '{$CD['name']}', width: '100%', handler: function(){ locationSelectedNode={$cid}; loadNodeLocationProps({$cid}); } }";
  14. };
  15. };
  16. echo $Data . implode(',',$DL) ."] }";
  17. } else {
  18. echo "{}";
  19. };
  20. ?>