Exemple #1
0
 static function navtojson()
 {
     global $sections;
     $json_array = array();
     for ($i = 0; $i < count($sections); $i++) {
         if ($sections[$i]->depth == 0) {
             $obj = null;
             $obj->id = $sections[$i]->name . $sections[$i]->id;
             /*if ($sections[$i]->active == 1) { 
             			$obj->disabled = false;
             		} else { 
             			$obj->disabled = true;
             		}*/
             //$obj->disabled = true;
             $obj->itemdata = navigationmodule::getChildren($i);
         }
         $json_array[] = $obj;
     }
     return json_encode($json_array);
 }