diff options
-rwxr-xr-x | DB/Himmel.sql | 16 | ||||
-rwxr-xr-x | www-ssl/admin/schichtplan.php | 36 | ||||
-rwxr-xr-x | 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:<br>\n"; + echo "<table border=\"1\">\n". + "<tr class=\"contenttopic\">". + "<th>nick</th>". + "<th>type</th>". + "<th>normal</th>". + "<th>freeloader :-(</th>". + "</tr>"; + for ($j=0; $j < $rowcount; $j++) { $userUID=mysql_result($Erg3, $j, "UID"); - echo "<a href=\"./schichtplan.php?action=engeldel&SID=". $_GET["SID"]. "&UIDs=$userUID\">". - UID2Nick($userUID). - " (". TID2Type(mysql_result($Erg3, $j, "TID")). Get_Text("inc_schicht_Engel"). - ") austragen</a><br>\n"; + echo "\t<tr>\n"; + echo "\t\t<td>". UID2Nick($userUID). "</td>\n"; + echo "\t\t<td>". TID2Type(mysql_result($Erg3, $j, "TID")). Get_Text("inc_schicht_Engel"). "</td>\n"; + echo "\t\t<td><a href=\"./schichtplan.php?action=engeldel&SID=". $_GET["SID"]. "&UIDs=$userUID&freeloader=0\">###-austragen-###</a></td>\n"; + echo "\t\t<td><a href=\"./schichtplan.php?action=engeldel&SID=". $_GET["SID"]. "&UIDs=$userUID&freeloader=1\">###-austragen-###</a></td>\n"; + echo "\t</tr>\n"; } // FOR - echo "<br><hr>\n\n\n\n"; + echo "</table><br><hr>\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 "</td></tr>\n"; - // Menu links/rechts - echo " <tr><td>Menu</td><td>\n"; - echo " <input type=\"radio\" name=\"eMenu\" value=\"L\""; - if (mysql_result($Erg, 0, "Menu")=='L') - echo " checked"; - echo ">L \n"; - echo " <input type=\"radio\" name=\"eMenu\" value=\"R\""; - if (mysql_result($Erg, 0, "Menu")=='R') - echo " checked"; - echo ">R \n"; - echo "</td></tr>\n"; - echo " <tr><td>Hometown</td><td>". "<input type=\"text\" size=\"40\" name=\"Hometown\" value=\"". mysql_result($Erg, 0, "Hometown")."\"></td></tr>\n"; @@ -135,6 +123,12 @@ if (IsSet($_GET["enterUID"])) echo "<input type=\"hidden\" name=\"enterUID\" value=\"". $_GET["enterUID"]. "\">\n"; echo "<input type=\"submit\" value=\"löschen...\">\n"; echo "</form>"; + + + echo "<hr>"; + funktion_db_element_list_2row( + "Freeloader Shifts", + "SELECT `Remove_Time`, `Length`, `Comment` FROM `ShiftFreeloader` WHERE UID=". $_GET["enterUID"]); } include ("../../includes/footer.php"); |