Merge branch 'master' into spezial_includes

This commit is contained in:
root 2010-12-25 20:21:30 +01:00
commit 2cacd735aa
3 changed files with 52 additions and 18 deletions

View File

@ -212,4 +212,18 @@ CREATE TABLE IF NOT EXISTS `Counter` (
`URL` varchar(255) NOT NULL default '', `URL` varchar(255) NOT NULL default '',
`Anz` bigint(20) NOT NULL default '0', `Anz` bigint(20) NOT NULL default '0',
PRIMARY KEY (`URL`) 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 ;

View File

@ -158,16 +158,26 @@ case 'change':
echo "Folgende Engel Sind fuer die Schicht eingetargen.\n"; echo "Folgende Engel Sind fuer die Schicht eingetargen.\n";
echo "Und koennen, wenn diese nicht zu Schicht erschienen sind ausgetragen werden:<br>\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++) for ($j=0; $j < $rowcount; $j++)
{ {
$userUID=mysql_result($Erg3, $j, "UID"); $userUID=mysql_result($Erg3, $j, "UID");
echo "<a href=\"./schichtplan.php?action=engeldel&SID=". $_GET["SID"]. "&UIDs=$userUID\">". echo "\t<tr>\n";
UID2Nick($userUID). echo "\t\t<td>". UID2Nick($userUID). "</td>\n";
" (". TID2Type(mysql_result($Erg3, $j, "TID")). Get_Text("inc_schicht_Engel"). echo "\t\t<td>". TID2Type(mysql_result($Erg3, $j, "TID")). Get_Text("inc_schicht_Engel"). "</td>\n";
") austragen</a><br>\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 } // FOR
echo "<br><hr>\n\n\n\n"; echo "</table><br><hr>\n\n\n\n";
//Nachtragen von Engeln //Nachtragen von Engeln
echo "Hat ein anderer Engel die Schicht &uuml;bernommen, trage ihn bitte ein:"; echo "Hat ein anderer Engel die Schicht &uuml;bernommen, trage ihn bitte ein:";
@ -281,6 +291,22 @@ case 'engeladd':
case 'engeldel': case 'engeldel':
$chSQL = "UPDATE `ShiftEntry` SET `UID`='0', `Comment`= 'NULL' WHERE (`SID`='". $_GET["SID"]. $chSQL = "UPDATE `ShiftEntry` SET `UID`='0', `Comment`= 'NULL' WHERE (`SID`='". $_GET["SID"].
"' AND `UID`='". $_GET["UIDs"]. "') LIMIT 1"; "' 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; break;
case 'engelshiftdel': case 'engelshiftdel':

View File

@ -106,18 +106,6 @@ if (IsSet($_GET["enterUID"]))
echo ">Yes \n"; echo ">Yes \n";
echo "</td></tr>\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>". echo " <tr><td>Hometown</td><td>".
"<input type=\"text\" size=\"40\" name=\"Hometown\" value=\"". "<input type=\"text\" size=\"40\" name=\"Hometown\" value=\"".
mysql_result($Erg, 0, "Hometown")."\"></td></tr>\n"; 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=\"hidden\" name=\"enterUID\" value=\"". $_GET["enterUID"]. "\">\n";
echo "<input type=\"submit\" value=\"l&ouml;schen...\">\n"; echo "<input type=\"submit\" value=\"l&ouml;schen...\">\n";
echo "</form>"; echo "</form>";
echo "<hr>";
funktion_db_element_list_2row(
"Freeloader Shifts",
"SELECT `Remove_Time`, `Length`, `Comment` FROM `ShiftFreeloader` WHERE UID=". $_GET["enterUID"]);
} }
include ("../../../27c3/includes/footer.php"); include ("../../../27c3/includes/footer.php");