bootstrapping
This commit is contained in:
parent
a537f4bf73
commit
e050c0dc7f
|
@ -2,3 +2,4 @@ config_db.php
|
|||
config_jabber.php
|
||||
config_modem.php
|
||||
config.php
|
||||
config_IAX.php
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "Räume";
|
||||
$header = "Verwaltung der Räume";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include("../../../camp2011/includes/funktion_db.php");
|
||||
include ("includes/header.php");
|
||||
include ("includes/funktion_db.php");
|
||||
|
||||
function runSQL( $SQL)
|
||||
{
|
||||
function runSQL($SQL) {
|
||||
global $con;
|
||||
// hier muesste das SQL ausgefuehrt werden...
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
if ($Erg)
|
||||
{
|
||||
if ($Erg) {
|
||||
echo "Änderung wurde gesichert...<br />";
|
||||
echo "[$SQL]<br />";
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
echo "Fehler beim speichern... bitte noch ein mal probieren :)";
|
||||
echo "<br /><br />" . mysql_error($con) . "<br />";
|
||||
echo "[$SQL]<br />";
|
||||
|
@ -24,19 +22,15 @@ function runSQL( $SQL)
|
|||
}
|
||||
}
|
||||
|
||||
function runSQL_log( $SQL, $commed)
|
||||
{
|
||||
function runSQL_log($SQL, $commed) {
|
||||
global $con;
|
||||
// hier muesste das SQL ausgefuehrt werden...
|
||||
$Erg = db_query($SQL, $commed);
|
||||
if ($Erg)
|
||||
{
|
||||
if ($Erg) {
|
||||
echo "Änderung wurde gesichert...<br />";
|
||||
echo "[$SQL]<br />";
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
echo "Fehler beim speichern... bitte noch ein mal probieren :)";
|
||||
echo "<br /><br />" . mysql_error($con) . "<br />";
|
||||
echo "[$SQL]<br />";
|
||||
|
@ -44,13 +38,10 @@ function runSQL_log( $SQL, $commed)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$Sql = "SELECT * FROM `EngelType` ORDER BY `NAME`";
|
||||
$Erg = mysql_query($Sql, $con);
|
||||
|
||||
if( !IsSet($_GET["action"]) )
|
||||
{
|
||||
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";
|
||||
|
@ -60,27 +51,22 @@ if( !IsSet($_GET["action"]) )
|
|||
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++ )
|
||||
{
|
||||
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++ )
|
||||
{
|
||||
for ($t = 0; $t < mysql_num_rows($Erg); $t++) {
|
||||
echo "\t<tr class=\"content\">\n";
|
||||
for ($j = 1; $j < mysql_num_fields($Erg); $j++)
|
||||
{
|
||||
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
|
||||
{
|
||||
} else {
|
||||
|
||||
switch ($_GET["action"]) {
|
||||
|
||||
|
@ -89,8 +75,7 @@ case 'new':
|
|||
echo "<form action=\"./EngelType.php\" method=\"GET\">\n";
|
||||
echo "<table>\n";
|
||||
|
||||
for( $Uj = 1; $Uj < mysql_num_fields($Erg); $Uj++ )
|
||||
{
|
||||
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";
|
||||
}
|
||||
|
@ -111,9 +96,7 @@ case 'newsave':
|
|||
$Values .= ", '$value'";
|
||||
}
|
||||
|
||||
if( runSQL_log( "INSERT INTO `EngelType` (". substr($Keys, 2). ") VALUES (". substr($Values, 2). ")",
|
||||
"save new EngelType") )
|
||||
{
|
||||
if (runSQL_log("INSERT INTO `EngelType` (" . substr($Keys, 2) . ") VALUES (" . substr($Values, 2) . ")", "save new EngelType")) {
|
||||
SetHeaderGo2Back();
|
||||
|
||||
$SQL2 = "SELECT * FROM `EngelType` WHERE `Name`='" . $_GET["Name"] . "'";
|
||||
|
@ -121,16 +104,14 @@ case 'newsave':
|
|||
|
||||
if (mysql_num_rows($ERG) == 1)
|
||||
runSQL_log("ALTER TABLE `Room` ADD `DEFAULT_EID_" . mysql_result($ERG, 0, 0) .
|
||||
"` INT DEFAULT '0' NOT NULL;",
|
||||
"add new EngelType in Romm Table");
|
||||
"` INT DEFAULT '0' NOT NULL;", "add new EngelType in Romm Table");
|
||||
}
|
||||
break;
|
||||
|
||||
case 'change' :
|
||||
if (!IsSet ($_GET["TID"]))
|
||||
echo "Fehlerhafter Aufruf!";
|
||||
else
|
||||
{
|
||||
else {
|
||||
echo "Raum abändern:\n";
|
||||
echo "Hier kannst du eintragen, den EngelType ändern.";
|
||||
echo "<form action=\"./EngelType.php\" method=\"GET\">\n";
|
||||
|
@ -163,29 +144,24 @@ case 'changesave':
|
|||
$vars = array_splice($vars, 0, $count);
|
||||
$keys = "";
|
||||
$sql = "";
|
||||
foreach($vars as $key => $value)
|
||||
{
|
||||
foreach ($vars as $key => $value) {
|
||||
$keys = substr($key, 1);
|
||||
$sql .= ", `" . $keys . "`='" . $value . "'";
|
||||
}
|
||||
runSQL_log( "UPDATE `EngelType` SET ". substr($sql, 2). " WHERE `TID`='". $_GET["eTID"]. "'",
|
||||
"Save Change EngelType");
|
||||
runSQL_log("UPDATE `EngelType` SET " . substr($sql, 2) . " WHERE `TID`='" . $_GET["eTID"] . "'", "Save Change EngelType");
|
||||
SetHeaderGo2Back();
|
||||
break;
|
||||
|
||||
case 'delete' :
|
||||
if (IsSet($_GET["TID"]))
|
||||
{
|
||||
if (IsSet ($_GET["TID"])) {
|
||||
if (runSQL_log("DELETE FROM `EngelType` WHERE `TID`='" . $_GET["TID"] . "'", "delete EngelType"))
|
||||
runSQL_log( "ALTER TABLE `Room` DROP `DEFAULT_EID_". $_GET["TID"]. "`;",
|
||||
"delete EngelType in Room Table");
|
||||
}
|
||||
else
|
||||
runSQL_log("ALTER TABLE `Room` DROP `DEFAULT_EID_" . $_GET["TID"] . "`;", "delete EngelType in Room Table");
|
||||
} else
|
||||
echo "Fehlerhafter Aufruf";
|
||||
SetHeaderGo2Back();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "ChangeLog";
|
||||
$header = "Datenbank-Auszug";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("includes/header.php");
|
||||
|
||||
$SQL = "SELECT * FROM `ChangeLog` ORDER BY `Time` DESC LIMIT 0,10000";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
@ -12,8 +13,7 @@ echo mysql_error($con);
|
|||
echo "<table border=1>\n";
|
||||
echo "<tr>\n\t<th>Time</th>\n\t<th>User</th>\n\t<th>Commend</th>\n\t<th>SQL Commad</th>\n</tr>\n";
|
||||
|
||||
for ($n = 0 ; $n < mysql_num_rows($Erg) ; $n++)
|
||||
{
|
||||
for ($n = 0; $n < mysql_num_rows($Erg); $n++) {
|
||||
echo "<tr>\n";
|
||||
echo "\t<td>" . mysql_result($Erg, $n, "Time") . "</td>\n";
|
||||
echo "\t<td>" . UID2Nick(mysql_result($Erg, $n, "UID")) . displayavatar(mysql_result($Erg, $n, "UID")) . "</td>\n";
|
||||
|
@ -24,6 +24,6 @@ for ($n = 0 ; $n < mysql_num_rows($Erg) ; $n++)
|
|||
|
||||
echo "</table>\n";
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "UserPicture";
|
||||
$header = "Verwaltung der User Picture";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("../../../camp2011/includes/funktion_schichtplan_aray.php");
|
||||
include ("includes/header.php");
|
||||
include ("includes/funktion_schichtplan_aray.php");
|
||||
|
||||
|
||||
if( IsSet($_GET["action"]) )
|
||||
{
|
||||
if (IsSet ($_GET["action"])) {
|
||||
UnSet ($SQL);
|
||||
|
||||
switch ($_GET["action"])
|
||||
{
|
||||
switch ($_GET["action"]) {
|
||||
case 'FormUpload' :
|
||||
echo "Hier kannst Du ein Foto hochladen för:";
|
||||
echo "<form action=\"./UserPicture.php?action=sendPicture\" method=\"post\" enctype=\"multipart/form-data\">\n";
|
||||
|
@ -27,12 +26,8 @@ if( IsSet($_GET["action"]) )
|
|||
echo "</form>\n";
|
||||
break;
|
||||
case 'sendPicture' :
|
||||
if( ($_FILES["file"]["size"] > 0) && (isset( $_POST["UID"])) )
|
||||
{
|
||||
if( ($_FILES["file"]["type"] == "image/jpeg") ||
|
||||
($_FILES["file"]["type"] == "image/png") ||
|
||||
($_FILES["file"]["type"] == "image/gif") )
|
||||
{
|
||||
if (($_FILES["file"]["size"] > 0) && (isset ($_POST["UID"]))) {
|
||||
if (($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/png") || ($_FILES["file"]["type"] == "image/gif")) {
|
||||
$data = addslashes(fread(fopen($_FILES["file"]["tmp_name"], "r"), filesize($_FILES["file"]["tmp_name"])));
|
||||
|
||||
if (GetPicturShow($_POST['UID']) == "")
|
||||
|
@ -49,30 +44,24 @@ if( IsSet($_GET["action"]) )
|
|||
"MIME-Type: " . $_FILES["file"]["type"] . ", " .
|
||||
$_FILES["file"]["size"] . " Byte " .
|
||||
"for " . UID2Nick($_POST["UID"]);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Print_Text("pub_einstellungen_send_KO");
|
||||
}
|
||||
else
|
||||
} else
|
||||
Print_Text("pub_einstellungen_send_KO");
|
||||
break;
|
||||
|
||||
case 'SetN' :
|
||||
if (IsSet($_GET["UID"]))
|
||||
{
|
||||
if (IsSet ($_GET["UID"])) {
|
||||
echo "Bild von '" . UID2Nick($_GET["UID"]) . "' wurde gesperrt:<br />";
|
||||
$SQL = "UPDATE `UserPicture` SET `show`='N' WHERE `UID`='" . $_GET["UID"] . "'";
|
||||
}
|
||||
else
|
||||
} else
|
||||
echo "Fehlerhafter Aufruf";
|
||||
break;
|
||||
case 'SetY' :
|
||||
if (IsSet($_GET["UID"]))
|
||||
{
|
||||
if (IsSet ($_GET["UID"])) {
|
||||
echo "Bild von '" . UID2Nick($_GET["UID"]) . "' wurde Freigegeben:<br />";
|
||||
$SQL = "UPDATE `UserPicture` SET `show`='Y' WHERE `UID`='" . $_GET["UID"] . "'";
|
||||
}
|
||||
else
|
||||
} else
|
||||
echo "Fehlerhafter Aufruf";
|
||||
break;
|
||||
case 'del' :
|
||||
|
@ -80,12 +69,10 @@ if( IsSet($_GET["action"]) )
|
|||
"<a href=\"./UserPicture.php?action=delYes&UID=" . $_GET["UID"] . "\">Yes</a>";
|
||||
break;
|
||||
case 'delYes' :
|
||||
if (IsSet($_GET["UID"]))
|
||||
{
|
||||
if (IsSet ($_GET["UID"])) {
|
||||
echo "Bild von '" . UID2Nick($_GET["UID"]) . "' wurde gelöscht:<br />";
|
||||
$SQL = "DELETE FROM `UserPicture` WHERE `UID`='" . $_GET["UID"] . "' LIMIT 1";
|
||||
}
|
||||
else
|
||||
} else
|
||||
echo "Fehlerhafter Aufruf";
|
||||
break;
|
||||
default :
|
||||
|
@ -94,14 +81,12 @@ if( IsSet($_GET["action"]) )
|
|||
} //switch
|
||||
|
||||
// Update ???
|
||||
if (IsSet($SQL))
|
||||
{
|
||||
if (IsSet ($SQL)) {
|
||||
// hier muesste das SQL ausgefuehrt werden...
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
if ($Erg == 1)
|
||||
echo "Änderung wurde gesichert...<br />";
|
||||
else
|
||||
{
|
||||
else {
|
||||
echo "Fehler beim speichern... bitte noch ein mal probieren :)";
|
||||
echo "<br /><br />" . mysql_error($con) . "<br />($SQL)<br />";
|
||||
}
|
||||
|
@ -109,7 +94,6 @@ if( IsSet($_GET["action"]) )
|
|||
echo "<br />\n<hr width=\"100%\">\n<br />\n\n";
|
||||
} //IF IsSet($action)
|
||||
|
||||
|
||||
//ausgabe der Liste
|
||||
$Sql = "SELECT * FROM `UserPicture` WHERE `UID`>0;";
|
||||
$Erg = mysql_query($Sql, $con);
|
||||
|
@ -124,8 +108,7 @@ echo "\t<td>Status</td>\n";
|
|||
echo "\t<td>Löschen</td>\n";
|
||||
echo "</tr>";
|
||||
|
||||
for( $t = 0; $t < mysql_num_rows($Erg); $t++ )
|
||||
{
|
||||
for ($t = 0; $t < mysql_num_rows($Erg); $t++) {
|
||||
$UIDs = mysql_result($Erg, $t, "UID");
|
||||
echo "\t<tr class=\"content\">\n";
|
||||
|
||||
|
@ -134,8 +117,7 @@ for( $t = 0; $t < mysql_num_rows($Erg); $t++ )
|
|||
|
||||
if (GetPicturShow($UIDs) == "Y")
|
||||
echo "\t\t<td><a href=\"./UserPicture.php?action=SetN&UID=$UIDs\">sperren</a></td>\n";
|
||||
elseif( GetPicturShow( $UIDs) == "N")
|
||||
echo "\t\t<td><a href=\"./UserPicture.php?action=SetY&UID=$UIDs\">freigeben</a></td>\n";
|
||||
elseif (GetPicturShow($UIDs) == "N") echo "\t\t<td><a href=\"./UserPicture.php?action=SetY&UID=$UIDs\">freigeben</a></td>\n";
|
||||
else
|
||||
echo "\t\t<td>ERROR: show='" . GetPicturShow($UIDs) . "'</td>\n";
|
||||
echo "\t\t<td><a href=\"./UserPicture.php?action=del&UID=$UIDs\">del</a></td>\n";
|
||||
|
@ -145,5 +127,5 @@ echo "</table>";
|
|||
|
||||
echo "<br /><a href=\"./UserPicture.php?action=FormUpload\">picture upload</a>\n";
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "akive Engel";
|
||||
$header = "Liste der aktiven Engel";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("../../../camp2011/includes/funktion_db_list.php");
|
||||
include ("includes/header.php");
|
||||
include ("includes/funktion_db_list.php");
|
||||
|
||||
echo "<form action=\"./aktiv.php\" method=\"post\">";
|
||||
echo Get_Text("pub_aktive_Text1") . "<br />\n";
|
||||
|
@ -24,8 +25,7 @@ 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"]) )
|
||||
{
|
||||
if (Isset ($_POST["ResetActive"])) {
|
||||
$SQLreset = "UPDATE `User` SET `Aktiv`='0'";
|
||||
$ErgReset = db_query($SQLreset, "Reset Active");
|
||||
if ($ErgReset != 1)
|
||||
|
@ -66,8 +66,7 @@ echo mysql_error($con);
|
|||
$rowcount = mysql_num_rows($Erg);
|
||||
|
||||
$aktivecount = 0;
|
||||
for ($i=0; $i<$rowcount; $i++)
|
||||
{
|
||||
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") . "x</td>\n";
|
||||
|
@ -77,17 +76,13 @@ for ($i=0; $i<$rowcount; $i++)
|
|||
echo "\t\t<td>" . mysql_result($Erg, $i, "lenFree") . "h</td>\n";
|
||||
echo "\t\t<td>" . mysql_result($Erg, $i, "lenReal") . "h</td>\n";
|
||||
|
||||
|
||||
echo "\t\t<td>";
|
||||
if (IsSet($_POST["Anzahl"]))
|
||||
{
|
||||
if( $_POST["Anzahl"] < mysql_result($Erg, $i, "lenReal") )
|
||||
{
|
||||
if (IsSet ($_POST["Anzahl"])) {
|
||||
if ($_POST["Anzahl"] < mysql_result($Erg, $i, "lenReal")) {
|
||||
$aktivecount++;
|
||||
if ($_POST["SendType"] == "Show..")
|
||||
echo "show set";
|
||||
else
|
||||
{
|
||||
else {
|
||||
$SQL2 = "UPDATE `User` SET `Aktiv`='1' WHERE `UID`='" . mysql_result($Erg, $i, "UID") . "' LIMIT 1";
|
||||
$Erg2 = db_query($SQL2, "update Active State");
|
||||
if ($Erg2 != 1)
|
||||
|
@ -105,6 +100,6 @@ echo "</table>";
|
|||
|
||||
echo "<br />Anzahl eintraege: $aktivecount / $rowcount (Aktive/Mitschichten)<br /><br />";
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "DB Update from XML";
|
||||
$header = "DB Update from XML";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("../../../camp2011/includes/funktion_xml.php");
|
||||
include ("includes/header.php");
|
||||
include ("includes/funktion_xml.php");
|
||||
|
||||
///////////
|
||||
// DEBUG //
|
||||
|
@ -14,12 +16,10 @@ $EnableSchudleFunctions = 1;
|
|||
$EnableSchudle = 1;
|
||||
$EnableSchudleDB = 1;
|
||||
|
||||
|
||||
/*##############################################################################################
|
||||
erstellt Arrays der Reume
|
||||
##############################################################################################*/
|
||||
function CreateRoomArrays()
|
||||
{
|
||||
function CreateRoomArrays() {
|
||||
global $Room, $RoomID, $RoomName, $con;
|
||||
|
||||
$sql = "SELECT `RID`, `Name` FROM `Room` " .
|
||||
|
@ -28,8 +28,7 @@ function CreateRoomArrays()
|
|||
$Erg = mysql_query($sql, $con);
|
||||
$rowcount = mysql_num_rows($Erg);
|
||||
|
||||
for ($i=0; $i<$rowcount; $i++)
|
||||
{
|
||||
for ($i = 0; $i < $rowcount; $i++) {
|
||||
$Room[$i]["RID"] = mysql_result($Erg, $i, "RID");
|
||||
$Room[$i]["Name"] = mysql_result($Erg, $i, "Name");
|
||||
$RoomID[mysql_result($Erg, $i, "RID")] = mysql_result($Erg, $i, "Name");
|
||||
|
@ -42,26 +41,20 @@ CreateRoomArrays();
|
|||
F I L E
|
||||
##############################################################################################*/
|
||||
echo "\n\n<br />\n<h1>XML File:</h1>\n";
|
||||
if( isset($_POST["PentabarfUser"]) && isset($_POST["password"]) && isset($_POST["PentabarfURL"]))
|
||||
{
|
||||
if (isset ($_POST["PentabarfUser"]) && isset ($_POST["password"]) && isset ($_POST["PentabarfURL"])) {
|
||||
echo "Update XCAL-File from Pentabarf..";
|
||||
if($PentabarfGetWith=="fsockopen")
|
||||
{
|
||||
if ($PentabarfGetWith == "fsockopen") {
|
||||
|
||||
//backup error messeges and delate
|
||||
$Backuperror_messages = $error_messages;
|
||||
$fp = fsockopen("ssl://$PentabarfXMLhost", 443, $errno, $errstr, 30);
|
||||
// $error_messages = $Backuperror_messages;
|
||||
|
||||
if( !$fp)
|
||||
{
|
||||
if (!$fp) {
|
||||
echo "<h2>fail: File 'https://$PentabarfXMLhost/$PentabarfXMLpath" . $_POST["PentabarfURL"] . "' not readable!" .
|
||||
"[$errstr ($errno)]</h2>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if( ($fileOut = fopen( "$Tempdir/engelXML", "w")) != FALSE)
|
||||
{
|
||||
} else {
|
||||
if (($fileOut = fopen("$Tempdir/engelXML", "w")) != FALSE) {
|
||||
$head = 'GET /' . $PentabarfXMLpath . $_POST["PentabarfURL"] . ' HTTP/1.1' . "\r\n" .
|
||||
'Host: ' . $PentabarfXMLhost . "\r\n" .
|
||||
'User-Agent: Engelsystem' . "\r\n" .
|
||||
|
@ -70,13 +63,11 @@ if( isset($_POST["PentabarfUser"]) && isset($_POST["password"]) && isset($_POST[
|
|||
"\r\n";
|
||||
fputs($fp, $head);
|
||||
$Zeilen = -1;
|
||||
while (!feof($fp))
|
||||
{
|
||||
while (!feof($fp)) {
|
||||
$Temp = fgets($fp, 1024);
|
||||
|
||||
// ende des headers
|
||||
if( $Temp== "f20\r\n" )
|
||||
{
|
||||
if ($Temp == "f20\r\n") {
|
||||
$Zeilen = 0;
|
||||
$Temp = "";
|
||||
}
|
||||
|
@ -85,8 +76,7 @@ if( isset($_POST["PentabarfUser"]) && isset($_POST["password"]) && isset($_POST[
|
|||
if ($Temp == "0\r\n")
|
||||
break;
|
||||
|
||||
if( ($Zeilen>-1) && ($Temp!="ffb\r\n") )
|
||||
{
|
||||
if (($Zeilen > -1) && ($Temp != "ffb\r\n")) {
|
||||
//steuerzeichen ausfiltern
|
||||
if (strpos("#$Temp", "\r\n") > 0)
|
||||
$Temp = substr($Temp, 0, strlen($Temp) - 2);
|
||||
|
@ -102,41 +92,32 @@ if( isset($_POST["PentabarfUser"]) && isset($_POST["password"]) && isset($_POST[
|
|||
fclose($fileOut);
|
||||
|
||||
echo "<br />Es wurden $Zeilen Zeilen eingelesen<br />";
|
||||
}
|
||||
else
|
||||
} else
|
||||
echo "<h2>fail: File '$Tempdir/engelXML' not writeable!</h2>";
|
||||
fclose($fp);
|
||||
}
|
||||
}
|
||||
elseif($PentabarfGetWith=="fopen")
|
||||
{
|
||||
elseif ($PentabarfGetWith == "fopen") {
|
||||
//user uns password in url einbauen
|
||||
$FileNameIn = "https://" . $_POST["PentabarfUser"] . ':' . $_POST["password"] . "@" .
|
||||
$PentabarfXMLhost . "/" . $PentabarfXMLpath . $_POST["PentabarfURL"];
|
||||
|
||||
|
||||
if( ($fileIn = fopen( $FileNameIn, "r")) != FALSE)
|
||||
{
|
||||
if( ($fileOut = fopen( "$Tempdir/engelXML", "w")) != FALSE)
|
||||
{
|
||||
if (($fileIn = fopen($FileNameIn, "r")) != FALSE) {
|
||||
if (($fileOut = fopen("$Tempdir/engelXML", "w")) != FALSE) {
|
||||
$Zeilen = 0;
|
||||
while (!feof($fileIn))
|
||||
{
|
||||
while (!feof($fileIn)) {
|
||||
$Zeilen++;
|
||||
fputs($fileOut, fgets($fileIn));
|
||||
}
|
||||
fclose($fileOut);
|
||||
echo "<br />Es wurden $Zeilen Zeilen eingelesen<br />";
|
||||
}
|
||||
else
|
||||
} else
|
||||
echo "<h2>fail: File '$Tempdir/engelXML' not writeable!</h2>";
|
||||
fclose($fileIn);
|
||||
}
|
||||
else
|
||||
} else
|
||||
echo "<h2>fail: File 'https://$PentabarfXMLhost/$PentabarfXMLpath" . $_POST["PentabarfURL"] . "' not readable!</h2>";
|
||||
}
|
||||
elseif( $PentabarfGetWith=="wget")
|
||||
{
|
||||
elseif ($PentabarfGetWith == "wget") {
|
||||
$Command = "wget --http-user=" . $_POST["PentabarfUser"] . " --http-passwd=" . $_POST["password"] . " " .
|
||||
"https://$PentabarfXMLhost/$PentabarfXMLpath" . $_POST["PentabarfURL"] .
|
||||
" --output-file=$Tempdir/engelXMLwgetLog --output-document=$Tempdir/engelXML" .
|
||||
|
@ -147,8 +128,7 @@ if( isset($_POST["PentabarfUser"]) && isset($_POST["password"]) && isset($_POST[
|
|||
else
|
||||
echo "fail ($Status)($Command).<br />";
|
||||
}
|
||||
elseif( $PentabarfGetWith=="lynx")
|
||||
{
|
||||
elseif ($PentabarfGetWith == "lynx") {
|
||||
$Command = "lynx -auth=" . $_POST["PentabarfUser"] . ":" . $_POST["password"] . " -dump " .
|
||||
"https://$PentabarfXMLhost/$PentabarfXMLpath" . $_POST["PentabarfURL"] . " > $Tempdir/engelXML";
|
||||
echo system($Command, $Status);
|
||||
|
@ -157,35 +137,27 @@ if( isset($_POST["PentabarfUser"]) && isset($_POST["password"]) && isset($_POST[
|
|||
else
|
||||
echo "fail ($Status)($Command).<br />";
|
||||
}
|
||||
elseif($PentabarfGetWith=="fopen")
|
||||
{
|
||||
elseif ($PentabarfGetWith == "fopen") {
|
||||
//user uns password in url einbauen
|
||||
$FileNameIn = "https://" . $_POST["PentabarfUser"] . ':' . $_POST["password"] . "@" .
|
||||
$PentabarfXMLhost . "/" . $PentabarfXMLpath . $_POST["PentabarfURL"];
|
||||
|
||||
|
||||
if( ($fileIn = fopen( $FileNameIn, "r")) != FALSE)
|
||||
{
|
||||
if( ($fileOut = fopen( "$Tempdir/engelXML", "w")) != FALSE)
|
||||
{
|
||||
if (($fileIn = fopen($FileNameIn, "r")) != FALSE) {
|
||||
if (($fileOut = fopen("$Tempdir/engelXML", "w")) != FALSE) {
|
||||
$Zeilen = 0;
|
||||
while (!feof($fileIn))
|
||||
{
|
||||
while (!feof($fileIn)) {
|
||||
$Zeilen++;
|
||||
fputs($fileOut, fgets($fileIn));
|
||||
}
|
||||
fclose($fileOut);
|
||||
echo "<br />Es wurden $Zeilen Zeilen eingelesen<br />";
|
||||
}
|
||||
else
|
||||
} else
|
||||
echo "<h2>fail: File '$Tempdir/engelXML' not writeable!</h2>";
|
||||
fclose($fileIn);
|
||||
}
|
||||
else
|
||||
} else
|
||||
echo "<h2>fail: File 'https://$PentabarfXMLhost/$PentabarfXMLpath" . $_POST["PentabarfURL"] . "' not readable!</h2>";
|
||||
}
|
||||
elseif( $PentabarfGetWith=="wget")
|
||||
{
|
||||
elseif ($PentabarfGetWith == "wget") {
|
||||
$Command = "wget --http-user=" . $_POST["PentabarfUser"] . " --http-passwd=" . $_POST["password"] . " " .
|
||||
"https://$PentabarfXMLhost/$PentabarfXMLpath" . $_POST["PentabarfURL"] .
|
||||
" --output-file=$Tempdir/engelXMLwgetLog --output-document=$Tempdir/engelXML" .
|
||||
|
@ -196,8 +168,7 @@ if( isset($_POST["PentabarfUser"]) && isset($_POST["password"]) && isset($_POST[
|
|||
else
|
||||
echo "fail ($Status)($Command).<br />";
|
||||
}
|
||||
elseif( $PentabarfGetWith=="lynx")
|
||||
{
|
||||
elseif ($PentabarfGetWith == "lynx") {
|
||||
$Command = "lynx -auth=" . $_POST["PentabarfUser"] . ":" . $_POST["password"] . " -dump " .
|
||||
"https://$PentabarfXMLhost/$PentabarfXMLpath" . $_POST["PentabarfURL"] . " > $Tempdir/engelXML";
|
||||
echo system($Command, $Status);
|
||||
|
@ -205,12 +176,9 @@ if( isset($_POST["PentabarfUser"]) && isset($_POST["password"]) && isset($_POST[
|
|||
echo "OK.<br />";
|
||||
else
|
||||
echo "fail ($Status)($Command).<br />";
|
||||
}
|
||||
else
|
||||
} else
|
||||
echo "<h1>The PentabarfGetWith='$PentabarfGetWith' not supported</h1>";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
echo "<form action=\"dbUpdateFromXLS.php\" method=\"post\">\n";
|
||||
echo "<table border=\"0\">\n";
|
||||
echo "\t<tr><td>XCAL-File: https://$PentabarfXMLhost/$PentabarfXMLpath</td>" .
|
||||
|
@ -225,16 +193,11 @@ else
|
|||
echo "</form>\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
//readXMLfile("xml.php.xml");
|
||||
if( readXMLfile("$Tempdir/engelXML") == 0)
|
||||
{
|
||||
if (readXMLfile("$Tempdir/engelXML") == 0) {
|
||||
$XMLmain = getXMLsubPease($XMLmain, "VCALENDAR");
|
||||
|
||||
|
||||
if( $ShowDataStrukture)
|
||||
{
|
||||
if ($ShowDataStrukture) {
|
||||
echo "<pre><br />";
|
||||
echo $XMLmain->name;
|
||||
echo "<br />";
|
||||
|
@ -253,7 +216,6 @@ while(list($key, $value) = each($XMLmain->sub[$Feld]->sub))
|
|||
echo "</pre>";
|
||||
*/
|
||||
|
||||
|
||||
/*##############################################################################################
|
||||
V e r s i o n
|
||||
##############################################################################################*/
|
||||
|
@ -265,17 +227,14 @@ echo "release: ". $XMLrelease->data. "<br />\n";
|
|||
//echo "release date: ". $XMLreleaseDate->data. "<br />\n";
|
||||
echo "<hr>\n";
|
||||
|
||||
|
||||
|
||||
/*##############################################################################################
|
||||
V e r s i o n
|
||||
##############################################################################################*/
|
||||
if ($EnableRoomFunctions)
|
||||
include("../../../camp2011/includes/funktion_xml_room.php");
|
||||
include ("includes/funktion_xml_room.php");
|
||||
|
||||
if ($EnableSchudleFunctions)
|
||||
include("../../../camp2011/includes/funktion_xml_schudle.php");
|
||||
|
||||
include ("includes/funktion_xml_schudle.php");
|
||||
|
||||
/*##############################################################################################
|
||||
U P D A T E A L L
|
||||
|
@ -288,6 +247,6 @@ echo "</form>\n";
|
|||
|
||||
} //if XMLopenOOK
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "Debug-Liste";
|
||||
$header = "Datenbank-Auszug";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("../../../camp2011/includes/funktion_db_list.php");
|
||||
include ("includes/header.php");
|
||||
include ("includes/funktion_db_list.php");
|
||||
|
||||
echo "<h1>Web Counter</h1>";
|
||||
funktion_db_list("Counter");
|
||||
|
@ -31,39 +32,27 @@ echo "Deaktiviert";
|
|||
*/
|
||||
|
||||
echo "<hr>\n";
|
||||
funktion_db_element_list_2row( "Tshirt-Size aller engel",
|
||||
"SELECT `Size`, COUNT(`Size`) FROM `User` GROUP BY `Size`");
|
||||
funktion_db_element_list_2row("Tshirt-Size aller engel", "SELECT `Size`, COUNT(`Size`) FROM `User` GROUP BY `Size`");
|
||||
echo "<br />\n";
|
||||
funktion_db_element_list_2row( "Tshirt ausgegeben",
|
||||
"SELECT `Size`, COUNT(`Size`) FROM `User` WHERE `Tshirt`='1' GROUP BY `Size`");
|
||||
funktion_db_element_list_2row("Tshirt ausgegeben", "SELECT `Size`, COUNT(`Size`) FROM `User` WHERE `Tshirt`='1' GROUP BY `Size`");
|
||||
echo "<br />\n";
|
||||
funktion_db_element_list_2row( "Tshirt nicht ausgegeben (Gekommen=1)",
|
||||
"SELECT COUNT(`Size`), `Size` FROM `User` WHERE `Gekommen`='1' and `Tshirt`='0' GROUP BY `Size`");
|
||||
funktion_db_element_list_2row("Tshirt nicht ausgegeben (Gekommen=1)", "SELECT COUNT(`Size`), `Size` FROM `User` WHERE `Gekommen`='1' and `Tshirt`='0' GROUP BY `Size`");
|
||||
|
||||
echo "<hr>\n";
|
||||
funktion_db_element_list_2row( "Hometown",
|
||||
"SELECT COUNT(`Hometown`), `Hometown` FROM `User` GROUP BY `Hometown`");
|
||||
funktion_db_element_list_2row("Hometown", "SELECT COUNT(`Hometown`), `Hometown` FROM `User` GROUP BY `Hometown`");
|
||||
echo "<br />\n";
|
||||
funktion_db_element_list_2row( "Engeltypen",
|
||||
"SELECT COUNT(`Art`), `Art` FROM `User` GROUP BY `Art`");
|
||||
funktion_db_element_list_2row("Engeltypen", "SELECT COUNT(`Art`), `Art` FROM `User` GROUP BY `Art`");
|
||||
|
||||
echo "<hr>\n";
|
||||
funktion_db_element_list_2row( "Gesamte Arbeit",
|
||||
"SELECT COUNT(*) AS `Count [x]`, SUM(Shifts.Len) as `Sum [h]` from Shifts LEFT JOIN ShiftEntry USING(SID)");
|
||||
funktion_db_element_list_2row("Gesamte Arbeit", "SELECT COUNT(*) AS `Count [x]`, SUM(Shifts.Len) as `Sum [h]` from Shifts LEFT JOIN ShiftEntry USING(SID)");
|
||||
echo "<br />\n";
|
||||
funktion_db_element_list_2row( "Geleisteter Arbeit",
|
||||
"SELECT COUNT(*) AS `Count [x]`, SUM(Shifts.Len) as `Sum [h]` from Shifts LEFT JOIN ShiftEntry USING(SID) WHERE (ShiftEntry.UID!=0)");
|
||||
funktion_db_element_list_2row("Geleisteter Arbeit", "SELECT COUNT(*) AS `Count [x]`, SUM(Shifts.Len) as `Sum [h]` from Shifts LEFT JOIN ShiftEntry USING(SID) WHERE (ShiftEntry.UID!=0)");
|
||||
|
||||
echo "<hr>\n";
|
||||
funktion_db_element_list_2row( "Gesamte Arbeit (Ohne Raum aufabau (RID=7)",
|
||||
"SELECT COUNT(*) AS `Count [x]`, SUM(Shifts.Len) as `Sum [h]` from Shifts LEFT JOIN ShiftEntry USING(SID) WHERE (Shifts.RID!=7)");
|
||||
funktion_db_element_list_2row("Gesamte Arbeit (Ohne Raum aufabau (RID=7)", "SELECT COUNT(*) AS `Count [x]`, SUM(Shifts.Len) as `Sum [h]` from Shifts LEFT JOIN ShiftEntry USING(SID) WHERE (Shifts.RID!=7)");
|
||||
echo "<br />\n";
|
||||
funktion_db_element_list_2row( "Geleisteter Arbeit (Ohne Raum aufabau (RID=7)",
|
||||
"SELECT COUNT(*) AS `Count [x]`, SUM(Shifts.Len) as `Sum [h]` from Shifts LEFT JOIN ShiftEntry USING(SID) WHERE (ShiftEntry.UID!=0) AND (Shifts.RID!=7)");
|
||||
funktion_db_element_list_2row("Geleisteter Arbeit (Ohne Raum aufabau (RID=7)", "SELECT COUNT(*) AS `Count [x]`, SUM(Shifts.Len) as `Sum [h]` from Shifts LEFT JOIN ShiftEntry USING(SID) WHERE (ShiftEntry.UID!=0) AND (Shifts.RID!=7)");
|
||||
|
||||
|
||||
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "Engelsystem - DECT";
|
||||
$header = "DECT send call";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("includes/header.php");
|
||||
|
||||
include ("../../../camp2011/includes/config_IAX.php");
|
||||
include ("config/config_IAX.php");
|
||||
//include ("../../../camp2011/includes/funktion_modem.php");
|
||||
include ("../../../camp2011/includes/funktion_cron.php");
|
||||
include ("includes/funktion_cron.php");
|
||||
|
||||
if( !isset($_GET["dial"])) $_GET["dial"] = "";
|
||||
if( !isset($_GET["custum"])) $_GET["custum"] = "";
|
||||
if (!isset ($_GET["dial"]))
|
||||
$_GET["dial"] = "";
|
||||
if (!isset ($_GET["custum"]))
|
||||
$_GET["custum"] = "";
|
||||
|
||||
if( $_GET["dial"]=="dial")
|
||||
{
|
||||
if ($_GET["dial"] == "dial") {
|
||||
if ($_GET["DECT"] == "")
|
||||
$Number = $_GET["custum"];
|
||||
else
|
||||
|
@ -30,7 +32,6 @@ if( $_GET["dial"]=="dial")
|
|||
$_GET["custum"] = $Number;
|
||||
}
|
||||
|
||||
|
||||
echo "<form action=\"./dect.php\" method=\"GET\">\n";
|
||||
echo "<table>\n";
|
||||
|
||||
|
@ -44,8 +45,7 @@ if( $_GET["dial"]=="dial")
|
|||
$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++)
|
||||
{
|
||||
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") . ")" .
|
||||
|
@ -64,7 +64,6 @@ if( $_GET["dial"]=="dial")
|
|||
|
||||
echo "</form>";
|
||||
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
include ("includes/header.php");
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "Himmel";
|
||||
$header = "FAQ / Fragen an die Erzengel";
|
||||
$submenus = 1;
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("../../../camp2011/includes/funktion_db.php");
|
||||
include ("includes/header.php");
|
||||
include ("includes/funktion_db.php");
|
||||
|
||||
//var init
|
||||
$quest_bearb = 0;
|
||||
|
||||
if (IsSet($_GET["quest"]))
|
||||
{
|
||||
if (IsSet ($_GET["quest"])) {
|
||||
|
||||
switch ($_GET["quest"])
|
||||
{
|
||||
switch ($_GET["quest"]) {
|
||||
|
||||
// *---------------------------------------------------------------------------
|
||||
// * Anfragen - Bearbeitung
|
||||
// *---------------------------------------------------------------------------
|
||||
// * je nach Übergabeoption ($quest) koennen Anfragen beantwortet werden oder
|
||||
// * je nach <20>bergabeoption ($quest) koennen Anfragen beantwortet werden oder
|
||||
// * als FAQ uebergeben werden
|
||||
// *---------------------------------------------------------------------------
|
||||
|
||||
|
@ -37,6 +37,7 @@ case "all":
|
|||
|
||||
<?php
|
||||
|
||||
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
// anzahl zeilen
|
||||
$Zeilen = mysql_num_rows($Erg);
|
||||
|
@ -45,14 +46,11 @@ case "all":
|
|||
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)
|
||||
{
|
||||
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
|
||||
{
|
||||
} else {
|
||||
echo "Nein</td>\n";
|
||||
echo "<td> </td>\n";
|
||||
echo "<td> </td>\n";
|
||||
|
@ -72,8 +70,7 @@ case "open":
|
|||
case "edit" :
|
||||
if (!IsSet ($_GET["QID"]))
|
||||
echo "\t\tFehlerhafter Aufruf...<br />Bitte die Bearbeitung nochmals beginnen :)\n";
|
||||
else
|
||||
{
|
||||
else {
|
||||
$SQL = "SELECT * FROM `Questions` WHERE `QID`='" . $_GET["QID"] . "'";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
echo "\t\t<form action=\"./faq.php\" method=\"GET\">\n";
|
||||
|
@ -91,8 +88,7 @@ case "edit":
|
|||
echo "\t\t<input type=\"hidden\" name=\"quest\" value=\"save\">\n";
|
||||
echo "\t\t<input type=\"submit\" value=\"Sichern...\">\n";
|
||||
echo "\t</form>\n";
|
||||
if (mysql_result($Erg, 0, "AID")<>"0")
|
||||
{
|
||||
if (mysql_result($Erg, 0, "AID") <> "0") {
|
||||
echo "\tDu kannst diese Anfrage so wie sie ist, als Engel-FAQ eintrag übernehmen.<br />\n";
|
||||
echo "<a href=\"./faq.php?quest=transfer&QID=" . $_GET["QID"] . "\">Als FAQ-Eintrag sichern...</a>\n";
|
||||
}
|
||||
|
@ -102,18 +98,15 @@ case "edit":
|
|||
case "save" :
|
||||
if (!IsSet ($_GET["QID"]))
|
||||
echo "\tFehlerhafter Aufruf... Bitte die Bearbeitung nochmal starten...";
|
||||
else
|
||||
{
|
||||
else {
|
||||
$SQL = "UPDATE `Questions` SET `Question`='" . $_GET["Question"] .
|
||||
"', `AID`='" . $_SESSION['UID'] . "' , `Answer`='" . $_GET["Answer"] . "' " .
|
||||
"WHERE `QID`='" . $_GET["QID"] . "' LIMIT 1";
|
||||
$Erg = db_query($SQL, "save Question");
|
||||
if ($Erg == 1)
|
||||
{
|
||||
if ($Erg == 1) {
|
||||
echo "\tDer Eintrag wurde geändert<br />\n";
|
||||
SetHeaderGo2Back();
|
||||
}
|
||||
else
|
||||
} else
|
||||
echo "\tEin Fehler ist aufgetreten. Sorry, du kannst es aber ja nochmal probieren :)\n";
|
||||
}
|
||||
break;
|
||||
|
@ -121,8 +114,7 @@ case "save":
|
|||
case "transfer" :
|
||||
if (!IsSet ($_GET["QID"]))
|
||||
echo "\tFehlerhafter Aufruf... Bitte die Bearbeitung nochmal starten...\n";
|
||||
else
|
||||
{
|
||||
else {
|
||||
$SQL1 = "SELECT * FROM `Questions` WHERE `QID`='" . $_GET["QID"] . "'";
|
||||
$Erg = mysql_query($SQL1, $con);
|
||||
$SQL2 = "INSERT INTO `FAQ` Values ('', '" .
|
||||
|
@ -139,7 +131,7 @@ case "transfer":
|
|||
// *---------------------------------------------------------------------------
|
||||
// * FAQ - Bearbeitung
|
||||
// *---------------------------------------------------------------------------
|
||||
// * je nach Übergabeoption ($quest) koennen FAQ's erfasst werden,
|
||||
// * je nach <20>bergabeoption ($quest) koennen FAQ's erfasst werden,
|
||||
// * geaendert oder geloscht werden...
|
||||
// *---------------------------------------------------------------------------
|
||||
case "faq" :
|
||||
|
@ -154,8 +146,7 @@ case "faq":
|
|||
$Zeilen = mysql_num_rows($Erg);
|
||||
|
||||
for ($n = 0; $n < $Zeilen; $n++)
|
||||
if (mysql_result($Erg, $n, "Antwort")!="")
|
||||
{
|
||||
if (mysql_result($Erg, $n, "Antwort") != "") {
|
||||
echo "\t<p class=\"question\">" . mysql_result($Erg, $n, "Frage") . "</p>\n";
|
||||
echo "\t<p class=\"answetion\">" . mysql_result($Erg, $n, "Antwort") . "</p>\n";
|
||||
echo "\t<a href=\"./faq.php?quest=faqedit&FAQID=" . mysql_result($Erg, $n, "FID") .
|
||||
|
@ -166,8 +157,7 @@ case "faq":
|
|||
case "faqedit" :
|
||||
if (!IsSet ($_GET["FAQID"]))
|
||||
echo "\tFehlerhafter Aufruf...<br />Bitte die Bearbeitung nochmals beginnen :)\n";
|
||||
else
|
||||
{
|
||||
else {
|
||||
$SQL = "SELECT * FROM `FAQ` WHERE `FID`='" . $_GET["FAQID"] . "'";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
|
@ -190,14 +180,15 @@ case "faqedit":
|
|||
<input type="submit" value="Löschen...">
|
||||
</form>
|
||||
<?php
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
case "faqdelete";
|
||||
if (!IsSet ($_GET["FAQID"]))
|
||||
echo "\tFehlerhafter Aufruf... Bitte die Bearbeitung nochmal starten...\n";
|
||||
else
|
||||
{
|
||||
else {
|
||||
$SQL = "DELETE FROM `FAQ` WHERE `FID`='" . $_GET["FAQID"] . "' LIMIT 1";
|
||||
$Erg = db_query($SQL, "delate faq item");
|
||||
if ($Erg == 1)
|
||||
|
@ -210,8 +201,7 @@ case "faqdelete";
|
|||
case "faqsave";
|
||||
if (!IsSet ($_GET["FAQID"]))
|
||||
echo "\tFehlerhafter Aufruf... Bitte die Bearbeitung nochmal starten...\n";
|
||||
else
|
||||
{
|
||||
else {
|
||||
$SQL = "UPDATE `FAQ` SET `Frage`='" . $_GET["Frage"] . "', `Antwort`='" . $_GET["Antwort"] .
|
||||
"' WHERE `FID`='" . $_GET["FAQID"] . "' LIMIT 1";
|
||||
$Erg = db_query($SQL, $con);
|
||||
|
@ -233,6 +223,8 @@ case "faqnew":
|
|||
<input type="submit" value="Sichern...">
|
||||
</form>
|
||||
<?php
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case "faqnewsave";
|
||||
|
@ -246,11 +238,9 @@ case "faqnewsave";
|
|||
|
||||
} //switch ($_GET["quest"])
|
||||
|
||||
|
||||
// Hilfsroutine für die Anfragen:
|
||||
// Hilfsroutine f<>r die Anfragen:
|
||||
// Fragenliste anzeigen???
|
||||
if ($quest_bearb==1)
|
||||
{
|
||||
if ($quest_bearb == 1) {
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
// anzahl zeilen
|
||||
$Zeilen = mysql_num_rows($Erg);
|
||||
|
@ -258,8 +248,7 @@ if ($quest_bearb==1)
|
|||
if ($Zeilen == 0)
|
||||
echo "\tkeine vorhanden...\n";
|
||||
else
|
||||
for ($n = 0 ; $n < $Zeilen ; $n++)
|
||||
{
|
||||
for ($n = 0; $n < $Zeilen; $n++) {
|
||||
echo "\t<p>" . nl2br(mysql_result($Erg, $n, "Question")) . "\n</p><br />\n";
|
||||
echo "\t<a href=\"./faq.php?quest=edit&QID=" . mysql_result($Erg, $n, "QID") . "\">Bearbeiten</a>\n";
|
||||
echo "<br />---<br />\n";
|
||||
|
@ -268,8 +257,7 @@ if ($quest_bearb==1)
|
|||
}
|
||||
|
||||
} //if (IsSet($_GET["quest"]))
|
||||
else
|
||||
{
|
||||
else {
|
||||
echo "Bitte wähle aus, ob du:\n";
|
||||
echo "<ul>\n";
|
||||
echo "\t<li><a href=\"./faq.php?quest=all\">Alle Anfragen anzeigen/bearbeiten möchtest</a></li>\n";
|
||||
|
@ -279,5 +267,5 @@ else
|
|||
echo "</ul>\n";
|
||||
}
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "Erzengel";
|
||||
$header = "Freie Engel";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("../../../camp2011/includes/funktion_db_list.php");
|
||||
|
||||
include ("includes/header.php");
|
||||
include ("includes/funktion_db_list.php");
|
||||
|
||||
echo "Hallo " . $_SESSION['Nick'] . ",<br />\n";
|
||||
|
||||
echo "<br /><br />\n\nHier findest du alle Engel, welche zur Zeit in keiner Schicht verplant sind:<br /><br />\n";
|
||||
|
||||
|
||||
#######################################################
|
||||
# Ermitteln freier Engel
|
||||
#
|
||||
|
@ -47,8 +46,6 @@ $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";
|
||||
|
@ -58,10 +55,8 @@ 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++)
|
||||
{
|
||||
for ($i = 0; $i < $Zeilen; $i++) {
|
||||
echo "<tr class=\"content\">\n";
|
||||
echo "<td><a href=\"./userChangeNormal.php?Type=Normal&enterUID=" . mysql_result($Erg, $i, "UID") . "\">" .
|
||||
UID2Nick(mysql_result($Erg, $i, "UID")) . "</td></a>\n";
|
||||
|
@ -76,10 +71,10 @@ for ($i=0; $i < $Zeilen; $i++)
|
|||
$inuse .= "(Nick = \"" . UID2Nick(mysql_result($Erg, $i, "UID")) . "\")";
|
||||
}
|
||||
if ($inuse != "")
|
||||
$inuse=" WHERE NOT (".$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";
|
||||
|
@ -89,8 +84,7 @@ echo "\t<tr class=\"contenttopic\">\n\t\t<td>Nick</td>\n\t\t<td>DECT</td>\n\t</t
|
|||
$SQL = "SELECT Nick, UID, DECT FROM User" . $inuse . ";";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
$Zeilen = mysql_num_rows($Erg);
|
||||
for ($i=0; $i < $Zeilen; $i++)
|
||||
{
|
||||
for ($i = 0; $i < $Zeilen; $i++) {
|
||||
echo "\t<tr class=\"content\">\n";
|
||||
echo "\t\t<td><a href=\"./userChangeNormal.php?Type=Normal&enterUID=" . mysql_result($Erg, $i, "UID") . "\">" .
|
||||
mysql_result($Erg, $i, "Nick") . "</a></td>\n";
|
||||
|
@ -99,6 +93,6 @@ for ($i=0; $i < $Zeilen; $i++)
|
|||
}
|
||||
echo "</table>\n";
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
include ("../../../camp2011/includes/config_db.php");
|
||||
include ("../../../camp2011/includes/funktion_db_list.php");
|
||||
include ("../../../camp2011/includes/funktion_user.php");
|
||||
|
||||
include ("config/config_db.php");
|
||||
include ("includes/funktion_db_list.php");
|
||||
include ("includes/funktion_user.php");
|
||||
|
||||
#######################################################
|
||||
# Ermitteln freier Engel
|
||||
|
@ -19,29 +19,23 @@ $Erg = mysql_query($SQL, $con);
|
|||
$Zeilen = mysql_num_rows($Erg);
|
||||
|
||||
$inuse = "";
|
||||
for ($i=0; $i < $Zeilen; $i++)
|
||||
{
|
||||
for ($i = 0; $i < $Zeilen; $i++) {
|
||||
if ($inuse != "")
|
||||
$inuse .= " OR ";
|
||||
$inuse .= "(UID = \"" . mysql_result($Erg, $i, "UID") . "\")";
|
||||
}
|
||||
if ($inuse!="")
|
||||
{
|
||||
if ($inuse != "") {
|
||||
$inuse = " WHERE (NOT (" . $inuse . ")) AND (DECT!='')";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$inuse = " WHERE (DECT!='')";
|
||||
}
|
||||
|
||||
|
||||
//##########################################################################################################
|
||||
|
||||
$SQL = "SELECT * FROM User" . $inuse . ";";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
$Zeilen = mysql_num_rows($Erg);
|
||||
for ($i=0; $i < $Zeilen; $i++)
|
||||
{
|
||||
for ($i = 0; $i < $Zeilen; $i++) {
|
||||
// get DECT number
|
||||
echo mysql_result($Erg, $i, "DECT") . "\t";
|
||||
|
||||
|
@ -50,13 +44,8 @@ for ($i=0; $i < $Zeilen; $i++)
|
|||
$Erg_RIGHT = mysql_query($SQL_RIGHT, $con);
|
||||
$UserRights = mysql_fetch_array($Erg_RIGHT);
|
||||
|
||||
foreach( $UserRights as $Var => $Value)
|
||||
{
|
||||
if( (strpos( $Var, ".php") === false) AND
|
||||
(strpos( $Var, "/") === false) AND
|
||||
(strpos( $Var, "UID") === false) AND
|
||||
(is_numeric($Var) === false) )
|
||||
{
|
||||
foreach ($UserRights as $Var => $Value) {
|
||||
if ((strpos($Var, ".php") === false) AND (strpos($Var, "/") === false) AND (strpos($Var, "UID") === false) AND (is_numeric($Var) === false)) {
|
||||
echo "\"" . $Var . "\"=" . $Value . "\t";
|
||||
}
|
||||
}
|
||||
|
@ -65,14 +54,12 @@ for ($i=0; $i < $Zeilen; $i++)
|
|||
$SQL_TYPES = "SELECT TID FROM `ShiftEntry` WHERE UID=" . mysql_result($Erg, $i, "UID") . " GROUP BY TID;";
|
||||
$Erg_TYPES = mysql_query($SQL_TYPES, $con);
|
||||
$Zeilen_Typen = mysql_num_rows($Erg_TYPES);
|
||||
for ($j=0; $j < $Zeilen_Typen; $j++)
|
||||
{
|
||||
for ($j = 0; $j < $Zeilen_Typen; $j++) {
|
||||
echo "\"TID_" . TID2Type(mysql_result($Erg_TYPES, $j, "TID")) . "\"=Y\t";
|
||||
}
|
||||
|
||||
echo "\n";
|
||||
// echo "<br />";
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "User-Liste";
|
||||
$header = "Editieren der Engelliste";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("../../../camp2011/includes/funktion_db_list.php");
|
||||
include ("includes/header.php");
|
||||
include ("includes/funktion_db_list.php");
|
||||
|
||||
if (!IsSet($_GET["enterGID"]))
|
||||
{
|
||||
if (!IsSet ($_GET["enterGID"])) {
|
||||
// Userliste, keine UID uebergeben...
|
||||
|
||||
$SQL = "SELECT * FROM `UserGroups` ORDER BY `Name` ASC";
|
||||
|
@ -43,7 +43,7 @@ if (!IsSet($_GET["enterGID"]))
|
|||
// Ende Userliste
|
||||
}
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "Erzengel";
|
||||
$header = "Index";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("../../../camp2011/includes/funktion_db_list.php");
|
||||
include ("includes/header.php");
|
||||
include ("includes/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 />
|
||||
|
@ -14,6 +14,8 @@ du bist jetzt im Erzengel-Bereich. Hier kannst du die Engel-Verwaltung vornehmen
|
|||
Bitte melde dich <a href="../logout.php">hier</a> nach getaner Arbeit immer ab, damit kein anderer hier Änderungen vornehmen kann.
|
||||
|
||||
<?php
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
|
||||
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "Räume";
|
||||
$header = "Verwaltung der Räume";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("../../../camp2011/includes/funktion_schichtplan_aray.php");
|
||||
include ("includes/header.php");
|
||||
include ("funktion_schichtplan_aray.php");
|
||||
|
||||
$Sql = "SELECT * FROM `Room` ORDER BY `Number`, `Name`";
|
||||
$Erg = mysql_query($Sql, $con);
|
||||
|
||||
if( !IsSet($_GET["action"]) )
|
||||
{
|
||||
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";
|
||||
|
@ -18,8 +19,7 @@ if( !IsSet($_GET["action"]) )
|
|||
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++ )
|
||||
{
|
||||
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
|
||||
|
@ -28,20 +28,16 @@ if( !IsSet($_GET["action"]) )
|
|||
echo "\t<td>Ändern</td>";
|
||||
echo "</tr>";
|
||||
|
||||
for( $t = 0; $t < mysql_num_rows($Erg); $t++ )
|
||||
{
|
||||
for ($t = 0; $t < mysql_num_rows($Erg); $t++) {
|
||||
echo "\t<tr class=\"content\">\n";
|
||||
for ($j = 1; $j < mysql_num_fields($Erg); $j++)
|
||||
{
|
||||
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
|
||||
{
|
||||
} else {
|
||||
|
||||
UnSet ($SQL);
|
||||
|
||||
|
@ -52,18 +48,14 @@ case 'new':
|
|||
echo "<form action=\"./room.php\" method=\"GET\">\n";
|
||||
echo "<table>\n";
|
||||
|
||||
for( $Uj = 1; $Uj < mysql_num_fields($Erg); $Uj++ )
|
||||
{
|
||||
if( (mysql_field_name($Erg, $Uj) == "show") || (mysql_field_name($Erg, $Uj) == "FromPentabarf") )
|
||||
{
|
||||
for ($Uj = 1; $Uj < mysql_num_fields($Erg); $Uj++) {
|
||||
if ((mysql_field_name($Erg, $Uj) == "show") || (mysql_field_name($Erg, $Uj) == "FromPentabarf")) {
|
||||
echo "<tr><td>" . mysql_field_name($Erg, $Uj) . "</td>" .
|
||||
"<td>" .
|
||||
"<input type=\"radio\" name=\"" . mysql_field_name($Erg, $Uj) . "\" value=\"Y\">Yes" .
|
||||
"<input type=\"radio\" name=\"" . mysql_field_name($Erg, $Uj) . "\" value=\"N\">No" .
|
||||
"</td></tr>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
//sonderfall fuer Default Engel
|
||||
if (substr(mysql_field_name($Erg, $Uj), 0, 12) == "DEFAULT_EID_")
|
||||
$FeldName = "Anzahl " . $EngelTypeID[substr(mysql_field_name($Erg, $Uj), 12)];
|
||||
|
@ -87,8 +79,7 @@ case 'newsave':
|
|||
$vars = array_splice($vars, 0, $count);
|
||||
$Keys = "";
|
||||
$Values = "";
|
||||
foreach($vars as $key => $value)
|
||||
{
|
||||
foreach ($vars as $key => $value) {
|
||||
$Keys .= ", `$key`";
|
||||
$Values .= ", '$value'";
|
||||
}
|
||||
|
@ -99,22 +90,18 @@ case 'newsave':
|
|||
case 'change' :
|
||||
if (!IsSet ($_GET["RID"]))
|
||||
echo "Fehlerhafter Aufruf!";
|
||||
else
|
||||
{
|
||||
else {
|
||||
$SQL2 = "SELECT * FROM `Room` WHERE `RID`='" . $_GET["RID"] . "'";
|
||||
$ERG = mysql_query($SQL2, $con);
|
||||
|
||||
if( mysql_num_rows( $ERG)>0)
|
||||
{
|
||||
if (mysql_num_rows($ERG) > 0) {
|
||||
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";
|
||||
|
||||
for ($Uj = 1; $Uj < mysql_num_fields($ERG); $Uj++)
|
||||
{
|
||||
if( (mysql_field_name($ERG, $Uj) == "show") || (mysql_field_name($ERG, $Uj) == "FromPentabarf") )
|
||||
{
|
||||
for ($Uj = 1; $Uj < mysql_num_fields($ERG); $Uj++) {
|
||||
if ((mysql_field_name($ERG, $Uj) == "show") || (mysql_field_name($ERG, $Uj) == "FromPentabarf")) {
|
||||
echo "<tr><td>" . mysql_field_name($Erg, $Uj) . "</td>" .
|
||||
"<td>" .
|
||||
"<input type=\"radio\" name=\"e" . mysql_field_name($ERG, $Uj) .
|
||||
|
@ -122,9 +109,7 @@ case 'change':
|
|||
"<input type=\"radio\" name=\"e" . mysql_field_name($ERG, $Uj) .
|
||||
"\" value=\"N\"" . (mysql_result($ERG, 0, $Uj) == 'N' ? " checked" : "") . ">No" .
|
||||
"</td></tr>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
if (substr(mysql_field_name($ERG, $Uj), 0, 12) == "DEFAULT_EID_")
|
||||
//sonderfall fuer Default Engel
|
||||
$FeldName = "Anzahl " . $EngelTypeID[substr(mysql_field_name($ERG, $Uj), 12)];
|
||||
|
@ -146,8 +131,7 @@ case 'change':
|
|||
echo "<input type=\"hidden\" name=\"action\" value=\"delete\">\n";
|
||||
echo "<input type=\"submit\" value=\"Löschen...\">";
|
||||
echo "</form>";
|
||||
}
|
||||
else
|
||||
} else
|
||||
echo "FEHLER: Room ID " . $_GET["RID"] . " nicht gefunden";
|
||||
}
|
||||
break;
|
||||
|
@ -157,8 +141,7 @@ case 'changesave':
|
|||
$vars = $_GET;
|
||||
$count = count($vars) - 2;
|
||||
$vars = array_splice($vars, 0, $count);
|
||||
foreach($vars as $key => $value)
|
||||
{
|
||||
foreach ($vars as $key => $value) {
|
||||
$keys = substr($key, 1);
|
||||
$sql .= ", `" . $keys . "`='" . $value . "' ";
|
||||
}
|
||||
|
@ -177,7 +160,6 @@ case 'delete':
|
|||
|
||||
} //switch
|
||||
|
||||
|
||||
// Update ???
|
||||
|
||||
if (IsSet ($SQL)) {
|
||||
|
@ -186,8 +168,7 @@ if (IsSet($SQL)){
|
|||
$Erg = db_query($SQL, "exec SQL");
|
||||
if ($Erg == 1)
|
||||
echo "Änderung wurde gesichert...<br />";
|
||||
else
|
||||
{
|
||||
else {
|
||||
echo "Fehler beim speichern... bitte noch ein mal probieren :)";
|
||||
echo "<br /><br />" . mysql_error($con) . "<br />($SQL)<br />";
|
||||
}
|
||||
|
@ -195,5 +176,5 @@ if (IsSet($SQL)){
|
|||
|
||||
} //IF IsSet($action)
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "Schichtplan";
|
||||
$header = "Neue Schichten erfassen";
|
||||
$submenus = 1;
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("includes/header.php");
|
||||
|
||||
function executeSQL( $SQL)
|
||||
{
|
||||
function executeSQL($SQL) {
|
||||
global $debug, $con;
|
||||
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
if ($debug)
|
||||
echo "DEBUG SQL: $SQL<br />\n";
|
||||
if ($Erg == 1)
|
||||
{
|
||||
if ($Erg == 1) {
|
||||
echo "SQL war erfolgreich";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
echo "SQL Fehler (" . mysql_error($con) . ")";
|
||||
}
|
||||
}
|
||||
|
@ -38,12 +36,12 @@ echo "<form action=\"".$_SERVER['SCRIPT_NAME']."\" method=\"GET\" >\n";
|
|||
</tr>
|
||||
<?php
|
||||
|
||||
|
||||
$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++)
|
||||
{
|
||||
for ($i = 0; $i < $rowcount; $i++) {
|
||||
echo "\t<tr class=\"content\">\n";
|
||||
echo "\t\t<td><input type=\"checkbox\" name=\"SID" . mysql_result($Erg, $i, "SID") . "\" " .
|
||||
"value=\"" . mysql_result($Erg, $i, "SID") . "\"></td>\n";
|
||||
|
@ -66,21 +64,17 @@ echo "<input type=\"hidden\" name=\"action\" value=\"deleteShifs\">\n";
|
|||
echo "<input type=\"submit\" value=\"Löschen...\">\n";
|
||||
echo "</form>\n";
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
// aus sicherheitzgründen wegen späterer genuzung
|
||||
// aus sicherheitzgr<67>nden wegen sp<73>terer genuzung
|
||||
UnSet ($chSQL);
|
||||
|
||||
switch ($_GET["action"]) {
|
||||
|
||||
case 'change' :
|
||||
if ( !IsSet($_GET["SID"]) )
|
||||
{
|
||||
if (!IsSet ($_GET["SID"])) {
|
||||
echo "Fehlerhafter Aufruf!\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
|
||||
$sql = "SELECT * FROM `Shifts` WHERE (`SID` = '" . $_GET["SID"] . "' )";
|
||||
$Erg = mysql_query($sql, $con);
|
||||
|
@ -99,12 +93,10 @@ case 'change':
|
|||
$Erg2 = mysql_query($sql2, $con);
|
||||
$rowcount = mysql_num_rows($Erg2);
|
||||
$FromPentabarf = "N";
|
||||
for( $i = 0; $i < $rowcount; $i++ )
|
||||
{
|
||||
for ($i = 0; $i < $rowcount; $i++) {
|
||||
$RID = mysql_result($Erg2, $i, "RID");
|
||||
echo " <option value=\"" . $RID . "\"";
|
||||
if( $RID == mysql_result($Erg, 0, "RID") )
|
||||
{
|
||||
if ($RID == mysql_result($Erg, 0, "RID")) {
|
||||
echo " selected";
|
||||
$FromPentabarf = mysql_result($Erg2, $i, "FromPentabarf");
|
||||
}
|
||||
|
@ -121,8 +113,7 @@ case 'change':
|
|||
echo " <tr><td>URL</td>" .
|
||||
"<td><input value=\"" . mysql_result($Erg, 0, "URL") .
|
||||
"\" type=\"text\" size=\"40\" name=\"eURL\"></td></tr>\n";
|
||||
if( $FromPentabarf == "Y")
|
||||
{
|
||||
if ($FromPentabarf == "Y") {
|
||||
echo " <tr><td></td>" .
|
||||
"<td><h1>!!! Imported from Pentabarf !!!</h1></td></tr>\n";
|
||||
}
|
||||
|
@ -133,7 +124,7 @@ case 'change':
|
|||
echo "<input type=\"submit\" value=\"sichern...\">\n";
|
||||
echo "</form>\n\n";
|
||||
|
||||
// Löschen
|
||||
// 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";
|
||||
|
@ -152,8 +143,7 @@ case 'change':
|
|||
|
||||
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++)
|
||||
{
|
||||
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";
|
||||
|
@ -175,8 +165,7 @@ case 'change':
|
|||
"<th>freeloader :-(</th>" .
|
||||
"</tr>";
|
||||
|
||||
for ($j=0; $j < $rowcount; $j++)
|
||||
{
|
||||
for ($j = 0; $j < $rowcount; $j++) {
|
||||
$userUID = mysql_result($Erg3, $j, "UID");
|
||||
echo "\t<tr>\n";
|
||||
echo "\t\t<td>" . UID2Nick($userUID) . "</td>\n";
|
||||
|
@ -196,16 +185,14 @@ case 'change':
|
|||
|
||||
// Listet alle Nicks auf
|
||||
echo "<select name=\"UIDs\">\n";
|
||||
if( $FromPentabarf != "Y")
|
||||
{
|
||||
if ($FromPentabarf != "Y") {
|
||||
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++)
|
||||
{
|
||||
for ($k = 0; $k < $urowcount; $k++) {
|
||||
echo "\t<option value=\"" . mysql_result($uErg, $k, "UID") . "\">" .
|
||||
mysql_result($uErg, $k, "Nick") .
|
||||
"</option>\n";
|
||||
|
@ -214,23 +201,21 @@ case 'change':
|
|||
|
||||
echo " als \n";
|
||||
|
||||
// holt eine liste der benötigten Engel zu dieser Schischt
|
||||
// holt eine liste der ben<65>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))
|
||||
{
|
||||
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
|
||||
// Gibt dei m<>glich Engeltypen aus und zeigt w<>efiel noch be<62>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++)
|
||||
{
|
||||
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");
|
||||
|
@ -252,21 +237,17 @@ case 'change':
|
|||
break;
|
||||
|
||||
case 'engeladd' :
|
||||
if( $_GET["UIDs"]>0)
|
||||
{
|
||||
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 )
|
||||
{
|
||||
if (mysql_num_rows($ERG) != 0) {
|
||||
$chSQL = "UPDATE `ShiftEntry` SET " .
|
||||
"`UID`='" . $_GET["UIDs"] . "', `Comment`='shift added by " . $_SESSION['Nick'] . "' " .
|
||||
"WHERE (`SID`='" . $_GET["SID"] . "' AND " .
|
||||
"`TID`='" . $_GET["TID"] . "' AND `UID`='0' ) LIMIT 1";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$chSQL = "INSERT INTO `ShiftEntry` (`SID`, `TID`, `UID`, `Comment`) VALUES (" .
|
||||
"'" . $_GET["SID"] . "', '" . $_GET["TID"] . "', " .
|
||||
"'" . $_GET["UIDs"] . "', 'shift added by " . $_SESSION['Nick'] . "')";
|
||||
|
@ -274,24 +255,18 @@ case 'engeladd':
|
|||
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
|
||||
{
|
||||
} else {
|
||||
echo "Es wird folgende Schicht wurde " . $_GET["eAnzahlNew"] . "x zusätzlich eingetragen:<br />\n";
|
||||
for( $i=0; $i<$_GET["eAnzahlNew"]; $i++)
|
||||
{
|
||||
for ($i = 0; $i < $_GET["eAnzahlNew"]; $i++) {
|
||||
echo "$i. <br />\n";
|
||||
$SQL = "INSERT INTO `ShiftEntry` (`SID`, `TID`, `UID`, `Comment`) VALUES (";
|
||||
$SQL .= "'" . $_GET["SID"] . "', '" . $_GET["TID"] . "', '0', NULL)";
|
||||
$ERG = mysql_query($SQL, $con);
|
||||
if ($debug)
|
||||
echo "DEBUG SQL: $SQL<br />\n";
|
||||
if ($ERG == 1)
|
||||
{
|
||||
if ($ERG == 1) {
|
||||
echo "Änderung wurde gesichert...<br />";
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
echo "Fehler beim speichern... bitte noch ein mal probieren :)<br />";
|
||||
echo mysql_error($con);
|
||||
}
|
||||
|
@ -303,19 +278,16 @@ case 'engeladd':
|
|||
case 'engeldel' :
|
||||
$chSQL = "UPDATE `ShiftEntry` SET `UID`='0', `Comment`= 'NULL' WHERE (`SID`='" . $_GET["SID"] .
|
||||
"' AND `UID`='" . $_GET["UIDs"] . "') LIMIT 1";
|
||||
if( isset($_GET["freeloader"]) && $_GET["freeloader"]==1)
|
||||
{
|
||||
if (isset ($_GET["freeloader"]) && $_GET["freeloader"] == 1) {
|
||||
$sql = "SELECT * FROM `Shifts` WHERE (`SID` = '" . $_GET["SID"] . "' )";
|
||||
$Erg = mysql_query($sql, $con);
|
||||
if( mysql_num_rows( $Erg) == 1)
|
||||
{
|
||||
if (mysql_num_rows($Erg) == 1) {
|
||||
$UID = $_GET["UIDs"];
|
||||
$Length = mysql_result($Erg, 0, "Len");
|
||||
$Comment = "Start: " . mysql_result($Erg, 0, "DateS") . "; " .
|
||||
"Beschreibung: " . mysql_result($Erg, 0, "Man") . "; " .
|
||||
"Removed by " . $_SESSION['Nick'];
|
||||
$ch2SQL =
|
||||
"INSERT INTO `ShiftFreeloader` (`Remove_Time`, `UID`, `Length`, `Comment`) ".
|
||||
$ch2SQL = "INSERT INTO `ShiftFreeloader` (`Remove_Time`, `UID`, `Length`, `Comment`) " .
|
||||
"VALUES ( CURRENT_TIMESTAMP, '$UID', '$Length', '$Comment');";
|
||||
}
|
||||
}
|
||||
|
@ -349,12 +321,11 @@ case 'delete':
|
|||
|
||||
case 'deleteShifs' :
|
||||
foreach ($_GET as $k => $v)
|
||||
if( strpos( " ".$k, "SID") == 1)
|
||||
{
|
||||
echo "Shifts $v wird gelöscht...";
|
||||
if (strpos(" " . $k, "SID") == 1) {
|
||||
echo "Shifts $v wird gel<65>scht...";
|
||||
executeSQL("DELETE FROM `Shifts` WHERE `SID`='$v' LIMIT 1");
|
||||
echo "<br />\n";
|
||||
echo "ShiftEntry $v wird gelöscht...";
|
||||
echo "ShiftEntry $v wird gel<65>scht...";
|
||||
executeSQL("DELETE FROM `ShiftEntry` WHERE `SID`='$v'");
|
||||
echo "<br /><br />\n";
|
||||
}
|
||||
|
@ -368,21 +339,18 @@ if (IsSet($chSQL)){
|
|||
$Erg = mysql_query($chSQL, $con);
|
||||
if ($debug)
|
||||
echo "DEBUG SQL: $chSQL<br />\n";
|
||||
if ($Erg == 1)
|
||||
{
|
||||
if ($Erg == 1) {
|
||||
echo "Änderung wurde gesichert...<br />";
|
||||
if ($debug)
|
||||
echo "DEBUG: ergebniss" . $Erg . "<br />\n";
|
||||
if (IsSet($ch2SQL))
|
||||
{
|
||||
if (IsSet ($ch2SQL)) {
|
||||
$Erg = mysql_query($ch2SQL, $con);
|
||||
if ($debug)
|
||||
echo "DEBUG SQL: $ch2SQL<br />\n";
|
||||
if( $debug ) echo "DEBUG: ergebniss". $Erg. "<br />\n";
|
||||
if ($debug)
|
||||
echo "DEBUG: ergebniss" . $Erg . "<br />\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
echo "Fehler beim speichern... bitte noch ein mal probieren :)<br />";
|
||||
echo mysql_error($con);
|
||||
}
|
||||
|
@ -390,6 +358,5 @@ if (IsSet($chSQL)){
|
|||
|
||||
}
|
||||
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
|
|
@ -1,26 +1,24 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "Himmel";
|
||||
$header = "Schichtpläne";
|
||||
$submenus = 1;
|
||||
|
||||
|
||||
if (!IsSet($_GET["action"]))
|
||||
{
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("../../../camp2011/includes/funktionen.php");
|
||||
include ("../../../camp2011/includes/funktion_schichtplan_aray.php");
|
||||
include ("../../../camp2011/includes/funktion_schichtplan.php");
|
||||
if (!IsSet ($_GET["action"])) {
|
||||
include ("includes/header.php");
|
||||
include ("includes/funktionen.php");
|
||||
include ("includes/funktion_schichtplan_aray.php");
|
||||
include ("includes/funktion_schichtplan.php");
|
||||
|
||||
echo "Hallo " . $_SESSION['Nick'] . "<br />\n" .
|
||||
"auf dieser Seite kannst du dir den Schichtplan in einer Druckansicht generieren lassen. Wähle hierfür ein Datum und den Raum:\n" .
|
||||
"<br />\n";
|
||||
|
||||
foreach( $VeranstaltungsTage as $k => $v)
|
||||
{
|
||||
foreach ($VeranstaltungsTage as $k => $v) {
|
||||
|
||||
$res = mysql_query("SELECT Name, RID FROM `Room` WHERE `show`!='N' ORDER BY `Name`;", $con);
|
||||
for ($i = 0; $i < mysql_num_rows($res); $i++)
|
||||
{
|
||||
for ($i = 0; $i < mysql_num_rows($res); $i++) {
|
||||
$Tag = $VeranstaltungsTage[$k];
|
||||
$RID = mysql_result($res, $i, "RID");
|
||||
$Rname = mysql_result($res, $i, "Name");
|
||||
|
@ -30,24 +28,22 @@ if (!IsSet($_GET["action"]))
|
|||
}
|
||||
echo "<br /><br />";
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
}
|
||||
else //#################################################################
|
||||
{
|
||||
if (IsSet($_GET["Raum"]) AND IsSet($_GET["ausdatum"]))
|
||||
include ("includes/footer.php");
|
||||
} else //#################################################################
|
||||
{
|
||||
if (IsSet ($_GET["Raum"]) AND IsSet ($_GET["ausdatum"])) {
|
||||
$Raum = $_GET["Raum"];
|
||||
$ausdatum = $_GET["ausdatum"];
|
||||
|
||||
include ("../../../camp2011/includes/config_db.php");
|
||||
include ("../../../camp2011/includes/config.php");
|
||||
include ("../../../camp2011/includes/secure.php");
|
||||
include ("config/config_db.php");
|
||||
include ("config/config.php");
|
||||
include ("includes/secure.php");
|
||||
//var wird nur gesetzt immer edit auszublenden, achtung sesion darf nicht gestart sein !!!
|
||||
$_SESSION['CVS']["admin/schichtplan.php"] = "N";
|
||||
include ("../../../camp2011/includes/funktion_lang.php");
|
||||
include ("../../../camp2011/includes/funktion_schichtplan.php");
|
||||
include ("../../../camp2011/includes/funktion_schichtplan_aray.php");
|
||||
include ("../../../camp2011/includes/funktion_user.php");
|
||||
include ("includes/funktion_lang.php");
|
||||
include ("includes/funktion_schichtplan.php");
|
||||
include ("includes/funktion_schichtplan_aray.php");
|
||||
include ("includes/funktion_user.php");
|
||||
?>
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
@ -81,7 +77,7 @@ else //#################################################################
|
|||
|
||||
<table border="2" width="650" class="border" cellpadding="2" cellspacing="1">
|
||||
|
||||
<!--Ausgabe Spalten überschrift-->
|
||||
<!--Ausgabe Spalten <EFBFBD>berschrift-->
|
||||
|
||||
<tr class="contenttopic">
|
||||
<th bgcolor="#E0E0E0">Uhrzeit</th>
|
||||
|
@ -89,33 +85,28 @@ else //#################################################################
|
|||
</tr>
|
||||
<?php
|
||||
|
||||
|
||||
//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\">";
|
||||
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";
|
||||
$Spalten[$i * $GlobalZeileProStunde + $j] .= (($j * 60) / $GlobalZeileProStunde) . "</td>\n";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
CreateRoomShifts($Raum);
|
||||
|
||||
|
||||
// Ausgabe Zeilen
|
||||
for ($i = 0; $i < (24 * $GlobalZeileProStunde); $i++) echo $Spalten[$i];
|
||||
for ($i = 0; $i < (24 * $GlobalZeileProStunde); $i++)
|
||||
echo $Spalten[$i];
|
||||
// Ende
|
||||
echo "</table>\n";
|
||||
|
||||
|
@ -125,5 +116,4 @@ echo "</html>\n";
|
|||
|
||||
} //isset($Vars)
|
||||
} //isset($Action)
|
||||
|
||||
?>
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
<?php
|
||||
$title = "Schicht Hinzufügen";
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "Schicht Hinzufügen";
|
||||
$header = "Neue Schichten erfassen";
|
||||
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("includes/header.php");
|
||||
|
||||
$Time = time() + 3600 + 3600;
|
||||
|
||||
|
@ -13,8 +15,7 @@ echo "Hallo ".$_SESSION['Nick'].",<br />\n";
|
|||
$Erg = mysql_query($sql, $con);
|
||||
$rowcount = mysql_num_rows($Erg);
|
||||
|
||||
for ($i=0; $i<$rowcount; $i++)
|
||||
{
|
||||
for ($i = 0; $i < $rowcount; $i++) {
|
||||
$Room[$i]["RID"] = mysql_result($Erg, $i, "RID");
|
||||
$Room[$i]["Name"] = mysql_result($Erg, $i, "Name");
|
||||
}
|
||||
|
@ -24,15 +25,13 @@ echo "Hallo ".$_SESSION['Nick'].",<br />\n";
|
|||
$Erg = mysql_query($sql, $con);
|
||||
$rowcount = mysql_num_rows($Erg);
|
||||
|
||||
for ($i=0; $i<$rowcount; $i++)
|
||||
{
|
||||
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");
|
||||
}
|
||||
|
||||
// sesion mit stanadrt werten befüllen
|
||||
if( !isset( $_SESSION['shiftadd.php']['SchichtName']))
|
||||
{
|
||||
// sesion mit stanadrt werten bef<65>llen
|
||||
if (!isset ($_SESSION['shiftadd.php']['SchichtName'])) {
|
||||
$_SESSION['shiftadd.php']['SchichtName'] = "--???--";
|
||||
$_SESSION['shiftadd.php']['RID'] = "";
|
||||
$_SESSION['shiftadd.php']['MonthJahr'] = gmdate("Y-m", $Time);
|
||||
|
@ -45,25 +44,21 @@ if( !isset( $_SESSION['shiftadd.php']['SchichtName']))
|
|||
$_SESSION['shiftadd.php']['NachtON'] = "OFF";
|
||||
$_SESSION['shiftadd.php']['len_night'] = "00-04-08-10-12-14-16-18-20-22-24";
|
||||
}
|
||||
// wenn werte übergeben in sesion eintragen
|
||||
// wenn werte <EFBFBD>bergeben in sesion eintragen
|
||||
if (!isset ($_GET["NachtON"]))
|
||||
$_GET["NachtON"] = "OFF";
|
||||
if (!isset ($_GET["MoreThenOne"]))
|
||||
$_GET["MoreThenOne"] = "OFF";
|
||||
if( isset( $_GET["SchichtName"]))
|
||||
{
|
||||
foreach ($_GET as $k => $v)
|
||||
{
|
||||
if (isset ($_GET["SchichtName"])) {
|
||||
foreach ($_GET as $k => $v) {
|
||||
$_SESSION['shiftadd.php'][$k] = $v;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!IsSet ($_GET["action"]))
|
||||
$_GET["action"] = "new";
|
||||
|
||||
switch( $_GET["action"])
|
||||
{
|
||||
switch ($_GET["action"]) {
|
||||
case 'new' :
|
||||
?>
|
||||
Hier kannst du neue Schichten eintragen. Dazu musst du den Anfang und das Ende der Schichten eintragen.
|
||||
|
@ -80,8 +75,9 @@ mehrere Schichten auf einmal erfasst werden:
|
|||
<td align="right">Ort:</td>
|
||||
<td><select name="RID">
|
||||
<?php
|
||||
foreach ($Room As $RTemp)
|
||||
{
|
||||
|
||||
|
||||
foreach ($Room As $RTemp) {
|
||||
echo "\t<option value=\"" . $RTemp["RID"] . "\"";
|
||||
if ($RTemp["RID"] == $_SESSION["shiftadd.php"]["RID"])
|
||||
echo " SELECTED";
|
||||
|
@ -104,6 +100,8 @@ mehrere Schichten auf einmal erfasst werden:
|
|||
<tr>
|
||||
<td align="right">More then One</td>
|
||||
<td><input type="checkbox" name="MoreThenOne" value="ON" <?php
|
||||
|
||||
|
||||
if ($_SESSION["shiftadd.php"]["MoreThenOne"] == "ON")
|
||||
echo " CHECKED";
|
||||
?>></td>
|
||||
|
@ -120,6 +118,8 @@ mehrere Schichten auf einmal erfasst werden:
|
|||
<tr>
|
||||
<td align="right">Sonderschichten ein:</td>
|
||||
<td><input type="checkbox" name="NachtON" value="ON" <?php
|
||||
|
||||
|
||||
if ($_SESSION["shiftadd.php"]["NachtON"] == "ON")
|
||||
echo " CHECKED";
|
||||
?>></td>
|
||||
|
@ -131,8 +131,9 @@ mehrere Schichten auf einmal erfasst werden:
|
|||
|
||||
<tr><td><u>Anzahl Engel je Type:</u></td></tr>
|
||||
<?php
|
||||
foreach ($EngelType As $TTemp)
|
||||
{
|
||||
|
||||
|
||||
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=\"";
|
||||
if (isset ($_SESSION["shiftadd.php"]["EngelType" . $TTemp["TID"]]))
|
||||
|
@ -150,17 +151,16 @@ mehrere Schichten auf einmal erfasst werden:
|
|||
</form>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
break; // Ende new
|
||||
|
||||
case 'newsave' :
|
||||
if (isset($_GET["SDatum"]) && ($_GET["len"] > 0))
|
||||
{
|
||||
if (isset ($_GET["SDatum"]) && ($_GET["len"] > 0)) {
|
||||
$lenOrg = $_GET["len"];
|
||||
if( $_GET["NachtON"] == "ON" )
|
||||
{
|
||||
if ($_GET["NachtON"] == "ON") {
|
||||
$lenArrayDummy = explode("-", $_GET["len_night"]);
|
||||
foreach ( $lenArrayDummy as $Temp )
|
||||
{
|
||||
foreach ($lenArrayDummy as $Temp) {
|
||||
if (isset ($Temp2))
|
||||
$lenArray[intval($Temp2)] = intval($Temp) - intval($Temp2);
|
||||
$Temp2 = $Temp;
|
||||
|
@ -182,31 +182,29 @@ case 'newsave':
|
|||
$DateEnd = $_GET["SDatum"];
|
||||
$TimeEnd = intval($_GET["STime"]);
|
||||
$len = 0;
|
||||
do
|
||||
{
|
||||
do {
|
||||
// define Start time
|
||||
$Date = $DateEnd;
|
||||
$Time = $TimeEnd;
|
||||
$_DateS = $_GET["MonthJahr"] . "-" . $Date . " " . $Time . ":00:00";
|
||||
|
||||
// define End time
|
||||
if( $_GET["NachtON"] == "ON" )
|
||||
{
|
||||
if( !isset($lenArray[$Time])) die("Zeit $Time h nicht definiert.");
|
||||
if ($_GET["NachtON"] == "ON") {
|
||||
if (!isset ($lenArray[$Time]))
|
||||
die("Zeit $Time h nicht definiert.");
|
||||
$_GET["len"] = $lenArray[$Time];
|
||||
if( $_GET["len"]<1) die("len <1");
|
||||
if ($_GET["len"] < 1)
|
||||
die("len <1");
|
||||
}
|
||||
$TimeEnd = $Time + $_GET["len"];
|
||||
|
||||
//Tagesüberschreitung
|
||||
while( $TimeEnd >= 24 )
|
||||
{
|
||||
//Tages<65>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"]) )
|
||||
{
|
||||
//ist schischt zu lang dan verk<72>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"];
|
||||
|
@ -217,13 +215,15 @@ case 'newsave':
|
|||
if ($_DateS != $_DateE)
|
||||
CreateNewEntry();
|
||||
|
||||
if( $_GET["MoreThenOne"]!="ON" ) break;
|
||||
if( $DateEnd >= $_GET["EDatum"] && $TimeEnd >= intval($_GET["ETime"]) ) break;
|
||||
} while( true );
|
||||
if ($_GET["MoreThenOne"] != "ON")
|
||||
break;
|
||||
if ($DateEnd >= $_GET["EDatum"] && $TimeEnd >= intval($_GET["ETime"]))
|
||||
break;
|
||||
}
|
||||
while (true);
|
||||
echo "</table>";
|
||||
|
||||
if( $_GET["OnlyShow"]=="ON" )
|
||||
{
|
||||
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"] . "\">";
|
||||
|
@ -237,8 +237,7 @@ case 'newsave':
|
|||
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)
|
||||
{
|
||||
foreach ($EngelType As $TTemp) {
|
||||
$Temp = "EngelType" . $TTemp["TID"];
|
||||
echo "\n\t<input type=\"hidden\" name=\"" . $Temp . "\" value=\"" . $_GET[$Temp] . "\">";
|
||||
}
|
||||
|
@ -254,13 +253,9 @@ case 'engeldel':
|
|||
|
||||
} // end switch
|
||||
|
||||
|
||||
|
||||
function CreateNewEntry()
|
||||
{
|
||||
function CreateNewEntry() {
|
||||
global $con, $_DateS, $_DateE, $EngelType, $debug;
|
||||
foreach ($EngelType As $TTemp)
|
||||
{
|
||||
foreach ($EngelType As $TTemp) {
|
||||
$Temp = "EngelType" . $TTemp["TID"];
|
||||
global $$Temp;
|
||||
}
|
||||
|
@ -273,7 +268,6 @@ function CreateNewEntry()
|
|||
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 (" .
|
||||
|
@ -284,9 +278,8 @@ function CreateNewEntry()
|
|||
|
||||
if (mysql_num_rows($Erg) != 0)
|
||||
echo "\t<td>exists</td>";
|
||||
elseif( $_GET["OnlyShow"] == "OFF" )
|
||||
{
|
||||
// erstellt Eintrag in Shifts für die algemeine schicht
|
||||
elseif ($_GET["OnlyShow"] == "OFF") {
|
||||
// erstellt Eintrag in Shifts f<>r die algemeine schicht
|
||||
$SQL = "INSERT INTO `Shifts` ( `DateS`, `DateE`, `Len`, `RID`, `Man`) VALUES ( ";
|
||||
$SQL .= "'" . $_DateS . "', '" . $_DateE . "', ";
|
||||
$SQL .= "'" . $_GET["len"] . "', '" . $_GET["RID"] . "', ";
|
||||
|
@ -295,8 +288,10 @@ function CreateNewEntry()
|
|||
|
||||
$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";
|
||||
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";
|
||||
|
@ -311,39 +306,36 @@ function CreateNewEntry()
|
|||
$Erg = mysql_query($SQL, $con);
|
||||
if (mysql_num_rows($Erg) == 0)
|
||||
echo "\t<td>?</td>";
|
||||
else
|
||||
{
|
||||
else {
|
||||
$SID = mysql_result($Erg, 0, "SID");
|
||||
echo "\t<td>" . $SID . "</td>";
|
||||
}
|
||||
|
||||
// erstellt für jeden Engeltypen die eintrage in 'ShiftEntry'
|
||||
// erstellt f<>r jeden Engeltypen die eintrage in 'ShiftEntry'
|
||||
echo "\t<td>";
|
||||
foreach ($EngelType As $TTemp)
|
||||
{
|
||||
foreach ($EngelType As $TTemp) {
|
||||
$Temp = "EngelType" . $TTemp["TID"];
|
||||
|
||||
if( $_GET[$Temp] > 0 )
|
||||
{
|
||||
if ($_GET[$Temp] > 0) {
|
||||
$i = 0;
|
||||
echo $_GET[$Temp] . " " . $TTemp["Name"] . "<br />\t";
|
||||
while( $i++ < $_GET[$Temp] )
|
||||
{
|
||||
if( $_GET["OnlyShow"] == "OFF" )
|
||||
{
|
||||
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 ($debug)
|
||||
$SQLFail = "\n\t<br />[" . $SQL . "]";
|
||||
|
||||
if ($Erg == 1) echo "'pass' ";
|
||||
else echo "'fail' <u>". mysql_error($con). "</u>$SQLFail</td>\n";
|
||||
|
||||
}
|
||||
if ($Erg == 1)
|
||||
echo "'pass' ";
|
||||
else
|
||||
echo "'fail' <u>" . mysql_error($con) . "</u>$SQLFail</td>\n";
|
||||
|
||||
} else
|
||||
echo "+";
|
||||
}
|
||||
echo "<br />";
|
||||
|
@ -354,5 +346,5 @@ function CreateNewEntry()
|
|||
echo "</tr>\n";
|
||||
}
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "Sprache";
|
||||
$header = "Liste der existierenden Sprcheinträge";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("includes/header.php");
|
||||
|
||||
|
||||
if( !isset( $_GET["TextID"] ) )
|
||||
{
|
||||
if (!isset ($_GET["TextID"])) {
|
||||
echo Get_Text("Hello") . $_SESSION['Nick'] . ", <br />\n";
|
||||
echo Get_Text("pub_sprache_text1") . "<br /><br />\n";
|
||||
|
||||
|
@ -28,27 +27,22 @@ if( !isset( $_GET["TextID"] ) )
|
|||
echo "\t\t<td class=\"contenttopic\"><b>" . Get_Text("pub_sprache_Edit") . "</b></td>";
|
||||
echo "\t\t</tr>";
|
||||
|
||||
|
||||
if( isset($_GET["ShowEntry"]))
|
||||
{
|
||||
if (isset ($_GET["ShowEntry"])) {
|
||||
// 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++ )
|
||||
{
|
||||
for ($i = 0; $i < mysql_num_rows($erg); $i++) {
|
||||
$TextID_New = mysql_result($erg, $i, "TextID");
|
||||
if( $TextID_Old != $TextID_New )
|
||||
{
|
||||
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 )
|
||||
{
|
||||
foreach ($Sprachen as $Name => $Value) {
|
||||
$Value = html_entity_decode($Value, ENT_QUOTES);
|
||||
echo "\t\t<td><textarea name=\"$Name\" cols=\"22\" rows=\"8\">$Value</textarea></td>\n";
|
||||
$Sprachen[$Name] = "";
|
||||
|
@ -75,21 +69,17 @@ if( !isset( $_GET["TextID"] ) )
|
|||
echo "</tr>";
|
||||
echo "</form>\n";
|
||||
|
||||
|
||||
echo "</table>\n";
|
||||
} /*if( !isset( $TextID ) )*/
|
||||
else
|
||||
{
|
||||
else {
|
||||
echo "edit: " . $_GET["TextID"] . "<br /><br />";
|
||||
foreach ($_GET as $k => $v) {
|
||||
if( $k != "TextID" )
|
||||
{
|
||||
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 )
|
||||
{
|
||||
if (mysql_num_rows($erg_test) == 0) {
|
||||
$sql_save = "INSERT INTO `Sprache` (`TextID`, `Sprache`, `Text`) " .
|
||||
"VALUES ('" . $_GET["TextID"] . "', '$k', '$v')";
|
||||
echo $sql_save . "<br />";
|
||||
|
@ -98,9 +88,8 @@ else
|
|||
echo "\t $k Save: OK<br />\n";
|
||||
else
|
||||
echo "\t $k Save: KO<br />\n";
|
||||
}
|
||||
else if( mysql_result($erg_test, 0, "Text")!=$v )
|
||||
{
|
||||
} 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 />";
|
||||
|
@ -109,14 +98,13 @@ else
|
|||
echo "\t $k Update: OK<br />\n";
|
||||
else
|
||||
echo "\t $k Update: KO<br />\n";
|
||||
}
|
||||
else
|
||||
} else
|
||||
echo "\t $k no changes<br />\n";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "T-Shirt-Ausgabe";
|
||||
$header = "T-Shirt-Ausgabe für aktiven Engel";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("../../../camp2011/includes/funktion_db_list.php");
|
||||
|
||||
include ("includes/header.php");
|
||||
include ("includes/funktion_db_list.php");
|
||||
|
||||
If (IsSet ($_GET["aktiv"])) {
|
||||
|
||||
|
@ -15,7 +15,6 @@ If (IsSet($_GET["aktiv"])) {
|
|||
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 />
|
||||
|
@ -24,6 +23,8 @@ Hinter diesem erscheint ein Link, über den man eintragen kann, dass der Eng
|
|||
Liste aller aktiven Engel:
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
$SQL = "SELECT * FROM `User` WHERE (`Aktiv`='1') ORDER BY `Nick` ASC";
|
||||
$Erg = mysql_query($SQL, $con);
|
||||
|
||||
|
@ -37,6 +38,8 @@ $rowcount = mysql_num_rows($Erg);
|
|||
<td>T-Shirt ausgeben:</td>
|
||||
</td>
|
||||
<?php
|
||||
|
||||
|
||||
for ($i = 0; $i < $rowcount; $i++) {
|
||||
echo "\t<tr class=\"content\">\n";
|
||||
$eUID = mysql_result($Erg, $i, "UID");
|
||||
|
@ -54,6 +57,6 @@ for ($i=0; $i<$rowcount; $i++){
|
|||
|
||||
echo "</table>";
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "User-Liste";
|
||||
$header = "Editieren der Engelliste";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("../../../camp2011/includes/funktion_db_list.php");
|
||||
include ("includes/header.php");
|
||||
include ("includes/funktion_db_list.php");
|
||||
|
||||
if (!IsSet($_GET["enterUID"]))
|
||||
{
|
||||
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";
|
||||
if (!isset ($_GET["OrderBy"]))
|
||||
$_GET["OrderBy"] = "Nick";
|
||||
$SQL = "SELECT User.*, UserGroups.Name AS 'Group' FROM `User` " .
|
||||
"LEFT JOIN `UserCVS` ON User.UID = UserCVS.UID " .
|
||||
"LEFT JOIN `UserGroups` ON UserGroups.UID = UserCVS.GroupID " .
|
||||
|
@ -23,7 +24,6 @@ if (!IsSet($_GET["enterUID"]))
|
|||
$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>
|
||||
|
@ -53,6 +53,8 @@ if (!IsSet($_GET["enterUID"]))
|
|||
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
$Gekommen = 0;
|
||||
$Active = 0;
|
||||
$Tshirt = 0;
|
||||
|
@ -93,15 +95,11 @@ if (!IsSet($_GET["enterUID"]))
|
|||
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>". funktion_isLinkAllowed_addLink_OrEmpty(
|
||||
"admin/userChangeNormal.php?enterUID=".
|
||||
mysql_result($Erg, $n, "UID")."&Type=Normal",
|
||||
"Änd.").
|
||||
echo "\t<td>" . funktion_isLinkAllowed_addLink_OrEmpty("admin/userChangeNormal.php?enterUID=" .
|
||||
mysql_result($Erg, $n, "UID") . "&Type=Normal", "Änd.") .
|
||||
"</td>\n";
|
||||
echo "\t<td>". funktion_isLinkAllowed_addLink_OrEmpty(
|
||||
"admin/userChangeSecure.php?enterUID=".
|
||||
mysql_result($Erg, $n, "UID")."&Type=Secure",
|
||||
"Secure").
|
||||
echo "\t<td>" . funktion_isLinkAllowed_addLink_OrEmpty("admin/userChangeSecure.php?enterUID=" .
|
||||
mysql_result($Erg, $n, "UID") . "&Type=Secure", "Secure") .
|
||||
"</td>\n";
|
||||
echo "</tr>\n";
|
||||
}
|
||||
|
@ -112,29 +110,24 @@ if (!IsSet($_GET["enterUID"]))
|
|||
// Ende Userliste
|
||||
|
||||
echo "<h1>Statistics</h1>";
|
||||
funktion_db_element_list_2row( "Hometown",
|
||||
"SELECT COUNT(`Hometown`), `Hometown` FROM `User` GROUP BY `Hometown`");
|
||||
funktion_db_element_list_2row("Hometown", "SELECT COUNT(`Hometown`), `Hometown` FROM `User` GROUP BY `Hometown`");
|
||||
|
||||
echo "<br />\n";
|
||||
|
||||
funktion_db_element_list_2row( "Engeltypen",
|
||||
"SELECT COUNT(`Art`), `Art` FROM `User` GROUP BY `Art`");
|
||||
funktion_db_element_list_2row("Engeltypen", "SELECT COUNT(`Art`), `Art` FROM `User` GROUP BY `Art`");
|
||||
|
||||
echo "<br />\n";
|
||||
|
||||
funktion_db_element_list_2row( "Used Groups",
|
||||
"SELECT UserGroups.Name AS 'GroupName', COUNT(UserGroups.Name) AS Count FROM `UserCVS` ".
|
||||
funktion_db_element_list_2row("Used Groups", "SELECT UserGroups.Name AS 'GroupName', COUNT(UserGroups.Name) AS Count FROM `UserCVS` " .
|
||||
"LEFT JOIN `UserGroups` ON UserGroups.UID = UserCVS.GroupID " .
|
||||
"WHERE (UserCVS.GroupID!='NULL') " .
|
||||
"GROUP BY `GroupName` " .
|
||||
"");
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
echo "error";
|
||||
}
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "Engel Arrived";
|
||||
$header = "Engel was arrived";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("../../../camp2011/includes/funktion_db_list.php");
|
||||
|
||||
include ("includes/header.php");
|
||||
include ("includes/funktion_db_list.php");
|
||||
|
||||
If (IsSet ($_GET["arrived"])) {
|
||||
|
||||
|
@ -39,8 +39,7 @@ for ($i=0; $i<$rowcount; $i++){
|
|||
echo "\t\t<td>" . UID2Nick($eUID) . "</td>\n";
|
||||
echo "\t\t<td>" . mysql_result($Erg, $i, "Gekommen") . "</td>\n";
|
||||
|
||||
if (mysql_result($Erg, $i, "Gekommen") =="1")
|
||||
{
|
||||
if (mysql_result($Erg, $i, "Gekommen") == "1") {
|
||||
echo "\t\t<td>" . Get_Text("pri_userArrived_TableEntry_Arrived") . "</td>";
|
||||
} else {
|
||||
echo "\t\t<td><a href=\"./userArrived.php?arrived=$eUID\">" . Get_Text("pri_userArrived_TableEntry_Set") . "</a></td>";
|
||||
|
@ -49,6 +48,6 @@ for ($i=0; $i<$rowcount; $i++){
|
|||
}
|
||||
echo "</table>";
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "User-Liste";
|
||||
$header = "Editieren der Engelliste";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("../../../camp2011/includes/funktion_db_list.php");
|
||||
include ("includes/header.php");
|
||||
include ("includes/funktion_db_list.php");
|
||||
|
||||
if (IsSet($_GET["enterUID"]))
|
||||
{
|
||||
if (IsSet ($_GET["enterUID"])) {
|
||||
// UserID wurde mit uebergeben --> Aendern...
|
||||
|
||||
echo "Hallo,<br />" .
|
||||
|
@ -26,8 +26,7 @@ if (IsSet($_GET["enterUID"]))
|
|||
if (mysql_num_rows($Erg) != 1)
|
||||
echo "<tr><td>Sorry, der Engel (UID=" . $_GET["enterUID"] .
|
||||
") wurde in der Liste nicht gefunden.</td></tr>";
|
||||
else
|
||||
{
|
||||
else {
|
||||
echo "<tr><td>\n";
|
||||
echo "<table>\n";
|
||||
echo " <tr><td>Nick</td><td>" .
|
||||
|
@ -67,8 +66,8 @@ if (IsSet($_GET["enterUID"]))
|
|||
"<input type=\"text\" size=\"5\" name=\"eSize\" value=\"" .
|
||||
mysql_result($Erg, 0, "Size") . "\"></td></tr>\n";
|
||||
echo " <tr><td>Passwort</td><td>" .
|
||||
"<a href=\"./userSaveNormal.php?action=newpw&eUID="
|
||||
.mysql_result($Erg, 0, "UID")."\">neues Kennwort setzen</a></td></tr>\n";
|
||||
"<a href=\"./userSaveNormal.php?action=newpw&eUID=" .
|
||||
mysql_result($Erg, 0, "UID") . "\">neues Kennwort setzen</a></td></tr>\n";
|
||||
|
||||
// Gekommen?
|
||||
echo " <tr><td>Gekommen</td><td>\n";
|
||||
|
@ -124,14 +123,11 @@ if (IsSet($_GET["enterUID"]))
|
|||
echo "<input type=\"submit\" value=\"löschen...\">\n";
|
||||
echo "</form>";
|
||||
|
||||
|
||||
echo "<hr>";
|
||||
funktion_db_element_list_2row(
|
||||
"Freeloader Shifts",
|
||||
"SELECT `Remove_Time`, `Length`, `Comment` FROM `ShiftFreeloader` WHERE UID=". $_GET["enterUID"]);
|
||||
funktion_db_element_list_2row("Freeloader Shifts", "SELECT `Remove_Time`, `Length`, `Comment` FROM `ShiftFreeloader` WHERE UID=" . $_GET["enterUID"]);
|
||||
}
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "User-Liste";
|
||||
$header = "Editieren der Engelliste";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("../../../camp2011/includes/funktion_db_list.php");
|
||||
include ("includes/header.php");
|
||||
include ("includes/funktion_db_list.php");
|
||||
|
||||
if (IsSet($_GET["enterUID"]))
|
||||
{
|
||||
if (IsSet ($_GET["enterUID"])) {
|
||||
// UserID wurde mit uebergeben --> Aendern...
|
||||
|
||||
echo "Hallo,<br />" .
|
||||
|
@ -16,14 +16,12 @@ if (IsSet($_GET["enterUID"]))
|
|||
"Wenn T-Shirt ein 'Ja' enthält, bedeutet dies, dass der Engel " .
|
||||
"bereits sein T-Shirt erhalten hat.<br /><br />\n";
|
||||
|
||||
|
||||
$SQL_CVS = "SELECT * FROM `UserCVS` WHERE `UID`='" . $_GET["enterUID"] . "'";
|
||||
$Erg_CVS = mysql_query($SQL_CVS, $con);
|
||||
|
||||
if (mysql_num_rows($Erg_CVS) != 1)
|
||||
echo "Sorry, der Engel (UID=" . $_GET["enterUID"] . ") wurde in der Liste nicht gefunden.";
|
||||
else
|
||||
{
|
||||
else {
|
||||
// Rename if is an group
|
||||
if ($_GET["enterUID"] < 0) {
|
||||
$SQLname = "SELECT `Name` FROM `UserGroups` WHERE `UID`='" . $_GET["enterUID"] . "'";
|
||||
|
@ -42,25 +40,20 @@ if (IsSet($_GET["enterUID"]))
|
|||
echo "<input type=\"hidden\" name=\"Type\" value=\"Secure\">\n";
|
||||
echo " <tr><td><br /><u>Rights of \"" . UID2Nick($_GET["enterUID"]) . "\":</u></td></tr>\n";
|
||||
|
||||
|
||||
$CVS_Data = mysql_fetch_array($Erg_CVS);
|
||||
$CVS_Data_i = 1;
|
||||
foreach ($CVS_Data as $CVS_Data_Name => $CVS_Data_Value)
|
||||
{
|
||||
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")
|
||||
{
|
||||
//nur jeder zweiter sonst wird f<>r jeden text noch die position (Zahl) ausgegeben
|
||||
if ($CVS_Data_i % 2 && $CVS_Data_Name != "UID") {
|
||||
if ($CVS_Data_Name == "GroupID") {
|
||||
if( $_GET["enterUID"] > 0 )
|
||||
{
|
||||
if ($_GET["enterUID"] > 0) {
|
||||
echo "<tr><td><b>Group</b></td>\n" .
|
||||
"<td><select name=\"GroupID\">";
|
||||
|
||||
$SQL_Group = "SELECT * FROM `UserGroups`";
|
||||
$Erg_Group = mysql_query($SQL_Group, $con);
|
||||
for ($n = 0 ; $n < mysql_num_rows($Erg_Group) ; $n++)
|
||||
{
|
||||
for ($n = 0; $n < mysql_num_rows($Erg_Group); $n++) {
|
||||
$UID = mysql_result($Erg_Group, $n, "UID");
|
||||
echo "\t<option value=\"$UID\"";
|
||||
if ($CVS_Data_Value == $UID)
|
||||
|
@ -79,8 +72,7 @@ if (IsSet($_GET["enterUID"]))
|
|||
if ($CVS_Data_Value == "N")
|
||||
echo " checked";
|
||||
echo ">denied \n";
|
||||
if( $_GET["enterUID"] > 0 )
|
||||
{
|
||||
if ($_GET["enterUID"] > 0) {
|
||||
echo "<input type=\"radio\" name=\"" . ($CVS_Data_i -1) . "\" value=\"G\" ";
|
||||
if ($CVS_Data_Value == "G")
|
||||
echo " checked";
|
||||
|
@ -106,7 +98,7 @@ if (IsSet($_GET["enterUID"]))
|
|||
}
|
||||
}
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "Defalut User Setting";
|
||||
$header = "Defalut User Setting";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("../../../camp2011/includes/funktion_db_list.php");
|
||||
include ("includes/header.php");
|
||||
include ("includes/funktion_db_list.php");
|
||||
|
||||
echo "Hallo " . $_SESSION['Nick'] .
|
||||
",<br />\nhier hast du die Möglichkeit, die Defaulteinstellungen für neue User einzustellen:<br /><br />\n";
|
||||
|
@ -13,10 +14,8 @@ echo "\t<tr class=\"contenttopic\">\n";
|
|||
echo "\t\t<th>Page</th>\n\t\t<th>Show</th>\n\t\t<th></th>\n";
|
||||
echo "\t</tr>\n";
|
||||
|
||||
if( isset( $_GET["Field"]) && isset( $_GET["Default"]) && isset( $_GET["Send"]))
|
||||
{
|
||||
switch( $_GET["Send"])
|
||||
{
|
||||
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";
|
||||
|
@ -66,7 +65,6 @@ if( isset( $_GET["Field"]) && isset( $_GET["Default"]) && isset( $_GET["Send"]))
|
|||
} //SWITCH
|
||||
} //IF(
|
||||
|
||||
|
||||
$erg = mysql_query("SHOW COLUMNS FROM `UserCVS`");
|
||||
echo mysql_error();
|
||||
echo "\t<tr class=\"content\">\n";
|
||||
|
@ -77,8 +75,7 @@ echo "\t\t\t<td><select name=\"GroupID\">";
|
|||
|
||||
$SQL_Group = "SELECT * FROM `UserGroups`";
|
||||
$Erg_Group = mysql_query($SQL_Group, $con);
|
||||
for ($n = 0 ; $n < mysql_num_rows($Erg_Group) ; $n++)
|
||||
{
|
||||
for ($n = 0; $n < mysql_num_rows($Erg_Group); $n++) {
|
||||
$UID = mysql_result($Erg_Group, $n, "UID");
|
||||
echo "\t<option value=\"$UID\"";
|
||||
if (mysql_result($erg, 1, "Default") == $UID)
|
||||
|
@ -91,8 +88,7 @@ echo "\t\t\t <input type=\"submit\" name=\"Send\" value=\"SetForAllUser\"></t
|
|||
echo "\t\t</form>\n";
|
||||
echo "\t</tr>\n";
|
||||
|
||||
for( $i=2; $i<mysql_num_rows($erg); $i++)
|
||||
{
|
||||
for ($i = 2; $i < mysql_num_rows($erg); $i++) {
|
||||
echo "\t<tr class=\"content\">\n";
|
||||
echo "\t\t<form action=\"userDefaultSetting.php\">\n";
|
||||
echo "\t\t\t<input name=\"Field\" type=\"hidden\" value=\"" . mysql_result($erg, $i, "Field") . "\">\n";
|
||||
|
@ -135,10 +131,8 @@ echo "\t\t\t<td><input type=\"submit\" name=\"Send\" value=\"New\"></td>\n";
|
|||
echo "\t\t</form>\n";
|
||||
echo "\t</tr>\n";
|
||||
|
||||
|
||||
|
||||
echo "</table>\n";
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
|
|
@ -1,24 +1,21 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "User-Liste";
|
||||
$header = "Index";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("../../../camp2011/includes/funktion_db_list.php");
|
||||
include ("../../../camp2011/includes/crypt.php");
|
||||
include ("../../../camp2011/includes/funktion_db.php");
|
||||
include ("includes/header.php");
|
||||
include ("includes/funktion_db_list.php");
|
||||
include ("includes/crypt.php");
|
||||
include ("includes/funktion_db.php");
|
||||
|
||||
if (IsSet($_GET["action"]))
|
||||
{
|
||||
if (IsSet ($_GET["action"])) {
|
||||
SetHeaderGo2Back();
|
||||
echo "Gesendeter Befehl: " . $_GET["action"] . "<br />";
|
||||
|
||||
switch ($_GET["action"])
|
||||
{
|
||||
switch ($_GET["action"]) {
|
||||
case "change" :
|
||||
if (IsSet($_POST["enterUID"]))
|
||||
{
|
||||
if ($_POST["Type"] == "Normal")
|
||||
{
|
||||
if (IsSet ($_POST["enterUID"])) {
|
||||
if ($_POST["Type"] == "Normal") {
|
||||
$SQL = "UPDATE `User` SET ";
|
||||
$SQL .= " `Nick` = '" . $_POST["eNick"] . "', `Name` = '" . $_POST["eName"] . "', " .
|
||||
"`Vorname` = '" . $_POST["eVorname"] . "', " .
|
||||
|
@ -42,17 +39,14 @@ if (IsSet($_GET["action"]))
|
|||
} else {
|
||||
echo "Fehler beim speichern...\n(" . mysql_error($con) . ")";
|
||||
}
|
||||
}
|
||||
else
|
||||
echo "<h1>Fehler: Unbekanter Type (". $_POST["Type"]. ") übergeben\n</h1>\n";
|
||||
}
|
||||
else
|
||||
echo "<h1>Fehler: UserID (enterUID) wurde nicht per POST übergeben</h1>\n";
|
||||
} else
|
||||
echo "<h1>Fehler: Unbekanter Type (" . $_POST["Type"] . ") <20>bergeben\n</h1>\n";
|
||||
} else
|
||||
echo "<h1>Fehler: UserID (enterUID) wurde nicht per POST <20>bergeben</h1>\n";
|
||||
break;
|
||||
|
||||
case "delete" :
|
||||
if (IsSet($_POST["enterUID"]))
|
||||
{
|
||||
if (IsSet ($_POST["enterUID"])) {
|
||||
echo "delate User...";
|
||||
$SQL = "DELETE FROM `User` WHERE `UID`='" . $_POST["enterUID"] . "' LIMIT 1;";
|
||||
$Erg = db_query($SQL, "User delete");
|
||||
|
@ -83,7 +77,6 @@ if (IsSet($_GET["action"]))
|
|||
}
|
||||
break;
|
||||
|
||||
|
||||
case "newpw" :
|
||||
echo "Bitte neues Kennwort für <b>";
|
||||
// Get Nick
|
||||
|
@ -100,8 +93,7 @@ if (IsSet($_GET["action"]))
|
|||
break;
|
||||
|
||||
case "newpwsave" :
|
||||
if ($_POST["ePasswort"] == $_POST["ePasswort2"])
|
||||
{ // beide Passwoerter passen...
|
||||
if ($_POST["ePasswort"] == $_POST["ePasswort2"]) { // beide Passwoerter passen...
|
||||
$_POST["ePasswort"] = PassCrypt($_POST["ePasswort"]);
|
||||
$SQL = "UPDATE `User` SET `Passwort`='" . $_POST["ePasswort"] . "' " .
|
||||
"WHERE `UID`='" . $_POST["eUID"] . "'";
|
||||
|
@ -111,20 +103,17 @@ if (IsSet($_GET["action"]))
|
|||
} else {
|
||||
echo "Fehler beim speichern...\n(" . mysql_error($con) . ")";
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
echo "Das Passwort wurde nicht übereinstimmend eingegeben!";
|
||||
break;
|
||||
} // end switch
|
||||
|
||||
// ende - Action ist gesetzt
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// kein Action gesetzt -> abbruch
|
||||
echo "Unzulässiger Aufruf.<br />Bitte neu editieren...";
|
||||
}
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
|
|
@ -1,43 +1,38 @@
|
|||
<?php
|
||||
require_once ('../bootstrap.php');
|
||||
|
||||
$title = "User-Liste";
|
||||
$header = "Index";
|
||||
include ("../../../camp2011/includes/header.php");
|
||||
include ("../../../camp2011/includes/funktion_db_list.php");
|
||||
include ("../../../camp2011/includes/crypt.php");
|
||||
include ("../../../camp2011/includes/funktion_db.php");
|
||||
include ("includes/header.php");
|
||||
include ("includes/funktion_db_list.php");
|
||||
include ("includes/crypt.php");
|
||||
include ("includes/funktion_db.php");
|
||||
|
||||
if( !IsSet($_POST["enterUID"]) )
|
||||
{
|
||||
if (!IsSet ($_POST["enterUID"])) {
|
||||
$Right = "N";
|
||||
} elseif( $_POST["enterUID"] > 0 ) {
|
||||
}
|
||||
elseif ($_POST["enterUID"] > 0) {
|
||||
$Right = $_SESSION['CVS']["admin/user.php"];
|
||||
} else {
|
||||
$Right = $_SESSION['CVS']["admin/group.php"];
|
||||
}
|
||||
|
||||
if ( ($Right=="Y") && IsSet($_GET["action"]))
|
||||
{
|
||||
if (($Right == "Y") && IsSet ($_GET["action"])) {
|
||||
SetHeaderGo2Back();
|
||||
echo "Gesendeter Befehl: " . $_GET["action"] . "<br />";
|
||||
|
||||
switch ($_GET["action"])
|
||||
{
|
||||
switch ($_GET["action"]) {
|
||||
case "change" :
|
||||
if (IsSet($_POST["enterUID"]))
|
||||
{
|
||||
if ($_POST["Type"] == "Secure")
|
||||
{
|
||||
if (IsSet ($_POST["enterUID"])) {
|
||||
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)
|
||||
{
|
||||
foreach ($CVS_Data as $CVS_Data_Name => $CVS_Data_Value) {
|
||||
if (($CVS_Data_i +1) % 2 && $CVS_Data_Name != "UID") {
|
||||
if( $CVS_Data_Name == "GroupID")
|
||||
{
|
||||
if ($CVS_Data_Name == "GroupID") {
|
||||
if ($_POST["enterUID"] > 0)
|
||||
$SQL2 .= "`$CVS_Data_Name` = '" . $_POST["GroupID"] . "', ";
|
||||
else
|
||||
|
@ -57,17 +52,14 @@ if ( ($Right=="Y") && IsSet($_GET["action"]))
|
|||
} else {
|
||||
echo "Fehler beim speichern...\n(" . mysql_error($con) . ")";
|
||||
}
|
||||
}
|
||||
else
|
||||
echo "<h1>Fehler: Unbekanter Type (". $_POST["Type"]. ") übergeben\n</h1>\n";
|
||||
}
|
||||
else
|
||||
echo "<h1>Fehler: UserID (enterUID) wurde nicht per POST übergeben</h1>\n";
|
||||
} else
|
||||
echo "<h1>Fehler: Unbekanter Type (" . $_POST["Type"] . ") <20>bergeben\n</h1>\n";
|
||||
} else
|
||||
echo "<h1>Fehler: UserID (enterUID) wurde nicht per POST <20>bergeben</h1>\n";
|
||||
break;
|
||||
|
||||
case "changeGroupName" :
|
||||
if (IsSet($_POST["enterUID"]) && ($_POST["enterUID"]<0) )
|
||||
{
|
||||
if (IsSet ($_POST["enterUID"]) && ($_POST["enterUID"] < 0)) {
|
||||
$SQL = "UPDATE `UserGroups` SET `Name`='" . $_POST["GroupName"] . "' WHERE `UID`='" . $_POST["enterUID"] . "' LIMIT 1 ;";
|
||||
$Erg = db_query($SQL, "Update Group Name");
|
||||
if ($Erg == 1) {
|
||||
|
@ -75,14 +67,12 @@ if ( ($Right=="Y") && IsSet($_GET["action"]))
|
|||
} else {
|
||||
echo "Fehler beim speichern...\n(" . mysql_error($con) . ")";
|
||||
}
|
||||
}
|
||||
else
|
||||
echo "<h1>Fehler: UserID (enterUID) wurde nicht per POST übergeben</h1>\n";
|
||||
} else
|
||||
echo "<h1>Fehler: UserID (enterUID) wurde nicht per POST <20>bergeben</h1>\n";
|
||||
break;
|
||||
|
||||
case "delete" :
|
||||
if (IsSet($_POST["enterUID"]) && ($_POST["enterUID"]>0) )
|
||||
{
|
||||
if (IsSet ($_POST["enterUID"]) && ($_POST["enterUID"] > 0)) {
|
||||
echo "delate User...";
|
||||
$SQL = "DELETE FROM `User` WHERE `UID`='" . $_POST["enterUID"] . "' LIMIT 1;";
|
||||
$Erg = db_query($SQL, "User delete");
|
||||
|
@ -110,7 +100,8 @@ if ( ($Right=="Y") && IsSet($_GET["action"]))
|
|||
} else {
|
||||
echo "Fehler beim speichern...\n(" . mysql_error($con) . ")";
|
||||
}
|
||||
} elseif (IsSet($_POST["enterUID"]) && ($_POST["enterUID"]<0) ) {
|
||||
}
|
||||
elseif (IsSet ($_POST["enterUID"]) && ($_POST["enterUID"] < 0)) {
|
||||
echo "delate Group...";
|
||||
$SQL = "DELETE FROM `UserGroups` WHERE `UID`='" . $_POST["enterUID"] . "' LIMIT 1;";
|
||||
$Erg = db_query($SQL, "Group delete");
|
||||
|
@ -134,11 +125,11 @@ if ( ($Right=="Y") && IsSet($_GET["action"]))
|
|||
} // end switch
|
||||
|
||||
// ende - Action ist gesetzt
|
||||
} elseif ( IsSet($_GET["new"]) && ($_SESSION['CVS']["admin/group.php"]=="Y") ) {
|
||||
}
|
||||
elseif (IsSet ($_GET["new"]) && ($_SESSION['CVS']["admin/group.php"] == "Y")) {
|
||||
echo "Gesendeter Befehl: " . $_GET["new"] . "<br />";
|
||||
|
||||
switch ($_GET["new"])
|
||||
{
|
||||
switch ($_GET["new"]) {
|
||||
case "newGroup" :
|
||||
echo "\tGenerate new Group ID...\n";
|
||||
$SQLid = "SELECT MIN(`UID`) FROM `UserCVS`;";
|
||||
|
@ -150,8 +141,7 @@ if ( ($Right=="Y") && IsSet($_GET["action"]))
|
|||
$SQLnew2 = "INSERT INTO `UserCVS` (`UID`, `GroupID`) VALUES ('$NewId', NULL );";
|
||||
echo "\t<br />Generate new UserGroup ...\n";
|
||||
$ErgNew1 = db_query($SQLnew1, "create UserGroups Entry");
|
||||
if ($ErgNew1 == 1)
|
||||
{
|
||||
if ($ErgNew1 == 1) {
|
||||
echo "\t<br />Generate new User rights...\n";
|
||||
$ErgNew2 = db_query($SQLnew2, "UserCVS Entry");
|
||||
if ($ErgNew1 == 1) {
|
||||
|
@ -165,7 +155,6 @@ if ( ($Right=="Y") && IsSet($_GET["action"]))
|
|||
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
@ -173,6 +162,6 @@ if ( ($Right=="Y") && IsSet($_GET["action"]))
|
|||
echo "Unzulässiger Aufruf.<br />Bitte neu editieren...";
|
||||
}
|
||||
|
||||
include ("../../../camp2011/includes/footer.php");
|
||||
include ("includes/footer.php");
|
||||
?>
|
||||
|
||||
|
|
Loading…
Reference in New Issue