getNodesForBigData.php 452 B

123456789101112131415161718192021222324
  1. <?php ?>
  2. [<?php
  3. $pId = "-1";
  4. if(array_key_exists( 'id',$_REQUEST)) {
  5. $pId=$_REQUEST['id'];
  6. }
  7. $pCount = "10";
  8. if(array_key_exists( 'count',$_REQUEST)) {
  9. $pCount=$_REQUEST['count'];
  10. }
  11. if ($pId==null || $pId=="") $pId = "0";
  12. if ($pCount==null || $pCount=="") $pCount = "10";
  13. $max = (int)$pCount;
  14. for ($i=1; $i<=$max; $i++) {
  15. $nId = $pId."_".$i;
  16. $nName = "tree".$nId;
  17. echo "{ id:'".$nId."', name:'".$nName."'}";
  18. if ($i<$max) {
  19. echo ",";
  20. }
  21. }
  22. ?>]