function maine() { // if (isset($_GET['sm'])) { sitemap($_GET['sm']); } }
function index_map() { global $output_paths; $output_dir = $output_paths['output_dir']; $output_url = $output_paths['output_url']; foreach (glob("{$output_dir}*.xml") as $file_name) { // Just the file name please. $file_name = preg_replace("|{$output_dir}|", '', $file_name); $index_urls .= sitemap(array('url' => $output_url . $file_name, 'changefreq' => 'daily')); } write_file($output_paths['index_file'], sitemapindex($index_urls)); }
function sitemap($refid, $art = "", $modify = "", $self = "") { switch ($art) { case menued: $hidestatus = -1; $sortinfo = -1; $aktionlinks = -1; break; case select: $radiorefid = -1; break; default: } global $cfg, $environment, $db, $pathvars, $specialvars, $rechte, $ast, $astpath, $lokal; $sql = "SELECT " . $cfg["db"]["menu"]["entries"] . ".mid,\n " . $cfg["db"]["menu"]["entries"] . ".entry,\n " . $cfg["db"]["menu"]["entries"] . ".refid,\n " . $cfg["db"]["menu"]["entries"] . ".level,\n " . $cfg["db"]["menu"]["entries"] . ".sort,\n " . $cfg["db"]["menu"]["entries"] . ".hide,\n " . $cfg["db"]["lang"]["entries"] . ".lang,\n " . $cfg["db"]["lang"]["entries"] . ".label,\n " . $cfg["db"]["lang"]["entries"] . ".exturl\n FROM " . $cfg["db"]["menu"]["entries"] . "\n INNER JOIN " . $cfg["db"]["lang"]["entries"] . "\n ON " . $cfg["db"]["menu"]["entries"] . ".mid = " . $cfg["db"]["lang"]["entries"] . ".mid\n WHERE (" . $cfg["db"]["menu"]["entries"] . ".refid=" . $refid . ")\n AND (" . $cfg["db"]["lang"]["entries"] . ".lang='" . $environment["language"] . "')\n ORDER BY " . $cfg["db"]["menu"]["order"] . ";"; $result = $db->query($sql); while ($array = $db->fetch_array($result, 1)) { if ($art == "select" && $array["mid"] == $modify) { continue; } if ($array["level"] == "") { $right = -1; } else { if ($rechte[$array["level"]] == -1) { $right = -1; } else { $right = 0; } } if ($right == -1) { if ($refid == 0) { $ast = array(0); $astpath = array($array["entry"]); } // ast einruecken if (!in_array($refid, $ast, TRUE)) { $ast[] = $refid; $astpath[] = $array["entry"]; $tiefe = array_search($refid, $ast, TRUE); // ast ausruecken bzw. auf dem aktuellen wert setzen } else { $key = array_search($refid, $ast, TRUE); while (array_key_exists($key, $ast)) { array_pop($ast); array_pop($astpath); } // aktuellen wert setzen $ast[] = $refid; $astpath[] = $array["entry"]; $tiefe = array_search($refid, $ast, TRUE); } // tiefe in anzeige wandeln $path = ""; $level = ""; for ($i = 0; $i < $tiefe; $i++) { $path .= $astpath[$i] . "/"; $level .= "<img src=\"" . $cfg["iconpath"] . "pos.png\" alt=\"\" width=\"24\" height=\"1\">"; } // schaltflaechen erstellen $aktion = ""; if (is_array($modify)) { foreach ($modify as $name => $value) { if ($name == "up" || $name == "down") { if ($array["refid"] == 0) { $ankerpos = "<a name=\"" . $array["mid"] . "\"</a>"; $ankerlnk = "#" . $array["mid"]; } else { #$anker = "#".$ankerid; $ankerpos = ""; $ankerlnk = "#" . $ast[1]; } } else { $ankerlnk = ""; } if ($value[2] == "" || $rechte[$value[2]] == -1) { $aktion .= "<a href=\"" . $cfg["basis"] . "/" . $value[0] . $name . "," . $array["mid"] . "," . $array["refid"] . ".html" . $ankerlnk . "\"><img src=\"" . $cfg["iconpath"] . $name . ".png\" border=\"0\" alt=\"" . $value[1] . "\" title=\"" . $value[1] . "\" width=\"24\" height=\"18\"></a>"; } else { $aktion .= "<img src=\"" . $cfg["iconpath"] . "pos.png\" alt=\"\" width=\"24\" height=\"18\">"; } } } if ($level == "") { $array["label"] = "<b>" . $array["label"] . "</b>"; } // tabellen farben wechseln if ($cfg["color"]["set"] == $cfg["color"]["a"]) { $cfg["color"]["set"] = $cfg["color"]["b"]; } else { $cfg["color"]["set"] = $cfg["color"]["a"]; } // refid radio button if ($radiorefid != "") { $radiobutton = "<input type=\"radio\" name=\"refid\" value=\"" . $array["mid"] . "\" />"; } // hide status anzeigen if ($hidestatus != "") { if ($array["hide"] == -1) { $hideimage = "cms-cb0.png"; $hidetext = "#(disabled)"; } else { $hideimage = "cms-cb1.png"; $hidetext = "#(enabled)"; } } // wo geht der href hin? if ($array["exturl"] == "") { $href = $pathvars["virtual"] . "/" . $path . $array["entry"] . ".html"; $extern = ""; } else { $href = $array["exturl"]; $extern = " #(extern)"; } $tree .= "<tr bgcolor=\"" . $cfg["color"]["set"] . "\">\n"; if ($radiorefid != "") { $tree .= "<td>" . $radiobutton . "</td>\n"; } if ($hidestatus != "") { $tree .= "<td><img src=\"" . $cfg["iconpath"] . $hideimage . "\" border=\"0\" alt=\"" . $hidetext . "\" title=\"" . $hidetext . "\" width=\"13\" height=\"13\"></td>\n"; } if ($sortinfo != "") { $tree .= "<td>(" . $array["sort"] . ")</td>\n"; } $tree .= "<td width=\"100%\">" . $level . $ankerpos . "<a class=\"\" href=\"" . $href . "\"><img src=\"" . $cfg["iconpath"] . "sitemap.png\" width=\"16\" height=\"16\" align=\"absbottom\" border=\"0\"><img src=\"" . $pathvars["images"] . "pos.png\" width=\"3\" height=\"1\" align=\"absbottom\" border=\"0\">" . $array["label"] . "</a>" . $extern . "</td>\n"; if ($aktionlinks != "") { $tree .= "<td align=\"right\" nowrap>" . $aktion . "</td>\n"; } $tree .= "</tr>\n"; $tree .= sitemap($array["mid"], $art, $modify, -1); } } if ($self == "") { if ($art == "select") { $tree = "<tr>\n<td><input type=\"radio\" name=\"refid\" value=\"" . $refid . "\" />\n</td><td width=\"100%\">#(root)</td>\n</tr>\n" . $tree; } $tree = "<table width=\"100%\">" . $tree . "</table>"; } return $tree; }
function generate() { global $edit, $langmessage, $set, $pagenum, $menu, $templatepath, $selected, $LNEversion, $prefix, $out; $edit = 0; $count = 0; $go_sm = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset\n\t\n xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"\n\t\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\t\n xsi:schemaLocation=\"http://www.sitemaps.org/schemas/sitemap/0.9\n http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd\">\n\n\t<url>\n\n\t<loc>http://" . sv(SERVER_NAME) . "/</loc>\n\n\t<priority>0.6</priority>\n\n\t<lastmod>" . date('Y-m-d') . "</lastmod>\n\n\t<changefreq>daily</changefreq>\n</url>\n"; while ($menu[$count][0] != "") { $result1 = dbquery("SELECT * FROM " . $prefix . "paginas WHERE page=\"" . str_replace("_", "", $menu[$count][3]) . "\""); $row1 = fetch_array($result1); if ($row1['template'] != "") { $template2 = $row1['template']; } else { $template2 = $set['template']; } $row1['description'] = decode($row1['description']); $out = ""; $pagenum = str_replace("''", "'", $menu[$count][3]); $pagenum = str_replace("_", "", $pagenum); if (!strval(strstr($menu[$count][3], "*"))) { $selected['index'] = $menu[$count][0]; $selected['name'] = $menu[$count][4]; $selected['link'] = $menu[$count][3]; //query page record for template $page = "<?php \$pagenum=\"" . $pagenum . "\"; require_once \"./LightNEasy/runtime.php\"; ?>\n"; $page .= file_get_contents("templates/" . $template2 . "/template.php"); $go_sm .= "<url>\n\n\t\t\t<loc>http://" . sv(SERVER_NAME) . dirname(sv(REQUEST_URI)) . $menu[$count][3] . ".php</loc>\n\n\t\t\t<priority>0.5</priority>\n\n\t\t\t<lastmod>" . date('Y-m-d') . "</lastmod>\n\n\t\t\t<changefreq>daily</changefreq>\n\n\t\t\t</url>\n"; if (!($fp = fopen($pagenum . ".php", "w"))) { die($langmessage[110] . $pagenum . ".php"); } $contnt = html_entity_decode(stripslashes($row1['content'])); //Look in the content for header modules while ($page != "") { if ($pagearray = explode($set['openfield'], $page, 2)) { $out .= $pagearray[0]; $page = $pagearray[1]; if ($pagearray = explode($set['closefield'], $page, 2)) { $command = trim($pagearray[0]); $page = $pagearray[1]; switch ($command) { case "content": contentmarkers($contnt); $out .= "<?php content(\"" . $pagenum . "\"); ?>"; break; case "header": $out .= printheader(1, $selected['name'], $row1['description'], $template2); break; case "footer": $out .= "<?php print footer(); ?>"; break; case "search": $out .= "<?php print searchform(); ?>"; break; case "homelink": $out .= "<a href=\"" . $set['homepath'] . "\">{$langmessage['111']}</a>"; break; case "image": $out .= "templates/" . $set['template'] . "/images/"; break; case "extra": $out .= "<?php print extra(\"" . $selected['link'] . "\"); ?>\n"; break; case "login": $out .= "<?php print loginout(); ?>\n"; break; case "loginform": $out .= "<?php print loginform(); ?>\n"; break; case "mainmenu": $out .= "<?php print mainmenu(1); ?>\n"; break; case "mainmenu1": $out .= "<?php print mainmenu(1,1); ?>\n"; break; case "mainmenu2": $out .= "<?php print mainmenu(1,2); ?>\n"; break; case "mainmenu3": $out .= "<?php print mainmenu(1,3); ?>\n"; break; case "treemenu": $out .= "<?php print treemenu(1); ?>\n"; break; case "fullmenu": $out .= "<?php print fullmenu(1); ?>\n"; break; case "expmenu": $out .= "<?php print expmenu(1); ?>\n"; break; case "submenu": $out .= "<?php print submenu(1); ?>\n"; break; case "selected": $out .= $selected['name']; break; case "sitemap": $out .= sitemap(1); break; case "subtitle": $out .= $set['subtitle']; break; case "title": $out .= '<a href="' . $set['homepath'] . '">' . $set['title'] . '</a>'; break; default: if (strpos($command, "plugin") !== false) { $aa = explode(" ", $command, 2); $pluginpath = "plugins/" . trim($aa[1]); if (file_exists($pluginpath . "/first.mod")) { $out = file_get_contents($pluginpath . "/first.mod") . $out; } if (file_exists($pluginpath . "/header.mod")) { $out = str_replace("</head>", file_get_contents($pluginpath . "/header.mod") . "\n</head>", $out); } if (file_exists($pluginpath . "/onload.mod")) { $out = str_replace("<body", "<body onload=\"" . file_get_contents($pluginpath . "/onload.mod") . "\"", $out); } if (file_exists($pluginpath . "/include.mod")) { $out .= "<?php include \"plugins/" . trim($aa[1]) . "/include.mod\"; ?>\n"; } if (file_exists($pluginpath . "/place.mod")) { $out .= file_get_contents("{$pluginpath}/place.mod"); } } elseif (strpos($command, "extra") !== false) { $aa = explode(" ", $command, 2); $out .= "<?php print extra(\"" . $selected['link'] . "\"," . $aa[1] . "); ?>"; } else { $found = false; $addons = fetch_all(dbquery("SELECT * FROM " . $prefix . "addons WHERE active=1")); foreach ($addons as $addon) { if ($command == $addon['name']) { $out .= "<?php require_once \"addons/" . $addon['name'] . "/main.php\"; print " . $addon['fname'] . "(); ?>"; $found = true; break; } elseif (substr($command, 0, strlen($addon['name'])) == $addon['name']) { $found = true; $out .= "<?php require_once \"addons/" . $addon['name'] . "/main.php\"; "; $bb = trim(substr($command, strlen($addon['name']))); $aa = explode(" ", $bb); if ($aa[3] != "") { $out .= "print " . $addon['fname'] . "('{$aa['0']}','{$aa['1']}','{$aa['2']}','{$aa['3']}')"; } elseif ($aa[2] != "") { $out .= "print " . $addon['fname'] . "('{$aa['0']}','{$aa['1']}','{$aa['2']}')"; } elseif ($aa[1] != "") { $out .= "print " . $addon['fname'] . "('{$aa['0']}','{$aa['1']}')"; } else { $out .= "print " . $addon['fname'] . "('{$aa['0']}')"; } $out .= "; ?>"; break; } } if (!$found) { $out .= $command; } } } } else { break; } } else { break; } } if ($page != "") { $out .= $page; } fwrite($fp, $out); fclose($fp); @chmod($menu[$count][3] . ".php", 0755); if (file_exists($menu[$count][3] . ".html")) { unlink($menu[$count][3] . ".html"); } } $count++; } $go_sm .= "</urlset>\n"; $fp_go = fopen('sitemap.xml', 'w'); fwrite($fp_go, $go_sm); fclose($fp_go); unset($_SESSION[$set['password']]); setcookie('userpass', "", time() - 60); setcookie('userhandle', "", time() - 60); session_destroy(); unset($_GET['do']); header("Location: index.php"); }
$pages = isset($_GET['pages']) ? $_GET['pages'] : ""; switch ($pages) { case 'add': Add(); break; case 'edit': edit(); break; case 'dell': delete(); break; case 'view': view(); break; case 'sitemap': sitemap(); break; case 'admin': admin(); break; default: homepage(); } function sitemap() { $results['articles'] = Pages::getList(); $list = '<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'; foreach ($results['articles'] as $data) { $list = $list . ' <url>
$form_values = $HTTP_POST_VARS; } // form options holen $form_options = form_options(eCRC($environment["ebene"]) . "." . $environment["kategorie"]); // form elememte bauen $element = form_elements($cfg["menued"]["db"]["menu"]["entries"], $form_values); // form elemente erweitern #$element["new_lang"] = "<input name=\"new_lang\" type=\"text\" maxlength=\"5\" size=\"5\">"; // +++ // page basics #if ( $_GET["id"] != "" ) { # locate($HTTP_GET_VARS["id"]); #} else { # $positionArray[] = "nop"; #} $ausgaben["show_menu"] .= sitemap(0, "menued", "select", ""); // page basics // *** // design $ausgaben["design"] = ""; // fehlermeldungen $ausgaben["form_error"] = ""; // navigation erstellen $ausgaben["form_aktion"] = $cfg["menued"]["basis"] . "/move," . $environment["parameter"][1] . "," . $environment["parameter"][2] . ",verify.html"; $ausgaben["form_break"] = $cfg["menued"]["basis"] . "/list.html"; // hidden values $ausgaben["form_hidden"] .= ""; // navigation erstellen $ausgaben["renumber"] = ""; $ausgaben["new"] = ""; // was anzeigen
You may contact the author/development team at: Chaos Networks c/o Werner Ammon Lerchenstr. 11c 86343 Königsbrunn URL: http://www.chaos.de */ //////////////////////////////////////////////////////////////////////////////////////////////////////////////// if ($cfg["sitemap"]["right"] == "" || $rechte[$cfg["sitemap"]["right"]] == -1) { // funktions bereich // *** $positionArray["nop"] = "nop"; $ausgaben["output"] = sitemap(0, "sitemap", "sitemap", $modify); // +++ // funktions bereich // page basics // *** // fehlermeldungen if ($HTTP_GET_VARS["error"] != "") { if ($HTTP_GET_VARS["error"] == 1) { $ausgaben["form_error"] = "#(error1)"; } } else { $ausgaben["form_error"] = ""; } // hidden values #$ausgaben["form_hidden"] .= ""; // was anzeigen
Chaos Networks c/o Werner Ammon Lerchenstr. 11c 86343 Königsbrunn URL: http://www.chaos.de */ //////////////////////////////////////////////////////////////////////////////////////////////////////////////// if ($rechte[$cfg["right"]] == -1) { $modify = array("add" => array("", "#(button_desc_add)", $cfg["right"]), "edit" => array("", "#(button_desc_edit)", $cfg["right"]), "delete" => array("", "#(button_desc_delete)", $cfg["right"]), "up" => array("sort,", "#(button_desc_up)", $cfg["right"]), "down" => array("sort,", "#(button_desc_down)", $cfg["right"]), "move" => array("", "#(button_desc_move)", $cfg["right"])); // bei eingeschalteten content recht wird button hinzugefuegt if ($specialvars["security"]["enable"] == -1) { $modify["rights"] = array("", "#(button_desc_right)", $cfg["right"]); } $ausgaben["output"] .= sitemap(0, "menued", $modify); // fehlermeldungen if ($HTTP_GET_VARS["error"] != "") { if ($HTTP_GET_VARS["error"] == 1) { $ausgaben["form_error"] = "#(error1)"; } } else { $ausgaben["form_error"] = ""; } // navigation erstellen $ausgaben["renumber"] = "<a href=\"" . $cfg["basis"] . "/sort,all,nop,0.html\">#(renumber)</a>"; $ausgaben["new"] = "<a href=\"" . $cfg["basis"] . "/add,0.html\">#(new)</a>"; // was anzeigen $mapping["main"] = crc32($environment["ebene"]) . ".list"; $mapping["navi"] = "leer"; // unzugaengliche #(marken) sichtbar machen
<?php } ?> <li><a href="<?php echo sitemap($category->module); ?> "><?php echo lang_decode($category->name); ?> </a> <ul> <?php foreach ($childs->where('parents = ' . $category->id)->get() as $child) { ?> <li><a href="<?php echo sitemap($child->module, $child->id); ?> "><?php echo lang_decode($child->name); ?> </a></li> <?php } ?> </ul> </li> <?php if ($key == $num - 1) { ?> </ul> </div>
function center() { // fatal session produced on failed login, and will display error message. if (isset($_SESSION[_SITE . 'fatal'])) { echo $_SESSION[_SITE . 'fatal']; unset($_SESSION[_SITE . 'fatal']); } else { global $categorySEF, $subcatSEF, $articleSEF; switch (true) { case isset($_GET['category']): $action = $categorySEF; break; case isset($_GET['action']): $action = $categorySEF == '404' ? $categorySEF : clean(cleanXSS($_GET['action'])); break; } switch (true) { case isset($_POST['search_query']): search(); return; break; case isset($_POST['comment']): comment('comment_posted'); return; break; case isset($_POST['contactform']): contact(); return; break; case isset($_POST['Loginform']): administration(); return; break; case isset($_POST['submit_text']): processing(); return; break; } if (_ADMIN) { switch ($action) { case 'administration': administration(); return; break; case 'snews_settings': settings(); return; break; case 'snews_categories': admin_categories(); return; break; case 'admin_category': form_categories(); return; break; case 'admin_subcategory': form_categories('sub'); return; break; case 'groupings': admin_groupings(); return; break; case 'admin_groupings': form_groupings(); return; break; case 'snews_articles': admin_articles('article_view'); return; break; case 'extra_contents': admin_articles('extra_view'); return; break; case 'snews_pages': admin_articles('page_view'); return; break; case 'admin_article': form_articles(''); return; break; case 'article_new': form_articles('article_new'); return; break; case 'extra_new': form_articles('extra_new'); return; break; case 'page_new': form_articles('page_new'); return; break; case 'editcomment': edit_comment(); return; break; case 'snews_files': files(); return; break; case 'process': processing(); return; break; case 'logout': session_destroy(); echo '<meta http-equiv="refresh" content="2; url=' . _SITE . '">'; echo '<h2>' . l('log_out') . '</h2>'; return; break; } } switch ($action) { case 'archive': archive(); break; case 'sitemap': sitemap(); break; case 'contact': contact(); break; case 'login': login(); break; case '404': echo l('error_404'); break; default: articles(); break; } } }
if (count($HTTP_POST_VARS) == 0) { $sql = "SELECT * FROM " . $cfg["db"]["menu"]["entries"] . " WHERE " . $cfg["db"]["menu"]["key"] . "='" . $environment["parameter"][1] . "'"; $result = $db->query($sql); $form_values = $db->fetch_array($result, 1); } else { $form_values = $HTTP_POST_VARS; } // form options holen $form_options = form_options(eCRC($environment["ebene"]) . "." . $environment["kategorie"]); // form elememte bauen $element = form_elements($cfg["db"]["menu"]["entries"], $form_values); // form elemente erweitern #$element["new_lang"] = "<input name=\"new_lang\" type=\"text\" maxlength=\"5\" size=\"5\">"; // +++ // page basics $ausgaben["output"] .= sitemap(0, "select", $environment["parameter"][1]); // page basics // *** // fehlermeldungen $ausgaben["form_error"] = ""; // navigation erstellen $ausgaben["form_aktion"] = $cfg["basis"] . "/move," . $environment["parameter"][1] . ",verify.html"; $ausgaben["form_break"] = $cfg["basis"] . "/list.html"; // hidden values $ausgaben["form_hidden"] .= ""; // was anzeigen $mapping["main"] = eCRC($environment["ebene"]) . ".move"; $mapping["navi"] = "leer"; // unzugaengliche #(marken) sichtbar machen // *** if (isset($HTTP_GET_VARS["edit"])) {
function sitemap404($text = '') { return '<h2 class="sitemap">' . tf('Воспользуйтесь картой сайта') . '</h2>' . sitemap(); }
echo sitemap(WEB_URL . '/index.php', $cdate); // query โมดูลที่ติดตั้งแล้วทั้งหมด $sql = "SELECT M.`module`,M.`owner`,I.`language`,M.`id`"; $sql .= " FROM `" . DB_MODULES . "` AS M"; $sql .= " LEFT JOIN `" . DB_INDEX . "` AS I ON I.`module_id`=M.`id` AND I.`index`='1'"; $datas = $cache->get($sql); if (!$datas) { $datas = $db->customQuery($sql); $cache->save($sql, $datas); } $modules = array(); $owners = array(); foreach ($datas as $item) { $modules[$item['id']] = $item['module']; $owners[$item['owner']][] = $item['id']; echo sitemap(gcms::getURL($item['module'], '', 0, 0, $item['language'] == '' ? '' : "lang={$item['language']}", false), $cdate); } // modules $dir = ROOT_PATH . 'modules/'; $f = @opendir($dir); if ($f) { while (false !== ($owner = readdir($f))) { if ($owner != '.' && $owner != '..') { if (is_file($dir . "{$owner}/sitemap.php")) { include $dir . "{$owner}/sitemap.php"; } } } closedir($f); } echo '</urlset>';
function sitemap($refid) { global $environment, $db, $mt, $mtl, $pathvars, $specialvars, $rechte, $ast, $astpath, $lokal; $sql = "SELECT {$mt}.mid, {$mt}.entry, {$mt}.refid, {$mt}.level, {$mt}.sort, {$mtl}.lang, {$mtl}.label, {$mtl}.exturl FROM {$mt} INNER JOIN {$mtl} ON {$mt}.mid = {$mtl}.mid WHERE ((({$mt}.refid)={$refid}) AND (({$mtl}.lang)='" . $environment["language"] . "')) order by sort, label;"; #echo $sql; $menuresult = $db->query($sql); $modify = array("add" => array("modify,", "Hinzufügen", $cfg["right"]["admin"]), "edit" => array("modify,", "Editieren", $cfg["right"]["admin"]), "delete" => array("modify,", "Löschen", $cfg["right"]["admin"]), "up" => array("move,", "Nach oben", $cfg["right"]["admin"]), "down" => array("move,", "Nach unten", $cfg["right"]["admin"])); $imgpath = $pathvars["images"]; while ($menuarray = $db->fetch_array($menuresult, 1)) { if ($menuarray["level"] == "") { $right = -1; } else { if ($rechte[$menuarray["level"]] == -1) { $right = -1; } else { $right = 0; } } if ($right == -1) { if ($refid == 0) { $ast = array(0); $astpath = array($menuarray["entry"]); } // ast einruecken if (!in_array($refid, $ast, TRUE)) { $ast[] = $refid; $astpath[] = $menuarray["entry"]; $tiefe = array_search($refid, $ast, TRUE); // ast ausruecken bzw. auf dem aktuellen wert setzen } else { // aktuellen wert loeschen array_pop($ast); array_pop($astpath); // evtl. ast ausruecken if (array_search($refid, $ast, TRUE) >= 1) { array_pop($ast); array_pop($astpath); } // aktuellen wert setzen $ast[] = $refid; $astpath[] = $menuarray["entry"]; $tiefe = array_search($refid, $ast, TRUE); } // tiefe in anzeige wandeln $path = ""; $level = ""; for ($i = 0; $i < $tiefe; $i++) { $path .= $astpath[$i] . "/"; $level .= "__________"; } $aktion = ""; foreach ($modify as $name => $value) { if ($name == "up" || $name == "down") { if ($menuarray["refid"] == 0) { $ankerpos = "<a name=\"" . $menuarray["mid"] . "\"</a>"; $ankerlnk = "#" . $menuarray["mid"]; } else { #$anker = "#".$ankerid; $ankerpos = ""; $ankerlnk = "#" . $ast[1]; } } else { $ankerlnk = ""; } if ($value[2] == "" || $rechte[$value[2]] == -1) { $aktion .= "<a href=\"" . $environment["basis"] . "/" . $value[0] . $name . "," . $menuarray["mid"] . "," . $menuarray["refid"] . ".html" . $ankerlnk . "\"><img src=\"" . $pathvars["images"] . $name . ".png\" border=\"0\" alt=\"" . $value[1] . "\" title=\"" . $value[1] . "\" width=\"24\" height=\"18\"></a>"; } else { $aktion .= "<img src=\"" . $imgpath . "pos.png\" alt=\"\" width=\"24\" height=\"18\">"; } } #echo "<pre>"; #print_r($ast); #echo ">".$menuarray["label"].":".$menuarray["entry"]; #echo "</pre>"; #$tree .= "<tr><td>".$tet.$level."<a class=\"\" href=\"".$pathvars["virtual"]."/".$path.$menuarray["entry"].".html\">".$menuarray["label"]."</a></td><td>".$menuarray["entry"]."</td><td>m: ".$menuarray["mid"]."</td><td>r: ".$menuarray["refid"]./*"</td><td>s: ".$menuarray["sort"].*/"</td><td>".$aktion."</td></tr>"; if ($level == "") { $menuarray["label"] = "<b>" . $menuarray["label"] . "</b>"; } $tree .= "<tr><td>" . $level . $ankerpos . "<a class=\"\" href=\"" . $pathvars["virtual"] . "/" . $path . $menuarray["entry"] . ".html\"><img src=\"" . $pathvars["images"] . "sitemap.png\" width=\"16\" height=\"16\" align=\"absbottom\" border=\"0\"><img src=\"" . $pathvars["images"] . "pos.png\" width=\"3\" height=\"1\" align=\"absbottom\" border=\"0\">" . $menuarray["label"] . "</a></td><td>" . $aktion . "</td></tr>"; $tree .= sitemap($menuarray["mid"]); } } return $tree; }
function sitemap($level_header, $sitemaploop, $level_footer, $show_hidden, $parent = 0, $to_depth = 0, $current_depth = 0) { global $database; if ($show_hidden == 1) { $where_sql = "visibility != 'deleted'"; } else { $where_sql = "visibility = 'public'"; } // Query pages $query_menu = $database->query("SELECT `page_id`,`parent`,`link`,`page_title`,`menu_title`,`description`,`keywords`,`modified_when`,`modified_by`,`link`,`target`,`visibility` FROM `" . TABLE_PREFIX . "pages` WHERE {$where_sql} AND parent = '{$parent}' ORDER BY position ASC"); // Check if there are any pages to show if ($query_menu->numRows() > 0) { // Print level header echo $level_header; // Loop through pages $new_depth = $current_depth + 1; while ($page = $query_menu->fetchRow()) { //get username from user id $userquery = "SELECT display_name FROM " . TABLE_PREFIX . "users WHERE user_id = " . $page['modified_by']; $query_user = $database->query($userquery); $user = $query_user->fetchRow(); $vars = array('[PAGE_ID]', '[PARENT]', '[LINK]', '[PAGE_TITLE]', '[MENU_TITLE]', '[DESCRIPTION]', '[KEYWORDS]', '[TARGET]', '[MODIFIED_WHEN]', '[MODIFIED_BY]', '[MODIFIED_DATE]', '[MODIFIED_TIME]'); $values = array($page['page_id'], $page['parent'], page_link($page['link']), stripslashes($page['page_title']), stripslashes($page['menu_title']), stripslashes($page['description']), stripslashes($page['keywords']), $page['target'], "[MODIFIED_DATE] [MODIFIED_TIME]", $user['display_name'], date(DATE_FORMAT, $page['modified_when']), date(TIME_FORMAT, $page['modified_when'])); echo str_replace($vars, $values, $sitemaploop); //gmdate(DATE_FORMAT, $page['modified_when'] +TIMEZONE)." - ". gmdate(TIME_FORMAT, $page['modified_when'] +TIMEZONE) // determine if we may descend further in the subpages if ($new_depth != $to_depth) { // pass on the maximum and current depth sitemap($level_header, $sitemaploop, $level_footer, $show_hidden, $page['page_id'], $to_depth, $new_depth); } } // Print level footer echo $level_footer; } }
if (!defined('BASEPATH')) { exit('No direct script access allowed'); } /** * MaxSite CMS * (c) http://max-3000.com/ */ if ($fn = mso_find_ts_file('main/main-start.php')) { require $fn; } echo '<div class="mso-type-sitemap"><div class="mso-page-only">'; echo '<header><h1 class="mso-type-sitemap">' . tf('Карта сайта (архив)') . '</h1></header>'; echo '<div class="mso-page-content mso-type-sitemap-content">'; if ($f = mso_page_foreach('sitemap')) { require $f; } else { if (function_exists('sitemap')) { echo sitemap(); } else { echo mso_hook('sitemap'); } } echo '</div></div></div><!-- mso-page-content mso-type-sitemap-content mso-page-only mso-type-sitemap -->'; if ($f = mso_page_foreach('sitemap-posle')) { require $f; } if ($fn = mso_find_ts_file('main/main-end.php')) { require $fn; } # end file
$design = $_SESSION["menued_design"]; } // design - umschalter foreach ($cfg["menued"]["design_available"] as $value) { if ($value != $design) { if ($_SESSION["menued_design"] == "") { $ausgaben["design"] = "<a href=\"" . str_replace("list.", "list,,," . $value . ".", $pathvars["uri"]) . "\">" . $value . "</a>"; } else { $ausgaben["design"] = "<a href=\"" . str_replace($_SESSION["menued_design"], $value, $pathvars["uri"]) . "\">" . $value . "</a>"; } } } } else { $design = $cfg["menued"]["design"]; } $ausgaben["show_menu"] .= sitemap(0, "menued", "menued", $modify, ""); // fehlermeldungen if ($HTTP_GET_VARS["error"] != "") { if ($HTTP_GET_VARS["error"] == 1) { $ausgaben["form_error"] = "#(error1)"; } } else { $ausgaben["form_error"] = ""; } // navigation erstellen $ausgaben["renumber"] = "<a href=\"" . $cfg["menued"]["basis"] . "/sort,all,nop,0.html\">#(renumber)</a>"; $check_parameter = $environment["parameter"][1]; if (!$environment["parameter"][1]) { $check_parameter = 0; } if (priv_check(make_ebene($check_parameter), $cfg["menued"]["modify"]["add"][2], $specialvars["dyndb"])) {
You may contact the author/development team at: Chaos Networks c/o Werner Ammon Lerchenstr. 11c 86343 Königsbrunn URL: http://www.chaos.de */ //////////////////////////////////////////////////////////////////////////////////////////////////////////////// if ($cfg["sitemap"]["right"] == "" || $rechte[$cfg["sitemap"]["right"]] == -1) { // funktions bereich // *** $positionArray["nop"] = "nop"; $ausgaben["sitemap"] = sitemap(0, "sitemap", "sitemap", $modify); // +++ // funktions bereich // page basics // *** // fehlermeldungen if ($HTTP_GET_VARS["error"] != "") { if ($HTTP_GET_VARS["error"] == 1) { $ausgaben["form_error"] = "#(error1)"; } } else { $ausgaben["form_error"] = ""; } // hidden values #$ausgaben["form_hidden"] .= ""; // was anzeigen
/** * 网站地图XML文件生成 */ function sitemap_xml() { $config = App::get_config(); $time = (int) $config['SITE_MAP_TIME']; $num = (int) $config['SITE_MAP_NUM']; $update = (int) $config['SITE_MAP_UPDATE']; if (empty($time) || empty($num) || empty($update)) { return lang('fun-0'); } $db = Controller::model('content_' . App::get_site_id()); $data = $db->where('`status`=1')->where('updatetime >' . strtotime('-' . $time . ' day'))->order('updatetime DESC')->limit(0, $num)->select(); baidunews($data, $update); sitemap($data); return count($data); }
function sitemap($refid) { global $environment, $db, $mt, $mtl, $pathvars, $specialvars, $rechte, $ast, $astpath; $sql = "SELECT {$mt}.mid, {$mt}.entry, {$mt}.refid, {$mt}.level, {$mt}.sort, {$mtl}.lang, {$mtl}.label, {$mtl}.exturl FROM {$mt} INNER JOIN {$mtl} ON {$mt}.mid = {$mtl}.mid WHERE ((({$mt}.refid)={$refid}) AND (({$mtl}.lang)='" . $environment["language"] . "') AND (({$mt}.hide)<>'-1')) order by sort, label;"; $menuresult = $db->query($sql); while ($menuarray = $db->fetch_array($menuresult, 1)) { if ($menuarray["level"] == "") { $right = -1; } else { if ($rechte[$menuarray["level"]] == -1) { $right = -1; } else { $right = 0; } } if ($right == -1) { if ($refid == 0) { $ast = array(0); $astpath = array($menuarray["entry"]); } // ast einruecken if (!in_array($refid, $ast, TRUE)) { $ast[] = $refid; $astpath[] = $menuarray["entry"]; $tiefe = array_search($refid, $ast, TRUE); // ast ausruecken bzw. auf dem aktuellen wert setzen } else { $key = array_search($refid, $ast, TRUE); while (array_key_exists($key, $ast)) { array_pop($ast); array_pop($astpath); } // aktuellen wert setzen $ast[] = $refid; $astpath[] = $menuarray["entry"]; $tiefe = array_search($refid, $ast, TRUE); } // tiefe in anzeige wandeln $path = ""; $level = ""; for ($i = 0; $i < $tiefe; $i++) { $path .= $astpath[$i] . "/"; $level .= "__________"; } if ($level == "") { $menuarray["label"] = "<b>" . $menuarray["label"] . "</b>"; } $tree .= "<tr><td>" . $level . "<a class=\"\" href=\"" . $pathvars["virtual"] . "/" . $path . $menuarray["entry"] . ".html\"><img src=\"" . $pathvars["images"] . "sitemap.png\" width=\"16\" height=\"16\" align=\"absbottom\" border=\"0\"><img src=\"" . $pathvars["images"] . "pos.png\" width=\"3\" height=\"1\" align=\"absbottom\" border=\"0\">" . $menuarray["label"] . "</a></td><td>" . $aktion . "</td></tr>"; $tree .= sitemap($menuarray["mid"]); } } return $tree; }
function add($pdo, $title = '', $link = '', $text = '', $edit = false) { global $page_display_title; if (isset($_POST['title'], $_POST['html'], $_POST['link']) && !empty($_POST['title']) && !empty($_POST['link']) && is_string($_POST['title']) && is_string($_POST['link'])) { if (!$edit) { #========== $sql = "select id from page order by id DESC limit 1"; $stmt = $pdo->query($sql); $id = (int) $stmt->fetchColumn(0); ++$id; if ($id < 1) { $id = 1; } #========== file_put_contents('pages/' . $id . '.html', $_POST['html']); #========== $sql = "insert into page(`title`,`link`) values(:t,:l)"; } else { file_put_contents('pages/' . intval($edit) . '.html', $_POST['html']); $sql = "update page set title=:t,link=:l where id=:i"; } $stmt = $pdo->prepare($sql); $stmt->bindvalue(':t', filter_var($_POST['title'], FILTER_SANITIZE_STRING), PDO::PARAM_STR); $stmt->bindvalue(':l', filter_var($_POST['link'], FILTER_SANITIZE_STRING), PDO::PARAM_STR); //$stmt->bindvalue(':h',$_POST['html'],PDO::PARAM_STR); if ($edit) { $stmt->bindvalue(':i', intval($edit), PDO::PARAM_INT); } if ($stmt->execute()) { sitemap($pdo); if (!$edit) { $sql = "select id from page order by id DESC limit 1"; $stmt = $pdo->query($sql); $id = $stmt->fetchColumn(0); } else { $id = intval($edit); } redirect(BASE_PATH . '/page/?link=' . $id, 1); } } else { if (isset($_POST['title'], $_POST['html'], $_POST['link'])) { $title = filter_var($_POST['title'], FILTER_SANITIZE_STRING); $link = filter_var($_POST['link'], FILTER_SANITIZE_STRING); $text = $_POST['html']; } $hide = ''; if ($edit) { $hide = '<input type="hidden" name="edit" value="' . $edit . '"/>'; } else { $page_display_title = 'ایجاد صفحه جدید'; } $html = ' <div class="add_new_page"> <center> <form method="post"> <div><b>عنوان صفحه</b></div> <br/> <input type="text" value="' . $title . '" name="title"/> <div dir="rtl"><b>محتوی (کد اچ تی ام ال، اسکریپت، سی اس اس)</b> <a href="http://daringfireball.net/projects/markdown/basics" target="_blank">آموزش Markdown</a></div> <br/> <textarea name="html" rows="15">' . $text . '</textarea> <br/> <div><b>عنوان پیوند</b></div> <div><i>مهم: بهتر است از عبارت کوتاه و با معنی استفاده شود</i></div> <br/> <input type="text" value="' . $link . '" name="link"/> ' . $hide . ' <br/><input type="submit" id="save_page_btn" class="btn btn-success" value="ذخیره" /> </form> </center> </div> '; echo tplcover($pdo, $html); } }
$out .= mainmenu(0, 2); break; case "mainmenu3": $out .= mainmenu(0, 3); break; case "subtitle": $out .= $set['subtitle']; break; case "title": $out .= '<a href="' . $set['homepath'] . '">' . $set['title'] . '</a>'; break; case "selected": $out .= $selected['name']; break; case "sitemap": $out .= sitemap(0); break; case "submenu": $out .= submenu(0); break; case "treemenu": $out .= treemenu(0); break; default: if (strpos($command, "plugin") !== false) { $aa = explode(" ", $command, 2); $pluginpath = "plugins/" . trim($aa[1]); if (file_exists($pluginpath . "/first.mod")) { $out = file_get_contents($pluginpath . "/first.mod") . $out; } if (file_exists($pluginpath . "/header.mod")) {
// link bauen und positionArray bauen foreach ($opentree as $key => $value) { $treelink == "" ? $trenner = "" : ($trenner = "-"); $treelink .= $trenner . $value; if ($value != "") { locate($value); } } $_SESSION["menued_design"] = $design; } else { $positionArray[0] = 0; } // welche buttons sollen angezeigt werden $mod = array("edit" => array("", "Seite editieren", "edit"), "add" => array("", "Seite hinzufuegen", "add"), "jump" => array("", "zur Seite", "edit;publish")); $blacklist = "/aktuell"; $wizard_menu = sitemap(0, "admin", "menued", $mod, ""); $test = explode("<li>", $wizard_menu); array_shift($test); $preg = '/<img.*\\/img>/Ui'; $preg_link = '/^<a (href)="\\/auth\\/edit,([0-9]*),[0-9]*\\.html"/ui'; $preg_black = '/(href="\\/auth\\/login,)([0-9]*)\\.html"/ui'; $color = $cfg["wizard"]["color"]["a"]; preg_match($preg_black, $line, $black); foreach ($test as $line) { $color == $cfg["wizard"]["color"]["a"] ? $color = $cfg["wizard"]["color"]["b"] : ($color = $cfg["wizard"]["color"]["a"]); preg_match($preg_black, $line, $black); preg_match($preg_link, $line, $regis); if ($black[2] == 263) { continue; } if ($regis[2]) {
function sitemap($refid, $script_name, $art = "", $modify = "", $self = "") { global $hidedata, $design, $opentree, $treelink, $ausgaben, $cfg, $environment, $db, $pathvars, $specialvars, $rechte, $buffer, $positionArray; if (!$ausgaben["path"]) { $ausgaben["path"] = ""; } $where = ""; switch ($art) { case menued: $flapmenu = -1; $aktionlinks = -1; $hidestatus = -1; $sortinfo = -1; break; case select: $flapmenu = -1; $radiorefid = -1; $hidestatus = -1; break; case wizard: $flapmenu = -1; $aktionlinks = -1; $where = "AND (" . $cfg[$script_name]["db"]["menu"]["entries"] . ".hide IS NULL OR " . $cfg[$script_name]["db"]["menu"]["entries"] . ".hide IN ('','0'))"; break; case sitemap: $sitemap = -1; $where = "AND (" . $cfg[$script_name]["db"]["menu"]["entries"] . ".hide IS NULL OR " . $cfg[$script_name]["db"]["menu"]["entries"] . ".hide IN ('','0'))"; break; default: } $sql = "SELECT " . $cfg[$script_name]["db"]["menu"]["entries"] . ".mid,\n " . $cfg[$script_name]["db"]["menu"]["entries"] . ".entry,\n " . $cfg[$script_name]["db"]["menu"]["entries"] . ".refid,\n " . $cfg[$script_name]["db"]["menu"]["entries"] . ".level,\n " . $cfg[$script_name]["db"]["menu"]["entries"] . ".sort,\n " . $cfg[$script_name]["db"]["menu"]["entries"] . ".hide,\n " . $cfg[$script_name]["db"]["lang"]["entries"] . ".lang,\n " . $cfg[$script_name]["db"]["lang"]["entries"] . ".label,\n " . $cfg[$script_name]["db"]["lang"]["entries"] . ".exturl\n FROM " . $cfg[$script_name]["db"]["menu"]["entries"] . "\n INNER JOIN " . $cfg[$script_name]["db"]["lang"]["entries"] . "\n ON " . $cfg[$script_name]["db"]["menu"]["entries"] . ".mid = " . $cfg[$script_name]["db"]["lang"]["entries"] . ".mid\n WHERE (" . $cfg[$script_name]["db"]["menu"]["entries"] . ".refid=" . $refid . ")\n AND (" . $cfg[$script_name]["db"]["lang"]["entries"] . ".lang='" . $environment["language"] . "')\n " . $where . "\n ORDER BY " . $cfg[$script_name]["db"]["menu"]["order"] . ";"; $result = $db->query($sql); $count = $db->num_rows($result); while ($array = $db->fetch_array($result, 1)) { // aufbau des pfads if ($refid == 0 || in_array($refid, $positionArray) || $sitemap == -1) { $buffer["pfad"] .= "/" . $array["entry"]; $buffer["pfad_label"] .= "/" . $array["label"]; } // hide-status signalisieren $class_hide = "\"\""; if ($hidestatus == -1) { if ($array["hide"] == -1) { $class_hide = "\"red\""; } } // menu-aufbau ala konqueror oder zum klappen if ($flapmenu == -1) { // zweiten parameter mitziehen wenn er gesetzt ist if ($environment["parameter"][2] != "") { $move_parameter = "," . $environment["parameter"][2]; } else { $move_parameter = ""; } // alle punkte die nicht im array sind nicht anzeigen if ($refid != 0 && !in_array($refid, $positionArray)) { continue; } else { // menu auf werner-art, hier auch noch den gesamten ast ausblenden ! // nur noch die mit der refid laut $_SESSION if ($design == "modern") { if ($array["refid"] != $_SESSION["menued_id"]) { if ($_SESSION["menued_id"] != "" || $array["refid"] != 0) { $buffer[$refid]["display"] = "none"; } } // back-link bauen if ($array["mid"] == $_SESSION["menued_id"]) { $ausgaben["path"] = $buffer["pfad_label"]; if ($array["refid"] == 0) { $hidedata["back"]["link"] = $cfg[$script_name]["basis"] . "/" . $environment["parameter"][0] . "," . $array["refid"] . $move_parameter . ".html\""; } else { $hidedata["back"]["link"] = $cfg[$script_name]["basis"] . "/" . $environment["parameter"][0] . "," . $array["refid"] . $move_parameter . ".html\""; } } } } // schauen ob unterpunkte vorhanden ! $sql = "SELECT * FROM " . $cfg[$script_name]["db"]["menu"]["entries"] . " WHERE refid=" . $array["mid"]; $result_in = $db->query($sql); $count_in = $db->num_rows($result_in); // sind unterpunkte vorhanden + oder - einblenden if ($count_in > 0 && $array["mid"] != $environment["parameter"][2]) { $copy = $positionArray; array_shift($copy); is_array($opentree) && in_array($array["mid"], $opentree) ? $sign = "-" : ($sign = "+"); $href = "<a class=" . $class_hide . " href=\"" . $cfg[$script_name]["basis"] . "/" . $environment["parameter"][0] . "," . $array["mid"] . $move_parameter . ".html\">" . $array["label"] . "+</a>"; } else { $href = "<span class=" . $class_hide . ">" . $array["label"] . "</span>"; } // hier wird komplett geoeffnet } elseif ($sitemap == -1) { $href = "<a href=\"" . $pathvars["virtual"] . $buffer["pfad"] . ".html\">" . $array["label"] . "</a>"; } else { $href = $array["label"]; } // schaltflaechen erstellen if ($aktionlinks == -1) { // hier der alte rechte-check ! fällt weg ! if ($specialvars["security"]["enable"] == -1) { // kategorie u. ebene herausfinden $kategorie2check = substr($buffer["pfad"], 0, strpos($buffer["pfad"], "/")); $ebene2check = substr($buffer["pfad"], strpos($buffer["pfad"], "/")); // hier findet der rechte-check statt if (right_check("-1", $ebene2check, $kategorie2check != "") || $rechte[$cfg[$script_name]["right_admin"]] == -1) { $right = -1; } else { $right = ""; } } $aktion = ""; if (is_array($modify)) { foreach ($modify as $name => $value) { if ($specialvars["security"]["new"] == -1) { if (!priv_check(make_ebene($array["mid"]), $value[2], $specialvars["dyndb"]) && !priv_check(make_ebene($array["mid"]), $value[2])) { continue; } } else { if (!$rechte[$cfg[$script_name]["right_admin"]] == -1 && $right != "-1") { continue; } } if ($name == "up" || $name == "down") { if ($specialvars["security"]["new"] == -1) { if (!priv_check(make_ebene($array["refid"]), $value[2], $specialvars["dyndb"]) && !priv_check(make_ebene($array["mid"]), $value[2])) { continue; } } else { $kategorie2check = substr(make_ebene($array["refid"]), 0, strpos(make_ebene($array["refid"]), "/")); $ebene2check = substr(make_ebene($array["refid"]), strpos(make_ebene($array["refid"]), "/")); if (!$rechte[$cfg[$script_name]["right_admin"]] == -1 && !right_check("-1", $ebene2check, $kategorie2check != "")) { continue; } } } if ($name == "rights") { if ($specialvars["security"]["new"] == -1) { $aktion .= "<a href=\"" . $pathvars["virtual"] . "/" . $cfg[$script_name]["subdir"] . "/righted/edit," . $array["mid"] . ".html\"><img style=\"float:right\" src=\"" . $cfg[$script_name]["iconpath"] . $name . ".png\" alt=\"" . $value[1] . "\" title=\"" . $value[1] . "\" width=\"24\" height=\"18\"></img></a>"; } elseif ($specialvars["security"]["enable"] == -1) { $aktion .= "<a href=\"" . $cfg[$script_name]["basis"] . "/" . $value[0] . $name . "," . $array["mid"] . "," . $array["refid"] . ".html\"><img style=\"float:right\" src=\"" . $cfg[$script_name]["iconpath"] . $name . ".png\" alt=\"" . $value[1] . "\" title=\"" . $value[1] . "\" width=\"24\" height=\"18\"></img></a>"; } continue; } // anzeige der sortierung if ($sortinfo != "") { if ($name == "sort") { $aktion .= "<span title=\"" . $value[1] . "\" style=\"float:right\">(" . $array["sort"] . ")</span>"; continue; } } // anzeige des icons zur content-seite if ($name == "jump") { $aktion .= "<a href=\"" . $pathvars["virtual"] . $buffer["pfad"] . ".html" . $ankerlnk . "\"><img style=\"float:right\" src=\"" . $cfg[$script_name]["iconpath"] . $name . ".png\" alt=\"" . $value[1] . "\" title=\"" . $value[1] . "\" width=\"24\" height=\"18\"></img></a>"; continue; } // beim move ausnahme! if ($name == "move") { $aktion .= "<a href=\"" . $cfg[$script_name]["basis"] . "/" . $value[0] . $name . ",0," . $array["mid"] . ".html\"><img style=\"float:right\" src=\"" . $cfg[$script_name]["iconpath"] . $name . ".png\" alt=\"" . $value[1] . "\" title=\"" . $value[1] . "\" width=\"24\" height=\"18\"></img></a>"; } else { $aktion .= "<a href=\"" . $cfg[$script_name]["basis"] . "/" . $value[0] . $name . "," . $array["mid"] . "," . $array["refid"] . ".html\"><img style=\"float:right\" src=\"" . $cfg[$script_name]["iconpath"] . $name . ".png\" alt=\"" . $value[1] . "\" title=\"" . $value[1] . "\" width=\"24\" height=\"18\"></img></a>"; } } } } // wo geht der href hin? if ($array["exturl"] != "") { $href = "<a class=" . $class_hide . " href=" . $array["exturl"] . ">" . $array["label"] . "</a>"; } // in den buffer schreiben wieviel unterpunkte fuer jeweiligen überpunkt vorhanden sind ! if (!isset($buffer[$refid]["zaehler"])) { $buffer[$refid]["zaehler"] = $count; if ($buffer[$refid]["display"] != "none") { // beim ersten aufruf eine class menued setzen if ($self == "") { $tree .= "<ul class=\"menued\">\n"; if ($art == "select" && priv_check(make_ebene(0), $cfg["menued"]["modify"]["move"][2], $specialvars["dyndb"])) { $tree .= "<li><input type=\"radio\" name=\"refid\" value=\"" . $refid . "\" />#(root)</li>"; } } else { if ($design == "modern") { $tree .= "<ul class=\"menued\">\n"; } else { $tree .= "<ul>\n"; } } } } // refid radio button if ($radiorefid != "") { if ($array["mid"] == $environment["parameter"][2] || $specialvars["security"]["new"] == -1 && !priv_check(make_ebene($array["mid"]), $cfg["menued"]["modify"]["move"][2])) { $radio_disabled = " disabled"; } else { $radio_disabled = ""; } $radiobutton = "<input type=\"radio\" name=\"refid\" " . $radio_disabled . " value=\"" . $array["mid"] . "\" />"; } // listenpunkt schreiben if ($buffer[$refid]["display"] != "none") { $tree .= "<li>" . $aktion . $radiobutton . $href; } // funktionsaufruf $tree .= sitemap($array["mid"], $script_name, $art, $modify, -1); // abschliessendes li anbringen if ($buffer[$refid]["display"] != "none") { $tree .= "</li>\n"; } // abschliessendes ul anbringen u. pfad kuerzen if (isset($buffer[$refid]["zaehler"])) { // pfad kürzen $buffer["pfad"] = substr($buffer["pfad"], 0, strrpos($buffer["pfad"], "/")); $buffer["pfad_label"] = substr($buffer["pfad_label"], 0, strrpos($buffer["pfad_label"], "/")); // zaehler 1 zurücksetzen $buffer[$refid]["zaehler"] = $buffer[$refid]["zaehler"] - 1; // ul anbringen wenn zaehler bei 0 if ($buffer[$refid]["zaehler"] == 0 && ($art == "sitemap" || $refid == $_SESSION["menued_id"])) { $tree .= "</ul>\n"; } } } return $tree; }