fixes
parent
12e0b0d809
commit
75448045cf
@ -1,11 +1,10 @@
|
||||
<?PHP
|
||||
<?php
|
||||
// ist ein modem angeschlossen
|
||||
$ModemEnable = false;
|
||||
|
||||
//ist ein modem angeschlossen
|
||||
$ModemEnable = false;
|
||||
// COM port
|
||||
$ModemDev ="/dev/ttyS0";
|
||||
|
||||
// COM port
|
||||
$ModemDev="/dev/ttyS0";
|
||||
|
||||
// vorwahl, bei tnovis telefonanlage für das programmieren von weckrufen
|
||||
$WackupNumber="**3";
|
||||
// vorwahl, bei tnovis telefonanlage fuer das programmieren von weckrufen
|
||||
$WakeupNumber="**3";
|
||||
?>
|
||||
|
@ -1,103 +1,79 @@
|
||||
<?php
|
||||
|
||||
|
||||
if( !isset($_SESSION['UID']))
|
||||
$_SESSION['UID'] = -1;
|
||||
|
||||
// CVS import Data
|
||||
$SQL_CVS = "SELECT * FROM `UserCVS` WHERE UID=".$_SESSION['UID'];
|
||||
$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" ];
|
||||
$Erg_GRP = mysql_query($SQL_GRP, $con);
|
||||
$_SESSION['CVS_Group'] = mysql_fetch_array($Erg_GRP);
|
||||
|
||||
foreach( $_SESSION['CVS'] as $k => $v)
|
||||
{
|
||||
if($v=="G") // Right == Group
|
||||
$_SESSION['CVS'][$k] = $_SESSION['CVS_Group'][$k];
|
||||
}
|
||||
}
|
||||
|
||||
//pagename ermitteln
|
||||
$Page["Name"] = substr( $_SERVER['PHP_SELF'], strlen($ENGEL_ROOT) );
|
||||
|
||||
//recht f?r diese seite auslesen
|
||||
if( isset( $_SESSION['CVS'][ $Page["Name"] ]))
|
||||
$Page["CVS"] = $_SESSION['CVS'][ $Page["Name"] ];
|
||||
else
|
||||
{
|
||||
echo "SYSTEM ERROR: now right for ". $Page["Name"]. "exist";
|
||||
die;
|
||||
}
|
||||
|
||||
if( $DEBUG )
|
||||
{
|
||||
// foreach( $_SESSION as $k => $v)
|
||||
// echo "$k = $v<br>\n";
|
||||
echo "<pre>\$_SESSION:\n";
|
||||
print_r($_SESSION);
|
||||
echo "</pre>";
|
||||
|
||||
if( strlen($Page["CVS"]) == 0 )
|
||||
echo "<h1><u> CVS ERROR, on page '". $Page["Name"]. "'</u></h1>";
|
||||
else
|
||||
echo "CVS: ". $Page["Name"]. " => '". $Page["CVS"]. "'<br>";
|
||||
|
||||
}
|
||||
|
||||
function funktion_isLinkAllowed( $PageName)
|
||||
{
|
||||
global $_SESSION;
|
||||
|
||||
// separate page parameter
|
||||
$ParameterPos = strpos( $PageName, ".php?");
|
||||
if( $ParameterPos === FALSE)
|
||||
{
|
||||
$pName = $PageName;
|
||||
}
|
||||
else
|
||||
{
|
||||
$pName = substr( $PageName, 0, $ParameterPos + 4);
|
||||
}
|
||||
|
||||
// check rights
|
||||
if( (isset( $_SESSION['CVS'][ $pName ]) === TRUE) &&
|
||||
($_SESSION['CVS'][ $pName ] == "Y") )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
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 "";
|
||||
}
|
||||
|
||||
if(!isset($_SESSION['UID']))
|
||||
$_SESSION['UID'] = -1;
|
||||
|
||||
// CVS import Data
|
||||
$SQL_CVS = "SELECT * FROM `UserCVS` WHERE UID=" . $_SESSION['UID'];
|
||||
$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" ];
|
||||
$Erg_GRP = mysql_query($SQL_GRP, $con);
|
||||
$_SESSION['CVS_Group'] = mysql_fetch_array($Erg_GRP);
|
||||
|
||||
foreach($_SESSION['CVS'] as $k => $v) {
|
||||
if($v == "G")
|
||||
$_SESSION['CVS'][$k] = $_SESSION['CVS_Group'][$k];
|
||||
}
|
||||
}
|
||||
|
||||
// pagename ermitteln
|
||||
$Page["Name"] = basename($_SERVER['PHP_SELF']);
|
||||
|
||||
//recht fuer diese seite auslesen
|
||||
if(isset($_SESSION['CVS'][$Page["Name"]]))
|
||||
$Page["CVS"] = $_SESSION['CVS'][$Page["Name"]];
|
||||
else {
|
||||
echo "SYSTEM ERROR: now right for " . $Page["Name"] . " exists.";
|
||||
die;
|
||||
}
|
||||
|
||||
if($debug) {
|
||||
echo "<pre>\$_SESSION:\n";
|
||||
print_r($_SESSION);
|
||||
echo "</pre>";
|
||||
|
||||
if( strlen($Page["CVS"]) == 0 )
|
||||
echo "<h1><u> CVS ERROR, on page '". $Page["Name"]. "'</u></h1>";
|
||||
else
|
||||
echo "CVS: ". $Page["Name"]. " => '". $Page["CVS"]. "'<br />";
|
||||
}
|
||||
|
||||
function funktion_isLinkAllowed($PageName) {
|
||||
global $_SESSION;
|
||||
|
||||
// separate page parameter
|
||||
$ParameterPos = strpos($PageName, ".php?");
|
||||
|
||||
if($ParameterPos === false)
|
||||
$pName = $PageName;
|
||||
else
|
||||
$pName = substr($PageName, 0, $ParameterPos + 4);
|
||||
|
||||
// check rights
|
||||
if((isset( $_SESSION['CVS'][ $pName ]) === true) && $_SESSION['CVS'][ $pName ] == "Y")
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
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 @@
|
||||
<?
|
||||
// Set the ip and port we will listen on
|
||||
define( SERVER_ADDRESS, "127.0.0.1" );
|
||||
define( SERVER_PORT, 9000 );
|
||||
|
||||
define( DEBUG, TRUE);
|
||||
<?php
|
||||
// Set the ip and port we will listen on
|
||||
define(SERVER_ADDRESS, "127.0.0.1");
|
||||
define(SERVER_PORT, 9000);
|
||||
|
||||
define(DEBUG, true);
|
||||
?>
|
||||
|
@ -1,11 +1,10 @@
|
||||
<?PHP
|
||||
<?php
|
||||
// ist ein modem angeschlossen
|
||||
$ModemEnable = false;
|
||||
|
||||
//ist ein modem angeschlossen
|
||||
$ModemEnable = false;
|
||||
// COM port
|
||||
$ModemDev = "/dev/ttyS0";
|
||||
|
||||
// COM port
|
||||
$ModemDev="/dev/ttyS0";
|
||||
|
||||
// vorwahl, bei tnovis telefonanlage für das programmieren von weckrufen
|
||||
$WackupNumber="**3";
|
||||
// vorwahl, bei tnovis telefonanlage fuer das programmieren von weckrufen
|
||||
$WakeupNumber = "**3";
|
||||
?>
|
||||
|
@ -1,18 +1,12 @@
|
||||
<?php
|
||||
|
||||
|
||||
function PassCrypt($passwort) {
|
||||
include "config.php";
|
||||
|
||||
switch ($crypt_system) {
|
||||
case "crypt":
|
||||
return "{crypt}".crypt($passwort, "77");
|
||||
case "md5":
|
||||
return md5($passwort);
|
||||
function PassCrypt($passwort) {
|
||||
include "config.php";
|
||||
|
||||
switch ($crypt_system) {
|
||||
case "crypt":
|
||||
return "{crypt}" . crypt($passwort, "77");
|
||||
case "md5":
|
||||
return md5($passwort);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
@ -1,57 +1,39 @@
|
||||
<?PHP
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<!-- anfang des footers //-->
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<p align="center">
|
||||
<?PHP If (IsSet($_SESSION['oldurl']))
|
||||
echo "<a href=\"". $_SESSION["oldurl"]. "\">".Get_Text("back")."</a> ";
|
||||
?>
|
||||
<a href="#top"><?PHP echo Get_Text("top"); ?></a>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<br />
|
||||
<p align="center">
|
||||
<?php if(IsSet($_SESSION['oldurl']))
|
||||
echo "<a href=\"" . $_SESSION["oldurl"] . "\">" . Get_Text("back") . "</a> ";
|
||||
?>
|
||||
<a href="#top"><?php echo Get_Text("top"); ?></a>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
<!-- anfang des menue parts //-->
|
||||
<?PHP
|
||||
if( $_SESSION['Menu'] =="R") include("menu.php");
|
||||
<?php
|
||||
if($_SESSION['Menu'] == "R")
|
||||
include("menu.php");
|
||||
?>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
<!-- ende des menue parts //-->
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<h5 align="center"> © copyleft - <a href="mailto:erzengel@lists.ccc.de">Kontakt</a>
|
||||
<?PHP
|
||||
include( "funktion_counter.php");
|
||||
include( "funktion_flag.php");
|
||||
?></h5>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<h5 align="center"> © copyleft - <a href="mailto:erzengel@lists.ccc.de">Kontakt</a>
|
||||
<?php
|
||||
include("funktion_counter.php");
|
||||
include("funktion_flag.php");
|
||||
?></h5>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- </div> -->
|
||||
<?php mysql_close($con); ?>
|
||||
</div>
|
||||
|
||||
<!-- </div> -->
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,18 +1,14 @@
|
||||
<?php
|
||||
|
||||
|
||||
function SendData($Data)
|
||||
{
|
||||
include("config_MessegeServer.php");
|
||||
// Create a UDP socket
|
||||
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
|
||||
//send packed
|
||||
socket_sendto($sock, $Data, 9999, 0x4, SERVER_ADDRESS, SERVER_PORT);
|
||||
}
|
||||
|
||||
function SendMessageJabber($Adresse, $Nachricht)
|
||||
{
|
||||
SendData( "#message $Adresse $Nachricht");
|
||||
}
|
||||
|
||||
function SendData($Data) {
|
||||
include "config_MessegeServer.php";
|
||||
// Create a UDP socket
|
||||
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
|
||||
|
||||
//send packed
|
||||
socket_sendto($sock, $Data, 9999, 0x4, SERVER_ADDRESS, SERVER_PORT);
|
||||
}
|
||||
|
||||
function SendMessageJabber($Adresse, $Nachricht) {
|
||||
SendData( "#message $Adresse $Nachricht");
|
||||
}
|
||||
?>
|
||||
|
@ -1,59 +1,57 @@
|
||||
<?PHP
|
||||
|
||||
// Functionen gibt es nicht auf ellen rechern
|
||||
if( !function_exists("bcdiv"))
|
||||
{
|
||||
function bcdiv( $param1, $param2)
|
||||
{
|
||||
return floor( $param1 / $param2);
|
||||
}
|
||||
}
|
||||
|
||||
if( !function_exists("bcmod"))
|
||||
{
|
||||
function bcmod( $param1, $param2)
|
||||
{
|
||||
return $param1 - ( $param2 * bcdiv( $param1, $param2));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo "<h4 class=\"menu\">Engel online</h4>";
|
||||
|
||||
$SQL = "SELECT UID, Nick, lastLogIn ".
|
||||
"FROM User ".
|
||||
"WHERE (`lastLogIn` > '". gmdate("YmdHis", time()-(60*60)). "' AND NOT (UID=". $_SESSION['UID']. ")) ".
|
||||
"ORDER BY lastLogIn DESC;";
|
||||
|
||||
$Erg = mysql_query( $SQL, $con);
|
||||
|
||||
|
||||
$Tist = (gmdate("d", time()) * 60 * 60 * 24) + // Tag
|
||||
(gmdate("H", time()) * 60 * 60) + // Stunde
|
||||
(gmdate("i", time()) * 60) + // Minute
|
||||
(gmdate("s", time()) ); // Sekunde
|
||||
|
||||
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";
|
||||
}
|
||||
<?php
|
||||
// Funktionen gibt es nicht auf allen Rechnern
|
||||
if(!function_exists("bcdiv")) {
|
||||
function bcdiv( $param1, $param2) {
|
||||
return floor( $param1 / $param2);
|
||||
}
|
||||
}
|
||||
|
||||
if(!function_exists("bcmod")) {
|
||||
function bcmod( $param1, $param2) {
|
||||
return $param1 - ( $param2 * bcdiv( $param1, $param2));
|
||||
}
|
||||
}
|
||||
|
||||
echo "<h4 class=\"menu\">Engel online</h4>";
|
||||
|
||||
$SQL = "SELECT UID, Nick, lastLogIn " .
|
||||
"FROM User " .
|
||||
"WHERE (`lastLogIn` > '" . gmdate("YmdHis", time() - (60 * 60)) . "' AND NOT (UID=" . $_SESSION['UID'] . ")) " .
|
||||
"ORDER BY lastLogIn DESC;";
|
||||
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
$Tist = (gmdate("d", time()) * 60 * 60 * 24) + // Tag
|
||||
(gmdate("H", time()) * 60 * 60) + // Stunde
|
||||
(gmdate("i", time()) * 60) + // Minute
|
||||
(gmdate("s", time()) ); // Sekunde
|
||||
|
||||
echo "<ul>";
|
||||
|
||||
for($i = 0; $i < mysql_num_rows($Erg); $i++) {
|
||||
echo "<li>";
|
||||
|
||||
if($_SESSION['UID'] > 0)
|
||||
echo DisplayAvatar( mysql_result( $Erg, $i, "UID"));
|
||||
|
||||
// Show Admin Page
|
||||
echo funktion_isLinkAllowed_addLink_OrLinkText("admin/userChangeNormal.php?enterUID=" . mysql_result($Erg, $i, "UID") . "&Type=Normal", mysql_result($Erg, $i, "Nick"));
|
||||
|
||||
$Tlog = (substr(mysql_result($Erg, $i, "lastLogIn"), 8, 2) * 60 * 60 * 24) + // Tag
|
||||
(substr(mysql_result($Erg, $i, "lastLogIn"), 11, 2) * 60 * 60) + // Stunde
|
||||
(substr(mysql_result($Erg, $i, "lastLogIn"), 14, 2) * 60) + // Minute
|
||||
(substr(mysql_result($Erg, $i, "lastLogIn"), 17, 2) ); // Sekunde
|
||||
|
||||
$Tlog = $Tist - $Tlog;
|
||||
|
||||
echo " " . bcdiv($Tlog, 60) . ":";
|
||||
|
||||
if(strlen(bcmod($Tlog, 60)) == 1)
|
||||
echo "0";
|
||||
|
||||
echo bcmod($Tlog, 60);
|
||||
echo "</li>\n";
|
||||
}
|
||||
|
||||
echo "</ul>";
|
||||
?>
|
||||
|
@ -1,24 +1,14 @@
|
||||
<?PHP
|
||||
|
||||
$SQL = "SELECT `Anz` FROM `Counter` WHERE `URL`=\"". $Page["Name"]. "\"";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
echo mysql_error($con);
|
||||
|
||||
if(mysql_num_rows($Erg)==0)
|
||||
{
|
||||
// echo "Counter: 1";
|
||||
$SQL = "INSERT INTO `Counter` ( `URL` , `Anz` ) ".
|
||||
"VALUES ('". $Page["Name"]. "', '1');";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
}
|
||||
elseif(mysql_num_rows($Erg)==1)
|
||||
{
|
||||
// echo "Counter: ". (mysql_result($Erg, 0, 0)+1);
|
||||
$SQL = "UPDATE `Counter` SET `Anz` = '". (mysql_result($Erg, 0, 0) +1). "' ".
|
||||
"WHERE `URL` = '". $Page["Name"]. "' LIMIT 1 ;";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
}
|
||||
|
||||
|
||||
<?php
|
||||
$SQL = "SELECT `Anz` FROM `Counter` WHERE `URL`=\"" . $Page["Name"] . "\"";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
echo mysql_error($con);
|
||||
|
||||
if(mysql_num_rows($Erg) == 0) {
|
||||
$SQL = "INSERT INTO `Counter` ( `URL` , `Anz` ) VALUES ('" . $Page["Name"] . "', '1');";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
} elseif(mysql_num_rows($Erg) == 1) {
|
||||
$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
|
||||
|
||||
if( !function_exists("db_query"))
|
||||
{
|
||||
function Ausgabe_Daten($SQL)
|
||||
{
|
||||
global $con;
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
echo mysql_error($con);
|
||||
|
||||
$Zeilen = mysql_num_rows($Erg);
|
||||
$Anzahl_Felder = mysql_num_fields($Erg);
|
||||
|
||||
$Diff = "<table border=1>";
|
||||
$Diff .= "<tr>";
|
||||
for ($m = 0 ; $m < $Anzahl_Felder ; $m++)
|
||||
$Diff .= "<th>". mysql_field_name($Erg, $m). "</th>";
|
||||
$Diff .= "</tr>";
|
||||
|
||||
for ($n = 0 ; $n < $Zeilen ; $n++)
|
||||
{
|
||||
$Diff .= "<tr>";
|
||||
for ($m = 0 ; $m < $Anzahl_Felder ; $m++)
|
||||
$Diff .= "<td>".mysql_result($Erg, $n, $m). "</td>";
|
||||
$Diff .= "</tr>";
|
||||
}
|
||||
$Diff .= "</table>";
|
||||
return $Diff;
|
||||
}
|
||||
|
||||
function db_querry_getDatenAssocArray($SQL)
|
||||
{
|
||||
global $con;
|
||||
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
echo mysql_error($con);
|
||||
|
||||
$Daten = array();
|
||||
for( $i=0; $i<mysql_num_rows($Erg); $i++)
|
||||
$Daten[$i] = mysql_fetch_assoc($Erg);
|
||||
|
||||
return $Daten;
|
||||
}
|
||||
|
||||
function db_querry_diffDaten($Daten1, $Daten2)
|
||||
{
|
||||
$Gefunden=False;
|
||||
|
||||
$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";
|
||||
foreach($Daten1 as $DataKey => $Data1)
|
||||
{
|
||||
if( isset( $Daten2[$DataKey]))
|
||||
{
|
||||
$Data2 = $Daten2[$DataKey];
|
||||
foreach($Data1 as $key => $value)
|
||||
if( $value != $Data2[$key])
|
||||
{
|
||||
$Gefunden=TRUE;
|
||||
$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)
|
||||
{
|
||||
$Gefunden=TRUE;
|
||||
$Diff .= "<tr>\n\t<td>$key</td>\n\t<td>$value</td>\n\t<td></rd>\n</tr>";
|
||||
}
|
||||
}
|
||||
$Diff .= "</table>\n";
|
||||
|
||||
if( $Gefunden)
|
||||
return $Diff;
|
||||
else
|
||||
return "\nno changes Fount\n";
|
||||
}
|
||||
|
||||
function db_query( $SQL, $comment)
|
||||
{
|
||||
global $con, $Page;
|
||||
$Diff = "";
|
||||
|
||||
//commed anlyse udn daten sicherung
|
||||
if( strpos( "#$SQL", "UPDATE") > 0)
|
||||
{
|
||||
//Tabellen name ermitteln
|
||||
$Table_Start = strpos( $SQL, "`");
|
||||
$Table_End = strpos( $SQL, "`", $Table_Start+1);
|
||||
$Table = substr( $SQL, $Table_Start, ($Table_End-$Table_Start+1));
|
||||
|
||||
//SecureTest
|
||||
if( $Table_Start == 0 || $Table_End == 0) die("<h1>funktion_db ERROR SQL: '$SQL' nicht OK</h1>");
|
||||
|
||||
//WHERE ermitteln
|
||||
$Where_Start = strpos( $SQL, "WHERE");
|
||||
$Where = substr( $SQL, $Where_Start);
|
||||
if( $Where_Start == 0) $Where = ";";
|
||||
|
||||
if( strlen( $Where) < 2)
|
||||
{
|
||||
$Diff = "can't show, too mutch data (no filter was set)";
|
||||
$querry_erg = mysql_query($SQL, $con);
|
||||
}
|
||||
else
|
||||
{
|
||||
$Daten1 = db_querry_getDatenAssocArray( "SELECT * FROM $Table $Where");
|
||||
$querry_erg = mysql_query($SQL, $con);
|
||||
$Daten2 = db_querry_getDatenAssocArray( "SELECT * FROM $Table $Where");
|
||||
$Diff = db_querry_diffDaten($Daten1, $Daten2);
|
||||
}
|
||||
}
|
||||
elseif( strpos( "#$SQL", "DELETE") > 0)
|
||||
{
|
||||
$TableWhere = substr( $SQL, 6);
|
||||
$Diff .= Ausgabe_Daten( "SELECT * $TableWhere");
|
||||
|
||||
//execute command
|
||||
$querry_erg = mysql_query($SQL, $con);
|
||||
}
|
||||
elseif( strpos( "#$SQL", "INSERT") > 0)
|
||||
{
|
||||
//execute command
|
||||
$querry_erg = mysql_query($SQL, $con);
|
||||
}
|
||||
else
|
||||
{
|
||||
//execute command
|
||||
$querry_erg = mysql_query($SQL, $con);
|
||||
}
|
||||
|
||||
$SQLCommand = "SQL:<br>". htmlentities( $SQL, ENT_QUOTES);
|
||||
if( strlen($Diff) > 0)
|
||||
$SQLCommand .= "<br><br>Diff:<br>$Diff";
|
||||
|
||||
$Commend = htmlentities( ($Page["Name"]. ": ". $comment), ENT_QUOTES);
|
||||
//LOG commands in DB
|
||||
$SQL_SEC = "INSERT INTO `ChangeLog` ( `UID` , `SQLCommad` , `Commend` ) ".
|
||||
" VALUES ( '". $_SESSION['UID']. "', ".
|
||||
"'". mysql_escape_string( $SQLCommand). "', ".
|
||||
"'". mysql_escape_string( $Commend). "' );";
|
||||
$erg = mysql_query($SQL_SEC, $con);
|
||||
echo mysql_error($con);
|
||||
return $querry_erg;
|
||||
}//function db_query(
|
||||
<?php
|
||||
if( !function_exists("db_query")) {
|
||||
function Ausgabe_Daten($SQL) {
|
||||
global $con;
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
echo mysql_error($con);
|
||||
|
||||
$Zeilen = mysql_num_rows($Erg);
|
||||
$Anzahl_Felder = mysql_num_fields($Erg);
|
||||
|
||||
$Diff = "<table border=1>";
|
||||
$Diff .= "<tr>";
|
||||
|
||||
for ($m = 0 ; $m < $Anzahl_Felder ; $m++)
|
||||
$Diff .= "<th>". mysql_field_name($Erg, $m). "</th>";
|
||||
|
||||
$Diff .= "</tr>";
|
||||
|
||||
for ($n = 0 ; $n < $Zeilen ; $n++) {
|
||||
$Diff .= "<tr>";
|
||||
|
||||
for ($m = 0 ; $m < $Anzahl_Felder ; $m++)
|
||||
$Diff .= "<td>".mysql_result($Erg, $n, $m). "</td>";
|
||||
|
||||
$Diff .= "</tr>";
|
||||
}
|
||||
|
||||
$Diff .= "</table>";
|
||||
return $Diff;
|
||||
}
|
||||
|
||||
function db_querry_getDatenAssocArray($SQL) {
|
||||
global $con;
|
||||
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
echo mysql_error($con);
|
||||
|
||||
$Daten = array();
|
||||
|
||||
for( $i=0; $i<mysql_num_rows($Erg); $i++)
|
||||
$Daten[$i] = mysql_fetch_assoc($Erg);
|
||||
|
||||
return $Daten;
|
||||
}
|
||||
|
||||
function db_querry_diffDaten($Daten1, $Daten2) {
|
||||
$Gefunden = false;
|
||||
|
||||
$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";
|
||||
|
||||
foreach($Daten1 as $DataKey => $Data1) {
|
||||
if(isset( $Daten2[$DataKey])) {
|
||||
$Data2 = $Daten2[$DataKey];
|
||||
|
||||
foreach($Data1 as $key => $value)
|
||||
if( $value != $Data2[$key]) {
|
||||
$Gefunden = true;
|
||||
$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) {
|
||||
$Gefunden = true;
|
||||
$Diff .= "<tr>\n\t<td>$key</td>\n\t<td>$value</td>\n\t<td></rd>\n</tr>";
|
||||
}
|
||||
}
|
||||
|
||||
$Diff .= "</table>\n";
|
||||
|
||||
if($Gefunden)
|
||||
return $Diff;
|
||||
else
|
||||
return "\nno changes Fount\n";
|
||||
}
|
||||
|
||||
function db_query( $SQL, $comment) {
|
||||
global $con, $Page;
|
||||
$Diff = "";
|
||||
|
||||
// commed anlyse udn daten sicherung
|
||||
if(strpos("#$SQL", "UPDATE") > 0) {
|
||||
// Tabellen name ermitteln
|
||||
$Table_Start = strpos( $SQL, "`");
|
||||
$Table_End = strpos( $SQL, "`", $Table_Start+1);
|
||||
$Table = substr( $SQL, $Table_Start, ($Table_End-$Table_Start+1));
|
||||
|
||||
//SecureTest
|
||||
if( $Table_Start == 0 || $Table_End == 0) die("<h1>funktion_db ERROR SQL: '$SQL' nicht OK</h1>");
|
||||
|
||||
//WHERE ermitteln
|
||||
$Where_Start = strpos( $SQL, "WHERE");
|
||||
$Where = substr( $SQL, $Where_Start);
|
||||
if( $Where_Start == 0) $Where = ";";
|
||||
|
||||
if( strlen( $Where) < 2)
|
||||
{
|
||||
$Diff = "can't show, too mutch data (no filter was set)";
|
||||
$querry_erg = mysql_query($SQL, $con);
|
||||
}
|
||||
else
|
||||
{
|
||||
$Daten1 = db_querry_getDatenAssocArray( "SELECT * FROM $Table $Where");
|
||||
$querry_erg = mysql_query($SQL, $con);
|
||||
$Daten2 = db_querry_getDatenAssocArray( "SELECT * FROM $Table $Where");
|
||||
$Diff = db_querry_diffDaten($Daten1, $Daten2);
|
||||
}
|
||||
}
|
||||
elseif( strpos( "#$SQL", "DELETE") > 0)
|
||||
{
|
||||
$TableWhere = substr( $SQL, 6);
|
||||
$Diff .= Ausgabe_Daten( "SELECT * $TableWhere");
|
||||
|
||||
//execute command
|
||||
$querry_erg = mysql_query($SQL, $con);
|
||||
}
|
||||
elseif( strpos( "#$SQL", "INSERT") > 0)
|
||||
{
|
||||
//execute command
|
||||
$querry_erg = mysql_query($SQL, $con);
|
||||
}
|
||||
else
|
||||
{
|
||||
//execute command
|
||||
$querry_erg = mysql_query($SQL, $con);
|
||||
}
|
||||
|
||||
$SQLCommand = "SQL:<br />". htmlentities( $SQL, ENT_QUOTES);
|
||||
if( strlen($Diff) > 0)
|
||||
$SQLCommand .= "<br /><br />Diff:<br />$Diff";
|
||||
|
||||
$Commend = htmlentities( ($Page["Name"]. ": ". $comment), ENT_QUOTES);
|
||||
//LOG commands in DB
|
||||
$SQL_SEC = "INSERT INTO `ChangeLog` ( `UID` , `SQLCommad` , `Commend` ) ".
|
||||
" VALUES ( '". $_SESSION['UID']. "', ".
|
||||
"'". mysql_escape_string( $SQLCommand). "', ".
|
||||
"'". mysql_escape_string( $Commend). "' );";
|
||||
$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)
|
||||
{
|
||||
global $con;
|
||||
|
||||
$SQL = "SELECT * FROM `".$Table_Name."`";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
$SQL = "SELECT * FROM `".$Table_Name."`";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
// anzahl zeilen
|
||||
$Zeilen = mysql_num_rows($Erg);
|
||||
// anzahl zeilen
|
||||
$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 "<caption>DB: $Table_Name</caption>";
|
||||
echo "<table class=\"border\" cellpadding=\"2\" cellspacing=\"1\">";
|
||||
echo "<caption>DB: $Table_Name</caption>";
|
||||
|
||||
echo "<tr class=\"contenttopic\">";
|
||||
for ($m = 0 ; $m < $Anzahl_Felder ; $m++)
|
||||
{
|
||||
echo "<th>". mysql_field_name($Erg, $m). "</th>";
|
||||
}
|
||||
echo "</tr>";
|
||||
echo "<tr class=\"contenttopic\">";
|
||||
for ($m = 0 ; $m < $Anzahl_Felder ; $m++)
|
||||
{
|
||||
echo "<th>". mysql_field_name($Erg, $m). "</th>";
|
||||
}
|
||||
echo "</tr>";
|
||||
|
||||
for ($n = 0 ; $n < $Zeilen ; $n++)
|
||||
{
|
||||
echo "<tr class=\"content\">";
|
||||
for ($m = 0 ; $m < $Anzahl_Felder ; $m++)
|
||||
{
|
||||
echo "<td>".mysql_result($Erg, $n, $m). "</td>";
|
||||
}
|
||||
echo "</tr>";
|
||||
}
|
||||
echo "</table>";
|
||||
for ($n = 0 ; $n < $Zeilen ; $n++)
|
||||
{
|
||||
echo "<tr class=\"content\">";
|
||||
for ($m = 0 ; $m < $Anzahl_Felder ; $m++)
|
||||
{
|
||||
echo "<td>".mysql_result($Erg, $n, $m). "</td>";
|
||||
}
|
||||
echo "</tr>";
|
||||
}
|
||||
echo "</table>";
|
||||
}
|
||||
|
||||
function funktion_db_element_list_2row( $TopicName, $SQL)
|
||||
{
|
||||
global $con;
|
||||
global $con;
|
||||
|
||||
echo "<table class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n";
|
||||
echo "<caption>$TopicName</caption>";
|
||||
# echo "\t<tr class=\"contenttopic\"> <td><h1>$TopicName</h1></td> </tr>\n";
|
||||
echo "<table class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n";
|
||||
echo "<caption>$TopicName</caption>";
|
||||
# echo "\t<tr class=\"contenttopic\"> <td><h1>$TopicName</h1></td> </tr>\n";
|
||||
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
echo mysql_error($con);
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
echo mysql_error($con);
|
||||
|
||||
echo "<tr class=\"contenttopic\">";
|
||||
for ($m = 0 ; $m < mysql_num_fields($Erg) ; $m++)
|
||||
{
|
||||
echo "<th>". mysql_field_name($Erg, $m). "</th>";
|
||||
}
|
||||
echo "</tr>";
|
||||
echo "<tr class=\"contenttopic\">";
|
||||
for ($m = 0 ; $m < mysql_num_fields($Erg) ; $m++)
|
||||
{
|
||||
echo "<th>". mysql_field_name($Erg, $m). "</th>";
|
||||
}
|
||||
echo "</tr>";
|
||||
|
||||
for ($n = 0 ; $n < mysql_num_rows($Erg) ; $n++)
|
||||
{
|
||||
echo "<tr class=\"content\">";
|
||||
for ($m = 0 ; $m < mysql_num_fields($Erg) ; $m++)
|
||||
{
|
||||
echo "<td>".mysql_result($Erg, $n, $m). "</td>";
|
||||
}
|
||||
echo "</tr>";
|
||||
}
|
||||
echo "</table>\n";
|
||||
for ($n = 0 ; $n < mysql_num_rows($Erg) ; $n++)
|
||||
{
|
||||
echo "<tr class=\"content\">";
|
||||
for ($m = 0 ; $m < mysql_num_fields($Erg) ; $m++)
|
||||
{
|
||||
echo "<td>".mysql_result($Erg, $n, $m). "</td>";
|
||||
}
|
||||
echo "</tr>";
|
||||
}
|
||||
echo "</table>\n";
|
||||
}
|
||||
|
||||
?>
|
||||
|
@ -1,12 +1,10 @@
|
||||
<?PHP
|
||||
<?php
|
||||
function noAnswer() {
|
||||
global $con;
|
||||
|
||||
function noAnswer() {
|
||||
global $con;
|
||||
|
||||
$SQL = "SELECT UID FROM Questions WHERE `AID`='0'";
|
||||
$Res=mysql_query($SQL, $con);
|
||||
|
||||
return mysql_num_rows($Res);
|
||||
}
|
||||
$SQL = "SELECT UID FROM Questions WHERE `AID`='0'";
|
||||
$Res = mysql_query($SQL, $con);
|
||||
|
||||
return mysql_num_rows($Res);
|
||||
}
|
||||
?>
|
||||
|
@ -1,12 +1,9 @@
|
||||
<?PHP
|
||||
echo "<br>";
|
||||
|
||||
if( strpos( $_SERVER["REQUEST_URI"], "?") >0)
|
||||
$URL = $_SERVER["REQUEST_URI"]. "&SetLanguage=";
|
||||
else
|
||||
$URL = $_SERVER["REQUEST_URI"]. "?SetLanguage=";
|
||||
|
||||
echo "<a href=\"". $URL. "DE\"><img src=\"". $url. $ENGEL_ROOT. "pic/flag/de.gif\" alt=\"DE\"></a> ";
|
||||
echo "<a href=\"". $URL. "EN\"><img src=\"". $url. $ENGEL_ROOT. "pic/flag/en.gif\" alt=\"EN\"></a> ";
|
||||
<?php
|
||||
if(strpos($_SERVER["REQUEST_URI"], "?") > 0)
|
||||
$URL = $_SERVER["REQUEST_URI"] . "&SetLanguage=";
|
||||
else
|
||||
$URL = $_SERVER["REQUEST_URI"] . "?SetLanguage=";
|
||||
|
||||
echo "<a href=\"" . $URL . "DE\"><img src=\"" . $url . $ENGEL_ROOT . "pic/flag/de.gif\" alt=\"DE\" /></a> ";
|
||||
echo "<a href=\"" . $URL . "EN\"><img src=\"" . $url . $ENGEL_ROOT . "pic/flag/en.gif\" alt=\"EN\" /></a> ";
|
||||
?>
|
||||
|
@ -1,35 +1,28 @@
|
||||
<?PHP
|
||||
|
||||
|
||||
function Get_Text ($TextID, $NoError=FALSE)
|
||||
{
|
||||
GLOBAL $con, $error_messages, $DEBUG;
|
||||
|
||||
if( !isset($_SESSION['Sprache']))
|
||||
$_SESSION['Sprache'] = "EN";
|
||||
if( $_SESSION['Sprache']=="")
|
||||
$_SESSION['Sprache']="EN";
|
||||
if( isset($_GET["SetLanguage"]))
|
||||
$_SESSION['Sprache']= $_GET["SetLanguage"];
|
||||
|
||||
$SQL = "SELECT * FROM `Sprache` WHERE TextID=\"$TextID\" AND Sprache ='".$_SESSION['Sprache']."'";
|
||||
@$Erg = mysql_query($SQL, $con);
|
||||
|
||||
if( mysql_num_rows( $Erg) == 1)
|
||||
return (@mysql_result($Erg, 0, "Text"));
|
||||
elseif( $NoError && !$DEBUG)
|
||||
return "";
|
||||
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);
|
||||
}
|
||||
|
||||
<?php
|
||||
function Get_Text ($TextID, $NoError = false) {
|
||||
global $con, $error_messages, $debug;
|
||||
|
||||
if( !isset($_SESSION['Sprache']))
|
||||
$_SESSION['Sprache'] = "EN";
|
||||
if( $_SESSION['Sprache']=="")
|
||||
$_SESSION['Sprache']="EN";
|
||||
if( isset($_GET["SetLanguage"]))
|
||||
$_SESSION['Sprache']= $_GET["SetLanguage"];
|
||||
|
||||
$SQL = "SELECT * FROM `Sprache` WHERE TextID=\"$TextID\" AND Sprache ='".$_SESSION['Sprache']."'";
|
||||
@$Erg = mysql_query($SQL, $con);
|
||||
|
||||
if( mysql_num_rows( $Erg) == 1)
|
||||
return (@mysql_result($Erg, 0, "Text"));
|
||||
elseif( $NoError && !$debug)
|
||||
return "";
|
||||
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);
|
||||
}
|
||||
?>
|
||||
|
@ -1,44 +1,41 @@
|
||||
<?PHP
|
||||
<?php
|
||||
function ShowMenu( $MenuName) {
|
||||
global $MenueTableStart, $MenueTableEnd, $_SESSION, $debug, $url, $ENGEL_ROOT;
|
||||
$Gefunden = false;
|
||||
|
||||
function ShowMenu( $MenuName)
|
||||
{
|
||||
global $MenueTableStart, $MenueTableEnd, $_SESSION, $DEBUG, $url, $ENGEL_ROOT;
|
||||
$Gefunden=FALSE;
|
||||
// Ueberschift
|
||||
$Text = "<h4 class=\"menu\">". Get_Text("$MenuName/"). "</h4><ul>";
|
||||
|
||||
//Überschift
|
||||
$Text = "<h4 class=\"menu\">". Get_Text("$MenuName/"). "</h4>";
|
||||
// Eintraege
|
||||
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
|
||||
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);
|
||||
if(( TRUE||$DEBUG) && (strlen($TempName)==0) )
|
||||
$TempName = "not found: \"$Key\"";
|
||||
if(( true||$debug) && (strlen($TempName)==0) )
|
||||
$TempName = "not found: \"$Key\"";
|
||||
|
||||
if( $Entry == "Y")
|
||||
{
|
||||
//zum absichtlkichen ausblenden von einträgen
|
||||
if( strlen($TempName)>1)
|
||||
{
|
||||
//sonderfälle:
|
||||
if( $Key=="admin/faq.php")
|
||||
$TempName .= " (". noAnswer(). ")";
|
||||
//ausgabe
|
||||
$Text .= "\t\t\t<li><a href=\"". $url. $ENGEL_ROOT. $Key. "\">$TempName</a></li>\n";
|
||||
$Gefunden = TRUE;
|
||||
}
|
||||
}
|
||||
elseif( $DEBUG )
|
||||
{
|
||||
$Gefunden = TRUE;
|
||||
$Text .= "\t\t\t<li>$TempName ($Key)</li>\n";
|
||||
}
|
||||
}
|
||||
if( $Gefunden)
|
||||
echo $MenueTableStart.$Text.$MenueTableEnd;
|
||||
if( $Entry == "Y") {
|
||||
//zum absichtlkichen ausblenden von einträgen
|
||||
if( strlen($TempName)>1) {
|
||||
//sonderfälle:
|
||||
|
||||
if( $Key=="admin/faq.php")
|
||||
$TempName .= " (". noAnswer(). ")";
|
||||
//ausgabe
|
||||
$Text .= "\t\t\t<li><a href=\"". $url. $ENGEL_ROOT. $Key. "\">$TempName</a></li>\n";
|
||||
$Gefunden = true;
|
||||
}
|
||||
}
|
||||
elseif( $debug )
|
||||
{
|
||||
$Gefunden = true;
|
||||
$Text .= "\t\t\t<li>$TempName ($Key)</li>\n";
|
||||
}
|
||||
}
|
||||
if( $Gefunden)
|
||||
echo $MenueTableStart.$Text.$MenueTableEnd;
|
||||
}//function ShowMenue
|
||||
|
||||
?>
|
||||
|
@ -1,35 +1,34 @@
|
||||
<?PHP
|
||||
include "config_modem.php";
|
||||
<?php
|
||||
include "config_modem.php";
|
||||
|
||||
function DialNumber( $Number )
|
||||
{
|
||||
global $Dev, $ModemEnable;
|
||||
function DialNumber($Number) {
|
||||
global $Dev, $ModemEnable;
|
||||
|
||||
if($ModemEnable) {
|
||||
echo "Dial number: '<u>$Number</u>' was called<br />\n";
|
||||
|
||||
if( $ModemEnable)
|
||||
{
|
||||
echo "Dial number: '<u>$Number</u>' was called<br>\n";
|
||||
$fp = fopen( $ModemDev, "w");
|
||||
sleep(1);
|
||||
fwrite( $fp, "+++");
|
||||
sleep(1);
|
||||
fwrite( $fp, "ATZ\n");
|
||||
sleep(1);
|
||||
fwrite( $fp, "ATX1\n");
|
||||
sleep(1);
|
||||
fwrite( $fp, "ATD $Number \n");
|
||||
sleep(8);
|
||||
fclose($fp);
|
||||
sleep(1);
|
||||
}
|
||||
else
|
||||
echo "Modem is Disable, number: '<u>$Number</u>' was not called<br>\n";
|
||||
$fp = fopen( $ModemDev, "w");
|
||||
sleep(1);
|
||||
fwrite( $fp, "+++");
|
||||
sleep(1);
|
||||
fwrite( $fp, "ATZ\n");
|
||||
sleep(1);
|
||||
fwrite( $fp, "ATX1\n");
|
||||
sleep(1);
|
||||
fwrite( $fp, "ATD $Number \n");
|
||||
sleep(8);
|
||||
fclose($fp);
|
||||
sleep(1);
|
||||
}
|
||||
else
|
||||
echo "Modem is Disable, number: '<u>$Number</u>' was not called<br />\n";
|
||||
}
|
||||
|
||||
|
||||
function SetWackeup( $Number, $TimeH, $TimeM)
|
||||
{
|
||||
global $WackupNumber;
|
||||
DialNumber( "$WackupNumber$TimeH$TimeM$Number");
|
||||
global $WakeupNumber;
|
||||
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"))
|
||||
{
|
||||
function DatumUm1TagErhoehen( $Datum)
|
||||
{
|
||||
$Jahr = substr( $Datum, 0, 4);
|
||||
$Monat = substr( $Datum, 5, 2);
|
||||
$Tag = substr( $Datum, 8, 2);
|
||||
$Tag++;
|
||||
|
||||
$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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
if($Tag > $Mmax) {
|
||||
$Tag = 1;
|
||||
$Monat++;
|
||||
}
|
||||
|
||||
if( $Tag > $Mmax)
|
||||
{
|
||||
$Tag = 1;
|
||||
$Monat++;
|
||||
}
|
||||
if($Monat > 12) {
|
||||
$Monat = 1;
|
||||
$Jahr++;
|
||||
}
|
||||
|
||||
if( $Monat > 12 )
|
||||
{
|
||||
$Monat = 1;
|
||||
$Jahr++;
|
||||
}
|
||||
$Tag = strlen( $Tag ) == 1 ? "0".$Tag : $Tag;
|
||||
$Monat = strlen( $Monat ) == 1 ? "0".$Monat : $Monat;
|
||||
|
||||
$Tag = strlen( $Tag ) == 1 ? "0".$Tag : $Tag;
|
||||
$Monat = strlen( $Monat ) == 1 ? "0".$Monat : $Monat;
|
||||
return ("$Jahr-$Monat-$Tag");
|
||||
}
|
||||
}
|
||||
|
||||
return ("$Jahr-$Monat-$Tag");
|
||||
} //function DatumUm1Tagerhoehen(
|
||||
}
|
||||
// suchen den ersten eintrags
|
||||
$SQL = "SELECT `DateS` FROM `Shifts` ORDER BY `DateS` LIMIT 1";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
//suchen den ersten eintrags
|
||||
$SQL = "SELECT `DateS` FROM `Shifts` ORDER BY `DateS` LIMIT 1";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
$Pos = 0;
|
||||
|
||||
$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)
|
||||
{
|
||||
do
|
||||
{
|
||||
//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
|
||||
$SQL2 = "SELECT MAX(`DateE`) FROM `Shifts` WHERE ( (`DateS` like '$DateS%') AND NOT (`DateE` like '%00:00:00'))";
|
||||
$Erg2 = mysql_query($SQL2, $con);
|
||||
$DateE = substr(mysql_result($Erg2, 0 , 0), 0,10);
|
||||
|
||||
//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'))";
|
||||
$Erg2 = mysql_query($SQL2, $con);
|
||||
$DateE = substr(mysql_result($Erg2, 0 , 0), 0,10);
|
||||
if(strlen($DateE) == 0)
|
||||
$DateE = $DateS;
|
||||
else
|
||||
while( $DateS != $DateE) {
|
||||
$DateS = DatumUm1TagErhoehen( $DateS);
|
||||
$VeranstaltungsTage[$Pos++] = $DateS;
|
||||
}
|
||||
|
||||
if( strlen($DateE) == 0)
|
||||
$DateE = $DateS;
|
||||
else
|
||||
while( $DateS != $DateE)
|
||||
{
|
||||
$DateS = DatumUm1TagErhoehen( $DateS);
|
||||
$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);
|
||||
// suchen den naesten 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);
|
||||
}
|
||||
$VeranstaltungsTageMax = $Pos-1;
|
||||
}
|
||||
|
||||
$VeranstaltungsTageMax = $Pos - 1;
|
||||
?>
|
||||
|
@ -1,132 +1,111 @@
|
||||
<?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)
|
||||
{
|
||||
global $con;
|
||||
if(mysql_num_rows($res) == 1)
|
||||
return mysql_result($res, 0, 0);
|
||||
else
|
||||
return "";
|
||||
}
|
||||
|
||||
function displayPictur($UID, $height = "30") {
|
||||
global $url, $ENGEL_ROOT;
|
||||
|
||||
if( $UID>0) {
|
||||
$SQL = "SELECT Nick FROM `User` WHERE UID='$UID'";
|
||||
} else {
|
||||
$SQL = "SELECT Name FROM `UserGroups` WHERE UID='$UID'";
|
||||
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\">");
|
||||
}
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
//echo $UID."#";
|
||||
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 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 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
|
||||
|
||||
|
||||
/*##############################################################################################
|
||||
R o o m
|
||||
##############################################################################################*/
|
||||
echo "\n\n<br>\n<h1>Rooms:</h1>\n";
|
||||
|
||||
function saveRoomData()
|
||||
{
|
||||
global $con;
|
||||
if( isset($_GET["NameXML"]))
|
||||
{
|
||||
$SQL= "INSERT INTO `Room` ( `Name`, `FromPentabarf` ) ".
|
||||
"VALUES ('". mysql_escape_string($_GET["NameXML"]). "', 'Y');";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
if( $Erg )
|
||||
echo "Aenderung, an Raum ". $_GET["NameXML"]. ", war erfogreich<br>";
|
||||
else
|
||||
echo "Aenderung, an Raum ". $_GET["NameXML"]. ", war <u>nicht</u> erfogreich.(".
|
||||
mysql_error($con). ")<br>[$SQL]<br>";
|
||||
}
|
||||
else
|
||||
echo "Fehler in den Parametern!<br>";
|
||||
} /*function saveRoomData*/
|
||||
|
||||
if( isset($_GET["RoomUpdate"]))
|
||||
saveRoomData();
|
||||
|
||||
//INIT Status counter
|
||||
$DS_KO = 0;
|
||||
|
||||
//Ausgabe
|
||||
echo "<table border=\"0\">\n";
|
||||
echo "<tr><th>Name</th><th>state</th></tr>\n";
|
||||
if( $EnableSchudle)
|
||||
foreach($XMLmain->sub as $EventKey => $Event)
|
||||
{
|
||||
if( $Event->name == "VEVENT")
|
||||
{
|
||||
$NameXML = getXMLsubData( $Event, "LOCATION");
|
||||
if( !isset( $RoomName[$NameXML]))
|
||||
{
|
||||
$RoomName[$NameXML] = "";
|
||||
|
||||
if( isset($_GET["UpdateALL"]))
|
||||
{
|
||||
$_GET["NameXML"] = $NameXML;
|
||||
saveRoomData();
|
||||
CreateRoomArrays();
|
||||
}
|
||||
else
|
||||
{
|
||||
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 "</form>\n";
|
||||
echo "<br>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "<tr><td colspan=\"6\">status: $DS_KO nicht vorhanden.</td></tr>\n";
|
||||
echo "</table>\n";
|
||||
|
||||
<?php
|
||||
echo "<h1>Rooms:</h1>\n";
|
||||
|
||||
function saveRoomData() {
|
||||
global $con;
|
||||
|
||||
if(isset($_GET["NameXML"])) {
|
||||
$SQL = "INSERT INTO `Room` ( `Name`, `FromPentabarf` ) ".
|
||||
"VALUES ('". mysql_escape_string($_GET["NameXML"]). "', 'Y');";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
if($Erg)
|
||||
echo "Aenderung, an Raum ". $_GET["NameXML"]. ", war erfogreich<br />";
|
||||
else
|
||||
echo "Aenderung, an Raum ". $_GET["NameXML"]. ", war <u>nicht</u> erfogreich.(".
|
||||
|
||||
mysql_error($con). ")<br />[$SQL]<br />";
|
||||
} else
|
||||
echo "Fehler in den Parametern!<br />";
|
||||
}
|
||||
|
||||
if(isset($_GET["RoomUpdate"]))
|
||||
saveRoomData();
|
||||
|
||||
// INIT Status counter
|
||||
$DS_KO = 0;
|
||||
|
||||
// Ausgabe
|
||||
echo "<table border=\"0\">\n";
|
||||
echo "<tr><th>Name</th><th>state</th></tr>\n";
|
||||
|
||||
if($EnableSchudle) {
|
||||
foreach($XMLmain->sub as $EventKey => $Event) {
|
||||
if( $Event->name == "VEVENT") {
|
||||
$NameXML = getXMLsubData( $Event, "LOCATION");
|
||||
|
||||
if( !isset( $RoomName[$NameXML])) {
|
||||
$RoomName[$NameXML] = "";
|
||||
|
||||
if(isset($_GET["UpdateALL"])) {
|
||||
$_GET["NameXML"] = $NameXML;
|
||||
saveRoomData();
|
||||
CreateRoomArrays();
|
||||
} else {
|
||||
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 "</form>\n";
|
||||
echo "<br />";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo "<tr><td colspan=\"6\">status: $DS_KO nicht vorhanden.</td></tr>\n";
|
||||
echo "</table>\n";
|
||||
?>
|
||||
|
@ -1,26 +1,23 @@
|
||||
<?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 */
|
||||
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 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);
|
||||
}
|
||||
|
||||
/* 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
|
||||
ini_set( "session.gc_maxlifetime", "65535");
|
||||
|
||||
include ("config.php");
|
||||
include ("error_handler.php");
|
||||
include ("config_db.php");
|
||||
include ("funktion_lang.php");
|
||||
include ("funktion_faq.php"); //für noAnswer() im menu
|
||||
include ("funktion_menu.php");
|
||||
include ("funktion_user.php");
|
||||
|
||||
|
||||
if( isset($SystemDisableMessage) && ( strlen($SystemDisableMessage)>0) )
|
||||
{
|
||||
echo "<HTML>\n".
|
||||
"<BODY>\n". $SystemDisableMessage. "\n<BODY>\n".
|
||||
"</HTML>";
|
||||
die();
|
||||
}
|
||||
|
||||
if( !isset($_SESSION))
|
||||
{
|
||||
session_start();
|
||||
}
|
||||
include ("secure.php");
|
||||
|
||||
if( !isset($_SESSION['IP']))
|
||||
{
|
||||
$_SESSION['IP'] = $_SERVER['REMOTE_ADDR'];
|
||||
}
|
||||
|
||||
if (IsSet($_SESSION['UID']) and ($_SESSION['IP'] <> $_SERVER['REMOTE_ADDR']))
|
||||
{
|
||||
session_destroy ();
|
||||
header("Location: $url". $ENGEL_ROOT );
|
||||
}
|
||||
|
||||
include ("UserCVS.php");
|
||||
|
||||
|
||||
//UPdate LASTlogin
|
||||
if( isset($_SESSION['UID']))
|
||||
{
|
||||
$SQLlastLogIn = "UPDATE `User` SET ".
|
||||
"`lastLogIn` = '". gmdate("Y-m-j H:i:s", time()). "'".
|
||||
" WHERE `UID` = '". $_SESSION['UID']. "' LIMIT 1;";
|
||||
mysql_query ($SQLlastLogIn, $con);
|
||||
}
|
||||
|
||||
<?php
|
||||
ini_set("session.gc_maxlifetime", "65535");
|
||||
|
||||
include "config.php";
|
||||
include "error_handler.php";
|
||||
include "config_db.php";
|
||||
include "funktion_lang.php";
|
||||
include "funktion_faq.php"; // fuer noAnswer() im menu
|
||||
include "funktion_menu.php";
|
||||
include "funktion_user.php";
|
||||
|
||||
if(isset($SystemDisableMessage) && (strlen($SystemDisableMessage) > 0)) {
|
||||
echo "<html><head><title>" . $SystemDisableMessage . "</title></head>";
|
||||
echo "<body>" . $SystemDisableMessage . "</body></html>\n";
|
||||
die();
|
||||
}
|
||||
|
||||
if(!isset($_SESSION))
|
||||
session_start();
|
||||
|
||||
include "secure.php";
|
||||
|
||||
if(!isset($_SESSION['IP']))
|
||||
$_SESSION['IP'] = $_SERVER['REMOTE_ADDR'];
|
||||
|
||||
if(isset($_SESSION['UID']) && ($_SESSION['IP'] <> $_SERVER['REMOTE_ADDR'])) {
|
||||
session_destroy ();
|
||||
header("Location: " . $url . $ENGEL_ROOT);
|
||||
}
|
||||
|
||||
include "UserCVS.php";
|
||||
|
||||
// update LASTlogin
|
||||
if(isset($_SESSION['UID'])) {
|
||||
$SQLlastLogIn = "UPDATE `User` SET " .
|
||||
"`lastLogIn` = '" . gmdate("Y-m-j H:i:s", time()) . "'" .
|
||||
" WHERE `UID` = '" . $_SESSION['UID'] . "' LIMIT 1;";
|
||||
mysql_query ($SQLlastLogIn, $con);
|
||||
}
|
||||
?>
|
||||
|
@ -1,18 +1,17 @@
|
||||
<?PHP
|
||||
include ("config.php");
|
||||
|
||||
echo "<form action=\"". $url. $ENGEL_ROOT. "nonpublic/index.php\" method=\"post\">";
|
||||
echo "<table>\n".
|
||||
"\t<tr>".
|
||||
"\t\t<td align=\"right\">". Get_Text("index_lang_nick"). "</td>".
|
||||
"\t\t<td><input type=\"text\" name=\"user\" size=\"23\"></td>".
|
||||
"\t</tr>".
|
||||
"\t<tr>".
|
||||
"\t\t<td align=\"right\">". Get_Text("index_lang_pass"). "</td>".
|
||||
"\t\t<td><input type=\"password\" name=\"password\" size=\"23\"></td>".
|
||||
"\t</tr>".
|
||||
"</table>".
|
||||
"<br><input type=\"submit\" value=\"". Get_Text("index_lang_send"). "\">";
|
||||
echo "</form>";
|
||||
|
||||
<?php
|
||||
include "config.php";
|
||||
?>
|
||||
|
||||
<form action="<?php echo $url . $ENGEL_ROOT; ?>nonpublic/index.php" method="post">
|
||||
<table>
|
||||
<tr>
|
||||
<td align="right"><?php echo Get_Text("index_lang_nick"); ?></td>
|
||||
<td><input type="text" name="user" size="23" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right"><?php echo Get_Text("index_lang_pass"); ?></td>
|
||||
<td><input type="password" name="password" size="23"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br /><input type="submit" value="<?php echo Get_Text("index_lang_send"); ?>">
|
||||
</form>
|
||||
|
@ -1,41 +1,25 @@
|
||||
<?php
|
||||
//soll dein funktion entahlten die alle übergebenen parameter überprüft
|
||||
//'`'"
|
||||
if($debug)
|
||||
echo "secure.php START<br />\n";
|
||||
|
||||
if( $DEBUG)
|
||||
echo "secure.php START<br>\n";
|
||||
foreach ($_GET as $k => $v) {
|
||||
$v = htmlentities($v, ENT_QUOTES);
|
||||
preg_replace('/([\'"`\'])/', '', $v);
|
||||
$_GET[$k] = $v;
|
||||
|
||||
foreach ($_GET as $k => $v)
|
||||
{
|
||||
// $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)
|
||||
echo "GET $k=\"$v\"<br />";
|
||||
}
|
||||
|
||||
if( $DEBUG)
|
||||
echo "GET $k=\"$v\"<br>";
|
||||
}
|
||||
foreach ($_POST as $k => $v) {
|
||||
$v = htmlentities($v, ENT_QUOTES);
|
||||
preg_replace('/([\'"`\'])/', '', $v);
|
||||
$_POST[$k] = $v;
|
||||
|
||||
foreach ($_POST as $k => $v)
|
||||
{
|
||||
// $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 "POST $k=\"$v\"<br />";
|
||||
}
|
||||
|
||||
if($debug)
|
||||
echo "secure.php END<br />\n";
|
||||
?>
|
||||
|
@ -1,113 +1,75 @@
|
||||
<?php
|
||||
|
||||
/****************************************************************************************************/
|
||||
// INCLUDE
|
||||
/****************************************************************************************************/
|
||||
require_once('../includes/config_jabber.php');
|
||||
require_once("../includes/funktion_jabber.php");
|
||||
include("../includes/config_MessegeServer.php");
|
||||
|
||||
// Set time limit to indefinite execution
|
||||
set_time_limit( 0 );
|
||||
|
||||
/****************************************************************************************************/
|
||||
// show MODE
|
||||
/****************************************************************************************************/
|
||||
if( DEBUG)
|
||||
echo "DEBUG mode is enable\n\tjabber is disable\n\n";
|
||||
|
||||
/****************************************************************************************************/
|
||||
// INIT jabber
|
||||
/****************************************************************************************************/
|
||||
if( !DEBUG)
|
||||
{
|
||||
echo "INIT jabber\n";
|
||||
$jabber = new Jabber($server, $port, $username, $password, $resource);
|
||||
if ( !($jabber->Connect() && $jabber->SendAuth()))
|
||||
die("Couldn't connect to Jabber Server.");
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************************************/
|
||||
// INIT socked
|
||||
/****************************************************************************************************/
|
||||
echo "INIT socked\n";
|
||||
//http://de3.php.net/manual/de/function.socket-listen.php
|
||||
// Create a UDP socket
|
||||
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP) or die('Could not create socked ('.socket_strerror(socket_last_error()). ')');
|
||||
// Bind the socket to an address/port
|
||||
socket_bind($sock, SERVER_ADDRESS, SERVER_PORT) or die('Could not bind to address ('.socket_strerror(socket_last_error()). ')');
|
||||
// Setzt Nonbock Mode
|
||||
socket_set_nonblock($sock);
|
||||
|
||||
|
||||
/****************************************************************************************************/
|
||||
// Loop continuos
|
||||
/****************************************************************************************************/
|
||||
$RUNNING = TRUE;
|
||||
while( $RUNNING )
|
||||
{
|
||||
if( @socket_recvfrom($sock, $data, 65535, 0, $ip, $port))
|
||||
{
|
||||
//daten empfangen
|
||||
$data = substr($data,0, strlen($data)-1); //ENTER entfernen
|
||||
echo "\n". gmdate("Y-m-d H:i:s", time()). "\tresive from $ip:$port ". strlen($data). " byte data ($data)\n";
|
||||
PackedAnalyser( $data);
|
||||
}
|
||||
|
||||
usleep(100000); // 100ms delay keeps the doctor away
|
||||
} // end while
|
||||
|
||||
//disconnect jabber
|
||||
if( !DEBUG)
|
||||
$jabber->Disconnect();
|
||||
|
||||
// Close the master sockets
|
||||
socket_close($sock);
|
||||
|
||||
/****************************************************************************************************/
|
||||
/****************************************** MAIN END ************************************************/
|
||||
/****************************************************************************************************/
|
||||
|
||||
|
||||
/****************************************************************************************************/
|
||||
//***** 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";
|
||||
}
|
||||
}
|
||||
|
||||
require_once "../includes/config_jabber.php";
|
||||
require_once "../includes/funktion_jabber.php";
|
||||
include "../includes/config_MessegeServer.php";
|
||||
|
||||
// Set time limit to indefinite execution
|
||||
set_time_limit(0);
|
||||
|
||||
if(DEBUG)
|
||||
echo "DEBUG mode is enable\n\tjabber is disable\n\n";
|
||||
|
||||
if(!DEBUG) {
|
||||
echo "INIT jabber\n";
|
||||
$jabber = new Jabber($server, $port, $username, $password, $resource);
|
||||
|
||||
if(!($jabber->Connect() && $jabber->SendAuth()))
|
||||
die("Couldn't connect to Jabber Server.");
|
||||
}
|
||||
|
||||
echo "INIT socked\n";
|
||||
|
||||
// Create a UDP socket
|
||||
$sock = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP) or die('Could not create socked (' . socket_strerror(socket_last_error()) . ')');
|
||||
|
||||
// Bind the socket to an address/port
|
||||
socket_bind($sock, SERVER_ADDRESS, SERVER_PORT) or die('Could not bind to address (' . socket_strerror(socket_last_error()) . ')');
|
||||
|
||||
// Setzt Nonbock Mode
|
||||
socket_set_nonblock($sock);
|
||||
|
||||
$RUNNING = true;
|
||||
|
||||
while($RUNNING) {
|
||||
if(@socket_recvfrom($sock, $data, 65535, 0, $ip, $port)) {
|
||||
// daten empfangen
|
||||
$data = substr($data, 0, strlen($data)-1); //ENTER entfernen
|
||||
echo "\n". gmdate("Y-m-d H:i:s", time()). "\tresive from $ip:$port ". strlen($data). " byte data ($data)\n";
|
||||
PackedAnalyser( $data);
|
||||
}
|
||||
|
||||
usleep(100000); // 100ms delay keeps the doctor away
|
||||
} // end while
|
||||
|
||||
// disconnect jabber
|
||||
if(!DEBUG)
|
||||
$jabber->Disconnect();
|
||||
|
||||
// Close the master sockets
|
||||
socket_close($sock);
|
||||
|
||||
function PackedAnalyser($data) {
|
||||
global $jabber, $RUNNING;
|
||||
// init array
|
||||
$matches = array();
|
||||
|
||||
//#message
|
||||
if(preg_match("/^#(message) ([^ ]+) (.+)/i", $data, $matches)) {
|
||||
if($matches[2]=="" || $matches[3]=="")
|
||||
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
|
||||
|
||||
include ("../../camp2011/includes/config.php");
|
||||
include ("../../camp2011/includes/error_handler.php");
|
||||
include ("../../camp2011/includes/config_db.php");
|
||||
if( !isset($_SESSION)) session_start();
|
||||
include ("../../camp2011/includes/secure.php");
|
||||
|
||||
|
||||
// Parameter check
|
||||
if( !isset($_GET["UID"]) )
|
||||
$_GET["UID"]= "-1";
|
||||
|
||||
$SQL= "SELECT * FROM `UserPicture` WHERE `UID`='". $_GET["UID"]. "'";
|
||||
$res = mysql_query( $SQL, $con);
|
||||
|
||||
if( mysql_num_rows($res) == 1)
|
||||
{
|
||||
//genügend rechte
|
||||
if( !isset($_SESSION['UID']) || $_SESSION['UID'] == -1)
|
||||
{
|
||||
header( "HTTP/1.0 403 Forbidden");
|
||||
die( "403 Forbidden");
|
||||
}
|
||||
|
||||
// ist das bild sichtbar?
|
||||
if( (mysql_result($res, 0, "show")=="N") AND
|
||||
($_SESSION['UID']!=$_GET["UID"]) AND
|
||||
($_SESSION['CVS'][ "admin/UserPicture.php" ] == "N"))
|
||||
{
|
||||
$SQL= "SELECT * FROM `UserPicture` WHERE `UID`='-1'";
|
||||
$res = mysql_query( $SQL, $con);
|
||||
if( mysql_num_rows($res) != 1)
|
||||
{
|
||||
header( 'HTTP/1.0 404 Not Found');
|
||||
die( "404 Not Found");
|
||||
}
|
||||
}
|
||||
|
||||
/// bild aus db auslesen
|
||||
$bild = mysql_result($res, 0, "Bild");
|
||||
|
||||
// ausgabe bild
|
||||
header( "Accept-Ranges: bytes");
|
||||
header( "Content-Length: ". strlen($bild));
|
||||
header( "Content-type: ". mysql_result($res, 0, "ContentType"));
|
||||
header( "Cache-control: public");
|
||||
header( "Cache-request-directive: min-fresh = 120");
|
||||
header( "Cache-request-directive: max-age = 360");
|
||||
echo $bild;
|
||||
}
|
||||
else
|
||||
{
|
||||
header( 'HTTP/1.0 404 Not Found');
|
||||
die( "404 Not Found");
|
||||
}
|
||||
|
||||
<?php
|
||||
include "../../camp2011/includes/config.php";
|
||||
include "../../camp2011/includes/error_handler.php";
|
||||
include "../../camp2011/includes/config_db.php";
|
||||
|
||||
if(!isset($_SESSION))
|
||||
session_start();
|
||||
|
||||
include "../../camp2011/includes/secure.php";
|
||||
|
||||
// Parameter check
|
||||
if(!isset($_GET["UID"]))
|
||||
$_GET["UID"] = "-1";
|
||||
|
||||
$SQL = "SELECT * FROM `UserPicture` WHERE `UID`='" . $_GET["UID"] . "'";
|
||||
$res = mysql_query($SQL, $con);
|
||||
|
||||
if(mysql_num_rows($res) == 1) {
|
||||
// genuegend rechte
|
||||
if(!isset($_SESSION['UID']) || $_SESSION['UID'] == -1) {
|
||||
header("HTTP/1.0 403 Forbidden");
|
||||
die("403 Forbidden");
|
||||
}
|
||||
|
||||
// ist das bild sichtbar?
|
||||
if((mysql_result($res, 0, "show") == "N") AND ($_SESSION['UID']!=$_GET["UID"]) AND ($_SESSION['CVS'][ "admin/UserPicture.php" ] == "N")) {
|
||||
$SQL = "SELECT * FROM `UserPicture` WHERE `UID`='-1'";
|
||||
$res = mysql_query($SQL, $con);
|
||||
|
||||
if(mysql_num_rows($res) != 1) {
|
||||
header("HTTP/1.0 404 Not Found");
|
||||
die("404 Not Found");
|
||||
}
|
||||
}
|
||||
|
||||
// bild aus db auslesen
|
||||
$bild = mysql_result($res, 0, "Bild");
|
||||
|
||||
// ausgabe bild
|
||||
header("Accept-Ranges: bytes");
|
||||
header("Content-Length: " . strlen($bild));
|
||||
header("Content-type: " . mysql_result($res, 0, "ContentType"));
|
||||
header("Cache-control: public");
|
||||
header("Cache-request-directive: min-fresh = 120");
|
||||
header("Cache-request-directive: max-age = 360");
|
||||
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>
|
||||
|
||||
<li><a href="faq.php?quest=all">Alle Anfragen</a></li>
|
||||
<li><a href="faq.php?quest=open">Offene Anfragen (<?PHP echo noAnswer(); ?>)</a></li>
|
||||
<li><a href="faq.php?quest=open">Offene Anfragen (<?php echo noAnswer(); ?>)</a></li>
|
||||
<li><a href="faq.php?quest=faq">FAQ-Liste editiern</a></li>
|
||||
|
||||
|
@ -1,19 +1,19 @@
|
||||
<?PHP
|
||||
<?php
|
||||
|
||||
$title = "Erzengel";
|
||||
$header = "Index";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("../../../camp2011/includes/funktion_db_list.php");
|
||||
|
||||
echo "Hallo Erzengel ".$_SESSION['Nick'].",<br>\n";
|
||||
echo "Hallo Erzengel ".$_SESSION['Nick'].",<br />\n";
|
||||
|
||||
?>
|
||||
|
||||
du bist jetzt im Erzengel-Bereich. Hier kannst du die Engel-Verwaltung vornehmen.<br><br>
|
||||
du bist jetzt im Erzengel-Bereich. Hier kannst du die Engel-Verwaltung vornehmen.<br /><br />
|
||||
|
||||
Bitte melde dich <a href="../logout.php">hier</a> nach getaner Arbeit immer ab, damit kein anderer hier Änderungen vornehmen kann.
|
||||
|
||||
<?PHP
|
||||
<?php
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
?>
|
||||
|
||||
|
@ -1,13 +1,12 @@
|
||||
<?php
|
||||
include ("../../camp2011/includes/config.php");
|
||||
include "../../camp2011/includes/config.php";
|
||||
|
||||
// Die Session zerstoeren...
|
||||
session_start();
|
||||
session_destroy ();
|
||||
// und eine neue erstellen, damit kein Erzengelmenü angezeigt wird (falls sich ein Erzengel abmeldet...)
|
||||
session_start();
|
||||
|
||||
header("HTTP/1.1 302 Moved Temporarily");
|
||||
header("Location: ". $url. $ENGEL_ROOT);
|
||||
// Die Session zerstoeren...
|
||||
session_start();
|
||||
session_destroy ();
|
||||
// und eine neue erstellen, damit kein Erzengelmenue angezeigt wird (falls sich ein Erzengel abmeldet...)
|
||||
session_start();
|
||||
|
||||
header("HTTP/1.1 302 Moved Temporarily");
|
||||
header("Location: " . $url . $ENGEL_ROOT);
|
||||
?>
|
||||
|
@ -1,214 +1,181 @@
|
||||
<?PHP
|
||||
$title = "Anmeldung zum Chaos-Engel";
|
||||
$header = "";
|
||||
$success = "none";
|
||||
include ("../../camp2011/includes/config.php");
|
||||
include ("../../camp2011/includes/header.php");
|
||||
include ("../../camp2011/includes/config_db.php");
|
||||
include ("../../camp2011/includes/crypt.php");
|
||||
|
||||
|
||||
if( isset($_POST["send"]))
|
||||
{
|
||||
$eNick = trim($_POST["Nick"]);
|
||||
if( $_POST["Alter"]=="") $_POST["Alter"] = 0;
|
||||
|
||||
//user vorhanden?
|
||||
$SQLans = "SELECT UID FROM `User` WHERE `Nick`='". $_POST["Nick"]. "'";
|
||||
$Ergans = mysql_query($SQLans, $con);
|
||||
|
||||
if( strlen($_POST["Nick"]) < 2 )
|
||||
{
|
||||
$error= Get_Text("makeuser_error_nick1"). $_POST["Nick"]. Get_Text("makeuser_error_nick2");
|
||||
}
|
||||
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_mail");
|
||||
}
|
||||
elseif( !is_numeric($_POST["Alter"]))
|
||||
{
|
||||
$error= Get_Text("makeuser_error_Alter");
|
||||
}
|
||||
elseif( $_POST["Passwort"] != $_POST["Passwort2"] )
|
||||
{
|
||||
$error= Get_Text("makeuser_error_password1");
|
||||
}
|
||||
elseif( strlen($_POST["Passwort"]) < 6 )
|
||||
{
|
||||
$error= Get_Text("makeuser_error_password2");
|
||||
}
|
||||
else
|
||||
{
|
||||
$_POST["Passwort"] = PassCrypt($_POST["Passwort"]);
|
||||
unset($_POST["Passwort2"]);
|
||||
|
||||
$SQL = "INSERT INTO `User` (".
|
||||
"`Nick` , ". "`Name` , ".
|
||||
"`Vorname`, ". "`Alter` , ".
|
||||
"`Telefon`, ". "`DECT`, ".
|
||||
"`Handy`, ". "`email`, ".
|
||||
"`ICQ`, ". "`jabber`, ".
|
||||
"`Size`, ". "`Passwort`, ".
|
||||
"`Art` , ". "`kommentar`, ".
|
||||
"`Hometown`,". "`CreateDate` ) ".
|
||||
"VALUES ( ".
|
||||
"'". $_POST["Nick"]. "', ". "'". $_POST["Name"]. "', ".
|
||||
"'". $_POST["Vorname"]. "', ". "'". $_POST["Alter"]. "', ".
|
||||
"'". $_POST["Telefon"]. "', ". "'". $_POST["DECT"]. "', ".
|
||||
"'". $_POST["Handy"]. "', ". "'". $_POST["email"]. "', ".
|
||||
"'". $_POST["ICQ"]. "', ". "'". $_POST["jabber"]. "', ".
|
||||
"'". $_POST["Size"]. "', ". "'". $_POST["Passwort"]. "', ".
|
||||
"'". $_POST["Art"]. "', ". "'". $_POST["kommentar"]. "', ".
|
||||
"'". $_POST["Hometown"]. "',". "NOW());";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
if ($Erg != 1)
|
||||
{
|
||||
echo Get_Text("makeuser_error_write1"). "<br>\n";
|
||||
$error = mysql_error($con);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<p class=\"important\">". Get_Text("makeuser_writeOK"). "\n";
|
||||
|
||||
$SQL2 = "SELECT `UID` FROM `User` WHERE `Nick`='". $_POST["Nick"]. "';";
|
||||
$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");
|
||||
?>
|
||||
<?php
|
||||
$title = "Anmeldung zum Chaos-Engel";
|
||||
$header = "";
|
||||
$success = "none";
|
||||
|
||||
include "../../camp2011/includes/config.php";
|
||||
include "../../camp2011/includes/header.php";
|
||||
include "../../camp2011/includes/config_db.php";
|
||||
include "../../camp2011/includes/crypt.php";
|
||||
|
||||
if(isset($_POST["send"])) {
|
||||
$eNick = trim($_POST["Nick"]);
|
||||
|
||||
if($_POST["Alter"] == "")
|
||||
$_POST["Alter"] = 0;
|
||||
|
||||
// user vorhanden?
|
||||
$SQLans = "SELECT UID FROM `User` WHERE `Nick`='" . $_POST["Nick"] . "'";
|
||||
$Ergans = mysql_query($SQLans, $con);
|
||||
|
||||
if(strlen($_POST["Nick"]) < 2)
|
||||
$error = Get_Text("makeuser_error_nick1") . $_POST["Nick"] . Get_Text("makeuser_error_nick2");
|
||||
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_mail");
|
||||
elseif(!is_numeric($_POST["Alter"]))
|
||||
$error = Get_Text("makeuser_error_Alter");
|
||||
elseif($_POST["Passwort"] != $_POST["Passwort2"])
|
||||
$error = Get_Text("makeuser_error_password1");
|
||||
elseif(strlen($_POST["Passwort"]) < 6)
|
||||
$error = Get_Text("makeuser_error_password2");
|
||||
else {
|
||||
$_POST["Passwort"] = PassCrypt($_POST["Passwort"]);
|
||||
unset($_POST["Passwort2"]);
|
||||
|
||||
$SQL = "INSERT INTO `User` (".
|
||||
"`Nick` , ". "`Name` , ".
|
||||
"`Vorname`, ". "`Alter` , ".
|
||||
"`Telefon`, ". "`DECT`, ".
|
||||
"`Handy`, ". "`email`, ".
|
||||
"`ICQ`, ". "`jabber`, ".
|
||||
"`Size`, ". "`Passwort`, ".
|
||||
"`Art` , ". "`kommentar`, ".
|
||||
"`Hometown`,". "`CreateDate` ) ".
|
||||
"VALUES ( ".
|
||||
"'". $_POST["Nick"]. "', ". "'". $_POST["Name"]. "', ".
|
||||
"'". $_POST["Vorname"]. "', ". "'". $_POST["Alter"]. "', ".
|
||||
"'". $_POST["Telefon"]. "', ". "'". $_POST["DECT"]. "', ".
|
||||
"'". $_POST["Handy"]. "', ". "'". $_POST["email"]. "', ".
|
||||
"'". $_POST["ICQ"]. "', ". "'". $_POST["jabber"]. "', ".
|
||||
"'". $_POST["Size"]. "', ". "'". $_POST["Passwort"]. "', ".
|
||||
"'". $_POST["Art"]. "', ". "'". $_POST["kommentar"]. "', ".
|
||||
"'". $_POST["Hometown"]. "',". "NOW());";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
if ($Erg != 1) {
|
||||
echo Get_Text("makeuser_error_write1") . "<br />\n";
|
||||
$error = mysql_error($con);
|
||||
} else {
|
||||
echo "<p class=\"important\">" . Get_Text("makeuser_writeOK") . "\n";
|
||||
|
||||
$SQL2 = "SELECT `UID` FROM `User` WHERE `Nick`='" . $_POST["Nick"] . "';";
|
||||
$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>\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
|
||||
$title = "Himmel";
|
||||
$header = "Engelbesprechung";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
?>
|
||||
|
||||
<br>
|
||||
|
||||
<?php
|
||||
$title = "Himmel";
|
||||
$header = "Engelbesprechung";
|
||||
include "../../../camp2011/includes/header.php";
|
||||
|
||||
$SQL = "SELECT * FROM `News` ORDER BY 'Datum' DESC";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
$SQL = "SELECT * FROM `News` ORDER BY 'Datum' DESC";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
// anzahl zeilen
|
||||
$Zeilen = mysql_num_rows($Erg);
|
||||
// anzahl zeilen
|
||||
$Zeilen = mysql_num_rows($Erg);
|
||||
|
||||
for ($n = 0 ; $n < $Zeilen ; $n++)
|
||||
{
|
||||
if (mysql_result($Erg, $n, "Treffen")=="1")
|
||||
{
|
||||
echo "<p class='question'><u>".mysql_result($Erg, $n, "Betreff")."</u>";
|
||||
for ($n = 0 ; $n < $Zeilen ; $n++) {
|
||||
if (mysql_result($Erg, $n, "Treffen") == "1") {
|
||||
echo "<p class='question'><u>" . mysql_result($Erg, $n, "Betreff") . "</u>";
|
||||
|
||||
// Schow Admin Page
|
||||
if( $_SESSION['CVS'][ "admin/news.php" ] == "Y" )
|
||||
echo " <a href=\"./../admin/news.php?action=change&date=". mysql_result($Erg, $n, "Datum"). "\">[edit]</a>";
|
||||
// Show Admin Page
|
||||
if($_SESSION['CVS']["admin/news.php"] == "Y")
|
||||
echo " <a href=\"./../admin/news.php?action=change&date=". mysql_result($Erg, $n, "Datum"). "\">[edit]</a>";
|
||||
|
||||
echo "<br> <font size=1>".mysql_result($Erg, $n, "Datum").", ";
|
||||
echo UID2Nick(mysql_result($Erg, $n, "UID"))."</font></p>\n";
|
||||
|
||||
|
||||
echo "<p class='answetion'>".nl2br(mysql_result($Erg, $n, "Text"))."</p>\n";
|
||||
echo "<br /> <font size=1>".mysql_result($Erg, $n, "Datum").", ";
|
||||
echo UID2Nick(mysql_result($Erg, $n, "UID"))."</font></p>\n";
|
||||
echo "<p class='answetion'>".nl2br(mysql_result($Erg, $n, "Text"))."</p>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
?>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue