diff --git a/DB/ChangeLog.sql b/DB/ChangeLog.sql old mode 100755 new mode 100644 index 383c897a..bfb41cb5 --- a/DB/ChangeLog.sql +++ b/DB/ChangeLog.sql @@ -18,8 +18,8 @@ DROP TABLE IF EXISTS `ChangeLog`; CREATE TABLE IF NOT EXISTS `ChangeLog` ( - `Time` timestamp(14) NOT NULL, - `UID` int(11) NOT NULL default '0', + `Time` timestamp NOT NULL, + `UID` int(11) NOT NULL default 0, `Commend` text NOT NULL, `SQLCommad` text NOT NULL -) TYPE=MyISAM; +) ENGINE=MyISAM; diff --git a/DB/Himmel.sql b/DB/Himmel.sql old mode 100755 new mode 100644 index e8edbc80..e513441c --- a/DB/Himmel.sql +++ b/DB/Himmel.sql @@ -26,7 +26,7 @@ CREATE TABLE IF NOT EXISTS `EngelType` ( `Man` text, PRIMARY KEY (`TID`), UNIQUE KEY `Name` (`Name`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; +) ENGINE=MyISAM AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -43,23 +43,23 @@ CREATE TABLE IF NOT EXISTS `FAQ` ( `Frage` text NOT NULL, `Antwort` text NOT NULL, PRIMARY KEY (`FID`) -) TYPE=MyISAM AUTO_INCREMENT=24 ; +) ENGINE=MyISAM AUTO_INCREMENT=24 ; -- -- Daten für Tabelle `FAQ` -- -INSERT INTO `FAQ` (`FID`, `Frage`, `Antwort`) VALUES (1, 'Komme ich als Engel billiger/kostenlos auf den Congress?
\r\nDo I get in cheaper / for free to the congress as an angel ?', 'Nein, jeder Engel muss normal Eintritt bezahlen.
\r\nNo, every angel has to pay full price.'), -(2, 'Was bekomme ich für meine Mitarbeit?
\r\nWhat can i expect in return for my help? \r\n', 'Jeder Engel der arbeitet bekommt ein kostenloses T-Shirt nach der Veranstalltung
\r\nEvery working angel gets a free shirt after the event. '), -(3, 'Wie lange muss ich als Engel arbeiten?
\r\nHow long do I have to work as an angel ?', 'Diese Frage ist schwer zu beantworten. Es hängt z.B. davon ab, was man macht (z.B. Workshop-Engel) und wieviele Engel wir zusammen bekommen.
\r\nThis is difficult to answer. It depends on what you decide to do (e.g. workshop angel) and how many people will attend. '), -(6, 'Ich bin erst XX Jahre alt. Kann ich überhaupt helfen?
\r\nI''m only XX years old. Can I help anyway?', 'Wir können jede helfende Hand gebrauchen. Wenn du alt genug bist, um zum Congress zu kommen, bist du auch alt genug zu helfen.
\r\nWe need every help we can get. If your old enough to come to the congress, your old enough to help.'), -(8, 'Wer sind eigentlich die Erzengel?
\r\nWho are the Arch-Angels?\r\n', 'Erzengel sind dieses Jahr: BugBlue, TabascoEye, Jeedi, Daizy, volty
\r\nThe ArchAngels for this year are: BugBlue, TabascoEye, Jeedi, Daizy, volty\r\n'), -(9, 'Gibt es dieses Jahr wieder einen IRC-Channel für Engel?
\r\nWill there be an IRC-channel for angels again?', 'Ja, im IRC-Net existiert #chaos-angel. Einfach mal reinschaun!
\r\nYes, in the IRC-net there''s #chaos-angel. Just have a look!'), -(10, 'Wie gehe ich mit den Besuchern um?
\r\nHow do I treat visitors?', 'Man soll gegenüber den Besuchern immer höflich und freundlich sein, auch wenn diese gestresst sind. Wenn man das Gefühl hat, dass man mit der Situation nicht mehr klarkommt, sollte man sich jemanden zur Unterstützung holen, bevor man selbst auch gestresst wird :-)
\r\nYou should always be polite and friendly, especially if they are stressed. When you feel you can''t handle it on your own, get someone to help you out before you get so stressed yourself that you get impolite.'), -(11, 'Wann sind die Engelbesprechungen?
\r\nWhen are the angels briefings?', 'Das wird vor Ort noch festgelegt und steht im Himmelnewssystem.
\r\nThe information on the Angel Briefings will be in the news section of this system.'), -(12, 'Was muss ich noch bedenken?
\r\nAnything else I should know?', 'Man sollte nicht total übermüdet oder ausgehungert, wenn n man einen Einsatz hat. Eine gewisse Fitness ist hilfreich.
\r\nYou should not be exhausted or starving when you arrive for a shift. A reasonable amount of fitness for work would be very helpful.'), -(13, 'Ich habe eine Frage, auf die ich in der FAQ keine Antwort gefunden habe. Wohin soll ich mich wenden?
\r\nI have a guestion not answered here. Who can I ask?', 'Bei weitere Fragen kannst du die Anfragen an die Erzengel Formular benutzen.
\r\nIf you have further questions, you can use the Questions for the ArchAngels form.'), -(20, 'Wer muss alles Eintritt zahlen?
\r\nWho has to pay the full entrance price?', 'Jeder. Zumindest, solange er/sie älter als 12 Jahre ist...
\r\nEveryone who is at older than 12 years old.'); +INSERT INTO `FAQ` (`FID`, `Frage`, `Antwort`) VALUES (1, 'Komme ich als Engel billiger/kostenlos auf den Congress?
\r\nDo I get in cheaper / for free to the congress as an angel ?', 'Nein, jeder Engel muss normal Eintritt bezahlen.
\r\nNo, every angel has to pay full price.'), +(2, 'Was bekomme ich für meine Mitarbeit?
\r\nWhat can i expect in return for my help? \r\n', 'Jeder Engel der arbeitet bekommt ein kostenloses T-Shirt nach der Veranstalltung
\r\nEvery working angel gets a free shirt after the event. '), +(3, 'Wie lange muss ich als Engel arbeiten?
\r\nHow long do I have to work as an angel ?', 'Diese Frage ist schwer zu beantworten. Es hängt z.B. davon ab, was man macht (z.B. Workshop-Engel) und wieviele Engel wir zusammen bekommen.
\r\nThis is difficult to answer. It depends on what you decide to do (e.g. workshop angel) and how many people will attend. '), +(6, 'Ich bin erst XX Jahre alt. Kann ich überhaupt helfen?
\r\nI''m only XX years old. Can I help anyway?', 'Wir können jede helfende Hand gebrauchen. Wenn du alt genug bist, um zum Congress zu kommen, bist du auch alt genug zu helfen.
\r\nWe need every help we can get. If your old enough to come to the congress, your old enough to help.'), +(8, 'Wer sind eigentlich die Erzengel?
\r\nWho are the Arch-Angels?\r\n', 'Erzengel sind dieses Jahr: BugBlue, TabascoEye, Jeedi, Daizy, volty
\r\nThe ArchAngels for this year are: BugBlue, TabascoEye, Jeedi, Daizy, volty\r\n'), +(9, 'Gibt es dieses Jahr wieder einen IRC-Channel für Engel?
\r\nWill there be an IRC-channel for angels again?', 'Ja, im IRC-Net existiert #chaos-angel. Einfach mal reinschaun!
\r\nYes, in the IRC-net there''s #chaos-angel. Just have a look!'), +(10, 'Wie gehe ich mit den Besuchern um?
\r\nHow do I treat visitors?', 'Man soll gegenüber den Besuchern immer höflich und freundlich sein, auch wenn diese gestresst sind. Wenn man das Gefühl hat, dass man mit der Situation nicht mehr klarkommt, sollte man sich jemanden zur Unterstützung holen, bevor man selbst auch gestresst wird :-)
\r\nYou should always be polite and friendly, especially if they are stressed. When you feel you can''t handle it on your own, get someone to help you out before you get so stressed yourself that you get impolite.'), +(11, 'Wann sind die Engelbesprechungen?
\r\nWhen are the angels briefings?', 'Das wird vor Ort noch festgelegt und steht im Himmelnewssystem.
\r\nThe information on the Angel Briefings will be in the news section of this system.'), +(12, 'Was muss ich noch bedenken?
\r\nAnything else I should know?', 'Man sollte nicht total übermüdet oder ausgehungert, wenn n man einen Einsatz hat. Eine gewisse Fitness ist hilfreich.
\r\nYou should not be exhausted or starving when you arrive for a shift. A reasonable amount of fitness for work would be very helpful.'), +(13, 'Ich habe eine Frage, auf die ich in der FAQ keine Antwort gefunden habe. Wohin soll ich mich wenden?
\r\nI have a guestion not answered here. Who can I ask?', 'Bei weitere Fragen kannst du die Anfragen an die Erzengel Formular benutzen.
\r\nIf you have further questions, you can use the Questions for the ArchAngels form.'), +(20, 'Wer muss alles Eintritt zahlen?
\r\nWho has to pay the full entrance price?', 'Jeder. Zumindest, solange er/sie älter als 12 Jahre ist...
\r\nEveryone who is at older than 12 years old.'); -- -------------------------------------------------------- @@ -79,7 +79,7 @@ CREATE TABLE IF NOT EXISTS `News` ( `UID` int(11) NOT NULL default '0', `Treffen` tinyint(4) NOT NULL default '0', PRIMARY KEY (`ID`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; +) ENGINE=MyISAM AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -98,7 +98,7 @@ CREATE TABLE IF NOT EXISTS `Questions` ( `AID` int(11) NOT NULL default '0', `Answer` text NOT NULL, PRIMARY KEY (`QID`) -) TYPE=MyISAM COMMENT='Fragen und Antworten' AUTO_INCREMENT=21 ; +) ENGINE=MyISAM COMMENT='Fragen und Antworten' AUTO_INCREMENT=21 ; -- -------------------------------------------------------- @@ -118,7 +118,7 @@ CREATE TABLE IF NOT EXISTS `Room` ( `show` char(1) NOT NULL default 'Y', `Number` int(11) default NULL, PRIMARY KEY (`RID`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; +) ENGINE=MyISAM AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -137,7 +137,7 @@ CREATE TABLE IF NOT EXISTS `ShiftEntry` ( `TID` int(11) NOT NULL default '0', `UID` int(11) NOT NULL default '0', `Comment` text -) TYPE=MyISAM; +) ENGINE=MyISAM; -- -------------------------------------------------------- @@ -161,7 +161,7 @@ CREATE TABLE IF NOT EXISTS `Shifts` ( `URL` text, `PSID` text, PRIMARY KEY (`SID`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; +) ENGINE=MyISAM AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -180,7 +180,7 @@ CREATE TABLE IF NOT EXISTS `Wecken` ( `Ort` text NOT NULL, `Bemerkung` text NOT NULL, PRIMARY KEY (`ID`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; +) ENGINE=MyISAM AUTO_INCREMENT=1 ; -- -------------------------------------------------------- @@ -201,7 +201,7 @@ CREATE TABLE IF NOT EXISTS `news_comments` ( `UID` int(11) NOT NULL default '0', PRIMARY KEY (`ID`), KEY `Refid` (`Refid`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; +) ENGINE=MyISAM AUTO_INCREMENT=1 ; -- -- Tabellenstruktur für Tabelle `Counter` @@ -212,7 +212,7 @@ CREATE TABLE IF NOT EXISTS `Counter` ( `URL` varchar(255) NOT NULL default '', `Anz` bigint(20) NOT NULL default '0', PRIMARY KEY (`URL`) -) TYPE=MyISAM COMMENT='Counter der Seiten'; +) ENGINE=MyISAM COMMENT='Counter der Seiten'; -- -- Tabellenstruktur für Tabelle `ShiftFreeloader` @@ -225,5 +225,5 @@ CREATE TABLE IF NOT EXISTS `ShiftFreeloader` ( `Length` int(11) NOT NULL, `Comment` text NOT NULL, PRIMARY KEY (`ID`) -) TYPE=MyISAM AUTO_INCREMENT=1 ; +) ENGINE=MyISAM AUTO_INCREMENT=1 ; diff --git a/DB/SDrohnen.sql b/DB/SDrohnen.sql old mode 100755 new mode 100644 index 8cb4fc42..a2c93fab --- a/DB/SDrohnen.sql +++ b/DB/SDrohnen.sql @@ -22,7 +22,7 @@ CREATE TABLE `Sprache` ( `Sprache` char(2) NOT NULL default 'DE', `Text` text NOT NULL, KEY `TextID` (`TextID`,`Sprache`) -) TYPE=MyISAM; +) ENGINE=MyISAM; -- -- Daten fuer Tabelle `Sprache` diff --git a/DB/Sprache.sql b/DB/Sprache.sql old mode 100755 new mode 100644 index 76597b71..52434198 --- a/DB/Sprache.sql +++ b/DB/Sprache.sql @@ -22,7 +22,7 @@ CREATE TABLE `Sprache` ( `Sprache` char(2) NOT NULL default 'DE', `Text` text NOT NULL, KEY `TextID` (`TextID`,`Sprache`) -) TYPE=MyISAM; +) ENGINE=MyISAM; -- -- Daten für Tabelle `Sprache` diff --git a/DB/UserPicture.sql b/DB/UserPicture.sql index 6dfbe523..095684b3 100644 --- a/DB/UserPicture.sql +++ b/DB/UserPicture.sql @@ -22,7 +22,7 @@ CREATE TABLE `UserPicture` ( `ContentType` varchar(20) NOT NULL default '', `show` char(1) NOT NULL default 'N', PRIMARY KEY (`UID`) -) TYPE=MyISAM; +) ENGINE=MyISAM; -- -- Daten für Tabelle `UserPicture` diff --git a/default-conf/var_www_includes/config.php b/default-conf/var_www_includes/config.php old mode 100755 new mode 100644 index 574d9947..4c8237f1 --- a/default-conf/var_www_includes/config.php +++ b/default-conf/var_www_includes/config.php @@ -1,4 +1,4 @@ -MD5SED
\n". - "SHA1:
SHA1SED"; + "SHA1:
SHA1SED"; //globale const. fuer schischtplan $GlobalZeileProStunde = 4; diff --git a/default-conf/var_www_includes/config_IAX.php b/default-conf/var_www_includes/config_IAX.php index e7eca465..87c3d8ea 100644 --- a/default-conf/var_www_includes/config_IAX.php +++ b/default-conf/var_www_includes/config_IAX.php @@ -1,4 +1,4 @@ - diff --git a/includes/UserCVS.php b/includes/UserCVS.php old mode 100755 new mode 100644 index ad7e1d66..7798ee66 --- a/includes/UserCVS.php +++ b/includes/UserCVS.php @@ -1,103 +1,79 @@ $v) { + if($v == "G") + $_SESSION['CVS'][$k] = $_SESSION['CVS_Group'][$k]; + } + } -// 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); + // 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; + } -// 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]; - } -} + if($debug) { + echo "
\$_SESSION:\n";
+    print_r($_SESSION);
+    echo "
"; -//pagename ermitteln -$Page["Name"] = substr( $_SERVER['PHP_SELF'], strlen($ENGEL_ROOT) ); + if( strlen($Page["CVS"]) == 0 ) + echo "

