";
}
if ($Setup[Type] == 0) {
$text = "
";
$i = 1;
foreach ($Tabs as $line) {
list($subject, $body) = split("\t", $line);
$text .= "
- $icon$subject
";
$i++;
}
$text .= "
";
$i = 1;
foreach ($Tabs as $line) {
list($subject, $body) = split("\t", $line);
$body = tag_decode($body, 1);
$text .= "
$body
";
$i++;
}
$text .= "
";
} elseif ($Setup[Type] == 1) {
$text = "
";
$i = 1;
foreach ($Tabs as $line) {
list($subject, $body) = split("\t", $line);
$body = tag_decode($body, 1);
$text .= "
";
$i++;
}
$text .= "
";
} else {
$text = "
";
$i = 1;
foreach ($Tabs as $line) {
list($subject, $body) = split("\t", $line);
$body = tag_decode($body, 1);
$text .= "
$icon$subject
$body
";
$i++;
}
$text .= "
";
}
if (!$_REQUEST[ajax]) {
if ($Setup[Type] == 2) {
$text .=<<<_
_;
} elseif ($Setup[Type] == 1) {
$text .=<<<_
_;
} else {
$text .=<<<_
_;
}
}
}
} elseif ($_REQUEST[cmd] == 'sidemenu') {
if ($_REQUEST[ID] && is_file("$System[datadir]/menu/$_REQUEST[ID].xml")) {
$xml = simplexml_load_file("$System[datadir]/menu/$_REQUEST[ID].xml");
$paddingTop = ($xml->height - $xml->fontSize) / 2;
if ($xml->mainIcon) {
$mainIcon = "
mainIcon\" style=\"border:0;float:left;margin:$paddingTop"."px 4px 0 0;\" />";
}
if ($xml->subIcon) {
$subIcon = "
subIcon\" style=\"border:0;float:left;margin:$paddingTop"."px 4px 0 0;\" />";
}
if ($xml->childIcon) {
$childIcon = "
childIcon\" style=\"border:0;float:left;margin:$paddingTop"."px 4px 0 0;\" />";
}
$text .=<<<_
";
if (!$_REQUEST[ajax]) {
$text .=<<<_
_;
}
}
} elseif ($_REQUEST[cmd] == 'tree') {
if ($_REQUEST[ID] && is_file("$System[datadir]/menu/$_REQUEST[ID].xml")) {
$xml = simplexml_load_file("$System[datadir]/menu/$_REQUEST[ID].xml");
$text .= "
";
foreach ($xml->Items->main as $mainobj) {
$title = $mainobj->title;
$action = $mainobj->action;
if ($subset = isset($mainobj->sub)) {
$action = "javascript:void(0);";
}
$status == 3 && $text .= "
";
$status >= 2 && $text .= "
";
$status >= 1 && $text .= "";
$status = 1;
$text .= "
$mainIcon$title";
if ($subset) {
$text .= "
";
foreach ($mainobj->sub as $subobj) {
$title = $subobj->title;
$action = $subobj->action;
if ($childset = isset($subobj->child)) {
$action = "javascript:void(0);";
}
$status == 3 && $text .= "
";
$status >= 2 && $text .= "";
$status = 2;
$text .= "
$subIcon$title";
if ($childset) {
$text .= "
";
foreach ($subobj->child as $childobj) {
$title = $childobj->title;
$action = $childobj->action;
$status = 3;
$text .= "
- $childIcon$title
";
}
}
}
}
}
$status >= 2 && $text .= "
";
$status >= 1 && $text .= "";
$text .= "
";
if (!$_REQUEST[ajax]) {
$text .=<<<_
_;
}
}
} elseif ($_REQUEST[cmd] == 'imagechanger') {
if ($_REQUEST[ID] && is_file("$System[path]/$System[datadir]/menu/$_REQUEST[ID].gallery")) {
readini("$System[path]/$System[datadir]/menu/$_REQUEST[ID].gallery");
$text = "
";
$i = 1;
foreach ($Gallery as $line) {
list($listimg, $img, $link, $summary) = split("\t", $line);
if ($link) {
$text .= "

";
} elseif ($img) {
$text .= "

";
} else {
$Setup[Type] && $t = "rel=\"$summary\"";
$text .= "

";
}
$i++;
}
$text .= "
";
if (!$_REQUEST[ajax]) {
if ($Setup[Type]) {
$text .= "
";
} else {
$text .= "
";
}
}
}
}
$encode = $Init[Encode];
$_REQUEST[ajax] && $encode = 'UTF-8';
echo mb_convert_encoding($text, $encode, "UTF-8");
?>