function parseResource($resource) { $matches = array(); $page = ''; $type = 'view'; if (ereg('/(.+)/(.+)', $resource, $matches)) { $page = sanitizeName($matches[1]); $type = $matches[2]; } else { if (ereg('/(.+)', $resource, $matches)) { $page = sanitizeName($matches[1]); } } return array('page' => $page, 'type' => $type); }
function parseResource($resource) { global $DEFAULT_PAGE; $matches = array(); $page = ""; $type = ""; if (ereg("/(.*)/(.*)", $resource, $matches)) { $page = sanitizeName($matches[1]); $type = $matches[2]; } else { if (ereg("/(.*)", $resource, $matches)) { $page = sanitizeName($matches[1]); } } if ($page == "") { $page = $DEFAULT_PAGE; } if ($type == "") { $type = "view"; } return array("page" => $page, "type" => $type); }
array_push($properties, $cell->id); array_push($properties, $cell->getAttribute("name")); array_push($properties, cleanNote($cell->getAttribute("Note"))); array_push($properties, $cell->getAttribute("Type")); $p = $cell->getAttribute("Primitives"); if($cell->getAttribute("ScatterplotOrder") == "Y Primitive, X Primitive"){ $items = split(",", $p); $temp = $items[1]; $items[1] = $items[0]; $items[0] = $temp; $p = join(",", $items); } array_push($properties, $p); array_push($properties, $cell->getAttribute("ThreeDimensional")); array_push($properties, $cell->getAttribute("xAxis")); array_push($properties, $cell->getAttribute("yAxis")); break;*/ case "Folder": array_push($properties, "folder"); array_push($properties, $cell->id); array_push($properties, sanitizeName($cell->getAttribute("name"), "Folder")); array_push($properties, cleanNote($cell->getAttribute("Note"))); $children = simguaPrimitives(childrenCells($cell)); $children = join(",", array_map("getID", $children)); array_push($properties, $children); break; } array_push($primitives, join($propSep, $properties)); } $modelData = join($primSep, $primitives); //exit("Error: ".$modelData." End");