diff options
-rwxr-xr-x | www-ssl/inc/footer.php | 5 | ||||
-rw-r--r-- | www-ssl/inc/funktion_counter.php | 24 | ||||
-rwxr-xr-x | www-ssl/inc/funktion_lang.php | 43 | ||||
-rwxr-xr-x | www-ssl/inc/header.php | 6 | ||||
-rwxr-xr-x | www-ssl/nonpublic/einstellungen.php | 12 | ||||
-rwxr-xr-x | www-ssl/nonpublic/news_output.php | 5 | ||||
-rwxr-xr-x | www-ssl/nonpublic/waeckliste.php | 2 |
7 files changed, 66 insertions, 31 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> "; + echo "<a href=\"". $_SESSION["oldurl"]. "\">".Get_Text("back")."</a> "; ?> - <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"> © 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ück...\n"; + echo "<a href=\"".$oldurl."\">".Get_Text("back")."</a> geht's zurück...\n"; else - echo "<a href=\"../nonpublic\">".Get_Text(11)."</a> geht's zurück...\n"; + echo "<a href=\"../nonpublic\">".Get_Text("back")."</a> geht's zurück...\n"; exit (); } ?> diff --git a/www-ssl/nonpublic/einstellungen.php b/www-ssl/nonpublic/einstellungen.php index 214593ae..4c9bd721 100755 --- a/www-ssl/nonpublic/einstellungen.php +++ b/www-ssl/nonpublic/einstellungen.php @@ -6,7 +6,7 @@ include ("./inc/crypt.php"); if (!IsSet($_POST["action"])) { - echo Get_Text(1).$_SESSION['Nick'].",<br>\n\n"; + echo Get_Text("Hallo").$_SESSION['Nick'].",<br>\n\n"; Print_Text(13); ?> <hr width=\"100%\"> @@ -31,7 +31,7 @@ if (!IsSet($_POST["action"])) <tr> <td><? Print_Text("pub_einstellungen_email"); ?></td> <td><input type="text" name="eemail" size="40" value="<? echo $_SESSION['email']; ?>"></td></tr> </table> - <input type="submit" value="<?PHP Print_Text(10); ?>"> + <input type="submit" value="<?PHP Print_Text("save"); ?>"> </form> <br> @@ -45,7 +45,7 @@ if (!IsSet($_POST["action"])) <tr><td><?PHP Print_Text(16); ?></td><td><input type="password" name="new1" size="20"></td></tr> <tr><td><?PHP Print_Text(17); ?></td><td><input type="password" name="new2" size="20"></td></tr> </table> - <input type="submit" value="<?PHP Print_Text(10); ?>"> + <input type="submit" value="<?PHP Print_Text("save"); ?>"> </form> <br> @@ -71,7 +71,7 @@ if (!IsSet($_POST["action"])) </select> </td></tr> </table> - <input type="submit" value="<?PHP Print_Text(10); ?>"> + <input type="submit" value="<?PHP Print_Text("save"); ?>"> </form> <br> <hr width="100%"> @@ -89,7 +89,7 @@ if (!IsSet($_POST["action"])) </select> </td></tr> </table> - <input type="submit" value="<?PHP Print_Text(10); ?>"> + <input type="submit" value="<?PHP Print_Text("save"); ?>"> </form> <br> <hr width="100%"> @@ -130,7 +130,7 @@ $ANZ_AVATAR= shell_exec("ls inc/avatar/ | wc -l"); <img src="./inc/avatar/avatar<?php echo $_SESSION['Avatar']; ?>.gif" name="avatar" border="0" alt="" align="top"> </td></tr> </table> - <input type="submit" value="<?PHP Print_Text(10); ?>"> + <input type="submit" value="<?PHP Print_Text("save"); ?>"> </form> diff --git a/www-ssl/nonpublic/news_output.php b/www-ssl/nonpublic/news_output.php index e2b2f85d..781fdb92 100755 --- a/www-ssl/nonpublic/news_output.php +++ b/www-ssl/nonpublic/news_output.php @@ -3,7 +3,8 @@ include ("./inc/db.php"); include ("./inc/funktion_user.php"); -if( isset( $_POST["text"]) && isset( $_POST["betreff"]) && IsSet( $_POST["date"]) ) { +if( isset( $_POST["text"]) && isset( $_POST["betreff"]) && IsSet( $_POST["date"]) ) +{ if( !isset( $_POST["treffen"])) $_POST["treffen"] = 0; //$escaped_text = htmlescape($text); @@ -109,5 +110,5 @@ if ($_SESSION['CVS']["nonpublic/newsAddMeting"] == "Y") { ?> </table> <br> -<input type="submit" value="<?PHP Print_Text(10); ?>"> +<input type="submit" value="<?PHP Print_Text("save"); ?>"> </form> diff --git a/www-ssl/nonpublic/waeckliste.php b/www-ssl/nonpublic/waeckliste.php index 198a741a..f8b9984c 100755 --- a/www-ssl/nonpublic/waeckliste.php +++ b/www-ssl/nonpublic/waeckliste.php @@ -8,7 +8,7 @@ include ("./inc/header.php"); ?> -<? echo Get_Text(1). $_SESSION['Nick'].",<br>\n". +<? echo Get_Text("Hello"). $_SESSION['Nick'].",<br>\n". Get_Text("pub_waeckliste_Text1")?> <br><br> <table border="0" width="100%" class="border" cellpadding="2" cellspacing="1"> |