diff --git a/DB/db_rewrite.sql b/DB/db_rewrite.sql
index 20a23f1e..18a75dee 100644
--- a/DB/db_rewrite.sql
+++ b/DB/db_rewrite.sql
@@ -3,7 +3,7 @@
-- http://www.phpmyadmin.net
--
-- Host: localhost
--- Erstellungszeit: 03. Juni 2011 um 04:47
+-- Erstellungszeit: 03. Juni 2011 um 05:44
-- Server Version: 5.1.44
-- PHP-Version: 5.3.1
@@ -80,15 +80,15 @@ INSERT INTO `Counter` (`URL`, `Anz`) VALUES
('register', 8),
('admin_rooms', 89),
('admin_angel_types', 71),
-('user_settings', 126),
+('user_settings', 131),
('user_messages', 113),
('admin_groups', 129),
('user_questions', 55),
-('admin_questions', 42),
+('admin_questions', 43),
('admin_faq', 55),
('admin_news', 33),
('news_comments', 151),
-('admin_user', 59),
+('admin_user', 157),
('user_meetings', 5);
-- --------------------------------------------------------
@@ -1083,8 +1083,7 @@ CREATE TABLE IF NOT EXISTS `User` (
--
INSERT INTO `User` (`UID`, `Nick`, `Name`, `Vorname`, `Alter`, `Telefon`, `DECT`, `Handy`, `email`, `ICQ`, `jabber`, `Size`, `Passwort`, `Gekommen`, `Aktiv`, `Tshirt`, `color`, `Sprache`, `Avatar`, `Menu`, `lastLogIn`, `CreateDate`, `Art`, `kommentar`, `Hometown`) VALUES
-(1, 'admin', '', '', 0, '', '', '', '', '', '', 'L', '21232f297a57a5a743894a0e4a801fc3', 0, 0, 0, 10, 'DE', 115, 'L', 1307076377, '0000-00-00 00:00:00', '', '', ''),
-(147, 'msquare', '', '', 23, '', '', '', 'msquare@notrademark.de', '', '', 'L', 'e10adc3949ba59abbe56e057f20f883e', 0, 0, 0, 6, 'EN', 0, 'L', 1307042703, '2011-06-02 00:55:09', '', '', '');
+(1, 'admin', 'Gates', 'Bill', 42, '', '', '', '', '', '', '', '4297f44b13955235245b2497399d7a93', 0, 0, 0, 10, 'DE', 115, 'L', 1307079838, '0000-00-00 00:00:00', '', '', '');
-- --------------------------------------------------------
@@ -1184,8 +1183,7 @@ INSERT INTO `UserGroups` (`id`, `uid`, `group_id`) VALUES
(1, 1, -2),
(2, 1, -3),
(3, 1, -5),
-(4, 1, -4),
-(5, 147, -2);
+(4, 1, -4);
-- --------------------------------------------------------
diff --git a/includes/pages/admin_user.php b/includes/pages/admin_user.php
index b64c9678..497f5fdb 100644
--- a/includes/pages/admin_user.php
+++ b/includes/pages/admin_user.php
@@ -1,111 +1,280 @@
Neuen Engel eintragen » \n";
-
- if (!isset ($_GET["OrderBy"]))
- $_GET["OrderBy"] = "Nick";
- $SQL = "SELECT * FROM `User` ORDER BY `" . $_GET["OrderBy"] . "` ASC";
- $Erg = sql_query($SQL);
-
- // anzahl zeilen
- $Zeilen = mysql_num_rows($Erg);
-
- $html .= "Anzahl Engel: $Zeilen \n";
- $html .= '
-
-
-
- Nick
-
- Vorname Name
- Alter
-
- E-Mail
-
- Größe
- Gekommen
- Aktiv
- T-Shirt
- Registrier
- Änd.
- ';
- $Gekommen = 0;
- $Active = 0;
- $Tshirt = 0;
-
- for ($n = 0; $n < $Zeilen; $n++) {
- $title = "";
- $user_groups = sql_select("SELECT * FROM `UserGroups` JOIN `Groups` ON (`Groups`.`UID` = `UserGroups`.`group_id`) WHERE `UserGroups`.`uid`=" . sql_escape(mysql_result($Erg, $n, "UID")) . " ORDER BY `Groups`.`Name`");
- $groups = array ();
- foreach ($user_groups as $user_group) {
- $groups[] = $user_group['Name'];
+
+ if (isset ($_REQUEST['id']) && preg_match("/^[0-9]{1,}$/", $_REQUEST['id']) && sql_num_query("SELECT * FROM `User` WHERE `UID`=" . sql_escape($_REQUEST['id'])) > 0) {
+ $id = $_REQUEST['id'];
+ if (!isset ($_REQUEST['action'])) {
+ $html .= "Hallo, " .
+ "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. \n";
+
+ $html .= "";
+
+ $html .= " ";
+
+ $html .= "Hier kannst Du das Passwort dieses Engels neu setzen:";
+
+ $html .= " ";
+
+ $html .= "";
+
+ $html .= " ";
+ $html .= funktion_db_element_list_2row("Freeloader Shifts", "SELECT `Remove_Time`, `Length`, `Comment` FROM `ShiftFreeloader` WHERE UID=" . $_REQUEST['id']);
+ } else {
+ switch ($_REQUEST['action']) {
+ case 'delete' :
+ if ($user['UID'] != $id) {
+ sql_query("DELETE FROM `User` WHERE `UID`=" . sql_escape($id) . " LIMIT 1");
+ sql_query("DELETE FROM `UserGroups` WHERE `uid`=" . sql_escape($id));
+ sql_query("UPDATE `ShiftEntry` SET `UID`=0, `Comment`=NULL WHERE `UID`=" . sql_escape($id));
+ $html .= success("Benutzer gelöscht!");
+ } else {
+ $html .= error("Du kannst Dich nicht selber löschen!");
+ }
+ break;
+
+ case 'save' :
+ $SQL = "UPDATE `User` SET ";
+ $SQL .= " `Nick` = '" . $_POST["eNick"] . "', `Name` = '" . $_POST["eName"] . "', " .
+ "`Vorname` = '" . $_POST["eVorname"] . "', " .
+ "`Telefon` = '" . $_POST["eTelefon"] . "', " .
+ "`Handy` = '" . $_POST["eHandy"] . "', " .
+ "`Alter` = '" . $_POST["eAlter"] . "', " .
+ "`DECT` = '" . $_POST["eDECT"] . "', " .
+ "`email` = '" . $_POST["eemail"] . "', " .
+ "`ICQ` = '" . $_POST["eICQ"] . "', " .
+ "`jabber` = '" . $_POST["ejabber"] . "', " .
+ "`Size` = '" . $_POST["eSize"] . "', " .
+ "`Gekommen`= '" . $_POST["eGekommen"] . "', " .
+ "`Aktiv`= '" . $_POST["eAktiv"] . "', " .
+ "`Tshirt` = '" . $_POST["eTshirt"] . "', " .
+ "`Hometown` = '" . $_POST["Hometown"] . "' " .
+ "WHERE `UID` = '" . $id .
+ "' LIMIT 1;";
+ sql_query($SQL);
+ $html .= success("Änderung wurde gespeichert...\n");
+ break;
+
+ case 'change_pw' :
+ if ($_REQUEST['new_pw'] != "" && $_REQUEST['new_pw'] == $_REQUEST['new_pw2']) {
+ sql_query("UPDATE `User` SET `Passwort`='" . sql_escape(PassCrypt($_REQUEST['new_pw'])) . "' WHERE `UID`=" . sql_escape($id) . " LIMIT 1");
+ $html .= success("Passwort neu gesetzt.");
+ } else {
+ $html .= error("Die Eingaben müssen übereinstimmen und dürfen nicht leer sein!");
+ }
+ break;
+ }
}
- $title .= 'Groups: ' . join(", ", $groups) . " ";
- if (strlen(mysql_result($Erg, $n, "Telefon")) > 0)
- $title .= "Tel: " . mysql_result($Erg, $n, "Telefon") . " ";
- if (strlen(mysql_result($Erg, $n, "Handy")) > 0)
- $title .= "Handy: " . mysql_result($Erg, $n, "Handy") . " ";
- if (strlen(mysql_result($Erg, $n, "DECT")) > 0)
- $title .= "DECT: " .
- mysql_result($Erg, $n, "DECT") . " ";
- if (strlen(mysql_result($Erg, $n, "Hometown")) > 0)
- $title .= "Hometown: " . mysql_result($Erg, $n, "Hometown") . " ";
- if (strlen(mysql_result($Erg, $n, "lastLogIn")) > 0)
- $title .= "Last login: " . date("Y-m-d H:i", mysql_result($Erg, $n, "lastLogIn")) . " ";
- if (strlen(mysql_result($Erg, $n, "Art")) > 0)
- $title .= "Type: " . mysql_result($Erg, $n, "Art") . " ";
- if (strlen(mysql_result($Erg, $n, "ICQ")) > 0)
- $title .= "ICQ: " . mysql_result($Erg, $n, "ICQ") . " ";
- if (strlen(mysql_result($Erg, $n, "jabber")) > 0)
- $title .= "jabber: " . mysql_result($Erg, $n, "jabber") . " ";
-
- $html .= "\n";
- $html .= "\t" . mysql_result($Erg, $n, "Nick") . " \n";
- $html .= "\t" . mysql_result($Erg, $n, "Vorname") . " " . mysql_result($Erg, $n, "Name") . " \n";
- $html .= "\t" . mysql_result($Erg, $n, "Alter") . " \n";
- $html .= "\t";
- if (strlen(mysql_result($Erg, $n, "email")) > 0)
- $html .= "" .
- mysql_result($Erg, $n, "email") . " ";
- $html .= '' . $title . '
';
- $html .= " \n";
- $html .= "\t" . mysql_result($Erg, $n, "Size") . " \n";
- $Gekommen += mysql_result($Erg, $n, "Gekommen");
- $html .= "\t" . mysql_result($Erg, $n, "Gekommen") . " \n";
- $Active += mysql_result($Erg, $n, "Aktiv");
- $html .= "\t" . mysql_result($Erg, $n, "Aktiv") . " \n";
- $Tshirt += mysql_result($Erg, $n, "Tshirt");
- $html .= "\t" . mysql_result($Erg, $n, "Tshirt") . " \n";
- $html .= "" . mysql_result($Erg, $n, "CreateDate") . " ";
- $html .= "\t" . 'Edit ' .
- " \n";
- $html .= " \n";
- }
- $html .= "" .
- " " .
- "$Gekommen $Active $Tshirt \n";
- $html .= "\t
\n";
- // Ende Userliste
+ } else {
+ // Userliste, keine UID uebergeben...
+
+ $html .= "Neuen Engel eintragen » \n";
- $html .= "Statistics ";
- $html .= funktion_db_element_list_2row("Hometown", "SELECT COUNT(`Hometown`), `Hometown` FROM `User` GROUP BY `Hometown`");
+ if (!isset ($_GET["OrderBy"]))
+ $_GET["OrderBy"] = "Nick";
+ $SQL = "SELECT * FROM `User` ORDER BY `" . sql_escape($_GET["OrderBy"]) . "` ASC";
+ $Erg = sql_query($SQL);
- $html .= " \n";
+ // anzahl zeilen
+ $Zeilen = mysql_num_rows($Erg);
- $html .= funktion_db_element_list_2row("Engeltypen", "SELECT COUNT(`Art`), `Art` FROM `User` GROUP BY `Art`");
+ $html .= "Anzahl Engel: $Zeilen \n";
+ $html .= '
+
+
+
+ Nick
+
+ Vorname Name
+ Alter
+
+ E-Mail
+
+ Größe
+ Gekommen
+ Aktiv
+ T-Shirt
+ Registrier
+ Änd.
+ ';
+ $Gekommen = 0;
+ $Active = 0;
+ $Tshirt = 0;
- $html .= " \n";
+ for ($n = 0; $n < $Zeilen; $n++) {
+ $title = "";
+ $user_groups = sql_select("SELECT * FROM `UserGroups` JOIN `Groups` ON (`Groups`.`UID` = `UserGroups`.`group_id`) WHERE `UserGroups`.`uid`=" . sql_escape(mysql_result($Erg, $n, "UID")) . " ORDER BY `Groups`.`Name`");
+ $groups = array ();
+ foreach ($user_groups as $user_group) {
+ $groups[] = $user_group['Name'];
+ }
+ $title .= 'Groups: ' . join(", ", $groups) . " ";
+ if (strlen(mysql_result($Erg, $n, "Telefon")) > 0)
+ $title .= "Tel: " . mysql_result($Erg, $n, "Telefon") . " ";
+ if (strlen(mysql_result($Erg, $n, "Handy")) > 0)
+ $title .= "Handy: " . mysql_result($Erg, $n, "Handy") . " ";
+ if (strlen(mysql_result($Erg, $n, "DECT")) > 0)
+ $title .= "DECT: " .
+ mysql_result($Erg, $n, "DECT") . " ";
+ if (strlen(mysql_result($Erg, $n, "Hometown")) > 0)
+ $title .= "Hometown: " . mysql_result($Erg, $n, "Hometown") . " ";
+ if (strlen(mysql_result($Erg, $n, "lastLogIn")) > 0)
+ $title .= "Last login: " . date("Y-m-d H:i", mysql_result($Erg, $n, "lastLogIn")) . " ";
+ if (strlen(mysql_result($Erg, $n, "Art")) > 0)
+ $title .= "Type: " . mysql_result($Erg, $n, "Art") . " ";
+ if (strlen(mysql_result($Erg, $n, "ICQ")) > 0)
+ $title .= "ICQ: " . mysql_result($Erg, $n, "ICQ") . " ";
+ if (strlen(mysql_result($Erg, $n, "jabber")) > 0)
+ $title .= "jabber: " . mysql_result($Erg, $n, "jabber") . " ";
- $html .= funktion_db_element_list_2row("Used Groups", "SELECT Groups.Name AS 'GroupName', COUNT(Groups.Name) AS Count FROM `UserGroups` " .
- "LEFT JOIN `Groups` ON Groups.UID = UserGroups.group_id " .
- "WHERE (UserGroups.group_id!='NULL') " .
- "GROUP BY `GroupName` " .
- "");
+ $html .= "\n";
+ $html .= "\t" . mysql_result($Erg, $n, "Nick") . " \n";
+ $html .= "\t" . mysql_result($Erg, $n, "Vorname") . " " . mysql_result($Erg, $n, "Name") . " \n";
+ $html .= "\t" . mysql_result($Erg, $n, "Alter") . " \n";
+ $html .= "\t";
+ if (strlen(mysql_result($Erg, $n, "email")) > 0)
+ $html .= "" .
+ mysql_result($Erg, $n, "email") . " ";
+ $html .= '' . $title . '
';
+ $html .= " \n";
+ $html .= "\t" . mysql_result($Erg, $n, "Size") . " \n";
+ $Gekommen += mysql_result($Erg, $n, "Gekommen");
+ $html .= "\t" . mysql_result($Erg, $n, "Gekommen") . " \n";
+ $Active += mysql_result($Erg, $n, "Aktiv");
+ $html .= "\t" . mysql_result($Erg, $n, "Aktiv") . " \n";
+ $Tshirt += mysql_result($Erg, $n, "Tshirt");
+ $html .= "\t" . mysql_result($Erg, $n, "Tshirt") . " \n";
+ $html .= "" . mysql_result($Erg, $n, "CreateDate") . " ";
+ $html .= "\t" . 'Edit ' .
+ " \n";
+ $html .= " \n";
+ }
+ $html .= "" .
+ " " .
+ "$Gekommen $Active $Tshirt \n";
+ $html .= "\t
\n";
+ // Ende Userliste
+
+ $html .= "Statistics ";
+ $html .= funktion_db_element_list_2row("Hometown", "SELECT COUNT(`Hometown`), `Hometown` FROM `User` GROUP BY `Hometown`");
+
+ $html .= " \n";
+
+ $html .= funktion_db_element_list_2row("Engeltypen", "SELECT COUNT(`Art`), `Art` FROM `User` GROUP BY `Art`");
+
+ $html .= " \n";
+
+ $html .= funktion_db_element_list_2row("Used Groups", "SELECT Groups.Name AS 'GroupName', COUNT(Groups.Name) AS Count FROM `UserGroups` " .
+ "LEFT JOIN `Groups` ON Groups.UID = UserGroups.group_id " .
+ "WHERE (UserGroups.group_id!='NULL') " .
+ "GROUP BY `GroupName` " .
+ "");
+ }
return $html;
}
?>
\ No newline at end of file
diff --git a/includes/sys_template.php b/includes/sys_template.php
index 893d2d7e..7524b0cb 100644
--- a/includes/sys_template.php
+++ b/includes/sys_template.php
@@ -18,7 +18,7 @@ function template_render($file, $data) {
function html_options($name, $options, $selected = "") {
$html = "";
foreach ($options as $value => $label)
- $html .= ' ' . $label;
+ $html .= ' ' . $label;
return $html;
}
diff --git a/includes/sys_user.php b/includes/sys_user.php
index 5dcf3f1f..4f55da38 100644
--- a/includes/sys_user.php
+++ b/includes/sys_user.php
@@ -86,13 +86,10 @@ function displayavatar($UID, $height = "30") {
if (GetPicturShow($UID) == 'Y')
return " " . displayPictur($UID, $height);
- // show avator
- $asql = "select * from User where UID = $UID";
- $aerg = mysql_query($asql, $con);
-
- if (mysql_num_rows($aerg))
- if (mysql_result($aerg, 0, "Avatar") > 0)
- return''. ("
").'
';
+ $user = sql_select("SELECT * FROM `User` WHERE `UID`=" . sql_escape($UID) . " LIMIT 1");
+ if (count($user) > 0)
+ if ($user[0]['Avatar'] > 0)
+ return '' . ("
") . '
';
}
function UIDgekommen($UID) {
diff --git a/txt/TODO b/txt/TODO
index 02dd8626..9d29b09c 100644
--- a/txt/TODO
+++ b/txt/TODO
@@ -4,7 +4,6 @@ jetzt:
* schichtadministration
* meine schichten
* schichten
- * meetings
* weckservice?
später:
diff --git a/www-ssl/admin/userChangeNormal.php b/www-ssl/admin/userChangeNormal.php
deleted file mode 100644
index 36eb4b6d..00000000
--- a/www-ssl/admin/userChangeNormal.php
+++ /dev/null
@@ -1,133 +0,0 @@
- Aendern...
-
- echo "Hallo, " .
- "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. \n";
-
- echo "";
-
- echo "";
-
- echo " ";
- funktion_db_element_list_2row("Freeloader Shifts", "SELECT `Remove_Time`, `Length`, `Comment` FROM `ShiftFreeloader` WHERE UID=" . $_GET["enterUID"]);
-}
-
-include ("includes/footer.php");
-?>
-
-
diff --git a/www-ssl/admin/userDefaultSetting.php b/www-ssl/admin/userDefaultSetting.php
deleted file mode 100644
index e7a69925..00000000
--- a/www-ssl/admin/userDefaultSetting.php
+++ /dev/null
@@ -1,138 +0,0 @@
-\nhier hast du die Möglichkeit, die Defaulteinstellungen für neue User einzustellen: \n";
-
-echo "\n";
-echo "\t\n";
-echo "\t\tPage \n\t\tShow \n\t\t \n";
-echo "\t \n";
-
-if (isset ($_GET["Field"]) && isset ($_GET["Default"]) && isset ($_GET["Send"])) {
- switch ($_GET["Send"]) {
- case "New" :
- $SQL = "ALTER TABLE `UserCVS` ADD `" . $_GET["Field"] . "` " .
- "CHAR( 1 ) DEFAULT '" . $_GET["Default"] . "' NOT NULL";
- $Erg = db_query($SQL, "New user default setting");
- if ($Erg == 1)
- echo "Create " . $_GET["Field"] . " = " . $_GET["Default"] . " succesfull \n";
- else
- echo "Create " . $_GET["Field"] . " = " . $_GET["Default"] . " error... \n" .
- "[" . mysql_error() . "] ";
- break;
- case "Del" :
- echo "\t\n";
- echo "\t\t\n";
- echo "\t \n";
- break;
- case "Del sure" :
- $SQL = "ALTER TABLE `UserCVS` DROP `" . $_GET["Field"] . "` ";
- $Erg = db_query($SQL, "del user default setting");
- if ($Erg == 1)
- echo "Delete " . $_GET["Field"] . " succesfull \n";
- else
- echo "Delete " . $_GET["Field"] . " error... \n" .
- "[" . mysql_error() . "] ";
- break;
- case "SetForAllUser" :
- $SQL = "UPDATE `UserCVS` SET `" . $_GET["Field"] . "`='" . $_GET["Default"] . "' WHERE UID>0";
- $Erg = db_query($SQL, "Set new user default setting for all user");
- if ($Erg == 1)
- echo "UPDATE " . $_GET["Field"] . " = " . $_GET["Default"] . " for all Users succesfull \n";
- else
- echo "UPDATE " . $_GET["Field"] . " = " . $_GET["Default"] . " for all Users error... \n" .
- "[" . mysql_error() . "] ";
- case "Save" :
- $SQL = "ALTER TABLE `UserCVS` CHANGE `" . $_GET["Field"] . "` " .
- "`" . $_GET["Field"] . "` CHAR( 1 ) NOT NULL DEFAULT '" . $_GET["Default"] . "'";
- $Erg = db_query($SQL, "Save user default setting");
- if ($Erg == 1)
- echo "Write " . $_GET["Field"] . " = " . $_GET["Default"] . " succesfull \n";
- else
- echo "Write " . $_GET["Field"] . " = " . $_GET["Default"] . " error... \n" .
- "[" . mysql_error() . "] ";
- break;
- } //SWITCH
-} //IF(
-
-$erg = mysql_query("SHOW COLUMNS FROM `UserCVS`");
-echo mysql_error();
-echo "\t\n";
-echo "\t\t\n";
-echo "\t \n";
-
-for ($i = 2; $i < mysql_num_rows($erg); $i++) {
- echo "\t\n";
- echo "\t\t\n";
- echo "\t \n";
-}
-
-echo "\t\n";
-echo "\t\t\n";
-echo "\t \n";
-
-echo "
\n";
-
-include ("includes/footer.php");
-?>
-
diff --git a/www-ssl/admin/userSaveNormal.php b/www-ssl/admin/userSaveNormal.php
deleted file mode 100644
index deaf96d9..00000000
--- a/www-ssl/admin/userSaveNormal.php
+++ /dev/null
@@ -1,119 +0,0 @@
-";
-
- 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"] . "', " .
- "`ICQ` = '" . $_POST["eICQ"] . "', " .
- "`jabber` = '" . $_POST["ejabber"] . "', " .
- "`Size` = '" . $_POST["eSize"] . "', " .
- "`Gekommen`= '" . $_POST["eGekommen"] . "', " .
- "`Aktiv`= '" . $_POST["eAktiv"] . "', " .
- "`Tshirt` = '" . $_POST["eTshirt"] . "', " .
- "`Hometown` = '" . $_POST["Hometown"] . "' " .
- "WHERE `UID` = '" . $_POST["enterUID"] .
- "' LIMIT 1;";
- echo "User-";
- $Erg = db_query($SQL, "change user details");
- if ($Erg == 1) {
- echo "Änderung wurde gesichert...\n";
- } else {
- echo "Fehler beim speichern...\n(" . mysql_error($con) . ")";
- }
- } else
- echo "Fehler: Unbekanter Type (" . $_POST["Type"] . ") �bergeben\n \n";
- } else
- echo "Fehler: UserID (enterUID) wurde nicht per POST �bergeben \n";
- break;
-
- case "delete" :
- if (IsSet ($_POST["enterUID"])) {
- echo "delate User...";
- $SQL = "DELETE FROM `User` WHERE `UID`='" . $_POST["enterUID"] . "' LIMIT 1;";
- $Erg = db_query($SQL, "User delete");
- if ($Erg == 1) {
- echo "Änderung wurde gesichert...\n";
- } else {
- echo "Fehler beim speichern...\n(" . mysql_error($con) . ")";
- }
-
- echo " \ndelate UserCVS...";
- $SQL2 = "DELETE FROM `UserCVS` WHERE `UID`='" . $_POST["enterUID"] . "' LIMIT 1;";
- $Erg = db_query($SQL2, "User CVS delete");
- if ($Erg == 1) {
- echo "Änderung wurde gesichert...\n";
- } else {
- echo "Fehler beim speichern...\n(" . mysql_error($con) . ")";
- }
-
- echo " \ndelate UserEntry...";
- $SQL3 = "UPDATE `ShiftEntry` SET `UID`='0', `Comment`=NULL " .
- "WHERE `UID`='" . $_POST["enterUID"] . "';";
- $Erg = db_query($SQL3, "delate UserEntry");
- if ($Erg == 1) {
- echo "Änderung wurde gesichert...\n";
- } else {
- echo "Fehler beim speichern...\n(" . mysql_error($con) . ")";
- }
- }
- break;
-
- case "newpw" :
- echo "Bitte neues Kennwort für ";
- // Get Nick
- $USQL = "SELECT * FROM `User` WHERE `UID`='" . $_GET["eUID"] . "'";
- $Erg = mysql_query($USQL, $con);
- echo mysql_result($Erg, 0, "Nick");
- echo " eingeben: ";
- echo "";
- 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"] . "'";
- $Erg = db_query($SQL, "User new passwort");
- if ($Erg == 1) {
- echo "Änderung wurde gesichert...\n";
- } else {
- echo "Fehler beim speichern...\n(" . mysql_error($con) . ")";
- }
- } else
- echo "Das Passwort wurde nicht übereinstimmend eingegeben!";
- break;
- } // end switch
-
- // ende - Action ist gesetzt
-} else {
- // kein Action gesetzt -> abbruch
- echo "Unzulässiger Aufruf. Bitte neu editieren...";
-}
-
-include ("includes/footer.php");
-?>
-