From d2846a33833eb86c2f4ad098a20524d80506b2e7 Mon Sep 17 00:00:00 2001 From: Angelo Cuccato Date: Sat, 25 Dec 2010 20:19:33 +0100 Subject: [PATCH] add Freeloader logging --- DB/Himmel.sql | 16 ++++++++++++- www-ssl/admin/schichtplan.php | 36 +++++++++++++++++++++++++----- www-ssl/admin/userChangeNormal.php | 18 +++++---------- 3 files changed, 52 insertions(+), 18 deletions(-) diff --git a/DB/Himmel.sql b/DB/Himmel.sql index b76021b3..e8edbc80 100755 --- a/DB/Himmel.sql +++ b/DB/Himmel.sql @@ -212,4 +212,18 @@ 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 alles der Seiten'; +) TYPE=MyISAM COMMENT='Counter der Seiten'; + +-- +-- Tabellenstruktur für Tabelle `ShiftFreeloader` +-- + +CREATE TABLE IF NOT EXISTS `ShiftFreeloader` ( + `ID` int(11) NOT NULL auto_increment, + `Remove_Time` timestamp NOT NULL default CURRENT_TIMESTAMP, + `UID` int(11) NOT NULL, + `Length` int(11) NOT NULL, + `Comment` text NOT NULL, + PRIMARY KEY (`ID`) +) TYPE=MyISAM AUTO_INCREMENT=1 ; + diff --git a/www-ssl/admin/schichtplan.php b/www-ssl/admin/schichtplan.php index 92cf78ef..2b8f3736 100755 --- a/www-ssl/admin/schichtplan.php +++ b/www-ssl/admin/schichtplan.php @@ -158,16 +158,26 @@ case 'change': echo "Folgende Engel Sind fuer die Schicht eingetargen.\n"; echo "Und koennen, wenn diese nicht zu Schicht erschienen sind ausgetragen werden:
\n"; + echo "\n". + "". + "". + "". + "". + "". + ""; + for ($j=0; $j < $rowcount; $j++) { $userUID=mysql_result($Erg3, $j, "UID"); - echo "". - UID2Nick($userUID). - " (". TID2Type(mysql_result($Erg3, $j, "TID")). Get_Text("inc_schicht_Engel"). - ") austragen
\n"; + echo "\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\t\n"; + echo "\t\n"; } // FOR - echo "

\n\n\n\n"; + echo "
nicktypenormalfreeloader :-(
". UID2Nick($userUID). "". TID2Type(mysql_result($Erg3, $j, "TID")). Get_Text("inc_schicht_Engel"). "###-austragen-######-austragen-###


\n\n\n\n"; //Nachtragen von Engeln echo "Hat ein anderer Engel die Schicht übernommen, trage ihn bitte ein:"; @@ -281,6 +291,22 @@ case 'engeladd': case 'engeldel': $chSQL = "UPDATE `ShiftEntry` SET `UID`='0', `Comment`= 'NULL' WHERE (`SID`='". $_GET["SID"]. "' AND `UID`='". $_GET["UIDs"]. "') LIMIT 1"; + if( isset($_GET["freeloader"]) && $_GET["freeloader"]==1) + { + $sql = "SELECT * FROM `Shifts` WHERE (`SID` = '". $_GET["SID"]. "' )"; + $Erg = mysql_query($sql, $con); + if( mysql_num_rows( $Erg) == 1) + { + $UID = $_GET["UIDs"]; + $Length = mysql_result($Erg, 0, "Len"); + $Comment = "Start: ". mysql_result($Erg, 0, "DateS"). "; ". + "Beschreibung: ". mysql_result($Erg, 0, "Man"). "; ". + "Removed by ". $_SESSION['Nick']; + $ch2SQL = + "INSERT INTO `ShiftFreeloader` (`Remove_Time`, `UID`, `Length`, `Comment`) ". + "VALUES ( CURRENT_TIMESTAMP, '$UID', '$Length', '$Comment');"; + } + } break; case 'engelshiftdel': diff --git a/www-ssl/admin/userChangeNormal.php b/www-ssl/admin/userChangeNormal.php index 8c4c9989..4ec014a7 100755 --- a/www-ssl/admin/userChangeNormal.php +++ b/www-ssl/admin/userChangeNormal.php @@ -106,18 +106,6 @@ if (IsSet($_GET["enterUID"])) echo ">Yes \n"; echo "\n"; - // Menu links/rechts - echo " Menu\n"; - echo " L \n"; - echo " R \n"; - echo "\n"; - echo " Hometown". "\n"; @@ -135,6 +123,12 @@ if (IsSet($_GET["enterUID"])) echo "\n"; echo "\n"; echo ""; + + + echo "
"; + funktion_db_element_list_2row( + "Freeloader Shifts", + "SELECT `Remove_Time`, `Length`, `Comment` FROM `ShiftFreeloader` WHERE UID=". $_GET["enterUID"]); } include ("../../includes/footer.php");