本文整理汇总了PHP中eCRC函数的典型用法代码示例。如果您正苦于以下问题:PHP eCRC函数的具体用法?PHP eCRC怎么用?PHP eCRC使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了eCRC函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renumber_blog
function renumber_blog($kategorie = "")
{
global $db, $environment, $blog, $cfg, $status;
$where = "";
if ($kategorie != "") {
$where = " AND SUBSTR(content,POSITION('[" . $cfg["bloged"]["blogs"][$blog]["category"] . "]' IN content)+11,POSITION('[/" . $cfg["bloged"]["blogs"][$blog]["category"] . "]' IN content)-11-POSITION('[" . $cfg["bloged"]["blogs"][$blog]["category"] . "]' IN content)) ='" . $kategorie . "'";
}
$sql = "SELECT Cast(SUBSTR(content,POSITION('[" . $cfg["bloged"]["blogs"][$blog]["sort"][0] . "]' IN content)+6,POSITION('[/" . $cfg["bloged"]["blogs"][$blog]["sort"][0] . "]' IN content)-POSITION('[" . $cfg["bloged"]["blogs"][$blog]["sort"][0] . "]' IN content)-6) AS SIGNED) AS date,content,tname \n FROM site_text \n WHERE " . $status . " AND tname like '" . eCRC(make_ebene($environment["parameter"][4])) . ".%'" . $where . " order by date ASC";
$result = $db->query($sql);
$count = 0;
$preg = "^\\[!\\][0-9]*";
while ($data = $db->fetch_array($result, 1)) {
$count = $count + 10;
$content = preg_replace("|\\[" . $cfg["bloged"]["blogs"][$blog]["sort"][0] . "\\][-0-9]*\\[\\/" . $cfg["bloged"]["blogs"][$blog]["sort"][0] . "\\]|", "\\[" . $cfg["bloged"]["blogs"][$blog]["sort"][0] . "\\]" . $count . "[\\/" . $cfg["bloged"]["blogs"][$blog]["sort"][0] . "\\]", $data["content"]);
$sql_update = "UPDATE site_text SET content='" . $content . "' WHERE " . $status . " and tname ='" . $data["tname"] . "'";
if ($_SESSION["wizard_content"][DATABASE . "," . $data["tname"] . ",inhalt"]) {
$_SESSION["wizard_content"][DATABASE . "," . $data["tname"] . ",inhalt"] = preg_replace("|\\[" . $cfg["bloged"]["blogs"][$blog]["sort"][0] . "\\][-0-9]*\\[\\/" . $cfg["bloged"]["blogs"][$blog]["sort"][0] . "\\]|", "[" . $cfg["bloged"]["blogs"][$blog]["sort"][0] . "]" . $count . "[/" . $cfg["bloged"]["blogs"][$blog]["sort"][0] . "]", $_SESSION["wizard_content"][DATABASE . "," . $data["tname"] . ",inhalt"]);
}
$result_update = $db->query($sql_update);
}
}
示例2: bloglink
function bloglink($url, $anzahl, $tag, $length = 25)
{
global $db;
$sql = "SELECT Cast(SUBSTR(content,6,19) as DATETIME) AS date,content,tname from site_text WHERE content REGEXP '^\\\\[!\\\\]1;' AND tname like '" . eCRC($url) . ".%' order by date DESC Limit 0,5";
$result = $db->query($sql);
$links = "<ul>";
while ($data = $db->fetch_array($result, 1)) {
$preg1 = "\\.([0-9]*)\$";
preg_match("/{$preg1}/", $data["tname"], $id);
$test = preg_replace("|\r\n|", "\\r\\n", $data["content"]);
$preg = "\\[" . $tag . "\\](.*)\\[\\/" . $tag . "\\]";
preg_match("/{$preg}/U", $test, $regs);
if ($regs[1] == "") {
continue;
}
$regs[1] = preg_replace("|\\\\r\\\\n|", "", $regs[1]);
$regs[1] = substr($regs[1], 0, $length);
$links .= "<li><a href=\"" . $url . "/" . $id[1] . ".html\">" . $regs[1] . "</a></li>";
}
$links .= "</ul>";
return $links;
}
示例3: str_replace
// funktions bereich
// page basics
// ***
// fehlermeldungen
if ($_GET["error"] != "") {
if ($_GET["error"] == 1) {
$ausgaben["form_error"] = "#(error1)";
}
} else {
$ausgaben["form_error"] = "";
}
// navigation erstellen
$ausgaben["link_new"] = $cfg["usered"]["basis"] . "/add.html";
// was anzeigen
$cfg["usered"]["path"] = str_replace($pathvars["virtual"], "", $cfg["usered"]["basis"]);
$mapping["main"] = eCRC($cfg["usered"]["path"]) . ".list";
// unzugaengliche #(marken) sichtbar machen
if (isset($_GET["edit"])) {
$ausgaben["inaccessible"] = "inaccessible values:<br />";
$ausgaben["inaccessible"] .= "# (error1) #(error1)<br />";
} else {
$ausgaben["inaccessible"] = "";
}
// wohin schicken
$ausgaben["form_aktion"] = $cfg["usered"]["basis"] . "/list.html";
// +++
// page basics
} else {
header("Location: " . $pathvars["virtual"] . "/");
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
示例4: show_blog
//.........这里部分代码省略.........
$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
示例5: VALUES
$sql = "INSERT INTO " . $cfg["menued"]["db"]["lang"]["entries"] . "\n ( mid, lang, label, " . $extenda . " exturl )\n VALUES ( '" . $lastid . "',\n '" . $_POST["lang"] . "',\n '" . $_POST["label"] . "',\n " . $extendb . "\n '" . $_POST["exturl"] . "' )";
if ($debugging["sql_enable"]) {
$debugging["ausgabe"] .= "sql: " . $sql . $debugging["char"];
}
$result = $db->query($sql);
if (!$result) {
$ausgaben["form_error"] .= $db->error("#(error_result)<br />");
}
}
if ($ausgaben["form_error"] == "") {
// wohin schicken
if ($_POST["add"]) {
$header = $cfg["menued"]["basis"] . "/edit," . $lastid . ",verify.html";
} else {
if ($_SESSION["REFERER"] != "") {
$crc = eCRC(str_replace($pathvars["virtual"], "", $_SESSION["REFERER"])) . ".";
// ausnahme fuer die startseite hier wird die crc geleert und index aus dem referer entfernt
if ($_SESSION["REFERER"] == "/auth/index") {
$crc = "";
$_SESSION["REFERER"] = str_replace("/index", "", $_SESSION["REFERER"]);
}
if (strstr($_SERVER["HTTP_REFERER"], "/auth/wizard/add")) {
if ($ausgaben["form_error"] == "") {
$_SESSION["form_referer"] = $_SESSION["REFERER"] . "/" . $fixed_entry . ".html";
$header = $pathvars["virtual"] . "/wizard/add," . DATABASE . "," . $crc . $fixed_entry . ",inhalt," . $_POST["wizard"] . ".html";
} else {
$header = $pathvars["virtual"] . "/wizard/add,,,," . $_POST["wizard"] . ".html";
$_SESSION["form_error"] = array("desc" => $ausgaben["form_error"], "post" => $_POST);
}
// header("Location: ".$header);
} else {
示例6: eCRC
// funktions bereich fuer erweiterungen
// ***
### put your code here ###
// +++
// funktions bereich fuer erweiterungen
// page basics
// ***
// fehlermeldungen
$ausgaben["form_error"] = "";
// navigation erstellen
$ausgaben["form_aktion"] = $cfg["fileed"]["basis"] . "/upload," . $environment["parameter"][1] . ",verify.html";
$ausgaben["form_break"] = $cfg["fileed"]["basis"] . "/list.html";
// hidden values
$ausgaben["form_hidden"] .= "";
// was anzeigen
$mapping["main"] = eCRC($environment["ebene"]) . ".upload";
#$mapping["navi"] = "leer";
// unzugaengliche #(marken) sichtbar machen
if (isset($HTTP_GET_VARS["edit"])) {
$ausgaben["inaccessible"] = "inaccessible values:<br />";
$ausgaben["inaccessible"] .= "# (error_result) #(error_result)<br />";
$ausgaben["inaccessible"] .= "# (error_dupe) #(error_dupe)<br />";
} else {
$ausgaben["inaccessible"] = "";
}
// wohin schicken
#n/a
// +++
// page basics
if ($environment["parameter"][2] == "verify" && ($HTTP_POST_VARS["send"] != "" || $HTTP_POST_VARS["extension1"] != "" || $HTTP_POST_VARS["extension2"] != "")) {
// form eigaben pr�fen
示例7: eCRC
$ausgaben["content"] = "#(no_content)";
}
$ausgaben["form_hidden"] .= "<input type=\"hidden\" name=\"tname\" value=\"" . $tname . "\" class=\"hidden\"/>";
// +++
// content holen (alle sprachen)
// page basics
// ***
// fehlermeldungen
$ausgaben["form_error"] = "";
// navigation erstellen
$ausgaben["form_aktion"] = $cfg["menued"]["basis"] . "/delete," . $environment["parameter"][1] . "," . $environment["parameter"][2] . ".html";
$ausgaben["form_break"] = $cfg["menued"]["basis"] . "/list.html";
// hidden values
$ausgaben["form_hidden"] .= "<input type=\"hidden\" name=\"delete\" value=\"true\" class=\"hidden\"/>";
// was anzeigen
$mapping["main"] = eCRC($environment["ebene"]) . ".delete";
$mapping["navi"] = "leer";
// unzugaengliche #(marken) sichtbar machen
// ***
if (isset($HTTP_GET_VARS["edit"])) {
$ausgaben["inaccessible"] = "inaccessible values:<br />";
$ausgaben["inaccessible"] .= "# (error_menu) #(error_menu)<br />";
$ausgaben["inaccessible"] .= "# (error_menu_lang) #(error_menu_lang)<br />";
$ausgaben["inaccessible"] .= "# (error_text) #(error_text)<br />";
$ausgaben["inaccessible"] .= "# (no_content) #(no_content)<br />";
} else {
$ausgaben["inaccessible"] = "";
}
// +++
// unzugaengliche #(marken) sichtbar machen
// wohin schicken
示例8: array
$_SESSION["page"] = $_SESSION["cms_last_referer"];
$hidedata["cms"] = array("link" => $_SESSION["cms_last_edit"] . "?referer=" . $_SESSION["cms_last_referer"], "display" => "inline");
}
// navigation erstellen
$ausgaben["form_aktion"] = $cfg["fileed"]["basis"] . "/compilation," . $environment["parameter"][1] . "," . $environment["parameter"][2] . "," . $environment["parameter"][3] . ".html";
$ausgaben["form_break"] = $cfg["fileed"]["basis"] . "/list.html";
$ausgaben["edit"] = $cfg["fileed"]["basis"] . "/collect," . $environment["parameter"][1] . ".html";
if ($cfg["fileed"]["compilation"]["sel_pics_w_sel"] == -1) {
// wenn die selection ausgewaehlt wird werden auch alle bilder ausgewaehlt, js-teil anzeigen
$hidedata["sel_pics_w_sel"] = array();
}
// hidden values
#$ausgaben["form_hidden"] .= "";
// was anzeigen
$cfg["fileed"]["path"] = str_replace($pathvars["virtual"], "", $cfg["fileed"]["basis"]);
$mapping["main"] = eCRC($cfg["fileed"]["path"]) . ".compilation";
#$mapping["navi"] = "leer";
// unzugaengliche #(marken) sichtbar machen
if (isset($HTTP_GET_VARS["edit"])) {
$ausgaben["inaccessible"] = "inaccessible values:<br />";
$ausgaben["inaccessible"] .= "g (cmslink) g(cmslink)<br />";
$ausgaben["inaccessible"] .= "# (img_plural) #(img_plural)<br />";
$ausgaben["inaccessible"] .= "# (img_sing) #(img_sing)<br />";
$ausgaben["inaccessible"] .= "# (all_names) #(all_names)<br />";
$ausgaben["inaccessible"] .= "# (check_error1) #(check_error1)<br />";
$ausgaben["inaccessible"] .= "# (check_error2) #(check_error2)<br />";
$ausgaben["inaccessible"] .= "# (answera) #(answera)<br />";
$ausgaben["inaccessible"] .= "# (answerb) #(answerb)<br />";
$ausgaben["inaccessible"] .= "# (answerc_no) #(answerc_no)<br />";
$ausgaben["inaccessible"] .= "# (answerc_yes) #(answerc_yes)<br />";
$ausgaben["inaccessible"] .= "# (answerc_yes_sing) #(answerc_yes_sing)<br />";
示例9: str_replace
// ***
// fehlermeldungen
if ($HTTP_GET_VARS["error"] != "") {
if ($HTTP_GET_VARS["error"] == 1) {
$ausgaben["form_error"] = "#(error1)";
}
} else {
$ausgaben["form_error"] = "";
}
// navigation erstellen
$ausgaben["link_new"] = $cfg["contented"]["basis"] . "/add.html";
// hidden values
#$ausgaben["form_hidden"] .= "";
// was anzeigen
$cfg["contented"]["path"] = str_replace($pathvars["virtual"], "", $cfg["contented"]["basis"]);
$mapping["main"] = eCRC($cfg["contented"]["path"]) . ".list";
#$mapping["navi"] = "leer";
// unzugaengliche #(marken) sichtbar machen
if (isset($HTTP_GET_VARS["edit"])) {
$ausgaben["inaccessible"] = "inaccessible values:<br />";
$ausgaben["inaccessible"] .= "# (error1) #(error1)<br />";
$ausgaben["inaccessible"] .= "# (edittitel) #(edittitel)<br />";
$ausgaben["inaccessible"] .= "# (deletetitel) #(deletetitel)<br />";
} else {
$ausgaben["inaccessible"] = "";
}
// wohin schicken
#n/a
// +++
// page basics
} else {
示例10: content
function content($line, $tname)
{
global $db, $debugging, $pathvars, $specialvars, $environment, $defaults, $ausgaben, $rechte, $eWeBuKi, $RightConcept;
if ($specialvars["crc32"] == -1) {
if ($environment["ebene"] != "" && $tname == $environment["kategorie"]) {
$tname = eCRC($environment["ebene"]) . "." . $tname;
if ($debugging["html_enable"]) {
$debugging["ausgabe"] .= "crc32 tname \"" . $tname . "\" forced!!!" . $debugging["char"];
}
}
} else {
// ist das eine sub kategorie ?
if ($environment["subkatid"] != "" && $tname == $environment["katid"]) {
$tname = $tname . "." . $environment["subkatid"];
if ($debugging["html_enable"]) {
$debugging["ausgabe"] .= "sub tname \"" . $tname . "\" forced!!!" . $debugging["char"];
}
#$dbtname = $tname;
}
}
while (strpos($line, "#(") !== false || strpos($line, "g(") !== false) {
// wo beginnt die marke
$labelbeg = strpos($line, "#(");
$art = "#(";
$bez = "# (";
$dbtname = $tname;
if ($labelbeg === false) {
$labelbeg = strpos($line, "g(");
$art = "g(";
$bez = "g (";
$dbtname = "global";
}
// wo endet die marke (wichtig der offset!)
$labelend = strpos($line, ")", $labelbeg);
// wie lang ist die marke
$labellen = $labelend - $labelbeg;
// token name extrahieren
$label = substr($line, $labelbeg + 2, $labellen - 2);
if (strpos($label, ",") !== false) {
break;
}
// javascript fix
if (preg_match("/^v[0-9]*\$/", $environment["parameter"][1], $regs) && ($rechte["view"] || $rechte["cms_edit"] == -1)) {
$version_sql = "AND version=" . substr($environment["parameter"][1], 1);
$version = substr($environment["parameter"][1], 1);
} else {
$version = "";
$version_sql = "";
}
if ($specialvars["content_release"] == -1 && $version == "") {
$content_release = "AND status>0";
} else {
$content_release = "";
}
$sql = "SELECT html, content\n FROM " . SITETEXT . "\n WHERE tname='" . $dbtname . "'\n AND lang='" . $environment["language"] . "'\n AND label='" . $label . "'\n " . $version_sql . "\n " . $content_release . "\n ORDER BY version DESC\n LIMIT 0,1";
#if ( $debugging["html_enable"] ) $debugging["ausgabe"] .= "sql: ".$sql.$debugging["char"];
$result = $db->query($sql);
$row = $db->fetch_row($result);
if (!is_array($row)) {
// wenn "aktuelle sprache" = "default sprache" ueberfluessige fehlermeldung nicht anzeigen!
if ($environment["language"] != $specialvars["default_language"]) {
if ($debugging["html_enable"]) {
$debugging["ausgabe"] .= "Language: \"" . $environment["language"] . "\" for #(" . $label . ") in template \"" . $dbtname . "\" not found using default: \"" . $specialvars["default_language"] . "\"" . $debugging["char"];
}
}
$sql = "SELECT html, content\n FROM " . SITETEXT . "\n WHERE tname='{$dbtname}'\n AND lang='" . $specialvars["default_language"] . "'\n AND label='{$label}'\n " . $version_sql . "\n " . $content_release . "\n ORDER BY version DESC\n LIMIT 0,1";
$result = $db->query($sql);
$row = $db->fetch_row($result);
}
if ($row[1] == "") {
if ($debugging["html_enable"]) {
$debugging["ausgabe"] .= "Language: Uuuuups no default language \"" . $specialvars["default_language"] . "\" for #(" . $label . ") in template \"" . $dbtname . "\" found. Giving up!" . $debugging["char"];
}
}
$database = $db->getDb();
$replace = $row[1];
// wenn content nicht in html ist und deaktiviert wurde
if ($row[0] != -1 && $specialvars["denyhtml"] == -1) {
// html killer :)
$pattern = "<[\\!\\/a-zA-Z].{0,}>";
while (preg_match("/" . $pattern . "/", $replace, $tag)) {
$replace = str_replace($tag[0], " - html gelöscht! -", $replace);
}
}
// eWeBuKi tag schutz part 1 (siehe part 2 (weiter unten), part 3 (cms.in.php), part 4 (function_rparser.inc.php))
if (strpos($replace, "[/E]") !== false) {
$preg = "|\\[E\\](.*)\\[/E\\]|Us";
preg_match_all($preg, $replace, $match, PREG_PATTERN_ORDER);
$mark_l = array("[/", "[");
$hide_l = array("++", "**");
$mark_o = array("#(", "g(", "#{", "!#");
$hide_o = array("::1::", "::2::", "::3::", "::4::");
foreach ($match[0] as $key => $value) {
$escape = str_replace($mark_l, $hide_l, $match[1][$key]);
$escape = str_replace($mark_o, $hide_o, $escape);
$replace = str_replace($value, "[E]" . $escape . "[/E]", $replace);
}
}
// cms edit link einblenden
$check = "";
//.........这里部分代码省略.........
示例11: explode
### put your code here ###
if ($error) {
$ausgaben["form_error"] .= $db->error("#(error_result)<br />");
}
// +++
// funktions bereich fuer erweiterungen
}
// datensatz aendern
if ($ausgaben["form_error"] == "") {
$path = explode("/", $url);
$kategorie = array_pop($path);
$ebene = implode("/", $path);
if ($ebene == "") {
$tname = $kategorie;
} else {
$tname = eCRC($ebene) . "." . $kategorie;
}
// zuerst alle loeschen
$sql = "DELETE\n FROM " . $cfg["keyworded"]["db"]["keyword"]["entries"] . "\n WHERE " . $cfg["keyworded"]["db"]["keyword"]["tname"] . "='" . $tname . "'\n AND " . $cfg["keyworded"]["db"]["keyword"]["lang"] . "='" . $environment["language"] . "'";
$result = $db->query($sql);
// neue hinzufuegen
foreach ($keywords as $tag) {
if ($tag == "") {
continue;
}
$sql = "INSERT INTO " . $cfg["keyworded"]["db"]["keyword"]["entries"] . "\n (" . $cfg["keyworded"]["db"]["keyword"]["tname"] . ",\n " . $cfg["keyworded"]["db"]["keyword"]["ebene"] . ",\n " . $cfg["keyworded"]["db"]["keyword"]["kategorie"] . ",\n " . $cfg["keyworded"]["db"]["keyword"]["lang"] . ",\n " . $cfg["keyworded"]["db"]["keyword"]["keyword"] . "\n )\n VALUES ('" . $tname . "',\n '" . $ebene . "',\n '" . $kategorie . "',\n '" . $environment["language"] . "',\n '" . $tag . "'\n )";
$result = $db->query($sql);
}
// Sql um spezielle Felder erweitern
#$ldate = $_POST["ldate"];
#$ldate = substr($ldate,6,4)."-".substr($ldate,3,2)."-".substr($ldate,0,2)." ".substr($ldate,11,9);
示例12: find_marked_content
function find_marked_content($url = "/", $cfg, $label, $status = array(-2, -1), $add_filter = array(), $check_privs = TRUE, $ignore = array())
{
global $db, $pathvars, $environment;
$path = explode("/", $url);
$kategorie = array_pop($path);
$ebene = implode("/", $path);
// gibt es bereiche, die nicht untersucht werden sollen
if (count($ignore) > 0) {
foreach ($ignore as $value) {
$where[] = "ebene NOT LIKE '" . $value . "%'";
$where[] = "kategorie NOT LIKE '" . $value . "%'";
}
$where = " AND (" . implode(" AND ", $where) . ")";
}
// zusaetzliche filter
$buffer = array();
foreach ($add_filter as $key => $value) {
switch ($key) {
case "user":
$buffer[] = "byalias='" . $value . "'";
break;
case "max_age":
$buffer[] = "changed>='" . date("Y-m-d H:i:s", mktime(0, 0, 0, date("m"), date("d") - $value, date("Y"))) . "'";
break;
}
}
if (count($buffer) > 0) {
$filter = "AND " . implode(" AND ", $buffer);
}
$sql = "SELECT *\n FROM site_text\n WHERE (\n ebene LIKE '" . $url . "%'\n OR (ebene='" . $ebene . "' AND kategorie='" . $kategorie . "')\n )" . $where . "\n AND label='" . $label . "'\n AND status IN (" . implode(",", $status) . ")\n " . $filter . "\n ORDER BY tname, status ASC, version DESC";
$sql = "SELECT *\n FROM site_text\n WHERE (\n ebene LIKE '" . $url . "%'\n OR (ebene='" . $ebene . "')\n )" . $where . "\n AND label='" . $label . "'\n AND status IN (" . implode(",", $status) . ")\n " . $filter . "\n ORDER BY tname, status ASC, version DESC";
// if ( count($add_filter) > 0 ) echo "$sql<br>";
$result = $db->query($sql);
$dataset = "";
while ($data = $db->fetch_array($result)) {
// weiterspringen, falls es von diesen content bereits eine freizugebene version gibt
if ($dataset == $data["tname"] . "::" . $label) {
continue;
}
$dataset = $data["tname"] . "::" . $label;
if ($data["ebene"] == "") {
$tname = $data["kategorie"];
} else {
$tname = eCRC($data["ebene"]) . "." . $data["kategorie"];
}
$path = $data["ebene"] . "/" . $data["kategorie"];
// rechte checken
if ($check_privs == TRUE || $_SESSION["uid"] == "") {
if ($data["status"] == -2 && !priv_check($path, "publish")) {
continue;
} elseif ($data["status"] == -1 && !priv_check($path, "edit;publish")) {
continue;
}
}
// titel
$titel = "---";
preg_match("/\\[H[0-9]{1}\\](.+)\\[\\/H/Us", $data["content"], $match);
if (count($match) > 1) {
$titel = $match[1];
}
// link anpassen
if ($data["status"] > 0) {
$view_link = $pathvars["menuroot"] . $data["ebene"] . "/" . $data["kategorie"] . ".html";
} else {
$view_link = $pathvars["menuroot"] . $data["ebene"] . "/" . $data["kategorie"] . ",v" . $data["version"] . ".html";
}
// ggf kategorie
$kategorie = "---";
$ext = "---";
if ($cfg["bloged"]["blogs"][$url]["category"] != "") {
preg_match("/\\[" . $cfg["bloged"]["blogs"][$url]["addons"]["name"]["tag"] . "\\](.+)\\[\\/" . $cfg["bloged"]["blogs"][$url]["addons"]["name"][0] . "/Us", $data["content"], $termine_match);
if (count($termine_match) > 1) {
$ext = $termine_match[1];
// if ( $data["status"] > 0 ) {
$view_link = $pathvars["menuroot"] . $data["ebene"] . ",," . $data["kategorie"] . ".html";
// } else {
// $view_link = $pathvars["menuroot"].$data["ebene"].",,".$data["kategorie"].",v".$data["version"].".html";
// }
}
preg_match("/\\[" . $cfg["bloged"]["blogs"][$url]["category"] . "\\](.+)\\[\\/" . $cfg["bloged"]["blogs"][$url]["category"] . "/U", $data["content"], $match);
if (count($match) > 1) {
$kategorie = $match[1];
$path = $kategorie;
}
}
// letzte aktuelle version finden
$sql = "SELECT *\n FROM site_text\n WHERE tname='" . $data["tname"] . "'\n AND label='" . $data["label"] . "'\n AND lang='" . $data["lang"] . "'\n AND status=1\n ORDER BY version DESC";
$res_akt = $db->query($sql);
if ($db->num_rows($res_akt) == 0) {
$last_author = "";
$last_uid = "";
} else {
$dat_akt = $db->fetch_array($res_akt);
$last_author = $dat_akt["byforename"] . " " . $dat_akt["bysurname"];
$last_uid = $dat_akt["byalias"];
}
// tabellen farben wechseln
if ($cfg[$data["status"]]["color"]["set"] == $cfg["wizard"]["color"]["a"]) {
$cfg[$data["status"]]["color"]["set"] = $cfg["wizard"]["color"]["b"];
} else {
//.........这里部分代码省略.........
示例13: unset
if (count($dataloop["presse"]) > 0) {
$hidedata["presse"]["ueberschrift"] = "Pressemitteilungen";
}
if (count($dataloop["termine"]) > 0) {
$hidedata["termine"]["ueberschrift"] = "Termine";
}
}
break;
case "va-archiv":
// reiter ausblenden
unset($hidedata["aussenstelle"]);
// kekse manipulieren
$environment["kekse"] .= $defaults["split"]["kekse"] . "<span class=\"last_bread_crumb\">Archiv</span>";
$art_tname = eCRC("/aktuell/archiv");
$pre_tname = eCRC("/aktuell/presse");
$ter_tname = eCRC("/aktuell/termine");
$today = date("Y-m-d");
$sql = "SELECT CAST(SUBSTR(content,POSITION('[SORT]' IN content)+6,POSITION('[/SORT]' IN content)-POSITION('[SORT]' IN content)-6) AS DATETIME) AS start,\n tname,\n ebene,\n kategorie,\n content\n FROM site_text\n WHERE status='1'\n AND (\n tname LIKE '" . $ter_tname . ".%'\n OR (\n (tname LIKE '" . $art_tname . ".%' OR tname LIKE '" . $pre_tname . ".%')\n AND CAST(SUBSTR(content,POSITION('[SORT]' IN content)+6,POSITION('[/SORT]' IN content)-POSITION('[SORT]' IN content)-6) AS TIMESTAMP)<'" . $today . " 23:59:00'\n )\n )\n AND SUBSTR(content,POSITION('[KATEGORIE]' IN content),POSITION('[/KATEGORIE]' IN content)-POSITION('[KATEGORIE]' IN content))= '[KATEGORIE]/aemter/" . $amtid . "/index'\n ORDER BY start DESC";
// seiten umschalter
$inhalt_selector = inhalt_selector($sql, $environment["parameter"][1], 25, $parameter, 1, 3, $getvalues);
$ausgaben["va_archiv_inhalt_selector"] = $inhalt_selector[0] . "<br />";
$sql = $inhalt_selector[1];
$ausgaben["va_archiv_anzahl"] = $inhalt_selector[2];
$result = $db->query($sql);
while ($data = $db->fetch_array($result, 1)) {
if (strstr($data["tname"], "1884525588")) {
// termine
$link = "termine,," . $data["kategorie"] . ",all.html";
preg_match("/\\[_NAME\\](.*)\\[\\/_NAME\\]/Uis", $data["content"], $match);
$title = $match[1];
$type = "Termin";
示例14: str_replace
if ($HTTP_GET_VARS["error"] != "") {
if ($HTTP_GET_VARS["error"] == 1) {
$ausgaben["form_error"] = "#(error1)";
} else {
$ausgaben["form_error"] = "#(error2)";
}
} else {
$ausgaben["form_error"] = "";
}
// navigation erstellen
$ausgaben["link_new"] = $cfg["fileed"]["basis"] . "/add.html";
// hidden values
#$ausgaben["form_hidden"] .= "";
// was anzeigen
$cfg["fileed"]["path"] = str_replace($pathvars["virtual"], "", $cfg["fileed"]["basis"]);
$mapping["main"] = eCRC($cfg["fileed"]["path"]) . ".list";
#$mapping["navi"] = "leer";
// unzugaengliche #(marken) sichtbar machen
if (isset($HTTP_GET_VARS["edit"])) {
$ausgaben["inaccessible"] = "inaccessible values:<br />";
$ausgaben["inaccessible"] .= "# (error1) #(error1)<br />";
$ausgaben["inaccessible"] .= "# (error2) #(error2)<br />";
$ausgaben["inaccessible"] .= "# (cmslink) #(cmslink)<br />";
$ausgaben["inaccessible"] .= "# (fileedit) #(fileedit)<br />";
$ausgaben["inaccessible"] .= "# (filedelete) #(filedelete)<br />";
$ausgaben["inaccessible"] .= "# (answera) #(answera)<br />";
$ausgaben["inaccessible"] .= "# (answerb) #(answerb)<br />";
$ausgaben["inaccessible"] .= "# (answerc_no) #(answerc_no)<br />";
$ausgaben["inaccessible"] .= "# (answerc_yes) #(answerc_yes)<br />";
$ausgaben["inaccessible"] .= "# (prev) #(next)<br />";
$ausgaben["inaccessible"] .= "# (next) #(prev)<br />";
示例15: str_replace
// ***
// fehlermeldungen
if ($HTTP_GET_VARS["error"] != "") {
if ($HTTP_GET_VARS["error"] == 1) {
$ausgaben["form_error"] = "#(error1)";
}
} else {
$ausgaben["form_error"] = "";
}
// navigation erstellen
$ausgaben["link_new"] = $cfg["leveled"]["basis"] . "/add.html";
// hidden values
#$ausgaben["form_hidden"] .= "";
// was anzeigen
$cfg["leveled"]["path"] = str_replace($pathvars["virtual"], "", $cfg["leveled"]["basis"]);
$mapping["main"] = eCRC($cfg["leveled"]["path"]) . ".list";
#$mapping["navi"] = "leer";
// unzugaengliche #(marken) sichtbar machen
if (isset($HTTP_GET_VARS["edit"])) {
$ausgaben["inaccessible"] = "inaccessible values:<br />";
$ausgaben["inaccessible"] .= "# (error1) #(error1)<br />";
} else {
$ausgaben["inaccessible"] = "";
}
// wohin schicken
#n/a
// +++
// page basics
} else {
header("Location: " . $pathvars["virtual"] . "/");
}