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,103 +1,79 @@
|
|||||||
<?php
|
<?php
|
||||||
|
if(!isset($_SESSION['UID']))
|
||||||
|
$_SESSION['UID'] = -1;
|
||||||
if( !isset($_SESSION['UID']))
|
|
||||||
$_SESSION['UID'] = -1;
|
// CVS import Data
|
||||||
|
$SQL_CVS = "SELECT * FROM `UserCVS` WHERE UID=" . $_SESSION['UID'];
|
||||||
// CVS import Data
|
$Erg_CVS = mysql_query($SQL_CVS, $con);
|
||||||
$SQL_CVS = "SELECT * FROM `UserCVS` WHERE UID=".$_SESSION['UID'];
|
$_SESSION['CVS'] = mysql_fetch_array($Erg_CVS);
|
||||||
$Erg_CVS = mysql_query($SQL_CVS, $con);
|
|
||||||
$_SESSION['CVS'] = mysql_fetch_array($Erg_CVS);
|
// Group import Data, if nesseary
|
||||||
|
if(isset($_SESSION['CVS']["GroupID"])) {
|
||||||
|
$SQL_GRP = "SELECT * FROM `UserCVS` WHERE UID=" . $_SESSION['CVS'][ "GroupID" ];
|
||||||
// Group import Data, if nesseary
|
$Erg_GRP = mysql_query($SQL_GRP, $con);
|
||||||
if( isset( $_SESSION['CVS'][ "GroupID" ]))
|
$_SESSION['CVS_Group'] = mysql_fetch_array($Erg_GRP);
|
||||||
{
|
|
||||||
$SQL_GRP = "SELECT * FROM `UserCVS` WHERE UID=".$_SESSION['CVS'][ "GroupID" ];
|
foreach($_SESSION['CVS'] as $k => $v) {
|
||||||
$Erg_GRP = mysql_query($SQL_GRP, $con);
|
if($v == "G")
|
||||||
$_SESSION['CVS_Group'] = mysql_fetch_array($Erg_GRP);
|
$_SESSION['CVS'][$k] = $_SESSION['CVS_Group'][$k];
|
||||||
|
}
|
||||||
foreach( $_SESSION['CVS'] as $k => $v)
|
}
|
||||||
{
|
|
||||||
if($v=="G") // Right == Group
|
// pagename ermitteln
|
||||||
$_SESSION['CVS'][$k] = $_SESSION['CVS_Group'][$k];
|
$Page["Name"] = basename($_SERVER['PHP_SELF']);
|
||||||
}
|
|
||||||
}
|
//recht fuer diese seite auslesen
|
||||||
|
if(isset($_SESSION['CVS'][$Page["Name"]]))
|
||||||
//pagename ermitteln
|
$Page["CVS"] = $_SESSION['CVS'][$Page["Name"]];
|
||||||
$Page["Name"] = substr( $_SERVER['PHP_SELF'], strlen($ENGEL_ROOT) );
|
else {
|
||||||
|
echo "SYSTEM ERROR: now right for " . $Page["Name"] . " exists.";
|
||||||
//recht f?r diese seite auslesen
|
die;
|
||||||
if( isset( $_SESSION['CVS'][ $Page["Name"] ]))
|
}
|
||||||
$Page["CVS"] = $_SESSION['CVS'][ $Page["Name"] ];
|
|
||||||
else
|
if($debug) {
|
||||||
{
|
echo "<pre>\$_SESSION:\n";
|
||||||
echo "SYSTEM ERROR: now right for ". $Page["Name"]. "exist";
|
print_r($_SESSION);
|
||||||
die;
|
echo "</pre>";
|
||||||
}
|
|
||||||
|
if( strlen($Page["CVS"]) == 0 )
|
||||||
if( $DEBUG )
|
echo "<h1><u> CVS ERROR, on page '". $Page["Name"]. "'</u></h1>";
|
||||||
{
|
else
|
||||||
// foreach( $_SESSION as $k => $v)
|
echo "CVS: ". $Page["Name"]. " => '". $Page["CVS"]. "'<br />";
|
||||||
// echo "$k = $v<br>\n";
|
}
|
||||||
echo "<pre>\$_SESSION:\n";
|
|
||||||
print_r($_SESSION);
|
function funktion_isLinkAllowed($PageName) {
|
||||||
echo "</pre>";
|
global $_SESSION;
|
||||||
|
|
||||||
if( strlen($Page["CVS"]) == 0 )
|
// separate page parameter
|
||||||
echo "<h1><u> CVS ERROR, on page '". $Page["Name"]. "'</u></h1>";
|
$ParameterPos = strpos($PageName, ".php?");
|
||||||
else
|
|
||||||
echo "CVS: ". $Page["Name"]. " => '". $Page["CVS"]. "'<br>";
|
if($ParameterPos === false)
|
||||||
|
$pName = $PageName;
|
||||||
}
|
else
|
||||||
|
$pName = substr($PageName, 0, $ParameterPos + 4);
|
||||||
function funktion_isLinkAllowed( $PageName)
|
|
||||||
{
|
// check rights
|
||||||
global $_SESSION;
|
if((isset( $_SESSION['CVS'][ $pName ]) === true) && $_SESSION['CVS'][ $pName ] == "Y")
|
||||||
|
return true;
|
||||||
// separate page parameter
|
|
||||||
$ParameterPos = strpos( $PageName, ".php?");
|
return false;
|
||||||
if( $ParameterPos === FALSE)
|
}
|
||||||
{
|
|
||||||
$pName = $PageName;
|
function funktion_isLinkAllowed_addLink_OrLinkText( $PageName, $LinkText) {
|
||||||
}
|
global $url, $ENGEL_ROOT;
|
||||||
else
|
|
||||||
{
|
if(funktion_isLinkAllowed( $PageName) === true)
|
||||||
$pName = substr( $PageName, 0, $ParameterPos + 4);
|
return "<a href=\"" . $url. $ENGEL_ROOT . $PageName . "\">" . $LinkText . "</a>";
|
||||||
}
|
|
||||||
|
return $LinkText;
|
||||||
// check rights
|
}
|
||||||
if( (isset( $_SESSION['CVS'][ $pName ]) === TRUE) &&
|
|
||||||
($_SESSION['CVS'][ $pName ] == "Y") )
|
function funktion_isLinkAllowed_addLink_OrEmpty( $PageName, $LinkText) {
|
||||||
{
|
global $url, $ENGEL_ROOT;
|
||||||
return TRUE;
|
|
||||||
}
|
if(funktion_isLinkAllowed( $PageName) === true)
|
||||||
|
return "<a href=\"" . $url . $ENGEL_ROOT . $PageName . "\">" . $LinkText . "</a>";
|
||||||
return FALSE;
|
|
||||||
}
|
return "";
|
||||||
|
}
|
||||||
function funktion_isLinkAllowed_addLink_OrLinkText( $PageName, $LinkText)
|
|
||||||
{
|
|
||||||
global $url, $ENGEL_ROOT;
|
|
||||||
|
|
||||||
if( funktion_isLinkAllowed( $PageName) === TRUE)
|
|
||||||
{
|
|
||||||
return "<a href=\"". $url. $ENGEL_ROOT. $PageName. "\">". $LinkText. "</a>";
|
|
||||||
}
|
|
||||||
|
|
||||||
return $LinkText;
|
|
||||||
}
|
|
||||||
|
|
||||||
function funktion_isLinkAllowed_addLink_OrEmpty( $PageName, $LinkText)
|
|
||||||
{
|
|
||||||
global $url, $ENGEL_ROOT;
|
|
||||||
|
|
||||||
if( funktion_isLinkAllowed( $PageName) === TRUE)
|
|
||||||
{
|
|
||||||
return "<a href=\"". $url. $ENGEL_ROOT. $PageName. "\">". $LinkText. "</a>";
|
|
||||||
}
|
|
||||||
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -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";
|
||||||
function PassCrypt($passwort) {
|
|
||||||
include "config.php";
|
switch ($crypt_system) {
|
||||||
|
case "crypt":
|
||||||
switch ($crypt_system) {
|
return "{crypt}" . crypt($passwort, "77");
|
||||||
case "crypt":
|
case "md5":
|
||||||
return "{crypt}".crypt($passwort, "77");
|
return md5($passwort);
|
||||||
case "md5":
|
}
|
||||||
return md5($passwort);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,57 +1,39 @@
|
|||||||
<?PHP
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- anfang des footers //-->
|
<!-- anfang des footers //-->
|
||||||
|
<br />
|
||||||
|
<p align="center">
|
||||||
|
<?php if(IsSet($_SESSION['oldurl']))
|
||||||
|
echo "<a href=\"" . $_SESSION["oldurl"] . "\">" . Get_Text("back") . "</a> ";
|
||||||
<br>
|
?>
|
||||||
<p align="center">
|
<a href="#top"><?php echo Get_Text("top"); ?></a>
|
||||||
<?PHP If (IsSet($_SESSION['oldurl']))
|
</p>
|
||||||
echo "<a href=\"". $_SESSION["oldurl"]. "\">".Get_Text("back")."</a> ";
|
</td>
|
||||||
?>
|
</tr>
|
||||||
<a href="#top"><?PHP echo Get_Text("top"); ?></a>
|
|
||||||
</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- anfang des menue parts //-->
|
<!-- anfang des menue parts //-->
|
||||||
<?PHP
|
<?php
|
||||||
if( $_SESSION['Menu'] =="R") include("menu.php");
|
if($_SESSION['Menu'] == "R")
|
||||||
|
include("menu.php");
|
||||||
?>
|
?>
|
||||||
</td>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ende des menue parts //-->
|
<!-- ende des menue parts //-->
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
</tr>
|
<td colspan="2">
|
||||||
<tr>
|
<h5 align="center"> © copyleft - <a href="mailto:erzengel@lists.ccc.de">Kontakt</a>
|
||||||
<td colspan="2">
|
<?php
|
||||||
<h5 align="center"> © copyleft - <a href="mailto:erzengel@lists.ccc.de">Kontakt</a>
|
include("funktion_counter.php");
|
||||||
<?PHP
|
include("funktion_flag.php");
|
||||||
include( "funktion_counter.php");
|
?></h5>
|
||||||
include( "funktion_flag.php");
|
</td>
|
||||||
?></h5>
|
</tr>
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
<?php mysql_close($con); ?>
|
<?php mysql_close($con); ?>
|
||||||
</div>
|
<!-- </div> -->
|
||||||
|
|
||||||
|
|
||||||
</BODY>
|
</body>
|
||||||
</HTML>
|
</html>
|
||||||
|
@ -1,18 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
|
function SendData($Data) {
|
||||||
|
include "config_MessegeServer.php";
|
||||||
function SendData($Data)
|
// Create a UDP socket
|
||||||
{
|
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
|
||||||
include("config_MessegeServer.php");
|
|
||||||
// Create a UDP socket
|
//send packed
|
||||||
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
|
socket_sendto($sock, $Data, 9999, 0x4, SERVER_ADDRESS, SERVER_PORT);
|
||||||
//send packed
|
}
|
||||||
socket_sendto($sock, $Data, 9999, 0x4, SERVER_ADDRESS, SERVER_PORT);
|
|
||||||
}
|
function SendMessageJabber($Adresse, $Nachricht) {
|
||||||
|
SendData( "#message $Adresse $Nachricht");
|
||||||
function SendMessageJabber($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) {
|
||||||
{
|
return floor( $param1 / $param2);
|
||||||
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
|
|
||||||
|
|
||||||
for( $i=0; $i<mysql_num_rows($Erg); $i++)
|
|
||||||
{
|
|
||||||
echo "\t\t\t<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)
|
|
||||||
echo "0";
|
|
||||||
echo bcmod( $Tlog, 60);
|
|
||||||
echo "</li>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
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>";
|
||||||
?>
|
?>
|
||||||
|
@ -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');";
|
||||||
{
|
$Erg = mysql_query($SQL, $con);
|
||||||
// echo "Counter: 1";
|
} elseif(mysql_num_rows($Erg) == 1) {
|
||||||
$SQL = "INSERT INTO `Counter` ( `URL` , `Anz` ) ".
|
$SQL = "UPDATE `Counter` SET `Anz` = '" . (mysql_result($Erg, 0, 0) +1) . "' WHERE `URL` = '" . $Page["Name"] . "' LIMIT 1 ;";
|
||||||
"VALUES ('". $Page["Name"]. "', '1');";
|
$Erg = mysql_query($SQL, $con);
|
||||||
$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);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,149 +1,145 @@
|
|||||||
<?PHP
|
<?php
|
||||||
|
if( !function_exists("db_query")) {
|
||||||
if( !function_exists("db_query"))
|
function Ausgabe_Daten($SQL) {
|
||||||
{
|
global $con;
|
||||||
function Ausgabe_Daten($SQL)
|
$Erg = mysql_query($SQL, $con);
|
||||||
{
|
|
||||||
global $con;
|
echo mysql_error($con);
|
||||||
$Erg = mysql_query($SQL, $con);
|
|
||||||
|
$Zeilen = mysql_num_rows($Erg);
|
||||||
echo mysql_error($con);
|
$Anzahl_Felder = mysql_num_fields($Erg);
|
||||||
|
|
||||||
$Zeilen = mysql_num_rows($Erg);
|
$Diff = "<table border=1>";
|
||||||
$Anzahl_Felder = mysql_num_fields($Erg);
|
$Diff .= "<tr>";
|
||||||
|
|
||||||
$Diff = "<table border=1>";
|
for ($m = 0 ; $m < $Anzahl_Felder ; $m++)
|
||||||
$Diff .= "<tr>";
|
$Diff .= "<th>". mysql_field_name($Erg, $m). "</th>";
|
||||||
for ($m = 0 ; $m < $Anzahl_Felder ; $m++)
|
|
||||||
$Diff .= "<th>". mysql_field_name($Erg, $m). "</th>";
|
$Diff .= "</tr>";
|
||||||
$Diff .= "</tr>";
|
|
||||||
|
for ($n = 0 ; $n < $Zeilen ; $n++) {
|
||||||
for ($n = 0 ; $n < $Zeilen ; $n++)
|
$Diff .= "<tr>";
|
||||||
{
|
|
||||||
$Diff .= "<tr>";
|
for ($m = 0 ; $m < $Anzahl_Felder ; $m++)
|
||||||
for ($m = 0 ; $m < $Anzahl_Felder ; $m++)
|
$Diff .= "<td>".mysql_result($Erg, $n, $m). "</td>";
|
||||||
$Diff .= "<td>".mysql_result($Erg, $n, $m). "</td>";
|
|
||||||
$Diff .= "</tr>";
|
$Diff .= "</tr>";
|
||||||
}
|
}
|
||||||
$Diff .= "</table>";
|
|
||||||
return $Diff;
|
$Diff .= "</table>";
|
||||||
}
|
return $Diff;
|
||||||
|
}
|
||||||
function db_querry_getDatenAssocArray($SQL)
|
|
||||||
{
|
function db_querry_getDatenAssocArray($SQL) {
|
||||||
global $con;
|
global $con;
|
||||||
|
|
||||||
$Erg = mysql_query($SQL, $con);
|
$Erg = mysql_query($SQL, $con);
|
||||||
echo mysql_error($con);
|
echo mysql_error($con);
|
||||||
|
|
||||||
$Daten = array();
|
$Daten = array();
|
||||||
for( $i=0; $i<mysql_num_rows($Erg); $i++)
|
|
||||||
$Daten[$i] = mysql_fetch_assoc($Erg);
|
for( $i=0; $i<mysql_num_rows($Erg); $i++)
|
||||||
|
$Daten[$i] = mysql_fetch_assoc($Erg);
|
||||||
return $Daten;
|
|
||||||
}
|
return $Daten;
|
||||||
|
}
|
||||||
function db_querry_diffDaten($Daten1, $Daten2)
|
|
||||||
{
|
function db_querry_diffDaten($Daten1, $Daten2) {
|
||||||
$Gefunden=False;
|
$Gefunden = false;
|
||||||
|
|
||||||
$Diff = "\n<table border=1>\n";
|
$Diff = "\n<table border=1>\n";
|
||||||
$Diff .= "<tr>\n\t<th>Feldname</th>\n\t<th>old Value</th>\n\t<th>new Value</th>\n";
|
$Diff .= "<tr>\n\t<th>Feldname</th>\n\t<th>old Value</th>\n\t<th>new Value</th>\n";
|
||||||
$Diff .= "</tr>\n";
|
$Diff .= "</tr>\n";
|
||||||
foreach($Daten1 as $DataKey => $Data1)
|
|
||||||
{
|
foreach($Daten1 as $DataKey => $Data1) {
|
||||||
if( isset( $Daten2[$DataKey]))
|
if(isset( $Daten2[$DataKey])) {
|
||||||
{
|
$Data2 = $Daten2[$DataKey];
|
||||||
$Data2 = $Daten2[$DataKey];
|
|
||||||
foreach($Data1 as $key => $value)
|
foreach($Data1 as $key => $value)
|
||||||
if( $value != $Data2[$key])
|
if( $value != $Data2[$key]) {
|
||||||
{
|
$Gefunden = true;
|
||||||
$Gefunden=TRUE;
|
$Diff .= "<tr>\n\t<td>$key</td>\n\t<td>$value</td>\n\t<td>" . $Data2[$key] . "</rd>\n</tr>";
|
||||||
$Diff .= "<tr>\n\t<td>$key</td>\n\t<td>$value</td>\n\t<td>".$Data2[$key]."</rd>\n</tr>";
|
}
|
||||||
}
|
} else
|
||||||
}
|
foreach($Data1 as $key => $value) {
|
||||||
else
|
$Gefunden = true;
|
||||||
foreach($Data1 as $key => $value)
|
$Diff .= "<tr>\n\t<td>$key</td>\n\t<td>$value</td>\n\t<td></rd>\n</tr>";
|
||||||
{
|
}
|
||||||
$Gefunden=TRUE;
|
}
|
||||||
$Diff .= "<tr>\n\t<td>$key</td>\n\t<td>$value</td>\n\t<td></rd>\n</tr>";
|
|
||||||
}
|
$Diff .= "</table>\n";
|
||||||
}
|
|
||||||
$Diff .= "</table>\n";
|
if($Gefunden)
|
||||||
|
return $Diff;
|
||||||
if( $Gefunden)
|
else
|
||||||
return $Diff;
|
return "\nno changes Fount\n";
|
||||||
else
|
}
|
||||||
return "\nno changes Fount\n";
|
|
||||||
}
|
function db_query( $SQL, $comment) {
|
||||||
|
global $con, $Page;
|
||||||
function db_query( $SQL, $comment)
|
$Diff = "";
|
||||||
{
|
|
||||||
global $con, $Page;
|
// commed anlyse udn daten sicherung
|
||||||
$Diff = "";
|
if(strpos("#$SQL", "UPDATE") > 0) {
|
||||||
|
// Tabellen name ermitteln
|
||||||
//commed anlyse udn daten sicherung
|
$Table_Start = strpos( $SQL, "`");
|
||||||
if( strpos( "#$SQL", "UPDATE") > 0)
|
$Table_End = strpos( $SQL, "`", $Table_Start+1);
|
||||||
{
|
$Table = substr( $SQL, $Table_Start, ($Table_End-$Table_Start+1));
|
||||||
//Tabellen name ermitteln
|
|
||||||
$Table_Start = strpos( $SQL, "`");
|
//SecureTest
|
||||||
$Table_End = strpos( $SQL, "`", $Table_Start+1);
|
if( $Table_Start == 0 || $Table_End == 0) die("<h1>funktion_db ERROR SQL: '$SQL' nicht OK</h1>");
|
||||||
$Table = substr( $SQL, $Table_Start, ($Table_End-$Table_Start+1));
|
|
||||||
|
//WHERE ermitteln
|
||||||
//SecureTest
|
$Where_Start = strpos( $SQL, "WHERE");
|
||||||
if( $Table_Start == 0 || $Table_End == 0) die("<h1>funktion_db ERROR SQL: '$SQL' nicht OK</h1>");
|
$Where = substr( $SQL, $Where_Start);
|
||||||
|
if( $Where_Start == 0) $Where = ";";
|
||||||
//WHERE ermitteln
|
|
||||||
$Where_Start = strpos( $SQL, "WHERE");
|
if( strlen( $Where) < 2)
|
||||||
$Where = substr( $SQL, $Where_Start);
|
{
|
||||||
if( $Where_Start == 0) $Where = ";";
|
$Diff = "can't show, too mutch data (no filter was set)";
|
||||||
|
$querry_erg = mysql_query($SQL, $con);
|
||||||
if( strlen( $Where) < 2)
|
}
|
||||||
{
|
else
|
||||||
$Diff = "can't show, too mutch data (no filter was set)";
|
{
|
||||||
$querry_erg = mysql_query($SQL, $con);
|
$Daten1 = db_querry_getDatenAssocArray( "SELECT * FROM $Table $Where");
|
||||||
}
|
$querry_erg = mysql_query($SQL, $con);
|
||||||
else
|
$Daten2 = db_querry_getDatenAssocArray( "SELECT * FROM $Table $Where");
|
||||||
{
|
$Diff = db_querry_diffDaten($Daten1, $Daten2);
|
||||||
$Daten1 = db_querry_getDatenAssocArray( "SELECT * FROM $Table $Where");
|
}
|
||||||
$querry_erg = mysql_query($SQL, $con);
|
}
|
||||||
$Daten2 = db_querry_getDatenAssocArray( "SELECT * FROM $Table $Where");
|
elseif( strpos( "#$SQL", "DELETE") > 0)
|
||||||
$Diff = db_querry_diffDaten($Daten1, $Daten2);
|
{
|
||||||
}
|
$TableWhere = substr( $SQL, 6);
|
||||||
}
|
$Diff .= Ausgabe_Daten( "SELECT * $TableWhere");
|
||||||
elseif( strpos( "#$SQL", "DELETE") > 0)
|
|
||||||
{
|
//execute command
|
||||||
$TableWhere = substr( $SQL, 6);
|
$querry_erg = mysql_query($SQL, $con);
|
||||||
$Diff .= Ausgabe_Daten( "SELECT * $TableWhere");
|
}
|
||||||
|
elseif( strpos( "#$SQL", "INSERT") > 0)
|
||||||
//execute command
|
{
|
||||||
$querry_erg = mysql_query($SQL, $con);
|
//execute command
|
||||||
}
|
$querry_erg = mysql_query($SQL, $con);
|
||||||
elseif( strpos( "#$SQL", "INSERT") > 0)
|
}
|
||||||
{
|
else
|
||||||
//execute command
|
{
|
||||||
$querry_erg = mysql_query($SQL, $con);
|
//execute command
|
||||||
}
|
$querry_erg = mysql_query($SQL, $con);
|
||||||
else
|
}
|
||||||
{
|
|
||||||
//execute command
|
$SQLCommand = "SQL:<br />". htmlentities( $SQL, ENT_QUOTES);
|
||||||
$querry_erg = mysql_query($SQL, $con);
|
if( strlen($Diff) > 0)
|
||||||
}
|
$SQLCommand .= "<br /><br />Diff:<br />$Diff";
|
||||||
|
|
||||||
$SQLCommand = "SQL:<br>". htmlentities( $SQL, ENT_QUOTES);
|
$Commend = htmlentities( ($Page["Name"]. ": ". $comment), ENT_QUOTES);
|
||||||
if( strlen($Diff) > 0)
|
//LOG commands in DB
|
||||||
$SQLCommand .= "<br><br>Diff:<br>$Diff";
|
$SQL_SEC = "INSERT INTO `ChangeLog` ( `UID` , `SQLCommad` , `Commend` ) ".
|
||||||
|
" VALUES ( '". $_SESSION['UID']. "', ".
|
||||||
$Commend = htmlentities( ($Page["Name"]. ": ". $comment), ENT_QUOTES);
|
"'". mysql_escape_string( $SQLCommand). "', ".
|
||||||
//LOG commands in DB
|
"'". mysql_escape_string( $Commend). "' );";
|
||||||
$SQL_SEC = "INSERT INTO `ChangeLog` ( `UID` , `SQLCommad` , `Commend` ) ".
|
$erg = mysql_query($SQL_SEC, $con);
|
||||||
" VALUES ( '". $_SESSION['UID']. "', ".
|
echo mysql_error($con);
|
||||||
"'". mysql_escape_string( $SQLCommand). "', ".
|
return $querry_erg;
|
||||||
"'". mysql_escape_string( $Commend). "' );";
|
}//function db_query(
|
||||||
$erg = mysql_query($SQL_SEC, $con);
|
|
||||||
echo mysql_error($con);
|
|
||||||
return $querry_erg;
|
|
||||||
}//function db_query(
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,67 +1,65 @@
|
|||||||
<?PHP
|
<?php
|
||||||
|
function funktion_db_list($Table_Name) {
|
||||||
|
global $con;
|
||||||
|
|
||||||
function funktion_db_list($Table_Name)
|
$SQL = "SELECT * FROM `".$Table_Name."`";
|
||||||
{
|
$Erg = mysql_query($SQL, $con);
|
||||||
global $con;
|
|
||||||
|
|
||||||
$SQL = "SELECT * FROM `".$Table_Name."`";
|
|
||||||
$Erg = mysql_query($SQL, $con);
|
|
||||||
|
|
||||||
// anzahl zeilen
|
// anzahl zeilen
|
||||||
$Zeilen = mysql_num_rows($Erg);
|
$Zeilen = mysql_num_rows($Erg);
|
||||||
|
|
||||||
$Anzahl_Felder = mysql_num_fields($Erg);
|
$Anzahl_Felder = mysql_num_fields($Erg);
|
||||||
|
|
||||||
echo "<table class=\"border\" cellpadding=\"2\" cellspacing=\"1\">";
|
echo "<table class=\"border\" cellpadding=\"2\" cellspacing=\"1\">";
|
||||||
echo "<caption>DB: $Table_Name</caption>";
|
echo "<caption>DB: $Table_Name</caption>";
|
||||||
|
|
||||||
echo "<tr class=\"contenttopic\">";
|
echo "<tr class=\"contenttopic\">";
|
||||||
for ($m = 0 ; $m < $Anzahl_Felder ; $m++)
|
for ($m = 0 ; $m < $Anzahl_Felder ; $m++)
|
||||||
{
|
{
|
||||||
echo "<th>". mysql_field_name($Erg, $m). "</th>";
|
echo "<th>". mysql_field_name($Erg, $m). "</th>";
|
||||||
}
|
}
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
|
|
||||||
for ($n = 0 ; $n < $Zeilen ; $n++)
|
for ($n = 0 ; $n < $Zeilen ; $n++)
|
||||||
{
|
{
|
||||||
echo "<tr class=\"content\">";
|
echo "<tr class=\"content\">";
|
||||||
for ($m = 0 ; $m < $Anzahl_Felder ; $m++)
|
for ($m = 0 ; $m < $Anzahl_Felder ; $m++)
|
||||||
{
|
{
|
||||||
echo "<td>".mysql_result($Erg, $n, $m). "</td>";
|
echo "<td>".mysql_result($Erg, $n, $m). "</td>";
|
||||||
}
|
}
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
}
|
}
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
}
|
}
|
||||||
|
|
||||||
function funktion_db_element_list_2row( $TopicName, $SQL)
|
function funktion_db_element_list_2row( $TopicName, $SQL)
|
||||||
{
|
{
|
||||||
global $con;
|
global $con;
|
||||||
|
|
||||||
echo "<table class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n";
|
echo "<table class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n";
|
||||||
echo "<caption>$TopicName</caption>";
|
echo "<caption>$TopicName</caption>";
|
||||||
# echo "\t<tr class=\"contenttopic\"> <td><h1>$TopicName</h1></td> </tr>\n";
|
# echo "\t<tr class=\"contenttopic\"> <td><h1>$TopicName</h1></td> </tr>\n";
|
||||||
|
|
||||||
$Erg = mysql_query($SQL, $con);
|
$Erg = mysql_query($SQL, $con);
|
||||||
echo mysql_error($con);
|
echo mysql_error($con);
|
||||||
|
|
||||||
echo "<tr class=\"contenttopic\">";
|
echo "<tr class=\"contenttopic\">";
|
||||||
for ($m = 0 ; $m < mysql_num_fields($Erg) ; $m++)
|
for ($m = 0 ; $m < mysql_num_fields($Erg) ; $m++)
|
||||||
{
|
{
|
||||||
echo "<th>". mysql_field_name($Erg, $m). "</th>";
|
echo "<th>". mysql_field_name($Erg, $m). "</th>";
|
||||||
}
|
}
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
|
|
||||||
for ($n = 0 ; $n < mysql_num_rows($Erg) ; $n++)
|
for ($n = 0 ; $n < mysql_num_rows($Erg) ; $n++)
|
||||||
{
|
{
|
||||||
echo "<tr class=\"content\">";
|
echo "<tr class=\"content\">";
|
||||||
for ($m = 0 ; $m < mysql_num_fields($Erg) ; $m++)
|
for ($m = 0 ; $m < mysql_num_fields($Erg) ; $m++)
|
||||||
{
|
{
|
||||||
echo "<td>".mysql_result($Erg, $n, $m). "</td>";
|
echo "<td>".mysql_result($Erg, $n, $m). "</td>";
|
||||||
}
|
}
|
||||||
echo "</tr>";
|
echo "</tr>";
|
||||||
}
|
}
|
||||||
echo "</table>\n";
|
echo "</table>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
<?PHP
|
<?php
|
||||||
|
function noAnswer() {
|
||||||
|
global $con;
|
||||||
|
|
||||||
function noAnswer() {
|
$SQL = "SELECT UID FROM Questions WHERE `AID`='0'";
|
||||||
global $con;
|
$Res = mysql_query($SQL, $con);
|
||||||
|
|
||||||
$SQL = "SELECT UID FROM Questions WHERE `AID`='0'";
|
|
||||||
$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,35 +1,28 @@
|
|||||||
<?PHP
|
<?php
|
||||||
|
function Get_Text ($TextID, $NoError = false) {
|
||||||
|
global $con, $error_messages, $debug;
|
||||||
function Get_Text ($TextID, $NoError=FALSE)
|
|
||||||
{
|
if( !isset($_SESSION['Sprache']))
|
||||||
GLOBAL $con, $error_messages, $DEBUG;
|
$_SESSION['Sprache'] = "EN";
|
||||||
|
if( $_SESSION['Sprache']=="")
|
||||||
if( !isset($_SESSION['Sprache']))
|
$_SESSION['Sprache']="EN";
|
||||||
$_SESSION['Sprache'] = "EN";
|
if( isset($_GET["SetLanguage"]))
|
||||||
if( $_SESSION['Sprache']=="")
|
$_SESSION['Sprache']= $_GET["SetLanguage"];
|
||||||
$_SESSION['Sprache']="EN";
|
|
||||||
if( isset($_GET["SetLanguage"]))
|
$SQL = "SELECT * FROM `Sprache` WHERE TextID=\"$TextID\" AND Sprache ='".$_SESSION['Sprache']."'";
|
||||||
$_SESSION['Sprache']= $_GET["SetLanguage"];
|
@$Erg = mysql_query($SQL, $con);
|
||||||
|
|
||||||
$SQL = "SELECT * FROM `Sprache` WHERE TextID=\"$TextID\" AND Sprache ='".$_SESSION['Sprache']."'";
|
if( mysql_num_rows( $Erg) == 1)
|
||||||
@$Erg = mysql_query($SQL, $con);
|
return (@mysql_result($Erg, 0, "Text"));
|
||||||
|
elseif( $NoError && !$debug)
|
||||||
if( mysql_num_rows( $Erg) == 1)
|
return "";
|
||||||
return (@mysql_result($Erg, 0, "Text"));
|
else {
|
||||||
elseif( $NoError && !$DEBUG)
|
array_push($error_messages, "Get_Text, '$TextID' found ". mysql_num_rows( $Erg). "x in Sprache Database Table for Language (".$_SESSION['Sprache'].")\n");
|
||||||
return "";
|
return "Error Data, '$TextID' found ". mysql_num_rows( $Erg). "x";
|
||||||
else
|
}
|
||||||
{
|
}
|
||||||
array_push($error_messages, "Get_Text, '$TextID' found ". mysql_num_rows( $Erg). "x in Sprache Database Table for Language (".$_SESSION['Sprache'].")\n");
|
|
||||||
return "Error Data, '$TextID' found ". mysql_num_rows( $Erg). "x";
|
function Print_Text($TextID, $NoError = false) {
|
||||||
}
|
echo Get_Text($TextID, $NoError);
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
function Print_Text ($TextID, $NoError=FALSE)
|
|
||||||
{
|
|
||||||
echo Get_Text ($TextID, $NoError);
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,44 +1,41 @@
|
|||||||
<?PHP
|
<?php
|
||||||
|
function ShowMenu( $MenuName) {
|
||||||
|
global $MenueTableStart, $MenueTableEnd, $_SESSION, $debug, $url, $ENGEL_ROOT;
|
||||||
|
$Gefunden = false;
|
||||||
|
|
||||||
function ShowMenu( $MenuName)
|
// Ueberschift
|
||||||
{
|
$Text = "<h4 class=\"menu\">". Get_Text("$MenuName/"). "</h4><ul>";
|
||||||
global $MenueTableStart, $MenueTableEnd, $_SESSION, $DEBUG, $url, $ENGEL_ROOT;
|
|
||||||
$Gefunden=FALSE;
|
|
||||||
|
|
||||||
//Überschift
|
// Eintraege
|
||||||
$Text = "<h4 class=\"menu\">". Get_Text("$MenuName/"). "</h4>";
|
foreach($_SESSION['CVS'] as $Key => $Entry)
|
||||||
|
if( strpos( $Key, ".php") > 0)
|
||||||
|
if( (strpos( "00$Key", "0$MenuName") > 0) ||
|
||||||
|
((strlen($MenuName)==0) && (strpos( "0$Key", "/") == 0) ) ) {
|
||||||
|
$TempName = Get_Text($Key, true);
|
||||||
|
|
||||||
//einträge
|
if(( true||$debug) && (strlen($TempName)==0) )
|
||||||
foreach( $_SESSION['CVS'] as $Key => $Entry )
|
$TempName = "not found: \"$Key\"";
|
||||||
if( strpos( $Key, ".php") > 0)
|
|
||||||
if( (strpos( "00$Key", "0$MenuName") > 0) ||
|
|
||||||
((strlen($MenuName)==0) && (strpos( "0$Key", "/") == 0) ) )
|
|
||||||
{
|
|
||||||
$TempName = Get_Text($Key, TRUE);
|
|
||||||
if(( TRUE||$DEBUG) && (strlen($TempName)==0) )
|
|
||||||
$TempName = "not found: \"$Key\"";
|
|
||||||
|
|
||||||
if( $Entry == "Y")
|
if( $Entry == "Y") {
|
||||||
{
|
//zum absichtlkichen ausblenden von einträgen
|
||||||
//zum absichtlkichen ausblenden von einträgen
|
if( strlen($TempName)>1) {
|
||||||
if( strlen($TempName)>1)
|
//sonderfälle:
|
||||||
{
|
|
||||||
//sonderfälle:
|
if( $Key=="admin/faq.php")
|
||||||
if( $Key=="admin/faq.php")
|
$TempName .= " (". noAnswer(). ")";
|
||||||
$TempName .= " (". noAnswer(). ")";
|
//ausgabe
|
||||||
//ausgabe
|
$Text .= "\t\t\t<li><a href=\"". $url. $ENGEL_ROOT. $Key. "\">$TempName</a></li>\n";
|
||||||
$Text .= "\t\t\t<li><a href=\"". $url. $ENGEL_ROOT. $Key. "\">$TempName</a></li>\n";
|
$Gefunden = true;
|
||||||
$Gefunden = TRUE;
|
}
|
||||||
}
|
}
|
||||||
}
|
elseif( $debug )
|
||||||
elseif( $DEBUG )
|
{
|
||||||
{
|
$Gefunden = true;
|
||||||
$Gefunden = TRUE;
|
$Text .= "\t\t\t<li>$TempName ($Key)</li>\n";
|
||||||
$Text .= "\t\t\t<li>$TempName ($Key)</li>\n";
|
}
|
||||||
}
|
}
|
||||||
}
|
if( $Gefunden)
|
||||||
if( $Gefunden)
|
echo $MenueTableStart.$Text.$MenueTableEnd;
|
||||||
echo $MenueTableStart.$Text.$MenueTableEnd;
|
|
||||||
}//function ShowMenue
|
}//function ShowMenue
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,35 +1,34 @@
|
|||||||
<?PHP
|
<?php
|
||||||
include "config_modem.php";
|
include "config_modem.php";
|
||||||
|
|
||||||
function DialNumber( $Number )
|
function DialNumber($Number) {
|
||||||
{
|
global $Dev, $ModemEnable;
|
||||||
global $Dev, $ModemEnable;
|
|
||||||
|
if($ModemEnable) {
|
||||||
|
echo "Dial number: '<u>$Number</u>' was called<br />\n";
|
||||||
|
|
||||||
if( $ModemEnable)
|
$fp = fopen( $ModemDev, "w");
|
||||||
{
|
sleep(1);
|
||||||
echo "Dial number: '<u>$Number</u>' was called<br>\n";
|
fwrite( $fp, "+++");
|
||||||
$fp = fopen( $ModemDev, "w");
|
sleep(1);
|
||||||
sleep(1);
|
fwrite( $fp, "ATZ\n");
|
||||||
fwrite( $fp, "+++");
|
sleep(1);
|
||||||
sleep(1);
|
fwrite( $fp, "ATX1\n");
|
||||||
fwrite( $fp, "ATZ\n");
|
sleep(1);
|
||||||
sleep(1);
|
fwrite( $fp, "ATD $Number \n");
|
||||||
fwrite( $fp, "ATX1\n");
|
sleep(8);
|
||||||
sleep(1);
|
fclose($fp);
|
||||||
fwrite( $fp, "ATD $Number \n");
|
sleep(1);
|
||||||
sleep(8);
|
}
|
||||||
fclose($fp);
|
else
|
||||||
sleep(1);
|
echo "Modem is Disable, number: '<u>$Number</u>' was not called<br />\n";
|
||||||
}
|
|
||||||
else
|
|
||||||
echo "Modem is Disable, number: '<u>$Number</u>' was not called<br>\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function SetWackeup( $Number, $TimeH, $TimeM)
|
function SetWackeup( $Number, $TimeH, $TimeM)
|
||||||
{
|
{
|
||||||
global $WackupNumber;
|
global $WakeupNumber;
|
||||||
DialNumber( "$WackupNumber$TimeH$TimeM$Number");
|
DialNumber( "$WakeupNumber$TimeH$TimeM$Number");
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,87 +1,101 @@
|
|||||||
<?PHP
|
<?php
|
||||||
|
if(!function_exists("DatumUm1TagErhoehen")) {
|
||||||
|
function DatumUm1TagErhoehen( $Datum) {
|
||||||
|
$Jahr = substr($Datum, 0, 4);
|
||||||
|
$Monat = substr($Datum, 5, 2);
|
||||||
|
$Tag = substr($Datum, 8, 2);
|
||||||
|
|
||||||
if( !function_exists("DatumUm1TagErhoehen"))
|
$Tag++;
|
||||||
{
|
|
||||||
function DatumUm1TagErhoehen( $Datum)
|
|
||||||
{
|
|
||||||
$Jahr = substr( $Datum, 0, 4);
|
|
||||||
$Monat = substr( $Datum, 5, 2);
|
|
||||||
$Tag = substr( $Datum, 8, 2);
|
|
||||||
|
|
||||||
$Tag++;
|
switch( $Monat) {
|
||||||
|
case 1:
|
||||||
|
$Mmax = 31;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
$Mmax = 28;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
$Mmax = 31;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
$Mmax = 30;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
$Mmax = 31;
|
||||||
|
break;
|
||||||
|
case 6:
|
||||||
|
$Mmax = 30;
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
$Mmax = 31;
|
||||||
|
break;
|
||||||
|
case 8:
|
||||||
|
$Mmax = 31;
|
||||||
|
break;
|
||||||
|
case 9:
|
||||||
|
$Mmax = 30;
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
$Mmax = 31;
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
$Mmax = 30;
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
$Mmax = 31;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
switch( $Monat)
|
if($Tag > $Mmax) {
|
||||||
{
|
$Tag = 1;
|
||||||
case 1: $Mmax=31; break;
|
$Monat++;
|
||||||
case 2: $Mmax=28; break;
|
}
|
||||||
case 3: $Mmax=31; break;
|
|
||||||
case 4: $Mmax=30; break;
|
|
||||||
case 5: $Mmax=31; break;
|
|
||||||
case 6: $Mmax=30; break;
|
|
||||||
case 7: $Mmax=31; break;
|
|
||||||
case 8: $Mmax=31; break;
|
|
||||||
case 9: $Mmax=30; break;
|
|
||||||
case 10: $Mmax=31; break;
|
|
||||||
case 11: $Mmax=30; break;
|
|
||||||
case 12: $Mmax=31; break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( $Tag > $Mmax)
|
if($Monat > 12) {
|
||||||
{
|
$Monat = 1;
|
||||||
$Tag = 1;
|
$Jahr++;
|
||||||
$Monat++;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if( $Monat > 12 )
|
$Tag = strlen( $Tag ) == 1 ? "0".$Tag : $Tag;
|
||||||
{
|
$Monat = strlen( $Monat ) == 1 ? "0".$Monat : $Monat;
|
||||||
$Monat = 1;
|
|
||||||
$Jahr++;
|
|
||||||
}
|
|
||||||
|
|
||||||
$Tag = strlen( $Tag ) == 1 ? "0".$Tag : $Tag;
|
return ("$Jahr-$Monat-$Tag");
|
||||||
$Monat = strlen( $Monat ) == 1 ? "0".$Monat : $Monat;
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ("$Jahr-$Monat-$Tag");
|
// suchen den ersten eintrags
|
||||||
} //function DatumUm1Tagerhoehen(
|
$SQL = "SELECT `DateS` FROM `Shifts` ORDER BY `DateS` LIMIT 1";
|
||||||
}
|
$Erg = mysql_query($SQL, $con);
|
||||||
|
|
||||||
//suchen den ersten eintrags
|
$Pos = 0;
|
||||||
$SQL = "SELECT `DateS` FROM `Shifts` ORDER BY `DateS` LIMIT 1";
|
|
||||||
$Erg = mysql_query($SQL, $con);
|
|
||||||
|
|
||||||
$Pos=0;
|
if(mysql_num_rows($Erg) > 0) {
|
||||||
|
do {
|
||||||
|
// Startdatum einlesen und link ausgeben
|
||||||
|
$DateS = substr(mysql_result($Erg, 0 , 0), 0,10);
|
||||||
|
$VeranstaltungsTage[$Pos++] = $DateS;
|
||||||
|
|
||||||
if( mysql_num_rows($Erg)>0)
|
// auslesen den endes und eventuelle weitere tage ausgeben
|
||||||
{
|
$SQL2 = "SELECT MAX(`DateE`) FROM `Shifts` WHERE ( (`DateS` like '$DateS%') AND NOT (`DateE` like '%00:00:00'))";
|
||||||
do
|
$Erg2 = mysql_query($SQL2, $con);
|
||||||
{
|
$DateE = substr(mysql_result($Erg2, 0 , 0), 0,10);
|
||||||
//Startdatum einlesen und link ausgeben
|
|
||||||
$DateS = substr(mysql_result($Erg, 0 , 0), 0,10);
|
|
||||||
$VeranstaltungsTage[$Pos++] = $DateS;
|
|
||||||
|
|
||||||
//auslesen den endes und eventuelle weitere tage ausgeben
|
if(strlen($DateE) == 0)
|
||||||
$SQL2 = "SELECT MAX(`DateE`) FROM `Shifts` ".
|
$DateE = $DateS;
|
||||||
"WHERE ( (`DateS` like '$DateS%') AND NOT (`DateE` like '%00:00:00'))";
|
else
|
||||||
$Erg2 = mysql_query($SQL2, $con);
|
while( $DateS != $DateE) {
|
||||||
$DateE = substr(mysql_result($Erg2, 0 , 0), 0,10);
|
$DateS = DatumUm1TagErhoehen( $DateS);
|
||||||
|
$VeranstaltungsTage[$Pos++] = $DateS;
|
||||||
|
}
|
||||||
|
|
||||||
if( strlen($DateE) == 0)
|
// suchen den naesten eintrag
|
||||||
$DateE = $DateS;
|
$SQL = "SELECT `DateS` FROM `Shifts` ".
|
||||||
else
|
"WHERE (`DateS` > '$DateE 23:59:59' ) ".
|
||||||
while( $DateS != $DateE)
|
"ORDER BY `DateS` ".
|
||||||
{
|
"LIMIT 1";
|
||||||
$DateS = DatumUm1TagErhoehen( $DateS);
|
$Erg = mysql_query($SQL, $con);
|
||||||
$VeranstaltungsTage[$Pos++] = $DateS;
|
|
||||||
}
|
|
||||||
|
|
||||||
//suchen den nästen eintrag
|
|
||||||
$SQL = "SELECT `DateS` FROM `Shifts` ".
|
|
||||||
"WHERE (`DateS` > '$DateE 23:59:59' ) ".
|
|
||||||
"ORDER BY `DateS` ".
|
|
||||||
"LIMIT 1";
|
|
||||||
$Erg = mysql_query($SQL, $con);
|
|
||||||
} while( mysql_fetch_row($Erg) > 0);
|
} while( mysql_fetch_row($Erg) > 0);
|
||||||
}
|
}
|
||||||
$VeranstaltungsTageMax = $Pos-1;
|
|
||||||
|
|
||||||
|
$VeranstaltungsTageMax = $Pos - 1;
|
||||||
?>
|
?>
|
||||||
|
@ -1,132 +1,111 @@
|
|||||||
<?php
|
<?php
|
||||||
|
function UID2Nick($UID) {
|
||||||
|
global $con;
|
||||||
|
|
||||||
|
if($UID > 0)
|
||||||
|
$SQL = "SELECT Nick FROM `User` WHERE UID='$UID'";
|
||||||
|
else
|
||||||
|
$SQL = "SELECT Name FROM `UserGroups` WHERE UID='$UID'";
|
||||||
|
|
||||||
|
$Erg = mysql_query($SQL, $con);
|
||||||
|
|
||||||
|
if(mysql_num_rows($Erg)) {
|
||||||
|
if($UID > 0)
|
||||||
|
return mysql_result($Erg, 0);
|
||||||
|
else
|
||||||
|
return "Group-".mysql_result($Erg, 0);
|
||||||
|
} else {
|
||||||
|
if($UID == -1)
|
||||||
|
return "logout User";
|
||||||
|
else
|
||||||
|
return "UserID $UID not found";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function TID2Type($TID) {
|
||||||
|
global $con;
|
||||||
|
|
||||||
|
$SQL = "SELECT Name FROM `EngelType` WHERE TID='$TID'";
|
||||||
|
$Erg = mysql_query($SQL, $con);
|
||||||
|
|
||||||
|
if(mysql_num_rows($Erg))
|
||||||
|
return mysql_result($Erg, 0);
|
||||||
|
else
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
function ReplaceSmilies($neueckig) {
|
||||||
|
global $url, $ENGEL_ROOT;
|
||||||
|
|
||||||
|
$neueckig = str_replace(";o))", "<img src=\"" . $url . $ENGEL_ROOT . "pic/smiles/icon_redface.gif\">", $neueckig);
|
||||||
|
$neueckig = str_replace(":-))", "<img src=\"" . $url . $ENGEL_ROOT . "pic/smiles/icon_redface.gif\">", $neueckig);
|
||||||
|
$neueckig = str_replace(";o)", "<img src=\"" . $url . $ENGEL_ROOT . "pic/smiles/icon_wind.gif\">", $neueckig);
|
||||||
|
$neueckig = str_replace(":)", "<img src=\"" . $url . $ENGEL_ROOT . "pic/smiles/icon_smile.gif\">", $neueckig);
|
||||||
|
$neueckig = str_replace(":-)", "<img src=\"" . $url . $ENGEL_ROOT . "pic/smiles/icon_smile.gif\">", $neueckig);
|
||||||
|
$neueckig = str_replace(":(", "<img src=\"" . $url . $ENGEL_ROOT . "pic/smiles/icon_sad.gif\">", $neueckig);
|
||||||
|
$neueckig = str_replace(":-(", "<img src=\"" . $url . $ENGEL_ROOT . "pic/smiles/icon_sad.gif\">", $neueckig);
|
||||||
|
$neueckig = str_replace(":o(", "<img src=\"" . $url . $ENGEL_ROOT . "pic/smiles/icon_sad.gif\">", $neueckig);
|
||||||
|
$neueckig = str_replace(":o)", "<img src=\"" . $url . $ENGEL_ROOT . "pic/smiles/icon_lol.gif\">", $neueckig);
|
||||||
|
$neueckig = str_replace(";o(", "<img src=\"" . $url . $ENGEL_ROOT . "pic/smiles/icon_cry.gif\">", $neueckig);
|
||||||
|
$neueckig = str_replace(";(", "<img src=\"" . $url . $ENGEL_ROOT . "pic/smiles/icon_cry.gif\">", $neueckig);
|
||||||
|
$neueckig = str_replace(";-(", "<img src=\"" . $url . $ENGEL_ROOT . "pic/smiles/icon_cry.gif\">", $neueckig);
|
||||||
|
$neueckig = str_replace("8)", "<img src=\"" . $url . $ENGEL_ROOT . "pic/smiles/icon_rolleyes.gif\">", $neueckig);
|
||||||
|
$neueckig = str_replace("8o)", "<img src=\"" . $url . $ENGEL_ROOT . "pic/smiles/icon_rolleyes.gif\">", $neueckig);
|
||||||
|
$neueckig = str_replace(":P", "<img src=\"" . $url . $ENGEL_ROOT . "pic/smiles/icon_evil.gif\">", $neueckig);
|
||||||
|
$neueckig = str_replace(":-P", "<img src=\"" . $url . $ENGEL_ROOT . "pic/smiles/icon_evil.gif\">", $neueckig);
|
||||||
|
$neueckig = str_replace(":oP", "<img src=\"" . $url . $ENGEL_ROOT . "pic/smiles/icon_evil.gif\">", $neueckig);
|
||||||
|
$neueckig = str_replace(";P", "<img src=\"" . $url . $ENGEL_ROOT . "pic/smiles/icon_mad.gif\">", $neueckig);
|
||||||
|
$neueckig = str_replace(";oP", "<img src=\"" . $url . $ENGEL_ROOT . "pic/smiles/icon_mad.gif\">", $neueckig);
|
||||||
|
$neueckig = str_replace("?)", "<img src=\"" . $url . $ENGEL_ROOT . "pic/smiles/icon_question.gif\">", $neueckig);
|
||||||
|
|
||||||
|
return $neueckig;
|
||||||
|
}
|
||||||
|
|
||||||
|
function GetPicturShow($UID) {
|
||||||
|
global $con;
|
||||||
|
|
||||||
|
$SQL = "SELECT `show` FROM `UserPicture` WHERE `UID`='$UID'";
|
||||||
|
$res = mysql_query( $SQL, $con);
|
||||||
|
|
||||||
function UID2Nick($UID)
|
if(mysql_num_rows($res) == 1)
|
||||||
{
|
return mysql_result($res, 0, 0);
|
||||||
global $con;
|
else
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
function displayPictur($UID, $height = "30") {
|
||||||
|
global $url, $ENGEL_ROOT;
|
||||||
|
|
||||||
if( $UID>0) {
|
if($height > 0)
|
||||||
$SQL = "SELECT Nick FROM `User` WHERE UID='$UID'";
|
return( "<img src=\"". $url. $ENGEL_ROOT. "ShowUserPicture.php?UID=$UID\" height=\"$height\" alt=\"picture of USER$UID\" class=\"photo\">");
|
||||||
} else {
|
else
|
||||||
$SQL = "SELECT Name FROM `UserGroups` WHERE UID='$UID'";
|
return( "<img src=\"". $url. $ENGEL_ROOT. "ShowUserPicture.php?UID=$UID\" alt=\"picture of USER$UID\">");
|
||||||
}
|
}
|
||||||
$Erg = mysql_query($SQL, $con);
|
|
||||||
|
function displayavatar($UID, $height="30") {
|
||||||
//echo $UID."#";
|
global $con, $url, $ENGEL_ROOT;
|
||||||
if( mysql_num_rows($Erg)) {
|
|
||||||
if( $UID>0 ) {
|
if( GetPicturShow($UID) == 'Y')
|
||||||
return mysql_result($Erg, 0);
|
return " ". displayPictur( $UID, $height);
|
||||||
} else {
|
|
||||||
return "Group-".mysql_result($Erg, 0);
|
// show avator
|
||||||
}
|
$asql = "select * from User where UID = $UID";
|
||||||
} else {
|
$aerg = mysql_query ($asql, $con);
|
||||||
if( $UID == -1)
|
|
||||||
return "logout User";
|
if(mysql_num_rows($aerg))
|
||||||
else
|
if(mysql_result($aerg, 0, "Avatar") > 0)
|
||||||
return "UserID $UID not found";
|
return (" <img src=\"". $url. $ENGEL_ROOT. "pic/avatar/avatar". mysql_result($aerg, 0, "Avatar"). ".gif\">");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function TID2Type($TID)
|
|
||||||
{
|
|
||||||
global $con;
|
|
||||||
|
|
||||||
$SQL = "SELECT Name FROM `EngelType` WHERE TID='$TID'";
|
|
||||||
$Erg = mysql_query($SQL, $con);
|
|
||||||
|
|
||||||
if( mysql_num_rows($Erg))
|
|
||||||
return mysql_result($Erg, 0);
|
|
||||||
else
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function ReplaceSmilies($eckig)
|
|
||||||
{
|
|
||||||
global $url, $ENGEL_ROOT;
|
|
||||||
|
|
||||||
$neueckig = $eckig;
|
|
||||||
$neueckig = str_replace(";o))", "<img src=\"". $url. $ENGEL_ROOT. "pic/smiles/icon_redface.gif\">",$neueckig);
|
|
||||||
$neueckig = str_replace(":-))", "<img src=\"". $url. $ENGEL_ROOT. "pic/smiles/icon_redface.gif\">",$neueckig);
|
|
||||||
$neueckig = str_replace(";o)", "<img src=\"". $url. $ENGEL_ROOT. "pic/smiles/icon_wind.gif\">",$neueckig);
|
|
||||||
$neueckig = str_replace(":)", "<img src=\"". $url. $ENGEL_ROOT. "pic/smiles/icon_smile.gif\">",$neueckig);
|
|
||||||
$neueckig = str_replace(":-)", "<img src=\"". $url. $ENGEL_ROOT. "pic/smiles/icon_smile.gif\">",$neueckig);
|
|
||||||
$neueckig = str_replace(":(", "<img src=\"". $url. $ENGEL_ROOT. "pic/smiles/icon_sad.gif\">",$neueckig);
|
|
||||||
$neueckig = str_replace(":-(", "<img src=\"". $url. $ENGEL_ROOT. "pic/smiles/icon_sad.gif\">",$neueckig);
|
|
||||||
$neueckig = str_replace(":o(", "<img src=\"". $url. $ENGEL_ROOT. "pic/smiles/icon_sad.gif\">",$neueckig);
|
|
||||||
$neueckig = str_replace(":o)", "<img src=\"". $url. $ENGEL_ROOT. "pic/smiles/icon_lol.gif\">",$neueckig);
|
|
||||||
$neueckig = str_replace(";o(", "<img src=\"". $url. $ENGEL_ROOT. "pic/smiles/icon_cry.gif\">",$neueckig);
|
|
||||||
$neueckig = str_replace(";(", "<img src=\"". $url. $ENGEL_ROOT. "pic/smiles/icon_cry.gif\">",$neueckig);
|
|
||||||
$neueckig = str_replace(";-(", "<img src=\"". $url. $ENGEL_ROOT. "pic/smiles/icon_cry.gif\">",$neueckig);
|
|
||||||
$neueckig = str_replace("8)", "<img src=\"". $url. $ENGEL_ROOT. "pic/smiles/icon_rolleyes.gif\">",$neueckig);
|
|
||||||
$neueckig = str_replace("8o)", "<img src=\"". $url. $ENGEL_ROOT. "pic/smiles/icon_rolleyes.gif\">",$neueckig);
|
|
||||||
$neueckig = str_replace(":P", "<img src=\"". $url. $ENGEL_ROOT. "pic/smiles/icon_evil.gif\">",$neueckig);
|
|
||||||
$neueckig = str_replace(":-P", "<img src=\"". $url. $ENGEL_ROOT. "pic/smiles/icon_evil.gif\">",$neueckig);
|
|
||||||
$neueckig = str_replace(":oP", "<img src=\"". $url. $ENGEL_ROOT. "pic/smiles/icon_evil.gif\">",$neueckig);
|
|
||||||
$neueckig = str_replace(";P", "<img src=\"". $url. $ENGEL_ROOT. "pic/smiles/icon_mad.gif\">",$neueckig);
|
|
||||||
$neueckig = str_replace(";oP", "<img src=\"". $url. $ENGEL_ROOT. "pic/smiles/icon_mad.gif\">",$neueckig);
|
|
||||||
$neueckig = str_replace("?)", "<img src=\"". $url. $ENGEL_ROOT. "pic/smiles/icon_question.gif\">",$neueckig);
|
|
||||||
return $neueckig;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function GetPicturShow($UID)
|
|
||||||
{
|
|
||||||
global $con;
|
|
||||||
|
|
||||||
$SQL= "SELECT `show` FROM `UserPicture` WHERE `UID`='$UID'";
|
|
||||||
$res = mysql_query( $SQL, $con);
|
|
||||||
if( mysql_num_rows($res) == 1)
|
|
||||||
return mysql_result( $res, 0, 0);
|
|
||||||
else
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Parameter:
|
|
||||||
<UserID>
|
|
||||||
[<Höhe des Bildes (wenn die höhe kleiner 1 ist wird die höhe nicht begrenzt)>] */
|
|
||||||
function displayPictur($UID, $height="30")
|
|
||||||
{
|
|
||||||
global $url, $ENGEL_ROOT;
|
|
||||||
if( $height > 0)
|
|
||||||
return( "<img src=\"". $url. $ENGEL_ROOT. "ShowUserPicture.php?UID=$UID\" height=\"$height\" alt=\"picture of USER$UID\" class=\"photo\">");
|
|
||||||
else
|
|
||||||
return( "<img src=\"". $url. $ENGEL_ROOT. "ShowUserPicture.php?UID=$UID\" alt=\"picture of USER$UID\">");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Parameter:
|
|
||||||
<UserID>
|
|
||||||
[<Höhe des Bildes (wenn die höhe kleiner 1 ist wird die höhe nicht begrenzt)>] */
|
|
||||||
function displayavatar( $UID, $height="30")
|
|
||||||
{
|
|
||||||
global $con, $url, $ENGEL_ROOT;
|
|
||||||
|
|
||||||
if( GetPicturShow($UID) == 'Y')
|
|
||||||
return " ". displayPictur( $UID, $height);
|
|
||||||
|
|
||||||
// show avator
|
|
||||||
$asql = "select * from User where UID = $UID";
|
|
||||||
$aerg = mysql_query ($asql, $con);
|
|
||||||
if( mysql_num_rows($aerg) )
|
|
||||||
if( mysql_result($aerg, 0, "Avatar") > 0)
|
|
||||||
return (" <img src=\"". $url. $ENGEL_ROOT. "pic/avatar/avatar". mysql_result($aerg, 0, "Avatar"). ".gif\">");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function UIDgekommen($UID)
|
|
||||||
{
|
|
||||||
global $con;
|
|
||||||
|
|
||||||
$SQL = "SELECT `Gekommen` FROM `User` WHERE UID='$UID'";
|
|
||||||
$Erg = mysql_query($SQL, $con);
|
|
||||||
|
|
||||||
//echo $UID."#";
|
|
||||||
if( mysql_num_rows($Erg))
|
|
||||||
return mysql_result($Erg, 0);
|
|
||||||
else
|
|
||||||
return "0";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
function UIDgekommen($UID) {
|
||||||
|
global $con;
|
||||||
|
|
||||||
|
$SQL = "SELECT `Gekommen` FROM `User` WHERE UID='$UID'";
|
||||||
|
$Erg = mysql_query($SQL, $con);
|
||||||
|
|
||||||
|
if(mysql_num_rows($Erg))
|
||||||
|
return mysql_result($Erg, 0);
|
||||||
|
else
|
||||||
|
return "0";
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -1,69 +1,61 @@
|
|||||||
<?PHP
|
<?php
|
||||||
|
echo "<h1>Rooms:</h1>\n";
|
||||||
|
|
||||||
/*##############################################################################################
|
function saveRoomData() {
|
||||||
R o o m
|
global $con;
|
||||||
##############################################################################################*/
|
|
||||||
echo "\n\n<br>\n<h1>Rooms:</h1>\n";
|
if(isset($_GET["NameXML"])) {
|
||||||
|
$SQL = "INSERT INTO `Room` ( `Name`, `FromPentabarf` ) ".
|
||||||
function saveRoomData()
|
"VALUES ('". mysql_escape_string($_GET["NameXML"]). "', 'Y');";
|
||||||
{
|
$Erg = mysql_query($SQL, $con);
|
||||||
global $con;
|
|
||||||
if( isset($_GET["NameXML"]))
|
if($Erg)
|
||||||
{
|
echo "Aenderung, an Raum ". $_GET["NameXML"]. ", war erfogreich<br />";
|
||||||
$SQL= "INSERT INTO `Room` ( `Name`, `FromPentabarf` ) ".
|
else
|
||||||
"VALUES ('". mysql_escape_string($_GET["NameXML"]). "', 'Y');";
|
echo "Aenderung, an Raum ". $_GET["NameXML"]. ", war <u>nicht</u> erfogreich.(".
|
||||||
$Erg = mysql_query($SQL, $con);
|
|
||||||
if( $Erg )
|
mysql_error($con). ")<br />[$SQL]<br />";
|
||||||
echo "Aenderung, an Raum ". $_GET["NameXML"]. ", war erfogreich<br>";
|
} else
|
||||||
else
|
echo "Fehler in den Parametern!<br />";
|
||||||
echo "Aenderung, an Raum ". $_GET["NameXML"]. ", war <u>nicht</u> erfogreich.(".
|
}
|
||||||
mysql_error($con). ")<br>[$SQL]<br>";
|
|
||||||
}
|
if(isset($_GET["RoomUpdate"]))
|
||||||
else
|
saveRoomData();
|
||||||
echo "Fehler in den Parametern!<br>";
|
|
||||||
} /*function saveRoomData*/
|
// INIT Status counter
|
||||||
|
$DS_KO = 0;
|
||||||
if( isset($_GET["RoomUpdate"]))
|
|
||||||
saveRoomData();
|
// Ausgabe
|
||||||
|
echo "<table border=\"0\">\n";
|
||||||
//INIT Status counter
|
echo "<tr><th>Name</th><th>state</th></tr>\n";
|
||||||
$DS_KO = 0;
|
|
||||||
|
if($EnableSchudle) {
|
||||||
//Ausgabe
|
foreach($XMLmain->sub as $EventKey => $Event) {
|
||||||
echo "<table border=\"0\">\n";
|
if( $Event->name == "VEVENT") {
|
||||||
echo "<tr><th>Name</th><th>state</th></tr>\n";
|
$NameXML = getXMLsubData( $Event, "LOCATION");
|
||||||
if( $EnableSchudle)
|
|
||||||
foreach($XMLmain->sub as $EventKey => $Event)
|
if( !isset( $RoomName[$NameXML])) {
|
||||||
{
|
$RoomName[$NameXML] = "";
|
||||||
if( $Event->name == "VEVENT")
|
|
||||||
{
|
if(isset($_GET["UpdateALL"])) {
|
||||||
$NameXML = getXMLsubData( $Event, "LOCATION");
|
$_GET["NameXML"] = $NameXML;
|
||||||
if( !isset( $RoomName[$NameXML]))
|
saveRoomData();
|
||||||
{
|
CreateRoomArrays();
|
||||||
$RoomName[$NameXML] = "";
|
} else {
|
||||||
|
echo "<form action=\"dbUpdateFromXLS.php\">\n";
|
||||||
if( isset($_GET["UpdateALL"]))
|
echo "\t<tr>\n";
|
||||||
{
|
echo "\t<td><input name=\"NameXML\" type=\"text\" value=\"$NameXML\" readonly></td>\n";
|
||||||
$_GET["NameXML"] = $NameXML;
|
echo "\t<td><input type=\"submit\" name=\"RoomUpdate\" value=\"update\"></td>\n";
|
||||||
saveRoomData();
|
$DS_KO++;
|
||||||
CreateRoomArrays();
|
echo "\t</tr>\n";
|
||||||
}
|
echo "</form>\n";
|
||||||
else
|
echo "<br />";
|
||||||
{
|
}
|
||||||
echo "<form action=\"dbUpdateFromXLS.php\">\n";
|
}
|
||||||
echo "\t<tr>\n";
|
}
|
||||||
echo "\t<td><input name=\"NameXML\" type=\"text\" value=\"$NameXML\" readonly></td>\n";
|
}
|
||||||
echo "\t<td><input type=\"submit\" name=\"RoomUpdate\" value=\"update\"></td>\n";
|
}
|
||||||
$DS_KO++;
|
|
||||||
echo "\t</tr>\n";
|
echo "<tr><td colspan=\"6\">status: $DS_KO nicht vorhanden.</td></tr>\n";
|
||||||
echo "</form>\n";
|
echo "</table>\n";
|
||||||
echo "<br>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
echo "<tr><td colspan=\"6\">status: $DS_KO nicht vorhanden.</td></tr>\n";
|
|
||||||
echo "</table>\n";
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,26 +1,23 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/* Schichtverplanung im Adminbereich */
|
||||||
|
function Dsubstr($DateString, $re) {
|
||||||
|
if ($re == 1)
|
||||||
|
return substr($DateString, 0, 2);
|
||||||
|
elseif ($re == 2)
|
||||||
|
return substr($DateString, 3, 2);
|
||||||
|
else
|
||||||
|
return substr($DateString, 6, 4);
|
||||||
|
}
|
||||||
|
|
||||||
/* Schichtverplanung im Adminbereich */
|
/* Schichtverplanung im Engelbereich */
|
||||||
function Dsubstr($DateString,$re) {
|
function engeldate($edate, $m) {
|
||||||
if ($re==1)
|
if ($m == t)
|
||||||
return substr($DateString, 0, 2);
|
return substr($edate, 8, 2);
|
||||||
elseif ($re==2)
|
elseif ($m == m)
|
||||||
return substr($DateString, 3, 2);
|
return substr($edate, 5, 2);
|
||||||
else
|
elseif ($m == u)
|
||||||
return substr($DateString, 6, 4);
|
return substr($edate, 11, 5);
|
||||||
}
|
else
|
||||||
|
return substr($edate, 0, 4);
|
||||||
/* Schichtverplanung im Engelbereich */
|
}
|
||||||
|
|
||||||
function engeldate($edate,$m) {
|
|
||||||
if ($m==t)
|
|
||||||
return substr($edate, 8, 2);
|
|
||||||
elseif ($m==m)
|
|
||||||
return substr($edate, 5, 2);
|
|
||||||
elseif ($m==u)
|
|
||||||
return substr($edate, 11, 5);
|
|
||||||
else
|
|
||||||
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".
|
die();
|
||||||
"<BODY>\n". $SystemDisableMessage. "\n<BODY>\n".
|
}
|
||||||
"</HTML>";
|
|
||||||
die();
|
if(!isset($_SESSION))
|
||||||
}
|
session_start();
|
||||||
|
|
||||||
if( !isset($_SESSION))
|
include "secure.php";
|
||||||
{
|
|
||||||
session_start();
|
if(!isset($_SESSION['IP']))
|
||||||
}
|
$_SESSION['IP'] = $_SERVER['REMOTE_ADDR'];
|
||||||
include ("secure.php");
|
|
||||||
|
if(isset($_SESSION['UID']) && ($_SESSION['IP'] <> $_SERVER['REMOTE_ADDR'])) {
|
||||||
if( !isset($_SESSION['IP']))
|
session_destroy ();
|
||||||
{
|
header("Location: " . $url . $ENGEL_ROOT);
|
||||||
$_SESSION['IP'] = $_SERVER['REMOTE_ADDR'];
|
}
|
||||||
}
|
|
||||||
|
include "UserCVS.php";
|
||||||
if (IsSet($_SESSION['UID']) and ($_SESSION['IP'] <> $_SERVER['REMOTE_ADDR']))
|
|
||||||
{
|
// update LASTlogin
|
||||||
session_destroy ();
|
if(isset($_SESSION['UID'])) {
|
||||||
header("Location: $url". $ENGEL_ROOT );
|
$SQLlastLogIn = "UPDATE `User` SET " .
|
||||||
}
|
"`lastLogIn` = '" . gmdate("Y-m-j H:i:s", time()) . "'" .
|
||||||
|
" WHERE `UID` = '" . $_SESSION['UID'] . "' LIMIT 1;";
|
||||||
include ("UserCVS.php");
|
mysql_query ($SQLlastLogIn, $con);
|
||||||
|
}
|
||||||
|
|
||||||
//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
|
<?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";
|
$v = htmlentities($v, ENT_QUOTES);
|
||||||
|
preg_replace('/([\'"`\'])/', '', $v);
|
||||||
|
$_GET[$k] = $v;
|
||||||
|
|
||||||
foreach ($_GET as $k => $v)
|
if($debug)
|
||||||
{
|
echo "GET $k=\"$v\"<br />";
|
||||||
// $v = htmlspecialchars($v, ENT_QUOTES);
|
}
|
||||||
// $v = mysql_escape_string($v);
|
|
||||||
$v = htmlentities($v, ENT_QUOTES);
|
|
||||||
if (preg_match('/([\'"`\'])/', $v, $match))
|
|
||||||
{
|
|
||||||
print "sorry get has illegal char '$match[1]'";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
$_GET[$k] = $v;
|
|
||||||
|
|
||||||
if( $DEBUG)
|
foreach ($_POST as $k => $v) {
|
||||||
echo "GET $k=\"$v\"<br>";
|
$v = htmlentities($v, ENT_QUOTES);
|
||||||
}
|
preg_replace('/([\'"`\'])/', '', $v);
|
||||||
|
$_POST[$k] = $v;
|
||||||
|
|
||||||
foreach ($_POST as $k => $v)
|
if($debug)
|
||||||
{
|
echo "POST $k=\"$v\"<br />";
|
||||||
// $v = htmlspecialchars($v, ENT_QUOTES);
|
}
|
||||||
// $v = mysql_escape_string($v);
|
|
||||||
$v = htmlentities($v, ENT_QUOTES);
|
|
||||||
if (preg_match('/([\'"`\'])/', $v, $match)) {
|
|
||||||
print "sorry post has illegal char '$match[1]'";
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
$_POST[$k] = $v;
|
|
||||||
|
|
||||||
if( $DEBUG)
|
|
||||||
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
|
include "../includes/config_MessegeServer.php";
|
||||||
/****************************************************************************************************/
|
|
||||||
require_once('../includes/config_jabber.php');
|
// Set time limit to indefinite execution
|
||||||
require_once("../includes/funktion_jabber.php");
|
set_time_limit(0);
|
||||||
include("../includes/config_MessegeServer.php");
|
|
||||||
|
if(DEBUG)
|
||||||
// Set time limit to indefinite execution
|
echo "DEBUG mode is enable\n\tjabber is disable\n\n";
|
||||||
set_time_limit( 0 );
|
|
||||||
|
if(!DEBUG) {
|
||||||
/****************************************************************************************************/
|
echo "INIT jabber\n";
|
||||||
// show MODE
|
$jabber = new Jabber($server, $port, $username, $password, $resource);
|
||||||
/****************************************************************************************************/
|
|
||||||
if( DEBUG)
|
if(!($jabber->Connect() && $jabber->SendAuth()))
|
||||||
echo "DEBUG mode is enable\n\tjabber is disable\n\n";
|
die("Couldn't connect to Jabber Server.");
|
||||||
|
}
|
||||||
/****************************************************************************************************/
|
|
||||||
// INIT jabber
|
echo "INIT socked\n";
|
||||||
/****************************************************************************************************/
|
|
||||||
if( !DEBUG)
|
// Create a UDP socket
|
||||||
{
|
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP) or die('Could not create socked (' . socket_strerror(socket_last_error()) . ')');
|
||||||
echo "INIT jabber\n";
|
|
||||||
$jabber = new Jabber($server, $port, $username, $password, $resource);
|
// Bind the socket to an address/port
|
||||||
if ( !($jabber->Connect() && $jabber->SendAuth()))
|
socket_bind($sock, SERVER_ADDRESS, SERVER_PORT) or die('Could not bind to address (' . socket_strerror(socket_last_error()) . ')');
|
||||||
die("Couldn't connect to Jabber Server.");
|
|
||||||
}
|
// Setzt Nonbock Mode
|
||||||
|
socket_set_nonblock($sock);
|
||||||
|
|
||||||
/****************************************************************************************************/
|
$RUNNING = true;
|
||||||
// INIT socked
|
|
||||||
/****************************************************************************************************/
|
while($RUNNING) {
|
||||||
echo "INIT socked\n";
|
if(@socket_recvfrom($sock, $data, 65535, 0, $ip, $port)) {
|
||||||
//http://de3.php.net/manual/de/function.socket-listen.php
|
// daten empfangen
|
||||||
// Create a UDP socket
|
$data = substr($data, 0, strlen($data)-1); //ENTER entfernen
|
||||||
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP) or die('Could not create socked ('.socket_strerror(socket_last_error()). ')');
|
echo "\n". gmdate("Y-m-d H:i:s", time()). "\tresive from $ip:$port ". strlen($data). " byte data ($data)\n";
|
||||||
// Bind the socket to an address/port
|
PackedAnalyser( $data);
|
||||||
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);
|
usleep(100000); // 100ms delay keeps the doctor away
|
||||||
|
} // end while
|
||||||
|
|
||||||
/****************************************************************************************************/
|
// disconnect jabber
|
||||||
// Loop continuos
|
if(!DEBUG)
|
||||||
/****************************************************************************************************/
|
$jabber->Disconnect();
|
||||||
$RUNNING = TRUE;
|
|
||||||
while( $RUNNING )
|
// Close the master sockets
|
||||||
{
|
socket_close($sock);
|
||||||
if( @socket_recvfrom($sock, $data, 65535, 0, $ip, $port))
|
|
||||||
{
|
function PackedAnalyser($data) {
|
||||||
//daten empfangen
|
global $jabber, $RUNNING;
|
||||||
$data = substr($data,0, strlen($data)-1); //ENTER entfernen
|
// init array
|
||||||
echo "\n". gmdate("Y-m-d H:i:s", time()). "\tresive from $ip:$port ". strlen($data). " byte data ($data)\n";
|
$matches = array();
|
||||||
PackedAnalyser( $data);
|
|
||||||
}
|
//#message
|
||||||
|
if(preg_match("/^#(message) ([^ ]+) (.+)/i", $data, $matches)) {
|
||||||
usleep(100000); // 100ms delay keeps the doctor away
|
if($matches[2]=="" || $matches[3]=="")
|
||||||
} // end while
|
echo "\t\t\t\t#messaage parameter fail\n";
|
||||||
|
else {
|
||||||
//disconnect jabber
|
// Whisper
|
||||||
if( !DEBUG)
|
if(!DEBUG)
|
||||||
$jabber->Disconnect();
|
$jabber->SendMessage($value, "normal", NULL, array("body" => $message, "subject" => "Error in Pentabarf"), NULL);
|
||||||
|
else
|
||||||
// Close the master sockets
|
echo "\t\t\t\tmessage to:\"". $matches[2]. "\" Text: \"". $matches[3]. "\"\n";
|
||||||
socket_close($sock);
|
}
|
||||||
|
} elseif(preg_match("/^#quit/i", $data, $matches)) {
|
||||||
/****************************************************************************************************/
|
if(DEBUG) {
|
||||||
/****************************************** MAIN END ************************************************/
|
echo "\t\t\t\tSystem Shutdown\n\n";
|
||||||
/****************************************************************************************************/
|
$RUNNING = false;
|
||||||
|
}
|
||||||
|
} else
|
||||||
/****************************************************************************************************/
|
echo "\t\t\t\tcommand not found\n\n";
|
||||||
//***** function PackedAnalyser
|
}
|
||||||
/****************************************************************************************************/
|
|
||||||
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
|
|
||||||
echo "\t\t\t\t#messaage parameter fail\n";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Whisper
|
|
||||||
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)
|
|
||||||
{
|
|
||||||
echo "\t\t\t\tSystem Shutdown\n\n";
|
|
||||||
$RUNNING = FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
echo "\t\t\t\tcommand not found\n\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -1,58 +1,51 @@
|
|||||||
<?PHP
|
<?php
|
||||||
|
include "../../camp2011/includes/config.php";
|
||||||
include ("../../camp2011/includes/config.php");
|
include "../../camp2011/includes/error_handler.php";
|
||||||
include ("../../camp2011/includes/error_handler.php");
|
include "../../camp2011/includes/config_db.php";
|
||||||
include ("../../camp2011/includes/config_db.php");
|
|
||||||
if( !isset($_SESSION)) session_start();
|
if(!isset($_SESSION))
|
||||||
include ("../../camp2011/includes/secure.php");
|
session_start();
|
||||||
|
|
||||||
|
include "../../camp2011/includes/secure.php";
|
||||||
// Parameter check
|
|
||||||
if( !isset($_GET["UID"]) )
|
// Parameter check
|
||||||
$_GET["UID"]= "-1";
|
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)
|
|
||||||
{
|
if(mysql_num_rows($res) == 1) {
|
||||||
//genügend rechte
|
// genuegend rechte
|
||||||
if( !isset($_SESSION['UID']) || $_SESSION['UID'] == -1)
|
if(!isset($_SESSION['UID']) || $_SESSION['UID'] == -1) {
|
||||||
{
|
header("HTTP/1.0 403 Forbidden");
|
||||||
header( "HTTP/1.0 403 Forbidden");
|
die("403 Forbidden");
|
||||||
die( "403 Forbidden");
|
}
|
||||||
}
|
|
||||||
|
// ist das bild sichtbar?
|
||||||
// ist das bild sichtbar?
|
if((mysql_result($res, 0, "show") == "N") AND ($_SESSION['UID']!=$_GET["UID"]) AND ($_SESSION['CVS'][ "admin/UserPicture.php" ] == "N")) {
|
||||||
if( (mysql_result($res, 0, "show")=="N") AND
|
$SQL = "SELECT * FROM `UserPicture` WHERE `UID`='-1'";
|
||||||
($_SESSION['UID']!=$_GET["UID"]) AND
|
$res = mysql_query($SQL, $con);
|
||||||
($_SESSION['CVS'][ "admin/UserPicture.php" ] == "N"))
|
|
||||||
{
|
if(mysql_num_rows($res) != 1) {
|
||||||
$SQL= "SELECT * FROM `UserPicture` WHERE `UID`='-1'";
|
header("HTTP/1.0 404 Not Found");
|
||||||
$res = mysql_query( $SQL, $con);
|
die("404 Not Found");
|
||||||
if( mysql_num_rows($res) != 1)
|
}
|
||||||
{
|
}
|
||||||
header( 'HTTP/1.0 404 Not Found');
|
|
||||||
die( "404 Not Found");
|
// bild aus db auslesen
|
||||||
}
|
$bild = mysql_result($res, 0, "Bild");
|
||||||
}
|
|
||||||
|
// ausgabe bild
|
||||||
/// bild aus db auslesen
|
header("Accept-Ranges: bytes");
|
||||||
$bild = mysql_result($res, 0, "Bild");
|
header("Content-Length: " . strlen($bild));
|
||||||
|
header("Content-type: " . mysql_result($res, 0, "ContentType"));
|
||||||
// ausgabe bild
|
header("Cache-control: public");
|
||||||
header( "Accept-Ranges: bytes");
|
header("Cache-request-directive: min-fresh = 120");
|
||||||
header( "Content-Length: ". strlen($bild));
|
header("Cache-request-directive: max-age = 360");
|
||||||
header( "Content-type: ". mysql_result($res, 0, "ContentType"));
|
echo $bild;
|
||||||
header( "Cache-control: public");
|
} else {
|
||||||
header( "Cache-request-directive: min-fresh = 120");
|
header("HTTP/1.0 404 Not Found");
|
||||||
header( "Cache-request-directive: max-age = 360");
|
die( "404 Not Found");
|
||||||
echo $bild;
|
}
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
header( 'HTTP/1.0 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,214 +1,181 @@
|
|||||||
<?PHP
|
<?php
|
||||||
$title = "Anmeldung zum Chaos-Engel";
|
$title = "Anmeldung zum Chaos-Engel";
|
||||||
$header = "";
|
$header = "";
|
||||||
$success = "none";
|
$success = "none";
|
||||||
include ("../../camp2011/includes/config.php");
|
|
||||||
include ("../../camp2011/includes/header.php");
|
include "../../camp2011/includes/config.php";
|
||||||
include ("../../camp2011/includes/config_db.php");
|
include "../../camp2011/includes/header.php";
|
||||||
include ("../../camp2011/includes/crypt.php");
|
include "../../camp2011/includes/config_db.php";
|
||||||
|
include "../../camp2011/includes/crypt.php";
|
||||||
|
|
||||||
if( isset($_POST["send"]))
|
if(isset($_POST["send"])) {
|
||||||
{
|
$eNick = trim($_POST["Nick"]);
|
||||||
$eNick = trim($_POST["Nick"]);
|
|
||||||
if( $_POST["Alter"]=="") $_POST["Alter"] = 0;
|
if($_POST["Alter"] == "")
|
||||||
|
$_POST["Alter"] = 0;
|
||||||
//user vorhanden?
|
|
||||||
$SQLans = "SELECT UID FROM `User` WHERE `Nick`='". $_POST["Nick"]. "'";
|
// user vorhanden?
|
||||||
$Ergans = mysql_query($SQLans, $con);
|
$SQLans = "SELECT UID FROM `User` WHERE `Nick`='" . $_POST["Nick"] . "'";
|
||||||
|
$Ergans = mysql_query($SQLans, $con);
|
||||||
if( strlen($_POST["Nick"]) < 2 )
|
|
||||||
{
|
if(strlen($_POST["Nick"]) < 2)
|
||||||
$error= Get_Text("makeuser_error_nick1"). $_POST["Nick"]. Get_Text("makeuser_error_nick2");
|
$error = Get_Text("makeuser_error_nick1") . $_POST["Nick"] . Get_Text("makeuser_error_nick2");
|
||||||
}
|
elseif(mysql_num_rows( $Ergans) > 0)
|
||||||
elseif( mysql_num_rows( $Ergans) > 0)
|
$error = Get_Text("makeuser_error_nick1") . $_POST["Nick"] . Get_Text("makeuser_error_nick3");
|
||||||
{
|
elseif(strlen($_POST["email"]) <= 6 && strstr($_POST["email"], "@") == FALSE && strstr($_POST["email"], ".") == false)
|
||||||
$error= Get_Text("makeuser_error_nick1"). $_POST["Nick"]. Get_Text("makeuser_error_nick3");
|
$error = Get_Text("makeuser_error_mail");
|
||||||
}
|
elseif(!is_numeric($_POST["Alter"]))
|
||||||
elseif( strlen($_POST["email"]) <= 6 && strstr($_POST["email"], "@") == FALSE &&
|
$error = Get_Text("makeuser_error_Alter");
|
||||||
strstr($_POST["email"], ".") == FALSE )
|
elseif($_POST["Passwort"] != $_POST["Passwort2"])
|
||||||
{
|
$error = Get_Text("makeuser_error_password1");
|
||||||
$error= Get_Text("makeuser_error_mail");
|
elseif(strlen($_POST["Passwort"]) < 6)
|
||||||
}
|
$error = Get_Text("makeuser_error_password2");
|
||||||
elseif( !is_numeric($_POST["Alter"]))
|
else {
|
||||||
{
|
$_POST["Passwort"] = PassCrypt($_POST["Passwort"]);
|
||||||
$error= Get_Text("makeuser_error_Alter");
|
unset($_POST["Passwort2"]);
|
||||||
}
|
|
||||||
elseif( $_POST["Passwort"] != $_POST["Passwort2"] )
|
$SQL = "INSERT INTO `User` (".
|
||||||
{
|
"`Nick` , ". "`Name` , ".
|
||||||
$error= Get_Text("makeuser_error_password1");
|
"`Vorname`, ". "`Alter` , ".
|
||||||
}
|
"`Telefon`, ". "`DECT`, ".
|
||||||
elseif( strlen($_POST["Passwort"]) < 6 )
|
"`Handy`, ". "`email`, ".
|
||||||
{
|
"`ICQ`, ". "`jabber`, ".
|
||||||
$error= Get_Text("makeuser_error_password2");
|
"`Size`, ". "`Passwort`, ".
|
||||||
}
|
"`Art` , ". "`kommentar`, ".
|
||||||
else
|
"`Hometown`,". "`CreateDate` ) ".
|
||||||
{
|
"VALUES ( ".
|
||||||
$_POST["Passwort"] = PassCrypt($_POST["Passwort"]);
|
"'". $_POST["Nick"]. "', ". "'". $_POST["Name"]. "', ".
|
||||||
unset($_POST["Passwort2"]);
|
"'". $_POST["Vorname"]. "', ". "'". $_POST["Alter"]. "', ".
|
||||||
|
"'". $_POST["Telefon"]. "', ". "'". $_POST["DECT"]. "', ".
|
||||||
$SQL = "INSERT INTO `User` (".
|
"'". $_POST["Handy"]. "', ". "'". $_POST["email"]. "', ".
|
||||||
"`Nick` , ". "`Name` , ".
|
"'". $_POST["ICQ"]. "', ". "'". $_POST["jabber"]. "', ".
|
||||||
"`Vorname`, ". "`Alter` , ".
|
"'". $_POST["Size"]. "', ". "'". $_POST["Passwort"]. "', ".
|
||||||
"`Telefon`, ". "`DECT`, ".
|
"'". $_POST["Art"]. "', ". "'". $_POST["kommentar"]. "', ".
|
||||||
"`Handy`, ". "`email`, ".
|
"'". $_POST["Hometown"]. "',". "NOW());";
|
||||||
"`ICQ`, ". "`jabber`, ".
|
$Erg = mysql_query($SQL, $con);
|
||||||
"`Size`, ". "`Passwort`, ".
|
|
||||||
"`Art` , ". "`kommentar`, ".
|
if ($Erg != 1) {
|
||||||
"`Hometown`,". "`CreateDate` ) ".
|
echo Get_Text("makeuser_error_write1") . "<br />\n";
|
||||||
"VALUES ( ".
|
$error = mysql_error($con);
|
||||||
"'". $_POST["Nick"]. "', ". "'". $_POST["Name"]. "', ".
|
} else {
|
||||||
"'". $_POST["Vorname"]. "', ". "'". $_POST["Alter"]. "', ".
|
echo "<p class=\"important\">" . Get_Text("makeuser_writeOK") . "\n";
|
||||||
"'". $_POST["Telefon"]. "', ". "'". $_POST["DECT"]. "', ".
|
|
||||||
"'". $_POST["Handy"]. "', ". "'". $_POST["email"]. "', ".
|
$SQL2 = "SELECT `UID` FROM `User` WHERE `Nick`='" . $_POST["Nick"] . "';";
|
||||||
"'". $_POST["ICQ"]. "', ". "'". $_POST["jabber"]. "', ".
|
$Erg2 = mysql_query($SQL2, $con);
|
||||||
"'". $_POST["Size"]. "', ". "'". $_POST["Passwort"]. "', ".
|
$Data = mysql_fetch_array($Erg2);
|
||||||
"'". $_POST["Art"]. "', ". "'". $_POST["kommentar"]. "', ".
|
|
||||||
"'". $_POST["Hometown"]. "',". "NOW());";
|
$SQL3 = "INSERT INTO `UserCVS` (`UID`) VALUES ('" . $Data["UID"] . "');";
|
||||||
$Erg = mysql_query($SQL, $con);
|
$Erg3 = mysql_query($SQL3, $con);
|
||||||
|
|
||||||
if ($Erg != 1)
|
if ($Erg3 != 1) {
|
||||||
{
|
echo "<h1>". Get_Text("makeuser_error_write2"). "<br />\n";
|
||||||
echo Get_Text("makeuser_error_write1"). "<br>\n";
|
$error = mysql_error($con);
|
||||||
$error = mysql_error($con);
|
} else {
|
||||||
}
|
echo Get_Text("makeuser_writeOK2") . "<br />\n";
|
||||||
else
|
echo "<h1>" . Get_Text("makeuser_writeOK3") . "</h1>\n";
|
||||||
{
|
}
|
||||||
echo "<p class=\"important\">". Get_Text("makeuser_writeOK"). "\n";
|
|
||||||
|
echo Get_Text("makeuser_writeOK4") . "</p><p></p>\n<br /><br />\n";
|
||||||
$SQL2 = "SELECT `UID` FROM `User` WHERE `Nick`='". $_POST["Nick"]. "';";
|
$success = "any";
|
||||||
$Erg2 = mysql_query($SQL2, $con);
|
|
||||||
$Data = mysql_fetch_array($Erg2);
|
|
||||||
|
|
||||||
$SQL3 = "INSERT INTO `UserCVS` (`UID`) VALUES ('". $Data["UID"]. "');";
|
|
||||||
$Erg3 = mysql_query($SQL3, $con);
|
|
||||||
if ($Erg3 != 1)
|
|
||||||
{
|
|
||||||
echo "<h1>". Get_Text("makeuser_error_write2"). "<br>\n";
|
|
||||||
$error = mysql_error($con);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
echo Get_Text("makeuser_writeOK2"). "<br>\n";
|
|
||||||
echo "<h1>". Get_Text("makeuser_writeOK3"). "</h1>\n";
|
|
||||||
}
|
|
||||||
echo Get_Text("makeuser_writeOK4"). "</p><p></p>\n<br><br>\n";
|
|
||||||
$success="any";
|
|
||||||
|
|
||||||
if ( isset($SubscribeMailinglist) )
|
|
||||||
{
|
|
||||||
if ( $_POST["subscribe-mailinglist"] == "")
|
|
||||||
{
|
|
||||||
$headers = "From: ". $_POST["email"]. "\r\n" .
|
|
||||||
"X-Mailer: PHP/" . phpversion();
|
|
||||||
mail( $SubscribeMailinglist, "subject", "message", $headers);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if( isset($error) ){
|
|
||||||
echo "<p class=\"warning\">\n$error\n</p>\n\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//init vars
|
|
||||||
$_POST["Nick"] = "";
|
|
||||||
$_POST["Name"] = "";
|
|
||||||
$_POST["Vorname"] = "";
|
|
||||||
$_POST["Alter"] = "";
|
|
||||||
$_POST["Telefon"] = "";
|
|
||||||
$_POST["DECT"] = "";
|
|
||||||
$_POST["Handy"] = "";
|
|
||||||
$_POST["email"] = "";
|
|
||||||
$_POST["subscribe-mailinglist"] = "";
|
|
||||||
$_POST["ICQ"] = "";
|
|
||||||
$_POST["jabber"] = "";
|
|
||||||
$_POST["Size"] = "L";
|
|
||||||
$_POST["Art"] = "";
|
|
||||||
$_POST["kommentar"] = "";
|
|
||||||
$_POST["Hometown"] = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
if( $success=="none" ){
|
|
||||||
echo "<h1>".Get_Text("makeuser_text0")."</h1>". "<h2>". Get_Text("makeuser_text1"). "</h2>";
|
|
||||||
echo "\t<form action=\"\" method=\"post\">\n";
|
|
||||||
echo "\t\t<table>\n";
|
|
||||||
echo "\t\t\t<tr><td>". Get_Text("makeuser_Nickname").
|
|
||||||
"*</td><td><input type=\"text\" size=\"40\" name=\"Nick\" value=\"". $_POST["Nick"]. "\"></td></tr>\n";
|
|
||||||
echo "\t\t\t<tr><td>". Get_Text("makeuser_Nachname").
|
|
||||||
"</td><td><input type=\"text\" size=\"40\" name=\"Name\" value=\"". $_POST["Name"]. "\"></td></tr>\n";
|
|
||||||
echo "\t\t\t<tr><td>". Get_Text("makeuser_Vorname").
|
|
||||||
"</td><td><input type=\"text\" size=\"40\" name=\"Vorname\" value=\"". $_POST["Vorname"]. "\"></td></tr>\n";
|
|
||||||
echo "\t\t\t<tr><td>". Get_Text("makeuser_Alter").
|
|
||||||
"</td><td><input type=\"text\" size=\"40\" name=\"Alter\" value=\"". $_POST["Alter"]. "\"></td></tr>\n";
|
|
||||||
echo "\t\t\t<tr><td>". Get_Text("makeuser_Telefon").
|
|
||||||
"</td><td><input type=\"text\" size=\"40\" name=\"Telefon\" value=\"". $_POST["Telefon"]. "\"></td></tr>\n";
|
|
||||||
echo "\t\t\t<tr><td>". Get_Text("makeuser_DECT").
|
|
||||||
"</td><td><input type=\"text\" size=\"40\" name=\"DECT\" value=\"". $_POST["DECT"]. "\"></td><td>\n";
|
|
||||||
echo "\t\t\t<!--a href=\"https://21c3.ccc.de/wiki/index.php/POC\"><img src=\"./pic/external.png\" alt=\"external: \">DECT</a--></td></tr>\n";
|
|
||||||
echo "\t\t\t<tr><td>". Get_Text("makeuser_Handy").
|
|
||||||
"</td><td><input type=\"text\" size=\"40\" name=\"Handy\" value=\"". $_POST["Handy"]. "\"></td></tr>\n";
|
|
||||||
echo "\t\t\t<tr><td>". Get_Text("makeuser_E-Mail").
|
|
||||||
"*</td><td><input type=\"text\" size=\"40\" name=\"email\" value=\"". $_POST["email"]. "\"></td></tr>\n";
|
|
||||||
if ( isset($SubscribeMailinglist) )
|
|
||||||
{
|
|
||||||
echo "\t\t\t<tr><td>". Get_Text("makeuser_subscribe-mailinglist").
|
|
||||||
"</td><td><input type=\"checkbox\" name=\"subscribe-mailinglist\" value=\"". $_POST["subscribe-mailinglist"]. "\">($SubscribeMailinglist)</td></tr>\n";
|
|
||||||
}
|
|
||||||
echo "\t\t\t<tr><td>ICQ</td><td><input type=\"text\" size=\"40\" name=\"ICQ\" value=\"". $_POST["ICQ"]. "\"></td></tr>\n";
|
|
||||||
echo "\t\t\t<tr><td>jabber</td><td><input type=\"text\" size=\"40\" name=\"jabber\" value=\"". $_POST["jabber"]. "\"></td></tr>\n";
|
|
||||||
echo "\t\t\t<tr><td>". Get_Text("makeuser_T-Shirt").
|
|
||||||
" Grösse*</td><td align=\"left\">\n";
|
|
||||||
echo "\t\t\t<select name=\"Size\">\n";
|
|
||||||
echo "\t\t\t\t<option value=\"S\""; if ($_POST["Size"]=="S") echo " selected"; echo ">S</option>\n";
|
|
||||||
echo "\t\t\t\t<option value=\"M\""; if ($_POST["Size"]=="M") echo " selected"; echo ">M</option>\n";
|
|
||||||
echo "\t\t\t\t<option value=\"L\""; if ($_POST["Size"]=="L") echo " selected"; echo ">L</option>\n";
|
|
||||||
echo "\t\t\t\t<option value=\"XL\""; if ($_POST["Size"]=="XL") echo " selected"; echo ">XL</option>\n";
|
|
||||||
echo "\t\t\t\t<option value=\"2XL\""; if ($_POST["Size"]=="2XL") echo " selected"; echo ">2XL</option>\n";
|
|
||||||
echo "\t\t\t\t<option value=\"3XL\""; if ($_POST["Size"]=="3XL") echo " selected"; echo ">3XL</option>\n";
|
|
||||||
echo "\t\t\t\t<option value=\"4XL\""; if ($_POST["Size"]=="4XL") echo " selected"; echo ">4XL</option>\n";
|
|
||||||
echo "\t\t\t\t<option value=\"5XL\""; if ($_POST["Size"]=="5XL") echo " selected"; echo ">5XL</option>\n";
|
|
||||||
echo "\t\t\t\t<option value=\"S-G\""; if ($_POST["Size"]=="S-G") echo " selected"; echo ">S Girl</option>\n";
|
|
||||||
echo "\t\t\t\t<option value=\"M-G\""; if ($_POST["Size"]=="M-G") echo " selected"; echo ">M Girl</option>\n";
|
|
||||||
echo "\t\t\t\t<option value=\"L-G\""; if ($_POST["Size"]=="L-G") echo " selected"; echo ">L Girl</option>\n";
|
|
||||||
echo "\t\t\t\t<option value=\"XL-G\""; if ($_POST["Size"]=="XL-G") echo " selected"; echo ">XL Girl</option>\n";
|
|
||||||
echo "\t\t\t</select>\n";
|
|
||||||
echo "\t\t\t</td></tr>\n";
|
|
||||||
echo "\t\t\t<tr><td>". Get_Text("makeuser_Engelart").
|
|
||||||
"</td><td align=\"left\">\n";
|
|
||||||
echo "\t\t\t<select name=\"Art\">\n";
|
|
||||||
$Sql = "SELECT * FROM `EngelType` ORDER BY `NAME`";
|
|
||||||
$Erg = mysql_query($Sql, $con);
|
|
||||||
for( $t = 0; $t < mysql_num_rows($Erg); $t++ )
|
|
||||||
{
|
|
||||||
$Name = mysql_result($Erg, $t, "Name"). Get_Text("inc_schicht_engel");
|
|
||||||
echo "\t\t\t\t<option value=\"$Name\"";
|
|
||||||
if ($_POST["Art"]==$Name)
|
|
||||||
echo " selected";
|
|
||||||
echo ">$Name</option>\n";
|
|
||||||
}
|
|
||||||
echo "\t\t\t</select>\n";
|
|
||||||
echo "\t\t\t</td>\n";
|
|
||||||
echo "\t\t\t</tr>\n";
|
|
||||||
echo "\t\t\t<tr>\n";
|
|
||||||
echo "\t\t\t\t<td>". Get_Text("makeuser_text2"). "</td>\n";
|
|
||||||
echo "\t\t\t<td><textarea rows=\"5\" cols=\"40\" name=\"kommentar\">". $_POST["kommentar"]. "</textarea></td>\n";
|
|
||||||
echo "\t\t\t</tr>\n";
|
|
||||||
echo "\t\t\t<tr><td>". Get_Text("makeuser_Hometown").
|
|
||||||
"</td><td><input type=\"text\" size=\"40\" name=\"Hometown\" value=\"". $_POST["Hometown"]. "\"></td></tr>\n";
|
|
||||||
echo "\t\t\t<tr><td>". Get_Text("makeuser_Passwort").
|
|
||||||
"*</td><td><input type=\"password\" size=\"40\" name=\"Passwort\"/></td></tr>\n";
|
|
||||||
echo "\t\t\t<tr><td>". Get_Text("makeuser_Passwort2").
|
|
||||||
"*</td><td><input type=\"password\" size=\"40\" name=\"Passwort2\"/></td></tr>\n";
|
|
||||||
echo "\t\t\t<tr><td> </td><td><input type=\"submit\" name=\"send\" value=\"".
|
|
||||||
Get_Text("makeuser_Anmelden"). "\"/></td></tr>\n";
|
|
||||||
echo "\t\t</table>\n";
|
|
||||||
echo "\t</form>\n";
|
|
||||||
Print_Text("makeuser_text3");
|
|
||||||
}
|
|
||||||
|
|
||||||
include ("../../camp2011/includes/footer.php");
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
if (isset($SubscribeMailinglist)) {
|
||||||
|
if ($_POST["subscribe-mailinglist"] == "") {
|
||||||
|
$headers = "From: " . $_POST["email"] . "\r\n" .
|
||||||
|
"X-Mailer: PHP/" . phpversion();
|
||||||
|
mail($SubscribeMailinglist, "subject", "message", $headers);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($error))
|
||||||
|
echo "<p class=\"warning\">\n" . $error . "\n</p>\n\n";
|
||||||
|
} else {
|
||||||
|
// init vars
|
||||||
|
$_POST["Nick"] = "";
|
||||||
|
$_POST["Name"] = "";
|
||||||
|
$_POST["Vorname"] = "";
|
||||||
|
$_POST["Alter"] = "";
|
||||||
|
$_POST["Telefon"] = "";
|
||||||
|
$_POST["DECT"] = "";
|
||||||
|
$_POST["Handy"] = "";
|
||||||
|
$_POST["email"] = "";
|
||||||
|
$_POST["subscribe-mailinglist"] = "";
|
||||||
|
$_POST["ICQ"] = "";
|
||||||
|
$_POST["jabber"] = "";
|
||||||
|
$_POST["Size"] = "L";
|
||||||
|
$_POST["Art"] = "";
|
||||||
|
$_POST["kommentar"] = "";
|
||||||
|
$_POST["Hometown"] = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if($success == "none") {
|
||||||
|
echo "<h1>" . Get_Text("makeuser_text0") . "</h1>\n";
|
||||||
|
echo "<h2>" . Get_Text("makeuser_text1") . "</h2>\n";
|
||||||
|
echo "<form action=\"\" method=\"post\">\n";
|
||||||
|
echo "<table>\n";
|
||||||
|
echo "<tr><td>" . Get_Text("makeuser_Nickname") . "*</td><td><input type=\"text\" size=\"40\" name=\"Nick\" value=\"" . $_POST["Nick"] . "\" /></td></tr>\n";
|
||||||
|
echo "<tr><td>" . Get_Text("makeuser_Nachname") . "</td><td><input type=\"text\" size=\"40\" name=\"Name\" value=\"" . $_POST["Name"] . "\" /></td></tr>\n";
|
||||||
|
echo "<tr><td>". Get_Text("makeuser_Vorname") . "</td><td><input type=\"text\" size=\"40\" name=\"Vorname\" value=\"" . $_POST["Vorname"] . "\" /></td></tr>\n";
|
||||||
|
echo "<tr><td>". Get_Text("makeuser_Alter") . "</td><td><input type=\"text\" size=\"40\" name=\"Alter\" value=\"". $_POST["Alter"]. "\"></td></tr>\n";
|
||||||
|
echo "<tr><td>". Get_Text("makeuser_Telefon"). "</td><td><input type=\"text\" size=\"40\" name=\"Telefon\" value=\"". $_POST["Telefon"]. "\"></td></tr>\n";
|
||||||
|
echo "<tr><td>". Get_Text("makeuser_DECT"). "</td><td><input type=\"text\" size=\"40\" name=\"DECT\" value=\"". $_POST["DECT"]. "\"></td><td>\n";
|
||||||
|
echo "<!--a href=\"https://21c3.ccc.de/wiki/index.php/POC\"><img src=\"./pic/external.png\" alt=\"external: \">DECT</a--></td></tr>\n";
|
||||||
|
echo "<tr><td>". Get_Text("makeuser_Handy"). "</td><td><input type=\"text\" size=\"40\" name=\"Handy\" value=\"". $_POST["Handy"]. "\"></td></tr>\n";
|
||||||
|
echo "<tr><td>". Get_Text("makeuser_E-Mail"). "*</td><td><input type=\"text\" size=\"40\" name=\"email\" value=\"". $_POST["email"]. "\"></td></tr>\n";
|
||||||
|
|
||||||
|
if(isset($SubscribeMailinglist))
|
||||||
|
echo "<tr><td>". Get_Text("makeuser_subscribe-mailinglist"). "</td><td><input type=\"checkbox\" name=\"subscribe-mailinglist\" value=\"". $_POST["subscribe-mailinglist"]. "\">($SubscribeMailinglist)</td></tr>\n";
|
||||||
|
|
||||||
|
echo "<tr><td>ICQ</td><td><input type=\"text\" size=\"40\" name=\"ICQ\" value=\"". $_POST["ICQ"]. "\"></td></tr>\n";
|
||||||
|
echo "<tr><td>jabber</td><td><input type=\"text\" size=\"40\" name=\"jabber\" value=\"". $_POST["jabber"]. "\"></td></tr>\n";
|
||||||
|
echo "<tr><td>". Get_Text("makeuser_T-Shirt"). " Grösse*</td><td align=\"left\">\n";
|
||||||
|
echo "<select name=\"Size\">\n";
|
||||||
|
echo "<option value=\"S\""; if ($_POST["Size"]=="S") echo " selected"; echo ">S</option>\n";
|
||||||
|
echo "<option value=\"M\""; if ($_POST["Size"]=="M") echo " selected"; echo ">M</option>\n";
|
||||||
|
echo "<option value=\"L\""; if ($_POST["Size"]=="L") echo " selected"; echo ">L</option>\n";
|
||||||
|
echo "<option value=\"XL\""; if ($_POST["Size"]=="XL") echo " selected"; echo ">XL</option>\n";
|
||||||
|
echo "<option value=\"2XL\""; if ($_POST["Size"]=="2XL") echo " selected"; echo ">2XL</option>\n";
|
||||||
|
echo "<option value=\"3XL\""; if ($_POST["Size"]=="3XL") echo " selected"; echo ">3XL</option>\n";
|
||||||
|
echo "<option value=\"4XL\""; if ($_POST["Size"]=="4XL") echo " selected"; echo ">4XL</option>\n";
|
||||||
|
echo "<option value=\"5XL\""; if ($_POST["Size"]=="5XL") echo " selected"; echo ">5XL</option>\n";
|
||||||
|
echo "<option value=\"S-G\""; if ($_POST["Size"]=="S-G") echo " selected"; echo ">S Girl</option>\n";
|
||||||
|
echo "<option value=\"M-G\""; if ($_POST["Size"]=="M-G") echo " selected"; echo ">M Girl</option>\n";
|
||||||
|
echo "<option value=\"L-G\""; if ($_POST["Size"]=="L-G") echo " selected"; echo ">L Girl</option>\n";
|
||||||
|
echo "<option value=\"XL-G\""; if ($_POST["Size"]=="XL-G") echo " selected"; echo ">XL Girl</option>\n";
|
||||||
|
echo "</select>\n";
|
||||||
|
echo "</td></tr>\n";
|
||||||
|
echo "<tr><td>". Get_Text("makeuser_Engelart"). "</td><td align=\"left\">\n";
|
||||||
|
echo "<select name=\"Art\">\n";
|
||||||
|
|
||||||
|
$Sql = "SELECT * FROM `EngelType` ORDER BY `NAME`";
|
||||||
|
$Erg = mysql_query($Sql, $con);
|
||||||
|
|
||||||
|
for($t = 0; $t < mysql_num_rows($Erg); $t++) {
|
||||||
|
$Name = mysql_result($Erg, $t, "Name"). Get_Text("inc_schicht_engel");
|
||||||
|
echo "<option value=\"" . $Name . "\"";
|
||||||
|
|
||||||
|
if($_POST["Art"]==$Name)
|
||||||
|
echo " selected";
|
||||||
|
|
||||||
|
echo ">$Name</option>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "</select>\n";
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo "<td>". Get_Text("makeuser_text2"). "</td>\n";
|
||||||
|
echo "<td><textarea rows=\"5\" cols=\"40\" name=\"kommentar\">". $_POST["kommentar"]. "</textarea></td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
echo "<tr><td>". Get_Text("makeuser_Hometown"). "</td><td><input type=\"text\" size=\"40\" name=\"Hometown\" value=\"". $_POST["Hometown"]. "\"></td></tr>\n";
|
||||||
|
echo "<tr><td>". Get_Text("makeuser_Passwort"). "*</td><td><input type=\"password\" size=\"40\" name=\"Passwort\"/></td></tr>\n";
|
||||||
|
echo "<tr><td>". Get_Text("makeuser_Passwort2"). "*</td><td><input type=\"password\" size=\"40\" name=\"Passwort2\"/></td></tr>\n";
|
||||||
|
echo "<tr><td> </td><td><input type=\"submit\" name=\"send\" value=\"". Get_Text("makeuser_Anmelden"). "\"/></td></tr>\n";
|
||||||
|
echo "</table>\n";
|
||||||
|
echo "</form>\n";
|
||||||
|
Print_Text("makeuser_text3");
|
||||||
|
}
|
||||||
|
|
||||||
|
include "../../camp2011/includes/footer.php";
|
||||||
|
?>
|
||||||
|
@ -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