cleanup from old files
parent
1342dc49cf
commit
d194783e8f
@ -1,125 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once "funktion_jabber.php";
|
|
||||||
|
|
||||||
// global array for collected error_messages
|
|
||||||
$error_messages = array();
|
|
||||||
|
|
||||||
// general error handler collecting all messages in an array
|
|
||||||
function Error_Handler($error_number, $error_string, $error_file, $error_line, $error_context) {
|
|
||||||
global $error_messages, $con;
|
|
||||||
|
|
||||||
// SQL error genauer analysiert
|
|
||||||
$Temp = "";
|
|
||||||
foreach ($error_context as $k => $v)
|
|
||||||
if((strpos( "0$k", "sql") > 0) || (strpos( "0$k", "SQL") > 0))
|
|
||||||
$Temp .= "Error Context: $k = $v\n";
|
|
||||||
|
|
||||||
if((strpos( "0$error_string", "MySQL") > 0))
|
|
||||||
$Temp .= "Error MySQL: ". mysql_error($con). "\n";
|
|
||||||
|
|
||||||
// Uebergeben des arrays
|
|
||||||
array_push($error_messages, "Error Number: " . $error_number . "\n".
|
|
||||||
"Error String: " . $error_string . "\n".
|
|
||||||
"Error File: " . $error_file . "\n".
|
|
||||||
"Error Line: " . $error_line . "\n".
|
|
||||||
(strlen($Temp)? "$Temp": ""));
|
|
||||||
}
|
|
||||||
|
|
||||||
// register error handler
|
|
||||||
set_error_handler("Error_Handler");
|
|
||||||
|
|
||||||
error_reporting(E_ALL);
|
|
||||||
|
|
||||||
if($debug) {
|
|
||||||
ini_set("display_errors", "On");
|
|
||||||
ini_set("display_startup_errors", "On");
|
|
||||||
ini_set("html_errors", "On");
|
|
||||||
}
|
|
||||||
|
|
||||||
// send errors
|
|
||||||
function send_errors() {
|
|
||||||
global $error_messages;
|
|
||||||
|
|
||||||
if(!$error_messages)
|
|
||||||
return;
|
|
||||||
|
|
||||||
$message = "";
|
|
||||||
foreach($error_messages as $value)
|
|
||||||
$message .= $value."\n";
|
|
||||||
|
|
||||||
$message .= "\n";
|
|
||||||
|
|
||||||
if(isset($_POST)) {
|
|
||||||
foreach ($_POST as $k => $v)
|
|
||||||
$message .= "_POST: $k = ". ( $k!="password"? $v : "???..."). "\n";
|
|
||||||
|
|
||||||
$message .= "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if(isset($_GET)) {
|
|
||||||
foreach ($_GET as $k => $v)
|
|
||||||
$message .= "_GET: $k = $v\n";
|
|
||||||
|
|
||||||
$message .= "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
$message .= "\n\n";
|
|
||||||
|
|
||||||
if( isset( $_SESSION))
|
|
||||||
{
|
|
||||||
foreach ($_SESSION as $k => $v )
|
|
||||||
$message .= "_SESSION: $k = $v\n";
|
|
||||||
$message .= "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if( isset( $_SESSION['CVS']))
|
|
||||||
{
|
|
||||||
foreach ($_SESSION['CVS'] as $k => $v )
|
|
||||||
if( strlen($k)>3 )
|
|
||||||
$message .= "_SESSION['CVS']: $k = $v\n";
|
|
||||||
$message .= "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($_SERVER as $k => $v )
|
|
||||||
if( strpos( "0$k", "SERVER_")==0)
|
|
||||||
$message .= "_SERVER: $k = $v\n";
|
|
||||||
|
|
||||||
send_message($message);
|
|
||||||
|
|
||||||
// display error messages on screen too for developers
|
|
||||||
if ($_SESSION['CVS']['admin/debug.php']=='Y')
|
|
||||||
{
|
|
||||||
echo "<pre id='error'>\n".$message."</pre>";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
register_shutdown_function("send_errors");
|
|
||||||
|
|
||||||
// send jabber message and email
|
|
||||||
function send_message(&$message)
|
|
||||||
{
|
|
||||||
chdir(dirname(__FILE__));
|
|
||||||
require_once('../config/config_jabber.php');
|
|
||||||
|
|
||||||
if (isset($jabber_recipient) && count($jabber_recipient)) {
|
|
||||||
$jabber = new Jabber($server, $port, $username, $password, $resource);
|
|
||||||
if ($jabber->Connect() && $jabber->SendAuth()) {
|
|
||||||
foreach($jabber_recipient as $value)
|
|
||||||
{
|
|
||||||
$jabber->SendMessage($value, "normal", NULL, array("body" => $message, "subject" => "Error in Pentabarf"), NULL);
|
|
||||||
}
|
|
||||||
$jabber->Disconnect();
|
|
||||||
} else {
|
|
||||||
array_push($message, "Couldn't connect to Jabber Server.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset($mail_recipient) && count($mail_recipient)) {
|
|
||||||
foreach($mail_recipient as $to) {
|
|
||||||
mail($to, isset($mail_subject) ? $mail_subject : "Pentabarf Error", $message);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
@ -1,14 +0,0 @@
|
|||||||
<?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");
|
|
||||||
}
|
|
||||||
?>
|
|
@ -1,131 +0,0 @@
|
|||||||
<?php
|
|
||||||
function UID2DECT($UID) {
|
|
||||||
global $con;
|
|
||||||
$SQL = "SELECT DECT FROM `User` WHERE UID='$UID'";
|
|
||||||
$Erg = mysql_query($SQL, $con);
|
|
||||||
|
|
||||||
if(mysql_num_rows( $Erg) == 1)
|
|
||||||
return mysql_result($Erg, 0);
|
|
||||||
else
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
function RID2Room($RID) {
|
|
||||||
global $con;
|
|
||||||
$SQL = "SELECT Name FROM `Room` WHERE RID='$RID'";
|
|
||||||
$Erg = mysql_query($SQL, $con);
|
|
||||||
|
|
||||||
if(mysql_num_rows( $Erg) == 1)
|
|
||||||
return mysql_result($Erg, 0);
|
|
||||||
else
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
function TID2Engeltype($TID) {
|
|
||||||
global $con;
|
|
||||||
$SQL = "SELECT Name FROM `EngelType` WHERE TID='$TID'";
|
|
||||||
$Erg = mysql_query($SQL, $con);
|
|
||||||
|
|
||||||
if(mysql_num_rows( $Erg) == 1)
|
|
||||||
return mysql_result($Erg, 0);
|
|
||||||
else
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function DialNumberIAX( $DECTnumber, $Time, $RID, $TID) {
|
|
||||||
global $IAXenable, $IAXcontent, $IAXserver, $AnrufDelay, $DebugDECT, $Tempdir, $AsteriskOutputDir;
|
|
||||||
|
|
||||||
// Parameter verarbeiten
|
|
||||||
$TimeH = substr( $Time, 11, 2);
|
|
||||||
$TimeM = substr( $Time, 14, 2);
|
|
||||||
$TimeM = substr( $Time, 14, 2) + $AnrufDelay;
|
|
||||||
|
|
||||||
if($TimeM < 0) {
|
|
||||||
$TimeM += 60;
|
|
||||||
$TimeH -= 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($TimeH < 0)
|
|
||||||
$TimeH += 24;
|
|
||||||
|
|
||||||
if(strlen( $TimeH) == 1)
|
|
||||||
$TimeH = "0" . $TimeH;
|
|
||||||
|
|
||||||
if($IAXenable) {
|
|
||||||
$Message = "die-nee shisht beh-kinned, in where-neegin me-nooten . . . your shift beginns in a few minutes";
|
|
||||||
|
|
||||||
if(isset($SetHttpIAX)) {
|
|
||||||
$post_data = array();
|
|
||||||
$post_data['code'] = "89o8eu9cg4";
|
|
||||||
$post_data['callerid'] = "1023";
|
|
||||||
$post_data['nr'] = "$DECTnumber";
|
|
||||||
//$post_data['message'] = "Deine schicht beginnt in ein paar minuten . . . your shift beginns in a few minutes ";
|
|
||||||
$post_data['message'] = "die-nee shisht beh-kinned , in where-neegin me-nooten . . . your shift beginns in a few minutes ";
|
|
||||||
$url = "https://23c3.eventphone.de/~bef/call.php";
|
|
||||||
|
|
||||||
$o = "";
|
|
||||||
foreach ($post_data as $k => $v) {
|
|
||||||
$o.= "$k=" . urlencode(utf8_encode($v)) . "&";
|
|
||||||
}
|
|
||||||
|
|
||||||
$post_data = substr($o, 0, -1);
|
|
||||||
|
|
||||||
$ch = curl_init();
|
|
||||||
curl_setopt($ch, CURLOPT_POST, 1);
|
|
||||||
curl_setopt($ch, CURLOPT_HEADER, 0);
|
|
||||||
curl_setopt($ch, CURLOPT_URL, $url);
|
|
||||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
|
|
||||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
|
||||||
$result = curl_exec($ch);
|
|
||||||
echo curl_error($ch);
|
|
||||||
curl_close($ch);
|
|
||||||
} else {
|
|
||||||
// IAX file Schareiebn
|
|
||||||
$CallFile = $Tempdir. "/call_". date("Ymd_His"). "_$DECTnumber";
|
|
||||||
|
|
||||||
if($DebugDECT)
|
|
||||||
echo "IAX create file for dialing Number $DECTnumber\n";
|
|
||||||
|
|
||||||
$file = fopen( $CallFile, 'w');
|
|
||||||
|
|
||||||
if($file != false) {
|
|
||||||
fputs($file, "Channel: SIP/$DECTnumber@$IAXserver\n");
|
|
||||||
fputs($file, "Callerid: Engelserver\n");
|
|
||||||
fputs($file, "Extension: s\n");
|
|
||||||
fputs($file, "MaxRetries: 1\n");
|
|
||||||
fputs($file, "RetryTime: 10\n");
|
|
||||||
fputs($file, "SetVar: msg=$Message\n");
|
|
||||||
fclose($file);
|
|
||||||
system("chmod 777 " . $CallFile);
|
|
||||||
system("mv " . $CallFile . " " . $AsteriskOutputDir);
|
|
||||||
} else
|
|
||||||
echo "error: $CallFile not created";
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
if($DebugDECT)
|
|
||||||
echo "IAX is disable\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
function DialNumberModem($DECTnumber, $Time) {
|
|
||||||
global $AnrufDelay;
|
|
||||||
|
|
||||||
// Parameter verarbeiten
|
|
||||||
$TimeH = substr($Time, 11, 2);
|
|
||||||
$TimeM = substr($Time, 14, 2);
|
|
||||||
$TimeM = substr($Time, 14, 2) + $AnrufDelay;
|
|
||||||
|
|
||||||
if($TimeM < 0) {
|
|
||||||
$TimeM += 60;
|
|
||||||
$TimeH -= 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($TimeH < 0)
|
|
||||||
$TimeH += 24;
|
|
||||||
|
|
||||||
if(strlen( $TimeH) == 1)
|
|
||||||
$TimeH = "0" . $TimeH;
|
|
||||||
|
|
||||||
SetWackeup($DECTnumber, $TimeH, $TimeM);
|
|
||||||
}
|
|
||||||
?>
|
|
@ -1,145 +0,0 @@
|
|||||||
<?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<th>Feldname</th>\n<th>old Value</th>\n<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<td>$key</td>\n<td>$value</td>\n<td>" . $Data2[$key] . "</rd>\n</tr>";
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
foreach($Data1 as $key => $value) {
|
|
||||||
$Gefunden = true;
|
|
||||||
$Diff .= "<tr>\n<td>$key</td>\n<td>$value</td>\n<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,62 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
|
|
||||||
// Gibt eine Tabelle generisch als HTML aus
|
|
||||||
function funktion_db_list($Table_Name) {
|
|
||||||
global $con;
|
|
||||||
|
|
||||||
$html = "";
|
|
||||||
|
|
||||||
$SQL = "SELECT * FROM `" . $Table_Name . "`";
|
|
||||||
$Erg = mysql_query($SQL, $con);
|
|
||||||
|
|
||||||
// anzahl zeilen
|
|
||||||
$Zeilen = mysql_num_rows($Erg);
|
|
||||||
|
|
||||||
$Anzahl_Felder = mysql_num_fields($Erg);
|
|
||||||
|
|
||||||
$html .= "<table class=\"border\" cellpadding=\"2\" cellspacing=\"1\">";
|
|
||||||
$html .= "<caption>DB: $Table_Name</caption>";
|
|
||||||
|
|
||||||
$html .= "<tr class=\"contenttopic\">";
|
|
||||||
for ($m = 0; $m < $Anzahl_Felder; $m++) {
|
|
||||||
$html .= "<th>" . mysql_field_name($Erg, $m) . "</th>";
|
|
||||||
}
|
|
||||||
$html .= "</tr>";
|
|
||||||
|
|
||||||
for ($n = 0; $n < $Zeilen; $n++) {
|
|
||||||
$html .= "<tr class=\"content\">";
|
|
||||||
for ($m = 0; $m < $Anzahl_Felder; $m++) {
|
|
||||||
$html .= "<td>" . mysql_result($Erg, $n, $m) . "</td>";
|
|
||||||
}
|
|
||||||
$html .= "</tr>";
|
|
||||||
}
|
|
||||||
$html .= "</table>";
|
|
||||||
return $html;
|
|
||||||
}
|
|
||||||
|
|
||||||
function funktion_db_element_list_2row($TopicName, $SQL) {
|
|
||||||
$html = "";
|
|
||||||
$html .= "<table class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n";
|
|
||||||
$html .= "<caption>$TopicName</caption>";
|
|
||||||
# $html .= "<tr class=\"contenttopic\"> <td><h1>$TopicName</h1></td> </tr>\n";
|
|
||||||
|
|
||||||
$Erg = sql_query($SQL);
|
|
||||||
|
|
||||||
$html .= "<tr class=\"contenttopic\">";
|
|
||||||
for ($m = 0; $m < mysql_num_fields($Erg); $m++) {
|
|
||||||
$html .= "<th>" . mysql_field_name($Erg, $m) . "</th>";
|
|
||||||
}
|
|
||||||
$html .= "</tr>";
|
|
||||||
|
|
||||||
for ($n = 0; $n < mysql_num_rows($Erg); $n++) {
|
|
||||||
$html .= "<tr class=\"content\">";
|
|
||||||
for ($m = 0; $m < mysql_num_fields($Erg); $m++) {
|
|
||||||
$html .= "<td>" . mysql_result($Erg, $n, $m) . "</td>";
|
|
||||||
}
|
|
||||||
$html .= "</tr>";
|
|
||||||
}
|
|
||||||
$html .= "</table>\n";
|
|
||||||
return $html;
|
|
||||||
}
|
|
||||||
?>
|
|
File diff suppressed because it is too large
Load Diff
@ -1,34 +0,0 @@
|
|||||||
<?php
|
|
||||||
include "config_modem.php";
|
|
||||||
|
|
||||||
function DialNumber($Number) {
|
|
||||||
global $Dev, $ModemEnable;
|
|
||||||
|
|
||||||
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";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function SetWackeup( $Number, $TimeH, $TimeM)
|
|
||||||
{
|
|
||||||
global $WakeupNumber;
|
|
||||||
DialNumber( "$WakeupNumber$TimeH$TimeM$Number");
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
@ -1,180 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/*#######################################################
|
|
||||||
# Aufbau von Standart Feldern #
|
|
||||||
#######################################################*/
|
|
||||||
|
|
||||||
// erstellt ein Array der Reume
|
|
||||||
$sql = "SELECT `RID`, `Name` FROM `Room` ".
|
|
||||||
"WHERE `Show`='Y'".
|
|
||||||
"ORDER BY `Number`, `Name`;";
|
|
||||||
|
|
||||||
$Erg = mysql_query($sql, $con);
|
|
||||||
$rowcount = mysql_num_rows($Erg);
|
|
||||||
|
|
||||||
for ($i=0; $i<$rowcount; $i++)
|
|
||||||
{
|
|
||||||
$Room[$i]["RID"] = mysql_result($Erg, $i, "RID");
|
|
||||||
$Room[$i]["Name"] = mysql_result($Erg, $i, "Name");
|
|
||||||
|
|
||||||
$RoomID[ mysql_result($Erg, $i, "RID") ] = mysql_result($Erg, $i, "Name");
|
|
||||||
}
|
|
||||||
|
|
||||||
// erstellt ein Aray der Engeltypen
|
|
||||||
$sql = "SELECT `TID`, `Name` FROM `EngelType` ORDER BY `Name`";
|
|
||||||
$Erg = mysql_query($sql, $con);
|
|
||||||
$rowcount = mysql_num_rows($Erg);
|
|
||||||
for ($i=0; $i<$rowcount; $i++)
|
|
||||||
{
|
|
||||||
$EngelType[$i]["TID"] = mysql_result($Erg, $i, "TID");
|
|
||||||
$EngelType[$i]["Name"] = mysql_result($Erg, $i, "Name").Get_Text("inc_schicht_engel");
|
|
||||||
|
|
||||||
$EngelTypeID[ mysql_result($Erg, $i, "TID") ] =
|
|
||||||
mysql_result($Erg, $i, "Name").Get_Text("inc_schicht_engel");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*#######################################################
|
|
||||||
# gibt die engelschischten aus #
|
|
||||||
#######################################################*/
|
|
||||||
function ausgabe_Feld_Inhalt( $SID, $Man )
|
|
||||||
{
|
|
||||||
// gibt, nach übergabe der der SchichtID (SID) und der RaumBeschreibung,
|
|
||||||
// die eingetragenden und und offenden Schichteintäge zurück
|
|
||||||
global $EngelType, $EngelTypeID, $con;
|
|
||||||
//form Config
|
|
||||||
global $debug;
|
|
||||||
|
|
||||||
$Out = "";
|
|
||||||
|
|
||||||
$Out.= "<table border=\"0\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" frame=\"void\">\n";
|
|
||||||
|
|
||||||
$Out.= "<colgroup span=\"2\" align=\"left\" valign=\"center\">\n".
|
|
||||||
"<col width=\"45%\">\n".
|
|
||||||
"<col width=\"*\">\n".
|
|
||||||
"</colgroup>\n";
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////
|
|
||||||
// SQL abfrage für die benötigten schichten
|
|
||||||
///////////////////////////////////////////////////////////////////
|
|
||||||
$SQL = "SELECT * FROM `ShiftEntry` WHERE (`SID` = '$SID') ORDER BY `TID`, `UID` DESC ;";
|
|
||||||
$Erg = mysql_query($SQL, $con);
|
|
||||||
|
|
||||||
$Anzahl = mysql_num_rows($Erg);
|
|
||||||
$Feld=-1;
|
|
||||||
for( $i = 0; $i < $Anzahl; $i++ )
|
|
||||||
{
|
|
||||||
|
|
||||||
$Temp_TID = mysql_result($Erg, $i, "TID");
|
|
||||||
|
|
||||||
// wenn sich der Type ändert wird zumnästen feld geweckselt
|
|
||||||
if( ($i==0) || ($Temp_TID_old != $Temp_TID) )
|
|
||||||
{
|
|
||||||
$Feld++;
|
|
||||||
$Temp[$Feld]["free"]=0;
|
|
||||||
$Temp[$Feld]["Engel"]=array();
|
|
||||||
}
|
|
||||||
|
|
||||||
$Temp[$Feld]["TID"] = $Temp_TID;
|
|
||||||
$Temp[$Feld]["UID"] = mysql_result($Erg, $i, "UID");
|
|
||||||
|
|
||||||
// ist es eine zu vergeben schicht?
|
|
||||||
if( $Temp[$Feld]["UID"] == 0 )
|
|
||||||
$Temp[$Feld]["free"]++;
|
|
||||||
else
|
|
||||||
$Temp[$Feld]["Engel"][] = $Temp[$Feld]["UID"];
|
|
||||||
|
|
||||||
$Temp_TID_old = $Temp[$Feld]["TID"];
|
|
||||||
} // FOR
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////
|
|
||||||
// Aus gabe der Schicht
|
|
||||||
///////////////////////////////////////////////////////////////////
|
|
||||||
if( isset($Temp) && count($Temp) )
|
|
||||||
foreach( $Temp as $TempEntry => $TempValue )
|
|
||||||
{
|
|
||||||
$Out.= "<tr>\n";
|
|
||||||
|
|
||||||
// ausgabe EngelType
|
|
||||||
$Out.= "<td>". $EngelTypeID[ $TempValue["TID"] ];
|
|
||||||
|
|
||||||
// ausgabe Eingetragener Engel
|
|
||||||
if( count($TempValue["Engel"]) > 0 )
|
|
||||||
{
|
|
||||||
if( count($TempValue["Engel"]) == 1 )
|
|
||||||
$Out.= " ". trim(Get_Text("inc_schicht_ist")). ":";
|
|
||||||
else
|
|
||||||
$Out.= " ". trim(Get_Text("inc_schicht_sind")). ":";
|
|
||||||
$Out.= "</td>\n";
|
|
||||||
$Out.= "<td>";
|
|
||||||
|
|
||||||
foreach( $TempValue["Engel"] as $TempEngelEntry=> $TempEngelID )
|
|
||||||
$Out.= UID2Nick( $TempEngelID ). ", ";
|
|
||||||
// $Out.= UID2Nick( $TempEngelID ). DisplayAvatar( $TempEngelID ). ", ";
|
|
||||||
$Out = substr( $Out, 0, strlen($Out)-2 );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$Out.= ":</td>\n";
|
|
||||||
$Out.= "<td>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ausgabe benötigter Engel
|
|
||||||
////////////////////////////
|
|
||||||
if( $_SESSION['CVS']["nonpublic/schichtplan_add.php"] == "Y")
|
|
||||||
{
|
|
||||||
if ( $TempValue["free"] > 0)
|
|
||||||
{
|
|
||||||
if( count($TempValue["Engel"]) > 0)
|
|
||||||
$Out.= ", ";
|
|
||||||
$Out.= $TempValue["free"]. "x free ";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$Out.= "</td>\n";
|
|
||||||
$Out.= "</tr>\n";
|
|
||||||
|
|
||||||
} // FOREACH
|
|
||||||
|
|
||||||
$Out.= "</table>\n";
|
|
||||||
|
|
||||||
return $Out;
|
|
||||||
} // function Ausgabe_Feld_Inhalt
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*#######################################################
|
|
||||||
# gibt die engelschischten für einen Ruam aus #
|
|
||||||
#######################################################*/
|
|
||||||
function ausgabe_Zeile( $RID, $Time, &$AnzahlEintraege )
|
|
||||||
{
|
|
||||||
global $con;
|
|
||||||
|
|
||||||
$SQL = "SELECT `SID`, `Len`, `Man` FROM `Shifts` ".
|
|
||||||
"WHERE ( (`RID` = '$RID') AND ".
|
|
||||||
"((`DateE` like '". gmdate("Y-m-d H", $Time+3600). "%') OR ".
|
|
||||||
" (`DateS` like '". gmdate("Y-m-d H", $Time). "%')) ) ORDER BY `DateS`;";
|
|
||||||
|
|
||||||
$ErgRoom = mysql_query($SQL, $con);
|
|
||||||
$Out= "<td>";
|
|
||||||
if( mysql_num_rows( $ErgRoom)>0 )
|
|
||||||
for( $i=1; $i<=mysql_num_rows( $ErgRoom); $i++ )
|
|
||||||
{
|
|
||||||
$AnzahlEintraege++;
|
|
||||||
$Out.= ausgabe_Feld_Inhalt( mysql_result( $ErgRoom, $i-1, "SID"),
|
|
||||||
mysql_result( $ErgRoom, $i-1, "Man"));
|
|
||||||
if( (mysql_num_rows( $ErgRoom) > 1) && !($i==mysql_num_rows( $ErgRoom)) )
|
|
||||||
$Out.= "<br />";
|
|
||||||
// $Out.= "<hr width=\"95%\" align=\"center\">\n";
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
$Out.= " ";
|
|
||||||
|
|
||||||
$Out.= "</td>\n";
|
|
||||||
|
|
||||||
return $Out;
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
@ -1,102 +0,0 @@
|
|||||||
<?php
|
|
||||||
include "header_start.php";
|
|
||||||
|
|
||||||
echo "<!DOCTYPE html>\n";
|
|
||||||
?>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
|
|
||||||
<title><?php echo $title; ?> - Engelsystem</title>
|
|
||||||
<meta charset="UTF-8" />
|
|
||||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
|
||||||
<meta name="content-style-type" content="text/css" />
|
|
||||||
<meta name="keywords" content="Engel, Himmelsverwaltung" />
|
|
||||||
<meta http-equiv="Content-Style-Type" content="text/css" />
|
|
||||||
<meta http-equiv="expires" content="0" />
|
|
||||||
<meta name="robots" content="index" />
|
|
||||||
<meta name="revisit-after" content="1 days" />
|
|
||||||
<script type="text/javascript" src="css/grossbild.js"></script>
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/base.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/style<?php echo isset($_SESSION['color']) ? $_SESSION['color'] : $default_theme ?>.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="../css/base.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="../css/style<?php echo isset($_SESSION['color']) ? $_SESSION['color'] : $default_theme ?>.css" />
|
|
||||||
|
|
||||||
<?php
|
|
||||||
if (isset ($reload)) {
|
|
||||||
if ($reload == "")
|
|
||||||
$reload = 3330;
|
|
||||||
|
|
||||||
echo "\n<meta http-equiv=\"refresh\" content=\"" . $reload . "; URL=./?reload=" . $reload . "\">\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isset ($Page["AutoReload"]))
|
|
||||||
echo "\n<meta http-equiv=\"refresh\" content=\"" . $Page["AutoReload"] .
|
|
||||||
"; URL=" . $url . $ENGEL_ROOT . $Page["Name"] . "\">\n";
|
|
||||||
|
|
||||||
echo "</head>\n";
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
////////////////////////////////////// B O D Y
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
echo "<body class=\"background\">\n";
|
|
||||||
|
|
||||||
echo '<header><a href="' . $url . $ENGEL_ROOT . '" id="logo"></a></header>';
|
|
||||||
|
|
||||||
//ausgabe new message
|
|
||||||
if (isset ($_SESSION['CVS']["nonpublic/messages.php"])) {
|
|
||||||
if ($_SESSION['CVS']["nonpublic/messages.php"] == "Y") {
|
|
||||||
$SQL = "SELECT `Datum` FROM `Messages` WHERE `RUID`=" . $_SESSION["UID"] . " AND `isRead`='N'";
|
|
||||||
$erg = mysql_query($SQL, $con);
|
|
||||||
if (mysql_num_rows($erg) > 0)
|
|
||||||
echo "<br /><a href=\"" . $url . $ENGEL_ROOT .
|
|
||||||
"nonpublic/messages.php\">" . Get_Text("pub_messages_new1") .
|
|
||||||
" " . mysql_num_rows($erg) . " " .
|
|
||||||
Get_Text("pub_messages_new2") . "</a><br /><br />";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<div id="body">
|
|
||||||
<div id="menu">
|
|
||||||
<?php
|
|
||||||
|
|
||||||
|
|
||||||
//ausgaeb Menu
|
|
||||||
if (!isset ($_SESSION['Menu']))
|
|
||||||
$_SESSION['Menu'] = "L";
|
|
||||||
if ($_SESSION['Menu'] == "L")
|
|
||||||
include ("menu.php");
|
|
||||||
?>
|
|
||||||
</div>
|
|
||||||
<div id="content" class="container">
|
|
||||||
<?php
|
|
||||||
|
|
||||||
|
|
||||||
echo '<h1>' . (strlen($header) == 0 ? Get_Text($Page["Name"]) : $header) . '</h1>';
|
|
||||||
echo '<article class="content">';
|
|
||||||
|
|
||||||
if (isset ($_SESSION['UID'])) {
|
|
||||||
if (isset ($_SESSION['oldurl']))
|
|
||||||
$BACKUP_SESSION_OLDURL = $_SESSION['oldurl'];
|
|
||||||
if (isset ($_SESSION['newurl']))
|
|
||||||
$_SESSION['oldurl'] = $_SESSION['newurl'];
|
|
||||||
$_SESSION['newurl'] = $_SERVER["REQUEST_URI"];
|
|
||||||
}
|
|
||||||
|
|
||||||
function SetHeaderGo2Back() {
|
|
||||||
global $BACKUP_SESSION_OLDURL;
|
|
||||||
$_SESSION['oldurl'] = $BACKUP_SESSION_OLDURL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($Page["CVS"] != "Y") {
|
|
||||||
echo "Du besitzt kein Rechte für diesen Bereich.<br />\n";
|
|
||||||
|
|
||||||
if (isset ($_SESSION['oldurl']))
|
|
||||||
echo "<a href=\"" . $_SESSION["oldurl"] . "\">hier</a> gehts zurück...\n";
|
|
||||||
else
|
|
||||||
echo "<a href=\"" . $url . $ENGEL_ROOT . "\">hier</a> geht's zurück...\n";
|
|
||||||
|
|
||||||
exit ();
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!-- ende des header parts //-->
|
|
@ -1,56 +0,0 @@
|
|||||||
<?php
|
|
||||||
// Momentan keine Avatar-Funktionen
|
|
||||||
die();
|
|
||||||
|
|
||||||
require_once ('bootstrap.php');
|
|
||||||
|
|
||||||
include "config/config.php";
|
|
||||||
include "includes/error_handler.php";
|
|
||||||
include "config/config_db.php";
|
|
||||||
|
|
||||||
if (!isset ($_SESSION))
|
|
||||||
session_start();
|
|
||||||
|
|
||||||
include "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,132 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once ('../bootstrap.php');
|
|
||||||
|
|
||||||
$title = "UserPicture";
|
|
||||||
$header = "Verwaltung der User Picture";
|
|
||||||
|
|
||||||
include ("includes/header.php");
|
|
||||||
include ("includes/funktion_schichtplan_aray.php");
|
|
||||||
|
|
||||||
if (IsSet ($_GET["action"])) {
|
|
||||||
UnSet ($SQL);
|
|
||||||
|
|
||||||
switch ($_GET["action"]) {
|
|
||||||
case 'FormUpload' :
|
|
||||||
echo "Hier kannst Du ein Foto hochladen för:";
|
|
||||||
echo "<form action=\"./UserPicture.php?action=sendPicture\" method=\"post\" enctype=\"multipart/form-data\">\n";
|
|
||||||
echo "\t<select name=\"UID\">\n";
|
|
||||||
$usql = "SELECT * FROM `User` ORDER BY `Nick`";
|
|
||||||
$uErg = mysql_query($usql, $con);
|
|
||||||
for ($k = 0; $k < mysql_num_rows($uErg); $k++)
|
|
||||||
echo "\t\t<option value=\"" . mysql_result($uErg, $k, "UID") . "\">" . mysql_result($uErg, $k, "Nick") . "</option>\n";
|
|
||||||
echo "\t</select>\n";
|
|
||||||
echo "\t<input type=\"hidden\" name=\"action\" value=\"sendPicture\">\n";
|
|
||||||
echo "\t<input name=\"file\" type=\"file\" size=\"50\" maxlength=\"" . get_cfg_var("post_max_size") . "\">\n";
|
|
||||||
echo "\t(max " . get_cfg_var("post_max_size") . "Byte)<br />\n";
|
|
||||||
echo "\t<input type=\"submit\" value=\"" . Get_Text("upload"), "\">\n";
|
|
||||||
echo "</form>\n";
|
|
||||||
break;
|
|
||||||
case 'sendPicture' :
|
|
||||||
if (($_FILES["file"]["size"] > 0) && (isset ($_POST["UID"]))) {
|
|
||||||
if (($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/png") || ($_FILES["file"]["type"] == "image/gif")) {
|
|
||||||
$data = addslashes(fread(fopen($_FILES["file"]["tmp_name"], "r"), filesize($_FILES["file"]["tmp_name"])));
|
|
||||||
|
|
||||||
if (GetPicturShow($_POST['UID']) == "")
|
|
||||||
$SQL = "INSERT INTO `UserPicture` " .
|
|
||||||
"( `UID`,`Bild`, `ContentType`, `show`) " .
|
|
||||||
"VALUES ('" . $_POST['UID'] . "', '$data', '" . $_FILES["file"]["type"] . "', 'N')";
|
|
||||||
else
|
|
||||||
$SQL = "UPDATE `UserPicture` SET " .
|
|
||||||
"`Bild`='$data', " .
|
|
||||||
"`ContentType`='" . $_FILES["file"]["type"] . "' " .
|
|
||||||
"WHERE `UID`='" . $_POST['UID'] . "'";
|
|
||||||
|
|
||||||
echo "Upload Pictur:'" . $_FILES["file"]["name"] . "', " .
|
|
||||||
"MIME-Type: " . $_FILES["file"]["type"] . ", " .
|
|
||||||
$_FILES["file"]["size"] . " Byte " .
|
|
||||||
"for " . UID2Nick($_POST["UID"]);
|
|
||||||
} else
|
|
||||||
Print_Text("pub_einstellungen_send_KO");
|
|
||||||
} else
|
|
||||||
Print_Text("pub_einstellungen_send_KO");
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'SetN' :
|
|
||||||
if (IsSet ($_GET["UID"])) {
|
|
||||||
echo "Bild von '" . UID2Nick($_GET["UID"]) . "' wurde gesperrt:<br />";
|
|
||||||
$SQL = "UPDATE `UserPicture` SET `show`='N' WHERE `UID`='" . $_GET["UID"] . "'";
|
|
||||||
} else
|
|
||||||
echo "Fehlerhafter Aufruf";
|
|
||||||
break;
|
|
||||||
case 'SetY' :
|
|
||||||
if (IsSet ($_GET["UID"])) {
|
|
||||||
echo "Bild von '" . UID2Nick($_GET["UID"]) . "' wurde Freigegeben:<br />";
|
|
||||||
$SQL = "UPDATE `UserPicture` SET `show`='Y' WHERE `UID`='" . $_GET["UID"] . "'";
|
|
||||||
} else
|
|
||||||
echo "Fehlerhafter Aufruf";
|
|
||||||
break;
|
|
||||||
case 'del' :
|
|
||||||
echo "Wollen Sie das Bild von '" . UID2Nick($_GET["UID"]) . "' wirklich löschen? " .
|
|
||||||
"<a href=\"./UserPicture.php?action=delYes&UID=" . $_GET["UID"] . "\">Yes</a>";
|
|
||||||
break;
|
|
||||||
case 'delYes' :
|
|
||||||
if (IsSet ($_GET["UID"])) {
|
|
||||||
echo "Bild von '" . UID2Nick($_GET["UID"]) . "' wurde gelöscht:<br />";
|
|
||||||
$SQL = "DELETE FROM `UserPicture` WHERE `UID`='" . $_GET["UID"] . "' LIMIT 1";
|
|
||||||
} else
|
|
||||||
echo "Fehlerhafter Aufruf";
|
|
||||||
break;
|
|
||||||
default :
|
|
||||||
echo "Fehlerhafter Aufruf";
|
|
||||||
|
|
||||||
} //switch
|
|
||||||
|
|
||||||
// Update ???
|
|
||||||
if (IsSet ($SQL)) {
|
|
||||||
// hier muesste das SQL ausgefuehrt werden...
|
|
||||||
$Erg = mysql_query($SQL, $con);
|
|
||||||
if ($Erg == 1)
|
|
||||||
echo "Änderung wurde gesichert...<br />";
|
|
||||||
else {
|
|
||||||
echo "Fehler beim speichern... bitte noch ein mal probieren :)";
|
|
||||||
echo "<br /><br />" . mysql_error($con) . "<br />($SQL)<br />";
|
|
||||||
}
|
|
||||||
} // Ende Update
|
|
||||||
echo "<br />\n<hr width=\"100%\">\n<br />\n\n";
|
|
||||||
} //IF IsSet($action)
|
|
||||||
|
|
||||||
//ausgabe der Liste
|
|
||||||
$Sql = "SELECT * FROM `UserPicture` WHERE `UID`>0;";
|
|
||||||
$Erg = mysql_query($Sql, $con);
|
|
||||||
|
|
||||||
echo "Hallo " . $_SESSION['Nick'] . ",<br />\nhier hast du die Möglichkeit, die Bilder der Engel freizugeben:<br /><br />\n";
|
|
||||||
|
|
||||||
echo "<table width=\"100%\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n";
|
|
||||||
echo "<tr class=\"contenttopic\">\n";
|
|
||||||
echo "\t<td>User</td>\n";
|
|
||||||
echo "\t<td>Bild</td>\n";
|
|
||||||
echo "\t<td>Status</td>\n";
|
|
||||||
echo "\t<td>Löschen</td>\n";
|
|
||||||
echo "</tr>";
|
|
||||||
|
|
||||||
for ($t = 0; $t < mysql_num_rows($Erg); $t++) {
|
|
||||||
$UIDs = mysql_result($Erg, $t, "UID");
|
|
||||||
echo "\t<tr class=\"content\">\n";
|
|
||||||
|
|
||||||
echo "\t\t<td>" . UID2Nick(mysql_result($Erg, $t, "UID")) . "</td>\n";
|
|
||||||
echo "\t\t<td>" . displayPictur($UIDs, 0) . "</td>\n";
|
|
||||||
|
|
||||||
if (GetPicturShow($UIDs) == "Y")
|
|
||||||
echo "\t\t<td><a href=\"./UserPicture.php?action=SetN&UID=$UIDs\">sperren</a></td>\n";
|
|
||||||
elseif (GetPicturShow($UIDs) == "N") echo "\t\t<td><a href=\"./UserPicture.php?action=SetY&UID=$UIDs\">freigeben</a></td>\n";
|
|
||||||
else
|
|
||||||
echo "\t\t<td>ERROR: show='" . GetPicturShow($UIDs) . "'</td>\n";
|
|
||||||
echo "\t\t<td><a href=\"./UserPicture.php?action=del&UID=$UIDs\">del</a></td>\n";
|
|
||||||
echo "\t</tr>\n";
|
|
||||||
} // ende Auflistung Raeume
|
|
||||||
echo "</table>";
|
|
||||||
|
|
||||||
echo "<br /><a href=\"./UserPicture.php?action=FormUpload\">picture upload</a>\n";
|
|
||||||
|
|
||||||
include ("includes/footer.php");
|
|
||||||
?>
|
|
@ -1,105 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once ('../bootstrap.php');
|
|
||||||
|
|
||||||
$title = "akive Engel";
|
|
||||||
$header = "Liste der aktiven Engel";
|
|
||||||
include ("includes/header.php");
|
|
||||||
include ("includes/funktion_db_list.php");
|
|
||||||
|
|
||||||
echo "<form action=\"./aktiv.php\" method=\"post\">";
|
|
||||||
echo Get_Text("pub_aktive_Text1") . "<br />\n";
|
|
||||||
echo Get_Text("pub_aktive_Text2") . "<br /><br />\n";
|
|
||||||
|
|
||||||
// auswahlbox
|
|
||||||
echo Get_Text("pub_aktive_Text31") . "\n";
|
|
||||||
echo "<select name=\"Anzahl\">\n";
|
|
||||||
for ($i = 0; $i < 50; $i++)
|
|
||||||
echo "\t<option value=\"$i\">$i</option>\n";
|
|
||||||
echo "</select>";
|
|
||||||
echo Get_Text("pub_aktive_Text32") . "<br /><br />\n";
|
|
||||||
echo "<input type=\"submit\" name=\"SendType\" value=\"Show..\">\n";
|
|
||||||
echo "<input type=\"submit\" name=\"SendType\" value=\"Write..\">\n";
|
|
||||||
echo "</form>\n";
|
|
||||||
|
|
||||||
echo "<form action=\"./aktiv.php\" method=\"post\">\n";
|
|
||||||
echo "\t<br /><input type=\"submit\" name=\"ResetActive\" value=\"reset Active setting\">\n";
|
|
||||||
echo "</form>\n";
|
|
||||||
|
|
||||||
if (Isset ($_POST["ResetActive"])) {
|
|
||||||
$SQLreset = "UPDATE `User` SET `Aktiv`='0'";
|
|
||||||
$ErgReset = db_query($SQLreset, "Reset Active");
|
|
||||||
if ($ErgReset != 1)
|
|
||||||
echo "Fehler beim zuruecksetzen der Activ\n";
|
|
||||||
else
|
|
||||||
echo "Active wurde erfolgreich zurueckgesetzt\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (IsSet ($_POST["Anzahl"]))
|
|
||||||
echo "<br />\n\n" . Get_Text("pub_aktive_Text5_1") . $_POST["Anzahl"] . Get_Text("pub_aktive_Text5_2") . ":";
|
|
||||||
|
|
||||||
echo "<br /><br />\n\n";
|
|
||||||
|
|
||||||
//ausgabe tabelle
|
|
||||||
echo "<table width=\"100%\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n";
|
|
||||||
echo "<tr class=\"contenttopic\">\n";
|
|
||||||
echo "\t<td>" . Get_Text("pub_aktive_Nick") . "</td>\n";
|
|
||||||
echo "\t<td>" . Get_Text("pub_aktive_Anzahl") . "</td>\n";
|
|
||||||
echo "\t<td>" . Get_Text("pub_aktive_Time") . "</td>\n";
|
|
||||||
echo "\t<td>" . Get_Text("pub_aktive_Time") . " Weight</td>\n";
|
|
||||||
echo "\t<td>Freeloader " . Get_Text("pub_aktive_Anzahl") . "</td>\n";
|
|
||||||
echo "\t<td>Freeloader " . Get_Text("pub_aktive_Time") . "</td>\n";
|
|
||||||
echo "\t<td>" . Get_Text("pub_aktive_Time") . " result</td>\n";
|
|
||||||
echo "\t<td>" . Get_Text("pub_aktive_Active") . "</td>\n";
|
|
||||||
echo "</tr>\n";
|
|
||||||
|
|
||||||
$SQL = "
|
|
||||||
SELECT d.UID, d.nr, d.len, d.lenWeight, f.nr AS nrFree, f.len AS lenFree, d.lenWeight - COALESCE(f.len, 0) as lenReal
|
|
||||||
FROM
|
|
||||||
(SELECT e.UID, COUNT(s.Len) as nr, SUM(s.Len) as len, SUM( s.Len*(1+(((HOUR(s.DateS)+2)%24)<10 and ((HOUR(s.DateE)+2)%24)<=10)) ) as lenWeight FROM `Shifts` AS s INNER JOIN `ShiftEntry` AS e USING(SID) WHERE NOT UID=0 GROUP BY UID) as d
|
|
||||||
LEFT JOIN
|
|
||||||
(SELECT UID, COUNT(Length) AS nr, SUM(Length) AS len FROM `ShiftFreeloader` GROUP BY UID) AS f
|
|
||||||
USING(UID)
|
|
||||||
ORDER BY lenReal DESC, nr DESC, UID";
|
|
||||||
|
|
||||||
$Erg = mysql_query($SQL, $con);
|
|
||||||
echo mysql_error($con);
|
|
||||||
$rowcount = mysql_num_rows($Erg);
|
|
||||||
|
|
||||||
$aktivecount = 0;
|
|
||||||
for ($i = 0; $i < $rowcount; $i++) {
|
|
||||||
echo "\n\n\t<tr class=\"content\">\n";
|
|
||||||
echo "\t\t<td>" . UID2Nick(mysql_result($Erg, $i, "UID")) . "</td>\n";
|
|
||||||
echo "\t\t<td>" . mysql_result($Erg, $i, "nr") . "x</td>\n";
|
|
||||||
echo "\t\t<td>" . mysql_result($Erg, $i, "len") . "h</td>\n";
|
|
||||||
echo "\t\t<td>" . mysql_result($Erg, $i, "lenWeight") . "h</td>\n";
|
|
||||||
echo "\t\t<td>" . mysql_result($Erg, $i, "nrFree") . "x</td>\n";
|
|
||||||
echo "\t\t<td>" . mysql_result($Erg, $i, "lenFree") . "h</td>\n";
|
|
||||||
echo "\t\t<td>" . mysql_result($Erg, $i, "lenReal") . "h</td>\n";
|
|
||||||
|
|
||||||
echo "\t\t<td>";
|
|
||||||
if (IsSet ($_POST["Anzahl"])) {
|
|
||||||
if ($_POST["Anzahl"] < mysql_result($Erg, $i, "lenReal")) {
|
|
||||||
$aktivecount++;
|
|
||||||
if ($_POST["SendType"] == "Show..")
|
|
||||||
echo "show set";
|
|
||||||
else {
|
|
||||||
$SQL2 = "UPDATE `User` SET `Aktiv`='1' WHERE `UID`='" . mysql_result($Erg, $i, "UID") . "' LIMIT 1";
|
|
||||||
$Erg2 = db_query($SQL2, "update Active State");
|
|
||||||
if ($Erg2 != 1)
|
|
||||||
echo "Fehler beim speichern bei Engel " . UID2Nick(mysql_result($Erg, $i, "UID"));
|
|
||||||
else
|
|
||||||
echo "write set";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
echo "</td>\n";
|
|
||||||
echo "\t</tr>\n";
|
|
||||||
} // ende Auflistung aktive Engel
|
|
||||||
|
|
||||||
echo "</table>";
|
|
||||||
|
|
||||||
echo "<br />Anzahl eintraege: $aktivecount / $rowcount (Aktive/Mitschichten)<br /><br />";
|
|
||||||
|
|
||||||
include ("includes/footer.php");
|
|
||||||
?>
|
|
||||||
|
|
@ -1,69 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once ('../bootstrap.php');
|
|
||||||
|
|
||||||
$title = "Engelsystem - DECT";
|
|
||||||
$header = "DECT send call";
|
|
||||||
include ("includes/header.php");
|
|
||||||
|
|
||||||
include ("config/config_IAX.php");
|
|
||||||
//include ("includes/funktion_modem.php");
|
|
||||||
include ("includes/funktion_cron.php");
|
|
||||||
|
|
||||||
if (!isset ($_GET["dial"]))
|
|
||||||
$_GET["dial"] = "";
|
|
||||||
if (!isset ($_GET["custum"]))
|
|
||||||
$_GET["custum"] = "";
|
|
||||||
|
|
||||||
if ($_GET["dial"] == "dial") {
|
|
||||||
if ($_GET["DECT"] == "")
|
|
||||||
$Number = $_GET["custum"];
|
|
||||||
else
|
|
||||||
$Number = $_GET["DECT"];
|
|
||||||
|
|
||||||
if (strlen($_GET["timeh"]) == 1)
|
|
||||||
$_GET["timeh"] = "0" . $_GET["timeh"];
|
|
||||||
|
|
||||||
if (strlen($_GET["timem"]) == 1)
|
|
||||||
$_GET["timem"] = "0" . $_GET["timem"];
|
|
||||||
|
|
||||||
// SetWackeup( $Number, $_GET["timeh"], $_GET["timem"]);
|
|
||||||
DialNumberIAX($Number, $_GET["timeh"], $_GET["timem"], 0);
|
|
||||||
|
|
||||||
$_GET["custum"] = $Number;
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "<form action=\"./dect.php\" method=\"GET\">\n";
|
|
||||||
echo "<table>\n";
|
|
||||||
|
|
||||||
echo "<tr><th>Number</th><th>h:m</th><th></th></tr>\n";
|
|
||||||
|
|
||||||
echo "<tr><td>\n";
|
|
||||||
// Listet alle Nicks auf
|
|
||||||
echo "<select name=\"DECT\">\n";
|
|
||||||
echo "\t<option value=\"\">costum</option>\n";
|
|
||||||
|
|
||||||
$usql = "SELECT * FROM `User` WHERE NOT `DECT`='' ORDER BY `Nick`";
|
|
||||||
$uErg = mysql_query($usql, $con);
|
|
||||||
$urowcount = mysql_num_rows($uErg);
|
|
||||||
for ($k = 0; $k < $urowcount; $k++) {
|
|
||||||
echo "\t<option value=\"" . mysql_result($uErg, $k, "DECT") . "\">" .
|
|
||||||
mysql_result($uErg, $k, "Nick") .
|
|
||||||
" (" . mysql_result($uErg, $k, "DECT") . ")" .
|
|
||||||
"</option>\n";
|
|
||||||
}
|
|
||||||
echo "</select>\n";
|
|
||||||
|
|
||||||
echo "<input type=\"text\" name=\"custum\" size=\"4\" maxlength=\"4\" value=\"" . $_GET["custum"] . "\">\n";
|
|
||||||
echo "</td>\n";
|
|
||||||
|
|
||||||
echo "<td><input type=\"text\" name=\"timeh\" size=\"2\" maxlength=\"2\" value=\"" . gmdate("H", time() + 90 + 3600) . "\">:";
|
|
||||||
echo "<input type=\"text\" name=\"timem\" size=\"2\" maxlength=\"2\" value=\"" . gmdate("i", time() + 90 + 3600) . "\"></td>\n";
|
|
||||||
echo "<td><input type=\"submit\" name=\"dial\" value=\"dial\"></td>\n";
|
|
||||||
echo "</tr>";
|
|
||||||
echo "</table>\n";
|
|
||||||
|
|
||||||
echo "</form>";
|
|
||||||
|
|
||||||
include ("includes/footer.php");
|
|
||||||
?>
|
|
||||||
|
|
@ -1,98 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once ('../bootstrap.php');
|
|
||||||
|
|
||||||
$title = "Erzengel";
|
|
||||||
$header = "Freie Engel";
|
|
||||||
include ("includes/header.php");
|
|
||||||
include ("includes/funktion_db_list.php");
|
|
||||||
|
|
||||||
echo "Hallo " . $_SESSION['Nick'] . ",<br />\n";
|
|
||||||
|
|
||||||
echo "<br /><br />\n\nHier findest du alle Engel, welche zur Zeit in keiner Schicht verplant sind:<br /><br />\n";
|
|
||||||
|
|
||||||
#######################################################
|
|
||||||
# Ermitteln freier Engel
|
|
||||||
#
|
|
||||||
# auslesen aller Engel und dazugehoerige Schichten
|
|
||||||
#######################################################
|
|
||||||
|
|
||||||
// $SQL= "SELECT User.Nick, Schichtplan.*, Schichtbelegung. * FROM User LEFT JOIN Schichtplan ON User.UID=Schichtbelegung.UID, Schichtplan.SID LEFT JOIN Schichtbelegung.SID WHERE User.UID = Schichtbelegung.UID AND Schichtplan.SID = Schichtbelegung.SID AND Schichtplan.Date < now() and Schichtplan.EndDate > now() ORDER BY Nick";
|
|
||||||
|
|
||||||
/* geht nicht ??? unter stabel !!
|
|
||||||
$SQL= "SELECT User.Nick, Schichtplan.*, Schichtbelegung.* ".
|
|
||||||
"FROM Schichtplan, User LEFT OUTER ".
|
|
||||||
"JOIN Schichtbelegung ON User.UID=Schichtbelegung.UID ".
|
|
||||||
"WHERE Schichtplan.SID = Schichtbelegung.SID AND ".
|
|
||||||
"Schichtplan.Date < now() and ".
|
|
||||||
"Schichtplan.EndDate > now() ".
|
|
||||||
"ORDER BY Nick";
|
|
||||||
|
|
||||||
$SQL = "SELECT Shifts.*, ShiftEntry.*, User.Nick ".
|
|
||||||
"FROM User ".
|
|
||||||
"INNER JOIN (Shifts INNER JOIN ShiftEntry ON Shifts.SID = ShiftEntry.SID) ON User.UID = ShiftEntry.UID ".
|
|
||||||
"WHERE (Shifts.DateS<=Now() AND Shifts.DateE>=Now() );";
|
|
||||||
*/
|
|
||||||
$SQL = "SELECT Shifts.*, ShiftEntry.* " .
|
|
||||||
"FROM `Shifts` INNER JOIN ShiftEntry ON Shifts.SID = ShiftEntry.SID " .
|
|
||||||
"WHERE (Shifts.DateS<=Now() AND Shifts.DateE>=Now() AND ShiftEntry.UID>0);";
|
|
||||||
|
|
||||||
//SELECT User.Nick, Schichtplan.*, Schichtbelegung. * FROM User LEFT JOIN Schichtbelegung ON User.UID=Schichtbelegung.UID, Schichtplan LEFT JOIN Schichtbelegung ON Schichtplan.SID = Schichtbelegung.SID WHERE Schichtplan.Date < now() and Schichtplan.EndDate > now() ORDER BY Nick
|
|
||||||
|
|
||||||
//echo "<pre>$SQL</pre>";
|
|
||||||
|
|
||||||
$Erg = mysql_query($SQL, $con);
|
|
||||||
$Zeilen = mysql_num_rows($Erg);
|
|
||||||
|
|
||||||
// for ($i = 1; $i < mysql_num_fields($Erg); $i++)
|
|
||||||
// echo "|".mysql_field_name($Erg, $i);
|
|
||||||
|
|
||||||
echo "<table width=\"100%\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n";
|
|
||||||
echo "\t<tr class=\"contenttopic\">\n";
|
|
||||||
echo "\t\t<td>Nick</td>\n";
|
|
||||||
echo "\t\t<td>Schicht</td>\n";
|
|
||||||
echo "\t\t<td>Ort</td>\n";
|
|
||||||
echo "\t\t<td>Von</td>\n";
|
|
||||||
echo "\t\t<td>Bis</td>\n";
|
|
||||||
echo "\t</tr>\n";
|
|
||||||
|
|
||||||
$inuse = "";
|
|
||||||
for ($i = 0; $i < $Zeilen; $i++) {
|
|
||||||
echo "<tr class=\"content\">\n";
|
|
||||||
echo "<td><a href=\"./userChangeNormal.php?Type=Normal&enterUID=" . mysql_result($Erg, $i, "UID") . "\">" .
|
|
||||||
UID2Nick(mysql_result($Erg, $i, "UID")) . "</td></a>\n";
|
|
||||||
echo "<td></td>\n";
|
|
||||||
echo "<td>" . mysql_result($Erg, $i, "RID") . "</td>\n";
|
|
||||||
echo "<td>" . mysql_result($Erg, $i, "DateS") . "</td>\n";
|
|
||||||
echo "<td>" . mysql_result($Erg, $i, "DateE") . "</td>\n";
|
|
||||||
echo "</tr>\n";
|
|
||||||
|
|
||||||
if ($inuse != "")
|
|
||||||
$inuse .= " OR ";
|
|
||||||
$inuse .= "(Nick = \"" . UID2Nick(mysql_result($Erg, $i, "UID")) . "\")";
|
|
||||||
}
|
|
||||||
if ($inuse != "")
|
|
||||||
$inuse = " WHERE NOT (" .
|
|
||||||
$inuse . ")";
|
|
||||||
echo "</table>\n";
|
|
||||||
|
|
||||||
//##########################################################################################################
|
|
||||||
|
|
||||||
echo "<br /><br />\n\nhier findest du alle Engel, welche zur Zeit in keiner Schichten verplant sind:<br /><br />\n";
|
|
||||||
echo "<table width=\"100%\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\"\>\n";
|
|
||||||
echo "\t<tr class=\"contenttopic\">\n\t\t<td>Nick</td>\n\t\t<td>DECT</td>\n\t</tr>\n";
|
|
||||||
|
|
||||||
$SQL = "SELECT Nick, UID, DECT FROM User" . $inuse . ";";
|
|
||||||
$Erg = mysql_query($SQL, $con);
|
|
||||||
$Zeilen = mysql_num_rows($Erg);
|
|
||||||
for ($i = 0; $i < $Zeilen; $i++) {
|
|
||||||
echo "\t<tr class=\"content\">\n";
|
|
||||||
echo "\t\t<td><a href=\"./userChangeNormal.php?Type=Normal&enterUID=" . mysql_result($Erg, $i, "UID") . "\">" .
|
|
||||||
mysql_result($Erg, $i, "Nick") . "</a></td>\n";
|
|
||||||
echo "\t\t<td>" . mysql_result($Erg, $i, "DECT") . "</td>\n";
|
|
||||||
echo "\n</tr>\n";
|
|
||||||
}
|
|
||||||
echo "</table>\n";
|
|
||||||
|
|
||||||
include ("includes/footer.php");
|
|
||||||
?>
|
|
||||||
|
|
@ -1,65 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once ('../bootstrap.php');
|
|
||||||
|
|
||||||
include ("config/config_db.php");
|
|
||||||
include ("includes/funktion_db_list.php");
|
|
||||||
include ("includes/funktion_user.php");
|
|
||||||
|
|
||||||
#######################################################
|
|
||||||
# Ermitteln freier Engel
|
|
||||||
#
|
|
||||||
# auslesen aller Engel und dazugehoerige Schichten
|
|
||||||
#######################################################
|
|
||||||
|
|
||||||
$SQL = "SELECT Shifts.*, ShiftEntry.* " .
|
|
||||||
"FROM `Shifts` INNER JOIN ShiftEntry ON Shifts.SID = ShiftEntry.SID " .
|
|
||||||
"WHERE (Shifts.DateS<=Now() AND Shifts.DateE>=Now() AND ShiftEntry.UID>0);";
|
|
||||||
|
|
||||||
$Erg = mysql_query($SQL, $con);
|
|
||||||
$Zeilen = mysql_num_rows($Erg);
|
|
||||||
|
|
||||||
$inuse = "";
|
|
||||||
for ($i = 0; $i < $Zeilen; $i++) {
|
|
||||||
if ($inuse != "")
|
|
||||||
$inuse .= " OR ";
|
|
||||||
$inuse .= "(UID = \"" . mysql_result($Erg, $i, "UID") . "\")";
|
|
||||||
}
|
|
||||||
if ($inuse != "") {
|
|
||||||
$inuse = " WHERE (NOT (" . $inuse . ")) AND (DECT!='')";
|
|
||||||
} else {
|
|
||||||
$inuse = " WHERE (DECT!='')";
|
|
||||||
}
|
|
||||||
|
|
||||||
//##########################################################################################################
|
|
||||||
|
|
||||||
$SQL = "SELECT * FROM User" . $inuse . ";";
|
|
||||||
$Erg = mysql_query($SQL, $con);
|
|
||||||
$Zeilen = mysql_num_rows($Erg);
|
|
||||||
for ($i = 0; $i < $Zeilen; $i++) {
|
|
||||||
// get DECT number
|
|
||||||
echo mysql_result($Erg, $i, "DECT") . "\t";
|
|
||||||
|
|
||||||
// get all user rights
|
|
||||||
$SQL_RIGHT = "SELECT * FROM UserCVS WHERE UID=" . mysql_result($Erg, $i, "UID") . ";";
|
|
||||||
$Erg_RIGHT = mysql_query($SQL_RIGHT, $con);
|
|
||||||
$UserRights = mysql_fetch_array($Erg_RIGHT);
|
|
||||||
|
|
||||||
foreach ($UserRights as $Var => $Value) {
|
|
||||||
if ((strpos($Var, ".php") === false) AND (strpos($Var, "/") === false) AND (strpos($Var, "UID") === false) AND (is_numeric($Var) === false)) {
|
|
||||||
echo "\"" . $Var . "\"=" . $Value . "\t";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// get shift types
|
|
||||||
$SQL_TYPES = "SELECT TID FROM `ShiftEntry` WHERE UID=" . mysql_result($Erg, $i, "UID") . " GROUP BY TID;";
|
|
||||||
$Erg_TYPES = mysql_query($SQL_TYPES, $con);
|
|
||||||
$Zeilen_Typen = mysql_num_rows($Erg_TYPES);
|
|
||||||
for ($j = 0; $j < $Zeilen_Typen; $j++) {
|
|
||||||
echo "\"TID_" . TID2Type(mysql_result($Erg_TYPES, $j, "TID")) . "\"=Y\t";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "\n";
|
|
||||||
// echo "<br />";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
|||||||
<h4>Schichtplan</h4>
|
|
||||||
<ul class="content">
|
|
||||||
<li><a href="./schichtplan.php">Ein-/Austragen</a></li>
|
|
||||||
<li><a href="./schichtplan_druck.php">Druckversion</a></li>
|
|
||||||
</ul>
|
|
@ -1,5 +0,0 @@
|
|||||||
<h4 class="menu"> Schichtplan </h4>
|
|
||||||
|
|
||||||
<li><a href="./schichtplan.php">Ein-/Austragen</a></li>
|
|
||||||
<li><a href="./schichtplan_druck.php">Druckversion</a></li>
|
|
||||||
|
|
@ -1,62 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once ('../bootstrap.php');
|
|
||||||
|
|
||||||
$title = "T-Shirt-Ausgabe";
|
|
||||||
$header = "T-Shirt-Ausgabe für aktiven Engel";
|
|
||||||
include ("includes/header.php");
|
|
||||||
include ("includes/funktion_db_list.php");
|
|
||||||
|
|
||||||
If (IsSet ($_GET["aktiv"])) {
|
|
||||||
|
|
||||||
$SQL = "UPDATE `User` SET `Tshirt`='1' WHERE `UID`='" . $_GET["aktiv"] . "' limit 1";
|
|
||||||
$Erg = mysql_query($SQL, $con);
|
|
||||||
if ($Erg == 1) {
|
|
||||||
} else {
|
|
||||||
echo "Fehler beim speichern bei Engel " . UID2Nick($_GET["aktive"]) . "<br />";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
Über die Suchen-Funktion des Browsers kann diese Liste schnell nach einem Nick abgesucht werden.<br />
|
|
||||||
Hinter diesem erscheint ein Link, über den man eintragen kann, dass der Engel sein T-Shirt erhalten hat.<br /><br />
|
|
||||||
|
|
||||||
Liste aller aktiven Engel:
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
|
|
||||||
$SQL = "SELECT * FROM `User` WHERE (`Aktiv`='1') ORDER BY `Nick` ASC";
|
|
||||||
$Erg = mysql_query($SQL, $con);
|
|
||||||
|
|
||||||
$rowcount = mysql_num_rows($Erg);
|
|
||||||
?>
|
|
||||||
<table width="100%" class="border" cellpadding="2" cellspacing="1">
|
|
||||||
<tr class="contenttopic">
|
|
||||||
<td>Nick</td>
|
|
||||||
<td>Aktiv?</td>
|
|
||||||
<td>Grösse</td>
|
|
||||||
<td>T-Shirt ausgeben:</td>
|
|
||||||
</td>
|
|
||||||
<?php
|
|
||||||
|
|
||||||
|
|
||||||
for ($i = 0; $i < $rowcount; $i++) {
|
|
||||||
echo "\t<tr class=\"content\">\n";
|
|
||||||
$eUID = mysql_result($Erg, $i, "UID");
|
|
||||||
echo "\t\t<td>" . UID2Nick($eUID) . "</td>\n";
|
|
||||||
echo "\t\t<td>" . mysql_result($Erg, $i, "Aktiv") . "</td>\n";
|
|
||||||
echo "\t\t<td>" . mysql_result($Erg, $i, "Size") . "</td>\n";
|
|
||||||
|
|
||||||
if (mysql_result($Erg, $i, "Tshirt") == "1") {
|
|
||||||
echo "\t\t<td>bereits erhalten</td>";
|
|
||||||
} else {
|
|
||||||
echo "\t\t<td><a href=\"./tshirt.php?aktiv=$eUID\">XXXXXXXX</a></td>";
|
|
||||||
}
|
|
||||||
echo "\t</tr>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "</table>";
|
|
||||||
|
|
||||||
include ("includes/footer.php");
|
|
||||||
?>
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once ('../bootstrap.php');
|
|
||||||
|
|
||||||
$title = "Engel Arrived";
|
|
||||||
$header = "Engel was arrived";
|
|
||||||
include ("includes/header.php");
|
|
||||||
include ("includes/funktion_db_list.php");
|
|
||||||
|
|
||||||
If (IsSet ($_GET["arrived"])) {
|
|
||||||
|
|
||||||
$SQL = "UPDATE `User` SET `Gekommen`='1' WHERE `UID`='" . $_GET["arrived"] . "' limit 1";
|
|
||||||
$Erg = db_query($SQL, "Set User as Gekommen");
|
|
||||||
if ($Erg == 1) {
|
|
||||||
echo "<h2>" . Get_Text("pri_userArrived_WriteOK") . " \"" . UID2Nick($_GET["arrived"]) . "\"</h2>";
|
|
||||||
} else {
|
|
||||||
echo "<h1>" . Get_Text("pri_userArrived_WriteError") . " \"" . UID2Nick($_GET["arrived"]) . "\"</h1>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
echo Get_Text("pri_userArrived_Text1") . "<br />";
|
|
||||||
echo Get_Text("pri_userArrived_Text2") . "<br /><br />";
|
|
||||||
|
|
||||||
echo Get_Text("pri_userArrived_TableToppic");
|
|
||||||
$SQL = "SELECT * FROM `User` ORDER BY `Nick` ASC";
|
|
||||||
$Erg = mysql_query($SQL, $con);
|
|
||||||
|
|
||||||
$rowcount = mysql_num_rows($Erg);
|
|
||||||
|
|
||||||
echo "<table width=\"100%\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n";
|
|
||||||
echo "\t<tr class=\"contenttopic\">\n";
|
|
||||||
echo "\t\t<td>" . Get_Text("pri_userArrived_TableTD_Nick") . "</td>\n";
|
|
||||||
echo "\t\t<td>" . Get_Text("pri_userArrived_TableTD_ArrivedShow") . "</td>\n";
|
|
||||||
echo "\t\t<td>" . Get_Text("pri_userArrived_TableTD_ArrivedSet") . "</td>\n";
|
|
||||||
echo "\t</td>\n";
|
|
||||||
|
|
||||||
for ($i = 0; $i < $rowcount; $i++) {
|
|
||||||
echo "\t<tr class=\"content\">\n";
|
|
||||||
$eUID = mysql_result($Erg, $i, "UID");
|
|
||||||
echo "\t\t<td>" . UID2Nick($eUID) . "</td>\n";
|
|
||||||
echo "\t\t<td>" . mysql_result($Erg, $i, "Gekommen") . "</td>\n";
|
|
||||||
|
|
||||||
if (mysql_result($Erg, $i, "Gekommen") == "1") {
|
|
||||||
echo "\t\t<td>" . Get_Text("pri_userArrived_TableEntry_Arrived") . "</td>";
|
|
||||||
} else {
|
|
||||||
echo "\t\t<td><a href=\"./userArrived.php?arrived=$eUID\">" . Get_Text("pri_userArrived_TableEntry_Set") . "</a></td>";
|
|
||||||
}
|
|
||||||
echo "\t</tr>\n";
|
|
||||||
}
|
|
||||||
echo "</table>";
|
|
||||||
|
|
||||||
include ("includes/footer.php");
|
|
||||||
?>
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once ('../bootstrap.php');
|
|
||||||
|
|
||||||
include ("includes/header_start.php");
|
|
||||||
|
|
||||||
include ("includes/funktion_schichtplan_aray.php");
|
|
||||||
|
|
||||||
$SQL = "SELECT *, `ShiftEntry`.`Comment`, `ShiftEntry`.`TID` FROM `Shifts` " .
|
|
||||||
"INNER JOIN `ShiftEntry` " .
|
|
||||||
"ON `Shifts`.`SID`=`ShiftEntry`.`SID` " .
|
|
||||||
"WHERE `ShiftEntry`.`UID`='" . $_SESSION['UID'] . "' " .
|
|
||||||
"ORDER BY `DateS`";
|
|
||||||
$erg = mysql_query($SQL, $con);
|
|
||||||
|
|
||||||
//HEADER
|
|
||||||
header("Content-Type: text/x-vCalendar");
|
|
||||||
header("Content-Disposition: attachment; filename=\"Schichtplan.ics\"");
|
|
||||||
|
|
||||||
//DATA
|
|
||||||
echo "BEGIN:VCALENDAR\n";
|
|
||||||
echo "PRODID:-//Engelsystem//DE-EN\n";
|
|
||||||
echo "VERSION:2.0\n";
|
|
||||||
echo "PRODID:" . md5('icalschichtplan:' . $_SESSION['UID']) . "\n";
|
|
||||||
echo "METHOD:PUBLISH\n";
|
|
||||||
echo "CALSCALE:GREGORIAN\n";
|
|
||||||
echo "METHOD:PUBLISH\n";
|
|
||||||
echo "X-WR-CALNAME;VALUE=TEXT:" . "Himmel - Schichtplan\n";
|
|
||||||
|
|
||||||
for ($i = 0; $i < mysql_num_rows($erg); $i++) {
|
|
||||||
echo "BEGIN:VEVENT\n";
|
|
||||||
echo "UID:" . md5(mysql_result($erg, $i, "Man") . mysql_result($erg, $i, "DateS")) . "\n";
|
|
||||||
echo "METHOD:PUBLISH\n";
|
|
||||||
echo "DTSTART;TZID=Europe/Berlin:" . date('Ymd\THis', strtotime(mysql_result($erg, $i, "DateS"))) . "\n";
|
|
||||||
echo "DTEND;TZID=Europe/Berlin:" . date('Ymd\THis', strtotime(mysql_result($erg, $i, "DateE"))) . "\n";
|
|
||||||
echo "SUMMARY:" . str_replace(',', '\\,', mysql_result($erg, $i, "Man")) . "\n";
|
|
||||||
echo "CLASS:PUBLIC\n";
|
|
||||||
echo "STATUS:CONFIRMED\n";
|
|
||||||
echo "URL:" . $url . $ENGEL_ROOT . "nonpublic/myschichtplan.php\n";
|
|
||||||
echo "LOCATION:" . $RoomID[mysql_result($erg, $i, "RID")] . "\n";
|
|
||||||
echo "BEGIN:VALARM\n";
|
|
||||||
echo "TRIGGER;VALUE=DURATION:-PT5M\n";
|
|
||||||
echo "DESCRIPTION:" . str_replace(',', '\\,', mysql_result($erg, $i, "Man")) . "\n";
|
|
||||||
echo "ACTION:DISPLAY\n";
|
|
||||||
echo "END:VALARM\n";
|
|
||||||
echo "END:VEVENT\n";
|
|
||||||
}
|
|
||||||
echo "END:VCALENDAR\n";
|
|
||||||
|
|
||||||
include ("includes/funktion_counter.php");
|
|
||||||
?>
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
|||||||
<h4> Tage </h4>
|
|
||||||
|
|
||||||
<?PHP
|
|
||||||
require_once ('../bootstrap.php');
|
|
||||||
|
|
||||||
include ("includes/funktion_schichtplan_aray.php");
|
|
||||||
|
|
||||||
function Printlink($Datum) {
|
|
||||||
GLOBAL $raum;
|
|
||||||
echo "\t<li><a href='./schichtplan.php?ausdatum=$Datum";
|
|
||||||
// ist ein raum gesetzt?
|
|
||||||
if (IsSet ($raum))
|
|
||||||
echo "&raum=$raum";
|
|
||||||
echo "'>$Datum</a></li>\n";
|
|
||||||
} //function Printlink(
|
|
||||||
|
|
||||||
if (isset ($VeranstaltungsTage))
|
|
||||||
foreach ($VeranstaltungsTage as $k => $v)
|
|
||||||
Printlink($v);
|
|
||||||
?>
|
|
@ -1,22 +0,0 @@
|
|||||||
<h4> Raumübersicht</h4>
|
|
||||||
<?php
|
|
||||||
require_once ('../bootstrap.php');
|
|
||||||
|
|
||||||
include ("includes/funktion_schichtplan_aray.php");
|
|
||||||
|
|
||||||
if (isset ($Room))
|
|
||||||
foreach ($Room as $RoomEntry) {
|
|
||||||
if (isset ($ausdatum))
|
|
||||||
echo "\t<li><a href='./schichtplan.php?ausdatum=$ausdatum&raum=" . $RoomEntry["RID"] . "'>" .
|
|
||||||
$RoomEntry["Name"] . "</a></li>\n";
|
|
||||||
else
|
|
||||||
echo "\t<li><a href='./schichtplan.php?raum=" . $RoomEntry["RID"] . "'>" .
|
|
||||||
$RoomEntry["Name"] . "</a></li>\n";
|
|
||||||
}
|
|
||||||
echo "<br />";
|
|
||||||
if (isset ($ausdatum))
|
|
||||||
echo "<li><a href='./schichtplan.php?ausdatum=$ausdatum&raum=-1'>alle</a></li>";
|
|
||||||
else
|
|
||||||
echo "<li><a href='./schichtplan.php?raum=-1'>alle</a></li>";
|
|
||||||
?>
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once ('../bootstrap.php');
|
|
||||||
|
|
||||||
include "includes/header_start.php";
|
|
||||||
include "includes/funktionen.php";
|
|
||||||
include "includes/funktion_schichtplan_beamer.php";
|
|
||||||
|
|
||||||
$Time = time() + 3600 + 3600;
|
|
||||||
?>
|
|
||||||
|
|
||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Schichtpläne für Beamer</title>
|
|
||||||
<meta http-equiv="refresh" content="30; URL=<?php echo $url . $_SERVER['PHP_SELF']; ?>" />
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
|
|
||||||
echo "<table border=\"1\" width=\"100%\" height=\"100%\" cellpadding=\"0\" cellspacing=\"0\" frame=\"void\">\n";
|
|
||||||
|
|
||||||
echo "<colgroup span=\"4\" valign=\"center\">
|
|
||||||
<col width=\"30\">
|
|
||||||
<col width=\"3*\">
|
|
||||||
<col width=\"3*\">
|
|
||||||
<col width=\"3*\">
|
|
||||||
</colgroup>\n";
|
|
||||||
|
|
||||||
echo "<tr align=\"center\">\n" .
|
|
||||||
"<td>" . gmdate("d.m.y", $Time) . "</td>\n" .
|
|
||||||
"<td>" . gmdate("H", $Time -3600) . ":00</td>\n" .
|
|
||||||
"<td>" . gmdate("H", $Time +0) . ":00</td>\n" .
|
|
||||||
"<td>" . gmdate("H", $Time +3600) . ":00</td>\n" .
|
|
||||||
"</tr>\n";
|
|
||||||
|
|
||||||
foreach ($Room as $RoomEntry) {
|
|
||||||
// var-init
|
|
||||||
$AnzahlEintraege = 0;
|
|
||||||
|
|
||||||
$Out = ausgabe_Zeile($RoomEntry["RID"], $Time -3600, $AnzahlEintraege);
|
|
||||||
$Out .= ausgabe_Zeile($RoomEntry["RID"], $Time, $AnzahlEintraege);
|
|
||||||
$Out .= ausgabe_Zeile($RoomEntry["RID"], $Time +3600, $AnzahlEintraege);
|
|
||||||
|
|
||||||
if ($AnzahlEintraege == 0)
|
|
||||||
$Out = "";
|
|
||||||
else
|
|
||||||
$Out = "<tr>\n<td>_" . $RoomEntry["Name"] . "_</td>\n" . $Out . "</tr>\n";
|
|
||||||
|
|
||||||
echo $Out;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
</table>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
Reference in New Issue