\n";
$html .= Get_Text("pub_sprache_text1") . "
\n";
$html .= "" . Get_Text("pub_sprache_ShowEntry") . "";
// ausgabe Tabellenueberschift
$html .= "\t
\n";
} /*if( !isset( $TextID ) )*/
else {
$html .= "edit: " . $_POST["TextID"] . "
";
foreach ($_POST as $k => $v) {
if ($k != "TextID") {
$sql_test = "SELECT * FROM `Sprache` " .
"WHERE `TextID`='" . sql_escape($_POST["TextID"])
. "' AND `Sprache`='"
. sql_escape($k) . "'";
$erg_test = sql_select("SELECT * FROM `Sprache` WHERE `TextID`='" . sql_escape($_POST["TextID"]) . "' AND `Sprache`='" . sql_escape($k) . "'");
if (count($erg_test) == 0) {
$sql_save = "INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) " .
"VALUES ('" . sql_escape($_POST["TextID"]) . "', '"
. sql_escape($k) . "', '"
. sql_escape($v) . "')";
$html .= $sql_save . "
";
$Erg = sql_query($sql_save);
$html .= success("$k Save: OK
\n", true);
} else
if ($erg_test[0]['Text'] != $v) {
$sql_save = "UPDATE `Sprache` SET `Text`='"
. sql_escape($v) . "' " .
"WHERE `TextID`='"
. sql_escape($_POST["TextID"])
. "' AND `Sprache`='" . sql_escape($k) . "' ";
$html .= $sql_save . "
";
$Erg = sql_query($sql_save);
$html .= success(" $k Update: OK
\n", true);
} else
$html .= "\t $k no changes
\n";
}
}
}
return $html;
}
?>