CVS ERROR, on page '". $Page["Name"]. "'

"; + else + echo "CVS: ". $Page["Name"]. " => '". $Page["CVS"]. "'
"; + } -//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; -} + function funktion_isLinkAllowed($PageName) { + global $_SESSION; -if( $DEBUG ) -{ -// foreach( $_SESSION as $k => $v) -// echo "$k = $v
\n"; - echo "
\$_SESSION:\n";
-		print_r($_SESSION);
-	echo "
"; + // separate page parameter + $ParameterPos = strpos($PageName, ".php?"); - if( strlen($Page["CVS"]) == 0 ) - echo "

CVS ERROR, on page '". $Page["Name"]. "'

"; - else - echo "CVS: ". $Page["Name"]. " => '". $Page["CVS"]. "'
"; - -} + 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; -function funktion_isLinkAllowed( $PageName) -{ - global $_SESSION; + return false; + } - // 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; - } + function funktion_isLinkAllowed_addLink_OrLinkText( $PageName, $LinkText) { + global $url, $ENGEL_ROOT; - return FALSE; -} + if(funktion_isLinkAllowed( $PageName) === true) + return "" . $LinkText . ""; + + return $LinkText; + } -function funktion_isLinkAllowed_addLink_OrLinkText( $PageName, $LinkText) -{ - global $url, $ENGEL_ROOT; + function funktion_isLinkAllowed_addLink_OrEmpty( $PageName, $LinkText) { + global $url, $ENGEL_ROOT; - if( funktion_isLinkAllowed( $PageName) === TRUE) - { - return "". $LinkText. ""; - } - - return $LinkText; -} - -function funktion_isLinkAllowed_addLink_OrEmpty( $PageName, $LinkText) -{ - global $url, $ENGEL_ROOT; - - if( funktion_isLinkAllowed( $PageName) === TRUE) - { - return "". $LinkText. ""; - } - - return ""; -} + if(funktion_isLinkAllowed( $PageName) === true) + return "" . $LinkText . ""; + return ""; + } ?> diff --git a/includes/config_MessegeServer.php b/includes/config_MessegeServer.php index 3454ae0c..ce7c7c3a 100644 --- a/includes/config_MessegeServer.php +++ b/includes/config_MessegeServer.php @@ -1,8 +1,7 @@ - diff --git a/includes/config_modem.php b/includes/config_modem.php index 0625936d..2de37cb7 100644 --- a/includes/config_modem.php +++ b/includes/config_modem.php @@ -1,11 +1,10 @@ - diff --git a/includes/crypt.php b/includes/crypt.php old mode 100755 new mode 100644 index 9707e719..d511e4f4 --- a/includes/crypt.php +++ b/includes/crypt.php @@ -1,18 +1,12 @@ diff --git a/includes/error_handler.php b/includes/error_handler.php old mode 100755 new mode 100644 index 10f27d58..5a58076b --- a/includes/error_handler.php +++ b/includes/error_handler.php @@ -1,88 +1,86 @@ $v ) - if( (strpos( "0$k", "sql") > 0) || (strpos( "0$k", "SQL") > 0)) - $Temp .= "Error Context: $k = $v\n"; + 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"; - - //übergeben 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": "") - ); + 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"); - ini_set( "error_reporting", E_ALL); - if( $DEBUG) - { - ini_set( "display_errors", "On"); - ini_set( "display_startup_errors", "On"); - ini_set( "html_errors", "On"); + 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() - { + function send_errors() { global $error_messages; - if (!$error_messages) return; - + if(!$error_messages) + return; + $message = ""; foreach($error_messages as $value) $message .= $value."\n"; + $message .= "\n"; - - if( isset( $_POST)) - { - foreach ($_POST as $k => $v ) + + 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"; + + 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 ) + foreach ($_SESSION as $k => $v ) $message .= "_SESSION: $k = $v\n"; $message .= "\n"; } if( isset( $_SESSION['CVS'])) { - foreach ($_SESSION['CVS'] as $k => $v ) + foreach ($_SESSION['CVS'] as $k => $v ) if( strlen($k)>3 ) $message .= "_SESSION['CVS']: $k = $v\n"; $message .= "\n"; } - - foreach ($_SERVER as $k => $v ) + + foreach ($_SERVER as $k => $v ) if( strpos( "0$k", "SERVER_")==0) $message .= "_SERVER: $k = $v\n"; diff --git a/includes/footer.php b/includes/footer.php old mode 100755 new mode 100644 index f65e8a7e..8f736c4d --- a/includes/footer.php +++ b/includes/footer.php @@ -1,57 +1,39 @@ - - - - - - - - -
-

