fixes
parent
12e0b0d809
commit
75448045cf
@ -1,11 +1,10 @@
|
||||
<?PHP
|
||||
<?php
|
||||
// ist ein modem angeschlossen
|
||||
$ModemEnable = false;
|
||||
|
||||
//ist ein modem angeschlossen
|
||||
$ModemEnable = false;
|
||||
// COM port
|
||||
$ModemDev ="/dev/ttyS0";
|
||||
|
||||
// COM port
|
||||
$ModemDev="/dev/ttyS0";
|
||||
|
||||
// vorwahl, bei tnovis telefonanlage für das programmieren von weckrufen
|
||||
$WackupNumber="**3";
|
||||
// vorwahl, bei tnovis telefonanlage fuer das programmieren von weckrufen
|
||||
$WakeupNumber="**3";
|
||||
?>
|
||||
|
@ -1,8 +1,7 @@
|
||||
<?
|
||||
// Set the ip and port we will listen on
|
||||
define( SERVER_ADDRESS, "127.0.0.1" );
|
||||
define( SERVER_PORT, 9000 );
|
||||
|
||||
define( DEBUG, TRUE);
|
||||
<?php
|
||||
// Set the ip and port we will listen on
|
||||
define(SERVER_ADDRESS, "127.0.0.1");
|
||||
define(SERVER_PORT, 9000);
|
||||
|
||||
define(DEBUG, true);
|
||||
?>
|
||||
|
@ -1,11 +1,10 @@
|
||||
<?PHP
|
||||
<?php
|
||||
// ist ein modem angeschlossen
|
||||
$ModemEnable = false;
|
||||
|
||||
//ist ein modem angeschlossen
|
||||
$ModemEnable = false;
|
||||
// COM port
|
||||
$ModemDev = "/dev/ttyS0";
|
||||
|
||||
// COM port
|
||||
$ModemDev="/dev/ttyS0";
|
||||
|
||||
// vorwahl, bei tnovis telefonanlage für das programmieren von weckrufen
|
||||
$WackupNumber="**3";
|
||||
// vorwahl, bei tnovis telefonanlage fuer das programmieren von weckrufen
|
||||
$WakeupNumber = "**3";
|
||||
?>
|
||||
|
@ -1,18 +1,12 @@
|
||||
<?php
|
||||
function PassCrypt($passwort) {
|
||||
include "config.php";
|
||||
|
||||
|
||||
function PassCrypt($passwort) {
|
||||
include "config.php";
|
||||
|
||||
switch ($crypt_system) {
|
||||
switch ($crypt_system) {
|
||||
case "crypt":
|
||||
return "{crypt}".crypt($passwort, "77");
|
||||
return "{crypt}" . crypt($passwort, "77");
|
||||
case "md5":
|
||||
return md5($passwort);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
@ -1,18 +1,14 @@
|
||||
<?php
|
||||
|
||||
|
||||
function SendData($Data)
|
||||
{
|
||||
include("config_MessegeServer.php");
|
||||
function SendData($Data) {
|
||||
include "config_MessegeServer.php";
|
||||
// Create a UDP socket
|
||||
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
|
||||
|
||||
//send packed
|
||||
socket_sendto($sock, $Data, 9999, 0x4, SERVER_ADDRESS, SERVER_PORT);
|
||||
}
|
||||
}
|
||||
|
||||
function SendMessageJabber($Adresse, $Nachricht)
|
||||
{
|
||||
function SendMessageJabber($Adresse, $Nachricht) {
|
||||
SendData( "#message $Adresse $Nachricht");
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
@ -1,59 +1,57 @@
|
||||
<?PHP
|
||||
|
||||
// Functionen gibt es nicht auf ellen rechern
|
||||
if( !function_exists("bcdiv"))
|
||||
{
|
||||
function bcdiv( $param1, $param2)
|
||||
{
|
||||
<?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)
|
||||
{
|
||||
if(!function_exists("bcmod")) {
|
||||
function bcmod( $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 ".
|
||||
"FROM User ".
|
||||
"WHERE (`lastLogIn` > '". gmdate("YmdHis", time()-(60*60)). "' AND NOT (UID=". $_SESSION['UID']. ")) ".
|
||||
$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);
|
||||
$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("i", time()) * 60) + // Minute
|
||||
(gmdate("s", time()) ); // Sekunde
|
||||
|
||||
for( $i=0; $i<mysql_num_rows($Erg); $i++)
|
||||
{
|
||||
echo "\t\t\t<li>";
|
||||
if( $_SESSION['UID']>0 )
|
||||
echo "<ul>";
|
||||
|
||||
for($i = 0; $i < mysql_num_rows($Erg); $i++) {
|
||||
echo "<li>";
|
||||
|
||||
if($_SESSION['UID'] > 0)
|
||||
echo DisplayAvatar( mysql_result( $Erg, $i, "UID"));
|
||||
// Schow 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)
|
||||
|
||||
// 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 bcmod($Tlog, 60);
|
||||
echo "</li>\n";
|
||||
}
|
||||
}
|
||||
|
||||
echo "</ul>";
|
||||
?>
|
||||
|
@ -1,24 +1,14 @@
|
||||
<?PHP
|
||||
|
||||
$SQL = "SELECT `Anz` FROM `Counter` WHERE `URL`=\"". $Page["Name"]. "\"";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
<?php
|
||||
$SQL = "SELECT `Anz` FROM `Counter` WHERE `URL`=\"" . $Page["Name"] . "\"";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
echo mysql_error($con);
|
||||
echo mysql_error($con);
|
||||
|
||||
if(mysql_num_rows($Erg)==0)
|
||||
{
|
||||
// echo "Counter: 1";
|
||||
$SQL = "INSERT INTO `Counter` ( `URL` , `Anz` ) ".
|
||||
"VALUES ('". $Page["Name"]. "', '1');";
|
||||
if(mysql_num_rows($Erg) == 0) {
|
||||
$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 ;";
|
||||
} elseif(mysql_num_rows($Erg) == 1) {
|
||||
$SQL = "UPDATE `Counter` SET `Anz` = '" . (mysql_result($Erg, 0, 0) +1) . "' WHERE `URL` = '" . $Page["Name"] . "' LIMIT 1 ;";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
@ -1,12 +1,10 @@
|
||||
<?PHP
|
||||
|
||||
function noAnswer() {
|
||||
<?php
|
||||
function noAnswer() {
|
||||
global $con;
|
||||
|
||||
$SQL = "SELECT UID FROM Questions WHERE `AID`='0'";
|
||||
$Res=mysql_query($SQL, $con);
|
||||
$Res = mysql_query($SQL, $con);
|
||||
|
||||
return mysql_num_rows($Res);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
@ -1,12 +1,9 @@
|
||||
<?PHP
|
||||
echo "<br>";
|
||||
|
||||
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> ";
|
||||
<?php
|
||||
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> ";
|
||||
?>
|
||||
|
@ -1,26 +1,23 @@
|
||||
<?php
|
||||
|
||||
/* Schichtverplanung im Adminbereich */
|
||||
function Dsubstr($DateString,$re) {
|
||||
if ($re==1)
|
||||
/* Schichtverplanung im Adminbereich */
|
||||
function Dsubstr($DateString, $re) {
|
||||
if ($re == 1)
|
||||
return substr($DateString, 0, 2);
|
||||
elseif ($re==2)
|
||||
elseif ($re == 2)
|
||||
return substr($DateString, 3, 2);
|
||||
else
|
||||
return substr($DateString, 6, 4);
|
||||
}
|
||||
|
||||
/* Schichtverplanung im Engelbereich */
|
||||
}
|
||||
|
||||
function engeldate($edate,$m) {
|
||||
if ($m==t)
|
||||
/* Schichtverplanung im Engelbereich */
|
||||
function engeldate($edate, $m) {
|
||||
if ($m == t)
|
||||
return substr($edate, 8, 2);
|
||||
elseif ($m==m)
|
||||
elseif ($m == m)
|
||||
return substr($edate, 5, 2);
|
||||
elseif ($m==u)
|
||||
elseif ($m == u)
|
||||
return substr($edate, 11, 5);
|
||||
else
|
||||
return substr($edate, 0, 4);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
@ -1,50 +1,40 @@
|
||||
<?PHP
|
||||
ini_set( "session.gc_maxlifetime", "65535");
|
||||
|
||||
include ("config.php");
|
||||
include ("error_handler.php");
|
||||
include ("config_db.php");
|
||||
include ("funktion_lang.php");
|
||||
include ("funktion_faq.php"); //für noAnswer() im menu
|
||||
include ("funktion_menu.php");
|
||||
include ("funktion_user.php");
|
||||
|
||||
|
||||
if( isset($SystemDisableMessage) && ( strlen($SystemDisableMessage)>0) )
|
||||
{
|
||||
echo "<HTML>\n".
|
||||
"<BODY>\n". $SystemDisableMessage. "\n<BODY>\n".
|
||||
"</HTML>";
|
||||
<?php
|
||||
ini_set("session.gc_maxlifetime", "65535");
|
||||
|
||||
include "config.php";
|
||||
include "error_handler.php";
|
||||
include "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))
|
||||
{
|
||||
if(!isset($_SESSION))
|
||||
session_start();
|
||||
}
|
||||
include ("secure.php");
|
||||
|
||||
if( !isset($_SESSION['IP']))
|
||||
{
|
||||
include "secure.php";
|
||||
|
||||
if(!isset($_SESSION['IP']))
|
||||
$_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 ();
|
||||
header("Location: $url". $ENGEL_ROOT );
|
||||
}
|
||||
|
||||
include ("UserCVS.php");
|
||||
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;";
|
||||
// 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);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
@ -1,18 +1,17 @@
|
||||
<?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>";
|
||||
|
||||
<?php
|
||||
include "config.php";
|
||||
?>
|
||||
|
||||
<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
|
||||
//soll dein funktion entahlten die alle übergebenen parameter überprüft
|
||||
//'`'"
|
||||
if($debug)
|
||||
echo "secure.php START<br />\n";
|
||||
|
||||
if( $DEBUG)
|
||||
echo "secure.php START<br>\n";
|
||||
|
||||
foreach ($_GET as $k => $v)
|
||||
{
|
||||
// $v = htmlspecialchars($v, ENT_QUOTES);
|
||||
// $v = mysql_escape_string($v);
|
||||
foreach ($_GET as $k => $v) {
|
||||
$v = htmlentities($v, ENT_QUOTES);
|
||||
if (preg_match('/([\'"`\'])/', $v, $match))
|
||||
{
|
||||
print "sorry get has illegal char '$match[1]'";
|
||||
exit;
|
||||
}
|
||||
preg_replace('/([\'"`\'])/', '', $v);
|
||||
$_GET[$k] = $v;
|
||||
|
||||
if( $DEBUG)
|
||||
echo "GET $k=\"$v\"<br>";
|
||||
}
|
||||
if($debug)
|
||||
echo "GET $k=\"$v\"<br />";
|
||||
}
|
||||
|
||||
foreach ($_POST as $k => $v)
|
||||
{
|
||||
// $v = htmlspecialchars($v, ENT_QUOTES);
|
||||
// $v = mysql_escape_string($v);
|
||||
foreach ($_POST as $k => $v) {
|
||||
$v = htmlentities($v, ENT_QUOTES);
|
||||
if (preg_match('/([\'"`\'])/', $v, $match)) {
|
||||
print "sorry post has illegal char '$match[1]'";
|
||||
exit;
|
||||
}
|
||||
preg_replace('/([\'"`\'])/', '', $v);
|
||||
$_POST[$k] = $v;
|
||||
|
||||
if( $DEBUG)
|
||||
echo "POST $k=\"$v\"<br>";
|
||||
}
|
||||
if( $DEBUG)
|
||||
echo "secure.php END<br>\n";
|
||||
if($debug)
|
||||
echo "POST $k=\"$v\"<br />";
|
||||
}
|
||||
|
||||
if($debug)
|
||||
echo "secure.php END<br />\n";
|
||||
?>
|
||||
|
@ -1,113 +1,75 @@
|
||||
<?php
|
||||
require_once "../includes/config_jabber.php";
|
||||
require_once "../includes/funktion_jabber.php";
|
||||
include "../includes/config_MessegeServer.php";
|
||||
|
||||
/****************************************************************************************************/
|
||||
// INCLUDE
|
||||
/****************************************************************************************************/
|
||||
require_once('../includes/config_jabber.php');
|
||||
require_once("../includes/funktion_jabber.php");
|
||||
include("../includes/config_MessegeServer.php");
|
||||
// Set time limit to indefinite execution
|
||||
set_time_limit(0);
|
||||
|
||||
// Set time limit to indefinite execution
|
||||
set_time_limit( 0 );
|
||||
|
||||
/****************************************************************************************************/
|
||||
// show MODE
|
||||
/****************************************************************************************************/
|
||||
if( DEBUG)
|
||||
if(DEBUG)
|
||||
echo "DEBUG mode is enable\n\tjabber is disable\n\n";
|
||||
|
||||
/****************************************************************************************************/
|
||||
// INIT jabber
|
||||
/****************************************************************************************************/
|
||||
if( !DEBUG)
|
||||
{
|
||||
if(!DEBUG) {
|
||||
echo "INIT jabber\n";
|
||||
$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.");
|
||||
}
|
||||
}
|
||||
|
||||
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()) . ')');
|
||||
|
||||
/****************************************************************************************************/
|
||||
// INIT socked
|
||||
/****************************************************************************************************/
|
||||
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);
|
||||
// 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);
|
||||
|
||||
/****************************************************************************************************/
|
||||
// Loop continuos
|
||||
/****************************************************************************************************/
|
||||
$RUNNING = TRUE;
|
||||
while( $RUNNING )
|
||||
{
|
||||
if( @socket_recvfrom($sock, $data, 65535, 0, $ip, $port))
|
||||
{
|
||||
//daten empfangen
|
||||
$data = substr($data,0, strlen($data)-1); //ENTER entfernen
|
||||
$RUNNING = true;
|
||||
|
||||
while($RUNNING) {
|
||||
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";
|
||||
PackedAnalyser( $data);
|
||||
}
|
||||
|
||||
usleep(100000); // 100ms delay keeps the doctor away
|
||||
} // end while
|
||||
} // end while
|
||||
|
||||
//disconnect jabber
|
||||
if( !DEBUG)
|
||||
// disconnect jabber
|
||||
if(!DEBUG)
|
||||
$jabber->Disconnect();
|
||||
|
||||
// Close the master sockets
|
||||
socket_close($sock);
|
||||
|
||||
/****************************************************************************************************/
|
||||
/****************************************** MAIN END ************************************************/
|
||||
/****************************************************************************************************/
|
||||
|
||||
// Close the master sockets
|
||||
socket_close($sock);
|
||||
|
||||
/****************************************************************************************************/
|
||||
//***** function PackedAnalyser
|
||||
/****************************************************************************************************/
|
||||
function PackedAnalyser( $data )
|
||||
{
|
||||
GLOBAL $jabber, $RUNNING;
|
||||
function PackedAnalyser($data) {
|
||||
global $jabber, $RUNNING;
|
||||
// init array
|
||||
$matches = array();
|
||||
|
||||
//#message
|
||||
if( preg_match( "/^#(message) ([^ ]+) (.+)/i", $data, $matches ) )
|
||||
{
|
||||
if( $matches[2]=="" || $matches[3]=="")
|
||||
{
|
||||
// Wrong syntax
|
||||
if(preg_match("/^#(message) ([^ ]+) (.+)/i", $data, $matches)) {
|
||||
if($matches[2]=="" || $matches[3]=="")
|
||||
echo "\t\t\t\t#messaage parameter fail\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
// Whisper
|
||||
if( !DEBUG)
|
||||
if(!DEBUG)
|
||||
$jabber->SendMessage($value, "normal", NULL, array("body" => $message, "subject" => "Error in Pentabarf"), NULL);
|
||||
else
|
||||
echo "\t\t\t\tmessage to:\"". $matches[2]. "\" Text: \"". $matches[3]. "\"\n";
|
||||
}
|
||||
}
|
||||
elseif( preg_match( "/^#quit/i", $data, $matches ) )
|
||||
{
|
||||
if( DEBUG)
|
||||
{
|
||||
} elseif(preg_match("/^#quit/i", $data, $matches)) {
|
||||
if(DEBUG) {
|
||||
echo "\t\t\t\tSystem Shutdown\n\n";
|
||||
$RUNNING = FALSE;
|
||||
$RUNNING = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else
|
||||
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");
|
||||
include ("../../camp2011/includes/error_handler.php");
|
||||
include ("../../camp2011/includes/config_db.php");
|
||||
if( !isset($_SESSION)) session_start();
|
||||
include ("../../camp2011/includes/secure.php");
|
||||
if(!isset($_SESSION))
|
||||
session_start();
|
||||
|
||||
include "../../camp2011/includes/secure.php";
|
||||
|
||||
// Parameter check
|
||||
if( !isset($_GET["UID"]) )
|
||||
$_GET["UID"]= "-1";
|
||||
// Parameter check
|
||||
if(!isset($_GET["UID"]))
|
||||
$_GET["UID"] = "-1";
|
||||
|
||||
$SQL= "SELECT * FROM `UserPicture` WHERE `UID`='". $_GET["UID"]. "'";
|
||||
$res = mysql_query( $SQL, $con);
|
||||
$SQL = "SELECT * FROM `UserPicture` WHERE `UID`='" . $_GET["UID"] . "'";
|
||||
$res = mysql_query($SQL, $con);
|
||||
|
||||
if( mysql_num_rows($res) == 1)
|
||||
{
|
||||
//genügend rechte
|
||||
if( !isset($_SESSION['UID']) || $_SESSION['UID'] == -1)
|
||||
{
|
||||
header( "HTTP/1.0 403 Forbidden");
|
||||
die( "403 Forbidden");
|
||||
if(mysql_num_rows($res) == 1) {
|
||||
// genuegend rechte
|
||||
if(!isset($_SESSION['UID']) || $_SESSION['UID'] == -1) {
|
||||
header("HTTP/1.0 403 Forbidden");
|
||||
die("403 Forbidden");
|
||||
}
|
||||
|
||||
// ist das bild sichtbar?
|
||||
if( (mysql_result($res, 0, "show")=="N") AND
|
||||
($_SESSION['UID']!=$_GET["UID"]) AND
|
||||
($_SESSION['CVS'][ "admin/UserPicture.php" ] == "N"))
|
||||
{
|
||||
$SQL= "SELECT * FROM `UserPicture` WHERE `UID`='-1'";
|
||||
$res = mysql_query( $SQL, $con);
|
||||
if( mysql_num_rows($res) != 1)
|
||||
{
|
||||
header( 'HTTP/1.0 404 Not Found');
|
||||
die( "404 Not Found");
|
||||
if((mysql_result($res, 0, "show") == "N") AND ($_SESSION['UID']!=$_GET["UID"]) AND ($_SESSION['CVS'][ "admin/UserPicture.php" ] == "N")) {
|
||||
$SQL = "SELECT * FROM `UserPicture` WHERE `UID`='-1'";
|
||||
$res = mysql_query($SQL, $con);
|
||||
|
||||
if(mysql_num_rows($res) != 1) {
|
||||
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");
|
||||
|
||||
// ausgabe bild
|
||||
header( "Accept-Ranges: bytes");
|
||||
header( "Content-Length: ". strlen($bild));
|
||||
header( "Content-type: ". mysql_result($res, 0, "ContentType"));
|
||||
header( "Cache-control: public");
|
||||
header( "Cache-request-directive: min-fresh = 120");
|
||||
header( "Cache-request-directive: max-age = 360");
|
||||
header("Accept-Ranges: bytes");
|
||||
header("Content-Length: " . strlen($bild));
|
||||
header("Content-type: " . mysql_result($res, 0, "ContentType"));
|
||||
header("Cache-control: public");
|
||||
header("Cache-request-directive: min-fresh = 120");
|
||||
header("Cache-request-directive: max-age = 360");
|
||||
echo $bild;
|
||||
}
|
||||
else
|
||||
{
|
||||
header( 'HTTP/1.0 404 Not Found');
|
||||
} else {
|
||||
header("HTTP/1.0 404 Not Found");
|
||||
die( "404 Not Found");
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<h4 class="menu"> Anfragen und FAQ </h4>
|
||||
|
||||
<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>
|
||||
|
||||
|
@ -1,19 +1,19 @@
|
||||
<?PHP
|
||||
<?php
|
||||
|
||||
$title = "Erzengel";
|
||||
$header = "Index";
|
||||
include ("../../../camp2011/includes/header.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.
|
||||
|
||||
<?PHP
|
||||
<?php
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
?>
|
||||
|
||||
|
@ -1,13 +1,12 @@
|
||||
<?php
|
||||
include ("../../camp2011/includes/config.php");
|
||||
include "../../camp2011/includes/config.php";
|
||||
|
||||
// Die Session zerstoeren...
|
||||
session_start();
|
||||
session_destroy ();
|
||||
// und eine neue erstellen, damit kein Erzengelmenü angezeigt wird (falls sich ein Erzengel abmeldet...)
|
||||
session_start();
|
||||
|
||||
header("HTTP/1.1 302 Moved Temporarily");
|
||||
header("Location: ". $url. $ENGEL_ROOT);
|
||||
// Die Session zerstoeren...
|
||||
session_start();
|
||||
session_destroy ();
|
||||
// und eine neue erstellen, damit kein Erzengelmenue angezeigt wird (falls sich ein Erzengel abmeldet...)
|
||||
session_start();
|
||||
|
||||
header("HTTP/1.1 302 Moved Temporarily");
|
||||
header("Location: " . $url . $ENGEL_ROOT);
|
||||
?>
|
||||
|
@ -1,37 +1,27 @@
|
||||
<?php
|
||||
$title = "Himmel";
|
||||
$header = "Engelbesprechung";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
?>
|
||||
|
||||
<br>
|
||||
|
||||
<?php
|
||||
$title = "Himmel";
|
||||
$header = "Engelbesprechung";
|
||||
include "../../../camp2011/includes/header.php";
|
||||
|
||||
$SQL = "SELECT * FROM `News` ORDER BY 'Datum' DESC";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
$SQL = "SELECT * FROM `News` ORDER BY 'Datum' DESC";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
// anzahl zeilen
|
||||
$Zeilen = mysql_num_rows($Erg);
|
||||
// anzahl zeilen
|
||||
$Zeilen = mysql_num_rows($Erg);
|
||||
|
||||
for ($n = 0 ; $n < $Zeilen ; $n++)
|
||||
{
|
||||
if (mysql_result($Erg, $n, "Treffen")=="1")
|
||||
{
|
||||
echo "<p class='question'><u>".mysql_result($Erg, $n, "Betreff")."</u>";
|
||||
for ($n = 0 ; $n < $Zeilen ; $n++) {
|
||||
if (mysql_result($Erg, $n, "Treffen") == "1") {
|
||||
echo "<p class='question'><u>" . mysql_result($Erg, $n, "Betreff") . "</u>";
|
||||
|
||||
// Schow Admin Page
|
||||
if( $_SESSION['CVS'][ "admin/news.php" ] == "Y" )
|
||||
// Show Admin Page
|
||||
if($_SESSION['CVS']["admin/news.php"] == "Y")
|
||||
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 "<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