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