1234567891011121314151617181920212223242526272829303132333435363738 |
- <?php ?>
- [<?php
- $pId = "0";
- $pName = "";
- $pLevel = "";
- $pCheck = "";
- if(array_key_exists( 'id',$_REQUEST)) {
- $pId=$_REQUEST['id'];
- }
- if(array_key_exists( 'lv',$_REQUEST)) {
- $pLevel=$_REQUEST['lv'];
- }
- if(array_key_exists('n',$_REQUEST)) {
- $pName=$_REQUEST['n'];
- }
- if(array_key_exists('chk',$_REQUEST)) {
- $pCheck=$_REQUEST['chk'];
- }
- if ($pId==null || $pId=="") $pId = "0";
- if ($pLevel==null || $pLevel=="") $pLevel = "0";
- if ($pName==null) $pName = "";
- else $pName = $pName.".";
- //for ($i=1; $i<9999; $i++) {
- // for ($j=1; $j<999; $j++) {
- //
- // }
- //}
- for ($i=1; $i<5; $i++) {
- $nId = $pId.$i;
- $nName = $pName."n".$i;
- echo "{ id:'".$nId."', name:'".$nName."', open:true, isParent:".(( $pLevel < "2" && ($i%2)!=0)?"true":"false").($pCheck==""?"":((($pLevel < "2" && ($i%2)!=0)?", halfCheck:true":"").($i==3?", checked:true":"")))."}";
- if ($i<4) {
- echo ",";
- }
- }
- ?>]
|