rebase, new flags

main
Philip Häusler 14 years ago
parent bf64254625
commit d163b9921b

@ -1,57 +1,34 @@
<?php <?php
// Funktionen gibt es nicht auf allen Rechnern
if(!function_exists("bcdiv")) {
function bcdiv( $param1, $param2) { // Funktionen gibt es nicht auf allen Rechnern
return floor( $param1 / $param2); echo "<h4>Engel online</h4>";
}
} $SQL = "SELECT UID, Nick, lastLogIn " .
"FROM User " .
if(!function_exists("bcmod")) { "WHERE (`lastLogIn` > '" . (time() - 60 * 60) . "' AND NOT (UID=" . $_SESSION['UID'] . ")) " .
function bcmod( $param1, $param2) { "ORDER BY lastLogIn DESC;";
return $param1 - ( $param2 * bcdiv( $param1, $param2));
} $Erg = mysql_query($SQL, $con);
}
echo "<ul>";
echo "<h4 class=\"menu\">Engel online</h4>";
for ($i = 0; $i < mysql_num_rows($Erg); $i++) {
$SQL = "SELECT UID, Nick, lastLogIn " . echo "<li>";
"FROM User " .
"WHERE (`lastLogIn` > '" . gmdate("YmdHis", time() - (60 * 60)) . "' AND NOT (UID=" . $_SESSION['UID'] . ")) " . if ($_SESSION['UID'] > 0)
"ORDER BY lastLogIn DESC;"; echo DisplayAvatar(mysql_result($Erg, $i, "UID"));
$Erg = mysql_query($SQL, $con); // Show Admin Page
echo funktion_isLinkAllowed_addLink_OrLinkText("admin/userChangeNormal.php?enterUID=" . mysql_result($Erg, $i, "UID") . "&Type=Normal", mysql_result($Erg, $i, "Nick"));
$Tist = (gmdate("d", time()) * 60 * 60 * 24) + // Tag
(gmdate("H", time()) * 60 * 60) + // Stunde $timestamp = mktime($hour, $minute, $second, $month, $day, $year);
(gmdate("i", time()) * 60) + // Minute
(gmdate("s", time()) ); // Sekunde $Tlog = time() - mysql_result($Erg, $i, "lastLogIn");
echo "<ul>"; echo " " . date("i:s", $Tlog);
echo "</li>\n";
for($i = 0; $i < mysql_num_rows($Erg); $i++) { }
echo "<li>";
echo "</ul>";
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>";
?> ?>

@ -1,9 +1,9 @@
<?php <?php
if(strpos($_SERVER["REQUEST_URI"], "?") > 0) if (strpos($_SERVER["REQUEST_URI"], "?") > 0)
$URL = $_SERVER["REQUEST_URI"] . "&SetLanguage="; $URL = $_SERVER["REQUEST_URI"] . "&SetLanguage=";
else else
$URL = $_SERVER["REQUEST_URI"] . "?SetLanguage="; $URL = $_SERVER["REQUEST_URI"] . "?SetLanguage=";
echo "<a href=\"" . $URL . "DE\"><img src=\"" . $url . $ENGEL_ROOT . "pic/flag/de.gif\" alt=\"DE\" /></a> "; echo '<a class="sprache" href="' . $URL . 'DE"><img src="' . $ENGEL_ROOT . 'pic/flag/de.png" alt="DE" title="Deutsch"></a>';
echo "<a href=\"" . $URL . "EN\"><img src=\"" . $url . $ENGEL_ROOT . "pic/flag/en.gif\" alt=\"EN\" /></a> "; echo '<a class="sprache" href="' . $URL . 'EN"><img src="' . $ENGEL_ROOT . 'pic/flag/en.png" alt="EN" title="English"></a>';
?> ?>

@ -7,7 +7,7 @@ function ShowMenu($MenuName) {
$Gefunden = false; $Gefunden = false;
// Ueberschift // Ueberschift
$Text = "<h4 class=\"menu\">" . Get_Text("$MenuName/") . "</h4><ul>"; $Text = "";
// Eintraege // Eintraege
foreach ($_SESSION['CVS'] as $Key => $Entry) foreach ($_SESSION['CVS'] as $Key => $Entry)
@ -37,6 +37,6 @@ function ShowMenu($MenuName) {
} }
} }
if ($Gefunden) if ($Gefunden)
echo $MenueTableStart . $Text . $MenueTableEnd; echo '<nav><h4>' . Get_Text("$MenuName/") . '</h4><ul>' . $Text . '</ul></nav>';
} //function ShowMenue } //function ShowMenue
?> ?>