- ".Get_Text("back")." "; - ?> - -

- - +
+

+ " . Get_Text("back") . " "; + ?> + +

+ + - - - - + - - - - - - - - - -
© copyleft - Kontakt -
- - + + + +
© copyleft - Kontakt +
+ + - + - - - + + diff --git a/includes/funktion_SendMessenges.php b/includes/funktion_SendMessenges.php index d71e4804..b6de67cc 100644 --- a/includes/funktion_SendMessenges.php +++ b/includes/funktion_SendMessenges.php @@ -1,18 +1,14 @@ - + diff --git a/includes/funktion_activeUser.php b/includes/funktion_activeUser.php old mode 100755 new mode 100644 index d19895a8..e214a1f9 --- a/includes/funktion_activeUser.php +++ b/includes/funktion_activeUser.php @@ -1,59 +1,57 @@ -Engel online"; + $SQL = "SELECT UID, Nick, lastLogIn " . + "FROM User " . + "WHERE (`lastLogIn` > '" . gmdate("YmdHis", time() - (60 * 60)) . "' AND NOT (UID=" . $_SESSION['UID'] . ")) " . + "ORDER BY lastLogIn DESC;"; -echo "

Engel online

"; + $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 -$SQL = "SELECT UID, Nick, lastLogIn ". - "FROM User ". - "WHERE (`lastLogIn` > '". gmdate("YmdHis", time()-(60*60)). "' AND NOT (UID=". $_SESSION['UID']. ")) ". - "ORDER BY lastLogIn DESC;"; + echo ""; ?> diff --git a/includes/funktion_counter.php b/includes/funktion_counter.php index 70b104d4..39d65a1f 100644 --- a/includes/funktion_counter.php +++ b/includes/funktion_counter.php @@ -1,24 +1,14 @@ - diff --git a/includes/funktion_cron.php b/includes/funktion_cron.php old mode 100755 new mode 100644 index 17ac5a76..3a0e984b --- a/includes/funktion_cron.php +++ b/includes/funktion_cron.php @@ -1,144 +1,131 @@ -$v) - { - $o.= "$k=".urlencode(utf8_encode($v))."&"; - } - $post_data=substr($o,0,-1); + if($TimeM < 0) { + $TimeM += 60; + $TimeH -= 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"); //Ziel nummer - fputs( $file, "Callerid: Engelserver\n"); - // fputs( $file, "Callerid: $IAXcontent\n"); - // fputs( $file, "Context: $DECTnumber@$IAXserver\n"); - fputs( $file, "Extension: s\n"); - fputs( $file, "MaxRetries: 1\n"); - fputs( $file, "RetryTime: 10\n"); - fputs( $file, "SetVar: msg=$Message\n"); -// fputs( $file, "SetVar: TimeH=$TimeH\n"); -// fputs( $file, "SetVar: TimeM=$TimeM\n"); -// fputs( $file, "SetVar: DECTnumber=$DECTnumber\n"); -// fputs( $file, "SetVar: Room=". RID2Room( $RID). "\n"); -// fputs( $file, "SetVar: Engeltype=". TID2Engeltype( $TID). "\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"; -} + 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"; -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); -} + 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"; -return 0; + $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); + } ?> - diff --git a/includes/funktion_db.php b/includes/funktion_db.php index cbfb198f..160a9c59 100644 --- a/includes/funktion_db.php +++ b/includes/funktion_db.php @@ -1,149 +1,145 @@ -"; - $Diff .= ""; - for ($m = 0 ; $m < $Anzahl_Felder ; $m++) - $Diff .= "". mysql_field_name($Erg, $m). ""; - $Diff .= ""; - - for ($n = 0 ; $n < $Zeilen ; $n++) - { - $Diff .= ""; - for ($m = 0 ; $m < $Anzahl_Felder ; $m++) - $Diff .= "".mysql_result($Erg, $n, $m). ""; - $Diff .= ""; - } - $Diff .= ""; - return $Diff; - } - - function db_querry_getDatenAssocArray($SQL) - { - global $con; - - $Erg = mysql_query($SQL, $con); - echo mysql_error($con); - - $Daten = array(); - for( $i=0; $i $Data1) - { - if( isset( $Daten2[$DataKey])) - { - $Data2 = $Daten2[$DataKey]; - foreach($Data1 as $key => $value) - if( $value != $Data2[$key]) - { - $Gefunden=TRUE; - $Diff .= "\n\t$key\n\t$value\n\t".$Data2[$key]."\n"; - } - } - else - foreach($Data1 as $key => $value) - { - $Gefunden=TRUE; - $Diff .= "\n\t$key\n\t$value\n\t\n"; - } - } - $Diff .= "\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("

