fixes
parent
12e0b0d809
commit
75448045cf
@ -1,11 +1,10 @@
|
|||||||
<?PHP
|
<?php
|
||||||
|
// ist ein modem angeschlossen
|
||||||
|
$ModemEnable = false;
|
||||||
|
|
||||||
//ist ein modem angeschlossen
|
// COM port
|
||||||
$ModemEnable = false;
|
$ModemDev ="/dev/ttyS0";
|
||||||
|
|
||||||
// COM port
|
// vorwahl, bei tnovis telefonanlage fuer das programmieren von weckrufen
|
||||||
$ModemDev="/dev/ttyS0";
|
$WakeupNumber="**3";
|
||||||
|
|
||||||
// vorwahl, bei tnovis telefonanlage für das programmieren von weckrufen
|
|
||||||
$WackupNumber="**3";
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
<?
|
<?php
|
||||||
// Set the ip and port we will listen on
|
// Set the ip and port we will listen on
|
||||||
define( SERVER_ADDRESS, "127.0.0.1" );
|
define(SERVER_ADDRESS, "127.0.0.1");
|
||||||
define( SERVER_PORT, 9000 );
|
define(SERVER_PORT, 9000);
|
||||||
|
|
||||||
define( DEBUG, TRUE);
|
|
||||||
|
|
||||||
|
define(DEBUG, true);
|
||||||
?>
|
?>
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
<?PHP
|
<?php
|
||||||
|
// ist ein modem angeschlossen
|
||||||
|
$ModemEnable = false;
|
||||||
|
|
||||||
//ist ein modem angeschlossen
|
// COM port
|
||||||
$ModemEnable = false;
|
$ModemDev = "/dev/ttyS0";
|
||||||
|
|
||||||
// COM port
|
// vorwahl, bei tnovis telefonanlage fuer das programmieren von weckrufen
|
||||||
$ModemDev="/dev/ttyS0";
|
$WakeupNumber = "**3";
|
||||||
|
|
||||||
// vorwahl, bei tnovis telefonanlage für das programmieren von weckrufen
|
|
||||||
$WackupNumber="**3";
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,18 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
function PassCrypt($passwort) {
|
||||||
|
include "config.php";
|
||||||
|
|
||||||
|
switch ($crypt_system) {
|
||||||
function PassCrypt($passwort) {
|
|
||||||
include "config.php";
|
|
||||||
|
|
||||||
switch ($crypt_system) {
|
|
||||||
case "crypt":
|
case "crypt":
|
||||||
return "{crypt}".crypt($passwort, "77");
|
return "{crypt}" . crypt($passwort, "77");
|
||||||
case "md5":
|
case "md5":
|
||||||
return md5($passwort);
|
return md5($passwort);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,18 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
function SendData($Data) {
|
||||||
|
include "config_MessegeServer.php";
|
||||||
function SendData($Data)
|
|
||||||
{
|
|
||||||
include("config_MessegeServer.php");
|
|
||||||
// Create a UDP socket
|
// Create a UDP socket
|
||||||
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
|
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
|
||||||
|
|
||||||
//send packed
|
//send packed
|
||||||
socket_sendto($sock, $Data, 9999, 0x4, SERVER_ADDRESS, SERVER_PORT);
|
socket_sendto($sock, $Data, 9999, 0x4, SERVER_ADDRESS, SERVER_PORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
function SendMessageJabber($Adresse, $Nachricht)
|
function SendMessageJabber($Adresse, $Nachricht) {
|
||||||
{
|
|
||||||
SendData( "#message $Adresse $Nachricht");
|
SendData( "#message $Adresse $Nachricht");
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,59 +1,57 @@
|
|||||||
<?PHP
|
<?php
|
||||||
|
// Funktionen gibt es nicht auf allen Rechnern
|
||||||
// Functionen gibt es nicht auf ellen rechern
|
if(!function_exists("bcdiv")) {
|
||||||
if( !function_exists("bcdiv"))
|
function bcdiv( $param1, $param2) {
|
||||||
{
|
|
||||||
function bcdiv( $param1, $param2)
|
|
||||||
{
|
|
||||||
return floor( $param1 / $param2);
|
return floor( $param1 / $param2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !function_exists("bcmod"))
|
if(!function_exists("bcmod")) {
|
||||||
{
|
function bcmod( $param1, $param2) {
|
||||||
function bcmod( $param1, $param2)
|
|
||||||
{
|
|
||||||
return $param1 - ( $param2 * bcdiv( $param1, $param2));
|
return $param1 - ( $param2 * bcdiv( $param1, $param2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
echo "<h4 class=\"menu\">Engel online</h4>";
|
echo "<h4 class=\"menu\">Engel online</h4>";
|
||||||
|
|
||||||
$SQL = "SELECT UID, Nick, lastLogIn ".
|
$SQL = "SELECT UID, Nick, lastLogIn " .
|
||||||
"FROM User ".
|
"FROM User " .
|
||||||
"WHERE (`lastLogIn` > '". gmdate("YmdHis", time()-(60*60)). "' AND NOT (UID=". $_SESSION['UID']. ")) ".
|
"WHERE (`lastLogIn` > '" . gmdate("YmdHis", time() - (60 * 60)) . "' AND NOT (UID=" . $_SESSION['UID'] . ")) " .
|
||||||
"ORDER BY lastLogIn DESC;";
|
"ORDER BY lastLogIn DESC;";
|
||||||
|
|
||||||
$Erg = mysql_query( $SQL, $con);
|
$Erg = mysql_query($SQL, $con);
|
||||||
|
|
||||||
|
$Tist = (gmdate("d", time()) * 60 * 60 * 24) + // Tag
|
||||||
$Tist = (gmdate("d", time()) * 60 * 60 * 24) + // Tag
|
|
||||||
(gmdate("H", time()) * 60 * 60) + // Stunde
|
(gmdate("H", time()) * 60 * 60) + // Stunde
|
||||||
(gmdate("i", time()) * 60) + // Minute
|
(gmdate("i", time()) * 60) + // Minute
|
||||||
(gmdate("s", time()) ); // Sekunde
|
(gmdate("s", time()) ); // Sekunde
|
||||||
|
|
||||||
for( $i=0; $i<mysql_num_rows($Erg); $i++)
|
echo "<ul>";
|
||||||
{
|
|
||||||
echo "\t\t\t<li>";
|
for($i = 0; $i < mysql_num_rows($Erg); $i++) {
|
||||||
if( $_SESSION['UID']>0 )
|
echo "<li>";
|
||||||
|
|
||||||
|
if($_SESSION['UID'] > 0)
|
||||||
echo DisplayAvatar( mysql_result( $Erg, $i, "UID"));
|
echo DisplayAvatar( mysql_result( $Erg, $i, "UID"));
|
||||||
// Schow Admin Page
|
|
||||||
echo funktion_isLinkAllowed_addLink_OrLinkText(
|
// Show Admin Page
|
||||||
"admin/userChangeNormal.php?enterUID=". mysql_result( $Erg, $i, "UID"). "&Type=Normal",
|
echo funktion_isLinkAllowed_addLink_OrLinkText("admin/userChangeNormal.php?enterUID=" . mysql_result($Erg, $i, "UID") . "&Type=Normal", mysql_result($Erg, $i, "Nick"));
|
||||||
mysql_result( $Erg, $i, "Nick"));
|
|
||||||
|
$Tlog = (substr(mysql_result($Erg, $i, "lastLogIn"), 8, 2) * 60 * 60 * 24) + // Tag
|
||||||
$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"), 11, 2) * 60 * 60) + // Stunde
|
(substr(mysql_result($Erg, $i, "lastLogIn"), 14, 2) * 60) + // Minute
|
||||||
(substr( mysql_result( $Erg, $i, "lastLogIn"), 14, 2) * 60) + // Minute
|
(substr(mysql_result($Erg, $i, "lastLogIn"), 17, 2) ); // Sekunde
|
||||||
(substr( mysql_result( $Erg, $i, "lastLogIn"), 17, 2) ); // Sekunde
|
|
||||||
|
$Tlog = $Tist - $Tlog;
|
||||||
$Tlog = $Tist-$Tlog;
|
|
||||||
echo " ". bcdiv( $Tlog, 60). ":";
|
echo " " . bcdiv($Tlog, 60) . ":";
|
||||||
if( strlen(bcmod( $Tlog, 60))==1)
|
|
||||||
|
if(strlen(bcmod($Tlog, 60)) == 1)
|
||||||
echo "0";
|
echo "0";
|
||||||
echo bcmod( $Tlog, 60);
|
|
||||||
|
echo bcmod($Tlog, 60);
|
||||||
echo "</li>\n";
|
echo "</li>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "</ul>";
|
||||||
?>
|
?>
|
||||||
|
@ -1,24 +1,14 @@
|
|||||||
<?PHP
|
<?php
|
||||||
|
$SQL = "SELECT `Anz` FROM `Counter` WHERE `URL`=\"" . $Page["Name"] . "\"";
|
||||||
$SQL = "SELECT `Anz` FROM `Counter` WHERE `URL`=\"". $Page["Name"]. "\"";
|
$Erg = mysql_query($SQL, $con);
|
||||||
$Erg = mysql_query($SQL, $con);
|
|
||||||
|
|
||||||
echo mysql_error($con);
|
echo mysql_error($con);
|
||||||
|
|
||||||
if(mysql_num_rows($Erg)==0)
|
if(mysql_num_rows($Erg) == 0) {
|
||||||
{
|
$SQL = "INSERT INTO `Counter` ( `URL` , `Anz` ) VALUES ('" . $Page["Name"] . "', '1');";
|
||||||
// echo "Counter: 1";
|
|
||||||
$SQL = "INSERT INTO `Counter` ( `URL` , `Anz` ) ".
|
|
||||||
"VALUES ('". $Page["Name"]. "', '1');";
|
|
||||||
$Erg = mysql_query($SQL, $con);
|
$Erg = mysql_query($SQL, $con);
|
||||||
}
|
} elseif(mysql_num_rows($Erg) == 1) {
|
||||||
elseif(mysql_num_rows($Erg)==1)
|
$SQL = "UPDATE `Counter` SET `Anz` = '" . (mysql_result($Erg, 0, 0) +1) . "' WHERE `URL` = '" . $Page["Name"] . "' LIMIT 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);
|
$Erg = mysql_query($SQL, $con);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
<?PHP
|
<?php
|
||||||
|
function noAnswer() {
|
||||||
function noAnswer() {
|
|
||||||
global $con;
|
global $con;
|
||||||
|
|
||||||
$SQL = "SELECT UID FROM Questions WHERE `AID`='0'";
|
$SQL = "SELECT UID FROM Questions WHERE `AID`='0'";
|
||||||
$Res=mysql_query($SQL, $con);
|
$Res = mysql_query($SQL, $con);
|
||||||
|
|
||||||
return mysql_num_rows($Res);
|
return mysql_num_rows($Res);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
<?PHP
|
<?php
|
||||||
echo "<br>";
|
if(strpos($_SERVER["REQUEST_URI"], "?") > 0)
|
||||||
|
$URL = $_SERVER["REQUEST_URI"] . "&SetLanguage=";
|
||||||
if( strpos( $_SERVER["REQUEST_URI"], "?") >0)
|
else
|
||||||
$URL = $_SERVER["REQUEST_URI"]. "&SetLanguage=";
|
$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 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> ";
|
||||||
?>
|
?>
|
||||||
|
@ -1,26 +1,23 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/* Schichtverplanung im Adminbereich */
|
||||||
/* Schichtverplanung im Adminbereich */
|
function Dsubstr($DateString, $re) {
|
||||||
function Dsubstr($DateString,$re) {
|
if ($re == 1)
|
||||||
if ($re==1)
|
|
||||||
return substr($DateString, 0, 2);
|
return substr($DateString, 0, 2);
|
||||||
elseif ($re==2)
|
elseif ($re == 2)
|
||||||
return substr($DateString, 3, 2);
|
return substr($DateString, 3, 2);
|
||||||
else
|
else
|
||||||
return substr($DateString, 6, 4);
|
return substr($DateString, 6, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Schichtverplanung im Engelbereich */
|
|
||||||
|
|
||||||
function engeldate($edate,$m) {
|
/* Schichtverplanung im Engelbereich */
|
||||||
if ($m==t)
|
function engeldate($edate, $m) {
|
||||||
|
if ($m == t)
|
||||||
return substr($edate, 8, 2);
|
return substr($edate, 8, 2);
|
||||||
elseif ($m==m)
|
elseif ($m == m)
|
||||||
return substr($edate, 5, 2);
|
return substr($edate, 5, 2);
|
||||||
elseif ($m==u)
|
elseif ($m == u)
|
||||||
return substr($edate, 11, 5);
|
return substr($edate, 11, 5);
|
||||||
else
|
else
|
||||||
return substr($edate, 0, 4);
|
return substr($edate, 0, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,50 +1,40 @@
|
|||||||
<?PHP
|
<?php
|
||||||
ini_set( "session.gc_maxlifetime", "65535");
|
ini_set("session.gc_maxlifetime", "65535");
|
||||||
|
|
||||||
include ("config.php");
|
include "config.php";
|
||||||
include ("error_handler.php");
|
include "error_handler.php";
|
||||||
include ("config_db.php");
|
include "config_db.php";
|
||||||
include ("funktion_lang.php");
|
include "funktion_lang.php";
|
||||||
include ("funktion_faq.php"); //für 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 "<body>" . $SystemDisableMessage . "</body></html>\n";
|
||||||
echo "<HTML>\n".
|
|
||||||
"<BODY>\n". $SystemDisableMessage. "\n<BODY>\n".
|
|
||||||
"</HTML>";
|
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !isset($_SESSION))
|
if(!isset($_SESSION))
|
||||||
{
|
|
||||||
session_start();
|
session_start();
|
||||||
}
|
|
||||||
include ("secure.php");
|
|
||||||
|
|
||||||
if( !isset($_SESSION['IP']))
|
include "secure.php";
|
||||||
{
|
|
||||||
|
if(!isset($_SESSION['IP']))
|
||||||
$_SESSION['IP'] = $_SERVER['REMOTE_ADDR'];
|
$_SESSION['IP'] = $_SERVER['REMOTE_ADDR'];
|
||||||
}
|
|
||||||
|
|
||||||
if (IsSet($_SESSION['UID']) and ($_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` = '". gmdate("Y-m-j H:i:s", time()). "'".
|
" WHERE `UID` = '" . $_SESSION['UID'] . "' LIMIT 1;";
|
||||||
" WHERE `UID` = '". $_SESSION['UID']. "' LIMIT 1;";
|
|
||||||
mysql_query ($SQLlastLogIn, $con);
|
mysql_query ($SQLlastLogIn, $con);
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,18 +1,17 @@
|
|||||||
<?PHP
|
<?php
|
||||||
include ("config.php");
|
include "config.php";
|
||||||
|
?>
|
||||||
echo "<form action=\"". $url. $ENGEL_ROOT. "nonpublic/index.php\" method=\"post\">";
|
|
||||||
echo "<table>\n".
|
|
||||||
"\t<tr>".
|
|
||||||
"\t\t<td align=\"right\">". Get_Text("index_lang_nick"). "</td>".
|
|
||||||
"\t\t<td><input type=\"text\" name=\"user\" size=\"23\"></td>".
|
|
||||||
"\t</tr>".
|
|
||||||
"\t<tr>".
|
|
||||||
"\t\t<td align=\"right\">". Get_Text("index_lang_pass"). "</td>".
|
|
||||||
"\t\t<td><input type=\"password\" name=\"password\" size=\"23\"></td>".
|
|
||||||
"\t</tr>".
|
|
||||||
"</table>".
|
|
||||||
"<br><input type=\"submit\" value=\"". Get_Text("index_lang_send"). "\">";
|
|
||||||
echo "</form>";
|
|
||||||
|
|
||||||
|
|
||||||
|
<form action="<?php echo $url . $ENGEL_ROOT; ?>nonpublic/index.php" method="post">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td align="right"><?php echo Get_Text("index_lang_nick"); ?></td>
|
||||||
|
<td><input type="text" name="user" size="23" /></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="right"><?php echo Get_Text("index_lang_pass"); ?></td>
|
||||||
|
<td><input type="password" name="password" size="23"></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<br /><input type="submit" value="<?php echo Get_Text("index_lang_send"); ?>">
|
||||||
|
</form>
|
||||||
|
@ -1,41 +1,25 @@
|
|||||||
<?php
|
<?php
|
||||||
//soll dein funktion entahlten die alle übergebenen parameter überprüft
|
if($debug)
|
||||||
//'`'"
|
echo "secure.php START<br />\n";
|
||||||
|
|
||||||
if( $DEBUG)
|
foreach ($_GET as $k => $v) {
|
||||||
echo "secure.php START<br>\n";
|
|
||||||
|
|
||||||
foreach ($_GET as $k => $v)
|
|
||||||
{
|
|
||||||
// $v = htmlspecialchars($v, ENT_QUOTES);
|
|
||||||
// $v = mysql_escape_string($v);
|
|
||||||
$v = htmlentities($v, ENT_QUOTES);
|
$v = htmlentities($v, ENT_QUOTES);
|
||||||
if (preg_match('/([\'"`\'])/', $v, $match))
|
preg_replace('/([\'"`\'])/', '', $v);
|
||||||
{
|
|
||||||
print "sorry get has illegal char '$match[1]'";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
$_GET[$k] = $v;
|
$_GET[$k] = $v;
|
||||||
|
|
||||||
if( $DEBUG)
|
if($debug)
|
||||||
echo "GET $k=\"$v\"<br>";
|
echo "GET $k=\"$v\"<br />";
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($_POST as $k => $v)
|
foreach ($_POST as $k => $v) {
|
||||||
{
|
|
||||||
// $v = htmlspecialchars($v, ENT_QUOTES);
|
|
||||||
// $v = mysql_escape_string($v);
|
|
||||||
$v = htmlentities($v, ENT_QUOTES);
|
$v = htmlentities($v, ENT_QUOTES);
|
||||||
if (preg_match('/([\'"`\'])/', $v, $match)) {
|
preg_replace('/([\'"`\'])/', '', $v);
|
||||||
print "sorry post has illegal char '$match[1]'";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
$_POST[$k] = $v;
|
$_POST[$k] = $v;
|
||||||
|
|
||||||
if( $DEBUG)
|
if($debug)
|
||||||
echo "POST $k=\"$v\"<br>";
|
echo "POST $k=\"$v\"<br />";
|
||||||
}
|
}
|
||||||
if( $DEBUG)
|
|
||||||
echo "secure.php END<br>\n";
|
|
||||||
|
|
||||||
|
if($debug)
|
||||||
|
echo "secure.php END<br />\n";
|
||||||
?>
|
?>
|
||||||
|
@ -1,113 +1,75 @@
|
|||||||
<?php
|
<?php
|
||||||
|
require_once "../includes/config_jabber.php";
|
||||||
|
require_once "../includes/funktion_jabber.php";
|
||||||
|
include "../includes/config_MessegeServer.php";
|
||||||
|
|
||||||
/****************************************************************************************************/
|
// Set time limit to indefinite execution
|
||||||
// INCLUDE
|
set_time_limit(0);
|
||||||
/****************************************************************************************************/
|
|
||||||
require_once('../includes/config_jabber.php');
|
|
||||||
require_once("../includes/funktion_jabber.php");
|
|
||||||
include("../includes/config_MessegeServer.php");
|
|
||||||
|
|
||||||
// Set time limit to indefinite execution
|
if(DEBUG)
|
||||||
set_time_limit( 0 );
|
|
||||||
|
|
||||||
/****************************************************************************************************/
|
|
||||||
// show MODE
|
|
||||||
/****************************************************************************************************/
|
|
||||||
if( DEBUG)
|
|
||||||
echo "DEBUG mode is enable\n\tjabber is disable\n\n";
|
echo "DEBUG mode is enable\n\tjabber is disable\n\n";
|
||||||
|
|
||||||
/****************************************************************************************************/
|
if(!DEBUG) {
|
||||||
// INIT jabber
|
|
||||||
/****************************************************************************************************/
|
|
||||||
if( !DEBUG)
|
|
||||||
{
|
|
||||||
echo "INIT jabber\n";
|
echo "INIT jabber\n";
|
||||||
$jabber = new Jabber($server, $port, $username, $password, $resource);
|
$jabber = new Jabber($server, $port, $username, $password, $resource);
|
||||||
if ( !($jabber->Connect() && $jabber->SendAuth()))
|
|
||||||
|
if(!($jabber->Connect() && $jabber->SendAuth()))
|
||||||
die("Couldn't connect to Jabber Server.");
|
die("Couldn't connect to Jabber Server.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "INIT socked\n";
|
||||||
|
|
||||||
|
// Create a UDP socket
|
||||||
|
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP) or die('Could not create socked (' . socket_strerror(socket_last_error()) . ')');
|
||||||
|
|
||||||
/****************************************************************************************************/
|
// Bind the socket to an address/port
|
||||||
// INIT socked
|
socket_bind($sock, SERVER_ADDRESS, SERVER_PORT) or die('Could not bind to address (' . socket_strerror(socket_last_error()) . ')');
|
||||||
/****************************************************************************************************/
|
|
||||||
echo "INIT socked\n";
|
|
||||||
//http://de3.php.net/manual/de/function.socket-listen.php
|
|
||||||
// Create a UDP socket
|
|
||||||
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP) or die('Could not create socked ('.socket_strerror(socket_last_error()). ')');
|
|
||||||
// Bind the socket to an address/port
|
|
||||||
socket_bind($sock, SERVER_ADDRESS, SERVER_PORT) or die('Could not bind to address ('.socket_strerror(socket_last_error()). ')');
|
|
||||||
// Setzt Nonbock Mode
|
|
||||||
socket_set_nonblock($sock);
|
|
||||||
|
|
||||||
|
// Setzt Nonbock Mode
|
||||||
|
socket_set_nonblock($sock);
|
||||||
|
|
||||||
/****************************************************************************************************/
|
$RUNNING = true;
|
||||||
// Loop continuos
|
|
||||||
/****************************************************************************************************/
|
while($RUNNING) {
|
||||||
$RUNNING = TRUE;
|
if(@socket_recvfrom($sock, $data, 65535, 0, $ip, $port)) {
|
||||||
while( $RUNNING )
|
// daten empfangen
|
||||||
{
|
$data = substr($data, 0, strlen($data)-1); //ENTER entfernen
|
||||||
if( @socket_recvfrom($sock, $data, 65535, 0, $ip, $port))
|
|
||||||
{
|
|
||||||
//daten empfangen
|
|
||||||
$data = substr($data,0, strlen($data)-1); //ENTER entfernen
|
|
||||||
echo "\n". gmdate("Y-m-d H:i:s", time()). "\tresive from $ip:$port ". strlen($data). " byte data ($data)\n";
|
echo "\n". gmdate("Y-m-d H:i:s", time()). "\tresive from $ip:$port ". strlen($data). " byte data ($data)\n";
|
||||||
PackedAnalyser( $data);
|
PackedAnalyser( $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
usleep(100000); // 100ms delay keeps the doctor away
|
usleep(100000); // 100ms delay keeps the doctor away
|
||||||
} // end while
|
} // end while
|
||||||
|
|
||||||
//disconnect jabber
|
// disconnect jabber
|
||||||
if( !DEBUG)
|
if(!DEBUG)
|
||||||
$jabber->Disconnect();
|
$jabber->Disconnect();
|
||||||
|
|
||||||
// Close the master sockets
|
// Close the master sockets
|
||||||
socket_close($sock);
|
socket_close($sock);
|
||||||
|
|
||||||
/****************************************************************************************************/
|
|
||||||
/****************************************** MAIN END ************************************************/
|
|
||||||
/****************************************************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************************************/
|
function PackedAnalyser($data) {
|
||||||
//***** function PackedAnalyser
|
global $jabber, $RUNNING;
|
||||||
/****************************************************************************************************/
|
|
||||||
function PackedAnalyser( $data )
|
|
||||||
{
|
|
||||||
GLOBAL $jabber, $RUNNING;
|
|
||||||
// init array
|
// init array
|
||||||
$matches = array();
|
$matches = array();
|
||||||
|
|
||||||
//#message
|
//#message
|
||||||
if( preg_match( "/^#(message) ([^ ]+) (.+)/i", $data, $matches ) )
|
if(preg_match("/^#(message) ([^ ]+) (.+)/i", $data, $matches)) {
|
||||||
{
|
if($matches[2]=="" || $matches[3]=="")
|
||||||
if( $matches[2]=="" || $matches[3]=="")
|
|
||||||
{
|
|
||||||
// Wrong syntax
|
|
||||||
echo "\t\t\t\t#messaage parameter fail\n";
|
echo "\t\t\t\t#messaage parameter fail\n";
|
||||||
}
|
else {
|
||||||
else
|
|
||||||
{
|
|
||||||
// Whisper
|
// Whisper
|
||||||
if( !DEBUG)
|
if(!DEBUG)
|
||||||
$jabber->SendMessage($value, "normal", NULL, array("body" => $message, "subject" => "Error in Pentabarf"), NULL);
|
$jabber->SendMessage($value, "normal", NULL, array("body" => $message, "subject" => "Error in Pentabarf"), NULL);
|
||||||
else
|
else
|
||||||
echo "\t\t\t\tmessage to:\"". $matches[2]. "\" Text: \"". $matches[3]. "\"\n";
|
echo "\t\t\t\tmessage to:\"". $matches[2]. "\" Text: \"". $matches[3]. "\"\n";
|
||||||
}
|
}
|
||||||
}
|
} elseif(preg_match("/^#quit/i", $data, $matches)) {
|
||||||
elseif( preg_match( "/^#quit/i", $data, $matches ) )
|
if(DEBUG) {
|
||||||
{
|
|
||||||
if( DEBUG)
|
|
||||||
{
|
|
||||||
echo "\t\t\t\tSystem Shutdown\n\n";
|
echo "\t\t\t\tSystem Shutdown\n\n";
|
||||||
$RUNNING = FALSE;
|
$RUNNING = false;
|
||||||
}
|
}
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
{
|
|
||||||
echo "\t\t\t\tcommand not found\n\n";
|
echo "\t\t\t\tcommand not found\n\n";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,58 +1,51 @@
|
|||||||
<?PHP
|
<?php
|
||||||
|
include "../../camp2011/includes/config.php";
|
||||||
|
include "../../camp2011/includes/error_handler.php";
|
||||||
|
include "../../camp2011/includes/config_db.php";
|
||||||
|
|
||||||
include ("../../camp2011/includes/config.php");
|
if(!isset($_SESSION))
|
||||||
include ("../../camp2011/includes/error_handler.php");
|
session_start();
|
||||||
include ("../../camp2011/includes/config_db.php");
|
|
||||||
if( !isset($_SESSION)) session_start();
|
|
||||||
include ("../../camp2011/includes/secure.php");
|
|
||||||
|
|
||||||
|
include "../../camp2011/includes/secure.php";
|
||||||
|
|
||||||
// Parameter check
|
// Parameter check
|
||||||
if( !isset($_GET["UID"]) )
|
if(!isset($_GET["UID"]))
|
||||||
$_GET["UID"]= "-1";
|
$_GET["UID"] = "-1";
|
||||||
|
|
||||||
$SQL= "SELECT * FROM `UserPicture` WHERE `UID`='". $_GET["UID"]. "'";
|
$SQL = "SELECT * FROM `UserPicture` WHERE `UID`='" . $_GET["UID"] . "'";
|
||||||
$res = mysql_query( $SQL, $con);
|
$res = mysql_query($SQL, $con);
|
||||||
|
|
||||||
if( mysql_num_rows($res) == 1)
|
if(mysql_num_rows($res) == 1) {
|
||||||
{
|
// genuegend rechte
|
||||||
//genügend rechte
|
if(!isset($_SESSION['UID']) || $_SESSION['UID'] == -1) {
|
||||||
if( !isset($_SESSION['UID']) || $_SESSION['UID'] == -1)
|
header("HTTP/1.0 403 Forbidden");
|
||||||
{
|
die("403 Forbidden");
|
||||||
header( "HTTP/1.0 403 Forbidden");
|
|
||||||
die( "403 Forbidden");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ist das bild sichtbar?
|
// ist das bild sichtbar?
|
||||||
if( (mysql_result($res, 0, "show")=="N") AND
|
if((mysql_result($res, 0, "show") == "N") AND ($_SESSION['UID']!=$_GET["UID"]) AND ($_SESSION['CVS'][ "admin/UserPicture.php" ] == "N")) {
|
||||||
($_SESSION['UID']!=$_GET["UID"]) AND
|
$SQL = "SELECT * FROM `UserPicture` WHERE `UID`='-1'";
|
||||||
($_SESSION['CVS'][ "admin/UserPicture.php" ] == "N"))
|
$res = mysql_query($SQL, $con);
|
||||||
{
|
|
||||||
$SQL= "SELECT * FROM `UserPicture` WHERE `UID`='-1'";
|
if(mysql_num_rows($res) != 1) {
|
||||||
$res = mysql_query( $SQL, $con);
|
header("HTTP/1.0 404 Not Found");
|
||||||
if( mysql_num_rows($res) != 1)
|
die("404 Not Found");
|
||||||
{
|
|
||||||
header( 'HTTP/1.0 404 Not Found');
|
|
||||||
die( "404 Not Found");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// bild aus db auslesen
|
// bild aus db auslesen
|
||||||
$bild = mysql_result($res, 0, "Bild");
|
$bild = mysql_result($res, 0, "Bild");
|
||||||
|
|
||||||
// ausgabe bild
|
// ausgabe bild
|
||||||
header( "Accept-Ranges: bytes");
|
header("Accept-Ranges: bytes");
|
||||||
header( "Content-Length: ". strlen($bild));
|
header("Content-Length: " . strlen($bild));
|
||||||
header( "Content-type: ". mysql_result($res, 0, "ContentType"));
|
header("Content-type: " . mysql_result($res, 0, "ContentType"));
|
||||||
header( "Cache-control: public");
|
header("Cache-control: public");
|
||||||
header( "Cache-request-directive: min-fresh = 120");
|
header("Cache-request-directive: min-fresh = 120");
|
||||||
header( "Cache-request-directive: max-age = 360");
|
header("Cache-request-directive: max-age = 360");
|
||||||
echo $bild;
|
echo $bild;
|
||||||
}
|
} else {
|
||||||
else
|
header("HTTP/1.0 404 Not Found");
|
||||||
{
|
|
||||||
header( 'HTTP/1.0 404 Not Found');
|
|
||||||
die( "404 Not Found");
|
die( "404 Not Found");
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<h4 class="menu"> Anfragen und FAQ </h4>
|
<h4 class="menu"> Anfragen und FAQ </h4>
|
||||||
|
|
||||||
<li><a href="faq.php?quest=all">Alle Anfragen</a></li>
|
<li><a href="faq.php?quest=all">Alle Anfragen</a></li>
|
||||||
<li><a href="faq.php?quest=open">Offene Anfragen (<?PHP echo noAnswer(); ?>)</a></li>
|
<li><a href="faq.php?quest=open">Offene Anfragen (<?php echo noAnswer(); ?>)</a></li>
|
||||||
<li><a href="faq.php?quest=faq">FAQ-Liste editiern</a></li>
|
<li><a href="faq.php?quest=faq">FAQ-Liste editiern</a></li>
|
||||||
|
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
<?PHP
|
<?php
|
||||||
|
|
||||||
$title = "Erzengel";
|
$title = "Erzengel";
|
||||||
$header = "Index";
|
$header = "Index";
|
||||||
include ("../../../camp2011/includes/header.php");
|
include ("../../../camp2011/includes/header.php");
|
||||||
include ("../../../camp2011/includes/funktion_db_list.php");
|
include ("../../../camp2011/includes/funktion_db_list.php");
|
||||||
|
|
||||||
echo "Hallo Erzengel ".$_SESSION['Nick'].",<br>\n";
|
echo "Hallo Erzengel ".$_SESSION['Nick'].",<br />\n";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
du bist jetzt im Erzengel-Bereich. Hier kannst du die Engel-Verwaltung vornehmen.<br><br>
|
du bist jetzt im Erzengel-Bereich. Hier kannst du die Engel-Verwaltung vornehmen.<br /><br />
|
||||||
|
|
||||||
Bitte melde dich <a href="../logout.php">hier</a> nach getaner Arbeit immer ab, damit kein anderer hier Änderungen vornehmen kann.
|
Bitte melde dich <a href="../logout.php">hier</a> nach getaner Arbeit immer ab, damit kein anderer hier Änderungen vornehmen kann.
|
||||||
|
|
||||||
<?PHP
|
<?php
|
||||||
include ("../../../camp2011/includes/footer.php");
|
include ("../../../camp2011/includes/footer.php");
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
include ("../../camp2011/includes/config.php");
|
include "../../camp2011/includes/config.php";
|
||||||
|
|
||||||
// Die Session zerstoeren...
|
// Die Session zerstoeren...
|
||||||
session_start();
|
session_start();
|
||||||
session_destroy ();
|
session_destroy ();
|
||||||
// und eine neue erstellen, damit kein Erzengelmenü angezeigt wird (falls sich ein Erzengel abmeldet...)
|
// und eine neue erstellen, damit kein Erzengelmenue angezeigt wird (falls sich ein Erzengel abmeldet...)
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
header("HTTP/1.1 302 Moved Temporarily");
|
|
||||||
header("Location: ". $url. $ENGEL_ROOT);
|
|
||||||
|
|
||||||
|
header("HTTP/1.1 302 Moved Temporarily");
|
||||||
|
header("Location: " . $url . $ENGEL_ROOT);
|
||||||
?>
|
?>
|
||||||
|
@ -1,37 +1,27 @@
|
|||||||
<?php
|
<?php
|
||||||
$title = "Himmel";
|
$title = "Himmel";
|
||||||
$header = "Engelbesprechung";
|
$header = "Engelbesprechung";
|
||||||
include ("../../../camp2011/includes/header.php");
|
include "../../../camp2011/includes/header.php";
|
||||||
?>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
$SQL = "SELECT * FROM `News` ORDER BY 'Datum' DESC";
|
$SQL = "SELECT * FROM `News` ORDER BY 'Datum' DESC";
|
||||||
$Erg = mysql_query($SQL, $con);
|
$Erg = mysql_query($SQL, $con);
|
||||||
|
|
||||||
// anzahl zeilen
|
// anzahl zeilen
|
||||||
$Zeilen = mysql_num_rows($Erg);
|
$Zeilen = mysql_num_rows($Erg);
|
||||||
|
|
||||||
for ($n = 0 ; $n < $Zeilen ; $n++)
|
for ($n = 0 ; $n < $Zeilen ; $n++) {
|
||||||
{
|
if (mysql_result($Erg, $n, "Treffen") == "1") {
|
||||||
if (mysql_result($Erg, $n, "Treffen")=="1")
|
echo "<p class='question'><u>" . mysql_result($Erg, $n, "Betreff") . "</u>";
|
||||||
{
|
|
||||||
echo "<p class='question'><u>".mysql_result($Erg, $n, "Betreff")."</u>";
|
|
||||||
|
|
||||||
// Schow Admin Page
|
// Show Admin Page
|
||||||
if( $_SESSION['CVS'][ "admin/news.php" ] == "Y" )
|
if($_SESSION['CVS']["admin/news.php"] == "Y")
|
||||||
echo " <a href=\"./../admin/news.php?action=change&date=". mysql_result($Erg, $n, "Datum"). "\">[edit]</a>";
|
echo " <a href=\"./../admin/news.php?action=change&date=". mysql_result($Erg, $n, "Datum"). "\">[edit]</a>";
|
||||||
|
|
||||||
echo "<br> <font size=1>".mysql_result($Erg, $n, "Datum").", ";
|
echo "<br /> <font size=1>".mysql_result($Erg, $n, "Datum").", ";
|
||||||
echo UID2Nick(mysql_result($Erg, $n, "UID"))."</font></p>\n";
|
echo UID2Nick(mysql_result($Erg, $n, "UID"))."</font></p>\n";
|
||||||
|
|
||||||
|
|
||||||
echo "<p class='answetion'>".nl2br(mysql_result($Erg, $n, "Text"))."</p>\n";
|
echo "<p class='answetion'>".nl2br(mysql_result($Erg, $n, "Text"))."</p>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
include ("../../../camp2011/includes/footer.php");
|
include ("../../../camp2011/includes/footer.php");
|
||||||
?>
|
?>
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue