diff options
Diffstat (limited to 'admin')
-rwxr-xr-x | admin/EngelType.php | 166 | ||||
-rwxr-xr-x | admin/aktiv.php | 96 | ||||
-rwxr-xr-x | admin/dbUpdateFromXLS.php | 448 | ||||
-rwxr-xr-x | admin/dect.php | 68 | ||||
-rwxr-xr-x | admin/dect_clear.php | 25 | ||||
-rwxr-xr-x | admin/dect_cron.php | 69 | ||||
-rwxr-xr-x | admin/faq.1.php | 6 | ||||
-rwxr-xr-x | admin/faq.php | 340 | ||||
-rwxr-xr-x | admin/free.php | 108 | ||||
l--------- | admin/inc | 1 | ||||
-rwxr-xr-x | admin/index.php | 19 | ||||
-rwxr-xr-x | admin/list.php | 34 | ||||
-rwxr-xr-x | admin/menu.php | 46 | ||||
-rwxr-xr-x | admin/news.php | 109 | ||||
l--------- | admin/pic | 1 | ||||
-rwxr-xr-x | admin/room.php | 184 | ||||
-rwxr-xr-x | admin/schichtplan.1.php | 5 | ||||
-rwxr-xr-x | admin/schichtplan.php | 291 | ||||
-rwxr-xr-x | admin/schichtplan_druck.1.php | 5 | ||||
-rwxr-xr-x | admin/schichtplan_druck.php | 169 | ||||
-rwxr-xr-x | admin/shiftadd.php | 329 | ||||
-rwxr-xr-x | admin/sprache.php | 116 | ||||
-rwxr-xr-x | admin/tshirt.php | 60 | ||||
-rwxr-xr-x | admin/user.php | 249 | ||||
-rwxr-xr-x | admin/user2.php | 128 |
25 files changed, 0 insertions, 3072 deletions
diff --git a/admin/EngelType.php b/admin/EngelType.php deleted file mode 100755 index 964d861b..00000000 --- a/admin/EngelType.php +++ /dev/null @@ -1,166 +0,0 @@ -<?php -$title = "Räume"; -$header = "Verwaltung der Räume"; -include ("./inc/header.php"); -include ("./inc/funktion_user.php"); - -function runSQL( $SQL) -{ - include( "./inc/db.php"); - // hier muesste das SQL ausgefuehrt werden... - $Erg = mysql_query($SQL, $con); - if ($Erg == 1) { - echo "Änderung wurde gesichert...<br>"; - echo "[$SQL]<br>"; - return 1; - } else { - echo "Fehler beim speichern... bitte noch ein mal probieren :)"; - echo "<br><br>".mysql_error( $con ). "<br>"; - echo "[$SQL]<br>"; - return 0; - } -} - - -$Sql = "SELECT * FROM `EngelType`"; -$Erg = mysql_query($Sql, $con); - -if( !IsSet($_GET["action"]) ) -{ - echo "Hallo ".$_SESSION['Nick']. - ",<br>\nhier hast du die Möglichkeit, neue Engeltypen für die Schichtpläne einzutragen ". - "oder vorhandene abzuändern:<br><br>\n"; - - echo "<a href=\"./EngelType.php?action=new\">- Neuen EngelType eintragen</a><br>\n"; - - echo "<table width=\"100%\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n"; - echo "<tr class=\"contenttopic\">\n"; - - for( $i = 1; $i < mysql_num_fields($Erg); $i++ ) - { - echo "\t<td>". mysql_field_name($Erg, $i). "</td>"; - } - echo "\t<td>Ändern</td>"; - echo "</tr>"; - - for( $t = 0; $t < mysql_num_rows($Erg); $t++ ) - { - echo "\t<tr class=\"content\">\n"; - for ($j = 1; $j < mysql_num_fields($Erg); $j++) - { - echo "\t\t<td>".mysql_result($Erg, $t, $j)."</td>\n"; - } - echo "\t\t<td><a href=\"./EngelType.php?action=change&TID=".mysql_result($Erg, $t, "TID")."\">###</a></td>\n"; - echo "\t</tr>\n"; - } // ende Auflistung Raeume - echo "</table>"; -} -else -{ - -switch ($_GET["action"]) { - -case 'new': - echo "Neuen EngelType einrichten: <br>"; - echo "<form action=\"./EngelType.php\" method=\"GET\">\n"; - echo "<table>\n"; - - for( $Uj = 1; $Uj < mysql_num_fields($Erg); $Uj++ ) - { - echo "<td>".mysql_field_name($Erg, $Uj)."</td>". - "<td><input type=\"text\" size=\"40\" name=\"".mysql_field_name($Erg, $Uj)."\"></td></tr>\n"; - } - echo "</table>\n"; - echo "<input type=\"hidden\" name=\"action\" value=\"newsave\">\n"; - echo "<input type=\"submit\" value=\"sichern...\">\n"; - echo "</form>"; - 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'"; - } - - if( runSQL( "INSERT INTO `EngelType` (". substr($Keys, 2). ") VALUES (". substr($Values, 2). ")") ) - { - SetHeaderGo2Back(); - - $SQL2 = "SELECT * FROM `EngelType` WHERE `Name`='". $_GET["Name"]. "'"; - $ERG = mysql_query($SQL2, $con); - - if( mysql_num_rows($ERG) == 1) - runSQL( "ALTER TABLE `Room` ADD `DEFAULT_EID_". - mysql_result( $ERG, 0, 0). - "` INT DEFAULT '0' NOT NULL;"); - } - break; - -case 'change': - if (! IsSet($_GET["TID"])) { - echo "Fehlerhafter Aufruf!"; - } else { - - echo "Raum abändern:\n"; - - echo "Hier kannst du eintragen, den EngelType ändern."; - - echo "<form action=\"./EngelType.php\" method=\"GET\">\n"; - echo "<table>\n"; - - $SQL2 = "SELECT * FROM `EngelType` WHERE `TID`='". $_GET["TID"]. "'"; - $ERG = mysql_query($SQL2, $con); - - for ($Uj = 1; $Uj < mysql_num_fields($ERG); $Uj++) - { - echo "<tr><td>". mysql_field_name($ERG, $Uj). "</td>". - "<td><input type=\"text\" size=\"40\" name=\"e". mysql_field_name($ERG, $Uj). "\" ". - "value=\"". mysql_result($ERG, 0, $Uj). "\"></td></tr>\n"; - } - echo "</table>\n"; - echo "<input type=\"hidden\" name=\"eTID\" value=\"". $_GET["TID"]. "\">\n"; - echo "<input type=\"hidden\" name=\"action\" value=\"changesave\">\n"; - echo "<input type=\"submit\" value=\"sichern...\">\n"; - echo "</form>"; - echo "<form action=\"./EngelType.php\" method=\"GET\">\n"; - echo "<input type=\"hidden\" name=\"TID\" value=\"". $_GET["TID"]. "\">\n"; - echo "<input type=\"hidden\" name=\"action\" value=\"delete\">\n"; - echo "<input type=\"submit\" value=\"Löschen...\">"; - echo "</form>"; - } - break; - -case 'changesave': - $vars = $HTTP_GET_VARS; - $count = count($vars) - 2; - $vars = array_splice($vars, 0, $count); - $keys=""; - $sql=""; - foreach($vars as $key => $value){ - $keys = substr($key,1); - $sql .= ", `".$keys."`='".$value."'"; - } - runSQL( "UPDATE `EngelType` SET ". substr($sql, 2). " WHERE `TID`='". $_GET["eTID"]. "'"); - SetHeaderGo2Back(); - break; - -case 'delete': - if (IsSet($_GET["TID"])) - { - runSQL( "DELETE FROM `EngelType` WHERE `TID`='". $_GET["TID"]. "'"); - runSQL( "ALTER TABLE `Room` DROP `DEFAULT_EID_". $_GET["TID"]. "`;"); - } else { - echo "Fehlerhafter Aufruf"; - } - SetHeaderGo2Back(); - break; -} -} - -include ("./inc/footer.php"); -?> diff --git a/admin/aktiv.php b/admin/aktiv.php deleted file mode 100755 index e0ddf3a4..00000000 --- a/admin/aktiv.php +++ /dev/null @@ -1,96 +0,0 @@ -<?PHP - -$title = "akive Engel"; -$header = "Liste der aktiven Engel"; -include ("./inc/header.php"); -include ("./inc/funktion_db_list.php"); -include ("./inc/funktion_user.php"); - -echo "<form action=\"./aktiv.php\" method=\"post\">"; -echo Get_Text("pub_aktive_Text1")."<br>\n"; -echo Get_Text("pub_aktive_Text2")."<br><br>\n"; - -// auswahlbox -echo Get_Text("pub_aktive_Text31")."\n"; -echo "<select name=\"Anzahl\">\n"; -for( $i=0; $i<50; $i++) - echo "\t<option value=\"$i\">$i</option>\n"; -echo "</select>"; -echo Get_Text("pub_aktive_Text32")."<br><br>\n"; -echo "<input type=\"submit\" name=\"SendType\" value=\"Show..\">\n"; -echo "<input type=\"submit\" name=\"SendType\" value=\"Write..\">\n"; -echo "</form>\n"; - -echo "<form action=\"./aktiv.php\" method=\"post\">\n"; - echo "\t<br><input type=\"submit\" name=\"ResetActive\" value=\"reset Active setting\">\n"; -echo "</form>\n"; - -if( Isset($_POST["ResetActive"]) ) -{ - $SQLreset = "UPDATE `User` SET `Aktiv` = '0'"; - $ErgReset = mysql_query($SQLreset, $con); - if ($ErgReset != 1) - echo "Fehler beim zuruecksetzen der Activ\n"; - else - echo "Active wurde erfolgreich zurueckgesetzt\n"; -} - -if( IsSet($_POST["Anzahl"]) ) - echo "<br>\n\n".Get_Text("pub_aktive_Text5_1"). $_POST["Anzahl"]. Get_Text("pub_aktive_Text5_2"). ":"; - -echo "<br><br>\n\n"; - -//ausgabe tabelle -echo "<table width=\"100%\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n"; -echo "<tr class=\"contenttopic\">\n"; -echo "\t<td>". Get_Text("pub_aktive_Nick"). "</td>\n"; -echo "\t<td>". Get_Text("pub_aktive_Anzahl"). "</td>\n"; -echo "\t<td>". Get_Text("pub_aktive_Time"). "</td>\n"; -echo "\t<td>". Get_Text("pub_aktive_Active"). "</td>\n"; -echo "</tr>\n"; - -$SQL = "SELECT ShiftEntry.UID, COUNT(ShiftEntry.UID) AS NR, SUM(Shifts.Len) as LEN ". - "FROM `ShiftEntry` ". - "LEFT JOIN `Shifts` ON ShiftEntry.SID=Shifts.SID ". - "WHERE NOT UID=0 ". - "GROUP BY UID ". - "ORDER BY LEN DESC, NR DESC, UID "; -$Erg = mysql_query($SQL, $con); -echo mysql_error($con); -$rowcount = mysql_num_rows($Erg); - -echo "Anzahl eintraege: $rowcount<br><br>"; - -for ($i=0; $i<$rowcount; $i++) -{ - echo "\n\n\t<tr class=\"content\">\n"; - echo "\t\t<td>". UID2Nick(mysql_result($Erg, $i, "UID")). "</td>\n"; - echo "\t\t<td>". mysql_result($Erg, $i, "NR"). "</td>\n"; - echo "\t\t<td>". mysql_result($Erg, $i, "LEN"). "h</td>\n"; - echo "\t\t<td>"; - if (IsSet($_POST["Anzahl"])) - { - if( $_POST["Anzahl"] < mysql_result($Erg, $i, "LEN") ) - { - if( $_POST["SendType"]=="Show..") - echo "show set"; - else - { - $SQL2="UPDATE User SET Aktiv=1 WHERE UID=". mysql_result($Erg, $i, "UID"). " LIMIT 1"; - $Erg2 = mysql_query($SQL2, $con); - if ($Erg2 != 1) - echo "Fehler beim speichern bei Engel ".UID2Nick(mysql_result($Erg, $i, "UID")); - else - echo "write set"; - } - } - } - echo "</td>\n"; - echo "\t</tr>\n"; -} // ende Auflistung aktive Engel - -echo "</table>"; - -include ("./inc/footer.php"); -?> - diff --git a/admin/dbUpdateFromXLS.php b/admin/dbUpdateFromXLS.php deleted file mode 100755 index 88f7a0f5..00000000 --- a/admin/dbUpdateFromXLS.php +++ /dev/null @@ -1,448 +0,0 @@ -<?PHP - -$title = "DB Update from XML"; -$header = "DB Update from XML"; -$Page["Public"] = "N"; -include ("./inc/header.php"); -include ("./inc/funktion_user.php"); -include ("./inc/funktion_xml.php"); - -/////////// -// DEBUG // -/////////// -$EnableRooms = true; -$EnableRoomsDB = true; -$EnableSchudle = true; -$EnableSchudleDB = true; -//$EnableRooms = false; -//$EnableRoomsDB = false; -//$EnableSchudle = false; -//$EnableSchudleDB = false; - -/*############################################################################################## - F I L E - ##############################################################################################*/ -echo "\n\n<br>\n<h1>XML File:</h1>\n"; -if( isset($_POST["PentabarfUser"]) && isset($_POST["PentabarfPasswd"]) && isset($_POST["PentabarfURL"])) -{ - echo "Update XML-File from Pentabarf.."; -/* $Command = "wget --http-user=". $_POST["PentabarfUser"]. " --http-passwd=".$_POST["PentabarfPasswd"]. " ". - $_POST["PentabarfURL"]. - " --output-file=/tmp/engelXMLwgetLog --output-document=/tmp/engelXML"; -*/ - $Command = "lynx -auth=". $_POST["PentabarfUser"]. ":".$_POST["PentabarfPasswd"]. " -dump ". - $_POST["PentabarfURL"]. " > /tmp/engelXML"; - echo system( $Command, $Status); - - if( $Status==0) - echo "OK.<br>"; - else - echo "fail ($Status)($Command).<br>"; -} -else -{ - echo "<form action=\"dbUpdateFromXLS.php\" method=\"post\">\n"; - echo "<table border=\"0\">\n"; - echo "\t<tr><td>XML-File:</td>". - "<td><input name=\"PentabarfURL\" type=\"text\" size=\"100\" maxlength=\"1000\" ". - "value=\"https://pentabarf.cccv.de/pentabarf/xml/fahrplan/conference/1\"></td></tr>\n"; - echo "\t<tr><td>Username:</td>". - "<td><input name=\"PentabarfUser\" type=\"text\" size=\"30\" maxlength=\"30\"></td></tr>\n"; - echo "\t<tr><td>Password:</td>". - "<td><input name=\"PentabarfPasswd\" type=\"password\" size=\"30\" maxlength=\"30\"></td></tr>\n"; - echo "\t<tr><td></td><td><input type=\"submit\" name=\"FileUpload\" value=\"upload\"></td></tr>\n"; - echo "</table>\n"; - echo "</form>\n"; -} - - - -//readXMLfile("xml.php.xml"); -if( readXMLfile("/tmp/engelXML") == 0) -{ -/* -echo "<pre><br>"; -echo $XMLmain->name; -echo "<br>"; -//print_r(array_values ($XMLmain->sub)); - - -echo "<br>"; -$Feld=7; -echo "$Feld#". $XMLmain->sub[$Feld]->name. "<br>"; -echo "$Feld#". $XMLmain->sub[$Feld]->sub; -//print_r(array_values ($XMLmain->sub[$Feld]->sub)); -while(list($key, $value) = each($XMLmain->sub[$Feld]->sub)) - echo "?ID".$value->sub[1]->data. "=". $value->sub[2]->data. "\n"; - -echo "</pre>"; -*/ - -/*############################################################################################## - V e r s i o n - ##############################################################################################*/ -echo "<hr>\n"; -$XMLrelease = getXMLsubPease( $XMLmain, "RELEASE"); -echo "release: ". $XMLrelease->data. "<br>\n"; -$XMLreleaseDate = getXMLsubPease( $XMLmain, "RELEASE-DATE"); -echo "release date: ". $XMLreleaseDate->data. "<br>\n"; -echo "<hr>\n"; - - - -/*############################################################################################## - R o o m - ##############################################################################################*/ -echo "\n\n<br>\n<h1>Rooms:</h1>\n"; - -function saveRoomData() -{ - include ("./inc/db.php"); - if( isset($_GET["RID"]) && isset($_GET["NumberXML"]) && isset($_GET["NameXML"])) - { - $SQL1 = "SELECT `RID` FROM `Room` ". - "WHERE `RID` = '". $_GET["RID"]. "';"; - $Erg1 = mysql_query($SQL1, $con); - - if( mysql_num_rows($Erg1)==1 ) - $SQL= "UPDATE `Room` SET `Name` = '". mysql_escape_string($_GET["NameXML"]). - "', `FromPentabarf`='Y', `Number`='". $_GET["NumberXML"]. "' ". - "WHERE `RID` = '". $_GET["RID"]. "' LIMIT 1;"; - else - $SQL= "INSERT INTO `Room` ( `RID` , `Name`, `FromPentabarf`, `Number` ) ". - "VALUES ('". $_GET["RID"]. "', '". mysql_escape_string($_GET["NameXML"]). - "', 'Y', ". $_GET["NumberXML"]. ");"; - $Erg = mysql_query($SQL, $con); - if( $Erg ) - echo "Aenderung, an Raum ". $_GET["NameXML"]. ", war erfogreich<br>"; - else - echo "Aenderung, an Raum ". $_GET["NameXML"]. ", war <u>nicht</u> erfogreich.(". - mysql_error($con). ")<br>[$SQL]<br>"; - } - else - echo "Fehler in den Parametern!<br>"; -} /*function saveRoomData*/ - -function getDBRoomName( $RID) -{ - include ("./inc/db.php"); - $SQL = "SELECT Name FROM `Room` WHERE RID=$RID"; - $Erg = mysql_query($SQL, $con); - if(mysql_num_rows($Erg)>0) - return mysql_result($Erg, 0, 0); - else - return ""; -} /*function getDBRoomName*/ - -function getDBRoomNumber( $RID) -{ - include ("./inc/db.php"); - $SQL = "SELECT Number FROM `Room` WHERE RID=$RID"; - $Erg = mysql_query($SQL, $con); - if(mysql_num_rows($Erg)>0) - return mysql_result($Erg, 0, 0); - else - return ""; -} /*function getDBRoomNumber*/ - - - -if( isset($_GET["RoomUpdate"])) - saveRoomData(); - -//INIT Status counter -$DS_OK = 0; -$DS_KO = 0; -$Where = ""; - -//Ausgabe -echo "<table border=\"0\">\n"; -echo "<tr><th>RID</th><th>NumberXML</th><th>NumberDB</th><th>NameXML</th><th>NameDB</th><th>state</th></tr>\n"; -$XMLroom = getXMLsubPease( $XMLmain, "ROOMS"); -while( (list($key, $value) = each($XMLroom->sub)) && $EnableRooms) -{ - $XMLRID = getXMLsubPease( $value, "ID"); - $RID = $XMLRID->data; - $XMLNumber = getXMLsubPease( $value, "NUMBER"); - $NumberXML = trim($XMLNumber->data); - $XMLName = getXMLsubPease( $value, "NAME"); - $NameXML = trim($XMLName->data); - - if( isset($_GET["UpdateALL"])) - { - $_GET["NameXML"] = $NameXML; - $_GET["NumberXML"] = $NumberXML; - $_GET["RID"] = $RID; - saveRoomData(); - } - - $NameDB = convertValues(getDBRoomName($RID)); - $NumberDB = convertValues(getDBRoomNumber($RID)); - - echo "<form action=\"dbUpdateFromXLS.php\">\n"; - echo "\t<tr>\n"; - echo "\t<td><input name=\"RID\" type=\"text\" value=\"$RID\" size=\"1\" eadonly></td>\n"; - echo "\t<td><input name=\"NumberXML\" type=\"text\" value=\"$NumberXML\" size=\"1\" readonly></td>\n"; - echo "\t<td><input name=\"NumberDB\" type=\"text\" value=\"$NumberDB\" size=\"1\"readonly></td>\n"; - echo "\t<td><input name=\"NameXML\" type=\"text\" value=\"$NameXML\" readonly></td>\n"; - echo "\t<td><input name=\"NameDB\" type=\"text\" value=\"$NameDB\" readonly></td>\n"; - if( !( $NameXML==$NameDB && $NumberXML==$NumberDB) ) - { - echo "\t<td><input type=\"submit\" name=\"RoomUpdate\" value=\"update\"></td>\n"; - $DS_KO++; - } - else - { - echo "\t<td>OK</td>\n"; - $DS_OK++; - } - echo "\t</tr>\n"; - echo "</form>\n"; - $Where.= " OR RID=$RID"; -} -echo "<tr><td colspan=\"6\">status: $DS_KO/$DS_OK nicht Aktuel.</td></tr>\n"; - -//Anzeige von nicht im XML File vorkommende entraege -$SQL2 = "SELECT * FROM `Room` WHERE NOT (".substr( $Where, 4). ") AND FromPentabarf = 'Y';"; -$Erg2 = mysql_query($SQL2, $con); -if( mysql_num_rows($Erg2)>0 && $EnableRoomsDB ) - for( $i=0; $i<mysql_num_rows( $Erg2); $i++) - { - $RID = mysql_result( $Erg2, $i, "RID"); - $NumberDB = mysql_result( $Erg2, $i, "Number"); - $NameDB = mysql_result( $Erg2, $i, "Name"); - echo "\t<tr>\n"; - echo "\t<td><input name=\"RID\" type=\"text\" value=\"$RID\" size=\"1\" eadonly></td>\n"; - echo "\t<td><input name=\"NumberXML\" type=\"text\" value=\"\" size=\"1\" readonly></td>\n"; - echo "\t<td><input name=\"NumberDB\" type=\"text\" value=\"$NumberDB\" size=\"1\"readonly></td>\n"; - echo "\t<td><input name=\"NameXML\" type=\"text\" value=\"\" readonly></td>\n"; - echo "\t<td><input name=\"NameDB\" type=\"text\" value=\"$NameDB\" readonly></td>\n"; - echo "\t<td><a href=\"./room.php?action=change&RID=$RID\">edit</a></td>\n"; - echo "\t<tr>\n"; - } - -echo "</table>\n"; - - - - -/*############################################################################################## - S c h e d u l e - ##############################################################################################*/ -echo "\n\n<h1>Schudle:</h1>\n"; - -// erstellt ein Array der Reume - $sql = "SELECT * FROM `Room` ". - "ORDER BY `Number`, `Name`;"; - $Erg = mysql_query($sql, $con); - for( $i=0; $i<mysql_num_rows($Erg); $i++) - for( $j=0; $j<mysql_num_fields( $Erg); $j++) - $RoomID[ mysql_result($Erg, $i, "RID")] - [ mysql_field_name($Erg, $j)] = mysql_result($Erg, $i, $j); - - -function SaveSchedule() -{ - global $RoomID; - - include ("./inc/db.php"); - if( isset($_GET["SIDXML"]) && - isset($_GET["DateXML"]) && - isset($_GET["RIDXML"]) && - isset($_GET["LenXML"]) && - isset($_GET["ManXML"]) ) - { - //erzeuge von `DateE` - $TimeStart = substr( $_GET["DateXML"], 11, 2) + (substr($_GET["DateXML"], 14, 2)/60); - $TimeEnd = ($_GET["LenXML"] + $TimeStart) * 60; - $TimeM = $TimeEnd % 60; - $TimeH = ($TimeEnd - $TimeM)/60; - if( $TimeH>=24 ) - { - $TimeH -= 24; - $DateEnd = substr($_GET["DateXML"], 0, 8). - (substr($_GET["DateXML"], 8, 2)+1). " "; - } - else - $DateEnd = substr($_GET["DateXML"], 0, 11); - $DateEnd .= "$TimeH:$TimeM:00"; - - //Update OR insert ? - $SQL1 = "Select `SID` FROM `Shifts` WHERE `SID`='". $_GET["SIDXML"]. "';"; - $Erg1 = mysql_query($SQL1, $con); - - if( mysql_num_rows($Erg1)==0) - $SQL= "INSERT INTO `Shifts` (`SID`, `DateS`, `DateE`, `Len`, `RID`, `Man`, `FromPentabarf`) ". - "VALUES ('". $_GET["SIDXML"]. "', '". $_GET["DateXML"]. "', '". - $DateEnd. "', '". $_GET["LenXML"]. "', '". - $_GET["RIDXML"]. "', '". mysql_escape_string($_GET["ManXML"]). "', 'Y');"; - else - $SQL= "UPDATE `Shifts` SET ". - "`DateS` = '". $_GET["DateXML"]. "', ". - "`DateE` = '". $DateEnd. "', ". - "`Len` = '". $_GET["LenXML"]. "', ". - "`RID` = '". $_GET["RIDXML"]. "', ". - "`Man` = '". mysql_escape_string($_GET["ManXML"]). "', ". - "`FromPentabarf`= 'Y' ". - "WHERE `SID` = '". $_GET["SIDXML"]. "' LIMIT 1;"; - $Erg = mysql_query($SQL, $con); - if( $Erg ) - { - echo "Aenderung, am Schedule '". $_GET["SIDXML"]. "', war erfogreich<br>\n"; - if( mysql_num_rows($Erg1)==0) - { - echo "-->Create Shifts:<br>\n"; - foreach ($RoomID[ $_GET["RIDXML"]] as $Key => $Value) - if( substr( $Key, 0, 12)=="DEFAULT_EID_" && $Value > 0 ) - { - echo "---->Create engeltype: ". substr( $Key, 12). " ". $Value. "x<br>\n"; - $i=0; - while( $i++ < $Value ) - { - $SQL3 = "INSERT INTO `ShiftEntry` (`SID`, `TID`) VALUES (". - "'". $_GET["SIDXML"]. "', '". substr( $Key, 12). "');"; - - $Erg = mysql_query($SQL3, $con); - - if ($Erg == 1) - echo "------>pass<br>\n"; - else - echo "------>fail <u>". mysql_error($con). - "</u>($SQL3)<br>\n"; - } - - } - echo "<br>\n"; - } - } - else - echo "Aenderung, am Schedule '". $_GET["SIDXML"]. "', war <u>nicht</u> erfogreich.(". - mysql_error($con). ")<br>[$SQL]<br>\n"; - } - else - echo "Fehler in den Parametern!<br>"; -} /*SaveSchedule*/ - -if( isset($_GET["ScheduleUpdate"])) - SaveSchedule(); - -//INIT Status counter -$DS_OK = 0; -$DS_KO = 0; -$Where = ""; - -//ausgabe -echo "<table border=\"0\">\n"; -echo "<tr><th>SID</th><th>Date</th>". - "<th>Room</th><th>Len</th><th>Name</th><th>state</th></tr>\n"; -echo "<tr align=\"center\"><td>XML - DB</td><td>XML - DB</td>". - "<td>XML - DB</td><td>XML - DB</td><td>XML - DB</td><td></td></tr>\n"; -$XMLevents = getXMLsubPease( $XMLmain, "EVENTS"); -while( (list($EventKey, $Event) = each($XMLevents->sub)) && $EnableSchudle) -{ - echo "<form action=\"dbUpdateFromXLS.php\">\n"; - echo "\t<tr>\n"; - - $DateXML = substr($Event->attributes["START"], 0, 10). " ". - substr($Event->attributes["START"], 11). ":00"; - $LenXML = $Event->attributes["DURATION"]; - $LenXML = substr( $LenXML, 0, 2) + (substr($LenXML, 3, 2)/60); - $XMLeventID = getXMLsubPease( $Event, "ID"); - $SIDXML = $XMLeventID->data; - $RIDXML = $Event->attributes["ROOM-ID"]; - $XMLTitle = getXMLsubPease( $Event, "TITLE"); - $ManXML = $XMLTitle->data; - - if( isset($_GET["UpdateALL"])) - { - $_GET["SIDXML"] = $SIDXML; - $_GET["DateXML"] = "$DateXML $TimeXML"; - $_GET["LenXML"] = $LenXML; - $_GET["RIDXML"] = $RIDXML; - $_GET["ManXML"] = $ManXML; - SaveSchedule(); - } - - $SQL = "SELECT * FROM `Shifts` WHERE SID=$SIDXML"; - $Erg = mysql_query($SQL, $con); - if(mysql_num_rows($Erg)>0) - { - $SIDDB = mysql_result($Erg, 0, "SID"); - $TimeDB = mysql_result($Erg, 0, "DateS"); - $LenDB = mysql_result($Erg, 0, "Len"); - $RIDDB = mysql_result($Erg, 0, "RID"); - $ManDB = mysql_result($Erg, 0, "Man"); - } - else - $SIDDB = $TimeDB = $LenDB = $RIDDB = $ManDB= ""; - echo "\t<td><input name=\"SIDXML\" type=\"text\" value=\"$SIDXML\" size=\"2\" eadonly></td>\n"; - echo "\t<td><input name=\"DateXML\" type=\"text\" value=\"$DateXML\" size=\"17\" readonly>\n\t\t". - "<input name=\"DateDB\" type=\"text\" value=\"$TimeDB\" size=\"17\" readonly></td>\n"; - echo "\t<td><input name=\"RIDXML\" type=\"text\" value=\"$RIDXML\" size=\"1\" readonly>\n\t\t". - "<input name=\"RIDDB\" type=\"text\" value=\"$RIDDB\" size=\"1\" readonly></td>\n"; - echo "\t<td><input name=\"LenXML\" type=\"text\" value=\"$LenXML\" size=\"1\"readonly>\n\t\t". - "<input name=\"LenDB\" type=\"text\" value=\"$LenDB\" size=\"1\"readonly></td>\n"; - echo "\t<td><input name=\"ManXML\" type=\"text\" value=\"$ManXML\" size=\"40\"readonly>\n\t\t". - "<input name=\"ManDB\" type=\"text\" value=\"$ManDB\" size=\"40\"readonly></td>\n"; - if( !( $SIDXML==$SIDDB && - $DateXML==$TimeDB && - $RIDXML==$RIDDB && - $LenXML==$LenDB && - $ManXML==$ManDB) ) - { - echo "\t<td><input type=\"submit\" name=\"ScheduleUpdate\" value=\"update\"></td>\n"; - $DS_KO++; - } - else - { - echo "\t<td>OK</td>\n"; - $DS_OK++; - } - echo "\t</tr>\n"; - echo "</form>\n"; - $Where.= " OR SID=$SIDXML"; -} -echo "<tr><td colspan=\"6\">status: $DS_KO/$DS_OK nicht Aktuel.</td></tr>\n"; - -//Anzeige von nicht im XML File vorkommende entraege -$SQL2 = "SELECT * FROM `Shifts` WHERE NOT (".substr( $Where, 4). ") AND FromPentabarf = 'Y';"; -$Erg2 = mysql_query($SQL2, $con); -if(mysql_num_rows($Erg2)>0 && $EnableSchudleDB ) - for( $i=0; $i<mysql_num_rows( $Erg2); $i++) - { - echo "\t<tr>\n"; - $SID = mysql_result($Erg2, $i, "SID"); - $Time = mysql_result($Erg2, $i, "DateS"); - $Len = mysql_result($Erg2, $i, "Len"); - $RID = mysql_result($Erg2, $i, "RID"); - $Man = mysql_result($Erg2, $i, "Man"); - echo "\t<td><input name=\"SIDXML\" type=\"text\" value=\"$SID\" size=\"2\" eadonly></td>\n"; - echo "\t<td><input name=\"DateXML\" type=\"text\" value=\"\" size=\"17\" readonly>\n\t\t". - "<input name=\"DateDB\" type=\"text\" value=\"$Time\" size=\"17\" readonly></td>\n"; - echo "\t<td><input name=\"RIDXML\" type=\"text\" value=\"\" size=\"1\" readonly>\n\t\t". - "<input name=\"RIDDB\" type=\"text\" value=\"$RID\" size=\"1\" readonly></td>\n"; - echo "\t<td><input name=\"LenXML\" type=\"text\" value=\"\" size=\"1\"readonly>\n\t\t". - "<input name=\"LenDB\" type=\"text\" value=\"$Len\" size=\"1\"readonly></td>\n"; - echo "\t<td><input name=\"ManXML\" type=\"text\" value=\"\" size=\"40\"readonly>\n\t\t". - "<input name=\"ManDB\" type=\"text\" value=\"$Man\" size=\"40\"readonly></td>\n"; - echo "\t<td><a href=\"./schichtplan.php?action=change&SID=$SID\">edit</a></td>\n"; - echo "\t<tr>\n"; - } -echo "</table>"; - - - -/*############################################################################################## - U P D A T E A L L - ##############################################################################################*/ -echo "\n\n<br>\n<h1>Update ALL:</h1>\n"; - -echo "<form action=\"dbUpdateFromXLS.php\">\n"; -echo "\t<input type=\"submit\" name=\"UpdateALL\" value=\"now\">\n"; -echo "</form>\n"; - -} //if XMLopenOOK - -include ("./inc/footer.php"); -?> - diff --git a/admin/dect.php b/admin/dect.php deleted file mode 100755 index 99a58028..00000000 --- a/admin/dect.php +++ /dev/null @@ -1,68 +0,0 @@ -<?PHP - -$title = "Engelsystem - DECT"; -$header = "DECT send call"; -$Page["Public"] = "N"; -include ("./inc/header.php"); - -include ("./inc/funktion_modem.php"); - -if( !isset($_GET["dial"])) $_GET["dial"] = ""; -if( !isset($_GET["custum"])) $_GET["custum"] = ""; - -if( $_GET["dial"]=="dial") -{ - if( $_GET["DECT"]=="") - $Number = $_GET["custum"]; - else - $Number = $_GET["DECT"]; - - if( strlen( $_GET["timeh"])== 1) - $_GET["timeh"] = "0". $_GET["timeh"]; - - if( strlen( $_GET["timem"])== 1) - $_GET["timem"] = "0". $_GET["timem"]; - - SetWackeup( $Number, $_GET["timeh"], $_GET["timem"]); - - $_GET["custum"] = $Number; -} - - - echo "<form action=\"./dect.php\" method=\"GET\">\n"; - echo "<table>\n"; - - echo "<tr><th>Number</th><th>h:m</th><th></th></tr>\n"; - - echo "<tr><td>\n"; - // Listet alle Nicks auf - echo "<select name=\"DECT\">\n"; - echo "\t<option value=\"\">costum</option>\n"; - - $usql="SELECT * FROM User WHERE NOT DECT='' ORDER BY Nick"; - $uErg = mysql_query($usql, $con); - $urowcount = mysql_num_rows($uErg); - for ($k=0; $k<$urowcount; $k++) - { - echo "\t<option value=\"".mysql_result($uErg, $k, "DECT")."\">". - mysql_result($uErg, $k, "Nick"). - " (". mysql_result($uErg, $k, "DECT"). ")". - "</option>\n"; - } - echo "</select>\n"; - - echo "<input type=\"text\" name=\"custum\" size=\"4\" maxlength=\"4\" value=\"". $_GET["custum"]. "\">\n"; - echo "</td>\n"; - - echo "<td><input type=\"text\" name=\"timeh\" size=\"2\" maxlength=\"2\" value=\"". gmdate("H", time()+90+3600). "\">:"; - echo "<input type=\"text\" name=\"timem\" size=\"2\" maxlength=\"2\" value=\"". gmdate("i", time()+90+3600). "\"></td>\n"; - echo "<td><input type=\"submit\" name=\"dial\" value=\"dial\"></td>\n"; - echo "</tr>"; - echo "</table>\n"; - - echo "</form>"; - - -include ("./inc/footer.php"); -?> - diff --git a/admin/dect_clear.php b/admin/dect_clear.php deleted file mode 100755 index 2b20d6c5..00000000 --- a/admin/dect_clear.php +++ /dev/null @@ -1,25 +0,0 @@ -<?PHP - - -include ("./inc/db.php"); -include ("./inc/config.php"); -include ("./inc/funktion_modem.php"); - - -$SQL = "SELECT DECT FROM `User`;"; - -$Erg = mysql_query($SQL, $con); - -echo mysql_error($con); - -for( $i=0; $i<mysql_num_rows($Erg); $i++) -{ - $Number = "#10". mysql_result($Erg, $i, "DECT"); - if( strlen($Number)==7) - DialNumber( $Number); -} - -return 0; - -?> - diff --git a/admin/dect_cron.php b/admin/dect_cron.php deleted file mode 100755 index 00119567..00000000 --- a/admin/dect_cron.php +++ /dev/null @@ -1,69 +0,0 @@ -<?PHP - - -include ("./inc/db.php"); -include ("./inc/config.php"); -include ("./inc/funktion_modem.php"); - -//ausfuerungs Ruetmuss (in s) -$StartTimeBeforEvent = (60/4)*60; - - - - -function UID2DECT($UID) -{ - include ("./inc/db.php"); - - $SQL = "SELECT DECT FROM `User` WHERE UID='$UID'"; - $Erg = mysql_query($SQL, $con); - - return mysql_result($Erg, 0); -} - - -$SQL = "SELECT Shifts.DateS, ShiftEntry.UID ". - "FROM `Shifts` INNER JOIN `ShiftEntry` ON `Shifts`.`SID` = `ShiftEntry`.`SID` ". - "WHERE ((`Shifts`.`DateS`>'". gmdate("Y-m-d H:i:s", time()+3600+120). "') AND ". - "(`Shifts`.`DateS`<='". gmdate("Y-m-d H:i:s", time()+3600+120+$StartTimeBeforEvent). "') );"; -// "WHERE (Shifts.DateS>'2004-12-27 10:45:00' AND ". -// "Shifts.DateS<='2004-12-27 11:00:00');"; - -$Erg = mysql_query($SQL, $con); - -echo mysql_error($con); - -for( $i=0; $i<mysql_num_rows($Erg); $i++) -{ -// echo mysql_result($Erg, $i, "UID"); - if( mysql_result($Erg, $i, "UID")>0) - { - $SQL2 = "SELECT DECT FROM `User` WHERE ( `UID`='". mysql_result($Erg, $i, "UID"). "');"; - $Erg2 = mysql_query($SQL2, $con); - - $Number = mysql_result($Erg2, 0, "DECT"); - if( $Number!="") - { - $TimeH = substr( mysql_result($Erg, $i, "DateS"), 11, 2); - $TimeM = substr( mysql_result($Erg, $i, "DateS"), 14, 2); - $TimeM = substr( mysql_result($Erg, $i, "DateS"), 14, 2) - 5; - if( $TimeM < 0 ) - { - $TimeM += 60; - $TimeH -= 1; - } - if( $TimeH < 0 ) - $TimeH += 24; - - if( strlen( $TimeH) == 1) - $TimeH = "0".$TimeH; - - SetWackeup( $Number, $TimeH, $TimeM); - } - } -} - -return 0; - -?> - diff --git a/admin/faq.1.php b/admin/faq.1.php deleted file mode 100755 index ee2bbb53..00000000 --- a/admin/faq.1.php +++ /dev/null @@ -1,6 +0,0 @@ -<h4 class="menu"> Anfragen und FAQ </h4> - -<li><a href="faq.php?quest=all">Alle Anfragen</a></li> -<li><a href="faq.php?quest=open">Offene Anfragen (<? noAnswer(); ?>)</a></li> -<li><a href="faq.php?quest=faq">FAQ-Liste editiern</a></li> - diff --git a/admin/faq.php b/admin/faq.php deleted file mode 100755 index e4123841..00000000 --- a/admin/faq.php +++ /dev/null @@ -1,340 +0,0 @@ -<?php -$title = "Himmel"; -$header = "FAQ / Fragen an die Erzengel"; -$submenus = 1; -include ("./inc/header.php"); -include ("./inc/funktion_user.php"); - -//var init -$quest_bearb=0; - -if (IsSet($_GET["quest"])) { - -switch ($_GET["quest"]) -{ - -// *--------------------------------------------------------------------------- -// * Anfragen - Bearbeitung -// *--------------------------------------------------------------------------- -// * je nach Übergabeoption ($quest) koennen Anfragen beantwortet werden oder -// * als FAQ uebergeben werden -// *--------------------------------------------------------------------------- - -case "all": - $SQL="Select * from Questions ORDER BY QID DESC"; -?> - Alle Anfragen:<br> - <table width="100%" class="border" cellpadding="2" cellspacing="1"> - <tr class="contenttopic"> - <th>Frage</th> - <th>Anfragender</th> - <th>Beantwortet?</th> - <th>Antwort</th> - <th>Antwort von</th> - <th>change</th> - </tr> - -<? - - $Erg = mysql_query($SQL, $con); - // anzahl zeilen - $Zeilen = mysql_num_rows($Erg); - for ($n = 0 ; $n < $Zeilen ; $n++) { - echo "<tr class=\"content\">\n"; - echo "<td>".mysql_result($Erg, $n, "Question")."</td>\n"; - echo "<td>".UID2Nick(mysql_result($Erg, $n, "UID"))."</td>\n"; - echo "<td>"; - if (mysql_result($Erg, $n, "AID")>0) { - echo "Ja</td>\n"; - echo "<td>".mysql_result($Erg, $n, "Answer")."</td>\n"; - echo "<td>".UID2Nick(mysql_result($Erg, $n, "AID"))."</td>\n"; - } else { - echo "Nein</td>\n"; - echo "<td> </td>\n"; - echo "<td> </td>\n"; - } - echo "<td><a href=\"faq.php?quest=edit&QID=".mysql_result($Erg, $n, "QID")."\">xxx</a></td>"; - echo "</tr>\n"; - } - echo "</table>\n"; - break; -case "open": - $SQL="Select * from Questions where AID = \"0\" ORDER BY QID DESC"; - $quest_bearb=1; // Fragenliste anzeigen -?> - Offene Anfragen:<br> -<?php - break; -case "edit": - $quest_bearb=0; // keine Fragenliste anzeigen, Frage editieren... - if (!IsSet($_GET["QID"])){ -?> - Fehlerhafter Aufruf...<br>Bitte die Bearbeitung nochmals beginnen :) -<?php - } else { - $SQL = "SELECT * FROM Questions where QID=". $_GET["QID"]; - $Erg = mysql_query($SQL, $con); -?> - <form action="./faq.php" method="GET"> - Anfrage von <b><?php echo UID2NICK(mysql_result($Erg, 0, "UID")); ?></b>:<br> - <textarea name="Question" rows="3" cols="80"><?php echo mysql_result($Erg, 0, "Question"); ?></textarea> - <br><br> - Antwort der Erzengel:<br> -<?php - if (mysql_result($Erg, 0, "Answer")=="") { -?> - <textarea name="Answer" rows="5" cols="80">Bitte hier die Antwort eintragen...</textarea> - <br> -<?php - } else { -?> - <textarea name="Answer" rows="5" cols="80"><?php echo mysql_result($Erg, 0, "Answer"); ?></textarea> - <br> -<?php - } -?> - <input type="hidden" name="QID" value="<? echo $_GET["QID"]; ?>"> - <input type="hidden" name="quest" value="save"> - <input type="submit" value="Sichern..."> - </form> - Wenn diese Anfrage bereits beantwortet wurde, kannst du diese so wie sie ist als Engel-FAQ eintrag übernehmen.<br> - In diesem Falle erscheint hier der Link: -<?php - if (mysql_result($Erg, 0, "AID")<>"0") { -?> - <a href="./faq.php?quest=transfer&QID=<?php echo $QID; ?>">Als FAQ-Eintrag sichern...</a> -<?php - } - - } // Abfrage der QID - break; - -case "save": - if (!IsSet($_GET["QID"])){ -?> - Fehlerhafter Aufruf... Bitte die Bearbeitung nochmal starten... -<?php - } else { - $SQL = "UPDATE Questions SET Question=\"". $_GET["Question"]. - "\", AID=\"". $_SESSION['UID']. "\" , Answer=\"". $_GET["Answer"]. "\" ". - "where QID = \"". $_GET["QID"]. "\" LIMIT 1"; - $Erg = mysql_query($SQL, $con); - if ($Erg == 1) { -?> - Der Eintrag wurde geändert<br> -<?php - } else { -?> - Ein Fehler ist aufgetreten. Sorry, du kannst es aber ja nochmal probieren :) -<?php - } - } - break; - -case "transfer": - if (!IsSet($_GET["QID"])){ -?> - Fehlerhafter Aufruf... Bitte die Bearbeitung nochmal starten... -<?php - } else { - - $SQL1="Select * from Questions where QID=". $_GET["QID"]; - $Erg = mysql_query($SQL1, $con); - $SQL2="Insert into FAQ Values (\"\", \"". - mysql_result($Erg, 0, "Question")."\", \"".mysql_result($Erg, 0, "Answer")."\")"; - $Erg = mysql_query($SQL2, $con); - if ($Erg == 1) { -?> - Der Eintrag wurde übertragen.<br> -<?php - } else { -?> - Ein Fehler ist aufgetreten. Sorry, du kannst es aber ja nochmal probieren :) -<?php - } - } - - break; - -// *--------------------------------------------------------------------------- -// * FAQ - Bearbeitung -// *--------------------------------------------------------------------------- -// * je nach Übergabeoption ($quest) koennen FAQ's erfasst werden, -// * geaendert oder geloscht werden... -// *--------------------------------------------------------------------------- - - -case "faq": - $quest_bearb=0; // keine Fragenliste anzeigen, FAQ editieren... -?> - FAQ-Liste:<br> - <a href="./faq.php?quest=faqnew">Neuen Eintrag</a> -<?php - $SQL = "SELECT * FROM `FAQ`"; - $Erg = mysql_query($SQL, $con); - - // anzahl zeilen - $Zeilen = mysql_num_rows($Erg); - - for ($n = 0 ; $n < $Zeilen ; $n++) { - if (mysql_result($Erg, $n, "Antwort")!="") { -?> - <p class='question'><?php echo mysql_result($Erg, $n, "Frage"); ?></p> - <p class='answetion'><?php echo mysql_result($Erg, $n, "Antwort"); ?></p> - <a href="./faq.php?quest=faqedit&FAQID=<?php echo mysql_result($Erg, $n, "FID"); ?>">Bearbeiten</a> - <br>---<br> -<?php -} - } - break; - -case "faqedit": - if (!IsSet($_GET["FAQID"])) - { -?> - Fehlerhafter Aufruf...<br>Bitte die Bearbeitung nochmals beginnen :) -<?php - } else { - - $SQL = "SELECT * FROM FAQ where FID=". $_GET["FAQID"]; - $Erg = mysql_query($SQL, $con); - - // anzahl zeilen - $Zeilen = mysql_num_rows($Erg); -?> - <form action="./faq.php" method="GET"> - Frage:<br> - <textarea name="Frage" rows="3" cols="80"><?php echo mysql_result($Erg, 0, "Frage"); ?></textarea> - <br><br> - Antwort:<br> - <textarea name="Antwort" rows="5" cols="80"><?php echo mysql_result($Erg, 0, "Antwort"); ?></textarea><br> - <input type="hidden" name="FAQID" value="<? echo $_GET["FAQID"]; ?>"> - <input type="hidden" name="quest" value="faqsave"> - <input type="submit" value="Sichern..."> - </form> - <form action="./faq.php"> - <input type="hidden" name="FAQID" value="<? echo $_GET["FAQID"]; ?>"> - <input type="hidden" name="quest" value="faqdelete"> - <input type="submit" value="Löschen..."> - </form> -<?php - } - break; - -case "faqdelete"; - if (!IsSet($_GET["FAQID"])) - { -?> - Fehlerhafter Aufruf... Bitte die Bearbeitung nochmal starten... -<?php - } else { - $SQL = "delete from FAQ where FID = \"". $_GET["FAQID"]. "\" LIMIT 1"; - $Erg = mysql_query($SQL, $con); - if ($Erg == 1) { -?> - Der Eintrag wurde gelöscht<br> -<?php - } else { -?> - Ein Fehler ist aufgetreten. Ist der Eintag bereits gelöscht gewesen? -<?php - } - } - break; - -case "faqsave"; - if (!IsSet($_GET["FAQID"])) - { -?> - Fehlerhafter Aufruf... Bitte die Bearbeitung nochmal starten... -<?php - } else { - $SQL = "UPDATE FAQ SET Frage=\"". $_GET["Frage"]. "\", Antwort=\"". $_GET["Antwort"]. - "\" where FID = \"". $_GET["FAQID"]. "\" LIMIT 1"; - $Erg = mysql_query($SQL, $con); - if ($Erg == 1) { -?> - Der Eintrag wurde geändert<br> -<?php - } else { -?> - Ein Fehler ist aufgetreten. Sorry, du kannst es aber ja nochmal probieren :) -<?php - } - } - break; - -case "faqnew": -?> - <form action="./faq.php" method="GET"> - Frage:<br> - <textarea name="Frage" rows="3" cols="80">Frage...</textarea><br><br> - Antwort:<br> - <textarea name="Antwort" rows="5" cols="80">Antwort</textarea><br> - <input type="hidden" name="quest" value="faqnewsave"> - <input type="submit" value="Sichern..."> - </form> -<?php - break; -case "faqnewsave"; - $SQL = "INSERT INTO FAQ VALUES (\"\", \"". $_GET["Frage"]. "\", \"". $_GET["Antwort"]. "\")"; - $Erg = mysql_query($SQL, $con); - if ($Erg == 1) { -?> - Der Eintrag wurde erfasst.<br> -<?php - } else { -?> - Ein Fehler ist aufgetreten. Sorry, du kannst es aber ja nochmal probieren :) -<?php - } - break; - -} - -// Hilfsroutine für die Anfragen: -// Fragenliste anzeigen??? - -if ($quest_bearb==1) { - - $Erg = mysql_query($SQL, $con); - // anzahl zeilen - $Zeilen = mysql_num_rows($Erg); - - if ($Zeilen==0){ -?> - keine vorhanden... -<?php - } else { - for ($n = 0 ; $n < $Zeilen ; $n++) { -?> -<p> -<?php echo nl2br(mysql_result($Erg, $n, "Question"))."\n"; ?> -</p> - <br> - <a href="./faq.php?quest=edit&QID=<?php echo mysql_result($Erg, $n, "QID"); ?>">Bearbeiten</a> - <br>---<br> -<?php - } - } - - -} - -} else { - -?> -Bitte wähle aus, ob du: - -<ul> - <li><a href="./faq.php?quest=all">Alle Anfragen anzeigen/bearbeiten möchtest</a></li> - <li><a href="./faq.php?quest=open">Alle offenen Anfragen anzeigen/bearbeiten möchtest</a></li> - <li><a href="./faq.php?quest=faq">Die FAQ's anzeigen/bearbeiten</a></li> -</ul> - -<?php - -} - -include ("./inc/footer.php"); -?> diff --git a/admin/free.php b/admin/free.php deleted file mode 100755 index 1e7bd259..00000000 --- a/admin/free.php +++ /dev/null @@ -1,108 +0,0 @@ -<?PHP - -$title = "Erzengel"; -$header = "Freie Engel"; -include ("./inc/header.php"); -include ("./inc/funktion_db_list.php"); -include ("./inc/funktion_user.php"); - - -echo "Hallo ".$_SESSION['Nick'].",<br>\n"; - -?> -hier findest du alle Engel, welche zur Zeit in Schichten verplant sind: -<br><br> - - -<? -####################################################### -# Ermitteln freier Engel -# -# auslesen aller Engel und dazugehoerige Schichten -####################################################### - -// $SQL= "SELECT User.Nick, Schichtplan.*, Schichtbelegung. * FROM User LEFT JOIN Schichtplan ON User.UID=Schichtbelegung.UID, Schichtplan.SID LEFT JOIN Schichtbelegung.SID WHERE User.UID = Schichtbelegung.UID AND Schichtplan.SID = Schichtbelegung.SID AND Schichtplan.Date < now() and Schichtplan.EndDate > now() ORDER BY Nick"; - -/* geht nicht ??? unter stabel !! -$SQL= "SELECT User.Nick, Schichtplan.*, Schichtbelegung.* ". - "FROM Schichtplan, User LEFT OUTER ". - "JOIN Schichtbelegung ON User.UID=Schichtbelegung.UID ". - "WHERE Schichtplan.SID = Schichtbelegung.SID AND ". - "Schichtplan.Date < now() and ". - "Schichtplan.EndDate > now() ". - "ORDER BY Nick"; - -$SQL = "SELECT Shifts.*, ShiftEntry.*, User.Nick ". - "FROM User ". - "INNER JOIN (Shifts INNER JOIN ShiftEntry ON Shifts.SID = ShiftEntry.SID) ON User.UID = ShiftEntry.UID ". - "WHERE (Shifts.DateS<=Now() AND Shifts.DateE>=Now() );"; -*/ -$SQL = "SELECT Shifts.*, ShiftEntry.* ". - "FROM Shifts INNER JOIN ShiftEntry ON Shifts.SID = ShiftEntry.SID ". - "WHERE (Shifts.DateS<=Now() AND Shifts.DateE>=Now() );"; - -//SELECT User.Nick, Schichtplan.*, Schichtbelegung. * FROM User LEFT JOIN Schichtbelegung ON User.UID=Schichtbelegung.UID, Schichtplan LEFT JOIN Schichtbelegung ON Schichtplan.SID = Schichtbelegung.SID WHERE Schichtplan.Date < now() and Schichtplan.EndDate > now() ORDER BY Nick - -//echo "<pre>$SQL</pre>"; - -$Erg = mysql_query($SQL, $con); -$Zeilen = mysql_num_rows($Erg); - -// for ($i = 1; $i < mysql_num_fields($Erg); $i++) -// echo "|".mysql_field_name($Erg, $i); - - - -echo "<table width=\"100%\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n"; -echo "\t<tr class=\"contenttopic\">\n"; -echo "\t\t<td>Nick</td>\n"; -echo "\t\t<td>Schicht</td>\n"; -echo "\t\t<td>Ort</td>\n"; -echo "\t\t<td>Von</td>\n"; -echo "\t\t<td>Bis</td>\n"; -echo "\t</tr>\n"; - - -$inuse=""; -for ($i=0; $i < $Zeilen; $i++) -{ - echo "<tr class=\"content\">\n"; - echo "<td><a href=\"./user.php?Type=Normal&enterUID=". mysql_result($Erg, $i, "UID"). "\">". - mysql_result($Erg, $i, "Nick"). "</td></a>\n"; - echo "<td>". UID2Nick(mysql_result($Erg, $i, "UID")). "</td>\n"; - echo "<td>". mysql_result($Erg, $i, "RID"). "</td>\n"; - echo "<td>". mysql_result($Erg, $i, "DateS"). "</td>\n"; - echo "<td>". mysql_result($Erg, $i, "DateE"). "</td>\n"; - echo "</tr>\n"; - - if ($inuse!="") - $inuse.= " OR "; - $inuse.= "(Nick = \"". UID2Nick(mysql_result($Erg, $i, "UID")). "\")"; -} -if ($inuse!="") - $inuse=" WHERE NOT (".$inuse.")"; -echo "</table>\n"; - - -//########################################################################################################## - -echo "<br><br>\n\nhier findest du alle Engel, welche zur Zeit in keiner Schichten verplant sind:<br><br>\n"; -echo "<table width=\"100%\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\"\>\n"; -echo "\t<tr class=\"contenttopic\">\n\t\t<td>Nick</td>\n\t\t<td>DECT</td>\n\t</tr>\n"; - -$SQL = "SELECT Nick, UID, DECT FROM User".$inuse.";"; -$Erg = mysql_query($SQL, $con); -$Zeilen = mysql_num_rows($Erg); -for ($i=0; $i < $Zeilen; $i++) -{ - echo "\t<tr class=\"content\">\n"; - echo "\t\t<td><a href=\"./user.php?Type=Normal&enterUID=". mysql_result($Erg, $i, "UID"). "\">". - mysql_result($Erg, $i, "Nick"). "</a></td>\n"; - echo "\t\t<td>". mysql_result($Erg, $i, "DECT"). "</td>\n"; - echo "\n</tr>\n"; -} -echo "</table>\n"; - -include ("./inc/footer.php"); -?> - diff --git a/admin/inc b/admin/inc deleted file mode 120000 index 22dc542a..00000000 --- a/admin/inc +++ /dev/null @@ -1 +0,0 @@ -../inc
\ No newline at end of file diff --git a/admin/index.php b/admin/index.php deleted file mode 100755 index c7ae3a14..00000000 --- a/admin/index.php +++ /dev/null @@ -1,19 +0,0 @@ -<?PHP - -$title = "Erzengel"; -$header = "Index"; -include ("./inc/header.php"); -include ("./inc/funktion_db_list.php"); - -echo "Hallo Erzengel ".$_SESSION['Nick'].",<br>\n"; - -?> - -du bist jetzt im Erzengel-Bereich. Hier kannst du die Engel-Verwaltung vornehmen.<br><br> - -Bitte melde dich <a href="../logout.php">hier</a> nach getaner Arbeit immer ab, damit kein anderer hier Änderungen vornehmen kann. - -<? -include ("./inc/footer.php"); -?> - diff --git a/admin/list.php b/admin/list.php deleted file mode 100755 index 6ae8a336..00000000 --- a/admin/list.php +++ /dev/null @@ -1,34 +0,0 @@ -<?PHP - -$title = "Debug-Liste"; -$header = "Datenbank-Auszug"; -include ("./inc/header.php"); -include ("./inc/funktion_db_list.php"); - - -/* -echo "<h1>Raeume</h1> <br>"; -funktion_db_list("Raeume"); - -echo "<h1>Schichtbelegung</h1> <br>"; -funktion_db_list("Schichtbelegung"); - -echo "<h1>Schichtplan</h1> <br>Hier findest du alle bisher eingetragenen Schichten:"; -funktion_db_list("Schichtplan"); - -echo "<h1>User</h1> <br>"; -funktion_db_list("User"); - -echo "<h1>News</h1> <br>"; -funktion_db_list("News"); - -echo "<h1>FAQ</h1> <br>"; -funktion_db_list("FAQ"); - -*/ - -echo "Deaktiviert"; - -include ("./inc/footer.php"); -?> - diff --git a/admin/menu.php b/admin/menu.php deleted file mode 100755 index bd0761ed..00000000 --- a/admin/menu.php +++ /dev/null @@ -1,46 +0,0 @@ -<?PHP -include ("./inc/funktion_faq.php"); - -$Menu["Path"] = "admin/"; -$Menu["Name"] = "Kategorie"; -$Menu["Entry"][1]["File"] = "room.php"; -$Menu["Entry"][1]["Name"] = "Räume"; -$Menu["Entry"][12]["File"] = "EngelType.php"; -$Menu["Entry"][12]["Name"] = "Engeltypen"; -$Menu["Entry"][2]["File"] = "schichtplan.php"; -$Menu["Entry"][2]["Name"] = "Schichtplan"; -$Menu["Entry"][2]["Line"] = "<br>"; -$Menu["Entry"][3]["File"] = "dbUpdateFromXLS.php"; -$Menu["Entry"][3]["Name"] = "UpdateDB"; -$Menu["Entry"][13]["File"] = "dect.php"; -$Menu["Entry"][13]["Name"] = "Dect"; -$Menu["Entry"][13]["Line"] = "<br>"; -$Menu["Entry"][4]["File"] = "user.php"; -$Menu["Entry"][4]["Name"] = "Engelliste"; -$Menu["Entry"][5]["File"] = "aktiv.php"; -$Menu["Entry"][5]["Name"] = "Aktivliste"; -$Menu["Entry"][6]["File"] = "tshirt.php"; -$Menu["Entry"][6]["Name"] = "T-Shirtausgabe"; -$Menu["Entry"][6]["Line"] = "<br><br>"; -$Menu["Entry"][7]["File"] = "news.php"; -$Menu["Entry"][7]["Name"] = "News-Verwaltung"; -$Menu["Entry"][8]["File"] = "faq.php"; -$Menu["Entry"][8]["Name"] = "FAQ (". noAnswer(). ")"; -$Menu["Entry"][9]["File"] = "free.php"; -$Menu["Entry"][9]["Name"] = "Freie Engel"; -$Menu["Entry"][9]["Line"] = "<br><br>"; -$Menu["Entry"][11]["File"] = "sprache.php"; -$Menu["Entry"][11]["Name"] = "Language"; -$Menu["Entry"][11]["Line"] = "<br><br>"; -$Menu["Entry"][10]["File"] = "list.php"; -$Menu["Entry"][10]["Name"] = "Debug"; - -if ($_SESSION['CVS']["MenueShowAdminSection"] == "Y") { - $MenuAdmin["Name"] = "Erzengel"; - $MenuAdmin["Entry"][0]["File"] = "../nonpublic/index.php"; - $MenuAdmin["Entry"][0]["Name"] = "Engel-Menü"; -} // MenueShowAdminSection - - - -?> diff --git a/admin/news.php b/admin/news.php deleted file mode 100755 index 7c501751..00000000 --- a/admin/news.php +++ /dev/null @@ -1,109 +0,0 @@ -<?PHP - -$title = "Newsverwaltung"; -$header = "Verwaltung der News"; -include ("./inc/header.php"); -include ("./inc/funktion_db_list.php"); -include ("./inc/funktion_user.php"); - - -if (!IsSet($_GET["action"])) { - -$SQL = "SELECT * from News order by Datum DESC"; -$Erg = mysql_query($SQL, $con); - -$rowcount = mysql_num_rows($Erg); -?> -Hallo <? echo $_SESSION['Nick'] ?>, <br> -hier kannst du die News säbern... falls jemand auf die Idee kommt, -hier herumzuspamen oder aus Versehen falsche Informationen zu hinterlegen :)<br><br> - -<table width="100%" class="border" cellpadding="2" cellspacing="1"> - <tr class="contenttopic"> - <td>Datum</td> - <td>Betreff</td> - <td>Text</td> - <td>Erfasser</td> - <td>Engeltreff</td> - <td>Änd.</td> - </tr> -<? - -for ($i=0; $i < $rowcount; $i++) { - echo "\t<tr class=\"content\">\n"; - echo "\t <td>".mysql_result($Erg, $i, "Datum")."</td>"; - echo "\t <td>".mysql_result($Erg, $i, "Betreff")."</td>"; - echo "\t <td>".mysql_result($Erg, $i, "Text")."</td>"; - echo "\t <td>".UID2Nick(mysql_result($Erg, $i, "UID"))."</td>"; - echo "\t <td>".mysql_result($Erg, $i, "Treffen")."</td>"; - echo "\t <td><a href=\"./news.php?action=change&date=".mysql_result($Erg, $i, "Datum")."\">XXX</a></td>"; - echo "\t</tr>\n"; -} -echo "</table>"; - - -} else { - -switch ($_GET["action"]) -{ - -case 'change': - $SQL = "SELECT * from News where (Datum='". $_GET["date"]. "')"; - $Erg = mysql_query($SQL, $con); - - echo "<form action=\"./news.php\" method=\"GET\">\n"; - - echo "<table>\n"; - echo " <tr><td>Datum</td><td><input type=\"text\" size=\"40\" name=\"date\" value=\"". - mysql_result($Erg, 0, "Datum")."\" disabled></td></tr>\n"; - echo " <tr><td>Betreff</td><td><input type=\"text\" size=\"40\" name=\"eBetreff\" value=\"". - mysql_result($Erg, 0, "Betreff")."\"></td></tr>\n"; - echo " <tr><td>Text</td><td><textarea rows=\"10\" cols=\"80\" name=\"eText\">". - mysql_result($Erg, 0, "Text")."</textarea></td></tr>\n"; - echo " <tr><td>Engel</td><td><input type=\"text\" size=\"40\" name=\"eUser\" value=\"". - UID2Nick(mysql_result($Erg, 0, "UID"))."\" disabled></td></tr>\n"; - echo " <tr><td>Treffen</td><td><input type=\"text\" size=\"40\" name=\"eTreffen\" value=\"". - mysql_result($Erg, 0, "Treffen")."\"></td></tr>\n"; - echo "</table>"; - - echo "<input type=\"hidden\" name=\"date\" value=\"". $_GET["date"]. "\">\n"; - echo "<input type=\"hidden\" name=\"action\" value=\"change_save\">\n"; - echo "<input type=\"submit\" value=\"Abschicken...\">\n"; - echo "</form>"; - - echo "<form action=\"./news.php?action=delete\" method=\"POST\">\n"; - echo "<input type=\"hidden\" name=\"date\" value=\"". $_GET["date"]. "\">\n"; - echo "<input type=\"submit\" value=\"löschen...\">\n"; - echo "</form>"; - - break; - -case 'change_save': - $chsql="UPDATE News set Betreff = \"". $_GET["eBetreff"]. "\", Text = \"". $_GET["eText"]. - "\", Treffen=". $_GET["eTreffen"]. " where (Datum = '". $_GET["date"]. "') limit 1"; - break; - -case 'delete': - $chsql="DELETE from News where Datum = '". $_POST["date"]. "' limit 1"; - break; -} - -if (IsSet($chsql)) { -// SQL-Statement ausführen... - $Erg = mysql_query($chsql, $con); - If ($Erg == 1) - { - echo "Änderung erfolgreich gesichert..."; - } - else - { - echo "Ein Fehler ist aufgetreten... probiere es am besten nocheinmal... :)<br><br>\n"; - echo mysql_error($con); - echo "<br><br>\n[$chsql]"; - } -} - -} -include ("./inc/footer.php"); -?> - diff --git a/admin/pic b/admin/pic deleted file mode 120000 index a21de85f..00000000 --- a/admin/pic +++ /dev/null @@ -1 +0,0 @@ -../pic
\ No newline at end of file diff --git a/admin/room.php b/admin/room.php deleted file mode 100755 index 3b8cb63c..00000000 --- a/admin/room.php +++ /dev/null @@ -1,184 +0,0 @@ -<?php -$title = "Räume"; -$header = "Verwaltung der Räume"; -include ("./inc/header.php"); -include ("./inc/funktion_user.php"); -include ("./inc/funktion_schichtplan.php"); - -$Sql = "SELECT * FROM `Room` ORDER BY Number, Name"; -$Erg = mysql_query($Sql, $con); - -if( !IsSet($_GET["action"]) ) -{ - echo "Hallo ".$_SESSION['Nick']. - ",<br>\nhier hast du die Möglichkeit, neue Räume für die Schichtpläne einzutragen ". - "oder vorhandene abzuändern:<br><br>\n"; - - echo "<a href=\"./room.php?action=new\">- Neuen Raum/Ort eintragen</a><br>\n"; - - echo "<table width=\"100%\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n"; - echo "<tr class=\"contenttopic\">\n"; - - for( $i = 1; $i < mysql_num_fields($Erg); $i++ ) - { - if( substr( mysql_field_name($Erg, $i), 0, 12) == "DEFAULT_EID_") - echo "\t<td> Anzahl ". $EngelTypeID[substr( mysql_field_name($Erg, $i), 12)]. "</td>"; - else - echo "\t<td>". mysql_field_name($Erg, $i)."</td>"; - } - echo "\t<td>Ändern</td>"; - echo "</tr>"; - - for( $t = 0; $t < mysql_num_rows($Erg); $t++ ) - { - echo "\t<tr class=\"content\">\n"; - for ($j = 1; $j < mysql_num_fields($Erg); $j++) - { - echo "\t\t<td>".mysql_result($Erg, $t, $j)."</td>\n"; - } - echo "\t\t<td><a href=\"./room.php?action=change&RID=".mysql_result($Erg, $t, "RID")."\">###</a></td>\n"; - echo "\t</tr>\n"; - } // ende Auflistung Raeume - echo "</table>"; -} -else -{ - -UnSet($SQL); - -switch ($_GET["action"]) { - -case 'new': - echo "Neuen Raum einrichten: <br>"; - echo "<form action=\"./room.php\" method=\"GET\">\n"; - echo "<table>\n"; - - for( $Uj = 1; $Uj < mysql_num_fields($Erg); $Uj++ ) - { - //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 "<td>$FeldName</td>". - "<td><input type=\"text\" size=\"40\" name=\"".mysql_field_name($Erg, $Uj)."\">"; - echo "</td></tr>\n"; - } - echo "</table>\n"; - echo "<input type=\"hidden\" name=\"action\" value=\"newsave\">\n"; - echo "<input type=\"submit\" value=\"sichern...\">\n"; - echo "</form>"; - 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'"; - } - - //ermitteln des letzten eintrages - $SQLin = "SELECT `RID` FROM `Room` ". - "WHERE NOT (`FromPentabarf` = 'Y') ". - "ORDER BY `RID` DESC"; - $Ergin = mysql_query($SQLin, $con); - if( mysql_num_rows( $Ergin) > 0) - $RID = mysql_result( $Ergin, 0, 0)+1; - else - $RID = 10000; - - $SQL = "INSERT INTO `Room` (`RID`$Keys) VALUES ( '$RID'$Values)"; - 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 "<form action=\"./room.php\" method=\"GET\">\n"; - echo "<table>\n"; - - $SQL2 = "SELECT * FROM `Room` WHERE `RID`='". $_GET["RID"]. "'"; - $ERG = mysql_query($SQL2, $con); - - for ($Uj = 1; $Uj < mysql_num_fields($ERG); $Uj++) - { - //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 "<tr><td>$FeldName</td>". - "<td><input type=\"text\" size=\"40\" name=\"e".mysql_field_name($ERG, $Uj)."\" ". - "value=\"".mysql_result($ERG, 0, $Uj)."\">"; - echo"</td></tr>\n"; - } - echo "</table>\n"; - echo "<input type=\"hidden\" name=\"eRID\" value=\"". $_GET["RID"]. "\">\n"; - echo "<input type=\"hidden\" name=\"action\" value=\"changesave\">\n"; - echo "<input type=\"submit\" value=\"sichern...\">\n"; - echo "</form>"; - echo "<form action=\"./room.php\" method=\"GET\">\n"; - echo "<input type=\"hidden\" name=\"RID\" value=\"". $_GET["RID"]. "\">\n"; - echo "<input type=\"hidden\" name=\"action\" value=\"delete\">\n"; - echo "<input type=\"submit\" value=\"Löschen...\">"; - echo "</form>"; - } - 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...<br>"; - } else { - echo "Fehler beim speichern... bitte noch ein mal probieren :)"; - echo "<br><br>".mysql_error( $con ). "<br>($SQL)<br>"; - } -} // Ende Update - -} //IF IsSet($action) - -include ("./inc/footer.php"); -?> diff --git a/admin/schichtplan.1.php b/admin/schichtplan.1.php deleted file mode 100755 index 30761390..00000000 --- a/admin/schichtplan.1.php +++ /dev/null @@ -1,5 +0,0 @@ -<h4 class="menu"> Schichtplan </h4> - -<li><a href="./schichtplan.php">Ein-/Austragen</a></li> -<li><a href="./schichtplan_druck.php">Druckversion</a></li> - diff --git a/admin/schichtplan.php b/admin/schichtplan.php deleted file mode 100755 index 9e7ec81b..00000000 --- a/admin/schichtplan.php +++ /dev/null @@ -1,291 +0,0 @@ -<?php -$title = "Schichtplan"; -$header = "Neue Schichten erfassen"; -$submenus = 1; -include ("./inc/header.php"); -include ("./inc/funktion_user.php"); - -if (!IsSet($_GET["action"])) { -echo "Hallo ".$_SESSION['Nick'].",<br>\n"; -echo "hier kannst du Schichten anlegen, ändern oder löschen.<br><br>"; -echo "<a href=\"./shiftadd.php\">Neue Schicht einplanen</a><br><br>\n\n"; - -?> -<table width="100%" class="border" cellpadding="2" cellspacing="1"> - <tr class="contenttopic"> - <td>Datum</td> - <td>Raum</td> - <td>Dauer</td> - <td>Ändern</td> - </tr> -<? - -$sql = "SELECT `SID`, `DateS`, `RID`, `Len` FROM `Shifts` ". - "ORDER BY RID, DateS "; -$Erg = mysql_query($sql, $con); -$rowcount = mysql_num_rows($Erg); -for( $i = 0; $i < $rowcount; $i++) -{ - echo "\t<tr class=\"content\">\n"; - echo "\t\t<td>".mysql_result($Erg, $i, "DateS")."</td>\n"; - - $sql2= "SELECT `Name` FROM `Room` WHERE `RID`=\"".mysql_result($Erg, $i, "RID")."\""; - $Erg2 = mysql_query($sql2, $con); - if( mysql_num_rows($Erg2) > 0) - echo "\t\t<td>".mysql_result($Erg2, 0, "Name")."</td>\n"; - else - echo "\t\t<td>Unbenkannt (RID=". mysql_result($Erg, $i, "RID"). ")</td>\n"; - echo "\t\t<td>".mysql_result($Erg, $i, "Len")." Std. </td>\n"; - echo "\t\t<td><a href=\"./schichtplan.php?action=change&SID=". - mysql_result($Erg, $i, "SID")."\">####</a></td>\n"; - echo "\t</tr>\n"; -} -echo "</table>"; - - -} else { - -// aus sicherheitzgründen wegen späterer genuzung -UnSet($chSQL); - -switch ($_GET["action"]){ - -case 'change': - if ( !IsSet($_GET["SID"]) ){ - echo "Fehlerhafter Aufruf!\n"; - } - else - { - - $sql = "SELECT * FROM `Shifts` WHERE (`SID` = \"". $_GET["SID"]. "\" )"; - $Erg = mysql_query($sql, $con); - - echo "Schicht abändern: <br>\n"; - - // Anzeige Allgemeiner schaischt daten - echo "<form action=\"".$_SERVER['SCRIPT_NAME']."\" method=\"GET\" >"; - echo "<table>\n"; - echo " <tr><td>Schichtbeginn</td>". - "<td><input value=\"". mysql_result($Erg, 0, "DateS"). - "\" type=\"text\" size=\"40\" name=\"eDate\"></td></tr>\n"; - echo " <tr><td>Raum</td><td>\n<select name=\"eRID\">\n"; - - $sql2 = "SELECT `RID`, `Name` FROM `Room`"; - $Erg2 = mysql_query($sql2, $con); - $rowcount = mysql_num_rows($Erg2); - for( $i = 0; $i < $rowcount; $i++ ) - { - $RID=mysql_result($Erg2, $i, "RID"); - echo " <option value=\"".$RID."\""; - if( $RID == mysql_result($Erg, 0, "RID") ) - echo " selected"; - echo ">".mysql_result($Erg2, $i, "Name")."</option>\n"; - } - echo " </select>\n</td></tr>\n"; - - echo " <tr><td>Dauer in h</td>". - "<td><input value=\"". mysql_result($Erg, 0, "Len"). - "\" type=\"text\" size=\"40\" name=\"eDauer\"></td></tr>\n"; - echo " <tr><td>Beschreibung</td>". - "<td><input value=\"". mysql_result($Erg, 0, "Man"). - "\" type=\"text\" size=\"40\" name=\"eName\"></td></tr>\n"; - echo "</table>\n"; - - echo "<input type=\"hidden\" name=\"SID\" value=\"". $_GET["SID"]. "\">\n"; - echo "<input type=\"hidden\" name=\"action\" value=\"changesave\">\n"; - echo "<input type=\"submit\" value=\"sichern...\">\n"; - echo "</form>\n\n"; - - // Löschen - echo "<form action=\"". $_SERVER['SCRIPT_NAME']. "\" method=\"GET\" >\n"; - echo "<input type=\"hidden\" name=\"SID\" value=\"". $_GET["SID"]. "\">\n"; - echo "<input type=\"hidden\" name=\"action\" value=\"delete\">\n"; - echo "<input type=\"submit\" value=\"Löschen...\">\n"; - echo "</form>\n\n"; - - echo "<b>ACHTUNG:</b><br>\n"; - echo "Beim Löschen werden die bisher eingetragenen Engel für diese Schicht mitgelöscht.<br>\n"; - - echo "<br><hr>\n\n\n\n"; - - //Freie Engelschichten - $sql3 = "SELECT TID FROM `ShiftEntry` WHERE SID=". $_GET["SID"]. " AND UID=0"; - $Erg3 = mysql_query($sql3, $con); - $rowcount = mysql_num_rows($Erg3); - - echo "Folgende Engelschichten sind noch nicht vergeben.\n"; - echo "Und koenen, wenn diese nSchicht nicht benoetigt wird geloet werden:<br>\n"; - for ($j=0; $j < $rowcount; $j++) - { - $TID = mysql_result($Erg3, $j, 0); - echo "<a href=\"./schichtplan.php?action=engelshiftdel&SID=". $_GET["SID"]. "&TID=$TID\">". - "freie ". TID2Type($TID). Get_Text("inc_schicht_Engel"). "schicht loeschen</a><br>\n"; - } - echo "<br><hr>\n\n\n\n"; - - //Ausgabe eingetragener schischten - $sql3 = "SELECT * FROM `ShiftEntry` WHERE SID=". $_GET["SID"]. " AND NOT UID=0"; - $Erg3 = mysql_query($sql3, $con); - $rowcount = mysql_num_rows($Erg3); - - echo "Folgende Engel Sind fuer die Schicht eingetargen.\n"; - echo "Und koennen, wenn diese nicht zu Schicht erschienen sind ausgetragen werden:<br>\n"; - 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"; - } // FOR - - echo "<br><hr>\n\n\n\n"; - - //Nachtragen von Engeln - echo "Hat ein anderer Engel die Schicht übernommen, trage ihn bitte ein:"; - echo "<form action=\"".$_SERVER['SCRIPT_NAME']."\" method=\"GET\" >\n"; - echo "<input type=\"hidden\" name=\"SID\" value=\"". $_GET["SID"]. "\">\n"; - echo "<input type=\"hidden\" name=\"action\" value=\"engeladd\">\n"; - - // Listet alle Nicks auf - echo "<select name=\"UIDs\">\n"; - echo "\t<option value=\"0\">--neu--</option>\n"; - - $usql="select * from User order by Nick"; - $uErg = mysql_query($usql, $con); - $urowcount = mysql_num_rows($uErg); - for ($k=0; $k<$urowcount; $k++) - { - echo "\t<option value=\"".mysql_result($uErg, $k, "UID")."\">". - mysql_result($uErg, $k, "Nick"). - "</option>\n"; - } - echo "</select>\n"; - - echo " als \n"; - - // holt eine liste der benötigten Engel zu dieser Schischt - $sql3 = "SELECT Count(`TID`) AS `CTID`, `TID` FROM `ShiftEntry` "; - $sql3.= "WHERE (`SID`='". $_GET["SID"]. "' AND `UID`='0') "; - $sql3.= "GROUP BY `SID`, `TID`, `UID` "; - $Erg3 = mysql_query($sql3, $con); - $i=-1; - while( ++$i < mysql_num_rows($Erg3)) - { - $EngelNeed[mysql_result($Erg3, $i, "TID")] = mysql_result($Erg3, $i, "CTID"); - } - - // Gibt dei möglich Engeltypen aus und zeigt wíefiel noch beötigt werden - echo "<select name=\"TID\">\n"; - $SQL2 = "SELECT `TID`, `Name` FROM `EngelType` ORDER BY `Name`"; - $Erg2 = mysql_query($SQL2, $con); - for ($l = 0; $l < mysql_num_rows($Erg2); $l++) - { - $EngelTID = mysql_result($Erg2, $l, "TID"); - echo "<option value=\"$EngelTID\">"; - echo mysql_result($Erg2, $l, "Name"). Get_Text("inc_schicht_engel"); - if( !isset($EngelNeed[$EngelTID]) ) - echo " (0)"; - else - echo " (".$EngelNeed[$EngelTID].")"; - echo "</option>\n"; - } - echo "</select>\n"; - - echo "<input type=\"submit\" value=\"eintragen...\">\n"; - echo "</form>"; - - } // IF ISSET( - break; - -case 'engeladd': - if( $_GET["UIDs"]>0) - { - $SQL = "SELECT * FROM `ShiftEntry` ". - "WHERE (`SID`='". $_GET["SID"]. "' AND `TID`='". $_GET["TID"]. "' AND `UID`='0')"; - $ERG = mysql_query($SQL, $con); - if( mysql_num_rows($ERG) != 0 ) - { - $chSQL = "UPDATE `ShiftEntry` SET ". - "`UID`='". $_GET["UIDs"]. "', `Comment`='shift added by ".$_SESSION['Nick']."' "; - $chSQL .= "WHERE (`SID`='". $_GET["SID"]. "' AND ". - "`TID`='". $_GET["TID"]. "' AND `UID`='0' ) LIMIT 1"; - } - else - { - $chSQL = "INSERT INTO `ShiftEntry` (`SID`, `TID`, `UID`, `Comment`) VALUES ("; - $chSQL .= "'". $_GET["SID"]. "', '". $_GET["TID"]. "', ". - "'". $_GET["UIDs"]. "', 'shift added by ".$_SESSION['Nick']."')"; - } - - echo "Es wird folgende Schicht zusätzlich eingetragen:<br>\n"; - echo "Engel: ".UID2Nick($_GET["UIDs"])."<br>\n"; - echo "Bemerkung: Schicht eingetragen durch Erzengel ".$_SESSION['Nick']."<br>\n<br>\n"; - } - else - { - $chSQL = "INSERT INTO `ShiftEntry` (`SID`, `TID`, `UID`, `Comment`) VALUES ("; - $chSQL .= "'". $_GET["SID"]. "', '". $_GET["TID"]. "', '0', NULL)"; - echo "Es wird eine weitere Schicht eingetragen:<br>\n"; - } - break; - -case 'engeldel': - $chSQL = "UPDATE `ShiftEntry` SET `UID`='0', `Comment`= 'NULL' WHERE (`SID`='". $_GET["SID"]. - "' AND `UID`='". $_GET["UIDs"]. "') LIMIT 1"; - break; - -case 'engelshiftdel': - $chSQL = "DELETE FROM `ShiftEntry` WHERE `SID`='". $_GET["SID"]. "' AND `TID`='". - $_GET["TID"]. "' AND `UID`='0' LIMIT 1"; - break; - -case 'changesave': - $query = mysql_query("SELECT DATE_ADD('". $_GET["eDate"]. "', INTERVAL '+0 ". $_GET["eDauer"]. "' DAY_HOUR)", $con); - $enddate = mysql_fetch_row($query); - - $chSQL = "UPDATE `Shifts` SET `DateS`='". $_GET["eDate"]. "', `DateE`='".$enddate[0]. - "', `RID`='". $_GET["eRID"]. "', `Len`='". $_GET["eDauer"]. "', ". - "`Man`='". $_GET["eName"]. "' WHERE `SID`=". $_GET["SID"]; - SetHeaderGo2Back(); - break; - -case 'delete': - $chSQL = "DELETE FROM `Shifts` WHERE `SID`=". $_GET["SID"]. " LIMIT 1"; - $ch2SQL = "DELETE FROM `ShiftEntry` WHERE `SID`=". $_GET["SID"]; - SetHeaderGo2Back(); - break; - -} // end switch - -if (IsSet($chSQL)){ -// echo $chSQL; - // hier muesste das SQL ausgefuehrt werden... - $Erg = mysql_query($chSQL, $con); - if( $DEBUG ) - echo "DEBUG SQL: $chSQL<br>\n"; - if ($Erg == 1) - { - echo "Änderung wurde gesichert...<br>"; - if( $DEBUG ) - echo "DEBUG: ergebniss". $Erg. "<br>\n"; - if (IsSet($ch2SQL)) - { - $Erg = mysql_query($ch2SQL, $con); - if( $DEBUG ) - echo "DEBUG SQL: $ch2SQL<br>\n"; - if( $DEBUG ) echo "DEBUG: ergebniss". $Erg. "<br>\n"; - } - } - else - { - echo "Fehler beim speichern... bitte noch ein mal probieren :)<br>"; - echo mysql_error($con); - } -} // Ende Update - -} - - -include ("./inc/footer.php"); -?> diff --git a/admin/schichtplan_druck.1.php b/admin/schichtplan_druck.1.php deleted file mode 100755 index 30761390..00000000 --- a/admin/schichtplan_druck.1.php +++ /dev/null @@ -1,5 +0,0 @@ -<h4 class="menu"> Schichtplan </h4> - -<li><a href="./schichtplan.php">Ein-/Austragen</a></li> -<li><a href="./schichtplan_druck.php">Druckversion</a></li> - diff --git a/admin/schichtplan_druck.php b/admin/schichtplan_druck.php deleted file mode 100755 index a6ec2dbd..00000000 --- a/admin/schichtplan_druck.php +++ /dev/null @@ -1,169 +0,0 @@ -<?php -$title = "Himmel"; -$header = "Schichtpläne"; -$submenus = 1; - - -if (!IsSet($action)) { -include ("./inc/header.php"); -include ("./inc/funktionen.php"); - -include ("./inc/funktion_schichtplan.php"); -include ("./inc/funktion_user.php"); - - -?> - -Hallo <? echo $_SESSION['Nick']?>,<br> -auf dieser Seite kannst du dir den Schichtplan in einer Druckansicht generieren lassen. Wähle hierfür ein Datum und den Raum: -<br><br> -<form action="./schichtplan_druck.php" method="post" target="_print"> -<input type="hidden" name="action" value="1"> - - -<table> - <tr> - <td align="right">Datum:</td> - <td align="left"> - <select name="ausdatum"> -<? -$SQL = "SELECT DateS FROM `Shifts` ORDER BY 'DateS'"; -$Erg = mysql_query($SQL, $con); -if (!isset($ausdatum)) - $ausdatum = substr(mysql_result($Erg, $i , 0), 0,10); - -for ($i = 0 ; $i < mysql_fetch_row($Erg) ; $i++) -{ - if ($tmp != substr(mysql_result($Erg, $i , 0), 0,10)) - { - $tmp = substr(mysql_result($Erg, $i , 0), 0,10); - echo "\t\t\t\t<option value=\"$tmp\">$tmp</option>\n"; - } -} - -?> - </select> - </td> - </tr> - <tr> - <td align="right">Raum:</td> - <td align="left"> - <select name="Raum"> -<?php - -$res = mysql_query("SELECT Name, RID FROM `Room` WHERE `show`!='N' ORDER BY Name;",$con); - -for ($i = 0; $i < mysql_num_rows($res); $i++) -{ - $rid=mysql_result($res,$i,"RID"); - $raum_name=mysql_result($res, $i, "Name"); - echo "\t\t\t\t<option value=\"$rid\">$raum_name</option>\n"; -} - - -?> - </select> - </td> - </tr> - -</table> -<br> -<input type="submit" value="generieren..."> -</form> - -<br><br> -<? - -include ("./inc/footer.php"); - -} -else -{ - - -if (IsSet($Raum) AND IsSet($ausdatum)) -{ -include ("./inc/db.php"); -include ("./inc/config.php"); -include ("./inc/funktion_lang.php"); -include ("./inc/funktion_schichtplan.php"); -include ("./inc/funktion_user.php"); -?> - -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> -<title>Schichtplan</title> -<meta name="keywords" content="Engel, Himmelsverwaltung"> -<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> -<meta http-equiv="Content-Style-Type" content="text/css"> -<meta http-equiv="expires" content="0"> -<meta name="robots" content="index"> -<meta name="revisit-after" content="1 days"> -<meta http-equiv="content-language" content="de"> -</head> -<body> - -<h1>Schichtplan</h1> - -<table> - <tr> - <td width="250" align="left"> - <span style="font-weight:bold;font-size:100%">Datum:</span> - <span style="font-weight:bold;font-size:200%"><? echo $date; ?></span> - </td> - <td width="350" align="right"> - <span style="font-weight:bold;font-size:100%">Raum:</span> - <span style="font-weight:bold;font-size:200%"><? echo $RoomID[$Raum]; ?> </span> - </td> - </tr> -</table> - -<table border="2" width="650" class="border" cellpadding="2" cellspacing="1"> -<? -//Ausgabe Spalten überschrift -?> - <tr class="contenttopic"> - <th bgcolor="#E0E0E0">Uhrzeit</th> - <th bgcolor="#E0E0E0">Schichtplanbelegung</th> - </tr> -<? - -//Zeit Ausgeben -for( $i = 0; $i < 24; $i++ ) - for( $j = 0; $j < $GlobalZeileProStunde; $j++) - { - $Spalten[$i * $GlobalZeileProStunde + $j] = - "\t<tr class=\"content\">\n"; - if( $j==0) - { - $Spalten[$i * $GlobalZeileProStunde + $j].= - "\t\t<td rowspan=\"$GlobalZeileProStunde\">"; - if( $i < 10 ) - $Spalten[$i * $GlobalZeileProStunde + $j].= "0"; - $Spalten[$i * $GlobalZeileProStunde + $j].= "$i:"; - if( ( ($j*60) / $GlobalZeileProStunde) < 10 ) - $Spalten[$i * $GlobalZeileProStunde + $j].= "0"; - $Spalten[$i * $GlobalZeileProStunde + $j].= - ( ($j*60) / $GlobalZeileProStunde). "</td>\n"; - - } - } - - -CreateRoomShifts( $Raum ); - - -// Ausgabe Zeilen - for ($i = 0; $i < (24 * $GlobalZeileProStunde); $i++) echo $Spalten[$i]; -// Ende -echo "</table>\n"; - -echo "Stand: ". gmdate("Y-m-d H:i"). "\n"; -echo "</body>\n"; -echo "</html>\n"; - -} //isset($Vars) -} //isset($Action) - -?> diff --git a/admin/shiftadd.php b/admin/shiftadd.php deleted file mode 100755 index 8b2f6451..00000000 --- a/admin/shiftadd.php +++ /dev/null @@ -1,329 +0,0 @@ -<?php -$title = "Schicht Hinzufügen"; -$header = "Neue Schichten erfassen"; - -include ("./inc/header.php"); -include ("./inc/funktion_user.php"); - -echo "Hallo ".$_SESSION['Nick'].",<br>\n"; - -// erstellt ein Array der Reume - $sql = "SELECT `RID`, `Name` FROM `Room` ORDER BY `Name`"; - $Erg = mysql_query($sql, $con); - $rowcount = mysql_num_rows($Erg); - - for ($i=0; $i<$rowcount; $i++) - { - $Room[$i]["RID"] = mysql_result($Erg, $i, "RID"); - $Room[$i]["Name"] = mysql_result($Erg, $i, "Name"); - } - -// erstellt ein Aray der Engeltypen - $sql = "SELECT `TID`, `Name` FROM `EngelType` ORDER BY `Name`"; - $Erg = mysql_query($sql, $con); - $rowcount = mysql_num_rows($Erg); - - for ($i=0; $i<$rowcount; $i++) - { - $EngelType[$i]["TID"] = mysql_result($Erg, $i, "TID"); - $EngelType[$i]["Name"] = mysql_result($Erg, $i, "Name").Get_Text("inc_schicht_engel"); - } - - -if (!IsSet($_GET["action"])) - $_GET["action"] = "new"; - -$Time = time()+3600+3600; - -switch( $_GET["action"]) -{ - -case 'new': -?> -Hier kannst du neue Schichten eintragen. Dazu musst du den Anfang und das Ende der Schichten eintragen. -Über die Länge der Schichten errechnet sich dadurch die Anzahl dieser. Dadurch können gleich -mehrere Schichten auf einmal erfasst werden: - -<form action="<? echo $_SERVER['SCRIPT_NAME']; ?>" > - <table> - <tr> - <td align="right">Name:</td> - <td><input type="text" name="SchichtName" size="50" value="--???--"></td> - </tr> - <tr> - <td align="right">Ort:</td> - <td><select name="RID"> - <? - foreach ($Room As $RTemp) - echo "\t<option value=\"". $RTemp["RID"]. "\">". $RTemp["Name"]. "</option>\n"; - ?> - </select></td> - </tr> - - <tr><td><u>Zeit:</u></td></tr> - <tr> - <td align="right">Month.Jahr:</td> - <td><input type="ext" name="MonthJahr" size="7" value="<?echo gmdate("Y-m", $Time)?>"></td> - </tr> - <tr> - <td align="right">Beginn:</td> - <td>Date<input type="text" name="SDatum" size="5" value="<?echo gmdate("d", $Time)?>"> - Time<input type="text" name="STime" size="5" value="10"></td> - </tr> - <tr> - <td align="right">More then One</td> - <td><input type="checkbox" name="MoreThenOne" value="ON" checked></td> - </tr> - <tr> - <td align="right">End:</td> - <td>Date<input type="text" name="EDatum" size="5" value="<?echo gmdate("d", $Time)?>"> - Time<input type="text" name="ETime" size="5" value="12"></td> - </tr> - <tr> - <td align="right">Länge in h:</td> - <td><input type="text" name="len" size="5" value="2"></td> - </tr> - <tr> - <td align="right">Sonderschichten ein:</td> - <td><input type="checkbox" name="NachtON" value="ON"></td> - </tr> - <tr> - <td align="right">Sonder in h (Time;Time):</td> - <td><input type="text" name="len_night" size="50" value="0;4;8;10;12;14;16;18;20;22;24"></td> - </tr> - - <tr><td><u>Anzahl Engel je Type:</u></td></tr> -<? - foreach ($EngelType As $TTemp) - { - echo " <tr><td align=\"right\">". $TTemp["Name"]. ":</td>\n"; - echo " <td><input type=\"text\" name=\"EngelType". $TTemp["TID"]. "\" size=\"5\" value=\"0\"></td>\n"; - } -?> -</table> - <br> -<input type="hidden" name="OnlyShow" value="ON"> -<input type="hidden" name="action" value="newsave"> -<input type="submit" value="zeig mal Gabriel!"> -</form> - -<? - break; // Ende new - -case 'newsave': - if (isset($_GET["SDatum"]) && ($_GET["len"] > 0)) - { - $lenOrg = $_GET["len"]; - if( !isset($_GET["NachtON"])) - $_GET["NachtON"] = "OFF"; - if( $_GET["NachtON"] == "ON" ) - { - $lenArrayDummy = explode( ";", $_GET["len_night"]); - foreach ( $lenArrayDummy as $Temp ) - { - if( isset($Temp2) ) - { - $lenArray[$Temp2] = $Temp-$Temp2; - } - $Temp2 = $Temp; - - }//foreach - }//IF( $NachtON == "ON" ) - - echo "<table border=\"1\">\n"; - echo "<tr>\n"; - echo "\t<td valign=\"top\" align=\"center\">Start</td>\n"; - echo "\t<td valign=\"top\" align=\"center\">End</td>\n"; - echo "\t<td valign=\"top\" align=\"center\">len</td>\n"; - echo "\t<td valign=\"top\" align=\"center\">RID</td>\n"; - echo "\t<td valign=\"top\" align=\"center\">Beschreibung</td>\n"; - echo "\t<td valign=\"top\" align=\"center\">Entry 'Shifts'</td>\n"; - echo "\t<td valign=\"top\" align=\"center\">SID</td>\n"; - echo "\t<td valign=\"top\" align=\"center\">Entrys</td>\n"; - echo "</tr>\n"; - - $DateEnd = $_GET["SDatum"]; - $TimeEnd = $_GET["STime"]; - $len=0; - do - { - // define Start time - $Date = $DateEnd; - $Time = $TimeEnd; - $_DateS = $_GET["MonthJahr"]. "-". $Date. " ". $Time. ":00:00"; - - // define End time - if( $_GET["NachtON"] == "ON" ) - { - $_GET["len"] = $lenArray[$Time]; - } - $TimeEnd = $Time+ $_GET["len"]; - - //Tagesüberschreitung - while( $TimeEnd >= 24 ) - { - $TimeEnd -= 24; - $DateEnd += 1; - } - //ist schischt zu lang dan verkürzen - if( $DateEnd > $_GET["EDatum"] || ($DateEnd == $_GET["EDatum"] && $TimeEnd >= $_GET["ETime"]) ) - { - $_GET["len"] -= ($DateEnd- $_GET["EDatum"])*24; - $_GET["len"] -= ($TimeEnd- $_GET["ETime"]); // -(-) ->> + - $DateEnd = $_GET["EDatum"]; - $TimeEnd = $_GET["ETime"]; - } - $_DateE = $_GET["MonthJahr"]. "-". $DateEnd. " ". $TimeEnd. ":00:00"; - - if( $_DateS != $_DateE ) - CreateNewEntry(); - - if( $_GET["MoreThenOne"]!="ON" ) break; - if( $DateEnd == $_GET["EDatum"] && $TimeEnd >= $_GET["ETime"] ) break; - } while( true ); - echo "</table>"; - - if( $_GET["OnlyShow"]=="ON" ) - { - echo "<form action=\"". $_SERVER['SCRIPT_NAME']. "\">"; - echo "\n\t<Input type=\"hidden\" name=\"SchichtName\" value=\"". $_GET["SchichtName"]. "\">"; - echo "\n\t<input type=\"hidden\" name=\"MonthJahr\" value=\"". $_GET["MonthJahr"]. "\">"; - echo "\n\t<input type=\"hidden\" name=\"SDatum\" value=\"". $_GET["SDatum"]. "\">"; - echo "\n\t<input type=\"hidden\" name=\"STime\" value=\"". $_GET["STime"]. "\">"; - echo "\n\t<input type=\"hidden\" name=\"MoreThenOne\" value=\"". $_GET["MoreThenOne"]. "\">"; - echo "\n\t<input type=\"hidden\" name=\"EDatum\" value=\"". $_GET["EDatum"]. "\">"; - echo "\n\t<input type=\"hidden\" name=\"ETime\" value=\"". $_GET["ETime"]. "\">"; - echo "\n\t<input type=\"hidden\" name=\"len\" value=\"". $lenOrg. "\">"; - echo "\n\t<input type=\"hidden\" name=\"RID\" value=\"". $_GET["RID"]. "\">"; - echo "\n\t<input type=\"hidden\" name=\"NachtON\" value=\"". $_GET["NachtON"]. "\">"; - echo "\n\t<input type=\"hidden\" name=\"len_night\" value=\"". $_GET["len_night"]. "\">"; - echo "\n\t<input type=\"hidden\" name=\"OnlyShow\" value=\"OFF\">"; - foreach ($EngelType As $TTemp) - { - $Temp = "EngelType".$TTemp["TID"]; - echo "\n\t<input type=\"hidden\" name=\"". $Temp. "\" value=\"". $_GET[$Temp]. "\">"; - } - echo "\n\t<input type=\"hidden\" name=\"action\" value=\"newsave\">"; - echo "\n\t<input type=\"submit\" value=\"mach mal Gabriel!\">"; - echo "\n</form>"; - } //if - } //IF - break; - -case 'engeldel': - break; - -} // end switch - - - -function CreateNewEntry() -{ - global $con, $_DateS, $_DateE, $EngelType, $DEBUG; - foreach ($EngelType As $TTemp) - { - $Temp = "EngelType".$TTemp["TID"]; - global $$Temp; - } - - echo "<tr>\n"; - - echo "\t<td>$_DateS</td>\n"; - echo "\t<td>$_DateE</td>\n"; - echo "\t<td>". $_GET["len"]. "</td>\n"; - echo "\t<td>". $_GET["RID"]. "</td>\n"; - echo "\t<td>". $_GET["SchichtName"]. "</td>\n"; - - - // Ist eintarg schon vorhanden? - $SQL = "SELECT SID FROM `Shifts` "; - $SQL .= "WHERE (". - "`DateS` = '". $_DateS. "' AND ". - "`DateE` = '". $_DateE. "' AND ". - "`RID` = '". $_GET["RID"]. "');"; - $Erg = mysql_query($SQL, $con); - - if( mysql_num_rows($Erg) != 0 ) - echo "\t<td>exists</td>"; - elseif( $_GET["OnlyShow"] == "OFF" ) - { - //Suchet nach letzter SID - $SQLin = "SELECT `SID` FROM `Shifts` ". - "WHERE NOT (`FromPentabarf` = 'Y') ". - "ORDER BY `SID` DESC"; - $Ergin = mysql_query($SQLin, $con); - if( mysql_num_rows( $Ergin) > 0) - $newSID = mysql_result( $Ergin, 0, 0)+1; - else - $newSID = 10000; - - // erstellt Eintrag in Shifts für die algemeine schicht - $SQL = "INSERT INTO `Shifts` (`SID`, `DateS`, `DateE`, `Len`, `RID`, `Man`) VALUES ('$newSID', "; - $SQL .= "'". $_DateS. "', '". $_DateE. "', "; - $SQL .= "'". $_GET["len"]. "', '". $_GET["RID"]. "', "; - $SQL .= "'". $_GET["SchichtName"]. "');"; - $Erg = mysql_query($SQL, $con); - - $SQLFail = "\n\t<br>[".$SQL. "]"; - - if ($Erg == 1) echo "\t<td>pass</td>\n"; - else echo "\t<td>fail <br>\n<u>". mysql_error($con). "</u>$SQLFail</td>\n"; - - } else - echo "\t<td>only show</td>\n"; - - // sucht SID von eingetragennen schiten - $SQL = "SELECT SID FROM `Shifts` "; - $SQL .= "WHERE (". - "`DateS` = '". $_DateS. "' AND ". - "`DateE` = '". $_DateE. "' AND ". - "`Len` = '". $_GET["len"]. "' AND ". - "`RID` = '". $_GET["RID"]. "');"; - $Erg = mysql_query($SQL, $con); - if( mysql_num_rows($Erg) == 0 ) - echo "\t<td>?</td>"; - else - { - $SID = mysql_result($Erg, 0, "SID"); - echo "\t<td>". $SID. "</td>"; - } - - // erstellt für jeden Engeltypen die eintrage in 'ShiftEntry' - echo "\t<td>"; - foreach ($EngelType As $TTemp) - { - $Temp = "EngelType".$TTemp["TID"]; - - if( $_GET[$Temp] > 0 ) - { - $i = 0; - echo $_GET[$Temp]. " ".$TTemp["Name"]. "<br>\t"; - while( $i++ < $_GET[$Temp] ) - { - if( $_GET["OnlyShow"] == "OFF" ) - { - $SQL = "INSERT INTO `ShiftEntry` (`SID`, `TID`) VALUES ("; - $SQL .= "'". $SID. "', "; - $SQL .= "'". $TTemp["TID"]. "');"; - - $Erg = mysql_query($SQL, $con); - - if( $DEBUG ) $SQLFail = "\n\t<br>[".$SQL. "]"; - - if ($Erg == 1) echo "'pass' "; - else echo "'fail' <u>". mysql_error($con). "</u>$SQLFail</td>\n"; - - } - else - echo "+"; - } - echo "<br>"; - } // IF $$TEMP - } // FOREACH - echo "</td>"; - - echo "</tr>\n"; -} - -include ("./inc/footer.php"); -?> diff --git a/admin/sprache.php b/admin/sprache.php deleted file mode 100755 index af5db2ba..00000000 --- a/admin/sprache.php +++ /dev/null @@ -1,116 +0,0 @@ -<?PHP - -$title = "Sprache"; -$header = "Liste der existierenden Sprcheinträge"; -include ("./inc/header.php"); - - -if( !isset( $_GET["TextID"] ) ) -{ - echo Get_Text("Hello").$_SESSION['Nick'].", <br>\n"; - echo Get_Text("pub_sprache_text1")."<br><br>\n"; - - // ausgabe Tabellenueberschift - $SQL_Sprachen = "SELECT `Sprache` FROM `Sprache` GROUP BY `Sprache`;"; - $erg_Sprachen = mysql_query($SQL_Sprachen, $con); - echo mysql_error($con); - - for( $i=0; $i<mysql_num_rows( $erg_Sprachen ); $i++ ) - $Sprachen[mysql_result( $erg_Sprachen, $i, "Sprache" )] = $i; - - echo "\t<table border=\"0\" class=\"border\" cellpadding=\"2\" cellspacing=\"1\">\n\t\t<tr>"; - echo "\t\t<td class=\"contenttopic\"><b>". Get_Text("pub_sprache_TextID"). "</b></td>"; - foreach( $Sprachen as $Name => $Value ) - echo "<td class=\"contenttopic\"><b>". - Get_Text("pub_sprache_Sprache"). " ". $Name. - "</b></td>"; - echo "\t\t<td class=\"contenttopic\"><b>". Get_Text("pub_sprache_Edit"). "</b></td>"; - echo "\t\t</tr>"; - - - // ausgabe eintraege - $SQL = "SELECT * FROM `Sprache` ORDER BY `TextID`;"; - $erg = mysql_query($SQL, $con); - echo mysql_error($con); - - $TextID_Old = mysql_result( $erg, 0, "TextID" ); - for( $i=0; $i<mysql_num_rows( $erg ); $i++ ) - { - $TextID_New = mysql_result( $erg, $i, "TextID" ); - if( $TextID_Old != $TextID_New ) - { - echo "<form action=\"sprache.php\">"; - echo "<tr class=\"content\">\n"; - echo "\t\t<td>$TextID_Old ". - "<input name=\"TextID\" type=\"hidden\" value=\"$TextID_Old\"> </td>\n"; - - foreach( $Sprachen as $Name => $Value ) - { - echo "\t\t<td><textarea name=\"$Name\" cols=\"22\" rows=\"8\">$Value</textarea></td>\n"; - $Sprachen[ $Name ] = ""; - } - - echo "\t\t<td><input type=\"submit\" value=\"Save\"></td>\n"; - echo "</tr>"; - echo "</form>\n"; - $TextID_Old = $TextID_New; - } - $Sprachen[ mysql_result( $erg, $i, "Sprache" ) ] = mysql_result( $erg, $i, "Text" ); - } /*FOR*/ - - //fuer neu eintraege - echo "<form action=\"sprache.php\">"; - echo "<tr class=\"content\">\n"; - echo "\t\t<td><input name=\"TextID\" type=\"text\" value=\"new\"> </td>\n"; - - foreach( $Sprachen as $Name => $Value ) - echo "\t\t<td><textarea name=\"$Name\" cols=\"22\" rows=\"8\">$Name Text</textarea></td>\n"; - - echo "\t\t<td><input type=\"submit\" value=\"Save\"></td>\n"; - echo "</tr>"; - echo "</form>\n"; - - - echo "</table>\n"; -} /*if( !isset( $TextID ) )*/ -else -{ - echo "edit: ". $_GET["TextID"]. "<br><br>"; - foreach ($_GET as $k => $v) { - if( $k != "TextID" ) - { - $sql_test = "SELECT * FROM `Sprache` ". - "WHERE `TextID`='". $_GET["TextID"]. "' AND `Sprache`='$k'"; - $erg_test = mysql_query($sql_test, $con); - - if( mysql_num_rows($erg_test)==0 ) - { - $sql_save = "INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) ". - "VALUES ('". $_GET["TextID"]. "', '$k', '$v')"; - $Erg = mysql_query($sql_save, $con); - if ($Erg == 1) - echo "\t $k Save: OK<br>\n"; - else - echo "\t $k Save: KO<br>\n"; - } - else if( mysql_result($erg_test, 0, "Text")!=$v ) - { - $sql_save = "UPDATE `Sprache` SET `Text`='$v' ". - "WHERE `TextID`='". $_GET["TextID"]. "' AND `Sprache`='$k' "; - echo $sql_save."<br>"; - $Erg = mysql_query($sql_save, $con); - if ($Erg == 1) - echo "\t $k Update: OK<br>\n"; - else - echo "\t $k Update: KO<br>\n"; - } - else - echo "\t $k no changes<br>\n"; - } - } - -} - -include ("./inc/footer.php"); -?> - diff --git a/admin/tshirt.php b/admin/tshirt.php deleted file mode 100755 index 2a3ea500..00000000 --- a/admin/tshirt.php +++ /dev/null @@ -1,60 +0,0 @@ -<?PHP - -$title = "T-Shirt-Ausgabe"; -$header = "T-Shirt-Ausgabe für aktiven Engel"; -include ("./inc/header.php"); -include ("./inc/funktion_db_list.php"); -include ("./inc/funktion_user.php"); - - -If (IsSet($_GET["aktiv"])) { - - $SQL="Update User set Tshirt=\"1\" where UID=\"". $_GET["aktiv"]. "\" limit 1"; - $Erg = mysql_query($SQL, $con); - if ($Erg == 1) { - } else { - echo "Fehler beim speichern bei Engel ". UID2Nick($_GET["aktive"]). "<br>"; - } -} - -?> - -Über die Suchen-Funktion des Browsers kann diese Liste schnell nach einem Nick abgesucht werden.<br> -Hinter diesem erscheint ein Link, über den man eintragen kann, dass der Engel sein T-Shirt erhalten hat.<br><br> - -Liste aller aktiven Engel: - -<? -$SQL = "SELECT * from User where (Aktiv = 1) ORDER BY Nick ASC"; -$Erg = mysql_query($SQL, $con); - -$rowcount = mysql_num_rows($Erg); -?> -<table width="100%" class="border" cellpadding="2" cellspacing="1"> - <tr class="contenttopic"> - <td>Nick</td> - <td>Aktiv?</td> - <td>Grösse</td> - <td>T-Shirt ausgeben:</td> - </td> -<? -for ($i=0; $i<$rowcount; $i++){ - echo "\t<tr class=\"content\">\n"; - $eUID=mysql_result($Erg, $i, "UID"); - echo "\t\t<td>".UID2Nick($eUID)."</td>\n"; - echo "\t\t<td>".mysql_result($Erg, $i, "Aktiv")."</td>\n"; - echo "\t\t<td>".mysql_result($Erg, $i, "Size")."</td>\n"; - - if (mysql_result($Erg, $i, "Tshirt") =="1") { - echo "\t\t<td>bereits erhalten</td>"; - } else { - echo "\t\t<td><a href=\"./tshirt.php?aktiv=$eUID\">XXXXXXXX</a></td>"; - } - echo "\t</tr>\n"; -} - -echo "</table>"; - -include ("./inc/footer.php"); -?> - diff --git a/admin/user.php b/admin/user.php deleted file mode 100755 index a1c2aa4b..00000000 --- a/admin/user.php +++ /dev/null @@ -1,249 +0,0 @@ -<?PHP - -$title = "User-Liste"; -$header = "Editieren der Engelliste"; -include ("./inc/header.php"); -include ("./inc/funktion_db_list.php"); - -if (!IsSet($_GET["enterUID"])) -{ - // Userliste, keine UID uebergeben... - - echo "<a href=\"../makeuser.php\">Neuen Engel eintragen</a><br><br>\n"; - - if( !isset($_GET["OrderBy"]) ) $_GET["OrderBy"] = "Nick"; - $SQL = "SELECT * FROM User ORDER BY ". $_GET["OrderBy"]. " ASC"; - $Erg = mysql_query($SQL, $con); - echo mysql_error($con); - - // anzahl zeilen - $Zeilen = mysql_num_rows($Erg); - - echo "Anzahl Engel: $Zeilen<br><br>\n"; - - ?><table width="100%" class="border" cellpadding="2" cellspacing="1"> - <tr class="contenttopic"> - <td><a href="<? echo $PHP_SELF; ?>?OrderBy=Nick">Nick</a></td> - <td><a href="<? echo $PHP_SELF; ?>?OrderBy=Name">Name</a></td> - <td><a href="<? echo $PHP_SELF; ?>?OrderBy=Vorname">Vorname</a></td> - <td>Alter</td> - <td>Telefon <a href="<? echo $PHP_SELF; ?>?OrderBy=email">@</a></td> - <td><a href="<? echo $PHP_SELF; ?>?OrderBy=Size">Größe</a></td> - <td><a href="<? echo $PHP_SELF; ?>?OrderBy=Gekommen">G</a></td> - <td><a href="<? echo $PHP_SELF; ?>?OrderBy=Aktiv">A</a></td> - <td><a href="<? echo $PHP_SELF; ?>?OrderBy=Tshirt">T</a></td> - <td>Änd.</td> - <td>Secure</td> - </tr> - - - <? - $Gekommen = 0; - $Active = 0; - $Tshirt = 0; - - for ($n = 0 ; $n < $Zeilen ; $n++) { - echo "<tr class=\"content\">\n"; - echo "\t<td>".mysql_result($Erg, $n, "Nick"). "</td>\n"; - echo "\t<td>".mysql_result($Erg, $n, "Name")."</td>\n"; - echo "\t<td>".mysql_result($Erg, $n, "Vorname")."</td>\n"; - echo "\t<td>".mysql_result($Erg, $n, "Alter")."</td>\n"; - echo "\t<td>"; - if( strlen( mysql_result($Erg, $n, "Telefon"))>0) - echo "\n\t\tTel: ". mysql_result($Erg, $n, "Telefon"). "<br>"; - if( strlen( mysql_result($Erg, $n, "Handy"))>0) - echo "\n\t\tHandy: ". mysql_result($Erg, $n, "Handy"). "<br>"; - if( strlen( mysql_result($Erg, $n, "DECT"))>0) - echo "\n\t\tDECT: <a href=\"./dect.php?custum=". mysql_result($Erg, $n, "DECT"). "\">". - mysql_result($Erg, $n, "DECT"). "</a><br>"; - if( strlen( mysql_result($Erg, $n, "email"))>0) - echo "\n\t\temail: <a href=\"mailto:".mysql_result($Erg, $n, "email")."\">". - mysql_result($Erg, $n, "email")."</a>"; - echo "</td>\n"; - echo "\t<td>".mysql_result($Erg, $n, "Size")."</td>\n"; - $Gekommen += mysql_result($Erg, $n, "Gekommen"); - echo "\t<td>".mysql_result($Erg, $n, "Gekommen")."</td>\n"; - $Active += mysql_result($Erg, $n, "Aktiv"); - echo "\t<td>".mysql_result($Erg, $n, "Aktiv")."</td>\n"; - $Tshirt += mysql_result($Erg, $n, "Tshirt"); - echo "\t<td>".mysql_result($Erg, $n, "Tshirt")."</td>\n"; - echo "\t<td><a href=\"./user.php?enterUID=". - mysql_result($Erg, $n, "UID")."&Type=Normal\">Änd.</a></td>\n"; - echo "\t<td>"; - - //check userCVS=OK - $SQL2 = "SELECT UID FROM UserCVS WHERE (UID=". mysql_result($Erg, $n, "UID"). ")"; - $Erg2 = mysql_query($SQL2, $con); - echo mysql_error($con); - if( mysql_num_rows($Erg2)==0) - { - $SQL3 = "INSERT INTO `UserCVS` ( `UID`) VALUES ( '". mysql_result($Erg, $n, "UID"). "');"; - $Erg3 = mysql_query($SQL3, $con); - if( $Erg3 ) - echo "was create<br>\n"; - else - echo mysql_error($con); - } - echo "<a href=\"./user.php?enterUID=". - mysql_result($Erg, $n, "UID")."&Type=Secure\">Secure</a></td>\n"; - echo "</tr>\n"; - } - echo "<tr>". - "<td></td><td></td><td></td><td></td><td></td><td></td>". - "<td>$Gekommen</td><td>$Active</td><td>$Tshirt</td><td></td></tr>\n"; - echo "\t</table>\n"; - // Ende Userliste -} -else -{ - // UserID wurde mit uebergeben --> Aendern... - - $SQL = "SELECT * FROM User where UID=". $_GET["enterUID"]; - $Erg = mysql_query($SQL, $con); - - $anzahl = mysql_num_rows($Erg); - - if ($anzahl != 1) - echo "Sorry, der Engel (UID=". $_GET["enterUID"]. ") wurde in der Liste nicht gefunden."; - else - { - echo "Hallo,<br>". - "hier kannst du den Eintrag ändern. Unter dem Punkt 'Gekommen' ". - "wird der Engel als anwesend markiert, ein Ja bei Aktiv bedeutet, ". - "dass der Engel aktiv war und damit ein Anspruch auf ein T-Shirt hat. ". - "Wenn T-Shirt ein 'Ja' enthält, bedeutet dies, dass der Engel ". - "bereits sein T-Shirt erhalten hat.<br><br>\n"; - - echo "<form action=\"./user2.php?action=change\" method=\"POST\">\n"; - echo "<table>\n"; - echo "<input type=\"hidden\" name=\"Type\" value=\"". $_GET["Type"]. "\">\n"; - - if( $_GET["Type"] == "Normal" ) - { - echo " <tr><td>Nick</td><td>". - "<input type=\"text\" size=\"40\" name=\"eNick\" value=\"". - mysql_result($Erg, 0, "Nick")."\"></td></tr>\n"; - echo " <tr><td>lastLogIn</td><td>". - "<input type=\"text\" size=\"20\" name=\"elastLogIn\" value=\"". - mysql_result($Erg, 0, "lastLogIn"). "\" disabled></td></tr>\n"; - echo " <tr><td>Name</td><td>". - "<input type=\"text\" size=\"40\" name=\"eName\" value=\"". - mysql_result($Erg, 0, "Name")."\"></td></tr>\n"; - echo " <tr><td>Vorname</td><td>". - "<input type=\"text\" size=\"40\" name=\"eVorname\" value=\"". - mysql_result($Erg, 0, "Vorname")."\"></td></tr>\n"; - echo " <tr><td>Alter</td><td>". - "<input type=\"text\" size=\"5\" name=\"eAlter\" value=\"". - mysql_result($Erg, 0, "Alter")."\"></td></tr>\n"; - echo " <tr><td>Telefon</td><td>". - "<input type=\"text\" size=\"40\" name=\"eTelefon\" value=\"". - mysql_result($Erg, 0, "Telefon")."\"></td></tr>\n"; - echo " <tr><td>Handy</td><td>". - "<input type=\"text\" size=\"40\" name=\"eHandy\" value=\"". - mysql_result($Erg, 0, "Handy")."\"></td></tr>\n"; - echo " <tr><td>DECT</td><td>". - "<input type=\"text\" size=\"4\" name=\"eDECT\" value=\"". - mysql_result($Erg, 0, "DECT")."\"></td></tr>\n"; - echo " <tr><td>email</td><td>". - "<input type=\"text\" size=\"40\" name=\"eemail\" value=\"". - mysql_result($Erg, 0, "email")."\"></td></tr>\n"; - echo " <tr><td>Size</td><td>". - "<input type=\"text\" size=\"5\" name=\"eSize\" value=\"". - mysql_result($Erg, 0, "Size")."\"></td></tr>\n"; - echo " <tr><td>Passwort</td><td>". - "<input type=\"text\" size=\"40\" name=\"ePasswort\" value=\"". - mysql_result($Erg, 0, "Passwort")."\" disabled> ". - "<a href=\"./user2.php?action=newpw&eUID=" - .mysql_result($Erg, 0, "UID")."\">neues Kennwort setzen</a></td></tr>\n"; - - // Gekommen? - echo " <tr><td>Gekommen</td><td>\n"; - echo " <input type=\"radio\" name=\"eGekommen\" value=\"0\""; - if (mysql_result($Erg, 0, "Gekommen")=='0') - echo " checked"; - echo ">No \n"; - echo " <input type=\"radio\" name=\"eGekommen\" value=\"1\""; - if (mysql_result($Erg, 0, "Gekommen")=='1') - echo " checked"; - echo ">Yes \n"; - echo "</td></tr>\n"; - - // Aktiv? - echo " <tr><td>Aktiv</td><td>\n"; - echo " <input type=\"radio\" name=\"eAktiv\" value=\"0\""; - if (mysql_result($Erg, 0, "Aktiv")=='0') - echo " checked"; - echo ">No \n"; - echo " <input type=\"radio\" name=\"eAktiv\" value=\"1\""; - if (mysql_result($Erg, 0, "Aktiv")=='1') - echo " checked"; - echo ">Yes \n"; - echo "</td></tr>\n"; - - // T-Shirt bekommen? - echo " <tr><td>T-Shirt</td><td>\n"; - echo " <input type=\"radio\" name=\"eTshirt\" value=\"0\""; - if (mysql_result($Erg, 0, "Tshirt")=='0') - echo " checked"; - echo ">No \n"; - echo " <input type=\"radio\" name=\"eTshirt\" value=\"1\""; - if (mysql_result($Erg, 0, "Tshirt")=='1') - echo " checked"; - echo ">Yes \n"; - echo "</td></tr>\n"; - } //IF TYPE - - if( $_GET["Type"] == "Secure" ) - { - // CVS-Rechte - echo " <tr><td><br><u>Rights of \"". mysql_result($Erg, 0, "Nick"). "\":</u></td></tr>\n"; - - $SQL_CVS = "SELECT * FROM `UserCVS` WHERE UID=". $_GET["enterUID"]; - $Erg_CVS = mysql_query($SQL_CVS, $con); - $CVS_Data = mysql_fetch_array($Erg_CVS); - $CVS_Data_i = 1; - foreach ($CVS_Data as $CVS_Data_Name => $CVS_Data_Value) - { - $CVS_Data_i++; - //nur jeder zweiter sonst wird für jeden text noch die position (Zahl) ausgegeben - if( $CVS_Data_i%2 && $CVS_Data_Name!="UID") - { - echo "<tr><td>$CVS_Data_Name</td>\n<td>"; - echo "<input type=\"radio\" name=\"".($CVS_Data_i-1)."\" value=\"Y\" "; - if( $CVS_Data_Value == "Y" ) - echo " checked"; - echo ">allow \n"; - echo "<input type=\"radio\" name=\"".($CVS_Data_i-1)."\" value=\"N\" "; - if( $CVS_Data_Value == "N" ) - echo " checked"; - echo ">denied \n"; - echo "</td></tr>"; - } //IF - } //Foreach - echo "</td></tr>\n"; - } // IF TYPE - - - // Ende Formular - echo "</td></tr>\n"; - echo "</table>\n"; - echo "<input type=\"hidden\" name=\"enterUID\" value=\"". $_GET["enterUID"]. "\">\n"; - echo "<input type=\"submit\" value=\"sichern...\">\n"; - echo "</form>"; - - if( $_GET["Type"] == "Normal" ) - { - echo "<form action=\"./user2.php?action=delete\" method=\"POST\">\n"; - echo "<input type=\"hidden\" name=\"enterUID\" value=\"". $_GET["enterUID"]. "\">\n"; - echo "<input type=\"submit\" value=\"löschen...\">\n"; - echo "</form>"; - } - - } - -} - -include ("./inc/footer.php"); -?> - - diff --git a/admin/user2.php b/admin/user2.php deleted file mode 100755 index 5f94c093..00000000 --- a/admin/user2.php +++ /dev/null @@ -1,128 +0,0 @@ -<?PHP - -$title = "User-Liste"; -$header = "Index"; -include ("./inc/header.php"); -include ("./inc/funktion_db_list.php"); -include ("./inc/crypt.php"); - -if (IsSet($_GET["action"])) -{ - - function SQLExec( $SQL ) - { - global $con; - - $Erg = mysql_query($SQL, $con); - if ($Erg == 1) { - echo "Änderung wurde gesichert...\n"; - } else { - echo "Fehler beim speichern...\n"; - } - - } - - SetHeaderGo2Back(); - echo "Gesendeter Befehl: ". $_GET["action"]. "<br>"; - - switch ($_GET["action"]) - { - case "change": - if (IsSet($_POST["enterUID"])) - { - if ($_POST["Type"] == "Normal") - { - $SQL = "UPDATE `User` SET "; - $SQL.= " `Nick` = '". $_POST["eNick"]. "', `Name` = '". $_POST["eName"]. "', ". - "`Vorname` = '". $_POST["eVorname"]. "', ". - "`Telefon` = '". $_POST["eTelefon"]. "', ". - "`Handy` = '". $_POST["eHandy"]. "', ". - "`DECT` = '". $_POST["eDECT"]. "', ". - "`email` = '". $_POST["eemail"]. "', ". - "`Size` = '". $_POST["eSize"]. "', ". - "`Gekommen`= '". $_POST["eGekommen"]. "', ". - "`Aktiv`= '". $_POST["eAktiv"]. "', ". - "`Tshirt` = '". $_POST["eTshirt"]. "' ". - "WHERE `UID` = '". $_POST["enterUID"]. - "' LIMIT 1;"; - echo "User-"; - SQLExec( $SQL ); - } - if ($_POST["Type"] == "Secure") - { - $SQL2 = "UPDATE `UserCVS` SET "; - $SQL_CVS = "SELECT * FROM `UserCVS` WHERE UID=". $_POST["enterUID"]; - $Erg_CVS = mysql_query($SQL_CVS, $con); - $CVS_Data = mysql_fetch_array($Erg_CVS); - $CVS_Data_i = 1; - foreach ($CVS_Data as $CVS_Data_Name => $CVS_Data_Value) - { - if( ($CVS_Data_i+1)%2 && $CVS_Data_Name!="UID") - $SQL2.= "`$CVS_Data_Name` = '". $_POST[$CVS_Data_i]."', "; - $CVS_Data_i++; - } - $SQL2 = substr( $SQL2, 0, strlen($SQL2)-2 ); - $SQL2.= " WHERE `UID` = '". $_POST["enterUID"]. "' LIMIT 1;"; - echo "<br>Secure-"; - SQLExec( $SQL2 ); - } - } - break; - - case "delete": - if (IsSet($_POST["enterUID"])) - { - echo "delate User..."; - $SQL="delete from `User` WHERE `UID` = '". $_POST["enterUID"]. "' LIMIT 1;"; - SQLExec( $SQL ); - echo "<br>\ndelate UserCVS..."; - $SQL2="delete from `UserCVS` WHERE `UID` = '". $_POST["enterUID"]. "' LIMIT 1;"; - SQLExec( $SQL2 ); - echo "<br>\ndelate UserEntry..."; - $SQL3="UPDATE `ShiftEntry` SET `UID` = '0', `Comment` = NULL ". - "WHERE `UID` = '". $_POST["enterUID"]. "' LIMIT 1;"; - SQLExec( $SQL3 ); - } - break; - - - case "newpw": - echo "Bitte neues Kennwort für <b>"; - // Get Nick - $USQL = "SELECT * FROM User where UID=". $_POST["eUID"]; - $Erg = mysql_query($USQL, $con); - echo mysql_result($Erg, 0, "Nick"); - echo "</b> eingeben:<br>"; - echo "<form action=\"./user2.php\" method=\"POST\">\n"; - echo "<input type=\"Password\" name=\"ePasswort\">"; - echo "<input type=\"Password\" name=\"ePasswort2\">"; - echo "<input type=\"hidden\" name=\"eUID\" value=\"". $_POST["eUID"]. "\">"; - echo "<input type=\"hidden\" name=\"action\" value=\"newpwsave\">\n"; - echo "<input type=\"submit\" value=\"sichern...\">\n"; - echo "</form>"; - break; - - case "newpwsave": - if ($_POST["ePasswort"] == $_POST["ePasswort2"]) - { // beide Passwoerter passen... - $_POST["ePasswort"] = PassCrypt($_POST["ePasswort"]); - $SQL = "UPDATE `User` SET `Passwort`='". $_POST["ePasswort"]. "' ". - "where `UID` = '". $_POST["eUID"]. "'"; - SQLExec( $SQL ); - } - else - echo "Das Passwort wurde nicht übereinstimmend eingegeben!"; - break; - } // end switch - -// ende - Action ist gesetzt -} -else -{ - // kein Action gesetzt -> abbruch - echo "Unzulässiger Aufruf.<br>Bitte neu editieren..."; -} - -include ("./inc/footer.php"); -?> - |