@ -1,40 +1,40 @@
<?php <?php
ini_set("session.gc_maxlifetime", "65535"); ini_set("session.gc_maxlifetime", "65535");
include "config/config.php"; include "config/config.php";
include "error_handler.php"; include "error_handler.php";
include "config/config_db.php"; include "config/config_db.php";
include "funktion_lang.php"; include "funktion_lang.php";
include "funktion_faq.php"; // fuer noAnswer() im menu include "funktion_faq.php"; // fuer noAnswer() im menu
include "funktion_menu.php"; include "funktion_menu.php";
include "funktion_user.php"; include "funktion_user.php";
if(isset($SystemDisableMessage) && (strlen($SystemDisableMessage) > 0)) { if (isset ($SystemDisableMessage) && (strlen($SystemDisableMessage) > 0)) {
echo "<html><head><title>" . $SystemDisableMessage . "</title></head>"; echo "<html><head><title>" . $SystemDisableMessage . "</title></head>";
echo "<body>" . $SystemDisableMessage . "</body></html>\n"; echo "<body>" . $SystemDisableMessage . "</body></html>\n";
die(); die();
} }
if(!isset($_SESSION)) if (!isset ($_SESSION))
session_start(); session_start();
include "secure.php"; include "secure.php";
if(!isset($_SESSION['IP'])) if (!isset ($_SESSION['IP']))
$_SESSION['IP'] = $_SERVER['REMOTE_ADDR']; $_SESSION['IP'] = $_SERVER['REMOTE_ADDR'];
if(isset($_SESSION['UID']) && ($_SESSION['IP'] <> $_SERVER['REMOTE_ADDR'])) { if (isset ($_SESSION['UID']) && ($_SESSION['IP'] <> $_SERVER['REMOTE_ADDR'])) {
session_destroy (); session_destroy();
header("Location: " . $url . $ENGEL_ROOT); header("Location: " . $url . $ENGEL_ROOT);
} }
include "UserCVS.php"; include "UserCVS.php";
// update LASTlogin // update LASTlogin
if(isset($_SESSION['UID'])) { if (isset ($_SESSION['UID'])) {
$SQLlastLogIn = "UPDATE `User` SET " . $SQLlastLogIn = "UPDATE `User` SET " .
"`lastLogIn` = '" . gmdate("Y-m-j H:i:s", time()) . "'" . "`lastLogIn` = '" . time() . "'" .
" WHERE `UID` = '" . $_SESSION['UID'] . "' LIMIT 1;"; " WHERE `UID` = '" . $_SESSION['UID'] . "' LIMIT 1;";
mysql_query ($SQLlastLogIn, $con); mysql_query($SQLlastLogIn, $con);
} }
?> ?>

