\n";
echo Get_Text("pub_sprache_text1") . "
\n";
echo "" . Get_Text("pub_sprache_ShowEntry") . "";
// ausgabe Tabellenueberschift
$SQL_Sprachen = "SELECT `Sprache` FROM `Sprache` GROUP BY `Sprache`;";
$erg_Sprachen = mysql_query($SQL_Sprachen, $con);
echo mysql_error($con);
for ($i = 0; $i < mysql_num_rows($erg_Sprachen); $i++)
$Sprachen[mysql_result($erg_Sprachen, $i, "Sprache")] = $i;
echo "\t
\n";
} /*if( !isset( $TextID ) )*/
else {
echo "edit: " . $_GET["TextID"] . "
";
foreach ($_GET as $k => $v) {
if ($k != "TextID") {
$sql_test = "SELECT * FROM `Sprache` " .
"WHERE `TextID`='" . $_GET["TextID"] . "' AND `Sprache`='$k'";
$erg_test = mysql_query($sql_test, $con);
if (mysql_num_rows($erg_test) == 0) {
$sql_save = "INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) " .
"VALUES ('" . $_GET["TextID"] . "', '$k', '$v')";
echo $sql_save . "
";
$Erg = mysql_query($sql_save, $con);
if ($Erg == 1)
echo "\t $k Save: OK
\n";
else
echo "\t $k Save: KO
\n";
} else
if (mysql_result($erg_test, 0, "Text") != $v) {
$sql_save = "UPDATE `Sprache` SET `Text`='$v' " .
"WHERE `TextID`='" . $_GET["TextID"] . "' AND `Sprache`='$k' ";
echo $sql_save . "
";
$Erg = mysql_query($sql_save, $con);
if ($Erg == 1)
echo "\t $k Update: OK
\n";
else
echo "\t $k Update: KO
\n";
} else
echo "\t $k no changes
\n";
}
}
}
include ("includes/footer.php");
?>