summaryrefslogtreecommitdiff
path: root/www-ssl/inc
diff options
context:
space:
mode:
Diffstat (limited to 'www-ssl/inc')
-rwxr-xr-xwww-ssl/inc/footer.php5
-rw-r--r--www-ssl/inc/funktion_counter.php24
-rwxr-xr-xwww-ssl/inc/funktion_lang.php43
-rwxr-xr-xwww-ssl/inc/header.php6
4 files changed, 56 insertions, 22 deletions
diff --git a/www-ssl/inc/footer.php b/www-ssl/inc/footer.php
index 5f4edf35..348871ac 100755
--- a/www-ssl/inc/footer.php
+++ b/www-ssl/inc/footer.php
@@ -16,9 +16,9 @@ if( $Page["ShowTabel"]=="Y" )
<br>
<p align="center">
<?PHP If (IsSet($_SESSION['oldurl']))
- echo "<a href=\"". $_SESSION["oldurl"]. "\">".Get_Text(11)."</a>&nbsp;";
+ echo "<a href=\"". $_SESSION["oldurl"]. "\">".Get_Text("back")."</a>&nbsp;";
?>
- <a href="#top"><?PHP echo Get_Text(12); ?></a>
+ <a href="#top"><?PHP echo Get_Text("top"); ?></a>
</p>
</td>
</tr>
@@ -111,6 +111,7 @@ if( isset($_SESSION['UID']))
<tr>
<td colspan="2">
<h5 align="center"> &#169; copyleft - <a href="mailto:erzengel@lists.ccc.de">Kontakt</a></h5>
+ <? include( "./inc/funktion_counter.php"); ?>
</td>
</tr>
</table>
diff --git a/www-ssl/inc/funktion_counter.php b/www-ssl/inc/funktion_counter.php
new file mode 100644
index 00000000..70b104d4
--- /dev/null
+++ b/www-ssl/inc/funktion_counter.php
@@ -0,0 +1,24 @@
+<?PHP
+
+$SQL = "SELECT `Anz` FROM `Counter` WHERE `URL`=\"". $Page["Name"]. "\"";
+$Erg = mysql_query($SQL, $con);
+
+echo mysql_error($con);
+
+if(mysql_num_rows($Erg)==0)
+{
+// echo "Counter: 1";
+ $SQL = "INSERT INTO `Counter` ( `URL` , `Anz` ) ".
+ "VALUES ('". $Page["Name"]. "', '1');";
+ $Erg = mysql_query($SQL, $con);
+}
+elseif(mysql_num_rows($Erg)==1)
+{
+// echo "Counter: ". (mysql_result($Erg, 0, 0)+1);
+ $SQL = "UPDATE `Counter` SET `Anz` = '". (mysql_result($Erg, 0, 0) +1). "' ".
+ "WHERE `URL` = '". $Page["Name"]. "' LIMIT 1 ;";
+ $Erg = mysql_query($SQL, $con);
+}
+
+
+?>
diff --git a/www-ssl/inc/funktion_lang.php b/www-ssl/inc/funktion_lang.php
index 9a6dc220..42de5df8 100755
--- a/www-ssl/inc/funktion_lang.php
+++ b/www-ssl/inc/funktion_lang.php
@@ -1,30 +1,39 @@
<?PHP
-function Get_Text ($TextID)
-{
if( !isset($_SESSION['Sprache'])) $_SESSION['Sprache'] = "EN";
if( $_SESSION['Sprache']=="") $_SESSION['Sprache']="EN";
-GLOBAL $con;
-$SQL = "SELECT * FROM `Sprache` WHERE TextID=\"$TextID\" AND Sprache ='".$_SESSION['Sprache']."'";
-@$Erg = mysql_query($SQL, $con);
-if(!mysql_error($con))
- return (@mysql_result($Erg, 0, "Text"));
-else
- return "Error Data";
+function Get_Text ($TextID)
+{
+
+ GLOBAL $con;
+ $SQL = "SELECT * FROM `Sprache` WHERE TextID=\"$TextID\" AND Sprache ='".$_SESSION['Sprache']."'";
+ @$Erg = mysql_query($SQL, $con);
+// if(!mysql_error($con))
+ if( mysql_num_rows( $Erg) == 1)
+ return (@mysql_result($Erg, 0, "Text"));
+ else
+ {
+// die("Error Data, '$TextID' found ". mysql_num_rows( $Erg). "x");
+ return "Error Data, '$TextID' found ". mysql_num_rows( $Erg). "x";
+ }
}
-function Print_Text ($TextID){
-GLOBAL $con;
+function Print_Text ($TextID)
+{
+ GLOBAL $con;
-$SQL = "SELECT * FROM `Sprache` WHERE TextID=\"$TextID\" AND Sprache ='".$_SESSION['Sprache']."'";
-@$Erg = mysql_query($SQL, $con);
+ $SQL = "SELECT * FROM `Sprache` WHERE TextID=\"$TextID\" AND Sprache ='".$_SESSION['Sprache']."'";
+ @$Erg = mysql_query($SQL, $con);
-if(!mysql_error($con))
- echo nl2br(@mysql_result($Erg, 0, "Text"));
-else
- echo "Error Data";
+// if(!mysql_error($con))
+ if( mysql_num_rows( $Erg) == 1)
+ echo nl2br(@mysql_result($Erg, 0, "Text"));
+ else
+ {
+ echo "Error Data, '$TextID' found ". mysql_num_rows( $Erg). "x";
+ }
}
?>
diff --git a/www-ssl/inc/header.php b/www-ssl/inc/header.php
index dc52f8a0..efeded4e 100755
--- a/www-ssl/inc/header.php
+++ b/www-ssl/inc/header.php
@@ -78,7 +78,7 @@ if( $Page["ShowTabel"]=="Y" )
<td>
<?
echo "\t<a name=\"#$header\" class=\"contenttopic\">";
- if( strlen(Get_Text($Page["Name"])) > 0 )
+ if( strlen( $header) == 0 )
echo "\n\t<b>". Get_Text($Page["Name"]). "</b></a>\n";
else
echo "\n\t<b>$header</b></a>\n";
@@ -115,9 +115,9 @@ function SetHeaderGo2Back ()
if ( $Page["CVS"] != "Y" ) {
echo "Du besitzt kein Rechte für diesen Bereich.<br>\n";
If (IsSet($_SESSION['oldurl']))
- echo "<a href=\"".$oldurl."\">".Get_Text(11)."</a> geht's zur&uuml;ck...\n";
+ echo "<a href=\"".$oldurl."\">".Get_Text("back")."</a> geht's zur&uuml;ck...\n";
else
- echo "<a href=\"../nonpublic\">".Get_Text(11)."</a> geht's zur&uuml;ck...\n";
+ echo "<a href=\"../nonpublic\">".Get_Text("back")."</a> geht's zur&uuml;ck...\n";
exit ();
}
?>