@ -2,35 +2,23 @@
<!-- anfang des menue parts //--> <!-- anfang des menue parts //-->
<td width="160" valign="top"> <td width="160" valign="top">
<?php <?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("");
ShowMenu("nonpublic"); ShowMenu("nonpublic");
ShowMenu("admin"); ShowMenu("admin");
if(!isset($submenus)) if (!isset ($submenus))
$submenus = 0; $submenus = 0;
if ($submenus >= 1) { if ($submenus >= 1) {
$inc_name = $_SERVER['PHP_SELF']; $inc_name = $_SERVER['PHP_SELF'];
$filenamepos = strrpos($inc_name, '/'); $filenamepos = strrpos($inc_name, '/');
$filenamepos += 1; $filenamepos += 1;
$filename = substr ($inc_name, $filenamepos ); $filename = substr($inc_name, $filenamepos);
$filepost = substr ($filename, 0, -4); $filepost = substr($filename, 0, -4);
$filepre = substr ($filename, -4 ); $filepre = substr($filename, -4);
$verzeichnis = substr ($inc_name, 0 , $filenamepos); $verzeichnis = substr($inc_name, 0, $filenamepos);
for ($index_nummer=1; $index_nummer <= $submenus; $index_nummer++) { for ($index_nummer = 1; $index_nummer <= $submenus; $index_nummer++) {
?> ?>
<table align="center" class="border" cellpadding="3" cellspacing="1"> <table align="center" class="border" cellpadding="3" cellspacing="1">
<tr> <tr>
@ -42,26 +30,27 @@ if ($submenus >= 1) {
<br /> <br />
<?php <?php
}
}
} }
if( isset($_SESSION['UID'])) if (isset ($_SESSION['UID'])) {
{
?> ?>
<table align="center" class="border" cellpadding="3" cellspacing="1"> <nav>
<tr>
<td width="160" class="menu">
<?php include("funktion_activeUser.php"); ?> <?php include("funktion_activeUser.php"); ?>
</td> </nav>
</tr>
</table>
<?php <?php
} }
?> ?>
<nav>
<h4><?php echo Get_Text("Sprache") ?></h4>
<?php <?php
include ("funktion_flag.php"); include ("funktion_flag.php");
?> ?>
</nav>
</td> </td>
<!-- ende des menue parts //--> <!-- ende des menue parts //-->

@ -4,6 +4,7 @@
} }
body { body {
font-size: 14px;
} }
header { header {
@ -13,6 +14,7 @@ header {
footer { footer {
display: block; display: block;
font-size: 12px;
text-align: center; text-align: center;
width: 100%; width: 100%;
} }
@ -41,6 +43,10 @@ dt {
font-weight: bold; font-weight: bold;
} }
dd {
margin-left: 20px;
}
h4 { h4 {
padding: 0 4px; padding: 0 4px;
} }
@ -48,3 +54,7 @@ h4 {
ul { ul {
margin: 0 0 0 20px; margin: 0 0 0 20px;
} }
a.sprache img {
margin: 5px;
}

@ -13,9 +13,16 @@ $Zeilen = mysql_num_rows($Erg);
for ($n = 0; $n < $Zeilen; $n++) { for ($n = 0; $n < $Zeilen; $n++) {
if (mysql_result($Erg, $n, "Antwort") != "") { if (mysql_result($Erg, $n, "Antwort") != "") {
list ($frage_de, $frage_en) = split('<br />', mysql_result($Erg, $n, "Frage"));
list ($antwort_de, $antwort_en) = split('<br />', mysql_result($Erg, $n, "Antwort"));
echo "<dl>"; echo "<dl>";
echo "<dt>" . mysql_result($Erg, $n, "Frage") . "</dt>"; if ($_SESSION['Sprache'] == "DE") {
echo "<dd>" . mysql_result($Erg, $n, "Antwort") . "</dd>"; echo "<dt>" . $frage_de . "</dt>";
echo "<dd>" . $antwort_de . "</dd>";
} else {
echo "<dt>" . $frage_en . "</dt>";
echo "<dd>" . $antwort_en . "</dd>";
}
echo "</dl>"; echo "</dl>";
} }
} }

@ -10,7 +10,7 @@ include ("includes/crypt.php");
session_start(); // alte Session - falls vorhanden - wiederherstellen... session_start(); // alte Session - falls vorhanden - wiederherstellen...
function LoginOK() { function LoginOK() {
include ("../../config/config.php"); include ("config/config.php");
header("HTTP/1.1 302 Moved Temporarily"); header("HTTP/1.1 302 Moved Temporarily");
header("Location: " . $url . $ENGEL_ROOT . "nonpublic/news.php"); header("Location: " . $url . $ENGEL_ROOT . "nonpublic/news.php");
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 B

Loading…
Cancel
Save