summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/funktion_activeUser.php87
-rw-r--r--includes/funktion_flag.php12
-rw-r--r--includes/funktion_menu.php4
-rw-r--r--includes/header_start.php76
-rw-r--r--includes/menu.php53
5 files changed, 99 insertions, 133 deletions
diff --git a/includes/funktion_activeUser.php b/includes/funktion_activeUser.php
index e214a1f9..ca6e3aaa 100644
--- a/includes/funktion_activeUser.php
+++ b/includes/funktion_activeUser.php
@@ -1,57 +1,34 @@
<?php
- // Funktionen gibt es nicht auf allen Rechnern
- if(!function_exists("bcdiv")) {
- function bcdiv( $param1, $param2) {
- return floor( $param1 / $param2);
- }
- }
-
- if(!function_exists("bcmod")) {
- function bcmod( $param1, $param2) {
- return $param1 - ( $param2 * bcdiv( $param1, $param2));
- }
- }
-
- echo "<h4 class=\"menu\">Engel online</h4>";
-
- $SQL = "SELECT UID, Nick, lastLogIn " .
- "FROM User " .
- "WHERE (`lastLogIn` > '" . gmdate("YmdHis", time() - (60 * 60)) . "' AND NOT (UID=" . $_SESSION['UID'] . ")) " .
- "ORDER BY lastLogIn DESC;";
-
- $Erg = mysql_query($SQL, $con);
-
- $Tist = (gmdate("d", time()) * 60 * 60 * 24) + // Tag
- (gmdate("H", time()) * 60 * 60) + // Stunde
- (gmdate("i", time()) * 60) + // Minute
- (gmdate("s", time()) ); // Sekunde
-
- echo "<ul>";
-
- for($i = 0; $i < mysql_num_rows($Erg); $i++) {
- echo "<li>";
-
- if($_SESSION['UID'] > 0)
- echo DisplayAvatar( mysql_result( $Erg, $i, "UID"));
-
- // Show Admin Page
- echo funktion_isLinkAllowed_addLink_OrLinkText("admin/userChangeNormal.php?enterUID=" . mysql_result($Erg, $i, "UID") . "&Type=Normal", mysql_result($Erg, $i, "Nick"));
-
- $Tlog = (substr(mysql_result($Erg, $i, "lastLogIn"), 8, 2) * 60 * 60 * 24) + // Tag
- (substr(mysql_result($Erg, $i, "lastLogIn"), 11, 2) * 60 * 60) + // Stunde
- (substr(mysql_result($Erg, $i, "lastLogIn"), 14, 2) * 60) + // Minute
- (substr(mysql_result($Erg, $i, "lastLogIn"), 17, 2) ); // Sekunde
-
- $Tlog = $Tist - $Tlog;
-
- echo " " . bcdiv($Tlog, 60) . ":";
-
- if(strlen(bcmod($Tlog, 60)) == 1)
- echo "0";
-
- echo bcmod($Tlog, 60);
- echo "</li>\n";
- }
-
- echo "</ul>";
+
+
+// Funktionen gibt es nicht auf allen Rechnern
+echo "<h4>Engel online</h4>";
+
+$SQL = "SELECT UID, Nick, lastLogIn " .
+"FROM User " .
+"WHERE (`lastLogIn` > '" . (time() - 60 * 60) . "' AND NOT (UID=" . $_SESSION['UID'] . ")) " .
+"ORDER BY lastLogIn DESC;";
+
+$Erg = mysql_query($SQL, $con);
+
+echo "<ul>";
+
+for ($i = 0; $i < mysql_num_rows($Erg); $i++) {
+ echo "<li>";
+
+ if ($_SESSION['UID'] > 0)
+ echo DisplayAvatar(mysql_result($Erg, $i, "UID"));
+
+ // Show Admin Page
+ echo funktion_isLinkAllowed_addLink_OrLinkText("admin/userChangeNormal.php?enterUID=" . mysql_result($Erg, $i, "UID") . "&Type=Normal", mysql_result($Erg, $i, "Nick"));
+
+ $timestamp = mktime($hour, $minute, $second, $month, $day, $year);
+
+ $Tlog = time() - mysql_result($Erg, $i, "lastLogIn");
+
+ echo " " . date("i:s", $Tlog);
+ echo "</li>\n";
+}
+
+echo "</ul>";
?>
diff --git a/includes/funktion_flag.php b/includes/funktion_flag.php
index b6a02242..b394d18a 100644
--- a/includes/funktion_flag.php
+++ b/includes/funktion_flag.php
@@ -1,9 +1,9 @@
<?php
- if(strpos($_SERVER["REQUEST_URI"], "?") > 0)
- $URL = $_SERVER["REQUEST_URI"] . "&SetLanguage=";
- else
- $URL = $_SERVER["REQUEST_URI"] . "?SetLanguage=";
+if (strpos($_SERVER["REQUEST_URI"], "?") > 0)
+ $URL = $_SERVER["REQUEST_URI"] . "&SetLanguage=";
+else
+ $URL = $_SERVER["REQUEST_URI"] . "?SetLanguage=";
- echo "<a href=\"" . $URL . "DE\"><img src=\"" . $url . $ENGEL_ROOT . "pic/flag/de.gif\" alt=\"DE\" /></a> ";
- echo "<a href=\"" . $URL . "EN\"><img src=\"" . $url . $ENGEL_ROOT . "pic/flag/en.gif\" alt=\"EN\" /></a> ";
+echo '<a class="sprache" href="' . $URL . 'DE"><img src="' . $ENGEL_ROOT . 'pic/flag/de.png" alt="DE" title="Deutsch"></a>';
+echo '<a class="sprache" href="' . $URL . 'EN"><img src="' . $ENGEL_ROOT . 'pic/flag/en.png" alt="EN" title="English"></a>';
?>
diff --git a/includes/funktion_menu.php b/includes/funktion_menu.php
index 387310aa..3d20420b 100644
--- a/includes/funktion_menu.php
+++ b/includes/funktion_menu.php
@@ -7,7 +7,7 @@ function ShowMenu($MenuName) {
$Gefunden = false;
// Ueberschift
- $Text = "<h4 class=\"menu\">" . Get_Text("$MenuName/") . "</h4><ul>";
+ $Text = "";
// Eintraege
foreach ($_SESSION['CVS'] as $Key => $Entry)
@@ -37,6 +37,6 @@ function ShowMenu($MenuName) {
}
}
if ($Gefunden)
- echo $MenueTableStart . $Text . $MenueTableEnd;
+ echo '<nav><h4>' . Get_Text("$MenuName/") . '</h4><ul>' . $Text . '</ul></nav>';
} //function ShowMenue
?>
diff --git a/includes/header_start.php b/includes/header_start.php
index 70f986cf..4795cee3 100644
--- a/includes/header_start.php
+++ b/includes/header_start.php
@@ -1,40 +1,40 @@
<?php
- ini_set("session.gc_maxlifetime", "65535");
-
- include "config/config.php";
- include "error_handler.php";
- include "config/config_db.php";
- include "funktion_lang.php";
- include "funktion_faq.php"; // fuer noAnswer() im menu
- include "funktion_menu.php";
- include "funktion_user.php";
-
- if(isset($SystemDisableMessage) && (strlen($SystemDisableMessage) > 0)) {
- echo "<html><head><title>" . $SystemDisableMessage . "</title></head>";
- echo "<body>" . $SystemDisableMessage . "</body></html>\n";
- die();
- }
-
- if(!isset($_SESSION))
- session_start();
-
- include "secure.php";
-
- if(!isset($_SESSION['IP']))
- $_SESSION['IP'] = $_SERVER['REMOTE_ADDR'];
-
- if(isset($_SESSION['UID']) && ($_SESSION['IP'] <> $_SERVER['REMOTE_ADDR'])) {
- session_destroy ();
- header("Location: " . $url . $ENGEL_ROOT);
- }
-
- include "UserCVS.php";
-
- // update LASTlogin
- if(isset($_SESSION['UID'])) {
- $SQLlastLogIn = "UPDATE `User` SET " .
- "`lastLogIn` = '" . gmdate("Y-m-j H:i:s", time()) . "'" .
- " WHERE `UID` = '" . $_SESSION['UID'] . "' LIMIT 1;";
- mysql_query ($SQLlastLogIn, $con);
- }
+ini_set("session.gc_maxlifetime", "65535");
+
+include "config/config.php";
+include "error_handler.php";
+include "config/config_db.php";
+include "funktion_lang.php";
+include "funktion_faq.php"; // fuer noAnswer() im menu
+include "funktion_menu.php";
+include "funktion_user.php";
+
+if (isset ($SystemDisableMessage) && (strlen($SystemDisableMessage) > 0)) {
+ echo "<html><head><title>" . $SystemDisableMessage . "</title></head>";
+ echo "<body>" . $SystemDisableMessage . "</body></html>\n";
+ die();
+}
+
+if (!isset ($_SESSION))
+ session_start();
+
+include "secure.php";
+
+if (!isset ($_SESSION['IP']))
+ $_SESSION['IP'] = $_SERVER['REMOTE_ADDR'];
+
+if (isset ($_SESSION['UID']) && ($_SESSION['IP'] <> $_SERVER['REMOTE_ADDR'])) {
+ session_destroy();
+ header("Location: " . $url . $ENGEL_ROOT);
+}
+
+include "UserCVS.php";
+
+// update LASTlogin
+if (isset ($_SESSION['UID'])) {
+ $SQLlastLogIn = "UPDATE `User` SET " .
+ "`lastLogIn` = '" . time() . "'" .
+ " WHERE `UID` = '" . $_SESSION['UID'] . "' LIMIT 1;";
+ mysql_query($SQLlastLogIn, $con);
+}
?>
diff --git a/includes/menu.php b/includes/menu.php
index 955de8b7..61a3ea73 100644
--- a/includes/menu.php
+++ b/includes/menu.php
@@ -2,35 +2,23 @@
<!-- anfang des menue parts //-->
<td width="160" valign="top">
<?php
-$MenueTableStart="
-<table align=\"center\" class=\"border\" cellpadding=\"3\" cellspacing=\"1\">
- <tr>
- <td width=\"160\" class=\"menu\">
-";
-$MenueTableEnd="</ul>
- <br />
- </td>
- </tr>
-</table><br />
-";
-
ShowMenu("");
ShowMenu("nonpublic");
ShowMenu("admin");
-if(!isset($submenus))
- $submenus = 0;
+if (!isset ($submenus))
+ $submenus = 0;
if ($submenus >= 1) {
- $inc_name = $_SERVER['PHP_SELF'];
- $filenamepos = strrpos($inc_name, '/');
- $filenamepos += 1;
- $filename = substr ($inc_name, $filenamepos );
- $filepost = substr ($filename, 0, -4);
- $filepre = substr ($filename, -4 );
- $verzeichnis = substr ($inc_name, 0 , $filenamepos);
-
- for ($index_nummer=1; $index_nummer <= $submenus; $index_nummer++) {
+ $inc_name = $_SERVER['PHP_SELF'];
+ $filenamepos = strrpos($inc_name, '/');
+ $filenamepos += 1;
+ $filename = substr($inc_name, $filenamepos);
+ $filepost = substr($filename, 0, -4);
+ $filepre = substr($filename, -4);
+ $verzeichnis = substr($inc_name, 0, $filenamepos);
+
+ for ($index_nummer = 1; $index_nummer <= $submenus; $index_nummer++) {
?>
<table align="center" class="border" cellpadding="3" cellspacing="1">
<tr>
@@ -42,26 +30,27 @@ if ($submenus >= 1) {
<br />
<?php
- }
+
+ }
}
-if( isset($_SESSION['UID']))
-{
+if (isset ($_SESSION['UID'])) {
?>
-<table align="center" class="border" cellpadding="3" cellspacing="1">
- <tr>
- <td width="160" class="menu">
+<nav>
<?php include("funktion_activeUser.php"); ?>
- </td>
- </tr>
-</table>
+</nav>
<?php
+
}
?>
+<nav>
+<h4><?php echo Get_Text("Sprache") ?></h4>
<?php
+
include ("funktion_flag.php");
?>
+</nav>
</td>
<!-- ende des menue parts //-->