From 866c47ec603595e8fe67da5f0e5d162a70b1f7b4 Mon Sep 17 00:00:00 2001 From: cookie Date: Sun, 6 Nov 2005 17:14:25 +0000 Subject: move files git-svn-id: svn://svn.cccv.de/engel-system@20 29ba0400-6e00-0410-a75a-ca02368028f8 --- www-ssl/admin/sprache.php | 116 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100755 www-ssl/admin/sprache.php (limited to 'www-ssl/admin/sprache.php') diff --git a/www-ssl/admin/sprache.php b/www-ssl/admin/sprache.php new file mode 100755 index 00000000..af5db2ba --- /dev/null +++ b/www-ssl/admin/sprache.php @@ -0,0 +1,116 @@ +\n"; + echo Get_Text("pub_sprache_text1")."

\n"; + + // 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\n\t\t"; + echo "\t\t". Get_Text("pub_sprache_TextID"). ""; + foreach( $Sprachen as $Name => $Value ) + echo "". + Get_Text("pub_sprache_Sprache"). " ". $Name. + ""; + echo "\t\t". Get_Text("pub_sprache_Edit"). ""; + echo "\t\t"; + + + // ausgabe eintraege + $SQL = "SELECT * FROM `Sprache` ORDER BY `TextID`;"; + $erg = mysql_query($SQL, $con); + echo mysql_error($con); + + $TextID_Old = mysql_result( $erg, 0, "TextID" ); + for( $i=0; $i"; + echo "\n"; + echo "\t\t$TextID_Old ". + " \n"; + + foreach( $Sprachen as $Name => $Value ) + { + echo "\t\t\n"; + $Sprachen[ $Name ] = ""; + } + + echo "\t\t\n"; + echo ""; + echo "\n"; + $TextID_Old = $TextID_New; + } + $Sprachen[ mysql_result( $erg, $i, "Sprache" ) ] = mysql_result( $erg, $i, "Text" ); + } /*FOR*/ + + //fuer neu eintraege + echo "
"; + echo "\n"; + echo "\t\t \n"; + + foreach( $Sprachen as $Name => $Value ) + echo "\t\t\n"; + + echo "\t\t\n"; + echo ""; + echo "
\n"; + + + echo "\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')"; + $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 ("./inc/footer.php"); +?> + -- cgit v1.2.3-70-g09d2