funktion_db ERROR SQL: '$SQL' nicht OK

"); - - //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"); + $Zeilen = mysql_num_rows($Erg); + $Anzahl_Felder = mysql_num_fields($Erg); - //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); - } + $Diff = ""; + $Diff .= ""; - $SQLCommand = "SQL:
". htmlentities( $SQL, ENT_QUOTES); - if( strlen($Diff) > 0) - $SQLCommand .= "

Diff:
$Diff"; + for ($m = 0 ; $m < $Anzahl_Felder ; $m++) + $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( + $Diff .= ""; + + for ($n = 0 ; $n < $Zeilen ; $n++) { + $Diff .= ""; + + for ($m = 0 ; $m < $Anzahl_Felder ; $m++) + $Diff .= ""; + + $Diff .= ""; + } + + $Diff .= "
". mysql_field_name($Erg, $m). "
".mysql_result($Erg, $n, $m). "
"; + return $Diff; + } + + function db_querry_getDatenAssocArray($SQL) { + global $con; + + $Erg = mysql_query($SQL, $con); + echo mysql_error($con); + + $Daten = array(); + + for( $i=0; $i $Data1) { + if(isset( $Daten2[$DataKey])) { + $Data2 = $Daten2[$DataKey]; + + foreach($Data1 as $key => $value) + if( $value != $Data2[$key]) { + $Gefunden = true; + $Diff .= "\n\t$key\n\t$value\n\t" . $Data2[$key] . "\n"; + } + } else + foreach($Data1 as $key => $value) { + $Gefunden = true; + $Diff .= "\n\t$key\n\t$value\n\t\n"; + } + } + + $Diff .= "\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("

funktion_db ERROR SQL: '$SQL' nicht OK

"); + + //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:
". htmlentities( $SQL, ENT_QUOTES); + if( strlen($Diff) > 0) + $SQLCommand .= "

Diff:
$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( } ?> diff --git a/includes/funktion_db_list.php b/includes/funktion_db_list.php old mode 100755 new mode 100644 index 9393e97e..1131ffd3 --- a/includes/funktion_db_list.php +++ b/includes/funktion_db_list.php @@ -1,67 +1,65 @@ -"; + echo "DB: $Table_Name"; - echo ""; - echo ""; + echo ""; + for ($m = 0 ; $m < $Anzahl_Felder ; $m++) + { + echo ""; + } + echo ""; - echo ""; - for ($m = 0 ; $m < $Anzahl_Felder ; $m++) - { - echo ""; - } - echo ""; - - for ($n = 0 ; $n < $Zeilen ; $n++) - { - echo ""; - for ($m = 0 ; $m < $Anzahl_Felder ; $m++) - { - echo ""; - } - echo ""; - } - echo "
DB: $Table_Name
". mysql_field_name($Erg, $m). "
". mysql_field_name($Erg, $m). "
".mysql_result($Erg, $n, $m). "
"; + for ($n = 0 ; $n < $Zeilen ; $n++) + { + echo ""; + for ($m = 0 ; $m < $Anzahl_Felder ; $m++) + { + echo "".mysql_result($Erg, $n, $m). ""; + } + echo ""; + } + echo ""; } function funktion_db_element_list_2row( $TopicName, $SQL) { - global $con; + global $con; - echo "\n"; - echo ""; -# echo "\t\n"; + echo "
$TopicName

$TopicName

\n"; + echo ""; +# echo "\t\n"; - $Erg = mysql_query($SQL, $con); - echo mysql_error($con); - - echo ""; - for ($m = 0 ; $m < mysql_num_fields($Erg) ; $m++) - { - echo ""; - } - echo ""; + $Erg = mysql_query($SQL, $con); + echo mysql_error($con); + + echo ""; + for ($m = 0 ; $m < mysql_num_fields($Erg) ; $m++) + { + echo ""; + } + echo ""; - for ($n = 0 ; $n < mysql_num_rows($Erg) ; $n++) - { - echo ""; - for ($m = 0 ; $m < mysql_num_fields($Erg) ; $m++) - { - echo ""; - } - echo ""; - } - echo "
$TopicName

$TopicName

". mysql_field_name($Erg, $m). "
". mysql_field_name($Erg, $m). "
".mysql_result($Erg, $n, $m). "
\n"; + for ($n = 0 ; $n < mysql_num_rows($Erg) ; $n++) + { + echo ""; + for ($m = 0 ; $m < mysql_num_fields($Erg) ; $m++) + { + echo "".mysql_result($Erg, $n, $m). ""; + } + echo ""; + } + echo "\n"; } ?> diff --git a/includes/funktion_faq.php b/includes/funktion_faq.php old mode 100755 new mode 100644 index 641ea38d..e9f09e7c --- a/includes/funktion_faq.php +++ b/includes/funktion_faq.php @@ -1,12 +1,10 @@ - diff --git a/includes/funktion_flag.php b/includes/funktion_flag.php index 56d8a993..b6a02242 100644 --- a/includes/funktion_flag.php +++ b/includes/funktion_flag.php @@ -1,12 +1,9 @@ -"; - -if( strpos( $_SERVER["REQUEST_URI"], "?") >0) - $URL = $_SERVER["REQUEST_URI"]. "&SetLanguage="; -else - $URL = $_SERVER["REQUEST_URI"]. "?SetLanguage="; - -echo "\"DE\" "; -echo "\"EN\" "; + 0) + $URL = $_SERVER["REQUEST_URI"] . "&SetLanguage="; + else + $URL = $_SERVER["REQUEST_URI"] . "?SetLanguage="; + echo "\"DE\" "; + echo "\"EN\" "; ?> diff --git a/includes/funktion_jabber.php b/includes/funktion_jabber.php old mode 100755 new mode 100644 diff --git a/includes/funktion_lang.php b/includes/funktion_lang.php old mode 100755 new mode 100644 index d5d3e144..e04dd8eb --- a/includes/funktion_lang.php +++ b/includes/funktion_lang.php @@ -1,35 +1,28 @@ - diff --git a/includes/funktion_menu.php b/includes/funktion_menu.php old mode 100755 new mode 100644 index 87196ede..c751c764 --- a/includes/funktion_menu.php +++ b/includes/funktion_menu.php @@ -1,44 +1,41 @@ -". Get_Text("$MenuName/"). "