\nhier hast du die Möglichkeit, neue Räume für die Schichtpläne einzutragen ". "oder vorhandene abzuändern:

\n"; echo "- Neuen Raum/Ort eintragen
\n"; echo "\n"; echo "\n"; for( $i = 1; $i < mysql_num_fields($Erg); $i++ ) { if( substr( mysql_field_name($Erg, $i), 0, 12) == "DEFAULT_EID_") echo "\t"; else echo "\t"; } echo "\t"; echo ""; for( $t = 0; $t < mysql_num_rows($Erg); $t++ ) { echo "\t\n"; for ($j = 1; $j < mysql_num_fields($Erg); $j++) { echo "\t\t\n"; } echo "\t\t\n"; echo "\t\n"; } // ende Auflistung Raeume echo "
Anzahl ". $EngelTypeID[substr( mysql_field_name($Erg, $i), 12)]. "". mysql_field_name($Erg, $i)."Ändern
".mysql_result($Erg, $t, $j)."###
"; } else { UnSet($SQL); switch ($_GET["action"]) { case 'new': echo "Neuen Raum einrichten:
"; echo "
\n"; echo "\n"; for( $Uj = 1; $Uj < mysql_num_fields($Erg); $Uj++ ) { if( (mysql_field_name($Erg, $Uj) == "show") || (mysql_field_name($Erg, $Uj) == "FromPentabarf") ) { echo "". "\n"; } else { //sonderfall fuer Default Engel if( substr( mysql_field_name($Erg, $Uj), 0, 12) == "DEFAULT_EID_") $FeldName = "Anzahl ". $EngelTypeID[substr( mysql_field_name($Erg, $Uj), 12)]; else $FeldName = mysql_field_name($Erg, $Uj); echo "". "\n"; } } echo "
show". "Yes". "No". "
$FeldName"; echo "
\n"; echo "\n"; echo "\n"; echo "
"; break; case 'newsave': $vars = $HTTP_GET_VARS; $count = count($vars) - 1; $vars = array_splice($vars, 0, $count); $Keys = ""; $Values = ""; foreach($vars as $key => $value) { $Keys .= ", `$key`"; $Values .= ", '$value'"; } $SQL = "INSERT INTO `Room` (". substr( $Keys, 2). ") VALUES (". substr( $Values, 2). ")"; SetHeaderGo2Back(); break; case 'change': if (! IsSet($_GET["RID"])) { echo "Fehlerhafter Aufruf!"; } else { echo "Raum abändern:\n"; echo "Hier kannst du eintragen, welche und wieviele Engel für den Raum zur Verfügung stehen müssen."; echo "
\n"; echo "\n"; $SQL2 = "SELECT * FROM `Room` WHERE `RID`='". $_GET["RID"]. "'"; $ERG = mysql_query($SQL2, $con); for ($Uj = 1; $Uj < mysql_num_fields($ERG); $Uj++) { if( (mysql_field_name($ERG, $Uj) == "show") || (mysql_field_name($ERG, $Uj) == "FromPentabarf") ) { echo "". "\n"; } else { if( substr( mysql_field_name($ERG, $Uj), 0, 12) == "DEFAULT_EID_") //sonderfall fuer Default Engel $FeldName = "Anzahl ". $EngelTypeID[substr( mysql_field_name($ERG, $Uj), 12)]; else $FeldName = mysql_field_name($ERG, $Uj); echo "". "\n"; } } echo "
show". "Yes". "No". "
$FeldName". "
\n"; echo "\n"; echo "\n"; echo "\n"; echo "
"; echo "
\n"; echo "\n"; echo "\n"; echo ""; echo "
"; } break; case 'changesave': $sql=""; $vars = $HTTP_GET_VARS; $count = count($vars) - 2; $vars = array_splice($vars, 0, $count); foreach($vars as $key => $value){ $keys = substr($key,1); $sql .= ", `".$keys."`='".$value."' "; } $SQL = "UPDATE `Room` SET ". substr($sql, 2). " WHERE `RID`='". $_GET["eRID"]. "'"; SetHeaderGo2Back(); break; case 'delete': if (IsSet($_GET["RID"])) { $SQL="DELETE FROM `Room` WHERE `RID`='". $_GET["RID"]. "'"; } else { echo "Fehlerhafter Aufruf"; } SetHeaderGo2Back(); break; } //switch // Update ??? if (IsSet($SQL)){ // echo $SQL; // hier muesste das SQL ausgefuehrt werden... $Erg = mysql_query($SQL, $con); if ($Erg == 1) { echo "Änderung wurde gesichert...
"; } else { echo "Fehler beim speichern... bitte noch ein mal probieren :)"; echo "

".mysql_error( $con ). "
($SQL)
"; } } // Ende Update } //IF IsSet($action) include ("./inc/footer.php"); ?>