if ($where != "") { $ausgaben["result"] = "Ihre Erweiterte Suche nach " . $suchergebnis . " hat"; $where = " WHERE (" . $where . ")"; } } // +++ // Erweiterte Suche (mor 2404) //checkbox lokale suche bauen // *** $ausgaben["check"] = "<input type=\"checkbox\" name=\"lokal\" value=\"on\"" . $lokalcheck . ">"; // +++ //checkbox lokale suche bauen // Sql Query $sql = "SELECT abid, abbnet, abcnet, abanrede, abnamra, abnamvor, abpasswort, adkate, adststelle, adstbfd, abdstemail, abdsttel, abdststelle FROM " . $cfg["db"]["entries"] . " INNER JOIN db_adrd ON abdststelle=adid" . $where . " ORDER by " . $cfg["db"]["order"]; // Inhalt Selector erstellen und SQL modifizieren $inhalt_selector = inhalt_selector($sql, $position, $cfg["db"]["rows"], $parameter, 1, $cfg["db"]["selects"], $getvalues); # neu mit get $ausgaben["inhalt_selector"] .= $inhalt_selector[0]; $sql = $inhalt_selector[1]; $ausgaben["gesamt"] = $inhalt_selector[2]; // Daten holen und ausgeben $result = $db->query($sql); if ($db->num_rows($result) == 0) { $ausgaben["result"] .= " keine Einträge gefunden.<br><br>"; } else { // nur erweitern wenn bereits was drin steht if ($ausgaben["result"]) { $ausgaben["result"] .= " folgende Einträge gefunden.<br><br>"; } else { $ausgaben["result"] = ""; }
86343 Königsbrunn URL: http://www.chaos.de */ //////////////////////////////////////////////////////////////////////////////////////////////////////////////// if ($cfg["right"] == "" || $rechte[$cfg["right"]] == -1) { // funktions bereich // *** ### put your code here ### /* z.B. db query */ $sql = "SELECT * FROM " . $cfg["db"]["info"]["entries"]; if ($debugging["sql_enable"]) { $debugging["ausgabe"] .= "sql: " . $sql . $debugging["char"]; } // seiten umschalter $inhalt_selector = inhalt_selector($sql, $environment["parameter"][1], $cfg["db"]["info"]["rows"], $parameter, 1, 3, $getvalues); $ausgaben["inhalt_selector"] = $inhalt_selector[0] . "<br />"; $sql = $inhalt_selector[1]; $ausgaben["anzahl"] = $inhalt_selector[2]; $result = $db->query($sql); while ($data = $db->fetch_array($result, 1)) { $dataloop["liste"][] = array("titel" => $data[$cfg["db"]["info"]["titel"]], "teaser" => tagremove($data[$cfg["db"]["info"]["teaser"]]), "datum" => substr($data[$cfg["db"]["info"]["datum_von"]], 8, 2) . "." . substr($data[$cfg["db"]["info"]["datum_von"]], 5, 2) . "." . substr($data[$cfg["db"]["info"]["datum_von"]], 0, 4), "link" => $cfg["basis"] . "/details," . $data[$cfg["db"]["info"]["key"]] . ".html"); } // +++ // funktions bereich // page basics // *** // fehlermeldungen if ($HTTP_GET_VARS["error"] != "") { if ($HTTP_GET_VARS["error"] == 1) { $ausgaben["form_error"] = "#(error1)";
$position = $environment["parameter"][1] + 0; // Suche $ausgaben["form_aktion"] = $environment["basis"] . "/list," . $position . ",search.html"; if ($environment["parameter"][2] == "search") { if ($HTTP_POST_VARS["search"] != "") { $search_value = $HTTP_POST_VARS["search"]; } else { $search_value = $environment["parameter"][3]; } $parameter = ",search," . $search_value; $where = " WHERE bproject LIKE '%" . $search_value . "%' OR bsign LIKE '%" . $search_value . "%' OR bshort LIKE '%" . $search_value . "%' OR bdetail LIKE '%" . $search_value . "%'"; } // Sql Query $sql = "SELECT * FROM " . $data_entries . $where . " ORDER by username"; // Inhalt Selector erstellen und SQL modifizieren $inhalt_selector = inhalt_selector($sql, $position, $data_rows, $parameter); $ausgaben["inhalt_selector"] .= $inhalt_selector[0]; $sql = $inhalt_selector[1]; // Daten holen und ausgeben $ausgaben["output"] .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">"; $ausgaben["output"] .= "<tr>"; $class = " class=\"lines\""; $ausgaben["output"] .= "<td" . $class . " colspan=\"14\"><img src=\"" . $cfg["iconpath"] . "/pos.png\" alt=\"\" width=\"1\" height=\"1\"></td>"; $ausgaben["output"] .= "</tr>"; $class = " class=\"contenthead\""; #$size = " width=\"30\" height=\"20\""; #$ausgaben["output"] .= "<td".$class.$size."> </td>"; #$ausgaben["output"] .= "<td".$class."> </td>"; $size = " width=\"30\""; $ausgaben["output"] .= "<td" . $class . ">Login</td>"; $ausgaben["output"] .= "<td" . $class . $size . "> </td>";
} else { $ausgaben["result"] = ""; } if ($environment["parameter"][2] == "search") { if ($HTTP_POST_VARS["search"] != "") { $search_value = $HTTP_POST_VARS["search"]; } else { $search_value = $environment["parameter"][3]; } $parameter = ",search," . $search_value; $where = " WHERE neintrag LIKE '%" . $search_value . "%' OR nbeschreibung LIKE '%" . $search_value . "%'"; } // Sql Query $sql = "SELECT * FROM " . $db_entries . $where . " ORDER by " . $db_entries_order; // Inhalt Selector erstellen und SQL modifizieren $inhalt_selector = inhalt_selector($sql, $position, $db_rows, $parameter, 1, 10); $ausgaben["inhalt_selector"] .= $inhalt_selector[0]; $sql = $inhalt_selector[1]; $ausgaben["gesamt"] = $inhalt_selector[2]; // Daten holen und ausgeben $ausgaben["output"] .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">"; $ausgaben["output"] .= "<tr>"; $class = " class=\"lines\""; $ausgaben["output"] .= "<td" . $class . " colspan=\"8\"><img src=\"" . $pathvars["images"] . "/pos.png\" alt=\"\" width=\"1\" height=\"1\"></td>"; $ausgaben["output"] .= "</tr>"; $class = " class=\"contenthead\""; #$size = " width=\"30\" height=\"20\""; #$ausgaben["output"] .= "<td".$class.$size."> </td>"; #$ausgaben["output"] .= "<td".$class."> </td>"; $size = " width=\"5\""; $ausgaben["output"] .= "<td" . $class . ">Datum</td>";
while ($data = $db->fetch_array($result, 1)) { if ($data["referer"] != "") { $referer = $data["referer"]; } else { $referer = "(direkter Aufruf)"; } $dataloop["referer"][] = array("referer" => $referer, "hits" => $data["count"]); } } else { $hidedata["list"] = array(); $sql = "SELECT sum(count) as count, site_file.fid, ffname, funder, fdesc\n FROM db_count_files\n JOIN site_file\n ON (db_count_files.fid=site_file.fid)\n GROUP BY site_file.fid,ffname, funder, fdesc\n ORDER BY count DESC"; if ($debugging["sql_enable"]) { $debugging["ausgabe"] .= "sql: " . $sql . $debugging["char"]; } // seiten umschalter $inhalt_selector = inhalt_selector($sql, $environment["parameter"][1], 20, $parameter, 1, 3, $getvalues); $ausgaben["inhalt_selector"] = $inhalt_selector[0] . "<br />"; $sql = $inhalt_selector[1]; $ausgaben["anzahl"] = $inhalt_selector[2]; $result = $db->query($sql); $i = 0; while ($data = $db->fetch_array($result, 1)) { foreach ($data as $key => $value) { $dataloop["count"][$i][$key] = $value; } $dataloop["count"][$i]["pos"] = $i; $dataloop["count"][$i]["link"] = "?fid=" . $data["fid"]; $i++; } } $mapping["main"] = "file_handling_tem";
function show_blog($url, $tags, $right = "", $limit = "", $kategorie = "", $future = "") { global $db, $pathvars, $ausgaben, $mapping, $hidedata, $environment, $cfg, $specialvars; // parameter-erklaerung // 1: vorgesehen fuer inhalt_selector // 2: aufruf eines einzigen contents // 3: anzeige als faq // unzugaengliche #(marken) sichtbar machen if (isset($HTTP_GET_VARS["edit"])) { $ausgaben["inaccessible"] = "inaccessible values:<br />"; $ausgaben["inaccessible"] .= "# (error1) #(error1)<br />"; } else { $ausgaben["inaccessible"] = ""; } // label bearbeitung aktivieren if (isset($_GET["edit"])) { $specialvars["editlock"] = 0; } else { $specialvars["editlock"] = -1; } // aus der url eine id machen $id = make_id($url); $new = $id["mid"]; $where = ""; // manipulation verhindern if ($environment["parameter"][2] != "" && !preg_match("/^[0-9]*\$/", $environment["parameter"][2])) { header('Location: /index.html'); exit; } $sort_len = strlen($cfg["bloged"]["blogs"][$url]["sort"][0]) + 2; // hier erfolgt der rechte-check $check_url = $url; if ($kategorie != "") { $check_url = $kategorie; } $status = "status=1"; $order = ""; $wizard_right = ""; // falls der der content bei dem der blog eingebunden ist, zur Freigabe angefordert ist, darf hier nichts mehr passieren if ($kategorie == tname2path($environment["parameter"][2]) && !priv_check($check_url, "publish")) { $sql = "SELECT status from site_text WHERE tname='" . $environment["parameter"][2] . "' AND label='" . $environment["parameter"][3] . "' ORDER by version DESC"; $result = $db->query($sql); $data = $db->fetch_array($result, 1); if ($data["status"] == -2) { $wizard_right = "NO"; } } if ($right == "" || priv_check($check_url, $right) && $wizard_right == "") { $hidedata["new"]["link"] = $url; $hidedata["new"]["kategorie"] = $kategorie; if ($environment["ebene"] == "/wizard") { $status = "(status=1 OR status = -1)"; $order = " DESC ,changed"; } } // erster test einer suchanfrage per kalender // if ($environment["parameter"][4] && $environment["kategorie"] != "delete") { $parameter = ",,," . $environment["parameter"][4] . "," . $environment["parameter"][5] . "," . $environment["parameter"][6]; if ($cfg["bloged"]["blogs"][$url]["sort"][1] != -1) { $heute = getdate(mktime(0, 0, 0, $environment["parameter"][5] + 1, 0, $environment["parameter"][4])); if ($environment["parameter"][5] == "") { $month2 = "1"; $month1 = "12"; } else { $month1 = $environment["parameter"][5]; $month2 = $environment["parameter"][5]; } if (!$environment["parameter"][6]) { $day1 = $heute["mday"]; $day2 = "1"; } else { $day1 = $environment["parameter"][6]; $day2 = $environment["parameter"][6]; } // parameter - check $preg_error = ""; if (!preg_match("/^[0-9]{4}\$/", $environment["parameter"][4])) { $preg_error = -1; } if ($environment["parameter"][5] != "" && !preg_match("/^[0-9]{1,2}\$/", $environment["parameter"][5])) { $preg_error = -1; } if ($environment["parameter"][6] != "" && !preg_match("/^[0-9]{1,2}\$/", $environment["parameter"][6])) { $preg_error = -1; } if ($preg_error == -1) { header('Location: /index.html'); exit; } $environment["parameter"][4] = min($environment["parameter"][4], '2035'); $environment["parameter"][4] = max($environment["parameter"][4], '1970'); if ($cfg["bloged"]["blogs"][$url]["ext_sort"] == "") { $where .= " AND Cast(SUBSTRING(content,POSITION('[" . $cfg["bloged"]["blogs"][$url]["sort"][0] . "]' IN content)+" . $sort_len . ",POSITION('[/" . $cfg["bloged"]["blogs"][$url]["sort"][0] . "]' IN content)-POSITION('[" . $cfg["bloged"]["blogs"][$url]["sort"][0] . "]' IN content)-" . $sort_len . ") as DATETIME) < '" . $environment["parameter"][4] . "-" . $month1 . "-" . $day1 . " 23:59:59' AND Cast(SUBSTRING(content,POSITION('[" . $cfg["bloged"]["blogs"][$url]["sort"][0] . "]' IN content)+" . $sort_len . ",POSITION('[/" . $cfg["bloged"]["blogs"][$url]["sort"][0] . "]' IN content)-POSITION('[" . $cfg["bloged"]["blogs"][$url]["sort"][0] . "]' IN content)-" . $sort_len . ") as DATETIME) > '" . $environment["parameter"][4] . "-" . $month2 . "-" . $day2 . " 00:00:00'"; } else { $where .= " AND (( Cast(SUBSTRING(content,POSITION('[" . $cfg["bloged"]["blogs"][$url]["sort"][0] . "]' IN content)+" . $sort_len . ",POSITION('[/" . $cfg["bloged"]["blogs"][$url]["sort"][0] . "]' IN content)-POSITION('[" . $cfg["bloged"]["blogs"][$url]["sort"][0] . "]' IN content)-" . $sort_len . ") as DATETIME) < '" . $environment["parameter"][4] . "-" . $month1 . "-" . $day1 . " 23:59:59' AND Cast(SUBSTRING(content,POSITION('[" . $cfg["bloged"]["blogs"][$url]["sort"][0] . "]' IN content)+" . $sort_len . ",POSITION('[/" . $cfg["bloged"]["blogs"][$url]["sort"][0] . "]' IN content)-POSITION('[" . $cfg["bloged"]["blogs"][$url]["sort"][0] . "]' IN content)-" . $sort_len . ") as DATETIME) >= '" . $environment["parameter"][4] . "-" . $month2 . "-" . $day2 . " 00:00:00')"; $sort_len2 = strlen($cfg["bloged"]["blogs"][$url]["ext_sort"]) + 2; $where .= " OR ( Cast(SUBSTRING(content,POSITION('[" . $cfg["bloged"]["blogs"][$url]["sort"][0] . "]' IN content)+" . $sort_len . ",POSITION('[/" . $cfg["bloged"]["blogs"][$url]["sort"][0] . "]' IN content)-POSITION('[" . $cfg["bloged"]["blogs"][$url]["sort"][0] . "]' IN content)-" . $sort_len . ") as DATETIME) <= '" . $environment["parameter"][4] . "-" . $month1 . "-" . $day2 . " 00:00:00' AND Cast(SUBSTRING(content,POSITION('[" . $cfg["bloged"]["blogs"][$url]["ext_sort"] . "]' IN content)+" . $sort_len2 . ",POSITION('[/" . $cfg["bloged"]["blogs"][$url]["ext_sort"] . "]' IN content)-POSITION('[" . $cfg["bloged"]["blogs"][$url]["ext_sort"] . "]' IN content)-" . $sort_len2 . ") as DATETIME) >= '" . $environment["parameter"][4] . "-" . $month2 . "-" . $day2 . " 00:00:00'))"; } } } // // erster test einer suchanfrage per kalender // falls kategorie , werden nur diese angezeigt if ($kategorie != "") { $cat_len = strlen($cfg["bloged"]["blogs"][$url]["category"]) + 2; $where .= " AND SUBSTRING(content,POSITION('[" . $cfg["bloged"]["blogs"][$url]["category"] . "]' IN content),POSITION('[/" . $cfg["bloged"]["blogs"][$url]["category"] . "]' IN content)-POSITION('[" . $cfg["bloged"]["blogs"][$url]["category"] . "]' IN content)) ='[" . $cfg["bloged"]["blogs"][$url]["category"] . "]" . $kategorie . "'"; } if ($future == -1) { $where .= " AND Cast(SUBSTRING(content,POSITION('[" . $cfg["bloged"]["blogs"][$url]["sort"][0] . "]' IN content)+" . $sort_len . ",POSITION('[/" . $cfg["bloged"]["blogs"][$url]["sort"][0] . "]' IN content)-POSITION('[" . $cfg["bloged"]["blogs"][$url]["sort"][0] . "]' IN content)-" . $sort_len . ") as DATETIME) < '" . date('Y-m-d') . " 23:59:59'"; } $tname = eCRC($url) . ".%"; // falls parameter 2 gesetzt, wird nur dieser content geholt if ($environment["parameter"][2] != "" && $environment["ebene"] != "/wizard") { $tname = eCRC($url) . "." . $environment["parameter"][2]; } // falls sort auf -1 wird anstatt ein datum ein integer als sortiermerkmal gesetzt um ein manuelles sortieren zu ermoeglichen if ($cfg["bloged"]["blogs"][$url]["sort"][1] == "-1") { $art = "SIGNED"; } else { $art = "DATETIME"; } // hier der endgueltige sql !! $sql = "SELECT Cast(SUBSTRING(content,POSITION('[" . $cfg["bloged"]["blogs"][$url]["sort"][0] . "]' IN content)+" . $sort_len . ",POSITION('[/" . $cfg["bloged"]["blogs"][$url]["sort"][0] . "]' IN content)-POSITION('[" . $cfg["bloged"]["blogs"][$url]["sort"][0] . "]' IN content)-" . $sort_len . ") AS " . $art . ") AS date,status,content,tname from site_text WHERE " . $status . " AND tname like '" . $tname . "'" . $where . " order by date" . $order . " DESC"; // damit kann man beliebig viele blogs manuell holen $ausgaben["inhalt_selector"] = ""; if (strpos($limit, ",")) { $sql = $sql . " LIMIT " . $limit; } else { if ($limit != "") { $hidedata["inhalt_selector"]["on"] = "on"; $p = $environment["parameter"][1] + 0; // seiten umschalter $inhalt_selector = inhalt_selector($sql, $p, $limit, $parameter, 1, 10, $getvalues); $ausgaben["inhalt_selector"] = $inhalt_selector[0] . "<br />"; $sql = $inhalt_selector[1]; $ausgaben["anzahl"] = $inhalt_selector[2]; $ausgaben["sel_hit"] = $inhalt_selector[3]; } } $counter = 0; $result = $db->query($sql); $preg1 = "\\.([0-9]*)\$"; // evtl wizard einbinden if ($cfg["bloged"]["blogs"][$url]["wizard"] != "") { $editlink = "/wizard/show,"; } else { $editlink = "/admin/contented/edit,"; } while ($data = $db->fetch_array($result, 1)) { $tag_parameter = ""; $counter++; // im wizard wird der content aus der SESSION-Variablen genommen if ($_SESSION["wizard_content"][DATABASE . "," . $data["tname"] . ",inhalt"] && $environment["ebene"] == "/wizard") { $test = preg_replace("|\r\n|", "\\r\\n", $_SESSION["wizard_content"][DATABASE . "," . $data["tname"] . ",inhalt"]); } else { $test = preg_replace("|\r\n|", "\\r\\n", $data["content"]); } foreach ($tags as $key => $value) { // finden der parameter sowie begin und endtag $invisible = ""; if (is_array($value)) { $tag_parameter = $value["parameter"]; $invisible = $value["invisible"]; $show = $value["show"]; $value = $value["tag"]; } if (strpos($value, "=")) { $endtag = substr($value, 0, strpos($value, "=")); if ($value == "IMG=") { $value .= ".*"; } else { $value = $value . $tag_parameter; } } else { $endtag = $value; } // preg nach den tags in der config $preg = "(\\[" . addcslashes($value, "/") . "\\])(.*)\\[\\/" . $endtag . "\\]"; if (preg_match("/{$preg}/Us", $test, $regs)) { $rep_tag = str_replace('\\r\\n', "<br />", $regs[0]); $org_tag = str_replace('\\r\\n', "<br />", $regs[2]); } else { $rep_tag = ""; $org_tag = ""; } // gefundene werte in array schreiben if ($invisible != -1) { $array[$counter][$key . "_wizard_edit_link"] = $pathvars["virtual"] . "/wizard/editor," . DATABASE . "," . $data["tname"] . ",inhalt," . $value . ":0,,,.html"; $array[$counter][$key . "_org"] = str_replace("\"", "'", $org_tag); $array[$counter][$key . "_org_tag"] = $value; $array[$counter][$key] = tagreplace($rep_tag); if ($org_tag == "") { $array[$counter][$key] = ""; } if (preg_match("/^\\[IMG/", $rep_tag, $regs_img)) { $image_para = explode("/", $rep_tag); $array[$counter][$key . "_img_art"] = $image_para[2]; $array[$counter][$key . "_img_id"] = $image_para[3]; $array[$counter][$key . "_img_size"] = $image_para[4]; $sql_img = "SELECT * FROM site_file WHERE fid='" . $image_para[3] . "'"; $result_img = $db->query($sql_img); $data_img = $db->fetch_array($result_img, 1); $array[$counter][$key . "_img_desc"] = $data_img["fdesc"]; $array[$counter][$key . "_img_under"] = $data_img["funder"]; $array[$counter][$key . "_img_fname"] = $data_img["ffname"]; if ($show != "") { $rep_tag = str_replace("/" . $image_para[4] . "/", "/" . $show . "/", $rep_tag); } } } else { if (preg_match("/^\\[IMG/", $rep_tag, $reg_img)) { $image_para = explode("/", $rep_tag); $invisible_array[$counter][$key . "_img_art"] = $image_para[2]; $invisible_array[$counter][$key . "_img_id"] = $image_para[3]; $invisible_array[$counter][$key . "_img_size"] = $image_para[4]; if ($show != "") { $rep_tag = str_replace("/" . $image_para[4] . "/", "/" . $show . "/", $rep_tag); } } $invisible_array[$counter][$key . "_org"] = str_replace("\"", "'", $org_tag); $invisible_array[$counter][$key] = tagreplace($rep_tag); $array[$counter][$key . "_org"] = ""; $array[$counter][$key] = ""; } } preg_match("/{$preg1}/", $data["tname"], $regs); if ($environment["parameter"][2] != "" && $environment["ebene"] != "/wizard") { $array[$counter]["all"] = tagreplace($data["content"]); $array[$counter]["id"] = $regs[1]; } else { $array[$counter]["datum"] = substr($data["date"], 8, 2) . "." . substr($data["date"], 5, 2) . "." . substr($data["date"], 0, 4); $array[$counter]["detaillink"] = $pathvars["virtual"] . $url . "/" . $regs[1] . ".html"; if ($environment["ebene"] == "") { $faq_url = "/" . $environment["kategorie"]; } else { $faq_url = $environment["ebene"] . "/" . $environment["kategorie"]; } $array[$counter]["faqlink"] = $pathvars["virtual"] . $faq_url . ",,," . $regs[1] . ".html#faq_" . $regs[1]; $array[$counter]["faqanker"] = "faq_" . $regs[1]; $array[$counter]["allink"] = $pathvars["virtual"] . $faq_url . ",," . $regs[1] . ".html"; $array[$counter]["id"] = $regs[1]; $array[$counter]["status"] = $data["status"]; // Sortierung ausgeben // ausgabe der aktions-buttons if ($right == "" || priv_check($check_url, $right) && $wizard_right == "") { if ($cfg["bloged"]["blogs"][$url]["sort"][1] == "-1") { $sort_kat = ""; if ($kategorie != "") { $id = make_id($kategorie); $sort_kat = $id["mid"]; } $array[$counter]["sort_up"] = $pathvars["virtual"] . "/admin/bloged/sort,up," . $regs[1] . "," . $sort_kat . "," . $new . ".html"; $array[$counter]["sort_down"] = $pathvars["virtual"] . "/admin/bloged/sort,down," . $regs[1] . "," . $sort_kat . "," . $new . ".html"; } else { $array[$counter]["sort_up"] = ""; $array[$counter]["sort_down"] = ""; } $array[$counter]["wizard_delete_link"] = $pathvars["virtual"] . "/wizard/delete," . DATABASE . "," . $data["tname"] . ",inhalt.html\""; $array[$counter]["deletelink"] = "<a href=\"" . $pathvars["virtual"] . "/admin/bloged/delete,," . $regs[1] . "," . $sort_kat . "," . $new . ".html\">g(blog_delete)</a>"; $array[$counter]["editlink"] = "<a href=\"" . $pathvars["virtual"] . $editlink . DATABASE . "," . $data["tname"] . ",inhalt.html\">g(blog_edit)</a>"; $array[$counter]["tname"] = eCrc($url); } else { $array[$counter]["editlink"] = ""; $array[$counter]["deletelink"] = ""; $array[$counter]["sort"] = ""; } } if ($environment["parameter"][3] == $regs[1]) { if (is_array($invisible_array)) { foreach ($invisible_array[$counter] as $key => $value) { $array[$counter][$key] = $value; } } } } // was anzeigen if ($environment["ebene"] == "") { $templ = $environment["kategorie"]; } else { $templ = eCRC($environment["ebene"]) . "." . $environment["kategorie"]; } if (file_exists($pathvars["templates"] . $templ . ".tem.html")) { $mapping["main"] = $templ; } elseif ($cfg["bloged"]["blogs"][$url]["own_list_template"] != "") { $mapping["main"] = "-2051315182." . $cfg["bloged"]["blogs"][$url]["own_list_template"]; } elseif ($cfg["bloged"]["blogs"][$url]["sort"][1] != "") { $mapping["main"] = "-2051315182.faq"; } else { $mapping["main"] = "-2051315182.list"; } return $array; }
} } // +++ // funktions bereich ( auswertung ) // funktions bereich // *** // db query $sql = "SELECT *\n FROM " . $cfg["fileed"]["db"]["file"]["entries"] . "\n " . $where . "\n ORDER BY " . $cfg["fileed"]["db"]["file"]["order"]; if ($debugging["sql_enable"]) { $debugging["ausgabe"] .= "sql: " . $sql . $debugging["char"]; } // seiten umschalter if ($environment["parameter"][1] != "") { $_SESSION["fileed_position"] = $environment["parameter"][1]; } $inhalt_selector = inhalt_selector($sql, $_SESSION["fileed_position"], $cfg["fileed"]["db"]["file"]["rows"], Null, 1, 3, Null); $ausgaben["inhalt_selector"] = $inhalt_selector[0]; $sql = $inhalt_selector[1]; $ausgaben["anzahl"] = $inhalt_selector[2]; $result = $db->query($sql); $i = 0; if ($debugging["sql_enable"]) { $debugging["ausgabe"] .= "sql: " . $sql . $debugging["char"]; } if ($db->num_rows($result) == 0) { #$ausgaben["result"] .= " keine Eintr�ge gefunden."; $ausgaben["result"] .= " #(answerc_no)"; } else { // nur erweitern wenn bereits was drin steht if ($ausgaben["result"]) { #$ausgaben["result"] .= " folgende Eintr�ge gefunden.";
$position = $environment[parameter][1] + 0; // Suche $ausgaben[form_aktion] = $environment[basis] . "/list," . $position . ",search.html"; if ($environment[parameter][2] == "search") { if ($HTTP_POST_VARS[search] != "") { $search_value = $HTTP_POST_VARS[search]; } else { $search_value = $environment[parameter][3]; } $parameter = ",search," . $search_value; $where = " WHERE lentry LIKE '%" . $search_value . "%' OR ldetail LIKE '%" . $search_value . "%'"; } // Sql Query $sql = "SELECT * FROM " . $logbuch_entries . $where . " ORDER by ldate"; // Inhalt Selector erstellen und SQL modifizieren $inhalt_selector = inhalt_selector($sql, $position, $logbuch_rows, $parameter); $ausgaben[inhalt_selector] .= $inhalt_selector[0]; $sql = $inhalt_selector[1]; // Daten holen und ausgeben $ausgaben[output] .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">"; $ausgaben[output] .= "<tr>"; $class = " class=\"lines\""; $ausgaben[output] .= "<td" . $class . " colspan=\"14\"><img src=\"" . $pathvars[images] . "/pos.png\" alt=\"\" width=\"1\" height=\"1\"></td>"; $ausgaben[output] .= "</tr>"; $class = " class=\"contenthead\""; #$size = " width=\"30\" height=\"20\""; #$ausgaben[output] .= "<td".$class.$size."> </td>"; #$ausgaben[output] .= "<td".$class."> </td>"; $size = " width=\"5\""; $ausgaben[output] .= "<td" . $class . ">Datum</td>"; $ausgaben[output] .= "<td" . $class . $size . "> </td>";
$search_strings = $_GET["wsearch"]; } else { $search_strings = addslashes($_GET["wsearch"]); } $where = " AND titel LIKE '" . $search_strings . "%'"; $ausgaben["result"] = " #(for) <b>" . $ausgaben["wsearch"] . "</b>"; } /* z.B. db query */ $sql = "SELECT *\n FROM " . $cfg["wening"]["db"]["produkte"]["entries"] . "\n WHERE " . $cfg["wening"]["db"]["produkte"]["typ"] . "='wening'" . $where . "\n ORDER BY " . $cfg["wening"]["db"]["produkte"]["order"]; // echo "<pre>$sql</pre>"; if ($debugging["sql_enable"]) { $debugging["ausgabe"] .= "sql: " . $sql . $debugging["char"]; } // seiten umschalter $get_vars = trim(str_replace("ajax=update", "", $_SERVER["QUERY_STRING"]), "& "); $inhalt_selector = inhalt_selector($sql, $environment["parameter"][1], $cfg["wening"]["db"]["produkte"]["rows"], $parameter, 1, 5, $get_vars); $ausgaben["inhalt_selector"] = $inhalt_selector[0] . "<br />"; $sql = $inhalt_selector[1]; $ausgaben["anzahl"] = $inhalt_selector[2]; $ausgaben["inhalt_selected"] = $inhalt_selector[3]; $result = $db->query($sql); while ($data = $db->fetch_array($result, 1)) { // abgabe-format if (strstr($data[$cfg["wening"]["db"]["produkte"]["desc"]], "Doppelblatt")) { $abgabe = "Doppelblatt"; } elseif (strstr($data[$cfg["wening"]["db"]["produkte"]["desc"]], "Dreifachblatt")) { $abgabe = "Dreifachblatt"; } else { $abgabe = "Normalblatt"; } // bild holen
$ausgaben["result"] = "#(answera) <b>\"" . implode("\"</b> und <b>\"", $filters) . "\"</b> #(answerb) "; } // +++ // funktions bereich ( auswertung ) // funktions bereich // *** // db query $sql = "SELECT *\n FROM " . $cfg["fileed"]["db"]["file"]["entries"] . "\n " . $where . "\n ORDER BY " . $cfg["fileed"]["db"]["file"]["order"]; if ($debugging["sql_enable"]) { $debugging["ausgabe"] .= "sql: " . $sql . $debugging["char"]; } // seiten umschalter if ($environment["parameter"][1] != "") { $_SESSION["fileed_position"] = $environment["parameter"][1]; } $inhalt_selector = inhalt_selector($sql, $environment["parameter"][1], $cfg["fileed"]["db"]["file"]["rows"], "," . $environment["parameter"][2] . "," . $environment["parameter"][3] . "," . $view_mode . "," . $environment["parameter"][5], 1, 5, Null); $ausgaben["inhalt_selector"] = $inhalt_selector[0]; $ausgaben["inhalt_selected"] = $inhalt_selector[3]; $sql = $inhalt_selector[1]; $ausgaben["anzahl"] = $inhalt_selector[2]; $result = $db->query($sql); $i = 0; if ($debugging["sql_enable"]) { $debugging["ausgabe"] .= "sql: " . $sql . $debugging["char"]; } if ($db->num_rows($result) == 0) { #$ausgaben["result"] .= " keine Eintr�ge gefunden."; $ausgaben["result"] .= " #(answerc_no)"; $hidedata["empty_search"]["search"] = "<b>\"" . implode("\"</b> und <b>\"", $filters) . "\"</b>"; $hidedata["file"]["display"] = "none"; } else {
$ausgaben["diff"] = ""; $ausgaben["rows"] = $cfg["contented"]["history_rows"]; // hoechste und niedrigste versionsnummer rausfinden $sql = "SELECT max(version), min(version)\n FROM site_text\n WHERE tname='" . $tname . "'\n AND label='" . $label . "'"; $result = $db->query($sql); $data = $db->fetch_array($result, 1); $last_version = $data["max"]; $first_version = $data["min"]; $sql = "SELECT *\n FROM site_text\n WHERE tname='" . $tname . "'\n AND label='" . $label . "'\n ORDER BY version DESC"; if ($debugging["sql_enable"]) { $debugging["ausgabe"] .= "sql: " . $sql . $debugging["char"]; } $result = $db->query($sql); // Inhalt Selector erstellen und SQL modifizieren $parameter = "," . $tname . "," . $label . "," . $old . "," . $new . "," . $environment["parameter"][6] . "," . $environment["parameter"][7]; $inhalt_selector = inhalt_selector($sql, $position, $cfg["contented"]["history_rows"], $parameter); $ausgaben["inhalt_selector"] .= $inhalt_selector[0]; $sql = $inhalt_selector[1]; $ausgaben["gesamt"] = $inhalt_selector[2]; $result = $db->query($sql); $counter = ""; while ($form_values = $db->fetch_array($result, 1)) { $counter++; $selected_new = ""; if ($new == "" && $counter == 1 || $new == $form_values["version"]) { $selected_new = " checked=\"checked\""; $ausgaben["new_sel_id"] = $form_values["version"]; } $selected_old = ""; if ($old == "" && $counter == 2 || $old == $form_values["version"]) { $selected_old = " checked=\"checked\"";
// unzugaengliche #(marken) sichtbar machen if (isset($HTTP_GET_VARS["edit"])) { $ausgaben["inaccessible"] = "inaccessible values:<br />"; #$ausgaben["inaccessible"] .= "# (error_?) #(error_?)<br />"; } else { $ausgaben["inaccessible"] = ""; } // wohin schicken #n/a // // Liste anzeigen // } elseif ($environment["kategorie"] == "list" && $rechte[$cfg["right"]] == -1) { // inhalt selector init $sql = "SELECT * FROM " . $cfg["db"]["level"]["entries"] . $where . " ORDER by level"; $inhalt_selector = inhalt_selector($sql, $environment["parameter"][1], $cfg["rows"], $parameter); $ausgaben["inhalt_selector"] .= $inhalt_selector[0]; $sql = $inhalt_selector[1]; // tabellen spiel $ausgaben["output"] .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">"; $ausgaben["output"] .= "<tr>"; $class = " class=\"lines\""; $ausgaben["output"] .= "<td" . $class . " colspan=\"14\"><img src=\"" . $pathvars["images"] . "/pos.png\" alt=\"\" width=\"1\" height=\"1\"></td>"; $ausgaben["output"] .= "</tr>"; $class = " class=\"contenthead\""; $size = " width=\"30\""; $ausgaben["output"] .= "<td" . $class . ">#(level)</td>\n"; $ausgaben["output"] .= "<td" . $class . $size . "> </td>\n"; $ausgaben["output"] .= "<td" . $class . ">#(beschreibung)</td>\n"; $ausgaben["output"] .= "<td" . $class . $size . "> </td>\n"; $ausgaben["output"] .= "<td" . $class . ">#(modify)</td>\n";
$where .= $whereb; /* if ( $environment["parameter"][2] == "search" ) { if ( $HTTP_POST_VARS["search"] != "" ) { $search_value = $HTTP_POST_VARS["search"]; } else { $search_value = $environment["parameter"][3]; } $parameter = ",search,".$search_value; $where = " WHERE bproject LIKE '%".$search_value."%' OR bsign LIKE '%".$search_value."%' OR bshort LIKE '%".$search_value."%' OR bdetail LIKE '%".$search_value."%'"; } */ // Sql Query $sql = "SELECT abid, abbnet, abcnet, abnamra, abnamvor, abnamkurz, abdststelle, adkate, adststelle FROM " . $cfg["db"]["entries"] . " INNER JOIN db_adrd ON abdststelle=adid" . $where . " ORDER by " . $cfg["db"]["order"]; // Inhalt Selector erstellen und SQL modifizieren $inhalt_selector = inhalt_selector($sql, $position, $cfg["db"]["rows"], $parameter); $ausgaben["inhalt_selector"] .= $inhalt_selector[0]; $sql = $inhalt_selector[1]; $ausgaben["gesamt"] = $inhalt_selector[2]; // Daten holen und ausgeben $ausgaben["output"] .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">"; $ausgaben["output"] .= "<tr>"; $class = " class=\"lines\""; $ausgaben["output"] .= "<td" . $class . " colspan=\"14\"><img src=\"" . $pathvars["images"] . "/pos.png\" alt=\"\" width=\"1\" height=\"1\"></td>"; $ausgaben["output"] .= "</tr>"; $class = " class=\"contenthead\""; $size = " width=\"5\""; $ausgaben["output"] .= "<td" . $class . ">Namenskürzel</td>"; $ausgaben["output"] .= "<td" . $class . $size . "> </td>"; $ausgaben["output"] .= "<td" . $class . ">Nachname</td>"; $ausgaben["output"] .= "<td" . $class . $size . "> </td>";